comparison lisp/cus-dep.el @ 382:064ab7fed2e0 r21-2-6

Import from CVS: tag r21-2-6
author cvs
date Mon, 13 Aug 2007 11:07:39 +0200
parents cc15677e0335
children 6719134a07c2
comparison
equal deleted inserted replaced
381:908a86f940e6 382:064ab7fed2e0
129 (goto-char (point-min)) 129 (goto-char (point-min))
130 (let ((name (file-name-sans-extension 130 (let ((name (file-name-sans-extension
131 (file-name-nondirectory file)))) 131 (file-name-nondirectory file))))
132 ;; Search for defcustom/defface/defgroup 132 ;; Search for defcustom/defface/defgroup
133 ;; expressions, and evaluate them. 133 ;; expressions, and evaluate them.
134 (ignore-errors 134 (while (re-search-forward
135 (while (re-search-forward 135 "^(defcustom\\|^(defface\\|^(defgroup"
136 "^(defcustom\\|^(defface\\|^(defgroup" 136 nil t)
137 nil t) 137 (beginning-of-line)
138 (beginning-of-line) 138 (let ((expr (read (current-buffer))))
139 (let ((expr (read (current-buffer)))) 139 ;; We need to ignore errors here, so that
140 (eval expr) 140 ;; defcustoms with :set don't bug out. Of
141 ;; Hash the file of the affected symbol. 141 ;; course, their values will not be assigned in
142 (setf (gethash (nth 1 expr) hash) name))))))) 142 ;; case of errors, but their `custom-group'
143 ;; properties will by that time be in place, and
144 ;; that's all we care about.
145 (ignore-errors
146 (eval expr))
147 ;; Hash the file of the affected symbol.
148 (setf (gethash (nth 1 expr) hash) name))))))
143 (cond 149 (cond
144 ((zerop (hash-table-count hash)) 150 ((zerop (hash-table-count hash))
145 (princ "(No customization dependencies") 151 (princ "(No customization dependencies")
146 (when (file-exists-p cusload-file) 152 (when (file-exists-p cusload-file)
147 (princ (format ", deleting %s" cusload-file)) 153 (princ (format ", deleting %s" cusload-file))