]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cpp.el
Re-write flymake-highlight-line in flymake.el
[gnu-emacs] / lisp / progmodes / cpp.el
index a8f01705e2d0093bcf8ea9b761295e3a6f95238a..d332d8bff31ebbd0df532dca4d4e6cdd29e8b149 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cpp.el --- highlight or hide text according to cpp conditionals
 
-;; Copyright (C) 1994-1995, 2001-201 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2013 Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: c, faces, tools
@@ -52,7 +52,7 @@
   :prefix "cpp-")
 
 (defcustom cpp-config-file (convert-standard-filename ".cpp.el")
-  "*File name to save cpp configuration."
+  "File name to save cpp configuration."
   :type 'file
   :group 'cpp)
 
   :type '(choice (const invisible) (face)))
 
 (defcustom cpp-known-face 'invisible
-  "*Face used for known cpp symbols."
+  "Face used for known cpp symbols."
   :type 'cpp-face
   :group 'cpp)
 
 (defcustom cpp-unknown-face 'highlight
-  "*Face used for unknown cpp symbols."
+  "Face used for unknown cpp symbols."
   :type 'cpp-face
   :group 'cpp)
 
 (defcustom cpp-face-type 'light
-  "*Indicate what background face type you prefer.
+  "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 and don't have
 a color-capable display."
@@ -80,12 +80,12 @@ a color-capable display."
   :group 'cpp)
 
 (defcustom cpp-known-writable t
-  "*Non-nil means you are allowed to modify the known conditionals."
+  "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."
+  "Non-nil means you are allowed to modify the unknown conditionals."
   :type 'boolean
   :group 'cpp)
 
@@ -136,13 +136,18 @@ Each entry is a list with the following elements:
     ("true" . t)
     ("both" . both)))
 
+;; FIXME Gets clobbered by cpp-choose-face, so why is even it a defcustom?
 (defcustom cpp-face-default-list nil
   "Alist of faces you can choose from for cpp conditionals.
 Each element has the form (STRING . FACE), where STRING
 serves as a name (for `cpp-highlight-buffer' only)
 and FACE is either a face (a symbol)
 or a cons cell (background-color . COLOR)."
-  :type '(repeat (cons string (choice face (cons (const background-color) string))))
+  :type '(alist :key-type (string :tag "Name")
+               :value-type (choice face
+                                   (const invisible)
+                                   (cons (const background-color)
+                                         (string :tag "Color"))))
   :group 'cpp)
 
 (defcustom cpp-face-light-name-list
@@ -419,8 +424,9 @@ A prefix arg suppresses display of that buffer."
     (suppress-keymap map)
     (define-key map [ down-mouse-2 ] 'cpp-push-button)
     (define-key map [ mouse-2 ] 'ignore)
-    (define-key map " " 'scroll-up)
-    (define-key map "\C-?" 'scroll-down)
+    (define-key map " " 'scroll-up-command)
+    (define-key map [?\S-\ ] 'scroll-down-command)
+    (define-key map "\C-?" 'scroll-down-command)
     (define-key map [ delete ] 'scroll-down)
     (define-key map "\C-c\C-c" 'cpp-edit-apply)
     (define-key map "a" 'cpp-edit-apply)