summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-07-28 07:50:36 -0700
committerGlenn Morris <rgm@gnu.org>2018-07-28 07:50:36 -0700
commit4713f5d7423f0a8f2a2dd147cec70982145562d6 (patch)
treeb052f21a286e65e2030119246b9ddf8fa8a716cf /lisp/emacs-lisp
parent1bcf5d02da96784a04034b4c0aba8fdfa1413c4e (diff)
parentbd52f37cae3fbc25e576f9b0a1ba42596790965f (diff)
downloademacs-4713f5d7423f0a8f2a2dd147cec70982145562d6.tar.gz
emacs-4713f5d7423f0a8f2a2dd147cec70982145562d6.tar.bz2
emacs-4713f5d7423f0a8f2a2dd147cec70982145562d6.zip
Merge from origin/emacs-26
bd52f37 (origin/emacs-26) ; Fix last change: only MinGW runtime 5.0.2... 024d20f Fix compilation with mingw.org's MinGW 5.x headers 38b6748 Update the list of special forms in the ELisp manual 8579105 Don't fail to indent-sexp before a full sexp (Bug#31984) d24c5f2 Fix calls to modifications hooks in replace-buffer-contents 71a9151 * src/character.c (char_width): Support glyphs with faces. (... 0feb673 Display raw bytes as belonging to 'eight-bit' charset 2e2f00f ; * doc/emacs/mule.texi (International Chars): Fix last change. 00561b5 Fix inaccurate text in the user manual 5cfb7a3 Copyedits in tramp.texi, improved example with bash's readline 6f8f358 Minor Tramp doc update 2585fcb File Shadowing is not available on MS Windows 39da592 ; Minor markup change in indent.texi 2f00ffe ; bookmark-jump: Add comment about last change.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 25b61a23a94..6313c63ecfe 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1195,14 +1195,22 @@ ENDPOS is encountered."
(setq endpos (copy-marker
(if endpos endpos
;; Get error now if we don't have a complete sexp
- ;; after point. 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.
- (let ((eol (line-end-position)))
- (save-excursion (while (and (< (point) eol) (not (eobp)))
- (forward-sexp 1))
- (point))))))
+ ;; after 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)))