(format "*%s*" name))
(format "*%s*" help-buffer-prefix-string)))
-;; Use this function for displaying help when C-h something is pressed
-;; or in similar situations. Do *not* use it when you are displaying
-;; a help message and then prompting for input in the minibuffer --
-;; this macro usually selects the help buffer, which is not what you
-;; want in those situations.
+;; with-displaying-help-buffer
;; #### Should really be a macro to eliminate the requirement of
;; caller to code a lambda form in THUNK -- mrb
(defun with-displaying-help-buffer (thunk &optional name)
"Form which makes a help buffer with given NAME and evaluates BODY there.
-The actual name of the buffer is generated by the function `help-buffer-name'."
+The actual name of the buffer is generated by the function `help-buffer-name'.
+
+Use this function for displaying help when C-h something is pressed or
+in similar situations. Do *not* use it when you are displaying a help
+message and then prompting for input in the minibuffer -- this macro
+usually selects the help buffer, which is not what you want in those
+situations."
(let* ((winconfig (current-window-configuration))
(was-one-window (one-window-p))
(buffer-name (help-buffer-name name))
(setq indicator (cdr indicator)))
(while (and indicator (symbolp indicator))
(setq indicator (symbol-value indicator)))
- (princ (format "%s minor mode (indicator%s):\n"
- pretty-minor-mode indicator))
+ (princ (format "%s minor mode (%s):\n"
+ pretty-minor-mode
+ (if indicator
+ (format "indicator%s" indicator)
+ "no indicator")))
(princ (documentation minor-mode))
(princ "\n\n----\n\n"))))
(setq minor-modes (cdr minor-modes)))))
(princ object)
(put-nonduplicable-text-property
pos (marker-position standard-output) 'face face buf)))
- (t princ object)))
+ (t (princ object))))
;; replacement for `prin1' that puts the text in the specified face,
;; if possible
(prin1 object)
(put-nonduplicable-text-property
pos (marker-position standard-output) 'face face buf)))
- (t prin1 object)))
+ (t (prin1 object))))
(defvar help-symbol-regexp
(let ((sym-char "[+a-zA-Z0-9_:*]")