- (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))))))