diff lisp/cus-dep.el @ 327:03446687b7cc r21-0-61

Import from CVS: tag r21-0-61
author cvs
date Mon, 13 Aug 2007 10:48:16 +0200
parents 558f606b08ae
children fbbf69b4e8a7
line wrap: on
line diff
--- a/lisp/cus-dep.el	Mon Aug 13 10:47:36 2007 +0200
+++ b/lisp/cus-dep.el	Mon Aug 13 10:48:16 2007 +0200
@@ -131,15 +131,21 @@
 			     (file-name-nondirectory file))))
 		  ;; Search for defcustom/defface/defgroup
 		  ;; expressions, and evaluate them.
-		  (ignore-errors
-		    (while (re-search-forward
-			    "^(defcustom\\|^(defface\\|^(defgroup"
-			    nil t)
-		      (beginning-of-line)
-		      (let ((expr (read (current-buffer))))
-			(eval expr)
-			;; Hash the file of the affected symbol.
-			(setf (gethash (nth 1 expr) hash) name)))))))
+		  (while (re-search-forward
+			  "^(defcustom\\|^(defface\\|^(defgroup"
+			  nil t)
+		    (beginning-of-line)
+		    (let ((expr (read (current-buffer))))
+		      ;; We need to ignore errors here, so that
+		      ;; defcustoms with :set don't bug out.  Of
+		      ;; course, their values will not be assigned in
+		      ;; case of errors, but their `custom-group'
+		      ;; properties will by that time be in place, and
+		      ;; that's all we care about.
+		      (ignore-errors
+			(eval expr))
+		      ;; Hash the file of the affected symbol.
+		      (setf (gethash (nth 1 expr) hash) name))))))
 	    (cond
 	     ((zerop (hash-table-count hash))
 	      (princ "(No customization dependencies")