Mercurial > emacs
comparison lisp/emacs-lisp/lisp.el @ 19781:03264c342376
(move-past-close-and-reindent):
Don't move closeparen back onto the end of a comment.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 07 Sep 1997 01:12:07 +0000 |
parents | b11021ca3525 |
children | a517c846d04e |
comparison
equal
deleted
inserted
replaced
19780:91cd68461722 | 19781:03264c342376 |
---|---|
254 (up-list 1) | 254 (up-list 1) |
255 (forward-char -1) | 255 (forward-char -1) |
256 (while (save-excursion ; this is my contribution | 256 (while (save-excursion ; this is my contribution |
257 (let ((before-paren (point))) | 257 (let ((before-paren (point))) |
258 (back-to-indentation) | 258 (back-to-indentation) |
259 (= (point) before-paren))) | 259 (and (= (point) before-paren) |
260 (progn | |
261 ;; Move to end of previous line. | |
262 (beginning-of-line) | |
263 (forward-char -1) | |
264 ;; Verify it doesn't end within a string or comment. | |
265 (let ((end (point)) | |
266 state) | |
267 (beginning-of-line) | |
268 ;; Get state at start of line. | |
269 (setq state (list 0 nil nil | |
270 (null (calculate-lisp-indent)) | |
271 nil nil nil nil | |
272 nil)) | |
273 ;; Parse state across the line to get state at end. | |
274 (setq state (parse-partial-sexp (point) end nil nil | |
275 state)) | |
276 ;; Check not in string or comment. | |
277 (and (not (elt state 3)) (not (elt state 4)))))))) | |
260 (delete-indentation)) | 278 (delete-indentation)) |
261 (forward-char 1) | 279 (forward-char 1) |
262 (newline-and-indent)) | 280 (newline-and-indent)) |
263 | 281 |
264 (defun lisp-complete-symbol () | 282 (defun lisp-complete-symbol () |