diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/cus-edit.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b6c60a4129c..7640f471d25 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -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 () |