diff options
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a105083aafe..d9ffcbf742f 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -400,7 +400,7 @@ face (according to `face-differs-from-default-p')." ;;;###autoload (defun variable-at-point (&optional any-symbol) - "Return the bound variable symbol found around point. + "Return the bound variable symbol found at or before point. Return 0 if there is no such symbol. If ANY-SYMBOL is non-nil, don't insist the symbol be bound." (or (condition-case () @@ -583,8 +583,11 @@ it is displayed along with the global value." (documentation-property alias 'variable-documentation)))) (unless (eq alias variable) (princ (format "\nThis variable is an alias for `%s'.\n" alias))) + (if (or obsolete safe-var) + (terpri)) + (when obsolete - (princ "\nThis variable is obsolete") + (princ "This variable is obsolete") (if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) (princ ";") (terpri) (princ (if (stringp (car obsolete)) (car obsolete) @@ -595,9 +598,8 @@ it is displayed along with the global value." (princ "if its value\nsatisfies the predicate ") (princ (if (byte-code-function-p safe-var) "which is byte-compiled expression.\n" - (format "`%s'.\n" safe-var))) - (terpri)) - (princ "Documentation:\n") + (format "`%s'.\n" safe-var)))) + (princ "\nDocumentation:\n") (princ (or doc "Not documented as a variable."))) ;; Make a link to customize if this variable can be customized. (if (custom-variable-p variable) |