diff options
| author | Paul Eggert | 2012-02-10 10:58:48 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-02-10 10:58:48 -0800 |
| commit | 6e6c82a4e687708d5a7a3887f92db45bd74da276 (patch) | |
| tree | 85dc3105240e84a8cddadb25d572e170fcdbd8bc /lisp/progmodes | |
| parent | 78df1fb1d46d556bfc2698ca1802972b13613ba8 (diff) | |
| parent | cc26d239af9a82cff079556a1daff4b4bf60eb5c (diff) | |
| download | emacs-6e6c82a4e687708d5a7a3887f92db45bd74da276.tar.gz emacs-6e6c82a4e687708d5a7a3887f92db45bd74da276.zip | |
Merge from trunk.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 173 | ||||
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 48 | ||||
| -rw-r--r-- | lisp/progmodes/cc-guess.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 26 | ||||
| -rw-r--r-- | lisp/progmodes/cwarn.el | 41 | ||||
| -rw-r--r-- | lisp/progmodes/f90.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/glasses.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/hideshow.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/pascal.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/sql.el | 34 |
17 files changed, 277 insertions, 121 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 76b9f304164..509bb203f78 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -4382,11 +4382,8 @@ Optional prefix ARG means justify paragraph as well." | |||
| 4382 | (let ((fill-paragraph-function | 4382 | (let ((fill-paragraph-function |
| 4383 | ;; Avoid infinite recursion. | 4383 | ;; Avoid infinite recursion. |
| 4384 | (if (not (eq fill-paragraph-function 'c-fill-paragraph)) | 4384 | (if (not (eq fill-paragraph-function 'c-fill-paragraph)) |
| 4385 | fill-paragraph-function)) | 4385 | fill-paragraph-function))) |
| 4386 | (start-point (point-marker))) | 4386 | (c-mask-paragraph t nil 'fill-paragraph arg)) |
| 4387 | (c-mask-paragraph | ||
| 4388 | t nil (lambda () (fill-region-as-paragraph (point-min) (point-max) arg))) | ||
| 4389 | (goto-char start-point)) | ||
| 4390 | ;; Always return t. This has the effect that if filling isn't done | 4387 | ;; Always return t. This has the effect that if filling isn't done |
| 4391 | ;; above, it isn't done at all, and it's therefore effectively | 4388 | ;; above, it isn't done at all, and it's therefore effectively |
| 4392 | ;; disabled in normal code. | 4389 | ;; disabled in normal code. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 2e0294341da..be0f86ddd7e 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -2074,7 +2074,7 @@ comment at the start of cc-engine.el for more info." | |||
| 2074 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2074 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2075 | ;; We maintain a simple cache of positions which aren't in a literal, so as to | 2075 | ;; We maintain a simple cache of positions which aren't in a literal, so as to |
| 2076 | ;; speed up testing for non-literality. | 2076 | ;; speed up testing for non-literality. |
| 2077 | (defconst c-state-nonlit-pos-interval 10000) | 2077 | (defconst c-state-nonlit-pos-interval 3000) |
| 2078 | ;; The approximate interval between entries in `c-state-nonlit-pos-cache'. | 2078 | ;; The approximate interval between entries in `c-state-nonlit-pos-cache'. |
| 2079 | 2079 | ||
| 2080 | (defvar c-state-nonlit-pos-cache nil) | 2080 | (defvar c-state-nonlit-pos-cache nil) |
| @@ -2129,7 +2129,7 @@ comment at the start of cc-engine.el for more info." | |||
| 2129 | (widen) | 2129 | (widen) |
| 2130 | (save-excursion | 2130 | (save-excursion |
| 2131 | (let ((c c-state-nonlit-pos-cache) | 2131 | (let ((c c-state-nonlit-pos-cache) |
| 2132 | pos npos lit) | 2132 | pos npos lit macro-beg) |
| 2133 | ;; Trim the cache to take account of buffer changes. | 2133 | ;; Trim the cache to take account of buffer changes. |
| 2134 | (while (and c (> (car c) c-state-nonlit-pos-cache-limit)) | 2134 | (while (and c (> (car c) c-state-nonlit-pos-cache-limit)) |
| 2135 | (setq c (cdr c))) | 2135 | (setq c (cdr c))) |
| @@ -2139,16 +2139,32 @@ comment at the start of cc-engine.el for more info." | |||
| 2139 | (setq c (cdr c))) | 2139 | (setq c (cdr c))) |
| 2140 | (setq pos (or (car c) (point-min))) | 2140 | (setq pos (or (car c) (point-min))) |
| 2141 | 2141 | ||
| 2142 | (while (<= (setq npos (+ pos c-state-nonlit-pos-interval)) | 2142 | (while |
| 2143 | here) | 2143 | ;; Add an element to `c-state-nonlit-pos-cache' each iteration. |
| 2144 | (setq lit (car (cddr (c-state-pp-to-literal pos npos)))) | 2144 | (and |
| 2145 | (setq pos (or (cdr lit) npos)) ; end of literal containing npos. | 2145 | (<= (setq npos (+ pos c-state-nonlit-pos-interval)) here) |
| 2146 | (progn | ||
| 2147 | (setq lit (car (cddr (c-state-pp-to-literal pos npos)))) | ||
| 2148 | (cond | ||
| 2149 | ((null lit) | ||
| 2150 | (setq pos npos) | ||
| 2151 | t) | ||
| 2152 | ((<= (cdr lit) here) | ||
| 2153 | (setq pos (cdr lit)) | ||
| 2154 | t) | ||
| 2155 | (t | ||
| 2156 | (setq pos (car lit)) | ||
| 2157 | nil)))) | ||
| 2158 | |||
| 2146 | (goto-char pos) | 2159 | (goto-char pos) |
| 2147 | (when (and (c-beginning-of-macro) (/= (point) pos)) | 2160 | (when (and (c-beginning-of-macro) (/= (point) pos)) |
| 2148 | (c-syntactic-end-of-macro) | 2161 | (setq macro-beg (point)) |
| 2149 | (or (eobp) (forward-char)) | 2162 | (c-syntactic-end-of-macro) |
| 2150 | (setq pos (point))) | 2163 | (or (eobp) (forward-char)) |
| 2151 | (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache))) | 2164 | (setq pos (if (<= (point) here) |
| 2165 | (point) | ||
| 2166 | macro-beg))) | ||
| 2167 | (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache))) | ||
| 2152 | 2168 | ||
| 2153 | (if (> pos c-state-nonlit-pos-cache-limit) | 2169 | (if (> pos c-state-nonlit-pos-cache-limit) |
| 2154 | (setq c-state-nonlit-pos-cache-limit pos)) | 2170 | (setq c-state-nonlit-pos-cache-limit pos)) |
| @@ -4351,6 +4367,78 @@ comment at the start of cc-engine.el for more info." | |||
| 4351 | (t 'c))) ; Assuming the range is valid. | 4367 | (t 'c))) ; Assuming the range is valid. |
| 4352 | range)) | 4368 | range)) |
| 4353 | 4369 | ||
| 4370 | (defsubst c-determine-limit-get-base (start try-size) | ||
| 4371 | ;; Get a "safe place" approximately TRY-SIZE characters before START. | ||
| 4372 | ;; This doesn't preserve point. | ||
| 4373 | (let* ((pos (max (- start try-size) (point-min))) | ||
| 4374 | (base (c-state-safe-place pos)) | ||
| 4375 | (s (parse-partial-sexp base pos))) | ||
| 4376 | (if (or (nth 4 s) (nth 3 s)) ; comment or string | ||
| 4377 | (nth 8 s) | ||
| 4378 | (point)))) | ||
| 4379 | |||
| 4380 | (defun c-determine-limit (how-far-back &optional start try-size) | ||
| 4381 | ;; Return a buffer position HOW-FAR-BACK non-literal characters from START | ||
| 4382 | ;; (default point). This is done by going back further in the buffer then | ||
| 4383 | ;; searching forward for literals. The position found won't be in a | ||
| 4384 | ;; literal. We start searching for the sought position TRY-SIZE (default | ||
| 4385 | ;; twice HOW-FAR-BACK) bytes back from START. This function must be fast. | ||
| 4386 | ;; :-) | ||
| 4387 | (save-excursion | ||
| 4388 | (let* ((start (or start (point))) | ||
| 4389 | (try-size (or try-size (* 2 how-far-back))) | ||
| 4390 | (base (c-determine-limit-get-base start try-size)) | ||
| 4391 | (pos base) | ||
| 4392 | |||
| 4393 | (s (parse-partial-sexp pos pos)) ; null state. | ||
| 4394 | stack elt size | ||
| 4395 | (count 0)) | ||
| 4396 | (while (< pos start) | ||
| 4397 | ;; Move forward one literal each time round this loop. | ||
| 4398 | ;; Move forward to the start of a comment or string. | ||
| 4399 | (setq s (parse-partial-sexp | ||
| 4400 | pos | ||
| 4401 | start | ||
| 4402 | nil ; target-depth | ||
| 4403 | nil ; stop-before | ||
| 4404 | s ; state | ||
| 4405 | 'syntax-table)) ; stop-comment | ||
| 4406 | |||
| 4407 | ;; Gather details of the non-literal-bit - starting pos and size. | ||
| 4408 | (setq size (- (if (or (nth 4 s) (nth 3 s)) | ||
| 4409 | (nth 8 s) | ||
| 4410 | (point)) | ||
| 4411 | pos)) | ||
| 4412 | (if (> size 0) | ||
| 4413 | (setq stack (cons (cons pos size) stack))) | ||
| 4414 | |||
| 4415 | ;; Move forward to the end of the comment/string. | ||
| 4416 | (if (or (nth 4 s) (nth 3 s)) | ||
| 4417 | (setq s (parse-partial-sexp | ||
| 4418 | (point) | ||
| 4419 | start | ||
| 4420 | nil ; target-depth | ||
| 4421 | nil ; stop-before | ||
| 4422 | s ; state | ||
| 4423 | 'syntax-table))) ; stop-comment | ||
| 4424 | (setq pos (point))) | ||
| 4425 | |||
| 4426 | ;; Now try and find enough non-literal characters recorded on the stack. | ||
| 4427 | ;; Go back one recorded literal each time round this loop. | ||
| 4428 | (while (and (< count how-far-back) | ||
| 4429 | stack) | ||
| 4430 | (setq elt (car stack) | ||
| 4431 | stack (cdr stack)) | ||
| 4432 | (setq count (+ count (cdr elt)))) | ||
| 4433 | |||
| 4434 | ;; Have we found enough yet? | ||
| 4435 | (cond | ||
| 4436 | ((>= count how-far-back) | ||
| 4437 | (+ (car elt) (- count how-far-back))) | ||
| 4438 | ((eq base (point-min)) | ||
| 4439 | (point-min)) | ||
| 4440 | (t | ||
| 4441 | (c-determine-limit (- how-far-back count) base try-size)))))) | ||
| 4354 | 4442 | ||
| 4355 | ;; `c-find-decl-spots' and accompanying stuff. | 4443 | ;; `c-find-decl-spots' and accompanying stuff. |
| 4356 | 4444 | ||
| @@ -4487,13 +4575,14 @@ comment at the start of cc-engine.el for more info." | |||
| 4487 | ;; Call CFD-FUN for each possible spot for a declaration, cast or | 4575 | ;; Call CFD-FUN for each possible spot for a declaration, cast or |
| 4488 | ;; label from the point to CFD-LIMIT. | 4576 | ;; label from the point to CFD-LIMIT. |
| 4489 | ;; | 4577 | ;; |
| 4490 | ;; CFD-FUN is called with point at the start of the spot. It's | 4578 | ;; CFD-FUN is called with point at the start of the spot. It's passed two |
| 4491 | ;; passed two arguments: The first is the end position of the token | 4579 | ;; arguments: The first is the end position of the token preceding the spot, |
| 4492 | ;; preceding the spot, or 0 for the implicit match at bob. The | 4580 | ;; or 0 for the implicit match at bob. The second is a flag that is t when |
| 4493 | ;; second is a flag that is t when the match is inside a macro. If | 4581 | ;; the match is inside a macro. Point should be moved forward by at least |
| 4494 | ;; CFD-FUN adds `c-decl-end' properties somewhere below the current | 4582 | ;; one token. |
| 4495 | ;; spot, it should return non-nil to ensure that the next search | 4583 | ;; |
| 4496 | ;; will find them. | 4584 | ;; If CFD-FUN adds `c-decl-end' properties somewhere below the current spot, |
| 4585 | ;; it should return non-nil to ensure that the next search will find them. | ||
| 4497 | ;; | 4586 | ;; |
| 4498 | ;; Such a spot is: | 4587 | ;; Such a spot is: |
| 4499 | ;; o The first token after bob. | 4588 | ;; o The first token after bob. |
| @@ -4867,7 +4956,8 @@ comment at the start of cc-engine.el for more info." | |||
| 4867 | (goto-char cfd-continue-pos) | 4956 | (goto-char cfd-continue-pos) |
| 4868 | (if (= cfd-continue-pos cfd-limit) | 4957 | (if (= cfd-continue-pos cfd-limit) |
| 4869 | (setq cfd-match-pos cfd-limit) | 4958 | (setq cfd-match-pos cfd-limit) |
| 4870 | (c-find-decl-prefix-search))))) | 4959 | (c-find-decl-prefix-search))))) ; Moves point, sets cfd-continue-pos, |
| 4960 | ; cfd-match-pos, etc. | ||
| 4871 | 4961 | ||
| 4872 | 4962 | ||
| 4873 | ;; A cache for found types. | 4963 | ;; A cache for found types. |
| @@ -7306,6 +7396,7 @@ comment at the start of cc-engine.el for more info." | |||
| 7306 | (let ((start (point)) | 7396 | (let ((start (point)) |
| 7307 | start-char | 7397 | start-char |
| 7308 | (c-promote-possible-types t) | 7398 | (c-promote-possible-types t) |
| 7399 | lim | ||
| 7309 | ;; Turn off recognition of angle bracket arglists while parsing | 7400 | ;; Turn off recognition of angle bracket arglists while parsing |
| 7310 | ;; types here since the protocol reference list might then be | 7401 | ;; types here since the protocol reference list might then be |
| 7311 | ;; considered part of the preceding name or superclass-name. | 7402 | ;; considered part of the preceding name or superclass-name. |
| @@ -7333,6 +7424,7 @@ comment at the start of cc-engine.el for more info." | |||
| 7333 | ; (c-forward-token-2) ; 2006/1/13 This doesn't move if the token's | 7424 | ; (c-forward-token-2) ; 2006/1/13 This doesn't move if the token's |
| 7334 | ; at EOB. | 7425 | ; at EOB. |
| 7335 | (goto-char (match-end 0)) | 7426 | (goto-char (match-end 0)) |
| 7427 | (setq lim (point)) | ||
| 7336 | (c-skip-ws-forward) | 7428 | (c-skip-ws-forward) |
| 7337 | (c-forward-type)) | 7429 | (c-forward-type)) |
| 7338 | 7430 | ||
| @@ -7357,7 +7449,7 @@ comment at the start of cc-engine.el for more info." | |||
| 7357 | t)))) | 7449 | t)))) |
| 7358 | 7450 | ||
| 7359 | (progn | 7451 | (progn |
| 7360 | (c-backward-syntactic-ws) | 7452 | (c-backward-syntactic-ws lim) |
| 7361 | (c-clear-c-type-property start (1- (point)) 'c-decl-end) | 7453 | (c-clear-c-type-property start (1- (point)) 'c-decl-end) |
| 7362 | (c-put-c-type-property (1- (point)) 'c-decl-end) | 7454 | (c-put-c-type-property (1- (point)) 'c-decl-end) |
| 7363 | t) | 7455 | t) |
| @@ -7500,14 +7592,17 @@ comment at the start of cc-engine.el for more info." | |||
| 7500 | (save-restriction | 7592 | (save-restriction |
| 7501 | ;; If we're in a macro, our search range is restricted to it. Narrow to | 7593 | ;; If we're in a macro, our search range is restricted to it. Narrow to |
| 7502 | ;; the searchable range. | 7594 | ;; the searchable range. |
| 7503 | (let* ((macro-start (c-query-macro-start)) | 7595 | (let* ((macro-start (save-excursion (and (c-beginning-of-macro) (point)))) |
| 7504 | (lim (max (or lim (point-min)) (or macro-start (point-min)))) | 7596 | (macro-end (save-excursion (and macro-start (c-end-of-macro) (point)))) |
| 7597 | (low-lim (max (or lim (point-min)) (or macro-start (point-min)))) | ||
| 7505 | before-lparen after-rparen | 7598 | before-lparen after-rparen |
| 7506 | (pp-count-out 20)) ; Max number of paren/brace constructs before we give up | 7599 | (pp-count-out 20)) ; Max number of paren/brace constructs before |
| 7507 | (narrow-to-region lim (c-point 'eol)) | 7600 | ; we give up |
| 7601 | (narrow-to-region low-lim (or macro-end (point-max))) | ||
| 7508 | 7602 | ||
| 7509 | ;; Search backwards for the defun's argument list. We give up if we | 7603 | ;; Search backwards for the defun's argument list. We give up if we |
| 7510 | ;; encounter a "}" (end of a previous defun) or BOB. | 7604 | ;; encounter a "}" (end of a previous defun) an "=" (which can't be in |
| 7605 | ;; a knr region) or BOB. | ||
| 7511 | ;; | 7606 | ;; |
| 7512 | ;; The criterion for a paren structure being the arg list is: | 7607 | ;; The criterion for a paren structure being the arg list is: |
| 7513 | ;; o - there is non-WS stuff after it but before any "{"; AND | 7608 | ;; o - there is non-WS stuff after it but before any "{"; AND |
| @@ -7527,12 +7622,13 @@ comment at the start of cc-engine.el for more info." | |||
| 7527 | (catch 'knr | 7622 | (catch 'knr |
| 7528 | (while (> pp-count-out 0) ; go back one paren/bracket pair each time. | 7623 | (while (> pp-count-out 0) ; go back one paren/bracket pair each time. |
| 7529 | (setq pp-count-out (1- pp-count-out)) | 7624 | (setq pp-count-out (1- pp-count-out)) |
| 7530 | (c-syntactic-skip-backward "^)]}") | 7625 | (c-syntactic-skip-backward "^)]}=") |
| 7531 | (cond ((eq (char-before) ?\)) | 7626 | (cond ((eq (char-before) ?\)) |
| 7532 | (setq after-rparen (point))) | 7627 | (setq after-rparen (point))) |
| 7533 | ((eq (char-before) ?\]) | 7628 | ((eq (char-before) ?\]) |
| 7534 | (setq after-rparen nil)) | 7629 | (setq after-rparen nil)) |
| 7535 | (t ; either } (hit previous defun) or no more parens/brackets | 7630 | (t ; either } (hit previous defun) or = or no more |
| 7631 | ; parens/brackets. | ||
| 7536 | (throw 'knr nil))) | 7632 | (throw 'knr nil))) |
| 7537 | 7633 | ||
| 7538 | (if after-rparen | 7634 | (if after-rparen |
| @@ -7548,18 +7644,18 @@ comment at the start of cc-engine.el for more info." | |||
| 7548 | ;; It can't be the arg list if next token is ; or { | 7644 | ;; It can't be the arg list if next token is ; or { |
| 7549 | (progn (goto-char after-rparen) | 7645 | (progn (goto-char after-rparen) |
| 7550 | (c-forward-syntactic-ws) | 7646 | (c-forward-syntactic-ws) |
| 7551 | (not (memq (char-after) '(?\; ?\{)))) | 7647 | (not (memq (char-after) '(?\; ?\{ ?\=)))) |
| 7552 | 7648 | ||
| 7553 | ;; Is the thing preceding the list an identifier (the | 7649 | ;; Is the thing preceding the list an identifier (the |
| 7554 | ;; function name), or a macro expansion? | 7650 | ;; function name), or a macro expansion? |
| 7555 | (progn | 7651 | (progn |
| 7556 | (goto-char before-lparen) | 7652 | (goto-char before-lparen) |
| 7557 | (eq (c-backward-token-2) 0) | 7653 | (eq (c-backward-token-2) 0) |
| 7558 | (or (c-on-identifier) | 7654 | (or (eq (c-on-identifier) (point)) |
| 7559 | (and (eq (char-after) ?\)) | 7655 | (and (eq (char-after) ?\)) |
| 7560 | (c-go-up-list-backward) | 7656 | (c-go-up-list-backward) |
| 7561 | (eq (c-backward-token-2) 0) | 7657 | (eq (c-backward-token-2) 0) |
| 7562 | (c-on-identifier)))) | 7658 | (eq (c-on-identifier) (point))))) |
| 7563 | 7659 | ||
| 7564 | ;; Have we got a non-empty list of comma-separated | 7660 | ;; Have we got a non-empty list of comma-separated |
| 7565 | ;; identifiers? | 7661 | ;; identifiers? |
| @@ -8047,6 +8143,23 @@ comment at the start of cc-engine.el for more info." | |||
| 8047 | next-open-brace (c-pull-open-brace paren-state))) | 8143 | next-open-brace (c-pull-open-brace paren-state))) |
| 8048 | open-brace)) | 8144 | open-brace)) |
| 8049 | 8145 | ||
| 8146 | (defun c-cheap-inside-bracelist-p (paren-state) | ||
| 8147 | ;; Return the position of the L-brace if point is inside a brace list | ||
| 8148 | ;; initialization of an array, etc. This is an approximate function, | ||
| 8149 | ;; designed for speed over accuracy. It will not find every bracelist, but | ||
| 8150 | ;; a non-nil result is reliable. We simply search for "= {" (naturally with | ||
| 8151 | ;; syntactic whitespace allowed). PAREN-STATE is the normal thing that it | ||
| 8152 | ;; is everywhere else. | ||
| 8153 | (let (b-pos) | ||
| 8154 | (save-excursion | ||
| 8155 | (while | ||
| 8156 | (and (setq b-pos (c-pull-open-brace paren-state)) | ||
| 8157 | (progn (goto-char b-pos) | ||
| 8158 | (c-backward-sws) | ||
| 8159 | (c-backward-token-2) | ||
| 8160 | (not (looking-at "="))))) | ||
| 8161 | b-pos))) | ||
| 8162 | |||
| 8050 | (defun c-inside-bracelist-p (containing-sexp paren-state) | 8163 | (defun c-inside-bracelist-p (containing-sexp paren-state) |
| 8051 | ;; return the buffer position of the beginning of the brace list | 8164 | ;; return the buffer position of the beginning of the brace list |
| 8052 | ;; statement if we're inside a brace list, otherwise return nil. | 8165 | ;; statement if we're inside a brace list, otherwise return nil. |
| @@ -9340,7 +9453,7 @@ comment at the start of cc-engine.el for more info." | |||
| 9340 | 9453 | ||
| 9341 | ;; CASE 5B.1: Member init list. | 9454 | ;; CASE 5B.1: Member init list. |
| 9342 | ((eq (char-after tmp-pos) ?:) | 9455 | ((eq (char-after tmp-pos) ?:) |
| 9343 | (if (or (> tmp-pos indent-point) | 9456 | (if (or (>= tmp-pos indent-point) |
| 9344 | (= (c-point 'bosws) (1+ tmp-pos))) | 9457 | (= (c-point 'bosws) (1+ tmp-pos))) |
| 9345 | (progn | 9458 | (progn |
| 9346 | ;; There is no preceding member init clause. | 9459 | ;; There is no preceding member init clause. |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index e7d00815708..2d116e1ecdc 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -446,10 +446,12 @@ | |||
| 446 | ;; `parse-sexp-lookup-properties' (when it exists). | 446 | ;; `parse-sexp-lookup-properties' (when it exists). |
| 447 | (parse-sexp-lookup-properties | 447 | (parse-sexp-lookup-properties |
| 448 | (cc-eval-when-compile | 448 | (cc-eval-when-compile |
| 449 | (boundp 'parse-sexp-lookup-properties)))) | 449 | (boundp 'parse-sexp-lookup-properties))) |
| 450 | (BOD-limit | ||
| 451 | (c-determine-limit 1000))) | ||
| 450 | (goto-char | 452 | (goto-char |
| 451 | (let ((here (point))) | 453 | (let ((here (point))) |
| 452 | (if (eq (car (c-beginning-of-decl-1)) 'same) | 454 | (if (eq (car (c-beginning-of-decl-1 BOD-limit)) 'same) |
| 453 | (point) | 455 | (point) |
| 454 | here))) | 456 | here))) |
| 455 | ,(c-make-font-lock-search-form regexp highlights)) | 457 | ,(c-make-font-lock-search-form regexp highlights)) |
| @@ -1240,6 +1242,7 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1240 | ;; it finds any. That's necessary so that we later will | 1242 | ;; it finds any. That's necessary so that we later will |
| 1241 | ;; stop inside them to fontify types there. | 1243 | ;; stop inside them to fontify types there. |
| 1242 | (c-parse-and-markup-<>-arglists t) | 1244 | (c-parse-and-markup-<>-arglists t) |
| 1245 | lbrace ; position of some {. | ||
| 1243 | ;; The font-lock package in Emacs is known to clobber | 1246 | ;; The font-lock package in Emacs is known to clobber |
| 1244 | ;; `parse-sexp-lookup-properties' (when it exists). | 1247 | ;; `parse-sexp-lookup-properties' (when it exists). |
| 1245 | (parse-sexp-lookup-properties | 1248 | (parse-sexp-lookup-properties |
| @@ -1351,7 +1354,6 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1351 | (or (looking-at c-typedef-key) | 1354 | (or (looking-at c-typedef-key) |
| 1352 | (goto-char start-pos))) | 1355 | (goto-char start-pos))) |
| 1353 | 1356 | ||
| 1354 | ;; Now analyze the construct. | ||
| 1355 | ;; In QT, "more" is an irritating keyword that expands to nothing. | 1357 | ;; In QT, "more" is an irritating keyword that expands to nothing. |
| 1356 | ;; We skip over it to prevent recognition of "more slots: <symbol>" | 1358 | ;; We skip over it to prevent recognition of "more slots: <symbol>" |
| 1357 | ;; as a bitfield declaration. | 1359 | ;; as a bitfield declaration. |
| @@ -1360,6 +1362,8 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1360 | (concat "\\(more\\)\\([^" c-symbol-chars "]\\|$\\)"))) | 1362 | (concat "\\(more\\)\\([^" c-symbol-chars "]\\|$\\)"))) |
| 1361 | (goto-char (match-end 1)) | 1363 | (goto-char (match-end 1)) |
| 1362 | (c-forward-syntactic-ws)) | 1364 | (c-forward-syntactic-ws)) |
| 1365 | |||
| 1366 | ;; Now analyze the construct. | ||
| 1363 | (setq decl-or-cast (c-forward-decl-or-cast-1 | 1367 | (setq decl-or-cast (c-forward-decl-or-cast-1 |
| 1364 | match-pos context last-cast-end)) | 1368 | match-pos context last-cast-end)) |
| 1365 | 1369 | ||
| @@ -1428,6 +1432,39 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1428 | (c-fontify-recorded-types-and-refs) | 1432 | (c-fontify-recorded-types-and-refs) |
| 1429 | nil) | 1433 | nil) |
| 1430 | 1434 | ||
| 1435 | ;; Restore point, since at this point in the code it has been | ||
| 1436 | ;; left undefined by c-forward-decl-or-cast-1 above. | ||
| 1437 | ((progn (goto-char start-pos) nil)) | ||
| 1438 | |||
| 1439 | ;; If point is inside a bracelist, there's no point checking it | ||
| 1440 | ;; being at a declarator. | ||
| 1441 | ((let ((paren-state (c-parse-state))) | ||
| 1442 | (setq lbrace (c-cheap-inside-bracelist-p paren-state))) | ||
| 1443 | ;; Move past this bracelist to prevent an endless loop. | ||
| 1444 | (goto-char lbrace) | ||
| 1445 | (unless (c-safe (progn (forward-list) t)) | ||
| 1446 | (goto-char start-pos) | ||
| 1447 | (c-forward-token-2)) | ||
| 1448 | nil) | ||
| 1449 | |||
| 1450 | ;; If point is just after a ")" which is followed by an | ||
| 1451 | ;; identifier which isn't a label, or at the matching "(", we're | ||
| 1452 | ;; at either a macro invocation, a cast, or a | ||
| 1453 | ;; for/while/etc. statement. The cast case is handled above. | ||
| 1454 | ;; None of these cases can contain a declarator. | ||
| 1455 | ((or (and (eq (char-before match-pos) ?\)) | ||
| 1456 | (c-on-identifier) | ||
| 1457 | (save-excursion (not (c-forward-label)))) | ||
| 1458 | (and (eq (char-after) ?\() | ||
| 1459 | (save-excursion | ||
| 1460 | (and | ||
| 1461 | (progn (c-backward-token-2) (c-on-identifier)) | ||
| 1462 | (save-excursion (not (c-forward-label))) | ||
| 1463 | (progn (c-backward-token-2) | ||
| 1464 | (eq (char-after) ?\()))))) | ||
| 1465 | (c-forward-token-2) ; Must prevent looping. | ||
| 1466 | nil) | ||
| 1467 | |||
| 1431 | ((and (not c-enums-contain-decls) | 1468 | ((and (not c-enums-contain-decls) |
| 1432 | ;; An optimization quickly to eliminate scans of long enum | 1469 | ;; An optimization quickly to eliminate scans of long enum |
| 1433 | ;; declarations in the next cond arm. | 1470 | ;; declarations in the next cond arm. |
| @@ -1441,13 +1478,14 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1441 | (progn | 1478 | (progn |
| 1442 | (c-backward-token-2) | 1479 | (c-backward-token-2) |
| 1443 | (looking-at c-brace-list-key))))))) | 1480 | (looking-at c-brace-list-key))))))) |
| 1444 | t) | 1481 | (c-forward-token-2) |
| 1482 | nil) | ||
| 1445 | 1483 | ||
| 1446 | (t | 1484 | (t |
| 1447 | ;; Are we at a declarator? Try to go back to the declaration | 1485 | ;; Are we at a declarator? Try to go back to the declaration |
| 1448 | ;; to check this. If we get there, check whether a "typedef" | 1486 | ;; to check this. If we get there, check whether a "typedef" |
| 1449 | ;; is there, then fontify the declarators accordingly. | 1487 | ;; is there, then fontify the declarators accordingly. |
| 1450 | (let ((decl-search-lim (max (- (point) 50000) (point-min))) | 1488 | (let ((decl-search-lim (c-determine-limit 1000)) |
| 1451 | paren-state bod-res encl-pos is-typedef | 1489 | paren-state bod-res encl-pos is-typedef |
| 1452 | c-recognize-knr-p) ; Strictly speaking, bogus, but it | 1490 | c-recognize-knr-p) ; Strictly speaking, bogus, but it |
| 1453 | ; speeds up lisp.h tremendously. | 1491 | ; speeds up lisp.h tremendously. |
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el index fcd6a443b67..4dd802ead0b 100644 --- a/lisp/progmodes/cc-guess.el +++ b/lisp/progmodes/cc-guess.el | |||
| @@ -85,6 +85,7 @@ Discard an examined offset if its absolute value is greater than this. | |||
| 85 | 85 | ||
| 86 | The offset of a line included in the indent information returned by | 86 | The offset of a line included in the indent information returned by |
| 87 | `c-guess-basic-syntax'." | 87 | `c-guess-basic-syntax'." |
| 88 | :version "24.1" | ||
| 88 | :type 'integer | 89 | :type 'integer |
| 89 | :group 'c) | 90 | :group 'c) |
| 90 | 91 | ||
| @@ -92,6 +93,7 @@ The offset of a line included in the indent information returned by | |||
| 92 | "The maximum region size for examining indent information with `c-guess'. | 93 | "The maximum region size for examining indent information with `c-guess'. |
| 93 | It takes a long time to examine indent information from a large region; | 94 | It takes a long time to examine indent information from a large region; |
| 94 | this option helps you limit that time. `nil' means no limit." | 95 | this option helps you limit that time. `nil' means no limit." |
| 96 | :version "24.1" | ||
| 95 | :type 'integer | 97 | :type 'integer |
| 96 | :group 'c) | 98 | :group 'c) |
| 97 | 99 | ||
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index b74d878516d..374c9b434d1 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -490,6 +490,7 @@ that requires a literal mode spec at compile time." | |||
| 490 | (make-local-variable 'paragraph-ignore-fill-prefix) | 490 | (make-local-variable 'paragraph-ignore-fill-prefix) |
| 491 | (make-local-variable 'adaptive-fill-mode) | 491 | (make-local-variable 'adaptive-fill-mode) |
| 492 | (make-local-variable 'adaptive-fill-regexp) | 492 | (make-local-variable 'adaptive-fill-regexp) |
| 493 | (make-local-variable 'fill-paragraph-handle-comment) | ||
| 493 | 494 | ||
| 494 | ;; now set their values | 495 | ;; now set their values |
| 495 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | 496 | (set (make-local-variable 'parse-sexp-ignore-comments) t) |
| @@ -500,6 +501,9 @@ that requires a literal mode spec at compile time." | |||
| 500 | (set (make-local-variable 'comment-line-break-function) | 501 | (set (make-local-variable 'comment-line-break-function) |
| 501 | 'c-indent-new-comment-line) | 502 | 'c-indent-new-comment-line) |
| 502 | 503 | ||
| 504 | ;; For the benefit of adaptive file, which otherwise mis-fills. | ||
| 505 | (setq fill-paragraph-handle-comment nil) | ||
| 506 | |||
| 503 | ;; Install `c-fill-paragraph' on `fill-paragraph-function' so that a | 507 | ;; Install `c-fill-paragraph' on `fill-paragraph-function' so that a |
| 504 | ;; direct call to `fill-paragraph' behaves better. This still | 508 | ;; direct call to `fill-paragraph' behaves better. This still |
| 505 | ;; doesn't work with filladapt but it's better than nothing. | 509 | ;; doesn't work with filladapt but it's better than nothing. |
| @@ -1151,7 +1155,8 @@ Note that the style variables are always made local to the buffer." | |||
| 1151 | ;; `c-set-fl-decl-start' for the detailed functionality. | 1155 | ;; `c-set-fl-decl-start' for the detailed functionality. |
| 1152 | (cons (c-set-fl-decl-start beg) end)) | 1156 | (cons (c-set-fl-decl-start beg) end)) |
| 1153 | 1157 | ||
| 1154 | (defvar c-standard-font-lock-fontify-region-function nil | 1158 | (defvar c-standard-font-lock-fontify-region-function |
| 1159 | (default-value 'font-lock-fontify-region-function) | ||
| 1155 | "Standard value of `font-lock-fontify-region-function'") | 1160 | "Standard value of `font-lock-fontify-region-function'") |
| 1156 | 1161 | ||
| 1157 | (defun c-font-lock-fontify-region (beg end &optional verbose) | 1162 | (defun c-font-lock-fontify-region (beg end &optional verbose) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f152209956f..c1d8f9db23f 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -74,11 +74,14 @@ If Emacs lacks asynchronous process support, this hook is run | |||
| 74 | after `call-process' inserts the grep output into the buffer.") | 74 | after `call-process' inserts the grep output into the buffer.") |
| 75 | 75 | ||
| 76 | (defvar compilation-filter-start nil | 76 | (defvar compilation-filter-start nil |
| 77 | "Start of the text inserted by `compilation-filter'. | 77 | "Position of the start of the text inserted by `compilation-filter'. |
| 78 | This is bound to a buffer position before running `compilation-filter-hook'.") | 78 | This is bound before running `compilation-filter-hook'.") |
| 79 | 79 | ||
| 80 | (defvar compilation-first-column 1 | 80 | (defvar compilation-first-column 1 |
| 81 | "*This is how compilers number the first column, usually 1 or 0.") | 81 | "*This is how compilers number the first column, usually 1 or 0. |
| 82 | If this is buffer-local in the destination buffer, Emacs obeys | ||
| 83 | that value, otherwise it uses the value in the *compilation* | ||
| 84 | buffer. This enables a major-mode to specify its own value.") | ||
| 82 | 85 | ||
| 83 | (defvar compilation-parse-errors-filename-function nil | 86 | (defvar compilation-parse-errors-filename-function nil |
| 84 | "Function to call to post-process filenames while parsing error messages. | 87 | "Function to call to post-process filenames while parsing error messages. |
| @@ -547,7 +550,10 @@ Otherwise they are interpreted as character positions, with | |||
| 547 | each character occupying one column. | 550 | each character occupying one column. |
| 548 | The default is to use screen columns, which requires that the compilation | 551 | The default is to use screen columns, which requires that the compilation |
| 549 | program and Emacs agree about the display width of the characters, | 552 | program and Emacs agree about the display width of the characters, |
| 550 | especially the TAB character." | 553 | especially the TAB character. |
| 554 | If this is buffer-local in the destination buffer, Emacs obeys | ||
| 555 | that value, otherwise it uses the value in the *compilation* | ||
| 556 | buffer. This enables a major-mode to specify its own value." | ||
| 551 | :type 'boolean | 557 | :type 'boolean |
| 552 | :group 'compilation | 558 | :group 'compilation |
| 553 | :version "20.4") | 559 | :version "20.4") |
| @@ -1058,6 +1064,7 @@ FMTS is a list of format specs for transforming the file name. | |||
| 1058 | (marker | 1064 | (marker |
| 1059 | (if marker-line (compilation--loc->marker (cadr marker-line)))) | 1065 | (if marker-line (compilation--loc->marker (cadr marker-line)))) |
| 1060 | (screen-columns compilation-error-screen-columns) | 1066 | (screen-columns compilation-error-screen-columns) |
| 1067 | (first-column compilation-first-column) | ||
| 1061 | end-marker loc end-loc) | 1068 | end-marker loc end-loc) |
| 1062 | (if (not (and marker (marker-buffer marker))) | 1069 | (if (not (and marker (marker-buffer marker))) |
| 1063 | (setq marker nil) ; no valid marker for this file | 1070 | (setq marker nil) ; no valid marker for this file |
| @@ -1078,7 +1085,10 @@ FMTS is a list of format specs for transforming the file name. | |||
| 1078 | ;; Obey the compilation-error-screen-columns of the target | 1085 | ;; Obey the compilation-error-screen-columns of the target |
| 1079 | ;; buffer if its major mode set it buffer-locally. | 1086 | ;; buffer if its major mode set it buffer-locally. |
| 1080 | (if (local-variable-p 'compilation-error-screen-columns) | 1087 | (if (local-variable-p 'compilation-error-screen-columns) |
| 1081 | compilation-error-screen-columns screen-columns))) | 1088 | compilation-error-screen-columns screen-columns)) |
| 1089 | (compilation-first-column | ||
| 1090 | (if (local-variable-p 'compilation-first-column) | ||
| 1091 | compilation-first-column first-column))) | ||
| 1082 | (save-excursion | 1092 | (save-excursion |
| 1083 | (save-restriction | 1093 | (save-restriction |
| 1084 | (widen) | 1094 | (widen) |
| @@ -2271,6 +2281,7 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 2271 | (when reset | 2281 | (when reset |
| 2272 | (setq compilation-current-error nil)) | 2282 | (setq compilation-current-error nil)) |
| 2273 | (let* ((screen-columns compilation-error-screen-columns) | 2283 | (let* ((screen-columns compilation-error-screen-columns) |
| 2284 | (first-column compilation-first-column) | ||
| 2274 | (last 1) | 2285 | (last 1) |
| 2275 | (msg (compilation-next-error (or n 1) nil | 2286 | (msg (compilation-next-error (or n 1) nil |
| 2276 | (or compilation-current-error | 2287 | (or compilation-current-error |
| @@ -2309,7 +2320,10 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 2309 | ;; Obey the compilation-error-screen-columns of the target | 2320 | ;; Obey the compilation-error-screen-columns of the target |
| 2310 | ;; buffer if its major mode set it buffer-locally. | 2321 | ;; buffer if its major mode set it buffer-locally. |
| 2311 | (if (local-variable-p 'compilation-error-screen-columns) | 2322 | (if (local-variable-p 'compilation-error-screen-columns) |
| 2312 | compilation-error-screen-columns screen-columns))) | 2323 | compilation-error-screen-columns screen-columns)) |
| 2324 | (compilation-first-column | ||
| 2325 | (if (local-variable-p 'compilation-first-column) | ||
| 2326 | compilation-first-column first-column))) | ||
| 2313 | (save-restriction | 2327 | (save-restriction |
| 2314 | (widen) | 2328 | (widen) |
| 2315 | (goto-char (point-min)) | 2329 | (goto-char (point-min)) |
diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el index 90147700d77..74ca5a6d76f 100644 --- a/lisp/progmodes/cwarn.el +++ b/lisp/progmodes/cwarn.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cwarn.el --- highlight suspicious C and C++ constructions | 1 | ;;; cwarn.el --- highlight suspicious C and C++ constructions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Anders Lindgren <andersl@andersl.com> | 5 | ;; Author: Anders Lindgren <andersl@andersl.com> |
| 6 | ;; Keywords: c, languages, faces | 6 | ;; Keywords: c, languages, faces |
| @@ -117,7 +117,6 @@ | |||
| 117 | (defgroup cwarn nil | 117 | (defgroup cwarn nil |
| 118 | "Highlight suspicious C and C++ constructions." | 118 | "Highlight suspicious C and C++ constructions." |
| 119 | :version "21.1" | 119 | :version "21.1" |
| 120 | :link '(url-link "http://www.andersl.com/emacs") | ||
| 121 | :group 'faces) | 120 | :group 'faces) |
| 122 | 121 | ||
| 123 | (defvar cwarn-mode nil | 122 | (defvar cwarn-mode nil |
| @@ -129,7 +128,7 @@ instead.") | |||
| 129 | (defcustom cwarn-configuration | 128 | (defcustom cwarn-configuration |
| 130 | '((c-mode (not reference)) | 129 | '((c-mode (not reference)) |
| 131 | (c++-mode t)) | 130 | (c++-mode t)) |
| 132 | "*List of items each describing which features are enable for a mode. | 131 | "List of items each describing which features are enable for a mode. |
| 133 | Each item is on the form (mode featurelist), where featurelist can be | 132 | Each item is on the form (mode featurelist), where featurelist can be |
| 134 | on one of three forms: | 133 | on one of three forms: |
| 135 | 134 | ||
| @@ -158,7 +157,7 @@ keyword list." | |||
| 158 | :group 'cwarn) | 157 | :group 'cwarn) |
| 159 | 158 | ||
| 160 | (defcustom cwarn-verbose t | 159 | (defcustom cwarn-verbose t |
| 161 | "*When nil, CWarn mode will not generate any messages. | 160 | "When nil, CWarn mode will not generate any messages. |
| 162 | 161 | ||
| 163 | Currently, messages are generated when the mode is activated and | 162 | Currently, messages are generated when the mode is activated and |
| 164 | deactivated." | 163 | deactivated." |
| @@ -166,7 +165,7 @@ deactivated." | |||
| 166 | :type 'boolean) | 165 | :type 'boolean) |
| 167 | 166 | ||
| 168 | (defcustom cwarn-mode-text " CWarn" | 167 | (defcustom cwarn-mode-text " CWarn" |
| 169 | "*String to display in the mode line when CWarn mode is active. | 168 | "String to display in the mode line when CWarn mode is active. |
| 170 | 169 | ||
| 171 | \(When the string is not empty, make sure that it has a leading space.)" | 170 | \(When the string is not empty, make sure that it has a leading space.)" |
| 172 | :tag "CWarn mode text" ; To separate it from `global-...' | 171 | :tag "CWarn mode text" ; To separate it from `global-...' |
| @@ -174,7 +173,7 @@ deactivated." | |||
| 174 | :type 'string) | 173 | :type 'string) |
| 175 | 174 | ||
| 176 | (defcustom cwarn-load-hook nil | 175 | (defcustom cwarn-load-hook nil |
| 177 | "*Functions to run when CWarn mode is first loaded." | 176 | "Functions to run when CWarn mode is first loaded." |
| 178 | :tag "Load Hook" | 177 | :tag "Load Hook" |
| 179 | :group 'cwarn | 178 | :group 'cwarn |
| 180 | :type 'hook) | 179 | :type 'hook) |
| @@ -192,7 +191,9 @@ Note, in addition to enabling this minor mode, the major mode must | |||
| 192 | be included in the variable `cwarn-configuration'. By default C and | 191 | be included in the variable `cwarn-configuration'. By default C and |
| 193 | C++ modes are included. | 192 | C++ modes are included. |
| 194 | 193 | ||
| 195 | With ARG, turn CWarn mode on if and only if arg is positive." | 194 | With a prefix argument ARG, enable the mode if ARG is positive, |
| 195 | and disable it otherwise. If called from Lisp, enable the mode | ||
| 196 | if ARG is omitted or nil." | ||
| 196 | :group 'cwarn :lighter cwarn-mode-text | 197 | :group 'cwarn :lighter cwarn-mode-text |
| 197 | (cwarn-font-lock-keywords cwarn-mode) | 198 | (cwarn-font-lock-keywords cwarn-mode) |
| 198 | (if font-lock-mode (font-lock-fontify-buffer))) | 199 | (if font-lock-mode (font-lock-fontify-buffer))) |
| @@ -204,6 +205,7 @@ With ARG, turn CWarn mode on if and only if arg is positive." | |||
| 204 | This function is designed to be added to hooks, for example: | 205 | This function is designed to be added to hooks, for example: |
| 205 | (add-hook 'c-mode-hook 'turn-on-cwarn-mode)" | 206 | (add-hook 'c-mode-hook 'turn-on-cwarn-mode)" |
| 206 | (cwarn-mode 1)) | 207 | (cwarn-mode 1)) |
| 208 | (make-obsolete 'turn-on-cwarn-mode 'cwarn-mode "24.1") | ||
| 207 | 209 | ||
| 208 | ;;}}} | 210 | ;;}}} |
| 209 | ;;{{{ Help functions | 211 | ;;{{{ Help functions |
| @@ -247,29 +249,6 @@ If ADDP is non-nil, install else remove." | |||
| 247 | nil keywords))))) | 249 | nil keywords))))) |
| 248 | 250 | ||
| 249 | ;;}}} | 251 | ;;}}} |
| 250 | ;;{{{ Backward compatibility | ||
| 251 | |||
| 252 | ;; This piece of code will be part of CC mode as of Emacs 20.4. | ||
| 253 | (if (not (fboundp 'c-at-toplevel-p)) | ||
| 254 | (defun c-at-toplevel-p () | ||
| 255 | "Return a determination as to whether point is at the `top-level'. | ||
| 256 | Being at the top-level means that point is either outside any | ||
| 257 | enclosing block (such function definition), or inside a class | ||
| 258 | definition, but outside any method blocks. | ||
| 259 | |||
| 260 | If point is not at the top-level (e.g. it is inside a method | ||
| 261 | definition), then nil is returned. Otherwise, if point is at a | ||
| 262 | top-level not enclosed within a class definition, t is returned. | ||
| 263 | Otherwise, a 2-vector is returned where the zeroth element is the | ||
| 264 | buffer position of the start of the class declaration, and the first | ||
| 265 | element is the buffer position of the enclosing class' opening | ||
| 266 | brace." | ||
| 267 | (let ((state (c-parse-state))) | ||
| 268 | (or (not (c-most-enclosing-brace state)) | ||
| 269 | (c-search-uplist-for-classkey state)))) | ||
| 270 | ) | ||
| 271 | |||
| 272 | ;;}}} | ||
| 273 | ;;{{{ Font-lock keywords and match functions | 252 | ;;{{{ Font-lock keywords and match functions |
| 274 | 253 | ||
| 275 | ;; This section contains font-lock keywords. A font lock keyword can | 254 | ;; This section contains font-lock keywords. A font lock keyword can |
| @@ -368,7 +347,7 @@ The semicolon after a `do { ... } while (x);' construction is not matched." | |||
| 368 | "Turn on CWarn mode in the current buffer if applicable. | 347 | "Turn on CWarn mode in the current buffer if applicable. |
| 369 | The mode is turned if some feature is enabled for the current | 348 | The mode is turned if some feature is enabled for the current |
| 370 | `major-mode' in `cwarn-configuration'." | 349 | `major-mode' in `cwarn-configuration'." |
| 371 | (if (cwarn-is-enabled major-mode) (turn-on-cwarn-mode))) | 350 | (when (cwarn-is-enabled major-mode) (cwarn-mode 1))) |
| 372 | 351 | ||
| 373 | ;;;###autoload | 352 | ;;;###autoload |
| 374 | (define-globalized-minor-mode global-cwarn-mode | 353 | (define-globalized-minor-mode global-cwarn-mode |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 25f8107340a..df6fdfd7cd9 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; f90.el --- Fortran-90 mode (free format) | 1 | ;;; f90.el --- Fortran-90 mode (free format) -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995-1997, 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995-1997, 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -2319,7 +2319,6 @@ escape character." | |||
| 2319 | 2319 | ||
| 2320 | ;; Local Variables: | 2320 | ;; Local Variables: |
| 2321 | ;; coding: utf-8 | 2321 | ;; coding: utf-8 |
| 2322 | ;; lexical-binding: t | ||
| 2323 | ;; End: | 2322 | ;; End: |
| 2324 | 2323 | ||
| 2325 | ;;; f90.el ends here | 2324 | ;;; f90.el ends here |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index fee45fcb3e8..07393c6954d 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; flymake.el -- a universal on-the-fly syntax checker | 1 | ;;; flymake.el -- a universal on-the-fly syntax checker |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> | 5 | ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> |
| 6 | ;; Maintainer: Pavel Kobyakov <pk_at_work@yahoo.com> | 6 | ;; Maintainer: Pavel Kobyakov <pk_at_work@yahoo.com> |
| @@ -1331,9 +1331,10 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1331 | 1331 | ||
| 1332 | ;;;###autoload | 1332 | ;;;###autoload |
| 1333 | (define-minor-mode flymake-mode | 1333 | (define-minor-mode flymake-mode |
| 1334 | "Minor mode to do on-the-fly syntax checking. | 1334 | "Toggle on-the-fly syntax checking. |
| 1335 | When called interactively, toggles the minor mode. | 1335 | With a prefix argument ARG, enable the mode if ARG is positive, |
| 1336 | With arg, turn Flymake mode on if and only if arg is positive." | 1336 | and disable it otherwise. If called from Lisp, enable the mode |
| 1337 | if ARG is omitted or nil." | ||
| 1337 | :group 'flymake :lighter flymake-mode-line | 1338 | :group 'flymake :lighter flymake-mode-line |
| 1338 | (cond | 1339 | (cond |
| 1339 | 1340 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index ff2a5f3f3e7..301714ec55f 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; gdb-mi.el --- User Interface for running GDB | 1 | ;;; gdb-mi.el --- User Interface for running GDB |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Nick Roberts <nickrob@gnu.org> | 5 | ;; Author: Nick Roberts <nickrob@gnu.org> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -26,7 +26,7 @@ | |||
| 26 | ;;; Credits: | 26 | ;;; Credits: |
| 27 | 27 | ||
| 28 | ;; This file was written by Nick Roberts following the general design | 28 | ;; This file was written by Nick Roberts following the general design |
| 29 | ;; used in gdb-ui.el for Emacs 22.1 - 23.1. It is currently being developed | 29 | ;; used in gdb-ui.el for Emacs 22.1 - 23.1. It was further developed |
| 30 | ;; by Dmitry Dzhus <dima@sphinx.net.ru> as part of the Google Summer | 30 | ;; by Dmitry Dzhus <dima@sphinx.net.ru> as part of the Google Summer |
| 31 | ;; of Code 2009 Project "Emacs GDB/MI migration". | 31 | ;; of Code 2009 Project "Emacs GDB/MI migration". |
| 32 | 32 | ||
| @@ -45,7 +45,7 @@ | |||
| 45 | 45 | ||
| 46 | ;; This file uses GDB/MI as the primary interface to GDB. It runs gdb with | 46 | ;; This file uses GDB/MI as the primary interface to GDB. It runs gdb with |
| 47 | ;; GDB/MI (-interp=mi) and access CLI using "-interpreter-exec console | 47 | ;; GDB/MI (-interp=mi) and access CLI using "-interpreter-exec console |
| 48 | ;; cli-command". This code works without gdb-ui.el and uses MI tokens instead | 48 | ;; cli-command". This code replaces gdb-ui.el and uses MI tokens instead |
| 49 | ;; of queues. Eventually MI should be asynchronous. | 49 | ;; of queues. Eventually MI should be asynchronous. |
| 50 | 50 | ||
| 51 | ;; Windows Platforms: | 51 | ;; Windows Platforms: |
| @@ -779,9 +779,9 @@ detailed description of this mode. | |||
| 779 | (gud-def gud-pp | 779 | (gud-def gud-pp |
| 780 | (gud-call | 780 | (gud-call |
| 781 | (concat | 781 | (concat |
| 782 | "pp1 " (if (eq (buffer-local-value | 782 | "pp " (if (eq (buffer-local-value |
| 783 | 'major-mode (window-buffer)) 'speedbar-mode) | 783 | 'major-mode (window-buffer)) 'speedbar-mode) |
| 784 | (gdb-find-watch-expression) "%e")) arg) | 784 | (gdb-find-watch-expression) "%e")) arg) |
| 785 | nil "Print the Emacs s-expression.") | 785 | nil "Print the Emacs s-expression.") |
| 786 | 786 | ||
| 787 | (define-key gud-minor-mode-map [left-margin mouse-1] | 787 | (define-key gud-minor-mode-map [left-margin mouse-1] |
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index fb0489f185c..b49739a94d5 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; glasses.el --- make cantReadThis readable | 1 | ;;; glasses.el --- make cantReadThis readable |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Milan Zamazal <pdm@zamazal.org> | 5 | ;; Author: Milan Zamazal <pdm@zamazal.org> |
| 6 | ;; Maintainer: Milan Zamazal <pdm@zamazal.org> | 6 | ;; Maintainer: Milan Zamazal <pdm@zamazal.org> |
| @@ -316,8 +316,10 @@ recognized according to the current value of the variable `glasses-separator'." | |||
| 316 | ;;;###autoload | 316 | ;;;###autoload |
| 317 | (define-minor-mode glasses-mode | 317 | (define-minor-mode glasses-mode |
| 318 | "Minor mode for making identifiers likeThis readable. | 318 | "Minor mode for making identifiers likeThis readable. |
| 319 | When this mode is active, it tries to add virtual separators (like underscores) | 319 | With a prefix argument ARG, enable the mode if ARG is positive, |
| 320 | at places they belong to." | 320 | and disable it otherwise. If called from Lisp, enable the mode |
| 321 | if ARG is omitted or nil. When this mode is active, it tries to | ||
| 322 | add virtual separators (like underscores) at places they belong to." | ||
| 321 | :group 'glasses :lighter " o^o" | 323 | :group 'glasses :lighter " o^o" |
| 322 | (save-excursion | 324 | (save-excursion |
| 323 | (save-restriction | 325 | (save-restriction |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 697af76acc9..54d678323f6 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -374,6 +374,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 374 | ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) | 374 | ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) |
| 375 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") | 375 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") |
| 376 | 376 | ||
| 377 | (defvar grep-first-column 0 ; bug#10594 | ||
| 378 | "Value to use for `compilation-first-column' in grep buffers.") | ||
| 379 | |||
| 377 | (defvar grep-error "grep hit" | 380 | (defvar grep-error "grep hit" |
| 378 | "Message to print when no matches are found.") | 381 | "Message to print when no matches are found.") |
| 379 | 382 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 5fabe5086db..121a023cd54 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -749,7 +749,7 @@ directory and source-file directory for your debugger." | |||
| 749 | "Evaluate C dereferenced pointer expression at point.") | 749 | "Evaluate C dereferenced pointer expression at point.") |
| 750 | 750 | ||
| 751 | ;; For debugging Emacs only. | 751 | ;; For debugging Emacs only. |
| 752 | (gud-def gud-pv "pv1 %e" "\C-v" "Print the value of the lisp variable.") | 752 | (gud-def gud-pv "pv %e" "\C-v" "Print the value of the lisp variable.") |
| 753 | 753 | ||
| 754 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") | 754 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") |
| 755 | (gud-def gud-run "run" nil "Run the program.") | 755 | (gud-def gud-run "run" nil "Run the program.") |
| @@ -1646,8 +1646,8 @@ and source-file directory for your debugger." | |||
| 1646 | (gud-common-init command-line nil 'gud-pdb-marker-filter) | 1646 | (gud-common-init command-line nil 'gud-pdb-marker-filter) |
| 1647 | (set (make-local-variable 'gud-minor-mode) 'pdb) | 1647 | (set (make-local-variable 'gud-minor-mode) 'pdb) |
| 1648 | 1648 | ||
| 1649 | (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") | 1649 | (gud-def gud-break "break %d%f:%l" "\C-b" "Set breakpoint at current line.") |
| 1650 | (gud-def gud-remove "clear %f:%l" "\C-d" "Remove breakpoint at current line") | 1650 | (gud-def gud-remove "clear %d%f:%l" "\C-d" "Remove breakpoint at current line") |
| 1651 | (gud-def gud-step "step" "\C-s" "Step one source line with display.") | 1651 | (gud-def gud-step "step" "\C-s" "Step one source line with display.") |
| 1652 | (gud-def gud-next "next" "\C-n" "Step one line (skip functions).") | 1652 | (gud-def gud-next "next" "\C-n" "Step one line (skip functions).") |
| 1653 | (gud-def gud-cont "continue" "\C-r" "Continue with display.") | 1653 | (gud-def gud-cont "continue" "\C-r" "Continue with display.") |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 0884d28ad5a..104a8f96727 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; hideshow.el --- minor mode cmds to selectively display code/comment blocks | 1 | ;;; hideshow.el --- minor mode cmds to selectively display code/comment blocks |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Thien-Thi Nguyen <ttn@gnu.org> | 5 | ;; Author: Thien-Thi Nguyen <ttn@gnu.org> |
| 6 | ;; Dan Nicolaescu <dann@ics.uci.edu> | 6 | ;; Dan Nicolaescu <dann@ics.uci.edu> |
| @@ -928,6 +928,10 @@ This can be useful if you have huge RCS logs in those comments." | |||
| 928 | ;;;###autoload | 928 | ;;;###autoload |
| 929 | (define-minor-mode hs-minor-mode | 929 | (define-minor-mode hs-minor-mode |
| 930 | "Minor mode to selectively hide/show code and comment blocks. | 930 | "Minor mode to selectively hide/show code and comment blocks. |
| 931 | With a prefix argument ARG, enable the mode if ARG is positive, | ||
| 932 | and disable it otherwise. If called from Lisp, enable the mode | ||
| 933 | if ARG is omitted or nil. | ||
| 934 | |||
| 931 | When hideshow minor mode is on, the menu bar is augmented with hideshow | 935 | When hideshow minor mode is on, the menu bar is augmented with hideshow |
| 932 | commands and the hideshow commands are enabled. | 936 | commands and the hideshow commands are enabled. |
| 933 | The value '(hs . t) is added to `buffer-invisibility-spec'. | 937 | The value '(hs . t) is added to `buffer-invisibility-spec'. |
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index db15e3c6f27..95f1adec40e 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; pascal.el --- major mode for editing pascal source in Emacs -*- lexical-binding: t -*- | 1 | ;;; pascal.el --- major mode for editing pascal source in Emacs -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Espen Skoglund <esk@gnu.org> | 5 | ;; Author: Espen Skoglund <esk@gnu.org> |
| 6 | ;; Keywords: languages | 6 | ;; Keywords: languages |
| @@ -1394,8 +1394,12 @@ The default is a name found in the buffer around point." | |||
| 1394 | (define-obsolete-function-alias 'pascal-outline 'pascal-outline-mode "22.1") | 1394 | (define-obsolete-function-alias 'pascal-outline 'pascal-outline-mode "22.1") |
| 1395 | (define-minor-mode pascal-outline-mode | 1395 | (define-minor-mode pascal-outline-mode |
| 1396 | "Outline-line minor mode for Pascal mode. | 1396 | "Outline-line minor mode for Pascal mode. |
| 1397 | When in Pascal Outline mode, portions | 1397 | With a prefix argument ARG, enable the mode if ARG is positive, |
| 1398 | of the text being edited may be made invisible. \\<pascal-outline-map> | 1398 | and disable it otherwise. If called from Lisp, enable the mode |
| 1399 | if ARG is omitted or nil. | ||
| 1400 | |||
| 1401 | When enabled, portions of the text being edited may be made | ||
| 1402 | invisible. \\<pascal-outline-map> | ||
| 1399 | 1403 | ||
| 1400 | Pascal Outline mode provides some additional commands. | 1404 | Pascal Outline mode provides some additional commands. |
| 1401 | 1405 | ||
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0c29891cd92..15d98ce48af 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -67,6 +67,7 @@ | |||
| 67 | ;;; Code: | 67 | ;;; Code: |
| 68 | 68 | ||
| 69 | (require 'comint) | 69 | (require 'comint) |
| 70 | (require 'ansi-color) | ||
| 70 | 71 | ||
| 71 | (eval-when-compile | 72 | (eval-when-compile |
| 72 | (require 'compile) | 73 | (require 'compile) |
| @@ -1386,7 +1387,6 @@ For running multiple processes in multiple buffers, see `run-python' and | |||
| 1386 | 1387 | ||
| 1387 | \\{inferior-python-mode-map}" | 1388 | \\{inferior-python-mode-map}" |
| 1388 | :group 'python | 1389 | :group 'python |
| 1389 | (require 'ansi-color) ; for ipython | ||
| 1390 | (setq mode-line-process '(":%s")) | 1390 | (setq mode-line-process '(":%s")) |
| 1391 | (set (make-local-variable 'comint-input-filter) 'python-input-filter) | 1391 | (set (make-local-variable 'comint-input-filter) 'python-input-filter) |
| 1392 | (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter | 1392 | (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter |
| @@ -1530,7 +1530,6 @@ behavior, change `python-remove-cwd-from-path' to nil." | |||
| 1530 | (interactive (if current-prefix-arg | 1530 | (interactive (if current-prefix-arg |
| 1531 | (list (read-string "Run Python: " python-command) nil t) | 1531 | (list (read-string "Run Python: " python-command) nil t) |
| 1532 | (list python-command))) | 1532 | (list python-command))) |
| 1533 | (require 'ansi-color) ; for ipython | ||
| 1534 | (unless cmd (setq cmd python-command)) | 1533 | (unless cmd (setq cmd python-command)) |
| 1535 | (python-check-version cmd) | 1534 | (python-check-version cmd) |
| 1536 | (setq python-command cmd) | 1535 | (setq python-command cmd) |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 2e59d8f8517..f8f62d113e6 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -285,7 +285,7 @@ Customizing your password will store it in your ~/.emacs file." | |||
| 285 | :safe 'stringp) | 285 | :safe 'stringp) |
| 286 | 286 | ||
| 287 | (defcustom sql-port 0 | 287 | (defcustom sql-port 0 |
| 288 | "Default port." | 288 | "Default port for connecting to a MySQL or Postgres server." |
| 289 | :version "24.1" | 289 | :version "24.1" |
| 290 | :type 'number | 290 | :type 'number |
| 291 | :group 'SQL | 291 | :group 'SQL |
| @@ -613,30 +613,22 @@ settings.") | |||
| 613 | '(:font-lock :sqli-program :sqli-options :sqli-login :statement)) | 613 | '(:font-lock :sqli-program :sqli-options :sqli-login :statement)) |
| 614 | 614 | ||
| 615 | (defcustom sql-connection-alist nil | 615 | (defcustom sql-connection-alist nil |
| 616 | "An alist of connection parameters for interacting with a SQL | 616 | "An alist of connection parameters for interacting with a SQL product. |
| 617 | product. | ||
| 618 | |||
| 619 | Each element of the alist is as follows: | 617 | Each element of the alist is as follows: |
| 620 | 618 | ||
| 621 | \(CONNECTION \(SQL-VARIABLE VALUE) ...) | 619 | \(CONNECTION \(SQL-VARIABLE VALUE) ...) |
| 622 | 620 | ||
| 623 | Where CONNECTION is a symbol identifying the connection, SQL-VARIABLE | 621 | Where CONNECTION is a symbol identifying the connection, SQL-VARIABLE |
| 624 | is the symbol name of a SQL mode variable, and VALUE is the value to | 622 | is the symbol name of a SQL mode variable, and VALUE is the value to |
| 625 | be assigned to the variable. | 623 | be assigned to the variable. The most common SQL-VARIABLE settings |
| 626 | 624 | associated with a connection are: `sql-product', `sql-user', | |
| 627 | The most common SQL-VARIABLE settings associated with a connection | 625 | `sql-password', `sql-port', `sql-server', and `sql-database'. |
| 628 | are: | ||
| 629 | |||
| 630 | `sql-product' | ||
| 631 | `sql-user' | ||
| 632 | `sql-password' | ||
| 633 | `sql-port' | ||
| 634 | `sql-server' | ||
| 635 | `sql-database' | ||
| 636 | 626 | ||
| 637 | If a SQL-VARIABLE is part of the connection, it will not be | 627 | If a SQL-VARIABLE is part of the connection, it will not be |
| 638 | prompted for during login." | 628 | prompted for during login. The command `sql-connect' starts a |
| 639 | 629 | predefined SQLi session using the parameters from this list. | |
| 630 | Connections defined here appear in the submenu SQL->Start... for | ||
| 631 | making new SQLi sessions." | ||
| 640 | :type `(alist :key-type (string :tag "Connection") | 632 | :type `(alist :key-type (string :tag "Connection") |
| 641 | :value-type | 633 | :value-type |
| 642 | (set | 634 | (set |
| @@ -3647,7 +3639,9 @@ The list is maintained in SQL interactive buffers.") | |||
| 3647 | (read-from-minibuffer prompt tname)))) | 3639 | (read-from-minibuffer prompt tname)))) |
| 3648 | 3640 | ||
| 3649 | (defun sql-list-all (&optional enhanced) | 3641 | (defun sql-list-all (&optional enhanced) |
| 3650 | "List all database objects." | 3642 | "List all database objects. |
| 3643 | With optional prefix argument ENHANCED, displays additional | ||
| 3644 | details or extends the listing to include other schemas objects." | ||
| 3651 | (interactive "P") | 3645 | (interactive "P") |
| 3652 | (let ((sqlbuf (sql-find-sqli-buffer))) | 3646 | (let ((sqlbuf (sql-find-sqli-buffer))) |
| 3653 | (unless sqlbuf | 3647 | (unless sqlbuf |
| @@ -3659,7 +3653,9 @@ The list is maintained in SQL interactive buffers.") | |||
| 3659 | (set (make-local-variable 'sql-buffer) sqlbuf)))) | 3653 | (set (make-local-variable 'sql-buffer) sqlbuf)))) |
| 3660 | 3654 | ||
| 3661 | (defun sql-list-table (name &optional enhanced) | 3655 | (defun sql-list-table (name &optional enhanced) |
| 3662 | "List the details of a database table. " | 3656 | "List the details of a database table named NAME. |
| 3657 | Displays the columns in the relation. With optional prefix argument | ||
| 3658 | ENHANCED, displays additional details about each column." | ||
| 3663 | (interactive | 3659 | (interactive |
| 3664 | (list (sql-read-table-name "Table name: ") | 3660 | (list (sql-read-table-name "Table name: ") |
| 3665 | current-prefix-arg)) | 3661 | current-prefix-arg)) |