changeset 25058:af119d40c92d

(custom-save-delete): Avoid error for empty .emacs.
author Karl Heuer <kwzh@gnu.org>
date Sun, 25 Jul 1999 05:50:42 +0000
parents 6019ba9c1a95
children d6081fb56cda
files lisp/cus-edit.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Sun Jul 25 05:47:46 1999 +0000
+++ b/lisp/cus-edit.el	Sun Jul 25 05:50:42 1999 +0000
@@ -3101,7 +3101,10 @@
   (let ((default-major-mode))
     (set-buffer (find-file-noselect (custom-file))))
   (goto-char (point-min))
-  (save-excursion (forward-sexp (buffer-size)))	; Test for scan errors.
+  ;; Skip all whitespace and comments.
+  (while (forward-comment 1))
+  (or (eobp)
+      (save-excursion (forward-sexp (buffer-size)))) ; Test for scan errors.
   (catch 'found
     (while t
       ;; Skip all whitespace and comments.