aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-07-14 00:12:45 +0200
committerLars Ingebrigtsen2021-07-14 00:12:45 +0200
commitf339cc3b81e28cabfd583c862b5011ac40acf935 (patch)
tree6a4e3b36db3687bfd56ab1037bf4ee444ae8d1a4
parenta5d1bd6a6d9cd4b8c832e9dcecb1b908ae973fa9 (diff)
downloademacs-f339cc3b81e28cabfd583c862b5011ac40acf935.tar.gz
emacs-f339cc3b81e28cabfd583c862b5011ac40acf935.zip
Add a better interactive spec to `facemenu-add-face'
* lisp/facemenu.el (facemenu-add-face): Use `read-face-name' (bug#18369) by copying over the interactive spec from facemenu-set-face.
-rw-r--r--lisp/facemenu.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 8631be917a9..7229d6163df 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -718,7 +718,13 @@ they are used to set the face information.
718As a special case, if FACE is `default', then the region is left with NO face 718As a special case, if FACE is `default', then the region is left with NO face
719text property. Otherwise, selecting the default face would not have any 719text property. Otherwise, selecting the default face would not have any
720effect. See `facemenu-remove-face-function'." 720effect. See `facemenu-remove-face-function'."
721 (interactive "*xFace: \nr") 721 (interactive (list (progn
722 (barf-if-buffer-read-only)
723 (read-face-name "Use face" (face-at-point t)))
724 (if (and mark-active (not current-prefix-arg))
725 (region-beginning))
726 (if (and mark-active (not current-prefix-arg))
727 (region-end))))
722 (cond 728 (cond
723 ((and (eq face 'default) 729 ((and (eq face 'default)
724 (not (eq facemenu-remove-face-function t))) 730 (not (eq facemenu-remove-face-function t)))