diff options
| author | K. Handa | 2016-01-14 21:55:43 +0900 |
|---|---|---|
| committer | K. Handa | 2016-01-14 21:55:43 +0900 |
| commit | 641a3472ef245157ebcb2114f2d608cb3cb401a7 (patch) | |
| tree | 85e524c8d12caca29588382205f536b2008edc55 /lisp/progmodes | |
| parent | 9835757013569673854b692ccbb58bfb3c3ed1f7 (diff) | |
| parent | ee83b77f5ddede0fed518d0c23cf0ae38ce5b745 (diff) | |
| download | emacs-641a3472ef245157ebcb2114f2d608cb3cb401a7.tar.gz emacs-641a3472ef245157ebcb2114f2d608cb3cb401a7.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/progmodes')
86 files changed, 402 insertions, 242 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 529b691ee79..12ab5b01ab3 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ada-mode.el --- major-mode for editing Ada sources | 1 | ;;; ada-mode.el --- major-mode for editing Ada sources |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-1995, 1997-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-1995, 1997-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Rolf Ebert <ebert@inf.enst.fr> | 5 | ;; Author: Rolf Ebert <ebert@inf.enst.fr> |
| 6 | ;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> | 6 | ;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> |
diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el index 3b71c5987ed..51a8972a1b0 100644 --- a/lisp/progmodes/ada-prj.el +++ b/lisp/progmodes/ada-prj.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ada-prj.el --- GUI editing of project files for the ada-mode | 1 | ;;; ada-prj.el --- GUI editing of project files for the ada-mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Emmanuel Briot <briot@gnat.com> | 5 | ;; Author: Emmanuel Briot <briot@gnat.com> |
| 6 | ;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org> | 6 | ;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org> |
diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index 302bbc9a690..b3f497afb1d 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates | 1 | ;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1987, 1993-1994, 1996-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1987, 1993-1994, 1996-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Authors: Daniel Pfeiffer | 6 | ;; Authors: Daniel Pfeiffer |
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 0ea33c16878..8518163a1b7 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; ada-xref.el --- for lookup and completion in Ada mode | 1 | ;; ada-xref.el --- for lookup and completion in Ada mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> | 5 | ;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> |
| 6 | ;; Rolf Ebert <ebert@inf.enst.fr> | 6 | ;; Rolf Ebert <ebert@inf.enst.fr> |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 9cac400c27b..20880a806fd 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; antlr-mode.el --- major mode for ANTLR grammar files | 1 | ;;; antlr-mode.el --- major mode for ANTLR grammar files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Christoph Wedler <Christoph.Wedler@sap.com> | 5 | ;; Author: Christoph Wedler <Christoph.Wedler@sap.com> |
| 6 | ;; Keywords: languages, ANTLR, code generator | 6 | ;; Keywords: languages, ANTLR, code generator |
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 7df6a5d1de4..40c2b771a15 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; asm-mode.el --- mode for editing assembler code | 1 | ;;; asm-mode.el --- mode for editing assembler code |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1991, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1991, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el index 0bcc315446c..205e6636291 100644 --- a/lisp/progmodes/autoconf.el +++ b/lisp/progmodes/autoconf.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; autoconf.el --- mode for editing Autoconf configure.ac files | 1 | ;;; autoconf.el --- mode for editing Autoconf configure.ac files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dave Love <fx@gnu.org> | 5 | ;; Author: Dave Love <fx@gnu.org> |
| 6 | ;; Keywords: languages | 6 | ;; Keywords: languages |
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el index 2c5f192bf87..78c30bfb45e 100644 --- a/lisp/progmodes/bat-mode.el +++ b/lisp/progmodes/bat-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; bat-mode.el --- Major mode for editing DOS/Windows scripts | 1 | ;;; bat-mode.el --- Major mode for editing DOS/Windows scripts |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2008-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2008-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Arni Magnusson <arnima@hafro.is> | 5 | ;; Author: Arni Magnusson <arnima@hafro.is> |
| 6 | ;; Keywords: languages | 6 | ;; Keywords: languages |
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 921a904191c..50a2ff63daa 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; bug-reference.el --- buttonize bug references | 1 | ;; bug-reference.el --- buttonize bug references |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Tom Tromey <tromey@redhat.com> | 5 | ;; Author: Tom Tromey <tromey@redhat.com> |
| 6 | ;; Created: 21 Mar 2007 | 6 | ;; Created: 21 Mar 2007 |
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el index 1e3cb8e16f9..d59503be61a 100644 --- a/lisp/progmodes/cc-align.el +++ b/lisp/progmodes/cc-align.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-align.el --- custom indentation functions for CC Mode | 1 | ;;; cc-align.el --- custom indentation functions for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2004- Alan Mackenzie | 5 | ;; Authors: 2004- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 19a95aad676..525a7481965 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-awk.el --- AWK specific code within cc-mode. | 1 | ;;; cc-awk.el --- AWK specific code within cc-mode. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1994, 1996, 2000-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1988, 1994, 1996, 2000-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el) | 6 | ;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el) |
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el index d3b4db74c16..47ff8e43721 100644 --- a/lisp/progmodes/cc-bytecomp.el +++ b/lisp/progmodes/cc-bytecomp.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-bytecomp.el --- compile time setup for proper compilation | 1 | ;;; cc-bytecomp.el --- compile time setup for proper compilation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Martin Stjernholm | 5 | ;; Author: Martin Stjernholm |
| 6 | ;; Maintainer: bug-cc-mode@gnu.org | 6 | ;; Maintainer: bug-cc-mode@gnu.org |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 32ce8c6a249..6761de11700 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-cmds.el --- user level commands for CC Mode | 1 | ;;; cc-cmds.el --- user level commands for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2003- Alan Mackenzie | 5 | ;; Authors: 2003- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
| @@ -1121,35 +1121,15 @@ numeric argument is supplied, or the point is inside a literal." | |||
| 1121 | (looking-at "<<")) | 1121 | (looking-at "<<")) |
| 1122 | (>= (match-end 0) final-pos))) | 1122 | (>= (match-end 0) final-pos))) |
| 1123 | 1123 | ||
| 1124 | ;; It's a >. Either a C++ >> operator. ...... | 1124 | ;; It's a >. Either a template/generic terminator ... |
| 1125 | (or (and (c-major-mode-is 'c++-mode) | 1125 | (or (c-get-char-property (1- final-pos) 'syntax-table) |
| 1126 | ;; or a C++ >> operator. | ||
| 1127 | (and (c-major-mode-is 'c++-mode) | ||
| 1126 | (progn | 1128 | (progn |
| 1127 | (goto-char (1- final-pos)) | 1129 | (goto-char (1- final-pos)) |
| 1128 | (c-beginning-of-current-token) | 1130 | (c-beginning-of-current-token) |
| 1129 | (looking-at ">>")) | 1131 | (looking-at ">>")) |
| 1130 | (>= (match-end 0) final-pos)) | 1132 | (>= (match-end 0) final-pos)))))) |
| 1131 | ;; ...., or search back for a < which isn't already marked as an | ||
| 1132 | ;; opening template delimiter. | ||
| 1133 | (save-restriction | ||
| 1134 | (widen) | ||
| 1135 | ;; Narrow to avoid `c-forward-<>-arglist' below searching past | ||
| 1136 | ;; our position. | ||
| 1137 | (narrow-to-region (point-min) final-pos) | ||
| 1138 | (goto-char final-pos) | ||
| 1139 | (while | ||
| 1140 | (and | ||
| 1141 | (progn | ||
| 1142 | (c-syntactic-skip-backward "^<;}" nil t) | ||
| 1143 | (eq (char-before) ?<)) | ||
| 1144 | (progn | ||
| 1145 | (backward-char) | ||
| 1146 | (looking-at "\\s(")))) | ||
| 1147 | (and (eq (char-after) ?<) | ||
| 1148 | (not (looking-at "\\s(")) | ||
| 1149 | (progn (c-backward-syntactic-ws) | ||
| 1150 | (c-simple-skip-symbol-backward)) | ||
| 1151 | (or (looking-at c-opt-<>-sexp-key) | ||
| 1152 | (not (looking-at c-keywords-regexp))))))))) | ||
| 1153 | 1133 | ||
| 1154 | (goto-char final-pos) | 1134 | (goto-char final-pos) |
| 1155 | (when found-delim | 1135 | (when found-delim |
| @@ -1157,11 +1137,9 @@ numeric argument is supplied, or the point is inside a literal." | |||
| 1157 | (when (and (eq (char-before) ?>) | 1137 | (when (and (eq (char-before) ?>) |
| 1158 | (not executing-kbd-macro) | 1138 | (not executing-kbd-macro) |
| 1159 | blink-paren-function) | 1139 | blink-paren-function) |
| 1160 | ;; Currently (2014-10-19), the syntax-table text properties on < and > | 1140 | ;; From now (2016-01-01), the syntax-table text properties on < and > |
| 1161 | ;; are only applied in code called during Emacs redisplay. We thus | 1141 | ;; are applied in an after-change function, not during redisplay. Hence |
| 1162 | ;; explicitly cause a redisplay so that these properties have been | 1142 | ;; we no longer need to call (sit-for 0) for blink paren to work. |
| 1163 | ;; applied when `blink-paren-function' gets called. | ||
| 1164 | (sit-for 0) | ||
| 1165 | (funcall blink-paren-function))))) | 1143 | (funcall blink-paren-function))))) |
| 1166 | 1144 | ||
| 1167 | (defun c-electric-paren (arg) | 1145 | (defun c-electric-paren (arg) |
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 8eed4b1b86e..2056f3907b8 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-defs.el --- compile time definitions for CC Mode | 1 | ;;; cc-defs.el --- compile time definitions for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2003- Alan Mackenzie | 5 | ;; Authors: 2003- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
| @@ -656,23 +656,35 @@ right side of it." | |||
| 656 | ;; Wrappers for common scan-lists cases, mainly because it's almost | 656 | ;; Wrappers for common scan-lists cases, mainly because it's almost |
| 657 | ;; impossible to get a feel for how that function works. | 657 | ;; impossible to get a feel for how that function works. |
| 658 | 658 | ||
| 659 | (defmacro c-go-list-forward () | 659 | (defmacro c-go-list-forward (&optional pos limit) |
| 660 | "Move backward across one balanced group of parentheses. | 660 | "Move forward across one balanced group of parentheses starting at POS or |
| 661 | point. Return POINT when we succeed, NIL when we fail. In the latter case, | ||
| 662 | leave point unmoved. | ||
| 661 | 663 | ||
| 662 | Return POINT when we succeed, NIL when we fail. In the latter case, leave | 664 | A LIMIT for the search may be given. The start position is assumed to be |
| 663 | point unmoved." | 665 | before it." |
| 664 | `(c-safe (let ((endpos (scan-lists (point) 1 0))) | 666 | (let ((res `(c-safe (goto-char (scan-lists ,(or pos `(point)) 1 0)) (point)))) |
| 665 | (goto-char endpos) | 667 | (if limit |
| 666 | endpos))) | 668 | `(save-restriction |
| 669 | (if ,limit | ||
| 670 | (narrow-to-region (point-min) ,limit)) | ||
| 671 | ,res) | ||
| 672 | res))) | ||
| 667 | 673 | ||
| 668 | (defmacro c-go-list-backward () | 674 | (defmacro c-go-list-backward (&optional pos limit) |
| 669 | "Move backward across one balanced group of parentheses. | 675 | "Move backward across one balanced group of parentheses starting at POS or |
| 676 | point. Return POINT when we succeed, NIL when we fail. In the latter case, | ||
| 677 | leave point unmoved. | ||
| 670 | 678 | ||
| 671 | Return POINT when we succeed, NIL when we fail. In the latter case, leave | 679 | A LIMIT for the search may be given. The start position is assumed to be |
| 672 | point unmoved." | 680 | after it." |
| 673 | `(c-safe (let ((endpos (scan-lists (point) -1 0))) | 681 | (let ((res `(c-safe (goto-char (scan-lists ,(or pos `(point)) -1 0)) (point)))) |
| 674 | (goto-char endpos) | 682 | (if limit |
| 675 | endpos))) | 683 | `(save-restriction |
| 684 | (if ,limit | ||
| 685 | (narrow-to-region ,limit (point-max))) | ||
| 686 | ,res) | ||
| 687 | res))) | ||
| 676 | 688 | ||
| 677 | (defmacro c-up-list-forward (&optional pos limit) | 689 | (defmacro c-up-list-forward (&optional pos limit) |
| 678 | "Return the first position after the list sexp containing POS, | 690 | "Return the first position after the list sexp containing POS, |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index dbc55f5e0ef..b08c555e34f 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-engine.el --- core syntax guessing engine for CC mode -*- coding: utf-8 -*- | 1 | ;;; cc-engine.el --- core syntax guessing engine for CC mode -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2001- Alan Mackenzie | 5 | ;; Authors: 2001- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
| @@ -5577,8 +5577,9 @@ comment at the start of cc-engine.el for more info." | |||
| 5577 | 5577 | ||
| 5578 | (defun c-before-change-check-<>-operators (beg end) | 5578 | (defun c-before-change-check-<>-operators (beg end) |
| 5579 | ;; Unmark certain pairs of "< .... >" which are currently marked as | 5579 | ;; Unmark certain pairs of "< .... >" which are currently marked as |
| 5580 | ;; template/generic delimiters. (This marking is via syntax-table | 5580 | ;; template/generic delimiters. (This marking is via syntax-table text |
| 5581 | ;; text properties). | 5581 | ;; properties), and expand the (c-new-BEG c-new-END) region to include all |
| 5582 | ;; unmarked < and > operators within the certain bounds (see below). | ||
| 5582 | ;; | 5583 | ;; |
| 5583 | ;; These pairs are those which are in the current "statement" (i.e., | 5584 | ;; These pairs are those which are in the current "statement" (i.e., |
| 5584 | ;; the region between the {, }, or ; before BEG and the one after | 5585 | ;; the region between the {, }, or ; before BEG and the one after |
| @@ -5595,40 +5596,43 @@ comment at the start of cc-engine.el for more info." | |||
| 5595 | ;; FIXME!!! This routine ignores the possibility of macros entirely. | 5596 | ;; FIXME!!! This routine ignores the possibility of macros entirely. |
| 5596 | ;; 2010-01-29. | 5597 | ;; 2010-01-29. |
| 5597 | (save-excursion | 5598 | (save-excursion |
| 5598 | (let ((beg-lit-limits (progn (goto-char beg) (c-literal-limits))) | 5599 | (c-save-buffer-state |
| 5599 | (end-lit-limits (progn (goto-char end) (c-literal-limits))) | 5600 | ((beg-lit-limits (progn (goto-char beg) (c-literal-limits))) |
| 5600 | new-beg new-end need-new-beg need-new-end) | 5601 | (end-lit-limits (progn (goto-char end) (c-literal-limits))) |
| 5601 | ;; Locate the barrier before the changed region | 5602 | new-beg new-end beg-limit end-limit) |
| 5603 | ;; Locate the earliest < after the barrier before the changed region, | ||
| 5604 | ;; which isn't already marked as a paren. | ||
| 5602 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) | 5605 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) |
| 5603 | (c-syntactic-skip-backward "^;{}" (c-determine-limit 512)) | 5606 | (setq beg-limit (c-determine-limit 512)) |
| 5604 | (setq new-beg (point)) | ||
| 5605 | 5607 | ||
| 5606 | ;; Remove the syntax-table/category properties from each pertinent <...> | 5608 | ;; Remove the syntax-table/category properties from each pertinent <...> |
| 5607 | ;; pair. Firsly, the ones with the < before beg and > after beg. | 5609 | ;; pair. Firstly, the ones with the < before beg and > after beg.... |
| 5608 | (while | 5610 | (while (progn (c-syntactic-skip-backward "^;{}<" beg-limit) |
| 5609 | (c-search-forward-char-property 'syntax-table c-<-as-paren-syntax beg) | 5611 | (eq (char-before) ?<)) |
| 5610 | (if (c-clear-<-pair-props-if-match-after beg (1- (point))) | 5612 | (c-backward-token-2) |
| 5611 | (setq need-new-beg t))) | 5613 | (when (eq (char-after) ?<) |
| 5614 | (c-clear-<-pair-props-if-match-after beg))) | ||
| 5615 | (c-forward-syntactic-ws) | ||
| 5616 | (setq new-beg (point)) | ||
| 5612 | 5617 | ||
| 5613 | ;; Locate the barrier after END. | 5618 | ;; ...Then the ones with < before end and > after end. |
| 5614 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) | 5619 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) |
| 5615 | (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end) | 5620 | (setq end-limit (c-determine-+ve-limit 512)) |
| 5621 | (while (and (c-syntactic-re-search-forward "[;{}>]" end-limit 'end) | ||
| 5622 | (eq (char-before) ?>)) | ||
| 5623 | (c-end-of-current-token) | ||
| 5624 | (when (eq (char-before) ?>) | ||
| 5625 | (c-clear->-pair-props-if-match-before end (1- (point))))) | ||
| 5626 | (c-backward-syntactic-ws) | ||
| 5616 | (setq new-end (point)) | 5627 | (setq new-end (point)) |
| 5617 | 5628 | ||
| 5618 | ;; Remove syntax-table properties from the remaining pertinent <...> | ||
| 5619 | ;; pairs, those with a > after end and < before end. | ||
| 5620 | (while (c-search-backward-char-property 'syntax-table c->-as-paren-syntax end) | ||
| 5621 | (if (c-clear->-pair-props-if-match-before end) | ||
| 5622 | (setq need-new-end t))) | ||
| 5623 | |||
| 5624 | ;; Extend the fontification region, if needed. | 5629 | ;; Extend the fontification region, if needed. |
| 5625 | (when need-new-beg | 5630 | (and new-beg |
| 5626 | (goto-char new-beg) | 5631 | (< new-beg c-new-BEG) |
| 5627 | (c-forward-syntactic-ws) | 5632 | (setq c-new-BEG new-beg)) |
| 5628 | (and (< (point) c-new-BEG) (setq c-new-BEG (point)))) | 5633 | (and new-end |
| 5629 | 5634 | (> new-end c-new-END) | |
| 5630 | (when need-new-end | 5635 | (setq c-new-END new-end))))) |
| 5631 | (and (> new-end c-new-END) (setq c-new-END new-end)))))) | ||
| 5632 | 5636 | ||
| 5633 | (defun c-after-change-check-<>-operators (beg end) | 5637 | (defun c-after-change-check-<>-operators (beg end) |
| 5634 | ;; This is called from `after-change-functions' when | 5638 | ;; This is called from `after-change-functions' when |
| @@ -5668,7 +5672,28 @@ comment at the start of cc-engine.el for more info." | |||
| 5668 | (c-clear-<>-pair-props) | 5672 | (c-clear-<>-pair-props) |
| 5669 | (forward-char))))))) | 5673 | (forward-char))))))) |
| 5670 | 5674 | ||
| 5671 | 5675 | (defun c-restore-<>-properties (_beg _end _old-len) | |
| 5676 | ;; This function is called as an after-change function. It restores the | ||
| 5677 | ;; category/syntax-table properties on template/generic <..> pairs between | ||
| 5678 | ;; c-new-BEG and c-new-END. It may do hidden buffer changes. | ||
| 5679 | (c-save-buffer-state ((c-parse-and-markup-<>-arglists t) | ||
| 5680 | c-restricted-<>-arglists lit-limits) | ||
| 5681 | (goto-char c-new-BEG) | ||
| 5682 | (if (setq lit-limits (c-literal-limits)) | ||
| 5683 | (goto-char (cdr lit-limits))) | ||
| 5684 | (while (and (< (point) c-new-END) | ||
| 5685 | (c-syntactic-re-search-forward "<" c-new-END 'bound)) | ||
| 5686 | (backward-char) | ||
| 5687 | (save-excursion | ||
| 5688 | (c-backward-token-2) | ||
| 5689 | (setq c-restricted-<>-arglists | ||
| 5690 | (and (not (looking-at c-opt-<>-sexp-key)) | ||
| 5691 | (progn (c-backward-syntactic-ws) ; to ( or , | ||
| 5692 | (and (memq (char-before) '(?\( ?,)) ; what about <? | ||
| 5693 | (not (eq (c-get-char-property (point) 'c-type) | ||
| 5694 | 'c-decl-arg-start))))))) | ||
| 5695 | (or (c-forward-<>-arglist nil) | ||
| 5696 | (forward-char))))) | ||
| 5672 | 5697 | ||
| 5673 | ;; Handling of small scale constructs like types and names. | 5698 | ;; Handling of small scale constructs like types and names. |
| 5674 | 5699 | ||
| @@ -6616,16 +6641,22 @@ comment at the start of cc-engine.el for more info." | |||
| 6616 | res)) | 6641 | res)) |
| 6617 | 6642 | ||
| 6618 | (defun c-forward-annotation () | 6643 | (defun c-forward-annotation () |
| 6619 | ;; Used for Java code only at the moment. Assumes point is on the | 6644 | ;; Used for Java code only at the moment. Assumes point is on the @, moves |
| 6620 | ;; @, moves forward an annotation. returns nil if there is no | 6645 | ;; forward an annotation and returns t. Leaves point unmoved and returns |
| 6621 | ;; annotation at point. | 6646 | ;; nil if there is no annotation at point. |
| 6622 | (and (looking-at "@") | 6647 | (let ((pos (point))) |
| 6623 | (progn (forward-char) t) | 6648 | (or |
| 6624 | (c-forward-type) | 6649 | (and (looking-at "@") |
| 6625 | (progn (c-forward-syntactic-ws) t) | 6650 | (not (looking-at c-keywords-regexp)) |
| 6626 | (if (looking-at "(") | 6651 | (progn (forward-char) t) |
| 6627 | (c-go-list-forward) | 6652 | (looking-at c-symbol-key) |
| 6628 | t))) | 6653 | (progn (goto-char (match-end 0)) |
| 6654 | (c-forward-syntactic-ws) | ||
| 6655 | t) | ||
| 6656 | (if (looking-at "(") | ||
| 6657 | (c-go-list-forward) | ||
| 6658 | t)) | ||
| 6659 | (progn (goto-char pos) nil)))) | ||
| 6629 | 6660 | ||
| 6630 | (defmacro c-pull-open-brace (ps) | 6661 | (defmacro c-pull-open-brace (ps) |
| 6631 | ;; Pull the next open brace from PS (which has the form of paren-state), | 6662 | ;; Pull the next open brace from PS (which has the form of paren-state), |
| @@ -6934,9 +6965,8 @@ comment at the start of cc-engine.el for more info." | |||
| 6934 | (when (or (looking-at c-prefix-spec-kwds-re) ;FIXME!!! includes auto | 6965 | (when (or (looking-at c-prefix-spec-kwds-re) ;FIXME!!! includes auto |
| 6935 | (and (c-major-mode-is 'java-mode) | 6966 | (and (c-major-mode-is 'java-mode) |
| 6936 | (looking-at "@[A-Za-z0-9]+"))) | 6967 | (looking-at "@[A-Za-z0-9]+"))) |
| 6937 | (save-match-data | 6968 | (if (save-match-data (looking-at c-typedef-key)) |
| 6938 | (if (looking-at c-typedef-key) | 6969 | (setq at-typedef t)) |
| 6939 | (setq at-typedef t))) | ||
| 6940 | (setq kwd-sym (c-keyword-sym (match-string 1))) | 6970 | (setq kwd-sym (c-keyword-sym (match-string 1))) |
| 6941 | (save-excursion | 6971 | (save-excursion |
| 6942 | (c-forward-keyword-clause 1) | 6972 | (c-forward-keyword-clause 1) |
| @@ -9081,6 +9111,11 @@ comment at the start of cc-engine.el for more info." | |||
| 9081 | (goto-char containing-sexp) | 9111 | (goto-char containing-sexp) |
| 9082 | (if (or (save-excursion | 9112 | (if (or (save-excursion |
| 9083 | (c-backward-syntactic-ws lim) | 9113 | (c-backward-syntactic-ws lim) |
| 9114 | (while (and (eq (char-before) ?>) | ||
| 9115 | (c-get-char-property (1- (point)) | ||
| 9116 | 'syntax-table) | ||
| 9117 | (c-go-list-backward nil lim)) | ||
| 9118 | (c-backward-syntactic-ws lim)) | ||
| 9084 | (and (> (point) (or lim (point-min))) | 9119 | (and (> (point) (or lim (point-min))) |
| 9085 | (c-on-identifier))) | 9120 | (c-on-identifier))) |
| 9086 | (and c-special-brace-lists | 9121 | (and c-special-brace-lists |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index ad112d720d8..03e67a99515 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-fonts.el --- font lock support for CC Mode | 1 | ;;; cc-fonts.el --- font lock support for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2003- Alan Mackenzie | 5 | ;; Authors: 2003- Alan Mackenzie |
| 6 | ;; 2002- Martin Stjernholm | 6 | ;; 2002- Martin Stjernholm |
| @@ -1157,15 +1157,6 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1157 | (setq pos (point)))))) ; acts to make the `while' form continue. | 1157 | (setq pos (point)))))) ; acts to make the `while' form continue. |
| 1158 | nil) | 1158 | nil) |
| 1159 | 1159 | ||
| 1160 | (defconst c-font-lock-maybe-decl-faces | ||
| 1161 | ;; List of faces that might be put at the start of a type when | ||
| 1162 | ;; `c-font-lock-declarations' runs. This needs to be evaluated to | ||
| 1163 | ;; ensure that face name aliases in Emacs are resolved. | ||
| 1164 | (list nil | ||
| 1165 | font-lock-type-face | ||
| 1166 | c-reference-face-name | ||
| 1167 | font-lock-keyword-face)) | ||
| 1168 | |||
| 1169 | (defun c-font-lock-declarations (limit) | 1160 | (defun c-font-lock-declarations (limit) |
| 1170 | ;; Fontify all the declarations, casts and labels from the point to LIMIT. | 1161 | ;; Fontify all the declarations, casts and labels from the point to LIMIT. |
| 1171 | ;; Assumes that strings and comments have been fontified already. | 1162 | ;; Assumes that strings and comments have been fontified already. |
| @@ -1205,6 +1196,9 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1205 | ;; Same as `max-type-decl-*', but used when we're before | 1196 | ;; Same as `max-type-decl-*', but used when we're before |
| 1206 | ;; `token-pos'. | 1197 | ;; `token-pos'. |
| 1207 | (max-type-decl-end-before-token 0) | 1198 | (max-type-decl-end-before-token 0) |
| 1199 | ;; End of <..> construct which has had c-<>-arg-sep c-type | ||
| 1200 | ;; properties set within it. | ||
| 1201 | (max-<>-end 0) | ||
| 1208 | ;; Set according to the context to direct the heuristics for | 1202 | ;; Set according to the context to direct the heuristics for |
| 1209 | ;; recognizing C++ templates. | 1203 | ;; recognizing C++ templates. |
| 1210 | c-restricted-<>-arglists | 1204 | c-restricted-<>-arglists |
| @@ -1253,7 +1247,7 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1253 | (c-find-decl-spots | 1247 | (c-find-decl-spots |
| 1254 | limit | 1248 | limit |
| 1255 | c-decl-start-re | 1249 | c-decl-start-re |
| 1256 | c-font-lock-maybe-decl-faces | 1250 | (eval c-maybe-decl-faces) |
| 1257 | 1251 | ||
| 1258 | (lambda (match-pos inside-macro) | 1252 | (lambda (match-pos inside-macro) |
| 1259 | ;; Note to maintainers: don't use `limit' inside this lambda form; | 1253 | ;; Note to maintainers: don't use `limit' inside this lambda form; |
| @@ -1347,6 +1341,28 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1347 | (setq decl-or-cast (c-forward-decl-or-cast-1 | 1341 | (setq decl-or-cast (c-forward-decl-or-cast-1 |
| 1348 | match-pos context last-cast-end)) | 1342 | match-pos context last-cast-end)) |
| 1349 | 1343 | ||
| 1344 | ;; Ensure that c-<>-arg-sep c-type properties are in place on the | ||
| 1345 | ;; commas separating the arguments inside template/generic <..>s. | ||
| 1346 | (when (and (eq (char-before match-pos) ?<) | ||
| 1347 | (> match-pos max-<>-end)) | ||
| 1348 | (save-excursion | ||
| 1349 | (goto-char match-pos) | ||
| 1350 | (c-backward-token-2) | ||
| 1351 | (if (and | ||
| 1352 | (eq (char-after) ?<) | ||
| 1353 | (let ((c-restricted-<>-arglists | ||
| 1354 | (save-excursion | ||
| 1355 | (c-backward-token-2) | ||
| 1356 | (and | ||
| 1357 | (not (looking-at c-opt-<>-sexp-key)) | ||
| 1358 | (progn (c-backward-syntactic-ws) | ||
| 1359 | (memq (char-before) '(?\( ?,))) | ||
| 1360 | (not (eq (c-get-char-property (1- (point)) | ||
| 1361 | 'c-type) | ||
| 1362 | 'c-decl-arg-start)))))) | ||
| 1363 | (c-forward-<>-arglist nil))) | ||
| 1364 | (setq max-<>-end (point))))) | ||
| 1365 | |||
| 1350 | (cond | 1366 | (cond |
| 1351 | ((eq decl-or-cast 'cast) | 1367 | ((eq decl-or-cast 'cast) |
| 1352 | ;; Save the position after the previous cast so we can feed | 1368 | ;; Save the position after the previous cast so we can feed |
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el index 4295fc72351..d957334f926 100644 --- a/lisp/progmodes/cc-guess.el +++ b/lisp/progmodes/cc-guess.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-guess.el --- guess indentation values by scanning existing code | 1 | ;;; cc-guess.el --- guess indentation values by scanning existing code |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2006, 2011-2015 Free Software | 3 | ;; Copyright (C) 1985, 1987, 1992-2006, 2011-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: 1994-1995 Barry A. Warsaw | 6 | ;; Author: 1994-1995 Barry A. Warsaw |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 1a07c4cd699..b52da3f662d 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-langs.el --- language specific settings for CC Mode -*- coding: utf-8 -*- | 1 | ;;; cc-langs.el --- language specific settings for CC Mode -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2002- Alan Mackenzie | 5 | ;; Authors: 2002- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
| @@ -499,8 +499,13 @@ parameters \(point-min) and \(point-max).") | |||
| 499 | ;; For documentation see the following c-lang-defvar of the same name. | 499 | ;; For documentation see the following c-lang-defvar of the same name. |
| 500 | ;; The value here may be a list of functions or a single function. | 500 | ;; The value here may be a list of functions or a single function. |
| 501 | t 'c-change-expand-fl-region | 501 | t 'c-change-expand-fl-region |
| 502 | (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP | 502 | (c objc) '(c-neutralize-syntax-in-and-mark-CPP |
| 503 | c-change-expand-fl-region) | 503 | c-change-expand-fl-region) |
| 504 | c++ '(c-neutralize-syntax-in-and-mark-CPP | ||
| 505 | c-restore-<>-properties | ||
| 506 | c-change-expand-fl-region) | ||
| 507 | java '(c-restore-<>-properties | ||
| 508 | c-change-expand-fl-region) | ||
| 504 | awk 'c-awk-extend-and-syntax-tablify-region) | 509 | awk 'c-awk-extend-and-syntax-tablify-region) |
| 505 | (c-lang-defvar c-before-font-lock-functions | 510 | (c-lang-defvar c-before-font-lock-functions |
| 506 | (let ((fs (c-lang-const c-before-font-lock-functions))) | 511 | (let ((fs (c-lang-const c-before-font-lock-functions))) |
| @@ -526,8 +531,8 @@ When the mode is initialized, these functions are called with | |||
| 526 | parameters \(point-min), \(point-max) and <buffer size>.") | 531 | parameters \(point-min), \(point-max) and <buffer size>.") |
| 527 | 532 | ||
| 528 | (c-lang-defconst c-before-context-fontification-functions | 533 | (c-lang-defconst c-before-context-fontification-functions |
| 529 | awk nil | 534 | t 'c-context-expand-fl-region |
| 530 | t 'c-context-expand-fl-region) | 535 | awk nil) |
| 531 | ;; For documentation see the following c-lang-defvar of the same name. | 536 | ;; For documentation see the following c-lang-defvar of the same name. |
| 532 | ;; The value here may be a list of functions or a single function. | 537 | ;; The value here may be a list of functions or a single function. |
| 533 | (c-lang-defvar c-before-context-fontification-functions | 538 | (c-lang-defvar c-before-context-fontification-functions |
| @@ -3246,6 +3251,19 @@ way." | |||
| 3246 | objc t) | 3251 | objc t) |
| 3247 | (c-lang-defvar c-type-decl-end-used (c-lang-const c-type-decl-end-used)) | 3252 | (c-lang-defvar c-type-decl-end-used (c-lang-const c-type-decl-end-used)) |
| 3248 | 3253 | ||
| 3254 | (c-lang-defconst c-maybe-decl-faces | ||
| 3255 | "List of faces that might be put at the start of a type when | ||
| 3256 | `c-font-lock-declarations' runs. This must be evaluated (with `eval') at | ||
| 3257 | runtime to get the actual list of faces. This ensures that face name | ||
| 3258 | aliases in Emacs are resolved." | ||
| 3259 | t '(list nil | ||
| 3260 | font-lock-type-face | ||
| 3261 | c-reference-face-name | ||
| 3262 | font-lock-keyword-face) | ||
| 3263 | java (append (c-lang-const c-maybe-decl-faces) | ||
| 3264 | '(font-lock-preprocessor-face))) | ||
| 3265 | (c-lang-defvar c-maybe-decl-faces (c-lang-const c-maybe-decl-faces)) | ||
| 3266 | |||
| 3249 | 3267 | ||
| 3250 | ;;; Wrap up the `c-lang-defvar' system. | 3268 | ;;; Wrap up the `c-lang-defvar' system. |
| 3251 | 3269 | ||
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index 51cb9203e72..92e56431b7e 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-menus.el --- imenu support for CC Mode | 1 | ;;; cc-menus.el --- imenu support for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 1998- Martin Stjernholm | 5 | ;; Authors: 1998- Martin Stjernholm |
| 6 | ;; 1992-1999 Barry A. Warsaw | 6 | ;; 1992-1999 Barry A. Warsaw |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 5d8af239972..738870b727a 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-mode.el --- major mode for editing C and similar languages | 1 | ;;; cc-mode.el --- major mode for editing C and similar languages |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2003- Alan Mackenzie | 5 | ;; Authors: 2003- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
| @@ -631,8 +631,11 @@ that requires a literal mode spec at compile time." | |||
| 631 | (font-lock-mode 1))) | 631 | (font-lock-mode 1))) |
| 632 | 632 | ||
| 633 | ;; Buffer local variables defining the region to be fontified by a font lock | 633 | ;; Buffer local variables defining the region to be fontified by a font lock |
| 634 | ;; after-change function. They are set in c-after-change to | 634 | ;; after-change function. They are initialized in c-before-change to |
| 635 | ;; after-change-functions' BEG and END, and may be modified by functions in | 635 | ;; before-change-functions' BEG and END. `c-new-END' is amended in |
| 636 | ;; c-after-change with after-change-functions' BEG, END, and OLD-LEN. These | ||
| 637 | ;; variables may be modified by any before/after-change function, in | ||
| 638 | ;; particular by functions in `c-get-state-before-change-functions' and | ||
| 636 | ;; `c-before-font-lock-functions'. | 639 | ;; `c-before-font-lock-functions'. |
| 637 | (defvar c-new-BEG 0) | 640 | (defvar c-new-BEG 0) |
| 638 | (make-variable-buffer-local 'c-new-BEG) | 641 | (make-variable-buffer-local 'c-new-BEG) |
| @@ -671,8 +674,9 @@ compatible with old code; callers should always specify it." | |||
| 671 | (funcall fn (point-min) (point-max))) | 674 | (funcall fn (point-min) (point-max))) |
| 672 | c-get-state-before-change-functions) | 675 | c-get-state-before-change-functions) |
| 673 | (mapc (lambda (fn) | 676 | (mapc (lambda (fn) |
| 674 | (funcall fn (point-min) (point-max) | 677 | (if (not (eq fn 'c-restore-<>-properties)) |
| 675 | (- (point-max) (point-min)))) | 678 | (funcall fn (point-min) (point-max) |
| 679 | (- (point-max) (point-min))))) | ||
| 676 | c-before-font-lock-functions)))) | 680 | c-before-font-lock-functions)))) |
| 677 | 681 | ||
| 678 | (set (make-local-variable 'outline-regexp) "[^#\n\^M]") | 682 | (set (make-local-variable 'outline-regexp) "[^#\n\^M]") |
| @@ -1032,6 +1036,8 @@ Note that the style variables are always made local to the buffer." | |||
| 1032 | c-just-done-before-change) ; guard against a spurious second | 1036 | c-just-done-before-change) ; guard against a spurious second |
| 1033 | ; invocation of before-change-functions. | 1037 | ; invocation of before-change-functions. |
| 1034 | (setq c-just-done-before-change t) | 1038 | (setq c-just-done-before-change t) |
| 1039 | ;; (c-new-BEG c-new-END) will be the region to fontify. | ||
| 1040 | (setq c-new-BEG beg c-new-END end) | ||
| 1035 | (setq c-maybe-stale-found-type nil) | 1041 | (setq c-maybe-stale-found-type nil) |
| 1036 | (save-restriction | 1042 | (save-restriction |
| 1037 | (save-match-data | 1043 | (save-match-data |
| @@ -1126,7 +1132,8 @@ Note that the style variables are always made local to the buffer." | |||
| 1126 | 1132 | ||
| 1127 | ;; (c-new-BEG c-new-END) will be the region to fontify. It may become | 1133 | ;; (c-new-BEG c-new-END) will be the region to fontify. It may become |
| 1128 | ;; larger than (beg end). | 1134 | ;; larger than (beg end). |
| 1129 | (setq c-new-BEG beg c-new-END end) | 1135 | ;; (setq c-new-BEG beg c-new-END end) |
| 1136 | (setq c-new-END (- (+ c-new-END (- end beg)) old-len)) | ||
| 1130 | 1137 | ||
| 1131 | (unless (c-called-from-text-property-change-p) | 1138 | (unless (c-called-from-text-property-change-p) |
| 1132 | (setq c-just-done-before-change nil) | 1139 | (setq c-just-done-before-change nil) |
| @@ -1245,7 +1252,8 @@ Note that the style variables are always made local to the buffer." | |||
| 1245 | (save-restriction | 1252 | (save-restriction |
| 1246 | (widen) | 1253 | (widen) |
| 1247 | (save-excursion | 1254 | (save-excursion |
| 1248 | (let ((new-beg beg) (new-end end) new-region) | 1255 | (let ((new-beg beg) (new-end end) |
| 1256 | (new-region (cons beg end))) | ||
| 1249 | (mapc (lambda (fn) | 1257 | (mapc (lambda (fn) |
| 1250 | (setq new-region (funcall fn new-beg new-end)) | 1258 | (setq new-region (funcall fn new-beg new-end)) |
| 1251 | (setq new-beg (car new-region) new-end (cdr new-region))) | 1259 | (setq new-beg (car new-region) new-end (cdr new-region))) |
| @@ -1328,12 +1336,13 @@ This function is called from `c-common-init', once per mode initialization." | |||
| 1328 | . c-mark-function))) | 1336 | . c-mark-function))) |
| 1329 | 1337 | ||
| 1330 | ;; Prevent `font-lock-default-fontify-region' extending the region it will | 1338 | ;; Prevent `font-lock-default-fontify-region' extending the region it will |
| 1331 | ;; fontify to whole lines by removing `font-lock-extend-region-whole-lines' | 1339 | ;; fontify to whole lines by removing `font-lock-extend-region-wholelines' |
| 1332 | ;; (and, coincidentally, `font-lock-extend-region-multiline' (which we do | 1340 | ;; from `font-lock-extend-region-functions'. (Emacs only). This fixes |
| 1333 | ;; not need)) from `font-lock-extend-region-functions'. (Emacs only). This | 1341 | ;; Emacs bug #19669. |
| 1334 | ;; fixes Emacs bug #19669. | ||
| 1335 | (when (boundp 'font-lock-extend-region-functions) | 1342 | (when (boundp 'font-lock-extend-region-functions) |
| 1336 | (setq font-lock-extend-region-functions nil)) | 1343 | (setq font-lock-extend-region-functions |
| 1344 | (delq 'font-lock-extend-region-wholelines | ||
| 1345 | font-lock-extend-region-functions))) | ||
| 1337 | 1346 | ||
| 1338 | (make-local-variable 'font-lock-fontify-region-function) | 1347 | (make-local-variable 'font-lock-fontify-region-function) |
| 1339 | (setq font-lock-fontify-region-function 'c-font-lock-fontify-region) | 1348 | (setq font-lock-fontify-region-function 'c-font-lock-fontify-region) |
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 527d4c4bd72..7859218f169 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-styles.el --- support for styles in CC Mode | 1 | ;;; cc-styles.el --- support for styles in CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2004- Alan Mackenzie | 5 | ;; Authors: 2004- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 9afece9e30b..8cee733ec8e 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-vars.el --- user customization variables for CC Mode | 1 | ;;; cc-vars.el --- user customization variables for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 2002- Alan Mackenzie | 5 | ;; Authors: 2002- Alan Mackenzie |
| 6 | ;; 1998- Martin Stjernholm | 6 | ;; 1998- Martin Stjernholm |
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 78c8d94576b..08302147204 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cfengine.el --- mode for editing Cfengine files | 1 | ;;; cfengine.el --- mode for editing Cfengine files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dave Love <fx@gnu.org> | 5 | ;; Author: Dave Love <fx@gnu.org> |
| 6 | ;; Maintainer: Ted Zlatanov <tzz@lifelogs.com> | 6 | ;; Maintainer: Ted Zlatanov <tzz@lifelogs.com> |
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 9953cae2bef..007619d31f6 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cmacexp.el --- expand C macros in a region | 1 | ;;; cmacexp.el --- expand C macros in a region |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1994, 1996, 2000-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1992, 1994, 1996, 2000-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Francesco Potortì <pot@gnu.org> | 6 | ;; Author: Francesco Potortì <pot@gnu.org> |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f13906680cf..b7ab408f744 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages -*- lexical-binding:t -*- | 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1993-1999, 2001-2015 Free Software | 3 | ;; Copyright (C) 1985-1987, 1993-1999, 2001-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Authors: Roland McGrath <roland@gnu.org>, | 6 | ;; Authors: Roland McGrath <roland@gnu.org>, |
| @@ -1125,6 +1125,16 @@ POS and RES.") | |||
| 1125 | (compilation-internal-error-properties | 1125 | (compilation-internal-error-properties |
| 1126 | file line end-line col end-col type fmt))) | 1126 | file line end-line col end-col type fmt))) |
| 1127 | 1127 | ||
| 1128 | (defun compilation-beginning-of-line (&optional n) | ||
| 1129 | "Like `beginning-of-line', but accounts for lines hidden by `selective-display'." | ||
| 1130 | (if (or (not (eq selective-display t)) | ||
| 1131 | (null n) | ||
| 1132 | (= n 1)) | ||
| 1133 | (beginning-of-line n) | ||
| 1134 | (re-search-forward "[\n\r]" nil 'end (1- n)) | ||
| 1135 | (if (< n 0) | ||
| 1136 | (beginning-of-line)))) | ||
| 1137 | |||
| 1128 | (defun compilation-move-to-column (col screen) | 1138 | (defun compilation-move-to-column (col screen) |
| 1129 | "Go to column COL on the current line. | 1139 | "Go to column COL on the current line. |
| 1130 | If SCREEN is non-nil, columns are screen columns, otherwise, they are | 1140 | If SCREEN is non-nil, columns are screen columns, otherwise, they are |
| @@ -1183,13 +1193,15 @@ FMTS is a list of format specs for transforming the file name. | |||
| 1183 | (goto-char (marker-position marker)) | 1193 | (goto-char (marker-position marker)) |
| 1184 | ;; Set end-marker if appropriate and go to line. | 1194 | ;; Set end-marker if appropriate and go to line. |
| 1185 | (if (not (or end-col end-line)) | 1195 | (if (not (or end-col end-line)) |
| 1186 | (beginning-of-line (- line marker-line -1)) | 1196 | (compilation-beginning-of-line (- line marker-line -1)) |
| 1187 | (beginning-of-line (- (or end-line line) marker-line -1)) | 1197 | (compilation-beginning-of-line (- (or end-line line) |
| 1198 | marker-line -1)) | ||
| 1188 | (if (or (null end-col) (< end-col 0)) | 1199 | (if (or (null end-col) (< end-col 0)) |
| 1189 | (end-of-line) | 1200 | (end-of-line) |
| 1190 | (compilation-move-to-column end-col screen-columns)) | 1201 | (compilation-move-to-column end-col screen-columns)) |
| 1191 | (setq end-marker (point-marker)) | 1202 | (setq end-marker (point-marker)) |
| 1192 | (when end-line (beginning-of-line (- line end-line -1)))) | 1203 | (when end-line |
| 1204 | (compilation-beginning-of-line (- line end-line -1)))) | ||
| 1193 | (if col | 1205 | (if col |
| 1194 | (compilation-move-to-column col screen-columns) | 1206 | (compilation-move-to-column col screen-columns) |
| 1195 | (forward-to-indentation 0)) | 1207 | (forward-to-indentation 0)) |
| @@ -2469,7 +2481,7 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 2469 | ;; Treat file's found lines in forward order, 1 by 1. | 2481 | ;; Treat file's found lines in forward order, 1 by 1. |
| 2470 | (dolist (line (reverse (cddr (compilation--loc->file-struct loc)))) | 2482 | (dolist (line (reverse (cddr (compilation--loc->file-struct loc)))) |
| 2471 | (when (car line) ; else this is a filename w/o a line# | 2483 | (when (car line) ; else this is a filename w/o a line# |
| 2472 | (beginning-of-line (- (car line) last -1)) | 2484 | (compilation-beginning-of-line (- (car line) last -1)) |
| 2473 | (setq last (car line))) | 2485 | (setq last (car line))) |
| 2474 | ;; Treat line's found columns and store/update a marker for each. | 2486 | ;; Treat line's found columns and store/update a marker for each. |
| 2475 | (dolist (col (cdr line)) | 2487 | (dolist (col (cdr line)) |
| @@ -2541,7 +2553,7 @@ displays at the top of the window; there is no arrow." | |||
| 2541 | (if (integerp compilation-context-lines) | 2553 | (if (integerp compilation-context-lines) |
| 2542 | (set-window-start w (save-excursion | 2554 | (set-window-start w (save-excursion |
| 2543 | (goto-char mk) | 2555 | (goto-char mk) |
| 2544 | (beginning-of-line | 2556 | (compilation-beginning-of-line |
| 2545 | (- 1 compilation-context-lines)) | 2557 | (- 1 compilation-context-lines)) |
| 2546 | (point))) | 2558 | (point))) |
| 2547 | ;; If there is no left fringe. | 2559 | ;; If there is no left fringe. |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index ab3aa7f993a..de546f7c1d4 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cperl-mode.el --- Perl code editing commands for Emacs | 1 | ;;; cperl-mode.el --- Perl code editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1991-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985-1987, 1991-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Ilya Zakharevich | 5 | ;; Author: Ilya Zakharevich |
| 6 | ;; Bob Olson | 6 | ;; Bob Olson |
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index faa917a87a7..7d641ab47f0 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cpp.el --- highlight or hide text according to cpp conditionals | 1 | ;;; cpp.el --- highlight or hide text according to cpp conditionals |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-1995, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-1995, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | 5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
| 6 | ;; Keywords: c, faces, tools | 6 | ;; Keywords: c, faces, tools |
diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el index eae96f01c3c..6c800ab2512 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-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Anders Lindgren | 5 | ;; Author: Anders Lindgren |
| 6 | ;; Keywords: c, languages, faces | 6 | ;; Keywords: c, languages, faces |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 8c8bef06ecc..ef4ac912d0c 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; dcl-mode.el --- major mode for editing DCL command files | 1 | ;;; dcl-mode.el --- major mode for editing DCL command files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Odd Gripenstam <gripenstamol@decus.se> | 5 | ;; Author: Odd Gripenstam <gripenstamol@decus.se> |
| 6 | ;; Maintainer: Odd Gripenstam <gripenstamol@decus.se> | 6 | ;; Maintainer: Odd Gripenstam <gripenstamol@decus.se> |
diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el index d409139d27f..553beae4db5 100644 --- a/lisp/progmodes/ebnf-abn.el +++ b/lisp/progmodes/ebnf-abn.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-abn.el --- parser for ABNF (Augmented BNF) | 1 | ;;; ebnf-abn.el --- parser for ABNF (Augmented BNF) |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el index e339818cf30..a2d51c940a7 100644 --- a/lisp/progmodes/ebnf-bnf.el +++ b/lisp/progmodes/ebnf-bnf.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-bnf.el --- parser for EBNF | 1 | ;;; ebnf-bnf.el --- parser for EBNF |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el index 35bd8df9c99..0963d27784e 100644 --- a/lisp/progmodes/ebnf-dtd.el +++ b/lisp/progmodes/ebnf-dtd.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-dtd.el --- parser for DTD (Data Type Description for XML) | 1 | ;;; ebnf-dtd.el --- parser for DTD (Data Type Description for XML) |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el index 28058e360bd..eb0fd621368 100644 --- a/lisp/progmodes/ebnf-ebx.el +++ b/lisp/progmodes/ebnf-ebx.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX) | 1 | ;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX) |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el index 2cbe9010821..3b092cd24b3 100644 --- a/lisp/progmodes/ebnf-iso.el +++ b/lisp/progmodes/ebnf-iso.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-iso.el --- parser for ISO EBNF | 1 | ;;; ebnf-iso.el --- parser for ISO EBNF |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf-otz.el b/lisp/progmodes/ebnf-otz.el index 3e5cf38665c..b78a748667d 100644 --- a/lisp/progmodes/ebnf-otz.el +++ b/lisp/progmodes/ebnf-otz.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-otz.el --- syntactic chart OpTimiZer | 1 | ;;; ebnf-otz.el --- syntactic chart OpTimiZer |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el index d9e8a15fef4..aaffce999ad 100644 --- a/lisp/progmodes/ebnf-yac.el +++ b/lisp/progmodes/ebnf-yac.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf-yac.el --- parser for Yacc/Bison | 1 | ;;; ebnf-yac.el --- parser for Yacc/Bison |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 6d8e90c2d6a..ffb93de8062 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebnf2ps.el --- translate an EBNF to a syntactic chart on PostScript | 1 | ;;; ebnf2ps.el --- translate an EBNF to a syntactic chart on PostScript |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 80f9e2a7719..5a9870b9001 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ebrowse.el --- Emacs C++ class browser & tags facility | 1 | ;;; ebrowse.el --- Emacs C++ class browser & tags facility |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Gerd Moellmann <gerd@gnu.org> | 5 | ;; Author: Gerd Moellmann <gerd@gnu.org> |
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 4cc2aee9346..9e175a20e22 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; elisp-mode.el --- Emacs Lisp mode -*- lexical-binding:t -*- | 1 | ;;; elisp-mode.el --- Emacs Lisp mode -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1986, 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985-1986, 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: emacs-devel@gnu.org | 5 | ;; Maintainer: emacs-devel@gnu.org |
| 6 | ;; Keywords: lisp, languages | 6 | ;; Keywords: lisp, languages |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index dbb46a38381..2db7220de5c 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*- | 1 | ;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2015 Free | 3 | ;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2016 Free |
| 4 | ;; Software Foundation, Inc. | 4 | ;; Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Roland McGrath <roland@gnu.org> | 6 | ;; Author: Roland McGrath <roland@gnu.org> |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index b057fa68471..173bf85bb52 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*- | 1 | ;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-1996, 2000-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-1996, 2000-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> | 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> |
| 6 | ;; Keywords: languages, unix | 6 | ;; Keywords: languages, unix |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 324efb0e1bb..588f4d99d78 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; f90.el --- Fortran-90 mode (free format) -*- lexical-binding: t -*- | 1 | ;;; f90.el --- Fortran-90 mode (free format) -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995-1997, 2000-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Torbjörn Einarsson <Torbjorn.Einarsson@era.ericsson.se> | 5 | ;; Author: Torbjörn Einarsson <Torbjorn.Einarsson@era.ericsson.se> |
| 6 | ;; Maintainer: Glenn Morris <rgm@gnu.org> | 6 | ;; Maintainer: Glenn Morris <rgm@gnu.org> |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 882ac064b82..30c9fed45ca 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 -*- lexical-binding: t; -*- | 1 | ;;; flymake.el --- a universal on-the-fly syntax checker -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003-2016 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: Leo Liu <sdl.web@gmail.com> | 6 | ;; Maintainer: Leo Liu <sdl.web@gmail.com> |
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 33fe4b37cf8..bd08d3fd16d 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; fortran.el --- Fortran mode for GNU Emacs | 1 | ;;; fortran.el --- Fortran mode for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986, 1993-1995, 1997-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1986, 1993-1995, 1997-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Michael D. Prange <prange@erl.mit.edu> | 6 | ;; Author: Michael D. Prange <prange@erl.mit.edu> |
| @@ -496,12 +496,12 @@ This is used to fontify fixed-format Fortran comments." | |||
| 496 | ;; worth the trouble (about 0.5% of slow down). | 496 | ;; worth the trouble (about 0.5% of slow down). |
| 497 | (eval ;I hate `eval', but it's hard to avoid it here. | 497 | (eval ;I hate `eval', but it's hard to avoid it here. |
| 498 | `(syntax-propertize-rules | 498 | `(syntax-propertize-rules |
| 499 | ("^[cd\\*]" (0 "<")) | 499 | ("^[CcDd\\*]" (0 "<")) |
| 500 | ;; We mark all chars after line-length as "comment-start", rather than | 500 | ;; We mark all chars after line-length as "comment-start", rather than |
| 501 | ;; just the first one. This is so that a closing ' that's past the | 501 | ;; just the first one. This is so that a closing ' that's past the |
| 502 | ;; line-length will indeed be ignored (and will result in a string that | 502 | ;; line-length will indeed be ignored (and will result in a string that |
| 503 | ;; leaks into subsequent lines). | 503 | ;; leaks into subsequent lines). |
| 504 | ((format "^[^cd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length)) | 504 | ((format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length)) |
| 505 | (1 "<"))))) | 505 | (1 "<"))))) |
| 506 | 506 | ||
| 507 | (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 | 507 | (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index bde030e3f26..5ad101df7bf 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 -*- lexical-binding: t -*- | 1 | ;;; gdb-mi.el --- User Interface for running GDB -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Nick Roberts <nickrob@gnu.org> | 5 | ;; Author: Nick Roberts <nickrob@gnu.org> |
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index 6ee32b0b3ee..17f5ffd5118 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-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 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> |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index efecd21a92a..7e6f157f5fe 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; grep.el --- run `grep' and display the results -*- lexical-binding:t -*- | 1 | ;;; grep.el --- run `grep' and display the results -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1993-1999, 2001-2015 Free Software | 3 | ;; Copyright (C) 1985-1987, 1993-1999, 2001-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Roland McGrath <roland@gnu.org> | 6 | ;; Author: Roland McGrath <roland@gnu.org> |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 024547cc487..c22de2f77ac 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers -*- lexical-binding:t -*- | 1 | ;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-1996, 1998, 2000-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1992-1996, 1998, 2000-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 6 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 71646d312c4..43cf42c048b 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; hideif.el --- hides selected code within ifdef -*- lexical-binding:t -*- | 1 | ;;; hideif.el --- hides selected code within ifdef -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1994, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1988, 1994, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Brian Marick | 5 | ;; Author: Brian Marick |
| 6 | ;; Daniel LaLiberte <liberte@holonexus.org> | 6 | ;; Daniel LaLiberte <liberte@holonexus.org> |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 7dfef5fae4c..e5460009a56 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-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-2016 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> |
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index b716e7da594..7fde29dcf7a 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; icon.el --- mode for editing Icon code | 1 | ;;; icon.el --- mode for editing Icon code |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Chris Smith <csmith@convex.com> | 5 | ;; Author: Chris Smith <csmith@convex.com> |
| 6 | ;; Created: 15 Feb 89 | 6 | ;; Created: 15 Feb 89 |
diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index a9ddeba9433..26cd46b88e9 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; idlw-complete-structtag.el --- Completion of structure tags. | 1 | ;;; idlw-complete-structtag.el --- Completion of structure tags. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@astro.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@astro.uva.nl> |
| 6 | ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> | 6 | ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> |
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 4473409e344..9a3199fedaa 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; idlw-help.el --- HTML Help code for IDLWAVE | 1 | ;;; idlw-help.el --- HTML Help code for IDLWAVE |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000-2016 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> | 5 | ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> |
| 6 | ;; Carsten Dominik <dominik@science.uva.nl> | 6 | ;; Carsten Dominik <dominik@science.uva.nl> |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 5aeb4ea1a07..af2e48d03a6 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; idlw-shell.el --- run IDL as an inferior process of Emacs. | 1 | ;; idlw-shell.el --- run IDL as an inferior process of Emacs. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> | 5 | ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> |
| 6 | ;; Carsten Dominik <dominik@astro.uva.nl> | 6 | ;; Carsten Dominik <dominik@astro.uva.nl> |
diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 89284cae3eb..0e0714e27ed 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE | 1 | ;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@astro.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@astro.uva.nl> |
| 6 | ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> | 6 | ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 1546e9ad6e6..ab87a584bfd 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; idlwave.el --- IDL editing mode for GNU Emacs | 1 | ;; idlwave.el --- IDL editing mode for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> | 5 | ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> |
| 6 | ;; Carsten Dominik <dominik@science.uva.nl> | 6 | ;; Carsten Dominik <dominik@science.uva.nl> |
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 290ebeea290..843c79e8b38 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; inf-lisp.el --- an inferior-lisp mode | 1 | ;;; inf-lisp.el --- an inferior-lisp mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1993-1994, 2001-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1988, 1993-1994, 2001-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 310b7ba371f..07849484b78 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; js.el --- Major mode for editing JavaScript -*- lexical-binding: t -*- | 1 | ;;; js.el --- Major mode for editing JavaScript -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Karl Landstrom <karl.landstrom@brgeight.se> | 5 | ;; Author: Karl Landstrom <karl.landstrom@brgeight.se> |
| 6 | ;; Daniel Colascione <dan.colascione@gmail.com> | 6 | ;; Daniel Colascione <dan.colascione@gmail.com> |
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el index 0c180dfc147..c82775ed5d3 100644 --- a/lisp/progmodes/ld-script.el +++ b/lisp/progmodes/ld-script.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ld-script.el --- GNU linker script editing mode for Emacs | 1 | ;;; ld-script.el --- GNU linker script editing mode for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Masatake YAMATO<jet@gyve.org> | 5 | ;; Author: Masatake YAMATO<jet@gyve.org> |
| 6 | ;; Keywords: languages, faces | 6 | ;; Keywords: languages, faces |
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index 80a93a477b4..f2e4d68436b 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; m4-mode.el --- m4 code editing commands for Emacs | 1 | ;;; m4-mode.el --- m4 code editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996-1997, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-1997, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrew Csillag <drew@thecsillags.com> | 5 | ;; Author: Andrew Csillag <drew@thecsillags.com> |
| 6 | ;; Keywords: languages, faces | 6 | ;; Keywords: languages, faces |
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 9736f0f207c..5cc6321e1ba 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; make-mode.el --- makefile editing commands for Emacs -*- lexical-binding:t -*- | 1 | ;;; make-mode.el --- makefile editing commands for Emacs -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1994, 1999-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 1994, 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Thomas Neumann <tom@smart.bo.open.de> | 5 | ;; Author: Thomas Neumann <tom@smart.bo.open.de> |
| 6 | ;; Eric S. Raymond <esr@snark.thyrsus.com> | 6 | ;; Eric S. Raymond <esr@snark.thyrsus.com> |
diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 79a60400eed..913849df324 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output | 1 | ;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Tom Houlder <thoulder@icor.fr> | 5 | ;; Author: Tom Houlder <thoulder@icor.fr> |
| 6 | ;; Created: 10 Dec 1996 | 6 | ;; Created: 10 Dec 1996 |
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 62ff2fac2ac..503cfcf802b 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; meta-mode.el --- major mode for editing Metafont or MetaPost sources -*- lexical-binding:t -*- | 1 | ;;; meta-mode.el --- major mode for editing Metafont or MetaPost sources -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Ulrik Vieth <vieth@thphy.uni-duesseldorf.de> | 5 | ;; Author: Ulrik Vieth <vieth@thphy.uni-duesseldorf.de> |
| 6 | ;; Version: 1.0 | 6 | ;; Version: 1.0 |
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index c95315700b3..cfae5695c8d 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mixal-mode.el --- Major mode for the mix asm language. | 1 | ;;; mixal-mode.el --- Major mode for the mix asm language. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com> | 5 | ;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com> |
| 6 | ;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com> | 6 | ;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com> |
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index b54b88dccb5..28619a55853 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; octave.el --- editing octave source files under emacs -*- lexical-binding: t; -*- | 1 | ;;; octave.el --- editing octave source files under emacs -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> | 5 | ;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> |
| 6 | ;; John Eaton <jwe@octave.org> | 6 | ;; John Eaton <jwe@octave.org> |
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el index ef3433f003b..6a02280c1e8 100644 --- a/lisp/progmodes/opascal.el +++ b/lisp/progmodes/opascal.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; opascal.el --- major mode for editing Object Pascal source in Emacs -*- lexical-binding: t -*- | 1 | ;;; opascal.el --- major mode for editing Object Pascal source in Emacs -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998-1999, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998-1999, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: Ray Blaak <blaak@infomatch.com>, | 5 | ;; Authors: Ray Blaak <blaak@infomatch.com>, |
| 6 | ;; Simon South <ssouth@member.fsf.org> | 6 | ;; Simon South <ssouth@member.fsf.org> |
| @@ -257,6 +257,7 @@ routine.") | |||
| 257 | 257 | ||
| 258 | (defvar opascal-mode-syntax-table | 258 | (defvar opascal-mode-syntax-table |
| 259 | (let ((st (make-syntax-table))) | 259 | (let ((st (make-syntax-table))) |
| 260 | (modify-syntax-entry ?\\ "." st) ; bug#22224 | ||
| 260 | ;; Strings. | 261 | ;; Strings. |
| 261 | (modify-syntax-entry ?\" "\"" st) | 262 | (modify-syntax-entry ?\" "\"" st) |
| 262 | (modify-syntax-entry ?\' "\"" st) | 263 | (modify-syntax-entry ?\' "\"" st) |
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 904001d3383..b0929ebd040 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-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-2016 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 |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 55d69bfddff..241521bef4d 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; perl-mode.el --- Perl code editing commands for GNU Emacs -*- lexical-binding:t -*- | 1 | ;;; perl-mode.el --- Perl code editing commands for GNU Emacs -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1990, 1994, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990, 1994, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: William F. Mann | 5 | ;; Author: William F. Mann |
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 9702880771c..2f12df47723 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; prog-mode.el --- Generic major mode for programming -*- lexical-binding: t -*- | 1 | ;;; prog-mode.el --- Generic major mode for programming -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2013-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: emacs-devel@gnu.org | 5 | ;; Maintainer: emacs-devel@gnu.org |
| 6 | ;; Keywords: internal | 6 | ;; Keywords: internal |
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index c8e48e2275a..fe28ed776b2 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- | 1 | ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2015-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -27,6 +27,11 @@ | |||
| 27 | ;; current project, without having to know which package handles | 27 | ;; current project, without having to know which package handles |
| 28 | ;; detection of that project type, parsing its config files, etc. | 28 | ;; detection of that project type, parsing its config files, etc. |
| 29 | ;; | 29 | ;; |
| 30 | ;; NOTE: The project API is still experimental and can change in major, | ||
| 31 | ;; backward-incompatible ways. Everyone is encouraged to try it, and | ||
| 32 | ;; report to us any problems or use cases we hadn't anticipated, by | ||
| 33 | ;; sending an email to emacs-devel, or `M-x report-emacs-bug'. | ||
| 34 | ;; | ||
| 30 | ;; Infrastructure: | 35 | ;; Infrastructure: |
| 31 | ;; | 36 | ;; |
| 32 | ;; Function `project-current', to determine the current project | 37 | ;; Function `project-current', to determine the current project |
| @@ -45,10 +50,12 @@ | |||
| 45 | 50 | ||
| 46 | ;;; TODO: | 51 | ;;; TODO: |
| 47 | 52 | ||
| 48 | ;; * Commands `project-find-file' and `project-or-external-find-file'. | 53 | ;; * Reliably cache the list of files in the project, probably using |
| 49 | ;; Currently blocked on adding a new completion style that would let | 54 | ;; filenotify.el (if supported) to invalidate. And avoiding caching |
| 50 | ;; the user enter just the base file name (or a part of it), and get | 55 | ;; if it's not available (manual cache invalidation is not nice). |
| 51 | ;; it expanded to the absolute file name. | 56 | ;; |
| 57 | ;; * Allow the backend to override the file-listing logic? Maybe also | ||
| 58 | ;; to delegate file name completion to an external tool. | ||
| 52 | ;; | 59 | ;; |
| 53 | ;; * Build tool related functionality. Start with a `project-build' | 60 | ;; * Build tool related functionality. Start with a `project-build' |
| 54 | ;; command, which should provide completions on tasks to run, and | 61 | ;; command, which should provide completions on tasks to run, and |
| @@ -251,13 +258,15 @@ DIRS must contain directory names." | |||
| 251 | (defun project--value-in-dir (var dir) | 258 | (defun project--value-in-dir (var dir) |
| 252 | (with-temp-buffer | 259 | (with-temp-buffer |
| 253 | (setq default-directory dir) | 260 | (setq default-directory dir) |
| 254 | (hack-dir-local-variables-non-file-buffer) | 261 | (let ((enable-local-variables :all)) |
| 262 | (hack-dir-local-variables-non-file-buffer)) | ||
| 255 | (symbol-value var))) | 263 | (symbol-value var))) |
| 256 | 264 | ||
| 257 | (declare-function grep-read-files "grep") | 265 | (declare-function grep-read-files "grep") |
| 258 | (declare-function xref-collect-matches "xref") | 266 | (declare-function xref-collect-matches "xref") |
| 259 | (declare-function xref--show-xrefs "xref") | 267 | (declare-function xref--show-xrefs "xref") |
| 260 | (declare-function xref-backend-identifier-at-point "xref") | 268 | (declare-function xref-backend-identifier-at-point "xref") |
| 269 | (declare-function xref--find-ignores-arguments "xref") | ||
| 261 | 270 | ||
| 262 | ;;;###autoload | 271 | ;;;###autoload |
| 263 | (defun project-find-regexp (regexp) | 272 | (defun project-find-regexp (regexp) |
| @@ -302,5 +311,53 @@ pattern to search for." | |||
| 302 | (user-error "No matches for: %s" regexp)) | 311 | (user-error "No matches for: %s" regexp)) |
| 303 | (xref--show-xrefs xrefs nil))) | 312 | (xref--show-xrefs xrefs nil))) |
| 304 | 313 | ||
| 314 | ;;;###autoload | ||
| 315 | (defun project-find-file () | ||
| 316 | "Visit a file in the current project's roots. | ||
| 317 | |||
| 318 | This is like `find-file', but it limits the file-name completion | ||
| 319 | candidates to the files within the current project roots." | ||
| 320 | (interactive) | ||
| 321 | (let* ((pr (project-current t)) | ||
| 322 | (dirs (project-roots pr))) | ||
| 323 | (project--find-file-in dirs pr))) | ||
| 324 | |||
| 325 | ;;;###autoload | ||
| 326 | (defun project-or-external-find-file () | ||
| 327 | "Visit a file in the current project's roots or external roots. | ||
| 328 | |||
| 329 | This is like `find-file', but it limits the file-name completion | ||
| 330 | candidates to the files within the current project roots and external roots." | ||
| 331 | (interactive) | ||
| 332 | (let* ((pr (project-current t)) | ||
| 333 | (dirs (append | ||
| 334 | (project-roots pr) | ||
| 335 | (project-external-roots pr)))) | ||
| 336 | (project--find-file-in dirs pr))) | ||
| 337 | |||
| 338 | ;; FIXME: Uniquely abbreviate the roots? | ||
| 339 | (defun project--find-file-in (dirs project) | ||
| 340 | (require 'xref) | ||
| 341 | (let* ((all-files | ||
| 342 | (cl-mapcan | ||
| 343 | (lambda (dir) | ||
| 344 | (let ((command | ||
| 345 | (format "%s %s %s -type f -print0" | ||
| 346 | find-program | ||
| 347 | dir | ||
| 348 | (xref--find-ignores-arguments | ||
| 349 | (project-ignores project dir) | ||
| 350 | (expand-file-name dir))))) | ||
| 351 | (split-string (shell-command-to-string command) "\0" t))) | ||
| 352 | dirs)) | ||
| 353 | (table (lambda (string pred action) | ||
| 354 | (cond | ||
| 355 | ((eq action 'metadata) | ||
| 356 | '(metadata . ((category . project-file)))) | ||
| 357 | (t | ||
| 358 | (complete-with-action action all-files string pred)))))) | ||
| 359 | (find-file | ||
| 360 | (completing-read "Find file: " table nil t)))) | ||
| 361 | |||
| 305 | (provide 'project) | 362 | (provide 'project) |
| 306 | ;;; project.el ends here | 363 | ;;; project.el ends here |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 61d3a3c638b..c62146769ec 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; prolog.el --- major mode for Prolog (and Mercury) -*- lexical-binding:t -*- | 1 | ;;; prolog.el --- major mode for Prolog (and Mercury) -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011-2015 Free | 3 | ;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011-2016 Free |
| 4 | ;; Software Foundation, Inc. | 4 | ;; Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Authors: Emil Åström <emil_astrom(at)hotmail(dot)com> | 6 | ;; Authors: Emil Åström <emil_astrom(at)hotmail(dot)com> |
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index 077be53e2fb..79c32c62a5c 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ps-mode.el --- PostScript mode for GNU Emacs | 1 | ;;; ps-mode.el --- PostScript mode for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999, 2001-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Peter Kleiweg <p.c.j.kleiweg@rug.nl> | 5 | ;; Author: Peter Kleiweg <p.c.j.kleiweg@rug.nl> |
| 6 | ;; Maintainer: Peter Kleiweg <p.c.j.kleiweg@rug.nl> | 6 | ;; Maintainer: Peter Kleiweg <p.c.j.kleiweg@rug.nl> |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 04542cdff3d..4984c9908bf 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; python.el --- Python's flying circus support for Emacs -*- lexical-binding: t -*- | 1 | ;;; python.el --- Python's flying circus support for Emacs -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Fabián E. Gallina <fgallina@gnu.org> | 5 | ;; Author: Fabián E. Gallina <fgallina@gnu.org> |
| 6 | ;; URL: https://github.com/fgallina/python.el | 6 | ;; URL: https://github.com/fgallina/python.el |
| @@ -3569,7 +3569,9 @@ using that one instead of current buffer's process." | |||
| 3569 | (forward-char (length (match-string-no-properties 0))) | 3569 | (forward-char (length (match-string-no-properties 0))) |
| 3570 | (point)))) | 3570 | (point)))) |
| 3571 | (end (point)) | 3571 | (end (point)) |
| 3572 | (prompt-boundaries (python-util-comint-last-prompt)) | 3572 | (prompt-boundaries |
| 3573 | (with-current-buffer (process-buffer process) | ||
| 3574 | (python-util-comint-last-prompt))) | ||
| 3573 | (prompt | 3575 | (prompt |
| 3574 | (with-current-buffer (process-buffer process) | 3576 | (with-current-buffer (process-buffer process) |
| 3575 | (when prompt-boundaries | 3577 | (when prompt-boundaries |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index df07083eaef..8f08b7c9e60 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ruby-mode.el --- Major mode for editing Ruby files | 1 | ;;; ruby-mode.el --- Major mode for editing Ruby files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: Yukihiro Matsumoto | 5 | ;; Authors: Yukihiro Matsumoto |
| 6 | ;; Nobuyoshi Nakada | 6 | ;; Nobuyoshi Nakada |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index e921e84a33e..27ce60bde44 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; scheme.el --- Scheme (and DSSSL) editing mode -*- lexical-binding: t; -*- | 1 | ;;; scheme.el --- Scheme (and DSSSL) editing mode -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986-1988, 1997-1998, 2001-2015 Free Software | 3 | ;; Copyright (C) 1986-1988, 1997-1998, 2001-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Bill Rozas <jinx@martigny.ai.mit.edu> | 6 | ;; Author: Bill Rozas <jinx@martigny.ai.mit.edu> |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 394e9ca48c6..7f89ab2762c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; sh-script.el --- shell-script editing commands for Emacs -*- lexical-binding:t -*- | 1 | ;;; sh-script.el --- shell-script editing commands for Emacs -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1997, 1999, 2001-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-1997, 1999, 2001-2016 Free Software Foundation, |
| 4 | ;; Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> | 6 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> |
| 6 | ;; Version: 2.0f | 7 | ;; Version: 2.0f |
| @@ -2114,7 +2115,11 @@ May return nil if the line should not be treated as continued." | |||
| 2114 | ;; sh-indent-after-done: aligned completely differently. | 2115 | ;; sh-indent-after-done: aligned completely differently. |
| 2115 | (`(:after . "in") (sh-var-value 'sh-indent-for-case-label)) | 2116 | (`(:after . "in") (sh-var-value 'sh-indent-for-case-label)) |
| 2116 | ;; sh-indent-for-continuation: Line continuations are handled differently. | 2117 | ;; sh-indent-for-continuation: Line continuations are handled differently. |
| 2117 | (`(:after . ,(or `"(" `"{" `"[")) (sh-var-value 'sh-indent-after-open)) | 2118 | (`(:after . ,(or `"(" `"{" `"[")) |
| 2119 | (if (not (looking-at ".[ \t]*[^\n \t#]")) | ||
| 2120 | (sh-var-value 'sh-indent-after-open) | ||
| 2121 | (goto-char (1- (match-end 0))) | ||
| 2122 | `(column . ,(current-column)))) | ||
| 2118 | ;; sh-indent-after-function: we don't handle it differently. | 2123 | ;; sh-indent-after-function: we don't handle it differently. |
| 2119 | )) | 2124 | )) |
| 2120 | 2125 | ||
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index d3ee9b5b4b2..0c420dfbec6 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; simula.el --- SIMULA 87 code editing commands for Emacs | 1 | ;;; simula.el --- SIMULA 87 code editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1994, 1996, 2001-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1992, 1994, 1996, 2001-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no> | 6 | ;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no> |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 40596749de7..65e94bac5d3 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; sql.el --- specialized comint.el for SQL interpreters -*- lexical-binding: t -*- | 1 | ;;; sql.el --- specialized comint.el for SQL interpreters -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Schroeder <alex@gnu.org> | 5 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; Maintainer: Michael Mauger <michael@mauger.com> | 6 | ;; Maintainer: Michael Mauger <michael@mauger.com> |
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el index a279e294fec..102e0da2fef 100644 --- a/lisp/progmodes/subword.el +++ b/lisp/progmodes/subword.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; subword.el --- Handling capitalized subwords in a nomenclature -*- lexical-binding: t -*- | 1 | ;;; subword.el --- Handling capitalized subwords in a nomenclature -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2004-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2004-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Masatake YAMATO | 5 | ;; Author: Masatake YAMATO |
| 6 | 6 | ||
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index e4e96554c95..93f329165a4 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; tcl.el --- Tcl code editing commands for Emacs | 1 | ;;; tcl.el --- Tcl code editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1998-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 1998-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: emacs-devel@gnu.org | 5 | ;; Maintainer: emacs-devel@gnu.org |
| 6 | ;; Author: Tom Tromey <tromey@redhat.com> | 6 | ;; Author: Tom Tromey <tromey@redhat.com> |
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index 354002dd3b3..987022e8cb3 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vera-mode.el --- major mode for editing Vera files | 1 | ;;; vera-mode.el --- major mode for editing Vera files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Reto Zimmermann <reto@gnu.org> | 5 | ;; Author: Reto Zimmermann <reto@gnu.org> |
| 6 | ;; Maintainer: Reto Zimmermann <reto@gnu.org> | 6 | ;; Maintainer: Reto Zimmermann <reto@gnu.org> |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 90145ddff8b..6b6cc643ffc 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; verilog-mode.el --- major mode for editing verilog source in Emacs | 1 | ;;; verilog-mode.el --- major mode for editing verilog source in Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Michael McNamara <mac@verilog.com> | 5 | ;; Author: Michael McNamara <mac@verilog.com> |
| 6 | ;; Wilson Snyder <wsnyder@wsnyder.org> | 6 | ;; Wilson Snyder <wsnyder@wsnyder.org> |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 09330d76dcd..d20a6b2f682 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vhdl-mode.el --- major mode for editing VHDL code | 1 | ;;; vhdl-mode.el --- major mode for editing VHDL code |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: Reto Zimmermann <reto@gnu.org> | 5 | ;; Authors: Reto Zimmermann <reto@gnu.org> |
| 6 | ;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net> | 6 | ;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net> |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 7e289b3ff5b..2fc24a8cb3d 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; which-func.el --- print current function in mode line -*- lexical-binding:t -*- | 1 | ;;; which-func.el --- print current function in mode line -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1997-1998, 2001-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1994, 1997-1998, 2001-2016 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> | 6 | ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> |
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index abb9cc6361d..fe39122d24f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*- | 1 | ;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2015 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -19,6 +19,11 @@ | |||
| 19 | 19 | ||
| 20 | ;;; Commentary: | 20 | ;;; Commentary: |
| 21 | 21 | ||
| 22 | ;; NOTE: The xref API is still experimental and can change in major, | ||
| 23 | ;; backward-incompatible ways. Everyone is encouraged to try it, and | ||
| 24 | ;; report to us any problems or use cases we hadn't anticipated, by | ||
| 25 | ;; sending an email to emacs-devel, or `M-x report-emacs-bug'. | ||
| 26 | ;; | ||
| 22 | ;; This file provides a somewhat generic infrastructure for cross | 27 | ;; This file provides a somewhat generic infrastructure for cross |
| 23 | ;; referencing commands, in particular "find-definition". | 28 | ;; referencing commands, in particular "find-definition". |
| 24 | ;; | 29 | ;; |
| @@ -203,7 +208,7 @@ LENGTH is the match length, in characters." | |||
| 203 | 208 | ||
| 204 | (defvar xref-backend-functions nil | 209 | (defvar xref-backend-functions nil |
| 205 | "Special hook to find the xref backend for the current context. | 210 | "Special hook to find the xref backend for the current context. |
| 206 | Each functions on this hook is called in turn with no arguments | 211 | Each function on this hook is called in turn with no arguments, |
| 207 | and should return either nil to mean that it is not applicable, | 212 | and should return either nil to mean that it is not applicable, |
| 208 | or an xref backend, which is a value to be used to dispatch the | 213 | or an xref backend, which is a value to be used to dispatch the |
| 209 | generic functions.") | 214 | generic functions.") |
| @@ -497,10 +502,14 @@ WINDOW controls how the buffer is displayed: | |||
| 497 | (xref--pop-to-location xref window))) | 502 | (xref--pop-to-location xref window))) |
| 498 | 503 | ||
| 499 | (defun xref-query-replace (from to) | 504 | (defun xref-query-replace (from to) |
| 500 | "Perform interactive replacement in all current matches." | 505 | "Perform interactive replacement of FROM with TO in all displayed xrefs. |
| 506 | |||
| 507 | This command interactively replaces FROM with TO in the names of the | ||
| 508 | references displayed in the current *xref* buffer." | ||
| 501 | (interactive | 509 | (interactive |
| 502 | (list (read-regexp "Query replace regexp in matches" ".*") | 510 | (let ((fr (read-regexp "Xref query-replace (regexp)" ".*"))) |
| 503 | (read-regexp "Replace with: "))) | 511 | (list fr |
| 512 | (read-regexp (format "Xref query-replace (regexp) %s with: " fr))))) | ||
| 504 | (let (pairs item) | 513 | (let (pairs item) |
| 505 | (unwind-protect | 514 | (unwind-protect |
| 506 | (progn | 515 | (progn |
| @@ -757,12 +766,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." | |||
| 757 | With prefix argument or when there's no identifier at point, | 766 | With prefix argument or when there's no identifier at point, |
| 758 | prompt for it. | 767 | prompt for it. |
| 759 | 768 | ||
| 760 | If the backend has sufficient information to determine a unique | 769 | If sufficient information is available to determine a unique |
| 761 | definition for IDENTIFIER, it returns only that definition. If | 770 | definition for IDENTIFIER, display it in the selected window. |
| 762 | there are multiple possible definitions, it returns all of them. | 771 | Otherwise, display the list of the possible definitions in a |
| 763 | 772 | buffer where the user can select from the list." | |
| 764 | If the backend returns one definition, jump to it; otherwise, | ||
| 765 | display the list in a buffer." | ||
| 766 | (interactive (list (xref--read-identifier "Find definitions of: "))) | 773 | (interactive (list (xref--read-identifier "Find definitions of: "))) |
| 767 | (xref--find-definitions identifier nil)) | 774 | (xref--find-definitions identifier nil)) |
| 768 | 775 | ||
| @@ -871,7 +878,9 @@ IGNORES is a list of glob patterns." | |||
| 871 | grep-find-template t t)) | 878 | grep-find-template t t)) |
| 872 | (grep-highlight-matches nil) | 879 | (grep-highlight-matches nil) |
| 873 | (command (xref--rgrep-command (xref--regexp-to-extended regexp) | 880 | (command (xref--rgrep-command (xref--regexp-to-extended regexp) |
| 874 | files dir ignores)) | 881 | files |
| 882 | (expand-file-name dir) | ||
| 883 | ignores)) | ||
| 875 | (orig-buffers (buffer-list)) | 884 | (orig-buffers (buffer-list)) |
| 876 | (buf (get-buffer-create " *xref-grep*")) | 885 | (buf (get-buffer-create " *xref-grep*")) |
| 877 | (grep-re (caar grep-regexp-alist)) | 886 | (grep-re (caar grep-regexp-alist)) |
| @@ -886,7 +895,7 @@ IGNORES is a list of glob patterns." | |||
| 886 | hits))) | 895 | hits))) |
| 887 | (unwind-protect | 896 | (unwind-protect |
| 888 | (cl-mapcan (lambda (hit) (xref--collect-matches hit regexp)) | 897 | (cl-mapcan (lambda (hit) (xref--collect-matches hit regexp)) |
| 889 | hits) | 898 | (nreverse hits)) |
| 890 | ;; TODO: Same as above. | 899 | ;; TODO: Same as above. |
| 891 | (mapc #'kill-buffer | 900 | (mapc #'kill-buffer |
| 892 | (cl-set-difference (buffer-list) orig-buffers))))) | 901 | (cl-set-difference (buffer-list) orig-buffers))))) |
| @@ -907,23 +916,28 @@ IGNORES is a list of glob patterns." | |||
| 907 | " " | 916 | " " |
| 908 | (shell-quote-argument ")")) | 917 | (shell-quote-argument ")")) |
| 909 | dir | 918 | dir |
| 910 | (concat | 919 | (xref--find-ignores-arguments ignores dir))) |
| 911 | (shell-quote-argument "(") | 920 | |
| 912 | " -path " | 921 | (defun xref--find-ignores-arguments (ignores dir) |
| 913 | (mapconcat | 922 | ;; `shell-quote-argument' quotes the tilde as well. |
| 914 | (lambda (ignore) | 923 | (cl-assert (not (string-match-p "\\`~" dir))) |
| 915 | (when (string-match-p "/\\'" ignore) | 924 | (concat |
| 916 | (setq ignore (concat ignore "*"))) | 925 | (shell-quote-argument "(") |
| 917 | (if (string-match "\\`\\./" ignore) | 926 | " -path " |
| 918 | (setq ignore (replace-match dir t t ignore)) | 927 | (mapconcat |
| 919 | (unless (string-prefix-p "*" ignore) | 928 | (lambda (ignore) |
| 920 | (setq ignore (concat "*/" ignore)))) | 929 | (when (string-match-p "/\\'" ignore) |
| 921 | (shell-quote-argument ignore)) | 930 | (setq ignore (concat ignore "*"))) |
| 922 | ignores | 931 | (if (string-match "\\`\\./" ignore) |
| 923 | " -o -path ") | 932 | (setq ignore (replace-match dir t t ignore)) |
| 924 | " " | 933 | (unless (string-prefix-p "*" ignore) |
| 925 | (shell-quote-argument ")") | 934 | (setq ignore (concat "*/" ignore)))) |
| 926 | " -prune -o "))) | 935 | (shell-quote-argument ignore)) |
| 936 | ignores | ||
| 937 | " -o -path ") | ||
| 938 | " " | ||
| 939 | (shell-quote-argument ")") | ||
| 940 | " -prune -o ")) | ||
| 927 | 941 | ||
| 928 | (defun xref--regexp-to-extended (str) | 942 | (defun xref--regexp-to-extended (str) |
| 929 | (replace-regexp-in-string | 943 | (replace-regexp-in-string |
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index cf61073b442..214f381971a 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; xscheme.el --- run MIT Scheme under Emacs -*- lexical-binding: t; -*- | 1 | ;;; xscheme.el --- run MIT Scheme under Emacs -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986-1987, 1989-1990, 2001-2015 Free Software | 3 | ;; Copyright (C) 1986-1987, 1989-1990, 2001-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
| @@ -1174,9 +1174,10 @@ the remaining input.") | |||
| 1174 | 1174 | ||
| 1175 | (defun xscheme-prompt-for-expression-exit () | 1175 | (defun xscheme-prompt-for-expression-exit () |
| 1176 | (interactive) | 1176 | (interactive) |
| 1177 | (if (eq (xscheme-region-expression-p (point-min) (point-max)) 'one) | 1177 | (if (eq (xscheme-region-expression-p (minibuffer-prompt-end) (point-max)) |
| 1178 | 'one) | ||
| 1178 | (exit-minibuffer) | 1179 | (exit-minibuffer) |
| 1179 | (error "input must be a single, complete expression"))) | 1180 | (error "Input must be a single, complete expression"))) |
| 1180 | 1181 | ||
| 1181 | (defun xscheme-region-expression-p (start end) | 1182 | (defun xscheme-region-expression-p (start end) |
| 1182 | (save-excursion | 1183 | (save-excursion |