Function: facemenu-set-foreground

facemenu-set-foreground is an interactive and byte-compiled function defined in facemenu.el.gz.

Signature

(facemenu-set-foreground COLOR &optional START END)

Documentation

Set the foreground COLOR of the region or next character typed.

This command reads the color in the minibuffer.

If the region is active (normally true except in Transient Mark mode) and there is no prefix argument, this command sets the region to the requested face.

Otherwise, this command specifies the face for the next character inserted. Moving point or switching buffers before typing a character to insert cancels the specification.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/facemenu.el.gz
(defun facemenu-set-foreground (color &optional start end)
  "Set the foreground COLOR of the region or next character typed.
This command reads the color in the minibuffer.

If the region is active (normally true except in Transient Mark mode)
and there is no prefix argument, this command sets the region to the
requested face.

Otherwise, this command specifies the face for the next character
inserted.  Moving point or switching buffers before
typing a character to insert cancels the specification."
  (interactive (list (progn
		       (barf-if-buffer-read-only)
		       (read-color "Foreground color: "))
		     (if (and mark-active (not current-prefix-arg))
			 (region-beginning))
		     (if (and mark-active (not current-prefix-arg))
			 (region-end))))
  (facemenu-set-face-from-menu
   (facemenu-add-new-color color 'facemenu-foreground-menu)
   start end))