aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-10-07 10:22:51 -0700
committerGlenn Morris2010-10-07 10:22:51 -0700
commit06d9ef85db168b4dbe3b7d1c980bce06ceb3ed19 (patch)
tree51b41b663b519868c2b15d830532d7e9cd6494fa
parentac44263aedb1c739c24687239e21d278645455c7 (diff)
downloademacs-06d9ef85db168b4dbe3b7d1c980bce06ceb3ed19.tar.gz
emacs-06d9ef85db168b4dbe3b7d1c980bce06ceb3ed19.zip
Rename some more shadow.el stuff.
* lisp/emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords) (load-path-shadows-find-file): Rename variable and button. (list-load-path-shadows): Update button caller.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/shadow.el9
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0ae59478249..d6458c792e1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,9 @@
3 * emacs-lisp/shadow.el (shadow-font-lock-keywords) 3 * emacs-lisp/shadow.el (shadow-font-lock-keywords)
4 (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to 4 (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to
5 load-path-shadows-mode, update references. 5 load-path-shadows-mode, update references.
6 (load-path-shadows-font-lock-keywords, load-path-shadows-find-file):
7 Rename variable and button.
8 (list-load-path-shadows): Update button caller.
6 9
72010-10-07 Stefan Monnier <monnier@iro.umontreal.ca> 102010-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
8 11
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index 9297ee8b068..ee59cca2d6f 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -152,7 +152,7 @@ See the documentation for `list-load-path-shadows' for further information."
152 (nth 7 (file-attributes f2))) 152 (nth 7 (file-attributes f2)))
153 (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2)))))))) 153 (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2))))))))
154 154
155(defvar shadow-font-lock-keywords 155(defvar load-path-shadows-font-lock-keywords
156 `((,(format "hides \\(%s.*\\)" 156 `((,(format "hides \\(%s.*\\)"
157 (file-name-directory (locate-library "simple.el"))) 157 (file-name-directory (locate-library "simple.el")))
158 . (1 font-lock-warning-face))) 158 . (1 font-lock-warning-face)))
@@ -161,13 +161,13 @@ See the documentation for `list-load-path-shadows' for further information."
161(define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows" 161(define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows"
162 "Major mode for load-path shadows buffer." 162 "Major mode for load-path shadows buffer."
163 (set (make-local-variable 'font-lock-defaults) 163 (set (make-local-variable 'font-lock-defaults)
164 '((shadow-font-lock-keywords))) 164 '((load-path-shadows-font-lock-keywords)))
165 (setq buffer-undo-list t 165 (setq buffer-undo-list t
166 buffer-read-only t)) 166 buffer-read-only t))
167 167
168;; TODO use text-properties instead, a la dired. 168;; TODO use text-properties instead, a la dired.
169(require 'button) 169(require 'button)
170(define-button-type 'shadow-find-file 170(define-button-type 'load-path-shadows-find-file
171 'follow-link t 171 'follow-link t
172;; 'face 'default 172;; 'face 'default
173 'action (lambda (button) 173 'action (lambda (button)
@@ -273,7 +273,8 @@ function, `find-emacs-lisp-shadows'."
273 (dotimes (i 2) 273 (dotimes (i 2)
274 (make-button (match-beginning (1+ i)) 274 (make-button (match-beginning (1+ i))
275 (match-end (1+ i)) 275 (match-end (1+ i))
276 'type 'shadow-find-file 'shadow-file 276 'type 'load-path-shadows-find-file
277 'shadow-file
277 (match-string (1+ i))))) 278 (match-string (1+ i)))))
278 (goto-char (point-max))))) 279 (goto-char (point-max)))))
279 ;; We are non-interactive, print shadows via message. 280 ;; We are non-interactive, print shadows via message.