# HG changeset patch # User Richard M. Stallman # Date 873594727 0 # Node ID 03264c342376764f2b16cb828dc635d3afffef33 # Parent 91cd684617224ec2fac6598659e49614cfa6776d (move-past-close-and-reindent): Don't move closeparen back onto the end of a comment. diff -r 91cd68461722 -r 03264c342376 lisp/emacs-lisp/lisp.el --- a/lisp/emacs-lisp/lisp.el Sat Sep 06 22:22:24 1997 +0000 +++ b/lisp/emacs-lisp/lisp.el Sun Sep 07 01:12:07 1997 +0000 @@ -256,7 +256,25 @@ (while (save-excursion ; this is my contribution (let ((before-paren (point))) (back-to-indentation) - (= (point) before-paren))) + (and (= (point) before-paren) + (progn + ;; Move to end of previous line. + (beginning-of-line) + (forward-char -1) + ;; Verify it doesn't end within a string or comment. + (let ((end (point)) + state) + (beginning-of-line) + ;; Get state at start of line. + (setq state (list 0 nil nil + (null (calculate-lisp-indent)) + nil nil nil nil + nil)) + ;; Parse state across the line to get state at end. + (setq state (parse-partial-sexp (point) end nil nil + state)) + ;; Check not in string or comment. + (and (not (elt state 3)) (not (elt state 4)))))))) (delete-indentation)) (forward-char 1) (newline-and-indent))