[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/help-macro.el,v
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/help-macro.el,v |
Date: |
Mon, 17 Nov 2008 10:07:06 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Martin Rudalics <m061211> 08/11/17 10:07:06
Index: help-macro.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/help-macro.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- help-macro.el 18 Sep 2008 08:36:42 -0000 1.44
+++ help-macro.el 17 Nov 2008 10:07:06 -0000 1.45
@@ -71,11 +71,11 @@
;;;###autoload
(defcustom three-step-help nil
- "*Non-nil means give more info about Help command in three steps.
-The three steps are simple prompt, prompt with all options,
-and window listing and describing the options.
-A value of nil means skip the middle step, so that
-\\[help-command] \\[help-command] gives the window that lists the options."
+ "Non-nil means give more info about Help command in three steps.
+The three steps are simple prompt, prompt with all options, and
+window listing and describing the options.
+A value of nil means skip the middle step, so that \\[help-command]
\\[help-command]
+gives the window that lists the options."
:type 'boolean
:group 'help)
@@ -96,7 +96,7 @@
(interactive)
(let ((line-prompt
(substitute-command-keys ,help-line)))
- (if three-step-help
+ (when three-step-help
(message "%s" line-prompt))
(let* ((help-screen (documentation (quote ,doc-fn)))
;; We bind overriding-local-map for very small
@@ -106,9 +106,10 @@
(new-minor-mode-map-alist minor-mode-map-alist)
(prev-frame (selected-frame))
config new-frame key char)
- (if (string-match "%THIS-KEY%" help-screen)
+ (when (string-match "%THIS-KEY%" help-screen)
(setq help-screen
- (replace-match (key-description (substring
(this-command-keys) 0 -1))
+ (replace-match (key-description
+ (substring (this-command-keys) 0 -1))
t t help-screen)))
(unwind-protect
(let ((minor-mode-map-alist nil))
@@ -126,9 +127,8 @@
(setq key (lookup-key function-key-map key)))
(setq char (aref key 0)))
(setq char ??))
- (if (or (eq char ??) (eq char help-char)
+ (when (or (eq char ??) (eq char help-char)
(memq char help-event-list))
- (progn
(setq config (current-window-configuration))
(switch-to-buffer-other-window "*Help*")
(and (fboundp 'make-frame)
@@ -149,13 +149,12 @@
(eq (car-safe char) 'switch-frame)
(equal key "\M-v"))
(condition-case nil
- (progn
- (if (eq (car-safe char) 'switch-frame)
+ (cond
+ ((eq (car-safe char) 'switch-frame)
(handle-switch-frame char))
- (if (memq char '(?\C-v ?\s))
+ ((memq char '(?\C-v ?\s))
(scroll-up))
- (if (or (memq char '(?\177 ?\M-v
- delete backspace))
+ ((or (memq char '(?\177 ?\M-v delete backspace))
(equal key "\M-v"))
(scroll-down)))
(error nil))
@@ -170,7 +169,7 @@
;; If this is a scroll bar command, just run it.
(when (eq char 'vertical-scroll-bar)
- (command-execute (lookup-key local-map key) nil
key)))))
+ (command-execute (lookup-key local-map key) nil key))))
;; We don't need the prompt any more.
(message "")
;; Mouse clicks are not part of the help feature,
@@ -182,18 +181,22 @@
(let ((defn (lookup-key local-map key)))
(if defn
(progn
- (if config
- (progn
+ (when config
(set-window-configuration config)
- (setq config nil)))
- (if new-frame
- (progn (iconify-frame new-frame)
+ (setq config nil))
+ ;; `defn' must make sure that its frame is
+ ;; selected, so we won't iconify it below.
+ (call-interactively defn)
+ (when new-frame
+ ;; Do not iconify the selected frame.
+ (unless (eq new-frame (selected-frame))
+ (iconify-frame new-frame))
(setq new-frame nil)))
- (call-interactively defn))
(ding)))))
- (if new-frame (iconify-frame new-frame))
- (if config
+ (when config
(set-window-configuration config))
+ (when new-frame
+ (iconify-frame new-frame))
(setq minor-mode-map-alist new-minor-mode-map-alist))))))))
(provide 'help-macro)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/help-macro.el,v,
Martin Rudalics <=