435 |
(forward-line -1) |
(forward-line -1) |
436 |
(insert "Automatically becomes buffer-local when set in any fashion.\n")))) |
(insert "Automatically becomes buffer-local when set in any fashion.\n")))) |
437 |
;; Mention if it's an alias |
;; Mention if it's an alias |
438 |
(let ((alias (condition-case nil |
(let* ((alias (condition-case nil |
439 |
(indirect-variable variable) |
(indirect-variable variable) |
440 |
(error variable)))) |
(error variable))) |
441 |
|
(obsolete (get variable 'byte-obsolete-variable)) |
442 |
|
(doc (or (documentation-property variable 'variable-documentation) |
443 |
|
(documentation-property alias 'variable-documentation)))) |
444 |
(unless (eq alias variable) |
(unless (eq alias variable) |
445 |
(princ (format "This variable is an alias for `%s'." alias)) |
(princ (format "This variable is an alias for `%s'." alias)) |
446 |
(terpri) |
(terpri) |
447 |
(terpri))) |
(terpri)) |
448 |
(let ((obsolete (get variable 'byte-obsolete-variable))) |
(when obsolete |
449 |
(when obsolete |
(princ "This variable is obsolete") |
450 |
(princ "This variable is obsolete") |
(if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) |
451 |
(if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) |
(princ "; ") (terpri) |
452 |
(princ "; ") (terpri) |
(princ (if (stringp (car obsolete)) (car obsolete) |
453 |
(princ (if (stringp (car obsolete)) (car obsolete) |
(format "use `%s' instead." (car obsolete)))) |
454 |
(format "use `%s' instead." (car obsolete)))) |
(terpri) |
455 |
(terpri))) |
(terpri)) |
456 |
(let ((doc (documentation-property variable 'variable-documentation))) |
(princ (or doc "Not documented as a variable."))) |
|
(princ (or doc "Not documented as a variable."))) |
|
457 |
;; Make a link to customize if this variable can be customized. |
;; Make a link to customize if this variable can be customized. |
458 |
;; Note, it is not reliable to test only for a custom-type property |
;; Note, it is not reliable to test only for a custom-type property |
459 |
;; because those are only present after the var's definition |
;; because those are only present after the var's definition |