diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-11-13 10:54:20 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-11-13 10:54:20 -0800 |
commit | 99ceefa8ec4f9993663492cfcce6bb82a94569c1 (patch) | |
tree | 507f76715b3086f34672b7c984dc09befaa57fc6 /lisp/progmodes | |
parent | a7b7b85567f766ff510a5eaaaf32dbbbec15efd0 (diff) | |
parent | 79108894dbcd642121466bb6af6c98c6a56e9233 (diff) | |
download | emacs-99ceefa8ec4f9993663492cfcce6bb82a94569c1.tar.gz |
Merge from origin/emacs-26
79108894db Port to IBM xlc 12.01
d14956099d Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
b1573a97e1 Use alignas to fix GCALIGN-related bugs
5d68dc9a2f Change vectorlike from struct to union
6aa0a26b46 Don't enable cursor-sensor-mode in mhtml-mode
2b8ef8dddf * lisp/files.el (abbreviate-file-name): Doc fix. (Bug#29267)
fe85ce1e16 Unbreak interactive run of a flymake test (bug#29267)
48ad00390d Fix Bug#29225
42daf83f08 CC Mode: Fix defun-open being recognized as brace-list-ope...
7775c47298 Merge from Gnulib
e470d16448 Pacify GCC when configured --with-x-toolkit=no
49450d0951 * lisp/find-dired.el (find-grep-dired): Doc fix. (Bug#29262)
e286b3381f Fix more flymake-diag-region eob corner cases and add test...
# Conflicts:
# src/lisp.h
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/cc-engine.el | 14 | ||||
-rw-r--r-- | lisp/progmodes/flymake.el | 16 |
2 files changed, 18 insertions, 12 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 8ec01e1810b..ab0204cb961 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10740,10 +10740,8 @@ comment at the start of cc-engine.el for more info." (t ; We're at (1+ here). (cond ((progn (c-forward-syntactic-ws) - (eq (point) (1- there))) - t) - ((c-syntactic-re-search-forward c-keywords-regexp there t) - t) + (eq (point) (1- there)))) + ((c-syntactic-re-search-forward c-keywords-regexp there t)) ((c-syntactic-re-search-forward "{" there t t) (backward-char) (c-looking-at-statement-block)) @@ -10752,8 +10750,12 @@ comment at the start of cc-engine.el for more info." (cond ((c-syntactic-re-search-forward "[;,]" nil t t) (eq (char-before) ?\;)) - ((c-syntactic-re-search-forward c-keywords-regexp nil t t) - t) + ((progn (c-forward-syntactic-ws) + (eobp))) + ((c-syntactic-re-search-forward c-keywords-regexp nil t t)) + ((c-syntactic-re-search-forward "{" nil t t) + (backward-char) + (c-looking-at-statement-block)) (t nil))) (goto-char here)))) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 1930f4fc832..aac167357ec 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -318,7 +318,11 @@ region is invalid." (goto-char (point-min)) (forward-line (1- line)) (cl-flet ((fallback-bol - () (progn (back-to-indentation) (point))) + () + (back-to-indentation) + (if (eobp) + (line-beginning-position 0) + (point))) (fallback-eol (beg) (progn @@ -335,11 +339,11 @@ region is invalid." (not (= sexp-end beg)) sexp-end) (and (< (goto-char (1+ beg)) (point-max)) - (point)))) - (safe-end (or end - (fallback-eol beg)))) - (cons (if end beg (fallback-bol)) - safe-end)) + (point))))) + (if end + (cons beg end) + (cons (setq beg (fallback-bol)) + (fallback-eol beg)))) (let* ((beg (fallback-bol)) (end (fallback-eol beg))) (cons beg end))))))) |