diff options
| author | Richard M. Stallman | 2006-08-10 04:00:34 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-08-10 04:00:34 +0000 |
| commit | cd7890bd1af96ddbdaebccb45291f72d94d18941 (patch) | |
| tree | d16b9189aaf9c97b9d245e1992b326ec63758a79 | |
| parent | 38ceb48f7f509590630c79c0709d3ecafd2c63e1 (diff) | |
| download | emacs-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.el | 43 |
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. |
| 324 | This adds FACE to the top of the face list; any faces lower on the list that | 324 | |
| 325 | will not show through at all will be removed. | 325 | If the region is active (normally true except in Transient |
| 326 | 326 | Mark mode) and nonempty, and there is no prefix argument, | |
| 327 | Interactively, reads the face name with the minibuffer. | 327 | this command applies FACE to the region. Otherwise, it applies FACE |
| 328 | 328 | to the faces to use for the next character | |
| 329 | If the region is active (normally true except in Transient Mark mode) | 329 | inserted. (Moving point or switching buffers before typing |
| 330 | and there is no prefix argument, this command sets the region to the | 330 | a character to insert cancels the specification.) |
| 331 | requested face. | 331 | |
| 332 | 332 | If FACE is `default', to \"apply\" it means clearing | |
| 333 | Otherwise, this command specifies the face for the next character | 333 | the list of faces to be used. For any other value of FACE, |
| 334 | inserted. Moving point or switching buffers before | 334 | to \"apply\" it means putting FACE at the front of the list |
| 335 | typing a character to insert cancels the specification." | 335 | of faces to be used, and removing any faces further |
| 336 | along in the list that would be completely overridden by | ||
| 337 | preceding faces (including FACE). | ||
| 338 | |||
| 339 | This command can also add FACE to the menu of faces, | ||
| 340 | if `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 | 669 | This is called whenever you create a new face, and at other times." | |
| 660 | This is called whenever you create a new face." | ||
| 661 | (let* (name | 670 | (let* (name |
| 662 | symbol | 671 | symbol |
| 663 | menu docstring | 672 | menu docstring |