diff options
| author | John Wiegley | 2016-01-11 22:50:30 -0800 |
|---|---|---|
| committer | John Wiegley | 2016-01-11 22:50:30 -0800 |
| commit | fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4 (patch) | |
| tree | b5a8934d6b587f3517d2b8214a6738374b07820d /lisp | |
| parent | 2d7f4d99f715a3b32bb2873be6e9b4e7e1dad1da (diff) | |
| parent | ce4a052415b70030ee591af3cb5bed0fb79ef3aa (diff) | |
| download | emacs-fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4.tar.gz emacs-fee9e3ff5e3181e5e477849b5db94e7e39a4e0c4.zip | |
Merge from origin/emacs-25
ce4a052 Add defvar-local to lisp-imenu-generic-expression
a0121bc Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fd
76fe2d5 * lisp/emacs-lisp/autoload.el (autoload-find-destination): Doc fix.
1ae088f * lisp/emacs-lisp/autoload.el (autoload-find-destination):
b6b47af Properly encode/decode base64Binary data in SOAP
c632466 Obey coding-system-for-write when writing stdout/stderr in batch
2f32cb5 * doc/misc/efaq.texi (Packages that do not come with Emacs):
Update the URI of MELPA and marmalade-repo.
Reported by CHENG Goa <chenggao@royau.me> in
https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00390.html.
d2937aa * lisp/progmodes/opascal.el (opascal-mode-syntax-table):
5330c25 * lisp/progmodes/xscheme.el (xscheme-prompt-for-expression-exit):
7380990 Remove function wrongly on AWK Mode value of context
fontification hook.
d400753 * src/buffer.c: Stick with ASCII in doc string.
221240c Reword transient-mark-mode doc string
977d3ea Update doc string of 'selective-display'
229c3fa Make C++ buffers writeable when writing their initial text
properties.
f5c762c Additional changes for "make check-expensive"
1729cf3 ; * admin/MAINTAINERS: Remove myself.
33219d3 Apply text properties for <, > in new after-change function
(C++ Java Modes).
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 11 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 5 | ||||
| -rw-r--r-- | lisp/net/soap-client.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 38 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 83 | ||||
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 25 | ||||
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 13 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 20 | ||||
| -rw-r--r-- | lisp/progmodes/opascal.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/xscheme.el | 5 |
11 files changed, 127 insertions, 83 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 401b419a993..3405b09e6f5 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -701,8 +701,9 @@ Return FILE if there was no autoload cookie in it, else nil." | |||
| 701 | (defun autoload-find-destination (file load-name) | 701 | (defun autoload-find-destination (file load-name) |
| 702 | "Find the destination point of the current buffer's autoloads. | 702 | "Find the destination point of the current buffer's autoloads. |
| 703 | FILE is the file name of the current buffer. | 703 | FILE is the file name of the current buffer. |
| 704 | LOAD-NAME is the name as it appears in the output. | ||
| 704 | Returns a buffer whose point is placed at the requested location. | 705 | Returns a buffer whose point is placed at the requested location. |
| 705 | Returns nil if the file's autoloads are uptodate, otherwise | 706 | Returns nil if the file's autoloads are up-to-date, otherwise |
| 706 | removes any prior now out-of-date autoload entries." | 707 | removes any prior now out-of-date autoload entries." |
| 707 | (catch 'up-to-date | 708 | (catch 'up-to-date |
| 708 | (let* ((buf (current-buffer)) | 709 | (let* ((buf (current-buffer)) |
| @@ -738,7 +739,7 @@ removes any prior now out-of-date autoload entries." | |||
| 738 | ;; last-time is the time-stamp (specifying | 739 | ;; last-time is the time-stamp (specifying |
| 739 | ;; the last time we looked at the file) and | 740 | ;; the last time we looked at the file) and |
| 740 | ;; the file hasn't been changed since. | 741 | ;; the file hasn't been changed since. |
| 741 | ((listp last-time) | 742 | ((listp last-time) (= (length last-time) 2) |
| 742 | (not (time-less-p last-time file-time))) | 743 | (not (time-less-p last-time file-time))) |
| 743 | ;; FIXME? Arguably we should throw a | 744 | ;; FIXME? Arguably we should throw a |
| 744 | ;; user error, or some kind of warning, | 745 | ;; user error, or some kind of warning, |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 5543e920c67..f29f64f0562 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -152,12 +152,11 @@ For example, you could write | |||
| 152 | ...BODY CODE...)" | 152 | ...BODY CODE...)" |
| 153 | (declare (doc-string 2) | 153 | (declare (doc-string 2) |
| 154 | (debug (&define name string-or-null-p | 154 | (debug (&define name string-or-null-p |
| 155 | [&optional [¬ keywordp] sexp | 155 | [&optional [¬ keywordp] sexp |
| 156 | &optional [¬ keywordp] sexp | 156 | &optional [¬ keywordp] sexp |
| 157 | &optional [¬ keywordp] sexp] | 157 | &optional [¬ keywordp] sexp] |
| 158 | [&rest [keywordp sexp]] | 158 | [&rest [keywordp sexp]] |
| 159 | def-body)) | 159 | def-body))) |
| 160 | (indent 1)) | ||
| 161 | 160 | ||
| 162 | ;; Allow skipping the first three args. | 161 | ;; Allow skipping the first three args. |
| 163 | (cond | 162 | (cond |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 574ecef0cde..cb8abde52ed 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -131,9 +131,10 @@ | |||
| 131 | t)) | 131 | t)) |
| 132 | "\\s-+\\(" lisp-mode-symbol-regexp "\\)")) | 132 | "\\s-+\\(" lisp-mode-symbol-regexp "\\)")) |
| 133 | 2) | 133 | 2) |
| 134 | ;; For `defvar', we ignore (defvar FOO) constructs. | 134 | ;; For `defvar'/`defvar-local', we ignore (defvar FOO) constructs. |
| 135 | (list (purecopy "Variables") | 135 | (list (purecopy "Variables") |
| 136 | (purecopy (concat "^\\s-*(defvar\\s-+\\(" lisp-mode-symbol-regexp "\\)" | 136 | (purecopy (concat "^\\s-*(defvar\\(?:-local\\)?\\s-+\\(" |
| 137 | lisp-mode-symbol-regexp "\\)" | ||
| 137 | "[[:space:]\n]+[^)]")) | 138 | "[[:space:]\n]+[^)]")) |
| 138 | 1) | 139 | 1) |
| 139 | (list (purecopy "Types") | 140 | (list (purecopy "Types") |
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index f8cdaa9bc56..74024644966 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el | |||
| @@ -538,7 +538,7 @@ This is a specialization of `soap-encode-value' for | |||
| 538 | (base64Binary | 538 | (base64Binary |
| 539 | (unless (stringp value) | 539 | (unless (stringp value) |
| 540 | (error "Not a string value for base64Binary")) | 540 | (error "Not a string value for base64Binary")) |
| 541 | (base64-encode-string value)) | 541 | (base64-encode-string (encode-coding-string value 'utf-8))) |
| 542 | 542 | ||
| 543 | (otherwise | 543 | (otherwise |
| 544 | (error "Don't know how to encode %s for type %s" | 544 | (error "Don't know how to encode %s for type %s" |
| @@ -682,7 +682,7 @@ This is a specialization of `soap-decode-type' for | |||
| 682 | decimal byte float double duration) | 682 | decimal byte float double duration) |
| 683 | (string-to-number (car contents))) | 683 | (string-to-number (car contents))) |
| 684 | (boolean (string= (downcase (car contents)) "true")) | 684 | (boolean (string= (downcase (car contents)) "true")) |
| 685 | (base64Binary (base64-decode-string (car contents))) | 685 | (base64Binary (decode-coding-string (base64-decode-string (car contents)) 'utf-8)) |
| 686 | (anyType (soap-decode-any-type node)) | 686 | (anyType (soap-decode-any-type node)) |
| 687 | (Array (soap-decode-array node)))))) | 687 | (Array (soap-decode-array node)))))) |
| 688 | 688 | ||
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index a46f0488e76..6761de11700 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -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-engine.el b/lisp/progmodes/cc-engine.el index 617c94aae08..3301d415923 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -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) '(?< ?,)) | ||
| 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 | ||
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index c2b2d72649f..f74e5cbf678 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -1205,6 +1205,9 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1205 | ;; Same as `max-type-decl-*', but used when we're before | 1205 | ;; Same as `max-type-decl-*', but used when we're before |
| 1206 | ;; `token-pos'. | 1206 | ;; `token-pos'. |
| 1207 | (max-type-decl-end-before-token 0) | 1207 | (max-type-decl-end-before-token 0) |
| 1208 | ;; End of <..> construct which has had c-<>-arg-sep c-type | ||
| 1209 | ;; properties set within it. | ||
| 1210 | (max-<>-end 0) | ||
| 1208 | ;; Set according to the context to direct the heuristics for | 1211 | ;; Set according to the context to direct the heuristics for |
| 1209 | ;; recognizing C++ templates. | 1212 | ;; recognizing C++ templates. |
| 1210 | c-restricted-<>-arglists | 1213 | c-restricted-<>-arglists |
| @@ -1347,6 +1350,28 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1347 | (setq decl-or-cast (c-forward-decl-or-cast-1 | 1350 | (setq decl-or-cast (c-forward-decl-or-cast-1 |
| 1348 | match-pos context last-cast-end)) | 1351 | match-pos context last-cast-end)) |
| 1349 | 1352 | ||
| 1353 | ;; Ensure that c-<>-arg-sep c-type properties are in place on the | ||
| 1354 | ;; commas separating the arguments inside template/generic <..>s. | ||
| 1355 | (when (and (eq (char-before match-pos) ?<) | ||
| 1356 | (> match-pos max-<>-end)) | ||
| 1357 | (save-excursion | ||
| 1358 | (goto-char match-pos) | ||
| 1359 | (c-backward-token-2) | ||
| 1360 | (if (and | ||
| 1361 | (eq (char-after) ?<) | ||
| 1362 | (let ((c-restricted-<>-arglists | ||
| 1363 | (save-excursion | ||
| 1364 | (c-backward-token-2) | ||
| 1365 | (and | ||
| 1366 | (not (looking-at c-opt-<>-sexp-key)) | ||
| 1367 | (progn (c-backward-syntactic-ws) | ||
| 1368 | (memq (char-before) '(?\( ?,))) | ||
| 1369 | (not (eq (c-get-char-property (1- (point)) | ||
| 1370 | 'c-type) | ||
| 1371 | 'c-decl-arg-start)))))) | ||
| 1372 | (c-forward-<>-arglist nil))) | ||
| 1373 | (setq max-<>-end (point))))) | ||
| 1374 | |||
| 1350 | (cond | 1375 | (cond |
| 1351 | ((eq decl-or-cast 'cast) | 1376 | ((eq decl-or-cast 'cast) |
| 1352 | ;; Save the position after the previous cast so we can feed | 1377 | ;; Save the position after the previous cast so we can feed |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 8ae75277925..08d84fbb625 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -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 |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 7f71700c650..644065911dd 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -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))) |
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el index 72c09fe15c2..6a02280c1e8 100644 --- a/lisp/progmodes/opascal.el +++ b/lisp/progmodes/opascal.el | |||
| @@ -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/xscheme.el b/lisp/progmodes/xscheme.el index 6efc0b1dccf..214f381971a 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -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 |