aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-03-26 14:49:15 +0000
committerJuanma Barranquero2008-03-26 14:49:15 +0000
commitfdb5bd87c42e5a4810f4e54bc8bcc5bb7eb8751b (patch)
tree939f71aeeeb011508129d74e634dce022d4c6d64
parentd9dd743ee68a2ee67043f771e40a3717f7ad3a21 (diff)
downloademacs-fdb5bd87c42e5a4810f4e54bc8bcc5bb7eb8751b.tar.gz
emacs-fdb5bd87c42e5a4810f4e54bc8bcc5bb7eb8751b.zip
(describe-function-1, describe-variable): If CURRENT-NAME is nil,
don't end obsolescence info with semicolon.
-rw-r--r--lisp/help-fns.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index ed6a6a8d10a..2d1565bdf49 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -421,19 +421,19 @@ face (according to `face-differs-from-default-p')."
421 (insert (car high) "\n") 421 (insert (car high) "\n")
422 (fill-region fill-begin (point))) 422 (fill-region fill-begin (point)))
423 (setq doc (cdr high)))) 423 (setq doc (cdr high))))
424 (let ((obsolete (and 424 (let* ((obsolete (and
425 ;; function might be a lambda construct. 425 ;; function might be a lambda construct.
426 (symbolp function) 426 (symbolp function)
427 (get function 'byte-obsolete-info)))) 427 (get function 'byte-obsolete-info)))
428 (use (car obsolete)))
428 (when obsolete 429 (when obsolete
429 (princ "\nThis function is obsolete") 430 (princ "\nThis function is obsolete")
430 (when (nth 2 obsolete) 431 (when (nth 2 obsolete)
431 (insert (format " since %s" (nth 2 obsolete)))) 432 (insert (format " since %s" (nth 2 obsolete))))
432 (insert ";\n" 433 (insert (cond ((stringp use) (concat ";\n" use))
433 (if (stringp (car obsolete)) (car obsolete) 434 (use (format ";\nuse `%s' instead." use))
434 (if (null (car obsolete)) "" 435 (t "."))
435 (format "use `%s' instead." (car obsolete)))) 436 "\n"))
436 "\n"))
437 (insert "\n" 437 (insert "\n"
438 (or doc "Not documented."))))))) 438 (or doc "Not documented.")))))))
439 439
@@ -640,6 +640,7 @@ it is displayed along with the global value."
640 (indirect-variable variable) 640 (indirect-variable variable)
641 (error variable))) 641 (error variable)))
642 (obsolete (get variable 'byte-obsolete-variable)) 642 (obsolete (get variable 'byte-obsolete-variable))
643 (use (car obsolete))
643 (safe-var (get variable 'safe-local-variable)) 644 (safe-var (get variable 'safe-local-variable))
644 (doc (or (documentation-property variable 'variable-documentation) 645 (doc (or (documentation-property variable 'variable-documentation)
645 (documentation-property alias 'variable-documentation))) 646 (documentation-property alias 'variable-documentation)))
@@ -661,10 +662,9 @@ it is displayed along with the global value."
661 (setq extra-line t) 662 (setq extra-line t)
662 (princ " This variable is obsolete") 663 (princ " This variable is obsolete")
663 (if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) 664 (if (cdr obsolete) (princ (format " since %s" (cdr obsolete))))
664 (princ ";\n ") 665 (princ (cond ((stringp use) (concat ";\n " use))
665 (princ (if (stringp (car obsolete)) (car obsolete) 666 (use (format ";\n use `%s' instead." (car obsolete)))
666 (if (null (car obsolete)) "" 667 (t ".")))
667 (format "use `%s' instead." (car obsolete)))))
668 (terpri)) 668 (terpri))
669 (when safe-var 669 (when safe-var
670 (setq extra-line t) 670 (setq extra-line t)