diff options
| author | Stefan Monnier | 2007-10-09 04:25:14 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-09 04:25:14 +0000 |
| commit | ed2a19a19337ae26ff6caf6b6306f2325ac8a1e7 (patch) | |
| tree | ae2efde4d3361e1399c7e19b6638e8171ff09bf2 | |
| parent | 0acb191607e243da9a4c4166dc8b4addf0d5432e (diff) | |
| download | emacs-ed2a19a19337ae26ff6caf6b6306f2325ac8a1e7.tar.gz emacs-ed2a19a19337ae26ff6caf6b6306f2325ac8a1e7.zip | |
(describe-variable): Slightly change the layout of
meta-info to separate it better from the docstring.
Standardize insertion of extra empty lines in various circumstances.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/help-fns.el | 38 |
2 files changed, 27 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c73e42344b..6b12ee26151 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * help-fns.el (describe-variable): Slightly change the layout of | ||
| 4 | meta-info to separate it better from the docstring. | ||
| 5 | Standardize insertion of extra empty lines in various circumstances. | ||
| 6 | |||
| 3 | * diff-mode.el (diff-hunk-style): New fun. | 7 | * diff-mode.el (diff-hunk-style): New fun. |
| 4 | (diff-end-of-hunk): Use it. | 8 | (diff-end-of-hunk): Use it. |
| 5 | (diff-context->unified): Use the new `apply' undo element, | 9 | (diff-context->unified): Use the new `apply' undo element, |
| @@ -7,6 +11,7 @@ | |||
| 7 | (diff-fine-change): New face. | 11 | (diff-fine-change): New face. |
| 8 | (diff-fine-highlight-preproc): New function. | 12 | (diff-fine-highlight-preproc): New function. |
| 9 | (diff-fine-highlight): New command. | 13 | (diff-fine-highlight): New command. |
| 14 | (diff-mode-map, diff-mode-menu): Add diff-fine-highlight. | ||
| 10 | 15 | ||
| 11 | * smerge-mode.el (smerge-refine-chopup-region): Add `preproc' argument. | 16 | * smerge-mode.el (smerge-refine-chopup-region): Add `preproc' argument. |
| 12 | (smerge-refine-highlight-change): Add `props' argument. | 17 | (smerge-refine-highlight-change): Add `props' argument. |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index cb99d188ffa..25e8ca7ed3b 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -566,13 +566,6 @@ it is displayed along with the global value." | |||
| 566 | ;; (help-xref-on-pp from (point)) | 566 | ;; (help-xref-on-pp from (point)) |
| 567 | (if (< (point) (+ from 20)) | 567 | (if (< (point) (+ from 20)) |
| 568 | (delete-region (1- from) from))))))) | 568 | (delete-region (1- from) from))))))) |
| 569 | ;; Add a note for variables that have been make-var-buffer-local. | ||
| 570 | (when (and (local-variable-if-set-p variable) | ||
| 571 | (or (not (local-variable-p variable)) | ||
| 572 | (with-temp-buffer | ||
| 573 | (local-variable-if-set-p variable)))) | ||
| 574 | (princ "\nAutomatically becomes buffer-local when set in any fashion.\n")) | ||
| 575 | (terpri) | ||
| 576 | 569 | ||
| 577 | ;; If the value is large, move it to the end. | 570 | ;; If the value is large, move it to the end. |
| 578 | (with-current-buffer standard-output | 571 | (with-current-buffer standard-output |
| @@ -597,34 +590,47 @@ it is displayed along with the global value." | |||
| 597 | 'follow-link t | 590 | 'follow-link t |
| 598 | 'help-echo "mouse-2, RET: show value") | 591 | 'help-echo "mouse-2, RET: show value") |
| 599 | (insert ".\n"))) | 592 | (insert ".\n"))) |
| 593 | (terpri) | ||
| 600 | 594 | ||
| 601 | ;; Mention if it's an alias | ||
| 602 | (let* ((alias (condition-case nil | 595 | (let* ((alias (condition-case nil |
| 603 | (indirect-variable variable) | 596 | (indirect-variable variable) |
| 604 | (error variable))) | 597 | (error variable))) |
| 605 | (obsolete (get variable 'byte-obsolete-variable)) | 598 | (obsolete (get variable 'byte-obsolete-variable)) |
| 606 | (safe-var (get variable 'safe-local-variable)) | 599 | (safe-var (get variable 'safe-local-variable)) |
| 607 | (doc (or (documentation-property variable 'variable-documentation) | 600 | (doc (or (documentation-property variable 'variable-documentation) |
| 608 | (documentation-property alias 'variable-documentation)))) | 601 | (documentation-property alias 'variable-documentation))) |
| 602 | (extra-line nil)) | ||
| 603 | ;; Add a note for variables that have been make-var-buffer-local. | ||
| 604 | (when (and (local-variable-if-set-p variable) | ||
| 605 | (or (not (local-variable-p variable)) | ||
| 606 | (with-temp-buffer | ||
| 607 | (local-variable-if-set-p variable)))) | ||
| 608 | (setq extra-line t) | ||
| 609 | (princ " Automatically becomes buffer-local when set in any fashion.\n")) | ||
| 610 | |||
| 611 | ;; Mention if it's an alias | ||
| 609 | (unless (eq alias variable) | 612 | (unless (eq alias variable) |
| 610 | (princ (format "\nThis variable is an alias for `%s'.\n" alias))) | 613 | (setq extra-line t) |
| 611 | (if (or obsolete safe-var) | 614 | (princ (format " This variable is an alias for `%s'.\n" alias))) |
| 612 | (terpri)) | ||
| 613 | 615 | ||
| 614 | (when obsolete | 616 | (when obsolete |
| 615 | (princ "This variable is obsolete") | 617 | (setq extra-line t) |
| 618 | (princ " This variable is obsolete") | ||
| 616 | (if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) | 619 | (if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) |
| 617 | (princ ";") (terpri) | 620 | (princ ";") (terpri) |
| 618 | (princ (if (stringp (car obsolete)) (car obsolete) | 621 | (princ (if (stringp (car obsolete)) (car obsolete) |
| 619 | (format "use `%s' instead." (car obsolete)))) | 622 | (format "use `%s' instead." (car obsolete)))) |
| 620 | (terpri)) | 623 | (terpri)) |
| 621 | (when safe-var | 624 | (when safe-var |
| 622 | (princ "This variable is safe as a file local variable ") | 625 | (setq extra-line t) |
| 623 | (princ "if its value\nsatisfies the predicate ") | 626 | (princ " This variable is safe as a file local variable ") |
| 627 | (princ "if its value\n satisfies the predicate ") | ||
| 624 | (princ (if (byte-code-function-p safe-var) | 628 | (princ (if (byte-code-function-p safe-var) |
| 625 | "which is byte-compiled expression.\n" | 629 | "which is byte-compiled expression.\n" |
| 626 | (format "`%s'.\n" safe-var)))) | 630 | (format "`%s'.\n" safe-var)))) |
| 627 | (princ "\nDocumentation:\n") | 631 | |
| 632 | (if extra-line (terpri)) | ||
| 633 | (princ "Documentation:\n") | ||
| 628 | (with-current-buffer standard-output | 634 | (with-current-buffer standard-output |
| 629 | (insert (or doc "Not documented as a variable.")))) | 635 | (insert (or doc "Not documented as a variable.")))) |
| 630 | ;; Make a link to customize if this variable can be customized. | 636 | ;; Make a link to customize if this variable can be customized. |