/[emacs]/emacs/lisp/ehelp.el
ViewVC logotype

Diff of /emacs/lisp/ehelp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33.2.1 by handa, Fri Apr 16 12:49:49 2004 UTC revision 1.33.2.2 by miles, Mon Jun 28 07:28:39 2004 UTC
# Line 1  Line 1 
1  ;;; ehelp.el --- bindings for electric-help mode  ;;; ehelp.el --- bindings for electric-help mode
2    
3  ;; Copyright (C) 1986, 1995, 2000, 2001 Free Software Foundation, Inc.  ;; Copyright (C) 1986, 1995, 2000, 2001, 2004 Free Software Foundation, Inc.
4    
5  ;; Maintainer: FSF  ;; Maintainer: FSF
6  ;; Keywords: help, extensions  ;; Keywords: help, extensions
# Line 200  BUFFER is put into `default-major-mode' Line 200  BUFFER is put into `default-major-mode'
200                     (progn (setq unread-command-events nil)                     (progn (setq unread-command-events nil)
201                            (throw 'exit t)))))                            (throw 'exit t)))))
202      (let (up down both neither      (let (up down both neither
203            (standard (and (eq (key-binding " ")            (standard (and (eq (key-binding " " nil t)
204                               'scroll-up)                               'scroll-up)
205                           (eq (key-binding "\^?")                           (eq (key-binding "\^?" nil t)
206                               'scroll-down)                               'scroll-down)
207                           (eq (key-binding "q")                           (eq (key-binding "q" nil t)
208                               'electric-help-exit)                               'electric-help-exit)
209                           (eq (key-binding "r")                           (eq (key-binding "r" nil t)
210                               'electric-help-retain))))                               'electric-help-retain))))
211        (Electric-command-loop        (Electric-command-loop
212          'exit          'exit
# Line 215  BUFFER is put into `default-major-mode' Line 215  BUFFER is put into `default-major-mode'
215                        ;beginning-of-buffer - otherwise pos-visible-in-window-p                        ;beginning-of-buffer - otherwise pos-visible-in-window-p
216                        ;will yield a wrong result.                        ;will yield a wrong result.
217            (let ((min (pos-visible-in-window-p (point-min)))            (let ((min (pos-visible-in-window-p (point-min)))
218                  (max (pos-visible-in-window-p (point-max))))                  (max (pos-visible-in-window-p (1- (point-max)))))
219              (cond (isearch-mode 'noprompt)              (cond (isearch-mode 'noprompt)
220                    ((and min max)                    ((and min max)
221                     (cond (standard "Press q to exit, r to retain ")                     (cond (standard "Press q to exit, r to retain ")
# Line 272  will select it.)" Line 272  will select it.)"
272    (interactive)    (interactive)
273    (error "%s is undefined -- Press %s to exit"    (error "%s is undefined -- Press %s to exit"
274           (mapconcat 'single-key-description (this-command-keys) " ")           (mapconcat 'single-key-description (this-command-keys) " ")
275           (if (eq (key-binding "q") 'electric-help-exit)           (if (eq (key-binding "q" nil t) 'electric-help-exit)
276               "q"               "q"
277             (substitute-command-keys "\\[electric-help-exit]"))))             (substitute-command-keys "\\[electric-help-exit]"))))
278    
# Line 280  will select it.)" Line 280  will select it.)"
280  ;>>> this needs to be hairified (recursive help, anybody?)  ;>>> this needs to be hairified (recursive help, anybody?)
281  (defun electric-help-help ()  (defun electric-help-help ()
282    (interactive)    (interactive)
283    (if (and (eq (key-binding "q") 'electric-help-exit)    (if (and (eq (key-binding "q" nil t) 'electric-help-exit)
284             (eq (key-binding " ") 'scroll-up)             (eq (key-binding " " nil t) 'scroll-up)
285             (eq (key-binding "\^?") 'scroll-down)             (eq (key-binding "\^?" nil t) 'scroll-down)
286             (eq (key-binding "r") 'electric-help-retain))             (eq (key-binding "r" nil t) 'electric-help-retain))
287        (message "SPC scrolls up, DEL scrolls down, q exits burying help buffer, r exits")        (message "SPC scrolls up, DEL scrolls down, q exits burying help buffer, r exits")
288      (message "%s" (substitute-command-keys "\\[scroll-up] scrolls up, \\[scroll-down] scrolls down, \\[electric-help-exit] exits burying help buffer, \\[electric-help-retain] exits")))      (message "%s" (substitute-command-keys "\\[scroll-up] scrolls up, \\[scroll-down] scrolls down, \\[electric-help-exit] exits burying help buffer, \\[electric-help-retain] exits")))
289    (sit-for 2))    (sit-for 2))

Legend:
Removed from v.1.33.2.1  
changed lines
  Added in v.1.33.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26