diff options
| author | Joakim Verona | 2013-04-13 08:30:33 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-04-13 08:30:33 +0200 |
| commit | 44399ce2917f50909cfcd7a82aa071e58cc81dae (patch) | |
| tree | 3d1cb6ff4b7934f9171f4f6a8c09f31b02be22e3 /lisp | |
| parent | ea0a8e9d270b2b0cfbc2b137b1e6c3922bc2ab5b (diff) | |
| parent | 011cddd649d81956ce13b9325b059dac78e61c4d (diff) | |
| download | emacs-44399ce2917f50909cfcd7a82aa071e58cc81dae.tar.gz emacs-44399ce2917f50909cfcd7a82aa071e58cc81dae.zip | |
auto upstream
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 6 | ||||
| -rw-r--r-- | lisp/cus-theme.el | 2 | ||||
| -rw-r--r-- | lisp/face-remap.el | 2 | ||||
| -rw-r--r-- | lisp/facemenu.el | 2 | ||||
| -rw-r--r-- | lisp/faces.el | 179 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 3 | ||||
| -rw-r--r-- | lisp/info.el | 3 |
9 files changed, 119 insertions, 105 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7ac52fac32..37e8028c941 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2013-04-12 Roland Winkler <winkler@gnu.org> | ||
| 2 | |||
| 3 | * faces.el (read-face-name): Do not override value of arg default. | ||
| 4 | Allow single faces and strings as default values. Remove those | ||
| 5 | elements from return value that are not faces. | ||
| 6 | (describe-face): Simplify. | ||
| 7 | (face-at-point): New optional args thing and multiple so that this | ||
| 8 | function can provide the same functionality previously provided by | ||
| 9 | read-face-name. | ||
| 10 | (make-face-bold, make-face-unbold, make-face-italic) | ||
| 11 | (make-face-unitalic, make-face-bold-italic, invert-face) | ||
| 12 | (modify-face, read-face-and-attribute): Use face-at-point. | ||
| 13 | |||
| 14 | * cus-edit.el (customize-face, customize-face-other-window) | ||
| 15 | * cus-theme.el (custom-theme-add-face) | ||
| 16 | * face-remap.el (buffer-face-set) | ||
| 17 | * facemenu.el (facemenu-set-face): Use face-at-point. | ||
| 18 | |||
| 19 | 2013-04-12 Michael Albinus <michael.albinus@gmx.de> | ||
| 20 | |||
| 21 | * info.el (Info-file-list-for-emacs): Add "tramp" and "dbus". | ||
| 22 | |||
| 1 | 2013-04-10 Tassilo Horn <tsdh@gnu.org> | 23 | 2013-04-10 Tassilo Horn <tsdh@gnu.org> |
| 2 | 24 | ||
| 3 | * textmodes/reftex-cite.el (reftex-parse-bibtex-entry): Don't cut | 25 | * textmodes/reftex-cite.el (reftex-parse-bibtex-entry): Don't cut |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d19e2ded00c..ac9408b1081 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1319,7 +1319,8 @@ If OTHER-WINDOW is non-nil, display in another window. | |||
| 1319 | 1319 | ||
| 1320 | Interactively, when point is on text which has a face specified, | 1320 | Interactively, when point is on text which has a face specified, |
| 1321 | suggest to customize that face, if it's customizable." | 1321 | suggest to customize that face, if it's customizable." |
| 1322 | (interactive (list (read-face-name "Customize face" "all faces" t))) | 1322 | (interactive (list (read-face-name "Customize face" |
| 1323 | (or (face-at-point t t) "all faces") t))) | ||
| 1323 | (if (member face '(nil "")) | 1324 | (if (member face '(nil "")) |
| 1324 | (setq face (face-list))) | 1325 | (setq face (face-list))) |
| 1325 | (if (and (listp face) (null (cdr face))) | 1326 | (if (and (listp face) (null (cdr face))) |
| @@ -1350,7 +1351,8 @@ If FACE is actually a face-alias, customize the face it is aliased to. | |||
| 1350 | 1351 | ||
| 1351 | Interactively, when point is on text which has a face specified, | 1352 | Interactively, when point is on text which has a face specified, |
| 1352 | suggest to customize that face, if it's customizable." | 1353 | suggest to customize that face, if it's customizable." |
| 1353 | (interactive (list (read-face-name "Customize face" "all faces" t))) | 1354 | (interactive (list (read-face-name "Customize face" |
| 1355 | (or (face-at-point t t) "all faces") t))) | ||
| 1354 | (customize-face face t)) | 1356 | (customize-face face t)) |
| 1355 | 1357 | ||
| 1356 | (defalias 'customize-customized 'customize-unsaved) | 1358 | (defalias 'customize-customized 'customize-unsaved) |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index cc1046eddc5..dbe4fa42d8e 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -263,7 +263,7 @@ interactively, this defaults to the current value of VAR." | |||
| 263 | (defun custom-theme-add-face (face &optional spec) | 263 | (defun custom-theme-add-face (face &optional spec) |
| 264 | "Add a widget for FACE (a symbol) to the *New Custom Theme* buffer. | 264 | "Add a widget for FACE (a symbol) to the *New Custom Theme* buffer. |
| 265 | SPEC, if non-nil, should be a face spec to which to set the widget." | 265 | SPEC, if non-nil, should be a face spec to which to set the widget." |
| 266 | (interactive (list (read-face-name "Face name" nil nil) nil)) | 266 | (interactive (list (read-face-name "Face name" (face-at-point t)))) |
| 267 | (unless (or (facep face) spec) | 267 | (unless (or (facep face) spec) |
| 268 | (error "`%s' has no face definition" face)) | 268 | (error "`%s' has no face definition" face)) |
| 269 | (let ((entry (assq face custom-theme-faces))) | 269 | (let ((entry (assq face custom-theme-faces))) |
diff --git a/lisp/face-remap.el b/lisp/face-remap.el index f1efc3727f5..b620d01d83e 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el | |||
| @@ -378,7 +378,7 @@ one face is listed, that specifies an aggregate face, like in a | |||
| 378 | 378 | ||
| 379 | This function makes the variable `buffer-face-mode-face' buffer | 379 | This function makes the variable `buffer-face-mode-face' buffer |
| 380 | local, and sets it to FACE." | 380 | local, and sets it to FACE." |
| 381 | (interactive (list (read-face-name "Set buffer face"))) | 381 | (interactive (list (read-face-name "Set buffer face" (face-at-point t)))) |
| 382 | (while (and (consp specs) (null (cdr specs))) | 382 | (while (and (consp specs) (null (cdr specs))) |
| 383 | (setq specs (car specs))) | 383 | (setq specs (car specs))) |
| 384 | (if (null specs) | 384 | (if (null specs) |
diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 9a66edd28fc..eb4554585a8 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el | |||
| @@ -329,7 +329,7 @@ This command can also add FACE to the menu of faces, | |||
| 329 | if `facemenu-listed-faces' says to do that." | 329 | if `facemenu-listed-faces' says to do that." |
| 330 | (interactive (list (progn | 330 | (interactive (list (progn |
| 331 | (barf-if-buffer-read-only) | 331 | (barf-if-buffer-read-only) |
| 332 | (read-face-name "Use face")) | 332 | (read-face-name "Use face" (face-at-point t))) |
| 333 | (if (and mark-active (not current-prefix-arg)) | 333 | (if (and mark-active (not current-prefix-arg)) |
| 334 | (region-beginning)) | 334 | (region-beginning)) |
| 335 | (if (and mark-active (not current-prefix-arg)) | 335 | (if (and mark-active (not current-prefix-arg)) |
diff --git a/lisp/faces.el b/lisp/faces.el index 400b475429f..de6d36c7ae8 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -757,7 +757,8 @@ is specified, `:italic' is ignored." | |||
| 757 | FRAME nil or not specified means change face on all frames. | 757 | FRAME nil or not specified means change face on all frames. |
| 758 | Argument NOERROR is ignored and retained for compatibility. | 758 | Argument NOERROR is ignored and retained for compatibility. |
| 759 | Use `set-face-attribute' for finer control of the font weight." | 759 | Use `set-face-attribute' for finer control of the font weight." |
| 760 | (interactive (list (read-face-name "Make which face bold"))) | 760 | (interactive (list (read-face-name "Make which face bold" |
| 761 | (face-at-point t)))) | ||
| 761 | (set-face-attribute face frame :weight 'bold)) | 762 | (set-face-attribute face frame :weight 'bold)) |
| 762 | 763 | ||
| 763 | 764 | ||
| @@ -765,7 +766,8 @@ Use `set-face-attribute' for finer control of the font weight." | |||
| 765 | "Make the font of FACE be non-bold, if possible. | 766 | "Make the font of FACE be non-bold, if possible. |
| 766 | FRAME nil or not specified means change face on all frames. | 767 | FRAME nil or not specified means change face on all frames. |
| 767 | Argument NOERROR is ignored and retained for compatibility." | 768 | Argument NOERROR is ignored and retained for compatibility." |
| 768 | (interactive (list (read-face-name "Make which face non-bold"))) | 769 | (interactive (list (read-face-name "Make which face non-bold" |
| 770 | (face-at-point t)))) | ||
| 769 | (set-face-attribute face frame :weight 'normal)) | 771 | (set-face-attribute face frame :weight 'normal)) |
| 770 | 772 | ||
| 771 | 773 | ||
| @@ -774,7 +776,8 @@ Argument NOERROR is ignored and retained for compatibility." | |||
| 774 | FRAME nil or not specified means change face on all frames. | 776 | FRAME nil or not specified means change face on all frames. |
| 775 | Argument NOERROR is ignored and retained for compatibility. | 777 | Argument NOERROR is ignored and retained for compatibility. |
| 776 | Use `set-face-attribute' for finer control of the font slant." | 778 | Use `set-face-attribute' for finer control of the font slant." |
| 777 | (interactive (list (read-face-name "Make which face italic"))) | 779 | (interactive (list (read-face-name "Make which face italic" |
| 780 | (face-at-point t)))) | ||
| 778 | (set-face-attribute face frame :slant 'italic)) | 781 | (set-face-attribute face frame :slant 'italic)) |
| 779 | 782 | ||
| 780 | 783 | ||
| @@ -782,7 +785,8 @@ Use `set-face-attribute' for finer control of the font slant." | |||
| 782 | "Make the font of FACE be non-italic, if possible. | 785 | "Make the font of FACE be non-italic, if possible. |
| 783 | FRAME nil or not specified means change face on all frames. | 786 | FRAME nil or not specified means change face on all frames. |
| 784 | Argument NOERROR is ignored and retained for compatibility." | 787 | Argument NOERROR is ignored and retained for compatibility." |
| 785 | (interactive (list (read-face-name "Make which face non-italic"))) | 788 | (interactive (list (read-face-name "Make which face non-italic" |
| 789 | (face-at-point t)))) | ||
| 786 | (set-face-attribute face frame :slant 'normal)) | 790 | (set-face-attribute face frame :slant 'normal)) |
| 787 | 791 | ||
| 788 | 792 | ||
| @@ -791,7 +795,8 @@ Argument NOERROR is ignored and retained for compatibility." | |||
| 791 | FRAME nil or not specified means change face on all frames. | 795 | FRAME nil or not specified means change face on all frames. |
| 792 | Argument NOERROR is ignored and retained for compatibility. | 796 | Argument NOERROR is ignored and retained for compatibility. |
| 793 | Use `set-face-attribute' for finer control of font weight and slant." | 797 | Use `set-face-attribute' for finer control of font weight and slant." |
| 794 | (interactive (list (read-face-name "Make which face bold-italic"))) | 798 | (interactive (list (read-face-name "Make which face bold-italic" |
| 799 | (face-at-point t)))) | ||
| 795 | (set-face-attribute face frame :weight 'bold :slant 'italic)) | 800 | (set-face-attribute face frame :weight 'bold :slant 'italic)) |
| 796 | 801 | ||
| 797 | 802 | ||
| @@ -911,7 +916,7 @@ If FRAME is omitted or nil, it means change face on all frames. | |||
| 911 | If FACE specifies neither foreground nor background color, | 916 | If FACE specifies neither foreground nor background color, |
| 912 | set its foreground and background to the background and foreground | 917 | set its foreground and background to the background and foreground |
| 913 | of the default face. Value is FACE." | 918 | of the default face. Value is FACE." |
| 914 | (interactive (list (read-face-name "Invert face"))) | 919 | (interactive (list (read-face-name "Invert face" (face-at-point t)))) |
| 915 | (let ((fg (face-attribute face :foreground frame)) | 920 | (let ((fg (face-attribute face :foreground frame)) |
| 916 | (bg (face-attribute face :background frame))) | 921 | (bg (face-attribute face :background frame))) |
| 917 | (if (not (and (eq fg 'unspecified) (eq bg 'unspecified))) | 922 | (if (not (and (eq fg 'unspecified) (eq bg 'unspecified))) |
| @@ -929,85 +934,54 @@ of the default face. Value is FACE." | |||
| 929 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 934 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 930 | 935 | ||
| 931 | (defun read-face-name (prompt &optional default multiple) | 936 | (defun read-face-name (prompt &optional default multiple) |
| 932 | "Read one or more face names, defaulting to the face(s) at point. | 937 | "Read one or more face names, prompting with PROMPT. |
| 933 | PROMPT should be a prompt string; it should not end in a space or | 938 | PROMPT should not end in a space or a colon. |
| 934 | a colon. | ||
| 935 | 939 | ||
| 936 | The optional argument DEFAULT specifies the default face name(s) | 940 | Return DEFAULT if the user enters the empty string. |
| 937 | to return if the user just types RET. If its value is non-nil, | 941 | If DEFAULT is non-nil, it should be a list of face names (symbols or strings). |
| 938 | it should be a list of face names (symbols or strings); in that case, | 942 | In that case, return the `car' of DEFAULT (if MULTIPLE is non-nil), |
| 939 | the default return value is the `car' of DEFAULT (if the argument | 943 | or DEFAULT (if MULTIPLE is nil). See below for the meaning of MULTIPLE. |
| 940 | MULTIPLE is non-nil), or DEFAULT (if MULTIPLE is nil). See below | 944 | DEFAULT can also be a single face. |
| 941 | for the meaning of MULTIPLE. | ||
| 942 | |||
| 943 | If DEFAULT is nil, the list of default face names is taken from | ||
| 944 | the symbol at point and the `read-face-name' property of the text at point, | ||
| 945 | or, if that is nil, from the `face' property of the text at point. | ||
| 946 | 945 | ||
| 947 | This function uses `completing-read-multiple' with \"[ \\t]*,[ \\t]*\" | 946 | This function uses `completing-read-multiple' with \"[ \\t]*,[ \\t]*\" |
| 948 | as the separator regexp. Thus, the user may enter multiple face | 947 | as the separator regexp. Thus, the user may enter multiple face names, |
| 949 | names, separated by commas. The optional argument MULTIPLE | 948 | separated by commas. |
| 950 | specifies the form of the return value. If MULTIPLE is non-nil, | 949 | |
| 951 | return a list of face names; if the user entered just one face | 950 | MULTIPLE specifies the form of the return value. If MULTIPLE is non-nil, |
| 952 | name, the return value would be a list of one face name. | 951 | return a list of face names; if the user entered just one face name, |
| 953 | Otherwise, return a single face name; if the user entered more | 952 | return a list of one face name. Otherwise, return a single face name; |
| 954 | than one face name, return only the first one." | 953 | if the user entered more than one face name, return only the first one." |
| 955 | ;; Should we better not generate automagically a value for DEFAULT | 954 | (if (and default (not (stringp default))) |
| 956 | ;; when `read-face-name' was called with DEFAULT being nil? | 955 | (setq default |
| 957 | ;; Such magic is somewhat unusual for a function `read-...'. | 956 | (cond ((symbolp default) |
| 958 | ;; Also, one cannot skip this magic by means of a suitable | 957 | (symbol-name default)) |
| 959 | ;; value of DEFAULT. It would be cleaner to use | 958 | (multiple |
| 960 | ;; (read-face-name prompt (face-at-point)). | 959 | (mapconcat (lambda (f) (if (symbolp f) (symbol-name f) f)) |
| 961 | (unless default | 960 | default ", ")) |
| 962 | ;; Try to get a default face name from the buffer. | 961 | ;; If we only want one, and the default is more than one, |
| 963 | (let ((thing (intern-soft (thing-at-point 'symbol)))) | 962 | ;; discard the unwanted ones. |
| 964 | (if (memq thing (face-list)) | 963 | (t (symbol-name (car default)))))) |
| 965 | (setq default (list thing)))) | 964 | |
| 966 | ;; Add the named faces that the `read-face-name' or `face' property uses. | 965 | (let (aliasfaces nonaliasfaces faces) |
| 967 | (let ((faceprop (or (get-char-property (point) 'read-face-name) | 966 | ;; Build up the completion tables. |
| 968 | (get-char-property (point) 'face)))) | ||
| 969 | (if (and (listp faceprop) | ||
| 970 | ;; Don't treat an attribute spec as a list of faces. | ||
| 971 | (not (keywordp (car faceprop))) | ||
| 972 | (not (memq (car faceprop) '(foreground-color background-color)))) | ||
| 973 | (dolist (face faceprop) | ||
| 974 | (if (symbolp face) | ||
| 975 | (push face default))) | ||
| 976 | (if (symbolp faceprop) | ||
| 977 | (push faceprop default))) | ||
| 978 | (delete-dups default))) | ||
| 979 | |||
| 980 | ;; If we only want one, and the default is more than one, | ||
| 981 | ;; discard the unwanted ones now. | ||
| 982 | (if (and default (not multiple)) | ||
| 983 | (setq default (list (car default)))) | ||
| 984 | |||
| 985 | (if default | ||
| 986 | (setq default (mapconcat (lambda (f) | ||
| 987 | (if (symbolp f) (symbol-name f) f)) | ||
| 988 | default ", "))) | ||
| 989 | |||
| 990 | ;; Build up the completion tables. | ||
| 991 | (let (aliasfaces nonaliasfaces) | ||
| 992 | (mapatoms (lambda (s) | 967 | (mapatoms (lambda (s) |
| 993 | (if (custom-facep s) | 968 | (if (facep s) |
| 994 | (if (get s 'face-alias) | 969 | (if (get s 'face-alias) |
| 995 | (push (symbol-name s) aliasfaces) | 970 | (push (symbol-name s) aliasfaces) |
| 996 | (push (symbol-name s) nonaliasfaces))))) | 971 | (push (symbol-name s) nonaliasfaces))))) |
| 997 | 972 | (dolist (face (completing-read-multiple | |
| 998 | (let ((faces | 973 | (if default |
| 999 | ;; Read the faces. | 974 | (format "%s (default `%s'): " prompt default) |
| 1000 | (mapcar 'intern | 975 | (format "%s: " prompt)) |
| 1001 | (completing-read-multiple | 976 | (completion-table-in-turn nonaliasfaces aliasfaces) |
| 1002 | (if default | 977 | nil t nil 'face-name-history default)) |
| 1003 | (format "%s (default `%s'): " prompt default) | 978 | ;; Ignore elements that are not faces |
| 1004 | (format "%s: " prompt)) | 979 | ;; (for example, because DEFAULT was "all faces") |
| 1005 | (completion-table-in-turn nonaliasfaces aliasfaces) | 980 | (if (facep face) (push (intern face) faces))) |
| 1006 | nil t nil 'face-name-history default)))) | 981 | ;; Return either a list of faces or just one face. |
| 1007 | ;; Return either a list of faces or just one face. | 982 | (if multiple |
| 1008 | (if multiple | 983 | (nreverse faces) |
| 1009 | faces | 984 | (last faces)))) |
| 1010 | (car faces))))) | ||
| 1011 | 985 | ||
| 1012 | ;; Not defined without X, but behind window-system test. | 986 | ;; Not defined without X, but behind window-system test. |
| 1013 | (defvar x-bitmap-file-path) | 987 | (defvar x-bitmap-file-path) |
| @@ -1235,7 +1209,7 @@ and the face and its settings are obtained by querying the user." | |||
| 1235 | :slant (if italic-p 'italic 'normal) | 1209 | :slant (if italic-p 'italic 'normal) |
| 1236 | :underline underline | 1210 | :underline underline |
| 1237 | :inverse-video inverse-p) | 1211 | :inverse-video inverse-p) |
| 1238 | (setq face (read-face-name "Modify face")) | 1212 | (setq face (read-face-name "Modify face" (face-at-point t))) |
| 1239 | (apply #'set-face-attribute face frame | 1213 | (apply #'set-face-attribute face frame |
| 1240 | (read-all-face-attributes face frame)))) | 1214 | (read-all-face-attributes face frame)))) |
| 1241 | 1215 | ||
| @@ -1247,13 +1221,13 @@ Value is a list (FACE NEW-VALUE) where FACE is the face read | |||
| 1247 | \(a symbol), and NEW-VALUE is value read." | 1221 | \(a symbol), and NEW-VALUE is value read." |
| 1248 | (cond ((eq attribute :font) | 1222 | (cond ((eq attribute :font) |
| 1249 | (let* ((prompt "Set font-related attributes of face") | 1223 | (let* ((prompt "Set font-related attributes of face") |
| 1250 | (face (read-face-name prompt)) | 1224 | (face (read-face-name prompt (face-at-point t))) |
| 1251 | (font (read-face-font face frame))) | 1225 | (font (read-face-font face frame))) |
| 1252 | (list face font))) | 1226 | (list face font))) |
| 1253 | (t | 1227 | (t |
| 1254 | (let* ((attribute-name (face-descriptive-attribute-name attribute)) | 1228 | (let* ((attribute-name (face-descriptive-attribute-name attribute)) |
| 1255 | (prompt (format "Set %s of face" attribute-name)) | 1229 | (prompt (format "Set %s of face" attribute-name)) |
| 1256 | (face (read-face-name prompt)) | 1230 | (face (read-face-name prompt (face-at-point t))) |
| 1257 | (new-value (read-face-attribute face attribute frame))) | 1231 | (new-value (read-face-attribute face attribute frame))) |
| 1258 | (list face new-value))))) | 1232 | (list face new-value))))) |
| 1259 | 1233 | ||
| @@ -1363,8 +1337,7 @@ If the optional argument FRAME is given, report on face FACE in that frame. | |||
| 1363 | If FRAME is t, report on the defaults for face FACE (for new frames). | 1337 | If FRAME is t, report on the defaults for face FACE (for new frames). |
| 1364 | If FRAME is omitted or nil, use the selected frame." | 1338 | If FRAME is omitted or nil, use the selected frame." |
| 1365 | (interactive (list (read-face-name "Describe face" | 1339 | (interactive (list (read-face-name "Describe face" |
| 1366 | (if (eq 'default (face-at-point)) | 1340 | (or (face-at-point t) 'default) |
| 1367 | '(default)) | ||
| 1368 | t))) | 1341 | t))) |
| 1369 | (let* ((attrs '((:family . "Family") | 1342 | (let* ((attrs '((:family . "Family") |
| 1370 | (:foundry . "Foundry") | 1343 | (:foundry . "Foundry") |
| @@ -1879,23 +1852,33 @@ resulting color name in the echo area." | |||
| 1879 | (when msg (message "Color: `%s'" color)) | 1852 | (when msg (message "Color: `%s'" color)) |
| 1880 | color)) | 1853 | color)) |
| 1881 | 1854 | ||
| 1882 | 1855 | (defun face-at-point (&optional thing multiple) | |
| 1883 | (defun face-at-point () | ||
| 1884 | "Return the face of the character after point. | 1856 | "Return the face of the character after point. |
| 1885 | If it has more than one face, return the first one. | 1857 | If it has more than one face, return the first one. |
| 1886 | Return nil if it has no specified face." | 1858 | If THING is non-nil try first to get a face name from the buffer. |
| 1887 | (let* ((faceprop (or (get-char-property (point) 'read-face-name) | 1859 | IF MULTIPLE is non-nil, return a list of all faces. |
| 1888 | (get-char-property (point) 'face) | 1860 | Return nil if there is no face." |
| 1889 | 'default)) | 1861 | (let (faces) |
| 1890 | (face (cond ((symbolp faceprop) faceprop) | 1862 | (if thing |
| 1891 | ;; List of faces (don't treat an attribute spec). | 1863 | ;; Try to get a face name from the buffer. |
| 1892 | ;; Just use the first face. | 1864 | (let ((face (intern-soft (thing-at-point 'symbol)))) |
| 1893 | ((and (consp faceprop) (not (keywordp (car faceprop))) | 1865 | (if (facep face) |
| 1894 | (not (memq (car faceprop) | 1866 | (push face faces)))) |
| 1895 | '(foreground-color background-color)))) | 1867 | ;; Add the named faces that the `read-face-name' or `face' property uses. |
| 1896 | (car faceprop)) | 1868 | (let ((faceprop (or (get-char-property (point) 'read-face-name) |
| 1897 | (t nil)))) ; Invalid face value. | 1869 | (get-char-property (point) 'face)))) |
| 1898 | (if (facep face) face nil))) | 1870 | (cond ((facep faceprop) |
| 1871 | (push faceprop faces)) | ||
| 1872 | ((and (listp faceprop) | ||
| 1873 | ;; Don't treat an attribute spec as a list of faces. | ||
| 1874 | (not (keywordp (car faceprop))) | ||
| 1875 | (not (memq (car faceprop) | ||
| 1876 | '(foreground-color background-color)))) | ||
| 1877 | (dolist (face faceprop) | ||
| 1878 | (if (facep face) | ||
| 1879 | (push face faces)))))) | ||
| 1880 | (setq faces (delete-dups (nreverse faces))) | ||
| 1881 | (if multiple faces (car faces)))) | ||
| 1899 | 1882 | ||
| 1900 | (defun foreground-color-at-point () | 1883 | (defun foreground-color-at-point () |
| 1901 | "Return the foreground color of the character after point." | 1884 | "Return the foreground color of the character after point." |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 58de51672e6..f15ed7e707c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-04-12 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-msg.el (gnus-msg-mail): Make it avoid using posting styles | ||
| 4 | corresponding to any existing group (Bug#14166). | ||
| 5 | |||
| 1 | 2013-04-10 Andrew Cohen <cohen@bu.edu> | 6 | 2013-04-10 Andrew Cohen <cohen@bu.edu> |
| 2 | 7 | ||
| 3 | * nnir.el (number-sequence): No longer used. | 8 | * nnir.el (number-sequence): No longer used. |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 36135556c73..362dd3ea7f0 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -538,7 +538,8 @@ instead." | |||
| 538 | (message-mail to subject other-headers continue | 538 | (message-mail to subject other-headers continue |
| 539 | nil yank-action send-actions return-action)) | 539 | nil yank-action send-actions return-action)) |
| 540 | (let ((buf (current-buffer)) | 540 | (let ((buf (current-buffer)) |
| 541 | (gnus-newsgroup-name (or gnus-newsgroup-name "")) | 541 | ;; Don't use posting styles corresponding to any existing group. |
| 542 | (gnus-newsgroup-name "") | ||
| 542 | mail-buf) | 543 | mail-buf) |
| 543 | (gnus-setup-message 'message | 544 | (gnus-setup-message 'message |
| 544 | (message-mail to subject other-headers continue | 545 | (message-mail to subject other-headers continue |
diff --git a/lisp/info.el b/lisp/info.el index 4679b51b999..58ebf0b17da 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -4383,7 +4383,8 @@ This feature will be removed in future.") | |||
| 4383 | ("ietf-drums" . "emacs-mime") ("quoted-printable" . "emacs-mime") | 4383 | ("ietf-drums" . "emacs-mime") ("quoted-printable" . "emacs-mime") |
| 4384 | ("binhex" . "emacs-mime") ("uudecode" . "emacs-mime") | 4384 | ("binhex" . "emacs-mime") ("uudecode" . "emacs-mime") |
| 4385 | ("mailcap" . "emacs-mime") ("mm" . "emacs-mime") | 4385 | ("mailcap" . "emacs-mime") ("mm" . "emacs-mime") |
| 4386 | ("mml" . "emacs-mime")) | 4386 | ("mml" . "emacs-mime") |
| 4387 | "tramp" "dbus") | ||
| 4387 | "List of Info files that describe Emacs commands. | 4388 | "List of Info files that describe Emacs commands. |
| 4388 | An element can be a file name, or a list of the form (PREFIX . FILE) | 4389 | An element can be a file name, or a list of the form (PREFIX . FILE) |
| 4389 | where PREFIX is a name prefix and FILE is the file to look in. | 4390 | where PREFIX is a name prefix and FILE is the file to look in. |