# HG changeset patch # User Bastien Guerry # Date 1202800249 0 # Node ID bfe257ff864ccec8a455146b0008c8d7085cf6ed # Parent 9eba563b95d79c4048ae2e68dba81cf2affafadd 2008-02-11 Drew Adams * help.el (describe-key): Joined some split lines to facilitate filling. * help-fns.el (describe-function-1): Fill text of overlong lines. diff -r 9eba563b95d7 -r bfe257ff864c lisp/ChangeLog --- a/lisp/ChangeLog Tue Feb 12 06:25:06 2008 +0000 +++ b/lisp/ChangeLog Tue Feb 12 07:10:49 2008 +0000 @@ -1,3 +1,9 @@ +2008-02-11 Drew Adams + + * help.el (describe-key): Joined some split lines to facilitate + filling. + * help-fns.el (describe-function-1): Fill text of overlong lines. + 2008-02-12 Kenichi Handa * Makefile.in (AUTOGENEL): Remove charprop.el and uni-*.el. @@ -25,6 +31,8 @@ 2008-02-11 Drew Adams + * isearch.el: + (isearch-fail): New face. * isearch.el (isearch-fail): New face. (isearch-message): Highlight failure part of input. diff -r 9eba563b95d7 -r bfe257ff864c lisp/help-fns.el --- a/lisp/help-fns.el Tue Feb 12 06:25:06 2008 +0000 +++ b/lisp/help-fns.el Tue Feb 12 07:10:49 2008 +0000 @@ -267,7 +267,8 @@ (symbol-function real-function) function)) file-name string - (beg (if (commandp def) "an interactive " "a "))) + (beg (if (commandp def) "an interactive " "a ")) + (pt1 (with-current-buffer (help-buffer) (point)))) (setq string (cond ((or (stringp def) (vectorp def)) @@ -348,8 +349,12 @@ (re-search-backward "`\\([^`']+\\)'" nil t) (help-xref-button 1 'help-function-def real-function file-name)))) (princ ".") - (terpri) + (with-current-buffer (help-buffer) + (fill-region-as-paragraph (save-excursion (goto-char pt1) (forward-line 0) (point)) + (point))) + (terpri)(terpri) (when (commandp function) + (let ((pt2 (with-current-buffer (help-buffer) (point)))) (if (and (eq function 'self-insert-command) (eq (key-binding "a") 'self-insert-command) (eq (key-binding "b") 'self-insert-command) @@ -369,7 +374,7 @@ (princ "'")) (when keys - (princ (if remapped " which is bound to " "It is bound to ")) + (princ (if remapped ", which is bound to " "It is bound to ")) ;; If lots of ordinary text characters run this command, ;; don't mention them one by one. (if (< (length non-modified-keys) 10) @@ -383,7 +388,9 @@ (princ "many ordinary text characters")))) (when (or remapped keys non-modified-keys) (princ ".") - (terpri))))) + (terpri)))) + (with-current-buffer (help-buffer) (fill-region-as-paragraph pt2 (point))) + (terpri))) (let* ((arglist (help-function-arglist def)) (doc (documentation function)) (usage (help-split-fundoc doc function))) diff -r 9eba563b95d7 -r bfe257ff864c lisp/help.el --- a/lisp/help.el Tue Feb 12 06:25:06 2008 +0000 +++ b/lisp/help.el Tue Feb 12 07:10:49 2008 +0000 @@ -745,8 +745,7 @@ (with-help-window (help-buffer) (princ (help-key-description key untranslated)) (princ (format "\ -%s runs the command %S - which is " +%s runs the command %S, which is " mouse-msg defn)) (describe-function-1 defn) (when up-event @@ -757,12 +756,11 @@ ----------------- up-event %s---------------- -<%S>%s%s runs the command %S - which is " +<%S>%s%s runs the command %S, which is " (if mouse-1-tricky "(short click) " "") ev-type mouse-msg (if mouse-1-remapped - " is remapped to \nwhich" "") + " is remapped to , which" "") defn-up)) (describe-function-1 defn-up)) (unless (or (null defn-up-tricky) @@ -773,8 +771,7 @@ ----------------- up-event (long click) ---------------- Pressing <%S>%s for longer than %d milli-seconds -runs the command %S - which is " +runs the command %S, which is " ev-type mouse-msg mouse-1-click-follows-link defn-up-tricky)) diff -r 9eba563b95d7 -r bfe257ff864c lisp/mail/rmail.el --- a/lisp/mail/rmail.el Tue Feb 12 06:25:06 2008 +0000 +++ b/lisp/mail/rmail.el Tue Feb 12 07:10:49 2008 +0000 @@ -345,6 +345,19 @@ face) :group 'rmail-headers) +(defface rmail-header-name + '((t (:inherit font-lock-function-name-face))) + "Face to use for highlighting the header names." + :group 'rmail-headers + :version "23.1") + +;;;###autoload +(defcustom rmail-header-name-face 'rmail-header-name "\ +*Face to use for highlighting the header names." + :type '(choice (const :tag "Default" nil) + face) + :group 'rmail-headers) + ;;;###autoload (defcustom rmail-delete-after-output nil "\ *Non-nil means automatically delete a message that is copied to a file." @@ -698,19 +711,19 @@ "\n")) nil) -(defvar rmail-font-lock-keywords +(setq rmail-font-lock-keywords ;; These are all matched case-insensitively. - (eval-when-compile + ;;(eval-when-compile (let* ((cite-chars "[>|}]") (cite-prefix "a-z") (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) (list '("^\\(From\\|Sender\\|Resent-From\\):" - . font-lock-function-name-face) - '("^Reply-To:.*$" . font-lock-function-name-face) - '("^Subject:" . font-lock-comment-face) - '("^X-Spam-Status:" . font-lock-keyword-face) + . 'rmail-header-name) + '("^Reply-To:.*$" . 'rmail-header-name) + '("^Subject:" . 'rmail-header-name) + '("^X-Spam-Status:" . 'rmail-header-name) '("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):" - . font-lock-keyword-face) + . 'rmail-header-name) ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. `(,cite-chars (,(concat "\\=[ \t]*" @@ -721,8 +734,9 @@ (1 font-lock-comment-delimiter-face nil t) (5 font-lock-comment-face nil t))) '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$" - . font-lock-string-face)))) - "Additional expressions to highlight in Rmail mode.") + . 'rmail-header-name)))) +;;) +;; "Additional expressions to highlight in Rmail mode.") ;; Perform BODY in the summary buffer ;; in such a way that its cursor is properly updated in its own window.