aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-08-10 04:00:34 +0000
committerRichard M. Stallman2006-08-10 04:00:34 +0000
commitcd7890bd1af96ddbdaebccb45291f72d94d18941 (patch)
treed16b9189aaf9c97b9d245e1992b326ec63758a79
parent38ceb48f7f509590630c79c0709d3ecafd2c63e1 (diff)
downloademacs-cd7890bd1af96ddbdaebccb45291f72d94d18941.tar.gz
emacs-cd7890bd1af96ddbdaebccb45291f72d94d18941.zip
(facemenu-add-face): Pass frame to facemenu-active-faces.
(facemenu-set-face): Doc fix.
-rw-r--r--lisp/facemenu.el43
1 files changed, 26 insertions, 17 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index a8d8ea9a4b5..3c43bfbad7a 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -320,19 +320,24 @@ variables."
320 320
321;;;###autoload 321;;;###autoload
322(defun facemenu-set-face (face &optional start end) 322(defun facemenu-set-face (face &optional start end)
323 "Add FACE to the region or next character typed. 323 "Apply FACE to the region or next character typed.
324This adds FACE to the top of the face list; any faces lower on the list that 324
325will not show through at all will be removed. 325If the region is active (normally true except in Transient
326 326Mark mode) and nonempty, and there is no prefix argument,
327Interactively, reads the face name with the minibuffer. 327this command applies FACE to the region. Otherwise, it applies FACE
328 328to the faces to use for the next character
329If the region is active (normally true except in Transient Mark mode) 329inserted. (Moving point or switching buffers before typing
330and there is no prefix argument, this command sets the region to the 330a character to insert cancels the specification.)
331requested face. 331
332 332If FACE is `default', to \"apply\" it means clearing
333Otherwise, this command specifies the face for the next character 333the list of faces to be used. For any other value of FACE,
334inserted. Moving point or switching buffers before 334to \"apply\" it means putting FACE at the front of the list
335typing a character to insert cancels the specification." 335of faces to be used, and removing any faces further
336along in the list that would be completely overridden by
337preceding faces (including FACE).
338
339This command can also add FACE to the menu of faces,
340if `facemenu-listed-faces' says to do that."
336 (interactive (list (progn 341 (interactive (list (progn
337 (barf-if-buffer-read-only) 342 (barf-if-buffer-read-only)
338 (read-face-name "Use face")) 343 (read-face-name "Use face"))
@@ -612,7 +617,12 @@ effect. See `facemenu-remove-face-function'."
612 (cons face 617 (cons face
613 (if (listp prev) 618 (if (listp prev)
614 prev 619 prev
615 (list prev))))))) 620 (list prev)))
621 ;; Specify the selected frame
622 ;; because nil would mean to use
623 ;; the new-frame default settings,
624 ;; and those are usually nil.
625 (selected-frame)))))
616 (setq part-start part-end))) 626 (setq part-start part-end)))
617 (setq self-insert-face (if (eq last-command self-insert-face-command) 627 (setq self-insert-face (if (eq last-command self-insert-face-command)
618 (cons face (if (listp self-insert-face) 628 (cons face (if (listp self-insert-face)
@@ -655,9 +665,8 @@ use the selected frame. If t, then the global, non-frame faces are used."
655 (nreverse active-list))) 665 (nreverse active-list)))
656 666
657(defun facemenu-add-new-face (face) 667(defun facemenu-add-new-face (face)
658 "Add FACE (a face) to the Face menu. 668 "Add FACE (a face) to the Face menu if `facemenu-listed-faces' says so.
659 669This is called whenever you create a new face, and at other times."
660This is called whenever you create a new face."
661 (let* (name 670 (let* (name
662 symbol 671 symbol
663 menu docstring 672 menu docstring