(custom-save-delete): Save point before
reading a sexp, rather than backing up.
This commit is contained in:
parent
79f8634741
commit
3e36b84953
1 changed files with 3 additions and 5 deletions
|
@ -3102,15 +3102,13 @@ Leave point at the location of the call, or after the last expression."
|
|||
(goto-char (point-min))
|
||||
(catch 'found
|
||||
(while t
|
||||
(let ((sexp (condition-case nil
|
||||
(let ((start (point))
|
||||
(sexp (condition-case nil
|
||||
(read (current-buffer))
|
||||
(end-of-file (throw 'found nil)))))
|
||||
(when (and (listp sexp)
|
||||
(eq (car sexp) symbol))
|
||||
(delete-region (save-excursion
|
||||
(backward-sexp)
|
||||
(point))
|
||||
(point))
|
||||
(delete-region start (point))
|
||||
(throw 'found nil))))))
|
||||
|
||||
(defun custom-save-variables ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue