]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-save-delete): Save point before
authorKarl Heuer <kwzh@gnu.org>
Wed, 2 Dec 1998 18:15:26 +0000 (18:15 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 2 Dec 1998 18:15:26 +0000 (18:15 +0000)
reading a sexp, rather than backing up.

lisp/cus-edit.el

index b6c60a4129c1f6804d288419ca301d5fe1b91413..7640f471d25c5cf25cc6c20556d23619e6e5e86f 100644 (file)
@@ -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 ()