aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorPaul Eggert2011-10-22 23:38:24 -0700
committerPaul Eggert2011-10-22 23:38:24 -0700
commitcfc09582247ffef6a46b6249e2fba9136a62d21e (patch)
tree50e102f64a2b88c692d9110990abd416c78c32f0 /lisp/progmodes
parent92c938895c639463681ae1c58a944cae62b70b87 (diff)
parent86c606818495d9411fd5d6b1477f9a097eb18020 (diff)
downloademacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.tar.gz
emacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.zip
Merge from trunk.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/bug-reference.el5
-rw-r--r--lisp/progmodes/cap-words.el8
-rw-r--r--lisp/progmodes/cc-engine.el53
-rw-r--r--lisp/progmodes/compile.el28
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/hideif.el14
-rw-r--r--lisp/progmodes/idlw-shell.el18
-rw-r--r--lisp/progmodes/idlwave.el1
-rw-r--r--lisp/progmodes/subword.el20
-rw-r--r--lisp/progmodes/vera-mode.el1
-rw-r--r--lisp/progmodes/vhdl-mode.el8
-rw-r--r--lisp/progmodes/which-func.el14
12 files changed, 118 insertions, 57 deletions
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 8ec379afab2..12eddfef1aa 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -127,7 +127,10 @@ so that it is considered safe, see `enable-local-variables'.")
127 127
128;;;###autoload 128;;;###autoload
129(define-minor-mode bug-reference-mode 129(define-minor-mode bug-reference-mode
130 "Minor mode to buttonize bugzilla references in the current buffer." 130 "Toggle hyperlinking bug references in the buffer (Bug Reference mode).
131With a prefix argument ARG, enable Bug Reference mode if ARG is
132positive, and disable it otherwise. If called from Lisp, enable
133the mode if ARG is omitted or nil."
131 nil 134 nil
132 "" 135 ""
133 nil 136 nil
diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el
index 0ce84ae33a7..d7b7dfef1ec 100644
--- a/lisp/progmodes/cap-words.el
+++ b/lisp/progmodes/cap-words.el
@@ -60,9 +60,13 @@ Looks for word boundaries before capitals."
60;;;###autoload 60;;;###autoload
61(define-minor-mode capitalized-words-mode 61(define-minor-mode capitalized-words-mode
62 "Toggle Capitalized Words mode. 62 "Toggle Capitalized Words mode.
63With a prefix argument ARG, enable Capitalized Words mode if ARG
64is positive, and disable it otherwise. If called from Lisp,
65enable the mode if ARG is omitted or nil.
63 66
64In this minor mode, a word boundary occurs immediately before an 67Capitalized Words mode is a buffer-local minor mode. When
65uppercase letter in a symbol. This is in addition to all the normal 68enabled, a word boundary occurs immediately before an uppercase
69letter in a symbol. This is in addition to all the normal
66boundaries given by the syntax and category tables. There is no 70boundaries given by the syntax and category tables. There is no
67restriction to ASCII. 71restriction to ASCII.
68 72
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a1cbdc16560..b2c548847c3 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2456,7 +2456,7 @@ comment at the start of cc-engine.el for more info."
2456 (<= from (cdr c-state-brace-pair-desert))) 2456 (<= from (cdr c-state-brace-pair-desert)))
2457 ;; Only search what we absolutely need to: 2457 ;; Only search what we absolutely need to:
2458 (if (and c-state-brace-pair-desert 2458 (if (and c-state-brace-pair-desert
2459 (> from (cdr c-state-brace-pair-desert))) 2459 (eq cache-pos (car c-state-brace-pair-desert)))
2460 (narrow-to-region (cdr c-state-brace-pair-desert) (point-max))) 2460 (narrow-to-region (cdr c-state-brace-pair-desert) (point-max)))
2461 2461
2462 ;; In the next pair of nested loops, the inner one moves back past a 2462 ;; In the next pair of nested loops, the inner one moves back past a
@@ -3127,6 +3127,33 @@ comment at the start of cc-engine.el for more info."
3127(unless (fboundp 'c-real-parse-state) 3127(unless (fboundp 'c-real-parse-state)
3128 (fset 'c-real-parse-state (symbol-function 'c-parse-state))) 3128 (fset 'c-real-parse-state (symbol-function 'c-parse-state)))
3129(cc-bytecomp-defun c-real-parse-state) 3129(cc-bytecomp-defun c-real-parse-state)
3130
3131(defvar c-parse-state-state nil)
3132(defun c-record-parse-state-state ()
3133 (setq c-parse-state-state
3134 (mapcar
3135 (lambda (arg)
3136 (cons arg (symbol-value arg)))
3137 '(c-state-cache
3138 c-state-cache-good-pos
3139 c-state-nonlit-pos-cache
3140 c-state-nonlit-pos-cache-limit
3141 c-state-brace-pair-desert
3142 c-state-point-min
3143 c-state-point-min-lit-type
3144 c-state-point-min-lit-start
3145 c-state-min-scan-pos
3146 c-state-old-cpp-beg
3147 c-state-old-cpp-end))))
3148(defun c-replay-parse-state-state ()
3149 (message
3150 (concat "(setq "
3151 (mapconcat
3152 (lambda (arg)
3153 (format "%s %s%s" (car arg) (if (atom (cdr arg)) "" "'") (cdr arg)))
3154 c-parse-state-state " ")
3155 ")")))
3156
3130(defun c-debug-parse-state () 3157(defun c-debug-parse-state ()
3131 (let ((here (point)) (res1 (c-real-parse-state)) res2) 3158 (let ((here (point)) (res1 (c-real-parse-state)) res2)
3132 (let ((c-state-cache nil) 3159 (let ((c-state-cache nil)
@@ -3145,15 +3172,21 @@ comment at the start of cc-engine.el for more info."
3145 ;; The cache can actually go further back due to the ad-hoc way 3172 ;; The cache can actually go further back due to the ad-hoc way
3146 ;; the first paren is found, so try to whack off a bit of its 3173 ;; the first paren is found, so try to whack off a bit of its
3147 ;; start before complaining. 3174 ;; start before complaining.
3148 (save-excursion 3175 ;; (save-excursion
3149 (goto-char (or (c-least-enclosing-brace res2) (point))) 3176 ;; (goto-char (or (c-least-enclosing-brace res2) (point)))
3150 (c-beginning-of-defun-1) 3177 ;; (c-beginning-of-defun-1)
3151 (while (not (or (bobp) (eq (char-after) ?{))) 3178 ;; (while (not (or (bobp) (eq (char-after) ?{)))
3152 (c-beginning-of-defun-1)) 3179 ;; (c-beginning-of-defun-1))
3153 (unless (equal (c-whack-state-before (point) res1) res2) 3180 ;; (unless (equal (c-whack-state-before (point) res1) res2)
3154 (message (concat "c-parse-state inconsistency at %s: " 3181 ;; (message (concat "c-parse-state inconsistency at %s: "
3155 "using cache: %s, from scratch: %s") 3182 ;; "using cache: %s, from scratch: %s")
3156 here res1 res2)))) 3183 ;; here res1 res2)))
3184 (message (concat "c-parse-state inconsistency at %s: "
3185 "using cache: %s, from scratch: %s")
3186 here res1 res2)
3187 (message "Old state:")
3188 (c-replay-parse-state-state))
3189 (c-record-parse-state-state)
3157 res1)) 3190 res1))
3158 3191
3159(defun c-toggle-parse-state-debug (&optional arg) 3192(defun c-toggle-parse-state-debug (&optional arg)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 619c423902c..156c90159cd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1968,12 +1968,15 @@ Optional argument MINOR indicates this is called from
1968 1968
1969;;;###autoload 1969;;;###autoload
1970(define-minor-mode compilation-shell-minor-mode 1970(define-minor-mode compilation-shell-minor-mode
1971 "Toggle compilation shell minor mode. 1971 "Toggle Compilation Shell minor mode.
1972With arg, turn compilation mode on if and only if arg is positive. 1972With a prefix argument ARG, enable Compilation Shell minor mode
1973In this minor mode, all the error-parsing commands of the 1973if ARG is positive, and disable it otherwise. If called from
1974Compilation major mode are available but bound to keys that don't 1974Lisp, enable the mode if ARG is omitted or nil.
1975collide with Shell mode. See `compilation-mode'. 1975
1976Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'." 1976When Compilation Shell minor mode is enabled, all the
1977error-parsing commands of the Compilation major mode are
1978available but bound to keys that don't collide with Shell mode.
1979See `compilation-mode'."
1977 nil " Shell-Compile" 1980 nil " Shell-Compile"
1978 :group 'compilation 1981 :group 'compilation
1979 (if compilation-shell-minor-mode 1982 (if compilation-shell-minor-mode
@@ -1982,11 +1985,14 @@ Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'."
1982 1985
1983;;;###autoload 1986;;;###autoload
1984(define-minor-mode compilation-minor-mode 1987(define-minor-mode compilation-minor-mode
1985 "Toggle compilation minor mode. 1988 "Toggle Compilation minor mode.
1986With arg, turn compilation mode on if and only if arg is positive. 1989With a prefix argument ARG, enable Compilation minor mode if ARG
1987In this minor mode, all the error-parsing commands of the 1990is positive, and disable it otherwise. If called from Lisp,
1988Compilation major mode are available. See `compilation-mode'. 1991enable the mode if ARG is omitted or nil.
1989Turning the mode on runs the normal hook `compilation-minor-mode-hook'." 1992
1993When Compilation minor mode is enabled, all the error-parsing
1994commands of Compilation major mode are available. See
1995`compilation-mode'."
1990 nil " Compilation" 1996 nil " Compilation"
1991 :group 'compilation 1997 :group 'compilation
1992 (if compilation-minor-mode 1998 (if compilation-minor-mode
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 25a23fed293..7b3a2893610 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3255,7 +3255,10 @@ Treats actions as defuns."
3255 3255
3256;;;###autoload 3256;;;###autoload
3257(define-minor-mode gud-tooltip-mode 3257(define-minor-mode gud-tooltip-mode
3258 "Toggle the display of GUD tooltips." 3258 "Toggle the display of GUD tooltips.
3259With a prefix argument ARG, enable the feature if ARG is
3260positive, and disable it otherwise. If called from Lisp, enable
3261it if ARG is omitted or nil."
3259 :global t 3262 :global t
3260 :group 'gud 3263 :group 'gud
3261 :group 'tooltip 3264 :group 'tooltip
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 48d1ac4b85e..374a45acec6 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -214,11 +214,15 @@
214 214
215;;;###autoload 215;;;###autoload
216(define-minor-mode hide-ifdef-mode 216(define-minor-mode hide-ifdef-mode
217 "Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. 217 "Toggle features to hide/show #ifdef blocks (Hide-Ifdef mode).
218With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise. 218With a prefix argument ARG, enable Hide-Ifdef mode if ARG is
219In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor 219positive, and disable it otherwise. If called from Lisp, enable
220would eliminate may be hidden from view. Several variables affect 220the mode if ARG is omitted or nil.
221how the hiding is done: 221
222Hide-Ifdef mode is a buffer-local minor mode for use with C and
223C-like major modes. When enabled, code within #ifdef constructs
224that the C preprocessor would eliminate may be hidden from view.
225Several variables affect how the hiding is done:
222 226
223`hide-ifdef-env' 227`hide-ifdef-env'
224 An association list of defined and undefined symbols for the 228 An association list of defined and undefined symbols for the
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index b2cd24f0f98..18f47d14a3f 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -4277,16 +4277,14 @@ Otherwise, just expand the file name."
4277(defvar idlwave-shell-electric-debug-buffers nil) 4277(defvar idlwave-shell-electric-debug-buffers nil)
4278 4278
4279(define-minor-mode idlwave-shell-electric-debug-mode 4279(define-minor-mode idlwave-shell-electric-debug-mode
4280 "Toggle Electric Debug mode. 4280 "Toggle Idlwave Shell Electric Debug mode.
4281With no argument, this command toggles the mode. 4281With a prefix argument ARG, enable the mode if ARG is positive,
4282Non-null prefix argument turns on the mode. 4282and disable it otherwise. If called from Lisp, enable the mode
4283Null prefix argument turns off the mode. 4283if ARG is omitted or nil.
4284 4284
4285When Electric Debug mode is enabled, the many debugging commands are 4285When Idlwave Shell Electric Debug mode is enabled, the Idlwave
4286available as single key sequences." 4286Shell debugging commands are available as single key sequences."
4287nil 4287 nil " *Debugging*" idlwave-shell-electric-debug-mode-map)
4288" *Debugging*"
4289idlwave-shell-electric-debug-mode-map)
4290 4288
4291(add-hook 4289(add-hook
4292 'idlwave-shell-electric-debug-mode-on-hook 4290 'idlwave-shell-electric-debug-mode-on-hook
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 8066e1c3a7f..c77ee4b76a9 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1907,7 +1907,6 @@ The main features of this mode are
1907 (set (make-local-variable 'comment-start-skip) ";+[ \t]*") 1907 (set (make-local-variable 'comment-start-skip) ";+[ \t]*")
1908 (set (make-local-variable 'comment-start) ";") 1908 (set (make-local-variable 'comment-start) ";")
1909 (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions 1909 (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions
1910 (set (make-local-variable 'require-final-newline) t)
1911 (set (make-local-variable 'abbrev-all-caps) t) 1910 (set (make-local-variable 'abbrev-all-caps) t)
1912 (set (make-local-variable 'indent-tabs-mode) nil) 1911 (set (make-local-variable 'indent-tabs-mode) nil)
1913 (set (make-local-variable 'completion-ignore-case) t) 1912 (set (make-local-variable 'completion-ignore-case) t)
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
index 1a403f50b1b..9c61da89008 100644
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -94,13 +94,19 @@
94 94
95;;;###autoload 95;;;###autoload
96(define-minor-mode subword-mode 96(define-minor-mode subword-mode
97 "Mode enabling subword movement and editing keys. 97 "Toggle subword movement and editing (Subword mode).
98In spite of GNU Coding Standards, it is popular to name a symbol by 98With a prefix argument ARG, enable Subword mode if ARG is
99mixing uppercase and lowercase letters, e.g. \"GtkWidget\", 99positive, and disable it otherwise. If called from Lisp, enable
100\"EmacsFrameClass\", \"NSGraphicsContext\", etc. Here we call these 100the mode if ARG is omitted or nil.
101mixed case symbols `nomenclatures'. Also, each capitalized (or 101
102completely uppercase) part of a nomenclature is called a `subword'. 102Subword mode is a buffer-local minor mode. Enabling it remaps
103Here are some examples: 103word-based editing commands to subword-based commands that handle
104symbols with mixed uppercase and lowercase letters,
105e.g. \"GtkWidget\", \"EmacsFrameClass\", \"NSGraphicsContext\".
106
107Here we call these mixed case symbols `nomenclatures'. Each
108capitalized (or completely uppercase) part of a nomenclature is
109called a `subword'. Here are some examples:
104 110
105 Nomenclature Subwords 111 Nomenclature Subwords
106 =========================================================== 112 ===========================================================
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index 1f33f5f3aaf..b02324871ff 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -310,7 +310,6 @@ Key bindings:
310 (set (make-local-variable 'comment-indent-function) 'c-comment-indent) 310 (set (make-local-variable 'comment-indent-function) 'c-comment-indent)
311 (set (make-local-variable 'paragraph-start) "^$") 311 (set (make-local-variable 'paragraph-start) "^$")
312 (set (make-local-variable 'paragraph-separate) paragraph-start) 312 (set (make-local-variable 'paragraph-separate) paragraph-start)
313 (set (make-local-variable 'require-final-newline) t)
314 (set (make-local-variable 'indent-tabs-mode) nil) 313 (set (make-local-variable 'indent-tabs-mode) nil)
315 (set (make-local-variable 'indent-line-function) 'vera-indent-line) 314 (set (make-local-variable 'indent-line-function) 'vera-indent-line)
316 (set (make-local-variable 'parse-sexp-ignore-comments) t) 315 (set (make-local-variable 'parse-sexp-ignore-comments) t)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 9aaf3059b78..d7aa82aee1b 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8029,12 +8029,16 @@ project is defined."
8029 8029
8030(define-minor-mode vhdl-electric-mode 8030(define-minor-mode vhdl-electric-mode
8031 "Toggle VHDL electric mode. 8031 "Toggle VHDL electric mode.
8032Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." 8032With a prefix argument ARG, enable the mode if ARG is positive,
8033and disable it otherwise. If called from Lisp, enable it if ARG
8034is omitted or nil."
8033 :global t) 8035 :global t)
8034 8036
8035(define-minor-mode vhdl-stutter-mode 8037(define-minor-mode vhdl-stutter-mode
8036 "Toggle VHDL stuttering mode. 8038 "Toggle VHDL stuttering mode.
8037Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." 8039With a prefix argument ARG, enable the mode if ARG is positive,
8040and disable it otherwise. If called from Lisp, enable it if ARG
8041is omitted or nil."
8038 :global t) 8042 :global t)
8039 8043
8040;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 8044;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 97e188139e9..e27d07854c8 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -236,12 +236,14 @@ It creates the Imenu index for the buffer, if necessary."
236;; This is the name people would normally expect. 236;; This is the name people would normally expect.
237;;;###autoload 237;;;###autoload
238(define-minor-mode which-function-mode 238(define-minor-mode which-function-mode
239 "Toggle Which Function mode, globally. 239 "Toggle mode line display of current function (Which Function mode).
240When Which Function mode is enabled, the current function name is 240With a prefix argument ARG, enable Which Function mode if ARG is
241continuously displayed in the mode line, in certain major modes. 241positive, and disable it otherwise. If called from Lisp, enable
242 242the mode if ARG is omitted or nil.
243With prefix ARG, turn Which Function mode on if arg is positive, 243
244and off otherwise." 244Which Function mode is a global minor mode. When enabled, the
245current function name is continuously displayed in the mode line,
246in certain major modes."
245 :global t :group 'which-func 247 :global t :group 'which-func
246 (when (timerp which-func-update-timer) 248 (when (timerp which-func-update-timer)
247 (cancel-timer which-func-update-timer)) 249 (cancel-timer which-func-update-timer))