diff options
| author | Karoly Lorentey | 2007-04-22 12:42:47 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-04-22 12:42:47 +0000 |
| commit | 9d0799072a0d09bc14a99eaf372b262d1ba61399 (patch) | |
| tree | 76acd4ae0559776a5ec27fbd5c25598285ec71d1 /lisp/progmodes | |
| parent | e18c709364b095ea0be8ecabe458ac9a642a252f (diff) | |
| parent | a20becf321f023c6dc1831595712576d64e2ef4b (diff) | |
| download | emacs-9d0799072a0d09bc14a99eaf372b262d1ba61399.tar.gz emacs-9d0799072a0d09bc14a99eaf372b262d1ba61399.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-674
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-675
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-676
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-677
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-678
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-679
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-680
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-681
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-682
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-683
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-684
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-685
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-686
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-687
Release ERC 5.2.
* emacs@sv.gnu.org/emacs--devo--0--patch-688
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-689
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-690
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-691
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-692
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-693
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-694
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-695
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-696
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-697
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-698
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-699
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-700
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-701
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-209
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-210
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-211
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-212
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-213
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-214
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-215
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-601
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-awk.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 44 | ||||
| -rw-r--r-- | lisp/progmodes/cc-defs.el | 18 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 134 | ||||
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 92 | ||||
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 25 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/cc-subword.el | 54 | ||||
| -rw-r--r-- | lisp/progmodes/cc-vars.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/cperl-mode.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/dcl-mode.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/ebnf2ps.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 13 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 20 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 56 | ||||
| -rw-r--r-- | lisp/progmodes/hideshow.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/idlw-shell.el | 19 | ||||
| -rw-r--r-- | lisp/progmodes/idlwave.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/m4-mode.el | 11 | ||||
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 9 |
23 files changed, 334 insertions, 206 deletions
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index b0c15bff903..b3e0e381135 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el | |||
| @@ -988,6 +988,7 @@ nor helpful. | |||
| 988 | Note that this function might do hidden buffer changes. See the | 988 | Note that this function might do hidden buffer changes. See the |
| 989 | comment at the start of cc-engine.el for more info." | 989 | comment at the start of cc-engine.el for more info." |
| 990 | (interactive "p") | 990 | (interactive "p") |
| 991 | (or arg (setq arg 1)) | ||
| 991 | (save-match-data | 992 | (save-match-data |
| 992 | (c-save-buffer-state ; ensures the buffer is writable. | 993 | (c-save-buffer-state ; ensures the buffer is writable. |
| 993 | nil | 994 | nil |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 4f9e1947738..79043c87b63 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -1262,11 +1262,11 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." | |||
| 1262 | (backward-char) | 1262 | (backward-char) |
| 1263 | (skip-chars-backward " \t") | 1263 | (skip-chars-backward " \t") |
| 1264 | (setq beg (point)) | 1264 | (setq beg (point)) |
| 1265 | (c-save-buffer-state () (c-on-identifier)) | 1265 | (and (c-save-buffer-state () (c-on-identifier)) |
| 1266 | ;; Don't add a space into #define FOO().... | 1266 | ;; Don't add a space into #define FOO().... |
| 1267 | (not (and (c-beginning-of-macro) | 1267 | (not (and (c-beginning-of-macro) |
| 1268 | (c-forward-over-cpp-define-id) | 1268 | (c-forward-over-cpp-define-id) |
| 1269 | (eq (point) beg))))) | 1269 | (eq (point) beg)))))) |
| 1270 | (save-excursion | 1270 | (save-excursion |
| 1271 | (delete-region beg end) | 1271 | (delete-region beg end) |
| 1272 | (goto-char beg) | 1272 | (goto-char beg) |
| @@ -1477,9 +1477,7 @@ No indentation or other \"electric\" behavior is performed." | |||
| 1477 | (c-syntactic-re-search-forward "{") | 1477 | (c-syntactic-re-search-forward "{") |
| 1478 | (backward-char) | 1478 | (backward-char) |
| 1479 | (setq n (1- n))) | 1479 | (setq n (1- n))) |
| 1480 | (;; (or (eq where 'at-header) (eq where 'outwith-function) | 1480 | ((memq where '(at-header outwith-function at-function-end in-trailer)) |
| 1481 | ;; (eq where 'at-function-end) (eq where 'in-trailer)) | ||
| 1482 | (memq where '(at-header outwith-function at-function-end in-trailer)) | ||
| 1483 | (c-syntactic-skip-backward "^}") | 1481 | (c-syntactic-skip-backward "^}") |
| 1484 | (when (eq (char-before) ?\}) | 1482 | (when (eq (char-before) ?\}) |
| 1485 | (backward-sexp) | 1483 | (backward-sexp) |
| @@ -1513,7 +1511,8 @@ defun." | |||
| 1513 | (or arg (setq arg 1)) | 1511 | (or arg (setq arg 1)) |
| 1514 | 1512 | ||
| 1515 | (c-save-buffer-state | 1513 | (c-save-buffer-state |
| 1516 | ((start (point)) | 1514 | (beginning-of-defun-function end-of-defun-function |
| 1515 | (start (point)) | ||
| 1517 | where paren-state pos) | 1516 | where paren-state pos) |
| 1518 | 1517 | ||
| 1519 | ;; Move back out of any macro/comment/string we happen to be in. | 1518 | ;; Move back out of any macro/comment/string we happen to be in. |
| @@ -1526,8 +1525,7 @@ defun." | |||
| 1526 | (if (< arg 0) | 1525 | (if (< arg 0) |
| 1527 | ;; Move forward to the closing brace of a function. | 1526 | ;; Move forward to the closing brace of a function. |
| 1528 | (progn | 1527 | (progn |
| 1529 | (if ;; (or (eq where 'at-function-end) (eq where 'outwith-function)) | 1528 | (if (memq where '(at-function-end outwith-function)) |
| 1530 | (memq where '(at-function-end outwith-function)) | ||
| 1531 | (setq arg (1+ arg))) | 1529 | (setq arg (1+ arg))) |
| 1532 | (if (< arg 0) | 1530 | (if (< arg 0) |
| 1533 | (setq arg (c-forward-to-nth-EOF-} (- arg) where))) | 1531 | (setq arg (c-forward-to-nth-EOF-} (- arg) where))) |
| @@ -1587,13 +1585,11 @@ defun." | |||
| 1587 | ((eq where 'in-trailer) | 1585 | ((eq where 'in-trailer) |
| 1588 | (c-syntactic-skip-backward "^}") | 1586 | (c-syntactic-skip-backward "^}") |
| 1589 | (setq n (1- n))) | 1587 | (setq n (1- n))) |
| 1590 | (;; (or (eq where 'at-function-end) (eq where 'outwith-function) | 1588 | ((memq where '(at-function-end outwith-function at-header in-header)) |
| 1591 | ;; (eq where 'at-header) (eq where 'in-header)) | 1589 | (when (c-syntactic-re-search-forward "{" nil 'eob) |
| 1592 | (memq where '(at-function-end outwith-function at-header in-header)) | 1590 | (backward-char) |
| 1593 | (c-syntactic-re-search-forward "{") | 1591 | (forward-sexp) |
| 1594 | (backward-char) | 1592 | (setq n (1- n)))) |
| 1595 | (forward-sexp) | ||
| 1596 | (setq n (1- n))) | ||
| 1597 | (t (error "c-forward-to-nth-EOF-}: `where' is %s" where))) | 1593 | (t (error "c-forward-to-nth-EOF-}: `where' is %s" where))) |
| 1598 | 1594 | ||
| 1599 | ;; Each time round the loop, go forward to a "}" at the outermost level. | 1595 | ;; Each time round the loop, go forward to a "}" at the outermost level. |
| @@ -1618,7 +1614,8 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." | |||
| 1618 | (or arg (setq arg 1)) | 1614 | (or arg (setq arg 1)) |
| 1619 | 1615 | ||
| 1620 | (c-save-buffer-state | 1616 | (c-save-buffer-state |
| 1621 | ((start (point)) | 1617 | (beginning-of-defun-function end-of-defun-function |
| 1618 | (start (point)) | ||
| 1622 | where paren-state pos) | 1619 | where paren-state pos) |
| 1623 | 1620 | ||
| 1624 | ;; Move back out of any macro/comment/string we happen to be in. | 1621 | ;; Move back out of any macro/comment/string we happen to be in. |
| @@ -1631,15 +1628,12 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." | |||
| 1631 | (if (< arg 0) | 1628 | (if (< arg 0) |
| 1632 | ;; Move backwards to the } of a function | 1629 | ;; Move backwards to the } of a function |
| 1633 | (progn | 1630 | (progn |
| 1634 | (if ;; (or (eq where 'at-header) (eq where 'outwith-function)) | 1631 | (if (memq where '(at-header outwith-function)) |
| 1635 | (memq where '(at-header outwith-function)) | ||
| 1636 | (setq arg (1+ arg))) | 1632 | (setq arg (1+ arg))) |
| 1637 | (if (< arg 0) | 1633 | (if (< arg 0) |
| 1638 | (setq arg (c-backward-to-nth-BOF-{ (- arg) where))) | 1634 | (setq arg (c-backward-to-nth-BOF-{ (- arg) where))) |
| 1639 | (when (and (= arg 0) | 1635 | (if (= arg 0) |
| 1640 | (c-syntactic-skip-backward "^}") | 1636 | (c-syntactic-skip-backward "^}"))) |
| 1641 | (eq (char-before) ?\})) | ||
| 1642 | t)) | ||
| 1643 | 1637 | ||
| 1644 | ;; Move forward to the } of a function | 1638 | ;; Move forward to the } of a function |
| 1645 | (if (> arg 0) | 1639 | (if (> arg 0) |
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 43fa0ab5937..8c10df649de 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -74,12 +74,12 @@ | |||
| 74 | ; (eval-after-load "font-lock" ; 2006-07-09. font-lock is now preloaded | 74 | ; (eval-after-load "font-lock" ; 2006-07-09. font-lock is now preloaded |
| 75 | ; ' | 75 | ; ' |
| 76 | (if (and (not (featurep 'cc-fix)) ; only load the file once. | 76 | (if (and (not (featurep 'cc-fix)) ; only load the file once. |
| 77 | (featurep 'xemacs) ; There is now (2005/12) code in GNU Emacs CVS | 77 | (featurep 'xemacs) ; There is now (2005/12) code in GNU Emacs CVS |
| 78 | ; to make the call to f-l-c-k throw an error. | 78 | ; to make the call to f-l-c-k throw an error. |
| 79 | (let (font-lock-keywords) | 79 | (let (font-lock-keywords) |
| 80 | (font-lock-compile-keywords '("\\<\\>")) | 80 | (font-lock-compile-keywords '("\\<\\>")) |
| 81 | font-lock-keywords)) ; did the previous call foul this up? | 81 | font-lock-keywords)) ; did the previous call foul this up? |
| 82 | (load "cc-fix")) ;) | 82 | (load "cc-fix")) ;) |
| 83 | 83 | ||
| 84 | ;; The above takes care of the delayed loading, but this is necessary | 84 | ;; The above takes care of the delayed loading, but this is necessary |
| 85 | ;; to ensure correct byte compilation. | 85 | ;; to ensure correct byte compilation. |
| @@ -708,7 +708,8 @@ be after it." | |||
| 708 | ;; c-parse-state to between 3 and 60 times faster when | 708 | ;; c-parse-state to between 3 and 60 times faster when |
| 709 | ;; braces are hung. It can also degrade performance by | 709 | ;; braces are hung. It can also degrade performance by |
| 710 | ;; about as much when braces are not hung. | 710 | ;; about as much when braces are not hung. |
| 711 | '(let (pos) | 711 | '(let (beginning-of-defun-function end-of-defun-function |
| 712 | pos) | ||
| 712 | (while (not pos) | 713 | (while (not pos) |
| 713 | (save-restriction | 714 | (save-restriction |
| 714 | (widen) | 715 | (widen) |
| @@ -731,7 +732,8 @@ be after it." | |||
| 731 | )) | 732 | )) |
| 732 | (goto-char pos))) | 733 | (goto-char pos))) |
| 733 | ;; Emacs, which doesn't have buffer-syntactic-context-depth | 734 | ;; Emacs, which doesn't have buffer-syntactic-context-depth |
| 734 | (beginning-of-defun)) | 735 | (let (beginning-of-defun-function end-of-defun-function) |
| 736 | (beginning-of-defun))) | ||
| 735 | ;; if defun-prompt-regexp is non-nil, b-o-d won't leave us at the | 737 | ;; if defun-prompt-regexp is non-nil, b-o-d won't leave us at the |
| 736 | ;; open brace. | 738 | ;; open brace. |
| 737 | (and defun-prompt-regexp | 739 | (and defun-prompt-regexp |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index a901ee07454..717016af7ea 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -1917,9 +1917,8 @@ comment at the start of cc-engine.el for more info." | |||
| 1917 | ;; Is the region (beg end) WS, and is there WS (or BOB/EOB) next to the | 1917 | ;; Is the region (beg end) WS, and is there WS (or BOB/EOB) next to the |
| 1918 | ;; region? This is a "heuristic" function. ..... | 1918 | ;; region? This is a "heuristic" function. ..... |
| 1919 | ;; | 1919 | ;; |
| 1920 | ;; The motivation for the second bit is to check whether the removal of this | 1920 | ;; The motivation for the second bit is to check whether removing this |
| 1921 | ;; space is to check whether removing this region would coalesce two | 1921 | ;; region would coalesce two symbols. |
| 1922 | ;; symbols. | ||
| 1923 | ;; | 1922 | ;; |
| 1924 | ;; FIXME!!! This function doesn't check virtual semicolons in any way. Be | 1923 | ;; FIXME!!! This function doesn't check virtual semicolons in any way. Be |
| 1925 | ;; careful about using this function for, e.g. AWK. (2007/3/7) | 1924 | ;; careful about using this function for, e.g. AWK. (2007/3/7) |
| @@ -5372,7 +5371,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5372 | ;; True if there's a prefix match outside the outermost | 5371 | ;; True if there's a prefix match outside the outermost |
| 5373 | ;; paren pair that surrounds the declarator. | 5372 | ;; paren pair that surrounds the declarator. |
| 5374 | got-prefix-before-parens | 5373 | got-prefix-before-parens |
| 5375 | y ;; True if there's a suffix match outside the outermost | 5374 | ;; True if there's a suffix match outside the outermost |
| 5376 | ;; paren pair that surrounds the declarator. The value is | 5375 | ;; paren pair that surrounds the declarator. The value is |
| 5377 | ;; the position of the first suffix match. | 5376 | ;; the position of the first suffix match. |
| 5378 | got-suffix-after-parens | 5377 | got-suffix-after-parens |
| @@ -5878,19 +5877,23 @@ y ;; True if there's a suffix match outside the outermost | |||
| 5878 | 5877 | ||
| 5879 | (defun c-forward-label (&optional assume-markup preceding-token-end limit) | 5878 | (defun c-forward-label (&optional assume-markup preceding-token-end limit) |
| 5880 | ;; Assuming that point is at the beginning of a token, check if it starts a | 5879 | ;; Assuming that point is at the beginning of a token, check if it starts a |
| 5881 | ;; label and if so move over it and return t, otherwise don't move and | 5880 | ;; label and if so move over it and return non-nil (t in default situations, |
| 5882 | ;; return nil. "Label" here means "most things with a colon". | 5881 | ;; specific symbols (see below) for interesting situations), otherwise don't |
| 5882 | ;; move and return nil. "Label" here means "most things with a colon". | ||
| 5883 | ;; | 5883 | ;; |
| 5884 | ;; More precisely, a "label" is regarded as one of: | 5884 | ;; More precisely, a "label" is regarded as one of: |
| 5885 | ;; (i) a goto target like "foo:"; | 5885 | ;; (i) a goto target like "foo:" - returns the symbol `goto-target'; |
| 5886 | ;; (ii) A case label - either the entire construct "case FOO:" or just the | 5886 | ;; (ii) A case label - either the entire construct "case FOO:", or just the |
| 5887 | ;; bare "case", should the colon be missing; | 5887 | ;; bare "case", should the colon be missing. We return t; |
| 5888 | ;; (iii) a keyword which needs a colon, like "default:" or "private:"; | 5888 | ;; (iii) a keyword which needs a colon, like "default:" or "private:"; We |
| 5889 | ;; return t; | ||
| 5889 | ;; (iv) One of QT's "extended" C++ variants of | 5890 | ;; (iv) One of QT's "extended" C++ variants of |
| 5890 | ;; "private:"/"protected:"/"public:"/"more:" looking like "public slots:". | 5891 | ;; "private:"/"protected:"/"public:"/"more:" looking like "public slots:". |
| 5892 | ;; Returns the symbol `qt-2kwds-colon'. | ||
| 5893 | ;; (v) QT's construct "signals:". Returns the symbol `qt-1kwd-colon'. | ||
| 5891 | ;; (v) One of the keywords matched by `c-opt-extra-label-key' (without any | 5894 | ;; (v) One of the keywords matched by `c-opt-extra-label-key' (without any |
| 5892 | ;; colon). Currently (2006-03), this applies only to Objective C's | 5895 | ;; colon). Currently (2006-03), this applies only to Objective C's |
| 5893 | ;; keywords "@private", "@protected", and "@public". | 5896 | ;; keywords "@private", "@protected", and "@public". Returns t. |
| 5894 | ;; | 5897 | ;; |
| 5895 | ;; One of the things which will NOT be recognised as a label is a bit-field | 5898 | ;; One of the things which will NOT be recognised as a label is a bit-field |
| 5896 | ;; element of a struct, something like "int foo:5". | 5899 | ;; element of a struct, something like "int foo:5". |
| @@ -5919,8 +5922,10 @@ y ;; True if there's a suffix match outside the outermost | |||
| 5919 | ;; This function might do hidden buffer changes. | 5922 | ;; This function might do hidden buffer changes. |
| 5920 | 5923 | ||
| 5921 | (let ((start (point)) | 5924 | (let ((start (point)) |
| 5925 | label-end | ||
| 5922 | qt-symbol-idx | 5926 | qt-symbol-idx |
| 5923 | macro-start) ; if we're in one. | 5927 | macro-start ; if we're in one. |
| 5928 | label-type) | ||
| 5924 | (cond | 5929 | (cond |
| 5925 | ;; "case" or "default" (Doesn't apply to AWK). | 5930 | ;; "case" or "default" (Doesn't apply to AWK). |
| 5926 | ((looking-at c-label-kwds-regexp) | 5931 | ((looking-at c-label-kwds-regexp) |
| @@ -5933,25 +5938,26 @@ y ;; True if there's a suffix match outside the outermost | |||
| 5933 | 5938 | ||
| 5934 | ;; Find the label end. | 5939 | ;; Find the label end. |
| 5935 | (goto-char kwd-end) | 5940 | (goto-char kwd-end) |
| 5936 | (if (and (c-syntactic-re-search-forward | 5941 | (setq label-type |
| 5937 | ;; Stop on chars that aren't allowed in expressions, | 5942 | (if (and (c-syntactic-re-search-forward |
| 5938 | ;; and on operator chars that would be meaningless | 5943 | ;; Stop on chars that aren't allowed in expressions, |
| 5939 | ;; there. FIXME: This doesn't cope with ?: operators. | 5944 | ;; and on operator chars that would be meaningless |
| 5940 | "[;{=,@]\\|\\(\\=\\|[^:]\\):\\([^:]\\|\\'\\)" | 5945 | ;; there. FIXME: This doesn't cope with ?: operators. |
| 5941 | limit t t nil 1) | 5946 | "[;{=,@]\\|\\(\\=\\|[^:]\\):\\([^:]\\|\\'\\)" |
| 5942 | (match-beginning 2)) | 5947 | limit t t nil 1) |
| 5943 | 5948 | (match-beginning 2)) | |
| 5944 | (progn | 5949 | |
| 5945 | (goto-char (match-beginning 2)) ; just after the : | 5950 | (progn ; there's a proper : |
| 5946 | (c-put-c-type-property (1- (point)) 'c-decl-end) | 5951 | (goto-char (match-beginning 2)) ; just after the : |
| 5947 | t) | 5952 | (c-put-c-type-property (1- (point)) 'c-decl-end) |
| 5948 | 5953 | t) | |
| 5949 | ;; It's an unfinished label. We consider the keyword enough | 5954 | |
| 5950 | ;; to recognize it as a label, so that it gets fontified. | 5955 | ;; It's an unfinished label. We consider the keyword enough |
| 5951 | ;; Leave the point at the end of it, but don't put any | 5956 | ;; to recognize it as a label, so that it gets fontified. |
| 5952 | ;; `c-decl-end' marker. | 5957 | ;; Leave the point at the end of it, but don't put any |
| 5953 | (goto-char kwd-end) | 5958 | ;; `c-decl-end' marker. |
| 5954 | t))) | 5959 | (goto-char kwd-end) |
| 5960 | t)))) | ||
| 5955 | 5961 | ||
| 5956 | ;; @private, @protected, @public, in Objective C, or similar. | 5962 | ;; @private, @protected, @public, in Objective C, or similar. |
| 5957 | ((and c-opt-extra-label-key | 5963 | ((and c-opt-extra-label-key |
| @@ -5963,7 +5969,7 @@ y ;; True if there's a suffix match outside the outermost | |||
| 5963 | (when c-record-type-identifiers | 5969 | (when c-record-type-identifiers |
| 5964 | (c-record-ref-id (cons (match-beginning 1) (point)))) | 5970 | (c-record-ref-id (cons (match-beginning 1) (point)))) |
| 5965 | (c-put-c-type-property (1- (point)) 'c-decl-end) | 5971 | (c-put-c-type-property (1- (point)) 'c-decl-end) |
| 5966 | t) | 5972 | (setq label-type t)) |
| 5967 | 5973 | ||
| 5968 | ;; All other cases of labels. | 5974 | ;; All other cases of labels. |
| 5969 | ((and c-recognize-colon-labels ; nil for AWK and IDL, otherwise t. | 5975 | ((and c-recognize-colon-labels ; nil for AWK and IDL, otherwise t. |
| @@ -6039,26 +6045,49 @@ y ;; True if there's a suffix match outside the outermost | |||
| 6039 | (c-forward-syntactic-ws) | 6045 | (c-forward-syntactic-ws) |
| 6040 | (c-forward-label nil pte start)))))))))) | 6046 | (c-forward-label nil pte start)))))))))) |
| 6041 | 6047 | ||
| 6048 | ;; Point is still at the beginning of the possible label construct. | ||
| 6049 | ;; | ||
| 6042 | ;; Check that the next nonsymbol token is ":", or that we're in one | 6050 | ;; Check that the next nonsymbol token is ":", or that we're in one |
| 6043 | ;; of QT's "slots" declarations. Allow '(' for the sake of macro | 6051 | ;; of QT's "slots" declarations. Allow '(' for the sake of macro |
| 6044 | ;; arguments. FIXME: Should build this regexp from the language | 6052 | ;; arguments. FIXME: Should build this regexp from the language |
| 6045 | ;; constants. | 6053 | ;; constants. |
| 6046 | (when (c-syntactic-re-search-forward | 6054 | (cond |
| 6047 | "[ \t[:?;{=*/%&|,<>!@+-]" limit t t) ; not at EOB | 6055 | ;; public: protected: private: |
| 6048 | (backward-char) | 6056 | ((and |
| 6049 | (setq qt-symbol-idx | 6057 | (c-major-mode-is 'c++-mode) |
| 6050 | (and (c-major-mode-is 'c++-mode) | 6058 | (search-forward-regexp |
| 6051 | (string-match | 6059 | "\\=p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\>[^_]" nil t) |
| 6052 | "\\(p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|more\\)\\>" | 6060 | (progn (backward-char) |
| 6053 | (buffer-substring start (point))))) | 6061 | (c-forward-syntactic-ws limit) |
| 6054 | (c-forward-syntactic-ws limit) | 6062 | (looking-at ":\\([^:]\\|\\'\\)"))) ; A single colon. |
| 6055 | (when (or (looking-at ":\\([^:]\\|\\'\\)") ; A single colon. | 6063 | (forward-char) |
| 6056 | (and qt-symbol-idx | 6064 | (setq label-type t)) |
| 6057 | (search-forward-regexp "\\=slots\\>" limit t) | 6065 | ;; QT double keyword like "protected slots:" or goto target. |
| 6058 | (progn (c-forward-syntactic-ws limit) | 6066 | ((progn (goto-char start) nil)) |
| 6059 | (looking-at ":\\([^:]\\|\\'\\)")))) ; A single colon | 6067 | ((when (c-syntactic-re-search-forward |
| 6060 | (forward-char) ; to after the colon. | 6068 | "[ \t\n[:?;{=*/%&|,<>!@+-]" limit t t) ; not at EOB |
| 6061 | t))) | 6069 | (backward-char) |
| 6070 | (setq label-end (point)) | ||
| 6071 | (setq qt-symbol-idx | ||
| 6072 | (and (c-major-mode-is 'c++-mode) | ||
| 6073 | (string-match | ||
| 6074 | "\\(p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|more\\)\\>" | ||
| 6075 | (buffer-substring start (point))))) | ||
| 6076 | (c-forward-syntactic-ws limit) | ||
| 6077 | (cond | ||
| 6078 | ((looking-at ":\\([^:]\\|\\'\\)") ; A single colon. | ||
| 6079 | (forward-char) | ||
| 6080 | (setq label-type | ||
| 6081 | (if (string= "signals" ; Special QT macro | ||
| 6082 | (buffer-substring-no-properties start label-end)) | ||
| 6083 | 'qt-1kwd-colon | ||
| 6084 | 'goto-target))) | ||
| 6085 | ((and qt-symbol-idx | ||
| 6086 | (search-forward-regexp "\\=slots\\>" limit t) | ||
| 6087 | (progn (c-forward-syntactic-ws limit) | ||
| 6088 | (looking-at ":\\([^:]\\|\\'\\)"))) ; A single colon | ||
| 6089 | (forward-char) | ||
| 6090 | (setq label-type 'qt-2kwds-colon))))))) | ||
| 6062 | 6091 | ||
| 6063 | (save-restriction | 6092 | (save-restriction |
| 6064 | (narrow-to-region start (point)) | 6093 | (narrow-to-region start (point)) |
| @@ -6069,6 +6098,7 @@ y ;; True if there's a suffix match outside the outermost | |||
| 6069 | (while (progn | 6098 | (while (progn |
| 6070 | (when (looking-at c-nonlabel-token-key) | 6099 | (when (looking-at c-nonlabel-token-key) |
| 6071 | (goto-char start) | 6100 | (goto-char start) |
| 6101 | (setq label-type nil) | ||
| 6072 | (throw 'check-label nil)) | 6102 | (throw 'check-label nil)) |
| 6073 | (and (c-safe (c-forward-sexp) | 6103 | (and (c-safe (c-forward-sexp) |
| 6074 | (c-forward-syntactic-ws) | 6104 | (c-forward-syntactic-ws) |
| @@ -6088,12 +6118,12 @@ y ;; True if there's a suffix match outside the outermost | |||
| 6088 | 6118 | ||
| 6089 | (c-put-c-type-property (1- (point-max)) 'c-decl-end) | 6119 | (c-put-c-type-property (1- (point-max)) 'c-decl-end) |
| 6090 | (goto-char (point-max)) | 6120 | (goto-char (point-max)) |
| 6091 | t))) | 6121 | ))) |
| 6092 | 6122 | ||
| 6093 | (t | 6123 | (t |
| 6094 | ;; Not a label. | 6124 | ;; Not a label. |
| 6095 | (goto-char start) | 6125 | (goto-char start))) |
| 6096 | nil)))) | 6126 | label-type)) |
| 6097 | 6127 | ||
| 6098 | (defun c-forward-objc-directive () | 6128 | (defun c-forward-objc-directive () |
| 6099 | ;; Assuming the point is at the beginning of a token, try to move | 6129 | ;; Assuming the point is at the beginning of a token, try to move |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index a880ae9a1fe..0df09eda481 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -704,8 +704,13 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 704 | )) | 704 | )) |
| 705 | 705 | ||
| 706 | (defun c-font-lock-complex-decl-prepare (limit) | 706 | (defun c-font-lock-complex-decl-prepare (limit) |
| 707 | ;; This function will be called from font-lock for a region bounded by POINT | ||
| 708 | ;; and LIMIT, as though it were to identify a keyword for | ||
| 709 | ;; font-lock-keyword-face. It always returns NIL to inhibit this and | ||
| 710 | ;; prevent a repeat invocation. See elisp/lispref page "Search-based | ||
| 711 | ;; Fontification". | ||
| 712 | ;; | ||
| 707 | ;; Called before any of the matchers in `c-complex-decl-matchers'. | 713 | ;; Called before any of the matchers in `c-complex-decl-matchers'. |
| 708 | ;; Nil is always returned. | ||
| 709 | ;; | 714 | ;; |
| 710 | ;; This function does hidden buffer changes. | 715 | ;; This function does hidden buffer changes. |
| 711 | 716 | ||
| @@ -742,10 +747,15 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 742 | nil) | 747 | nil) |
| 743 | 748 | ||
| 744 | (defun c-font-lock-<>-arglists (limit) | 749 | (defun c-font-lock-<>-arglists (limit) |
| 750 | ;; This function will be called from font-lock for a region bounded by POINT | ||
| 751 | ;; and LIMIT, as though it were to identify a keyword for | ||
| 752 | ;; font-lock-keyword-face. It always returns NIL to inhibit this and | ||
| 753 | ;; prevent a repeat invocation. See elisp/lispref page "Search-based | ||
| 754 | ;; Fontification". | ||
| 755 | ;; | ||
| 745 | ;; Fontify types and references in names containing angle bracket | 756 | ;; Fontify types and references in names containing angle bracket |
| 746 | ;; arglists from the point to LIMIT. Note that | 757 | ;; arglists from the point to LIMIT. Note that |
| 747 | ;; `c-font-lock-declarations' already has handled many of them. Nil | 758 | ;; `c-font-lock-declarations' already has handled many of them. |
| 748 | ;; is always returned. | ||
| 749 | ;; | 759 | ;; |
| 750 | ;; This function might do hidden buffer changes. | 760 | ;; This function might do hidden buffer changes. |
| 751 | 761 | ||
| @@ -971,9 +981,14 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 971 | font-lock-keyword-face)) | 981 | font-lock-keyword-face)) |
| 972 | 982 | ||
| 973 | (defun c-font-lock-declarations (limit) | 983 | (defun c-font-lock-declarations (limit) |
| 984 | ;; This function will be called from font-lock for a region bounded by POINT | ||
| 985 | ;; and LIMIT, as though it were to identify a keyword for | ||
| 986 | ;; font-lock-keyword-face. It always returns NIL to inhibit this and | ||
| 987 | ;; prevent a repeat invocation. See elisp/lispref page "Search-based | ||
| 988 | ;; Fontification". | ||
| 989 | ;; | ||
| 974 | ;; Fontify all the declarations, casts and labels from the point to LIMIT. | 990 | ;; Fontify all the declarations, casts and labels from the point to LIMIT. |
| 975 | ;; Assumes that strings and comments have been fontified already. Nil is | 991 | ;; Assumes that strings and comments have been fontified already. |
| 976 | ;; always returned. | ||
| 977 | ;; | 992 | ;; |
| 978 | ;; This function might do hidden buffer changes. | 993 | ;; This function might do hidden buffer changes. |
| 979 | 994 | ||
| @@ -1009,6 +1024,7 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1009 | ;; `c-forward-decl-or-cast-1' and `c-forward-label' for | 1024 | ;; `c-forward-decl-or-cast-1' and `c-forward-label' for |
| 1010 | ;; later fontification. | 1025 | ;; later fontification. |
| 1011 | (c-record-type-identifiers t) | 1026 | (c-record-type-identifiers t) |
| 1027 | label-type | ||
| 1012 | c-record-ref-identifiers | 1028 | c-record-ref-identifiers |
| 1013 | ;; Make `c-forward-type' calls mark up template arglists if | 1029 | ;; Make `c-forward-type' calls mark up template arglists if |
| 1014 | ;; it finds any. That's necessary so that we later will | 1030 | ;; it finds any. That's necessary so that we later will |
| @@ -1174,39 +1190,31 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1174 | (c-fontify-recorded-types-and-refs) | 1190 | (c-fontify-recorded-types-and-refs) |
| 1175 | nil)) | 1191 | nil)) |
| 1176 | 1192 | ||
| 1177 | ;; It was a false alarm. | 1193 | ;; It was a false alarm. Check if we're in a label (or other |
| 1194 | ;; construct with `:' except bitfield) instead. | ||
| 1178 | (goto-char start-pos) | 1195 | (goto-char start-pos) |
| 1179 | ;; The below code attempts to fontify the case constants in | 1196 | (when (setq label-type (c-forward-label t match-pos nil)) |
| 1180 | ;; c-label-face-name, but it cannot catch every case [sic]. | 1197 | ;; Can't use `c-fontify-types-and-refs' here since we |
| 1181 | ;; And do we want to fontify case constants anyway? | 1198 | ;; use the label face at times. |
| 1182 | (c-forward-label t match-pos nil) | 1199 | (cond ((eq label-type 'goto-target) |
| 1183 | ;;; (when (c-forward-label t match-pos nil) | 1200 | (c-put-font-lock-face (caar c-record-ref-identifiers) |
| 1184 | ;;; ;; Can't use `c-fontify-types-and-refs' here since we | 1201 | (cdar c-record-ref-identifiers) |
| 1185 | ;;; ;; should use the label face. | 1202 | c-label-face-name)) |
| 1186 | ;;; (save-excursion | 1203 | ((eq label-type 'qt-1kwd-colon) |
| 1187 | ;;; (while c-record-ref-identifiers | 1204 | (c-put-font-lock-face (caar c-record-ref-identifiers) |
| 1188 | ;;; (let ((elem (car c-record-ref-identifiers)) | 1205 | (cdar c-record-ref-identifiers) |
| 1189 | ;;; c-record-type-identifiers) | 1206 | 'font-lock-keyword-face)) |
| 1190 | ;;; (goto-char (cdr elem)) | 1207 | ((eq label-type 'qt-2kwds-colon) |
| 1191 | ;;; ;; Find the end of any label. | 1208 | (mapc |
| 1192 | ;;; (while (and (re-search-forward "\\sw\\|:" nil t) | 1209 | (lambda (kwd) |
| 1193 | ;;; (progn (backward-char 1) t) | 1210 | (c-put-font-lock-face (car kwd) (cdr kwd) |
| 1194 | ;;; (or (re-search-forward | 1211 | 'font-lock-keyword-face)) |
| 1195 | ;;; "\\=0[Xx][0-9A-Fa-f]+\\|\\([0-9]+\\)" nil t) | 1212 | c-record-ref-identifiers))) |
| 1196 | ;;; (c-forward-name))) | 1213 | (setq c-record-ref-identifiers nil) |
| 1197 | ;;; (c-backward-syntactic-ws) | 1214 | ;; `c-forward-label' has probably added a `c-decl-end' |
| 1198 | ;;; (let ((end (point))) | 1215 | ;; marker, so return t to `c-find-decl-spots' to signal |
| 1199 | ;;; ;; Now find the start of the bit we regard as the label. | 1216 | ;; that. |
| 1200 | ;;; (when (and (c-simple-skip-symbol-backward) | 1217 | t)))) |
| 1201 | ;;; (not (c-get-char-property (point) 'face))) | ||
| 1202 | ;;; (c-put-font-lock-face (point) end c-label-face-name)) | ||
| 1203 | ;;; (goto-char end)))) | ||
| 1204 | ;;; (setq c-record-ref-identifiers (cdr c-record-ref-identifiers)))) | ||
| 1205 | ;;; ;; `c-forward-label' probably has added a `c-decl-end' | ||
| 1206 | ;;; ;; marker, so return t to `c-find-decl-spots' to signal | ||
| 1207 | ;;; ;; that. | ||
| 1208 | ;;; t) | ||
| 1209 | ))) | ||
| 1210 | 1218 | ||
| 1211 | nil))) | 1219 | nil))) |
| 1212 | 1220 | ||
| @@ -1285,6 +1293,14 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." | |||
| 1285 | "Complex font lock matchers for types and declarations. Used on level | 1293 | "Complex font lock matchers for types and declarations. Used on level |
| 1286 | 3 and higher." | 1294 | 3 and higher." |
| 1287 | 1295 | ||
| 1296 | ;; Note: This code in this form dumps a number of funtions into the | ||
| 1297 | ;; resulting constant, `c-matchers-3'. At run time, font lock will call | ||
| 1298 | ;; each of them as a "FUNCTION" (see Elisp page "Search-based | ||
| 1299 | ;; Fontification"). The font lock region is delimited by POINT and the | ||
| 1300 | ;; single parameter, LIMIT. Each of these functions returns NIL (thus | ||
| 1301 | ;; inhibiting spurious font-lock-keyword-face highlighting and another | ||
| 1302 | ;; call). | ||
| 1303 | |||
| 1288 | t `(;; Initialize some things before the search functions below. | 1304 | t `(;; Initialize some things before the search functions below. |
| 1289 | c-font-lock-complex-decl-prepare | 1305 | c-font-lock-complex-decl-prepare |
| 1290 | 1306 | ||
| @@ -1397,6 +1413,8 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." | |||
| 1397 | 1413 | ||
| 1398 | ;; Fontify the type in C++ "new" expressions. | 1414 | ;; Fontify the type in C++ "new" expressions. |
| 1399 | ,@(when (c-major-mode-is 'c++-mode) | 1415 | ,@(when (c-major-mode-is 'c++-mode) |
| 1416 | ;; This pattern is a probably a "(MATCHER . ANCHORED-HIGHLIGHTER)" | ||
| 1417 | ;; (see Elisp page "Search-based Fontification"). | ||
| 1400 | `(("\\<new\\>" | 1418 | `(("\\<new\\>" |
| 1401 | (c-font-lock-c++-new)))) | 1419 | (c-font-lock-c++-new)))) |
| 1402 | )) | 1420 | )) |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index fe01ab02ae3..906cbfb19a7 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -221,11 +221,6 @@ the evaluated constant value at compile time." | |||
| 221 | ;; with the group symbol for each group and should return non-nil | 221 | ;; with the group symbol for each group and should return non-nil |
| 222 | ;; if that group is to be included. | 222 | ;; if that group is to be included. |
| 223 | ;; | 223 | ;; |
| 224 | ;; OP-FILTER filters the individual operators in each group. It | ||
| 225 | ;; can be t to choose all operators, a regexp to test against each | ||
| 226 | ;; operator, or a function which will be called for each operator | ||
| 227 | ;; and should return non-nil for those to include. | ||
| 228 | ;; | ||
| 229 | ;; If XLATE is given, it's a function which is called for each | 224 | ;; If XLATE is given, it's a function which is called for each |
| 230 | ;; matching operator and its return value is collected instead. | 225 | ;; matching operator and its return value is collected instead. |
| 231 | ;; If it returns a list, the elements are spliced directly into | 226 | ;; If it returns a list, the elements are spliced directly into |
| @@ -1376,6 +1371,26 @@ EOL terminated statements." | |||
| 1376 | (c-lang-const c-vsemi-status-unknown-p-fn)) | 1371 | (c-lang-const c-vsemi-status-unknown-p-fn)) |
| 1377 | 1372 | ||
| 1378 | 1373 | ||
| 1374 | ;;; Defun functions | ||
| 1375 | |||
| 1376 | ;; The Emacs variables beginning-of-defun-function and | ||
| 1377 | ;; end-of-defun-function will be set so that commands like | ||
| 1378 | ;; `mark-defun' and `narrow-to-defun' work right. The key sequences | ||
| 1379 | ;; C-M-a and C-M-e are, however, bound directly to the CC Mode | ||
| 1380 | ;; functions, allowing optimisation for large n. | ||
| 1381 | (c-lang-defconst beginning-of-defun-function | ||
| 1382 | "Function to which beginning-of-defun-function will be set." | ||
| 1383 | t 'c-beginning-of-defun | ||
| 1384 | awk 'c-awk-beginning-of-defun) | ||
| 1385 | (c-lang-setvar beginning-of-defun-function | ||
| 1386 | (c-lang-const beginning-of-defun-function)) | ||
| 1387 | |||
| 1388 | (c-lang-defconst end-of-defun-function | ||
| 1389 | "Function to which end-of-defun-function will be set." | ||
| 1390 | t 'c-end-of-defun | ||
| 1391 | awk 'c-awk-end-of-defun) | ||
| 1392 | (c-lang-setvar end-of-defun-function (c-lang-const end-of-defun-function)) | ||
| 1393 | |||
| 1379 | ;;; In-comment text handling. | 1394 | ;;; In-comment text handling. |
| 1380 | 1395 | ||
| 1381 | (c-lang-defconst c-paragraph-start | 1396 | (c-lang-defconst c-paragraph-start |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 1407b497305..f5da0eecc2e 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -158,8 +158,8 @@ | |||
| 158 | ;; These are typically standard emacs variables such as `comment-start'. | 158 | ;; These are typically standard emacs variables such as `comment-start'. |
| 159 | (defmacro c-make-emacs-variables-local () | 159 | (defmacro c-make-emacs-variables-local () |
| 160 | `(progn | 160 | `(progn |
| 161 | ,@(mapcan (lambda (init) | 161 | ,@(mapcar (lambda (init) |
| 162 | `((make-local-variable ',(car init)))) | 162 | `(make-local-variable ',(car init))) |
| 163 | (cdr c-emacs-variable-inits)))) | 163 | (cdr c-emacs-variable-inits)))) |
| 164 | 164 | ||
| 165 | (defun c-init-language-vars-for (mode) | 165 | (defun c-init-language-vars-for (mode) |
| @@ -509,9 +509,9 @@ preferably use the `c-mode-menu' language constant directly." | |||
| 509 | type type-pos | 509 | type type-pos |
| 510 | marked-id term-pos | 510 | marked-id term-pos |
| 511 | (end1 | 511 | (end1 |
| 512 | (if (eq (get-text-property end 'face) 'font-lock-comment-face) | 512 | (or (and (eq (get-text-property end 'face) 'font-lock-comment-face) |
| 513 | (previous-single-property-change end 'face) | 513 | (previous-single-property-change end 'face)) |
| 514 | end))) | 514 | end))) |
| 515 | (when (>= end1 beg) ; Don't hassle about changes entirely in comments. | 515 | (when (>= end1 beg) ; Don't hassle about changes entirely in comments. |
| 516 | ;; Find a limit for the search for a `c-type' property | 516 | ;; Find a limit for the search for a `c-type' property |
| 517 | (while | 517 | (while |
diff --git a/lisp/progmodes/cc-subword.el b/lisp/progmodes/cc-subword.el index 29494fdc6a7..a6a365d316b 100644 --- a/lisp/progmodes/cc-subword.el +++ b/lisp/progmodes/cc-subword.el | |||
| @@ -218,38 +218,52 @@ Optional argument ARG is the same as for `transpose-words'." | |||
| 218 | (interactive "*p") | 218 | (interactive "*p") |
| 219 | (transpose-subr 'c-forward-subword arg)) | 219 | (transpose-subr 'c-forward-subword arg)) |
| 220 | 220 | ||
| 221 | (defun c-capitalize-subword (arg) | 221 | |
| 222 | "Do the same as `capitalize-word' but on subwords. | ||
| 223 | See the command `c-subword-mode' for a description of subwords. | ||
| 224 | Optional argument ARG is the same as for `capitalize-word'." | ||
| 225 | (interactive "p") | ||
| 226 | (let ((count (abs arg)) | ||
| 227 | (direction (if (< 0 arg) 1 -1))) | ||
| 228 | (dotimes (i count) | ||
| 229 | (when (re-search-forward | ||
| 230 | (concat "[" c-alpha "]") | ||
| 231 | nil t) | ||
| 232 | (goto-char (match-beginning 0))) | ||
| 233 | (let* ((p (point)) | ||
| 234 | (pp (1+ p)) | ||
| 235 | (np (c-forward-subword direction))) | ||
| 236 | (upcase-region p pp) | ||
| 237 | (downcase-region pp np) | ||
| 238 | (goto-char np))))) | ||
| 239 | 222 | ||
| 240 | (defun c-downcase-subword (arg) | 223 | (defun c-downcase-subword (arg) |
| 241 | "Do the same as `downcase-word' but on subwords. | 224 | "Do the same as `downcase-word' but on subwords. |
| 242 | See the command `c-subword-mode' for a description of subwords. | 225 | See the command `c-subword-mode' for a description of subwords. |
| 243 | Optional argument ARG is the same as for `downcase-word'." | 226 | Optional argument ARG is the same as for `downcase-word'." |
| 244 | (interactive "p") | 227 | (interactive "p") |
| 245 | (downcase-region (point) (c-forward-subword arg))) | 228 | (let ((start (point))) |
| 229 | (downcase-region (point) (c-forward-subword arg)) | ||
| 230 | (when (< arg 0) | ||
| 231 | (goto-char start)))) | ||
| 246 | 232 | ||
| 247 | (defun c-upcase-subword (arg) | 233 | (defun c-upcase-subword (arg) |
| 248 | "Do the same as `upcase-word' but on subwords. | 234 | "Do the same as `upcase-word' but on subwords. |
| 249 | See the command `c-subword-mode' for a description of subwords. | 235 | See the command `c-subword-mode' for a description of subwords. |
| 250 | Optional argument ARG is the same as for `upcase-word'." | 236 | Optional argument ARG is the same as for `upcase-word'." |
| 251 | (interactive "p") | 237 | (interactive "p") |
| 252 | (upcase-region (point) (c-forward-subword arg))) | 238 | (let ((start (point))) |
| 239 | (upcase-region (point) (c-forward-subword arg)) | ||
| 240 | (when (< arg 0) | ||
| 241 | (goto-char start)))) | ||
| 242 | |||
| 243 | (defun c-capitalize-subword (arg) | ||
| 244 | "Do the same as `capitalize-word' but on subwords. | ||
| 245 | See the command `c-subword-mode' for a description of subwords. | ||
| 246 | Optional argument ARG is the same as for `capitalize-word'." | ||
| 247 | (interactive "p") | ||
| 248 | (let ((count (abs arg)) | ||
| 249 | (start (point)) | ||
| 250 | (advance (if (< arg 0) nil t))) | ||
| 251 | (dotimes (i count) | ||
| 252 | (if advance | ||
| 253 | (progn (re-search-forward | ||
| 254 | (concat "[" c-alpha "]") | ||
| 255 | nil t) | ||
| 256 | (goto-char (match-beginning 0))) | ||
| 257 | (c-backward-subword)) | ||
| 258 | (let* ((p (point)) | ||
| 259 | (pp (1+ p)) | ||
| 260 | (np (c-forward-subword))) | ||
| 261 | (upcase-region p pp) | ||
| 262 | (downcase-region pp np) | ||
| 263 | (goto-char (if advance np p)))) | ||
| 264 | (unless advance | ||
| 265 | (goto-char start)))) | ||
| 266 | |||
| 253 | 267 | ||
| 254 | 268 | ||
| 255 | ;; | 269 | ;; |
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index cbf2b44de23..8d28cba79ad 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el | |||
| @@ -890,7 +890,8 @@ Only currently supported behavior is `alignleft'." | |||
| 890 | 890 | ||
| 891 | (defcustom c-special-indent-hook nil | 891 | (defcustom c-special-indent-hook nil |
| 892 | "*Hook for user defined special indentation adjustments. | 892 | "*Hook for user defined special indentation adjustments. |
| 893 | This hook gets called after a line is indented by the mode." | 893 | This hook gets called after each line is indented by the mode. It is only |
| 894 | called if `c-syntactic-indentation' is non-nil." | ||
| 894 | :type 'hook | 895 | :type 'hook |
| 895 | :group 'c) | 896 | :group 'c) |
| 896 | 897 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index aa77caf0670..ce933cb13d5 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -391,6 +391,7 @@ be added." | |||
| 391 | ,(expand-file-name "compilation.txt" data-directory)) | 391 | ,(expand-file-name "compilation.txt" data-directory)) |
| 392 | :group 'compilation) | 392 | :group 'compilation) |
| 393 | 393 | ||
| 394 | ;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp) | ||
| 394 | (defvar compilation-directory nil | 395 | (defvar compilation-directory nil |
| 395 | "Directory to restore to when doing `recompile'.") | 396 | "Directory to restore to when doing `recompile'.") |
| 396 | 397 | ||
| @@ -625,7 +626,7 @@ Faces `compilation-error-face', `compilation-warning-face', | |||
| 625 | (cons (match-string-no-properties idx) dir)) | 626 | (cons (match-string-no-properties idx) dir)) |
| 626 | mouse-face highlight | 627 | mouse-face highlight |
| 627 | keymap compilation-button-map | 628 | keymap compilation-button-map |
| 628 | help-echo "mouse-2: visit this directory"))) | 629 | help-echo "mouse-2: visit destination directory"))) |
| 629 | 630 | ||
| 630 | ;; Data type `reverse-ordered-alist' retriever. This function retrieves the | 631 | ;; Data type `reverse-ordered-alist' retriever. This function retrieves the |
| 631 | ;; KEY element from the ALIST, creating it in the right position if not already | 632 | ;; KEY element from the ALIST, creating it in the right position if not already |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 0b8287503f8..a07fb5ee44f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -233,6 +233,7 @@ for constructs with multiline if/unless/while/until/for/foreach condition." | |||
| 233 | "*Indentation of CPerl statements with respect to containing block." | 233 | "*Indentation of CPerl statements with respect to containing block." |
| 234 | :type 'integer | 234 | :type 'integer |
| 235 | :group 'cperl-indentation-details) | 235 | :group 'cperl-indentation-details) |
| 236 | (put 'cperl-indent-level 'safe-local-variable 'integerp) | ||
| 236 | 237 | ||
| 237 | (defcustom cperl-lineup-step nil | 238 | (defcustom cperl-lineup-step nil |
| 238 | "*`cperl-lineup' will always lineup at multiple of this number. | 239 | "*`cperl-lineup' will always lineup at multiple of this number. |
| @@ -1871,9 +1872,7 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1871 | (easy-menu-add cperl-menu)) ; A NOP in Emacs. | 1872 | (easy-menu-add cperl-menu)) ; A NOP in Emacs. |
| 1872 | (run-mode-hooks 'cperl-mode-hook) | 1873 | (run-mode-hooks 'cperl-mode-hook) |
| 1873 | (if cperl-hook-after-change | 1874 | (if cperl-hook-after-change |
| 1874 | (progn | 1875 | (add-hook 'after-change-functions 'cperl-after-change-function nil t)) |
| 1875 | (make-local-hook 'after-change-functions) | ||
| 1876 | (add-hook 'after-change-functions 'cperl-after-change-function nil t))) | ||
| 1877 | ;; After hooks since fontification will break this | 1876 | ;; After hooks since fontification will break this |
| 1878 | (if cperl-pod-here-scan | 1877 | (if cperl-pod-here-scan |
| 1879 | (or cperl-syntaxify-by-font-lock | 1878 | (or cperl-syntaxify-by-font-lock |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 618de7a3345..bdec1bf9ef4 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -71,6 +71,9 @@ | |||
| 71 | 71 | ||
| 72 | ;;; Code: | 72 | ;;; Code: |
| 73 | 73 | ||
| 74 | (require 'tempo) | ||
| 75 | |||
| 76 | |||
| 74 | ;;; *** Customization ***************************************************** | 77 | ;;; *** Customization ***************************************************** |
| 75 | 78 | ||
| 76 | 79 | ||
| @@ -1935,8 +1938,6 @@ section at the end of the current buffer." | |||
| 1935 | ;; standard Emacs. I would have liked something closer to the functionality | 1938 | ;; standard Emacs. I would have liked something closer to the functionality |
| 1936 | ;; of LSE templates... | 1939 | ;; of LSE templates... |
| 1937 | 1940 | ||
| 1938 | |||
| 1939 | (require 'tempo) | ||
| 1940 | (defvar dcl-tempo-tags nil | 1941 | (defvar dcl-tempo-tags nil |
| 1941 | "Tempo tags for DCL mode.") | 1942 | "Tempo tags for DCL mode.") |
| 1942 | 1943 | ||
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 23ba4b55f33..55f61222796 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -2609,7 +2609,7 @@ See `ebnf-style-database' documentation." | |||
| 2609 | (and (assoc name ebnf-style-database) | 2609 | (and (assoc name ebnf-style-database) |
| 2610 | (error "Style name already exists: %s" name)) | 2610 | (error "Style name already exists: %s" name)) |
| 2611 | (or (assoc inherits ebnf-style-database) | 2611 | (or (assoc inherits ebnf-style-database) |
| 2612 | (error "Style inheritance name does'nt exist: %s" inherits)) | 2612 | (error "Style inheritance name doesn't exist: %s" inherits)) |
| 2613 | (setq ebnf-style-database | 2613 | (setq ebnf-style-database |
| 2614 | (cons (cons name (cons inherits (ebnf-check-style-values values))) | 2614 | (cons (cons name (cons inherits (ebnf-check-style-values values))) |
| 2615 | ebnf-style-database))) | 2615 | ebnf-style-database))) |
| @@ -2639,7 +2639,7 @@ See `ebnf-style-database' documentation." | |||
| 2639 | See `ebnf-style-database' documentation." | 2639 | See `ebnf-style-database' documentation." |
| 2640 | (interactive "SStyle name: \nXStyle values: ") | 2640 | (interactive "SStyle name: \nXStyle values: ") |
| 2641 | (let ((style (or (assoc name ebnf-style-database) | 2641 | (let ((style (or (assoc name ebnf-style-database) |
| 2642 | (error "Style name does'nt exist: %s" name))) | 2642 | (error "Style name doesn't exist: %s" name))) |
| 2643 | (merge (ebnf-check-style-values values)) | 2643 | (merge (ebnf-check-style-values values)) |
| 2644 | val elt new check) | 2644 | val elt new check) |
| 2645 | ;; modify value of existing variables | 2645 | ;; modify value of existing variables |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 8d126c8a413..4903d7d26ec 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -931,8 +931,8 @@ Convert it to flymake internal format." | |||
| 931 | 2 4 nil 5)) | 931 | 2 4 nil 5)) |
| 932 | ;; compilation-error-regexp-alist) | 932 | ;; compilation-error-regexp-alist) |
| 933 | (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) | 933 | (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) |
| 934 | "Patterns for matching error/warning lines. | 934 | "Patterns for matching error/warning lines. Each pattern has the form |
| 935 | \(REGEXP FILE-IDX LINE-IDX ERR-TEXT-IDX). | 935 | \(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX). |
| 936 | Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns | 936 | Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns |
| 937 | from compile.el") | 937 | from compile.el") |
| 938 | 938 | ||
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index b598f2de1f7..4dbc9893f61 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -1771,10 +1771,15 @@ static char *magick[] = { | |||
| 1771 | :group 'gud) | 1771 | :group 'gud) |
| 1772 | 1772 | ||
| 1773 | (defface breakpoint-disabled | 1773 | (defface breakpoint-disabled |
| 1774 | ;; We use different values of grey for different background types, | 1774 | '((((class color) (min-colors 88)) :foreground "grey70") |
| 1775 | ;; so that on low-color displays it will end up as something visible | 1775 | ;; Ensure that on low-color displays that we end up something visible. |
| 1776 | ;; if it has to be approximated. | 1776 | (((class color) (min-colors 8) (background light)) |
| 1777 | '((t :foreground "grey70")) | 1777 | :foreground "black") |
| 1778 | (((class color) (min-colors 8) (background dark)) | ||
| 1779 | :foreground "white") | ||
| 1780 | (((type tty) (class mono)) | ||
| 1781 | :inverse-video t) | ||
| 1782 | (t :background "gray")) | ||
| 1778 | "Face for disabled breakpoint icon in fringe." | 1783 | "Face for disabled breakpoint icon in fringe." |
| 1779 | :group 'gud) | 1784 | :group 'gud) |
| 1780 | 1785 | ||
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index fe2bbdec14e..2c43abfd50c 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -315,17 +315,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 315 | This gets tacked on the end of the generated expressions.") | 315 | This gets tacked on the end of the generated expressions.") |
| 316 | 316 | ||
| 317 | ;;;###autoload | 317 | ;;;###autoload |
| 318 | (defvar grep-program | 318 | (defvar grep-program "grep" |
| 319 | ;; Currently zgrep has trouble. It runs egrep instead of grep, | ||
| 320 | ;; and it doesn't pass along long options right. | ||
| 321 | "grep" | ||
| 322 | ;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path | ||
| 323 | ;; (call-process "zgrep" nil nil nil | ||
| 324 | ;; "foo" null-device) | ||
| 325 | ;; (error nil)) | ||
| 326 | ;; 1) | ||
| 327 | ;; "zgrep" | ||
| 328 | ;; "grep") | ||
| 329 | "The default grep program for `grep-command' and `grep-find-command'. | 319 | "The default grep program for `grep-command' and `grep-find-command'. |
| 330 | This variable's value takes effect when `grep-compute-defaults' is called.") | 320 | This variable's value takes effect when `grep-compute-defaults' is called.") |
| 331 | 321 | ||
| @@ -336,10 +326,10 @@ This variable's value takes effect when `grep-compute-defaults' is called.") | |||
| 336 | 326 | ||
| 337 | ;;;###autoload | 327 | ;;;###autoload |
| 338 | (defvar grep-find-use-xargs nil | 328 | (defvar grep-find-use-xargs nil |
| 339 | "Whether \\[grep-find] uses the `xargs' utility by default. | 329 | "Non-nil means that `grep-find' uses the `xargs' utility by default. |
| 340 | 330 | If `exec', use `find -exec'. | |
| 341 | If `exec', it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0'; | 331 | If `gnu', use `find -print0' and `xargs -0'. |
| 342 | if not nil and not `gnu', it uses `find -print' and `xargs'. | 332 | Any other non-nil value means to use `find -print' and `xargs'. |
| 343 | 333 | ||
| 344 | This variable's value takes effect when `grep-compute-defaults' is called.") | 334 | This variable's value takes effect when `grep-compute-defaults' is called.") |
| 345 | 335 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 8db7c28219e..3d252190eff 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -147,8 +147,7 @@ Used to grey out relevant toolbar icons.") | |||
| 147 | ([refresh] "Refresh" . gud-refresh) | 147 | ([refresh] "Refresh" . gud-refresh) |
| 148 | ([run] menu-item "Run" gud-run | 148 | ([run] menu-item "Run" gud-run |
| 149 | :enable (not gud-running) | 149 | :enable (not gud-running) |
| 150 | :visible (and (memq gud-minor-mode '(gdbmi gdb dbx jdb)) | 150 | :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) |
| 151 | (not (eq gud-minor-mode 'gdba)))) | ||
| 152 | ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go | 151 | ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go |
| 153 | :visible (and (not gud-running) | 152 | :visible (and (not gud-running) |
| 154 | (eq gud-minor-mode 'gdba))) | 153 | (eq gud-minor-mode 'gdba))) |
| @@ -214,7 +213,45 @@ Used to grey out relevant toolbar icons.") | |||
| 214 | :name "Gud") | 213 | :name "Gud") |
| 215 | 214 | ||
| 216 | (easy-mmode-defmap gud-minor-mode-map | 215 | (easy-mmode-defmap gud-minor-mode-map |
| 217 | `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) | 216 | (append |
| 217 | `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) | ||
| 218 | ;; Get tool bar like functionality from the menu bar on a text only | ||
| 219 | ;; terminal. | ||
| 220 | (unless window-system | ||
| 221 | `(([menu-bar down] | ||
| 222 | . (,(propertize "down" 'face 'font-lock-doc-face) . gud-down)) | ||
| 223 | ([menu-bar up] | ||
| 224 | . (,(propertize "up" 'face 'font-lock-doc-face) . gud-up)) | ||
| 225 | ([menu-bar finish] | ||
| 226 | . (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish)) | ||
| 227 | ([menu-bar step] | ||
| 228 | . (,(propertize "step" 'face 'font-lock-doc-face) . gud-step)) | ||
| 229 | ([menu-bar next] | ||
| 230 | . (,(propertize "next" 'face 'font-lock-doc-face) . gud-next)) | ||
| 231 | ([menu-bar until] menu-item | ||
| 232 | ,(propertize "until" 'face 'font-lock-doc-face) gud-until | ||
| 233 | :visible (memq gud-minor-mode '(gdbmi gdba gdb perldb))) | ||
| 234 | ([menu-bar cont] menu-item | ||
| 235 | ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont | ||
| 236 | :visible (not (eq gud-minor-mode 'gdba))) | ||
| 237 | ([menu-bar run] menu-item | ||
| 238 | ,(propertize "run" 'face 'font-lock-doc-face) gud-run | ||
| 239 | :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) | ||
| 240 | ([menu-bar go] menu-item | ||
| 241 | ,(propertize " go " 'face 'font-lock-doc-face) gud-go | ||
| 242 | :visible (and (not gud-running) | ||
| 243 | (eq gud-minor-mode 'gdba))) | ||
| 244 | ([menu-bar stop] menu-item | ||
| 245 | ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob | ||
| 246 | :visible (or gud-running | ||
| 247 | (not (eq gud-minor-mode 'gdba)))) | ||
| 248 | ([menu-bar print] | ||
| 249 | . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print)) | ||
| 250 | ([menu-bar tools] . undefined) | ||
| 251 | ([menu-bar buffer] . undefined) | ||
| 252 | ([menu-bar options] . undefined) | ||
| 253 | ([menu-bar edit] . undefined) | ||
| 254 | ([menu-bar file] . undefined)))) | ||
| 218 | "Map used in visited files.") | 255 | "Map used in visited files.") |
| 219 | 256 | ||
| 220 | (let ((m (assq 'gud-minor-mode minor-mode-map-alist))) | 257 | (let ((m (assq 'gud-minor-mode minor-mode-map-alist))) |
| @@ -686,14 +723,13 @@ text command mode to debug multiple programs within one Emacs | |||
| 686 | session." | 723 | session." |
| 687 | (interactive (list (gud-query-cmdline 'gdb))) | 724 | (interactive (list (gud-query-cmdline 'gdb))) |
| 688 | 725 | ||
| 689 | (if (and gud-comint-buffer | 726 | (when (and gud-comint-buffer |
| 690 | (buffer-name gud-comint-buffer) | 727 | (buffer-name gud-comint-buffer) |
| 691 | (get-buffer-process gud-comint-buffer) | 728 | (get-buffer-process gud-comint-buffer) |
| 692 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))) | 729 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))) |
| 693 | (let ((same-window-regexps)) | 730 | (gdb-restore-windows) |
| 694 | (display-buffer gud-comint-buffer) | ||
| 695 | (error | 731 | (error |
| 696 | "Multiple debugging requires restarting in text command mode"))) | 732 | "Multiple debugging requires restarting in text command mode")) |
| 697 | 733 | ||
| 698 | (gud-common-init command-line nil 'gud-gdb-marker-filter) | 734 | (gud-common-init command-line nil 'gud-gdb-marker-filter) |
| 699 | (set (make-local-variable 'gud-minor-mode) 'gdb) | 735 | (set (make-local-variable 'gud-minor-mode) 'gdb) |
| @@ -2268,6 +2304,8 @@ gud, see `gud-mode'." | |||
| 2268 | (gud-def gud-up "up\C-Mwhere" "<" "Up one stack frame.") | 2304 | (gud-def gud-up "up\C-Mwhere" "<" "Up one stack frame.") |
| 2269 | (gud-def gud-down "down\C-Mwhere" ">" "Up one stack frame.") | 2305 | (gud-def gud-down "down\C-Mwhere" ">" "Up one stack frame.") |
| 2270 | (gud-def gud-run "run" nil "Run the program.") ;if VM start using jdb | 2306 | (gud-def gud-run "run" nil "Run the program.") ;if VM start using jdb |
| 2307 | (gud-def gud-print "print %e" "\C-p" "Evaluate Java expression at point.") | ||
| 2308 | |||
| 2271 | 2309 | ||
| 2272 | (setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ") | 2310 | (setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ") |
| 2273 | (setq paragraph-start comint-prompt-regexp) | 2311 | (setq paragraph-start comint-prompt-regexp) |
| @@ -2817,7 +2855,9 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2817 | (when (looking-at comint-prompt-regexp) | 2855 | (when (looking-at comint-prompt-regexp) |
| 2818 | (set-marker gud-delete-prompt-marker (point)) | 2856 | (set-marker gud-delete-prompt-marker (point)) |
| 2819 | (set-marker-insertion-type gud-delete-prompt-marker t)) | 2857 | (set-marker-insertion-type gud-delete-prompt-marker t)) |
| 2820 | (insert (concat expr " = "))))) | 2858 | (unless (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) |
| 2859 | 'jdb) | ||
| 2860 | (insert (concat expr " = ")))))) | ||
| 2821 | expr)) | 2861 | expr)) |
| 2822 | 2862 | ||
| 2823 | ;; The next eight functions are hacked from gdbsrc.el by | 2863 | ;; The next eight functions are hacked from gdbsrc.el by |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 3bc1c55cc7d..9f01787b336 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -184,7 +184,6 @@ | |||
| 184 | ;; (5) Hideshow interacts badly with Ediff and `vc-diff'. At the moment, the | 184 | ;; (5) Hideshow interacts badly with Ediff and `vc-diff'. At the moment, the |
| 185 | ;; suggested workaround is to turn off hideshow entirely, for example: | 185 | ;; suggested workaround is to turn off hideshow entirely, for example: |
| 186 | ;; | 186 | ;; |
| 187 | ;; (defun turn-off-hideshow () (hs-minor-mode -1)) | ||
| 188 | ;; (add-hook 'ediff-prepare-buffer-hook 'turn-off-hideshow) | 187 | ;; (add-hook 'ediff-prepare-buffer-hook 'turn-off-hideshow) |
| 189 | ;; (add-hook 'vc-before-checkin-hook 'turn-off-hideshow) | 188 | ;; (add-hook 'vc-before-checkin-hook 'turn-off-hideshow) |
| 190 | ;; | 189 | ;; |
| @@ -908,7 +907,7 @@ Key bindings: | |||
| 908 | (hs-grok-mode-type) | 907 | (hs-grok-mode-type) |
| 909 | ;; Turn off this mode if we change major modes. | 908 | ;; Turn off this mode if we change major modes. |
| 910 | (add-hook 'change-major-mode-hook | 909 | (add-hook 'change-major-mode-hook |
| 911 | (lambda () (hs-minor-mode -1)) | 910 | 'turn-off-hideshow |
| 912 | nil t) | 911 | nil t) |
| 913 | (easy-menu-add hs-minor-mode-menu) | 912 | (easy-menu-add hs-minor-mode-menu) |
| 914 | (set (make-local-variable 'line-move-ignore-invisible) t) | 913 | (set (make-local-variable 'line-move-ignore-invisible) t) |
| @@ -920,6 +919,11 @@ Key bindings: | |||
| 920 | (hs-show-all))) | 919 | (hs-show-all))) |
| 921 | (run-hooks 'hs-minor-mode-hook)) | 920 | (run-hooks 'hs-minor-mode-hook)) |
| 922 | 921 | ||
| 922 | ;;;###autoload | ||
| 923 | (defun turn-off-hideshow () | ||
| 924 | "Unconditionally turn off `hs-minor-mode'." | ||
| 925 | (hs-minor-mode -1)) | ||
| 926 | |||
| 923 | ;;--------------------------------------------------------------------------- | 927 | ;;--------------------------------------------------------------------------- |
| 924 | ;; load-time actions | 928 | ;; load-time actions |
| 925 | 929 | ||
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index aa2d1b32d10..bcecdeafa0f 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -2698,7 +2698,7 @@ in the current routine." | |||
| 2698 | (class (nth 2 module))) | 2698 | (class (nth 2 module))) |
| 2699 | (if module | 2699 | (if module |
| 2700 | (progn | 2700 | (progn |
| 2701 | (setq module (idlwave-make-full-name (nth 2 module) (car module))) | 2701 | (setq module (idlwave-make-full-name class name)) |
| 2702 | (idlwave-shell-module-source-query module type) | 2702 | (idlwave-shell-module-source-query module type) |
| 2703 | (idlwave-shell-set-bp-in-module name type class)) | 2703 | (idlwave-shell-set-bp-in-module name type class)) |
| 2704 | (error "No identifier at point")))) | 2704 | (error "No identifier at point")))) |
| @@ -2707,14 +2707,15 @@ in the current routine." | |||
| 2707 | (defun idlwave-shell-set-bp-in-module (name type class) | 2707 | (defun idlwave-shell-set-bp-in-module (name type class) |
| 2708 | "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist' | 2708 | "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist' |
| 2709 | contains an entry for that module." | 2709 | contains an entry for that module." |
| 2710 | (let ((source-file | 2710 | (let* ((module (idlwave-make-full-name class name)) |
| 2711 | (car-safe (cdr-safe | 2711 | (source-file |
| 2712 | (or | 2712 | (car-safe (cdr-safe |
| 2713 | (assoc (upcase (idlwave-make-full-name class name)) | 2713 | (or |
| 2714 | idlwave-shell-sources-alist) | 2714 | (assoc (upcase module) |
| 2715 | (nth 3 (idlwave-best-rinfo-assoc name type class | 2715 | idlwave-shell-sources-alist) |
| 2716 | (idlwave-routines))))))) | 2716 | (nth 3 (idlwave-best-rinfo-assoc name type class |
| 2717 | buf) | 2717 | (idlwave-routines))))))) |
| 2718 | buf) | ||
| 2718 | (if (or (not source-file) | 2719 | (if (or (not source-file) |
| 2719 | (not (file-regular-p source-file)) | 2720 | (not (file-regular-p source-file)) |
| 2720 | (not (setq buf | 2721 | (not (setq buf |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index c4349e9c092..d29e56ce75d 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -3487,6 +3487,7 @@ if `idlwave-auto-fill-split-string' is non-nil." | |||
| 3487 | (idlwave-indent-line) | 3487 | (idlwave-indent-line) |
| 3488 | ;; Prevent actions do-auto-fill which calls indent-line-function. | 3488 | ;; Prevent actions do-auto-fill which calls indent-line-function. |
| 3489 | (let (idlwave-do-actions | 3489 | (let (idlwave-do-actions |
| 3490 | (paragraph-separate ".") | ||
| 3490 | (fill-nobreak-predicate | 3491 | (fill-nobreak-predicate |
| 3491 | (if (and (idlwave-in-quote) | 3492 | (if (and (idlwave-in-quote) |
| 3492 | idlwave-auto-fill-split-string) | 3493 | idlwave-auto-fill-split-string) |
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index 734a86b0b99..bd31f731693 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el | |||
| @@ -118,14 +118,19 @@ | |||
| 118 | (defun m4-m4-buffer () | 118 | (defun m4-m4-buffer () |
| 119 | "Send contents of the current buffer to m4." | 119 | "Send contents of the current buffer to m4." |
| 120 | (interactive) | 120 | (interactive) |
| 121 | (shell-command-on-region (point-min) (point-max) m4-program "*m4-output*" | 121 | (shell-command-on-region |
| 122 | nil) | 122 | (point-min) (point-max) |
| 123 | (mapconcat 'identity (cons m4-program m4-program-options) "\s") | ||
| 124 | "*m4-output*" nil) | ||
| 123 | (switch-to-buffer-other-window "*m4-output*")) | 125 | (switch-to-buffer-other-window "*m4-output*")) |
| 124 | 126 | ||
| 125 | (defun m4-m4-region () | 127 | (defun m4-m4-region () |
| 126 | "Send contents of the current region to m4." | 128 | "Send contents of the current region to m4." |
| 127 | (interactive) | 129 | (interactive) |
| 128 | (shell-command-on-region (point) (mark) m4-program "*m4-output*" nil) | 130 | (shell-command-on-region |
| 131 | (point) (mark) | ||
| 132 | (mapconcat 'identity (cons m4-program m4-program-options) "\s") | ||
| 133 | "*m4-output*" nil) | ||
| 129 | (switch-to-buffer-other-window "*m4-output*")) | 134 | (switch-to-buffer-other-window "*m4-output*")) |
| 130 | 135 | ||
| 131 | ;;;###autoload | 136 | ;;;###autoload |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 078e94ffbf4..255f63aed41 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -391,6 +391,7 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 391 | "*Indentation of Perl statements with respect to containing block." | 391 | "*Indentation of Perl statements with respect to containing block." |
| 392 | :type 'integer | 392 | :type 'integer |
| 393 | :group 'perl) | 393 | :group 'perl) |
| 394 | (put 'perl-indent-level 'safe-local-variable 'integerp) | ||
| 394 | (defcustom perl-continued-statement-offset 4 | 395 | (defcustom perl-continued-statement-offset 4 |
| 395 | "*Extra indent for lines not starting new statements." | 396 | "*Extra indent for lines not starting new statements." |
| 396 | :type 'integer | 397 | :type 'integer |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 226d4bdc62d..e57c7e639c9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -981,11 +981,15 @@ don't move and return nil. Otherwise return t." | |||
| 981 | (_ (if (python-comment-line-p) | 981 | (_ (if (python-comment-line-p) |
| 982 | (python-skip-comments/blanks t))) | 982 | (python-skip-comments/blanks t))) |
| 983 | (ci (current-indentation)) | 983 | (ci (current-indentation)) |
| 984 | (open (python-open-block-statement-p))) | 984 | (open (python-open-block-statement-p)) |
| 985 | opoint) | ||
| 985 | (if (and (zerop ci) (not open)) | 986 | (if (and (zerop ci) (not open)) |
| 986 | (not (goto-char point)) | 987 | (not (goto-char point)) |
| 987 | (catch 'done | 988 | (catch 'done |
| 988 | (while (zerop (python-next-statement)) | 989 | (setq opoint (point)) |
| 990 | (while (and (zerop (python-next-statement)) | ||
| 991 | (not (= opoint (point)))) | ||
| 992 | (setq opoint (point)) | ||
| 989 | (when (or (and open (<= (current-indentation) ci)) | 993 | (when (or (and open (<= (current-indentation) ci)) |
| 990 | (< (current-indentation) ci)) | 994 | (< (current-indentation) ci)) |
| 991 | (python-skip-comments/blanks t) | 995 | (python-skip-comments/blanks t) |
| @@ -2225,6 +2229,7 @@ with skeleton expansions for compound statement templates. | |||
| 2225 | ;; . python-font-lock-syntactic-face-function) | 2229 | ;; . python-font-lock-syntactic-face-function) |
| 2226 | )) | 2230 | )) |
| 2227 | (set (make-local-variable 'parse-sexp-lookup-properties) t) | 2231 | (set (make-local-variable 'parse-sexp-lookup-properties) t) |
| 2232 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | ||
| 2228 | (set (make-local-variable 'comment-start) "# ") | 2233 | (set (make-local-variable 'comment-start) "# ") |
| 2229 | (set (make-local-variable 'indent-line-function) #'python-indent-line) | 2234 | (set (make-local-variable 'indent-line-function) #'python-indent-line) |
| 2230 | (set (make-local-variable 'indent-region-function) #'python-indent-region) | 2235 | (set (make-local-variable 'indent-region-function) #'python-indent-region) |