From 3e36b84953110dc6cccaeb1133fed8fa78c1acdb Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 2 Dec 1998 18:15:26 +0000 Subject: [PATCH] (custom-save-delete): Save point before reading a sexp, rather than backing up. --- lisp/cus-edit.el | 8 +++----- 1 file 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 () -- 2.39.2