Commit 487e6fcb authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Customized.

parent c098c7f1
......@@ -102,7 +102,12 @@
(define-key global-map [C-down-mouse-2] 'facemenu-menu)
(define-key global-map "\M-g" 'facemenu-keymap)
(defvar facemenu-keybindings
(defgroup facemenu nil
"Create a face menu for interactively adding fonts to text"
:group 'faces
:prefix "facemenu-")
(defcustom facemenu-keybindings
'((default . "d")
(bold . "b")
(italic . "i")
......@@ -119,14 +124,18 @@ except for those in `facemenu-unlisted-faces', are listed after them,
but get no keyboard equivalents.
If you change this variable after loading facemenu.el, you will need to call
`facemenu-update' to make it take effect.")
`facemenu-update' to make it take effect."
:type '(repeat (cons face string))
:group 'facemenu)
(defvar facemenu-new-faces-at-end t
(defcustom facemenu-new-faces-at-end t
"*Where in the menu to insert newly-created faces.
This should be nil to put them at the top of the menu, or t to put them
just before \"Other\" at the end.")
just before \"Other\" at the end."
:type 'boolean
:group 'facemenu)
(defvar facemenu-unlisted-faces
(defcustom facemenu-unlisted-faces
'(modeline region secondary-selection highlight scratch-face)
"*List of faces not to include in the Face menu.
You can set this list before loading facemenu.el, or add a face to it before
......@@ -136,7 +145,11 @@ call `facemenu-update' to recalculate the menu contents.
If this variable is t, no faces will be added to the menu. This is useful for
temporarily turning off the feature that automatically adds faces to the menu
when they are created.")
when they are created."
:type '(choice (const :tag "Don't add" t)
(const :tag "None" nil)
(repeat face))
:group 'facemenu)
;;;###autoload
(defvar facemenu-face-menu
......@@ -242,20 +255,31 @@ requested in `facemenu-keybindings'.")
(defalias 'facemenu-keymap facemenu-keymap)
(defvar facemenu-add-face-function nil
(defcustom facemenu-add-face-function nil
"Function called at beginning of text to change or `nil'.
This function is passed the FACE to set and END of text to change, and must
return a string which is inserted. It may set `facemenu-end-add-face'.")
return a string which is inserted. It may set `facemenu-end-add-face'."
:type '(choice (const :tag "None" nil)
function)
:group 'facemenu)
(defvar facemenu-end-add-face nil
(defcustom facemenu-end-add-face nil
"String to insert or function called at end of text to change or `nil'.
This function is passed the FACE to set, and must return a string which is
inserted.")
inserted."
:type '(choice (const :tag "None" nil)
string
function)
:group 'facemenu)
(defvar facemenu-remove-face-function nil
(defcustom facemenu-remove-face-function nil
"When non-nil, this is a function called to remove faces.
This function is passed the START and END of text to change.
May also be `t' meaning to use `facemenu-add-face-function'.")
May also be `t' meaning to use `facemenu-add-face-function'."
:type '(choice (const :tag "None" nil)
(const :tag "Use add-face" t)
function)
:group 'facemenu)
;;; Internal Variables
......
......@@ -47,34 +47,56 @@
;;; Code:
;;; Customization:
(defvar cpp-config-file (convert-standard-filename ".cpp.el")
"*File name to save cpp configuration.")
(defvar cpp-known-face 'invisible
"*Face used for known cpp symbols.")
(defvar cpp-unknown-face 'highlight
"*Face used for unknown cpp symbols.")
(defvar cpp-face-type 'light
(defgroup cpp nil
"Highlight or hide text according to cpp conditionals."
:group 'C
:prefix "cpp-")
(defcustom cpp-config-file (convert-standard-filename ".cpp.el")
"*File name to save cpp configuration."
:type 'file
:group 'cpp)
(defcustom cpp-known-face 'invisible
"*Face used for known cpp symbols."
:type 'face
:group 'cpp)
(defcustom cpp-unknown-face 'highlight
"*Face used for unknown cpp symbols."
:type 'face
:group 'cpp)
(defcustom cpp-face-type 'light
"*Indicate what background face type you prefer.
Can be either light or dark for color screens, mono for monochrome
screens, and none if you don't use a window system.")
(defvar cpp-known-writable t
"*Non-nil means you are allowed to modify the known conditionals.")
(defvar cpp-unknown-writable t
"*Non-nil means you are allowed to modify the unknown conditionals.")
(defvar cpp-edit-list nil
screens, and none if you don't use a window system."
:options '(light dark mono nil)
:type 'symbol
:group 'cpp)
(defcustom cpp-known-writable t
"*Non-nil means you are allowed to modify the known conditionals."
:type 'boolean
:group 'cpp)
(defcustom cpp-unknown-writable t
"*Non-nil means you are allowed to modify the unknown conditionals."
:type 'boolean
:group 'cpp)
(defcustom cpp-edit-list nil
"Alist of cpp macros and information about how they should be displayed.
Each entry is a list with the following elements:
0. The name of the macro (a string).
1. Face used for text that is `ifdef' the macro.
2. Face used for text that is `ifndef' the macro.
3. `t', `nil', or `both' depending on what text may be edited.")
3. `t', `nil', or `both' depending on what text may be edited."
:type '(repeat (list string face face
(choice (const t)
(const nil)
(const both))))
:group 'cpp)
(defvar cpp-overlay-list nil)
;; List of cpp overlays active in the current buffer.
......@@ -108,38 +130,52 @@ Each entry is a list with the following elements:
("true" . t)
("both" . both)))
(defvar cpp-face-default-list nil
"List of faces you can choose from for cpp conditionals.")
(defcustom cpp-face-default-list nil
"List of faces you can choose from for cpp conditionals."
:type '(repeat face)
:group 'cpp)
(defvar cpp-face-light-name-list
(defcustom cpp-face-light-name-list
'("light gray" "light blue" "light cyan" "light yellow" "light pink"
"pale green" "beige" "orange" "magenta" "violet" "medium purple"
"turquoise")
"Background colours useful with dark foreground colors.")
"Background colours useful with dark foreground colors."
:type '(repeat string)
:group 'cpp)
(defvar cpp-face-dark-name-list
(defcustom cpp-face-dark-name-list
'("dim gray" "blue" "cyan" "yellow" "red"
"dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple"
"dark turquoise")
"Background colours useful with light foreground colors.")
(defvar cpp-face-light-list nil
"Alist of names and faces to be used for light backgrounds.")
(defvar cpp-face-dark-list nil
"Alist of names and faces to be used for dark backgrounds.")
(defvar cpp-face-mono-list
'(("bold" . 'bold)
("bold-italic" . 'bold-italic)
("italic" . 'italic)
("underline" . 'underline))
"Alist of names and faces to be used for monochrome screens.")
(defvar cpp-face-none-list
"Background colours useful with light foreground colors."
:type '(repeat string)
:group 'cpp)
(defcustom cpp-face-light-list nil
"Alist of names and faces to be used for light backgrounds."
:type '(repeat (cons string face))
:group 'cpp)
(defcustom cpp-face-dark-list nil
"Alist of names and faces to be used for dark backgrounds."
:type '(repeat (cons string face))
:group 'cpp)
(defcustom cpp-face-mono-list
'(("bold" . bold)
("bold-italic" . bold-italic)
("italic" . italic)
("underline" . underline))
"Alist of names and faces to be used for monochrome screens."
:type '(repeat (cons string face))
:group 'cpp)
(defcustom cpp-face-none-list
'(("default" . default)
("invisible" . invisible))
"Alist of names and faces available even if you don't use a window system.")
"Alist of names and faces available even if you don't use a window system."
:type '(repeat (cons string face))
:group 'cpp)
(defvar cpp-face-all-list
(append cpp-face-light-list
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment