diff options
author | Stephen Gildea <stepheng+emacs@gildea.com> | 2018-07-31 22:34:35 -0700 |
---|---|---|
committer | Stephen Gildea <stepheng+emacs@gildea.com> | 2018-07-31 22:34:35 -0700 |
commit | 1804fece02691798394c9e9bd519cd4a53776018 (patch) | |
tree | 9d5d441db29404f04417332be3507ba968eec42f /lisp/emacs-lisp/lisp-mode.el | |
parent | 17205d361795eaaa8e09ae62875c7439bb57a078 (diff) | |
parent | 82d6416a28dc5b4ab65b8081f035679bec4e3604 (diff) | |
download | emacs-1804fece02691798394c9e9bd519cd4a53776018.tar.gz emacs-1804fece02691798394c9e9bd519cd4a53776018.tar.bz2 emacs-1804fece02691798394c9e9bd519cd4a53776018.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 4e5b1a7e4ff..6313c63ecfe 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1196,7 +1196,21 @@ ENDPOS is encountered." (if endpos endpos ;; Get error now if we don't have a complete sexp ;; after point. - (save-excursion (forward-sexp 1) (point))))) + (save-excursion + (let ((eol (line-end-position))) + (forward-sexp 1) + ;; We actually look for a sexp which ends + ;; after the current line so that we properly + ;; indent things like #s(...). This might not + ;; be needed if Bug#15998 is fixed. + (condition-case () + (while (and (< (point) eol) (not (eobp))) + (forward-sexp 1)) + ;; But don't signal an error for incomplete + ;; sexps following the first complete sexp + ;; after point. + (scan-error nil))) + (point))))) (save-excursion (while (let ((indent (lisp-indent-calc-next parse-state)) (ppss (lisp-indent-state-ppss parse-state))) |