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.
This commit is contained in:
parent
a5d1bd6a6d
commit
f339cc3b81
1 changed files with 7 additions and 1 deletions
|
|
@ -718,7 +718,13 @@ they are used to set the face information.
|
|||
As a special case, if FACE is `default', then the region is left with NO face
|
||||
text property. Otherwise, selecting the default face would not have any
|
||||
effect. See `facemenu-remove-face-function'."
|
||||
(interactive "*xFace: \nr")
|
||||
(interactive (list (progn
|
||||
(barf-if-buffer-read-only)
|
||||
(read-face-name "Use face" (face-at-point t)))
|
||||
(if (and mark-active (not current-prefix-arg))
|
||||
(region-beginning))
|
||||
(if (and mark-active (not current-prefix-arg))
|
||||
(region-end))))
|
||||
(cond
|
||||
((and (eq face 'default)
|
||||
(not (eq facemenu-remove-face-function t)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue