changeset 23795:a4dd6e536bc1

(custom-save-delete): Save point before reading a sexp, rather than backing up.
author Karl Heuer <kwzh@gnu.org>
date Wed, 02 Dec 1998 18:15:26 +0000
parents 7348b1c771c0
children cfe23974522e
files lisp/cus-edit.el
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Wed Dec 02 18:14:27 1998 +0000
+++ b/lisp/cus-edit.el	Wed Dec 02 18:15:26 1998 +0000
@@ -3102,15 +3102,13 @@
   (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 ()