diff options
author | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
commit | ec0a80cc283badc7f7fd5ef78512dde6d34b1355 (patch) | |
tree | 7190e0fb3d4aa06018d8cf997f06b806fb09a9c8 /lisp/help-fns.el | |
parent | d259328fb87db8cc67d52771efcfa653e52c5b71 (diff) | |
parent | e823c34072bf045800d91e12c7ddb61fa23c6e30 (diff) | |
download | emacs-25-merge.tar.gz |
Merge emacs-25 into master (using imerge)emacs-25-merge
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 4e0bfee5bf7..e750f51e0c4 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -763,8 +763,12 @@ it is displayed along with the global value." (let ((from (point)) (line-beg (line-beginning-position)) (print-rep - (let ((print-quoted t)) - (prin1-to-string val)))) + (let ((rep + (let ((print-quoted t)) + (prin1-to-string val)))) + (if (and (symbolp val) (not (booleanp val))) + (format-message "`%s'" rep) + rep)))) (if (< (+ (length print-rep) (point) (- line-beg)) 68) (insert print-rep) (terpri) @@ -997,7 +1001,10 @@ file-local variable.\n") ;;;###autoload (defun describe-symbol (symbol &optional buffer frame) "Display the full documentation of SYMBOL. -Will show the info of SYMBOL as a function, variable, and/or face." +Will show the info of SYMBOL as a function, variable, and/or face. +Optional arguments BUFFER and FRAME specify for which buffer and +frame to show the information about SYMBOL; they default to the +current buffer and the selected frame, respectively." (interactive (let* ((v-or-f (symbol-at-point)) (found (cl-some (lambda (x) (funcall (nth 1 x) v-or-f)) @@ -1040,15 +1047,17 @@ Will show the info of SYMBOL as a function, variable, and/or face." (let ((inhibit-read-only t) (name (caar docs)) ;Name of doc currently at BOB. (doc (cdr (cadr docs)))) ;Doc to add at BOB. - (insert doc) - (delete-region (point) (progn (skip-chars-backward " \t\n") (point))) - (insert "\n\n" - (eval-when-compile - (propertize "\n" 'face '(:height 0.1 :inverse-video t))) - "\n") - (when name - (insert (symbol-name symbol) - " is also a " name "." "\n\n"))) + (when doc + (insert doc) + (delete-region (point) + (progn (skip-chars-backward " \t\n") (point))) + (insert "\n\n" + (eval-when-compile + (propertize "\n" 'face '(:height 0.1 :inverse-video t))) + "\n") + (when name + (insert (symbol-name symbol) + " is also a " name "." "\n\n")))) (setq docs (cdr docs))) (unless single ;; Don't record the `describe-variable' item in the stack. |