diff options
| author | Noam Postavsky | 2018-06-10 18:41:47 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-06-10 18:41:47 -0400 |
| commit | 23e9beff8cb950112fb9f750d4b3040d3fe36e05 (patch) | |
| tree | 8b63a8f04ad3a0acee281c92b7b147cdfd70a303 | |
| parent | f4e9ceacdae2de88a165e94b5c2f34eeb4115139 (diff) | |
| parent | f21fa142aca53e3de5783e1ce6fe1bf116174aeb (diff) | |
| download | emacs-23e9beff8cb950112fb9f750d4b3040d3fe36e05.tar.gz emacs-23e9beff8cb950112fb9f750d4b3040d3fe36e05.zip | |
Merge from emacs-26
55c9bb9f3c Fix comint-get-old-input-default for output field case (Bu...
26819cd1c0 ; ChangeLog.3: Fix typo.
e35a08ea4b Prevent infloop in 'delete-trailing-whitespace'
* lisp/progmodes/cperl-mode.el:
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cc-mode.el: Fix tabs mixed with space preventing
commit hook from succeeding.
| -rw-r--r-- | ChangeLog.3 | 2 | ||||
| -rw-r--r-- | lisp/comint.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/cperl-mode.el | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 5 |
6 files changed, 18 insertions, 15 deletions
diff --git a/ChangeLog.3 b/ChangeLog.3 index 42452c33977..6704d0d7169 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 | |||
| @@ -37197,7 +37197,7 @@ | |||
| 37197 | delete-trailing-whitespace: handle read-only text in buffer | 37197 | delete-trailing-whitespace: handle read-only text in buffer |
| 37198 | 37198 | ||
| 37199 | * lisp/simple.el (region-modifiable-p): New function. | 37199 | * lisp/simple.el (region-modifiable-p): New function. |
| 37200 | (delete-trailing-whitespace): Us it to avoid trying to delete read-only text. | 37200 | (delete-trailing-whitespace): Use it to avoid trying to delete read-only text. |
| 37201 | 37201 | ||
| 37202 | 2016-12-07 Paul Eggert <eggert@cs.ucla.edu> | 37202 | 2016-12-07 Paul Eggert <eggert@cs.ucla.edu> |
| 37203 | 37203 | ||
diff --git a/lisp/comint.el b/lisp/comint.el index 0a33e749446..f334a4ca4d4 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -2255,14 +2255,16 @@ current line, if point is on an output field. | |||
| 2255 | If `comint-use-prompt-regexp' is non-nil, then return | 2255 | If `comint-use-prompt-regexp' is non-nil, then return |
| 2256 | the current line with any initial string matching the regexp | 2256 | the current line with any initial string matching the regexp |
| 2257 | `comint-prompt-regexp' removed." | 2257 | `comint-prompt-regexp' removed." |
| 2258 | (let (bof) | 2258 | (let (field-prop bof) |
| 2259 | (if (and (not comint-use-prompt-regexp) | 2259 | (if (and (not comint-use-prompt-regexp) |
| 2260 | ;; Make sure we're in an input rather than output field. | 2260 | ;; Make sure we're in an input rather than output field. |
| 2261 | (null (get-char-property (setq bof (field-beginning)) 'field))) | 2261 | (not (setq field-prop (get-char-property |
| 2262 | (setq bof (field-beginning)) 'field)))) | ||
| 2262 | (field-string-no-properties bof) | 2263 | (field-string-no-properties bof) |
| 2263 | (comint-bol) | 2264 | (comint-bol) |
| 2264 | (buffer-substring-no-properties (point) | 2265 | (buffer-substring-no-properties (point) |
| 2265 | (if comint-use-prompt-regexp | 2266 | (if (or comint-use-prompt-regexp |
| 2267 | (eq field-prop 'output)) | ||
| 2266 | (line-end-position) | 2268 | (line-end-position) |
| 2267 | (field-end)))))) | 2269 | (field-end)))))) |
| 2268 | 2270 | ||
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 36f5196c5e2..3961ea647cf 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -12619,12 +12619,12 @@ comment at the start of cc-engine.el for more info." | |||
| 12619 | (c-beginning-of-statement-1 containing-sexp nil nil t) | 12619 | (c-beginning-of-statement-1 containing-sexp nil nil t) |
| 12620 | (when (/= (point) indent-point) | 12620 | (when (/= (point) indent-point) |
| 12621 | (if (> (c-point 'boi) containing-sexp) | 12621 | (if (> (c-point 'boi) containing-sexp) |
| 12622 | (goto-char (c-point 'boi)) | 12622 | (goto-char (c-point 'boi)) |
| 12623 | (if (consp special-brace-list) | 12623 | (if (consp special-brace-list) |
| 12624 | (progn | 12624 | (progn |
| 12625 | (goto-char (caar special-brace-list)) | 12625 | (goto-char (caar special-brace-list)) |
| 12626 | (c-forward-token-2 1 nil indent-point)) | 12626 | (c-forward-token-2 1 nil indent-point)) |
| 12627 | (goto-char containing-sexp)) | 12627 | (goto-char containing-sexp)) |
| 12628 | (forward-char) | 12628 | (forward-char) |
| 12629 | (c-skip-ws-forward indent-point))) | 12629 | (c-skip-ws-forward indent-point))) |
| 12630 | (cond | 12630 | (cond |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index e619fac43f2..f09ca04cfff 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1180,13 +1180,13 @@ Note that the style variables are always made local to the buffer." | |||
| 1180 | end)) | 1180 | end)) |
| 1181 | (c-literal-limits))) | 1181 | (c-literal-limits))) |
| 1182 | (end-literal-type (and end-limits | 1182 | (end-literal-type (and end-limits |
| 1183 | (c-literal-type end-limits))) | 1183 | (c-literal-type end-limits))) |
| 1184 | (beg-limits | 1184 | (beg-limits |
| 1185 | (progn | 1185 | (progn |
| 1186 | (goto-char beg) | 1186 | (goto-char beg) |
| 1187 | (c-literal-limits))) | 1187 | (c-literal-limits))) |
| 1188 | (beg-literal-type (and beg-limits | 1188 | (beg-literal-type (and beg-limits |
| 1189 | (c-literal-type beg-limits)))) | 1189 | (c-literal-type beg-limits)))) |
| 1190 | 1190 | ||
| 1191 | (when (eq end-literal-type 'string) | 1191 | (when (eq end-literal-type 'string) |
| 1192 | (setq c-new-END (max c-new-END (cdr end-limits)))) | 1192 | (setq c-new-END (max c-new-END (cdr end-limits)))) |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 09a26ddbe08..18a72324c65 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -1693,7 +1693,7 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1693 | (set (make-local-variable 'comment-end) "") | 1693 | (set (make-local-variable 'comment-end) "") |
| 1694 | (set (make-local-variable 'comment-column) cperl-comment-column) | 1694 | (set (make-local-variable 'comment-column) cperl-comment-column) |
| 1695 | (set (make-local-variable 'comment-start-skip) "#+ *") | 1695 | (set (make-local-variable 'comment-start-skip) "#+ *") |
| 1696 | 1696 | ||
| 1697 | ;; "[ \t]*sub" | 1697 | ;; "[ \t]*sub" |
| 1698 | ;; (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start | 1698 | ;; (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start |
| 1699 | ;; cperl-maybe-white-and-comment-rex ; 15=pre-block | 1699 | ;; cperl-maybe-white-and-comment-rex ; 15=pre-block |
diff --git a/lisp/simple.el b/lisp/simple.el index 57e70a8d153..3d625bd2886 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -697,8 +697,9 @@ buffer if the variable `delete-trailing-lines' is non-nil." | |||
| 697 | (while (re-search-forward "\\s-$" end-marker t) | 697 | (while (re-search-forward "\\s-$" end-marker t) |
| 698 | (skip-syntax-backward "-" (line-beginning-position)) | 698 | (skip-syntax-backward "-" (line-beginning-position)) |
| 699 | (let ((b (point)) (e (match-end 0))) | 699 | (let ((b (point)) (e (match-end 0))) |
| 700 | (when (region-modifiable-p b e) | 700 | (if (region-modifiable-p b e) |
| 701 | (delete-region b e))))) | 701 | (delete-region b e) |
| 702 | (goto-char e))))) | ||
| 702 | (if end | 703 | (if end |
| 703 | (set-marker end-marker nil) | 704 | (set-marker end-marker nil) |
| 704 | ;; Delete trailing empty lines. | 705 | ;; Delete trailing empty lines. |