Mercurial > emacs
comparison lisp/speedbar.el @ 29130:b37210b05707
(speedbar-easymenu-definition-base): Image toggle fix.
(speedbar-insert-button): Invisible text property fix.
(speedbar-directory-plus): Renamed from speedbar-directory-+
(speedbar-directory-minus): Renamed from speedbar-directory--
(speedbar-page-plus): Renamed from speedbar-file-+
(speedbar-page-minus): Renamed from speedbar-file--
(speedbar-page): Renamed from speedbar-file-
(speedbar-tag): Renamed from speedbar-tag-
(speedbar-tag-plus): Renamed from speedbar-tag-+
(speedbar-tag-minus): Renamed from speedbar-tag--
(speedbar-expand-image-button-alist): Use above renames.
author | Eric M. Ludlam <zappo@gnu.org> |
---|---|
date | Wed, 24 May 2000 00:53:43 +0000 |
parents | 89a795d90175 |
children | 7f1b3013a136 |
comparison
equal
deleted
inserted
replaced
29129:1fad86b8adfc | 29130:b37210b05707 |
---|---|
867 (define-key speedbar-file-key-map "O" 'speedbar-item-object-delete) | 867 (define-key speedbar-file-key-map "O" 'speedbar-item-object-delete) |
868 (define-key speedbar-file-key-map "R" 'speedbar-item-rename) | 868 (define-key speedbar-file-key-map "R" 'speedbar-item-rename) |
869 ) | 869 ) |
870 | 870 |
871 (defvar speedbar-easymenu-definition-base | 871 (defvar speedbar-easymenu-definition-base |
872 `("Speedbar" | 872 (append |
873 ["Update" speedbar-refresh t] | 873 '("Speedbar" |
874 ["Auto Update" speedbar-toggle-updates | 874 ["Update" speedbar-refresh t] |
875 :style toggle :selected speedbar-update-flag] | 875 ["Auto Update" speedbar-toggle-updates |
876 ,(if (and (or (fboundp 'defimage) | 876 :style toggle :selected speedbar-update-flag]) |
877 (fboundp 'make-image-specifier)) | 877 (if (and (or (fboundp 'defimage) |
878 window-system) | 878 (fboundp 'make-image-specifier)) |
879 ["Use Images" speedbar-toggle-images | 879 window-system) |
880 :style toggle :selected speedbar-use-images]) | 880 (list |
881 ) | 881 ["Use Images" speedbar-toggle-images |
882 :style toggle :selected speedbar-use-images])) | |
883 ) | |
882 "Base part of the speedbar menu.") | 884 "Base part of the speedbar menu.") |
883 | 885 |
884 (defvar speedbar-easymenu-definition-special | 886 (defvar speedbar-easymenu-definition-special |
885 '(["Edit Item On Line" speedbar-edit-line t] | 887 '(["Edit Item On Line" speedbar-edit-line t] |
886 ["Show All Files" speedbar-toggle-show-all-files | 888 ["Show All Files" speedbar-toggle-show-all-files |
2004 If PREVLINE, then put this button on the previous line. | 2006 If PREVLINE, then put this button on the previous line. |
2005 | 2007 |
2006 This is a convenience function for special mode that create their own | 2008 This is a convenience function for special mode that create their own |
2007 specialized speedbar displays." | 2009 specialized speedbar displays." |
2008 (goto-char (point-max)) | 2010 (goto-char (point-max)) |
2009 (if (/= (current-column) 0) (insert "\n")) | 2011 (let ((start (point))) |
2010 (if prevline (progn (delete-char -1) (insert " "))) ;back up if desired... | 2012 (if (/= (current-column) 0) (insert "\n")) |
2013 (put-text-property start (point) 'invisible nil)) | |
2014 (if prevline (progn (delete-char -1) | |
2015 (insert " ") ;back up if desired... | |
2016 (put-text-property (1- (point)) (point) 'invisible nil))) | |
2011 (let ((start (point))) | 2017 (let ((start (point))) |
2012 (insert text) | 2018 (insert text) |
2013 (speedbar-make-button start (point) face mouse function token)) | 2019 (speedbar-make-button start (point) face mouse function token)) |
2014 (let ((start (point))) | 2020 (let ((start (point))) |
2015 (insert "\n") | 2021 (insert "\n") |
2016 (put-text-property start (point) 'face nil) | 2022 (put-text-property start (point) 'face nil) |
2023 (put-text-property start (point) 'invisible nil) | |
2017 (put-text-property start (point) 'mouse-face nil))) | 2024 (put-text-property start (point) 'mouse-face nil))) |
2018 | 2025 |
2019 (defun speedbar-make-button (start end face mouse function &optional token) | 2026 (defun speedbar-make-button (start end face mouse function &optional token) |
2020 "Create a button from START to END, with FACE as the display face. | 2027 "Create a button from START to END, with FACE as the display face. |
2021 MOUSE is the mouse face. When this button is clicked on FUNCTION | 2028 MOUSE is the mouse face. When this button is clicked on FUNCTION |
4208 (error nil)) | 4215 (error nil)) |
4209 ,docstring)) | 4216 ,docstring)) |
4210 | 4217 |
4211 ))) | 4218 ))) |
4212 | 4219 |
4213 (defimage-speedbar speedbar-directory-+ | 4220 (defimage-speedbar speedbar-directory-plus |
4214 ((:type xpm :file "sb-dir+.xpm" :ascent center)) | 4221 ((:type xpm :file "sb-dir-plus.xpm" :ascent center)) |
4215 "Image used for closed directories with stuff in them.") | 4222 "Image used for closed directories with stuff in them.") |
4216 | 4223 |
4217 (defimage-speedbar speedbar-directory-- | 4224 (defimage-speedbar speedbar-directory-minus |
4218 ((:type xpm :file "sb-dir-.xpm" :ascent center)) | 4225 ((:type xpm :file "sb-dir-minus.xpm" :ascent center)) |
4219 "Image used for open directories with stuff in them.") | 4226 "Image used for open directories with stuff in them.") |
4220 | 4227 |
4221 (defimage-speedbar speedbar-file-+ | 4228 (defimage-speedbar speedbar-page-plus |
4222 ((:type xpm :file "sb-file+.xpm" :ascent center)) | 4229 ((:type xpm :file "sb-pg-plus.xpm" :ascent center)) |
4223 "Image used for closed files with stuff in them.") | 4230 "Image used for closed files with stuff in them.") |
4224 | 4231 |
4225 (defimage-speedbar speedbar-file-- | 4232 (defimage-speedbar speedbar-page-minus |
4226 ((:type xpm :file "sb-file-.xpm" :ascent center)) | 4233 ((:type xpm :file "sb-pg-minus.xpm" :ascent center)) |
4227 "Image used for open files with stuff in them.") | 4234 "Image used for open files with stuff in them.") |
4228 | 4235 |
4229 (defimage-speedbar speedbar-file- | 4236 (defimage-speedbar speedbar-page |
4230 ((:type xpm :file "sb-file.xpm" :ascent center)) | 4237 ((:type xpm :file "sb-pg.xpm" :ascent center)) |
4231 "Image used for files that can't be opened.") | 4238 "Image used for files that can't be opened.") |
4232 | 4239 |
4233 (defimage-speedbar speedbar-tag- | 4240 (defimage-speedbar speedbar-tag |
4234 ((:type xpm :file "sb-tag.xpm" :ascent center)) | 4241 ((:type xpm :file "sb-tag.xpm" :ascent center)) |
4235 "Image used for tags.") | 4242 "Image used for tags.") |
4236 | 4243 |
4237 (defimage-speedbar speedbar-tag-+ | 4244 (defimage-speedbar speedbar-tag-plus |
4238 ((:type xpm :file "sb-tag+.xpm" :ascent center)) | 4245 ((:type xpm :file "sb-tag-plus.xpm" :ascent center)) |
4239 "Image used for closed tag groups.") | 4246 "Image used for closed tag groups.") |
4240 | 4247 |
4241 (defimage-speedbar speedbar-tag-- | 4248 (defimage-speedbar speedbar-tag-minus |
4242 ((:type xpm :file "sb-tag-.xpm" :ascent center)) | 4249 ((:type xpm :file "sb-tag-minus.xpm" :ascent center)) |
4243 "Image used for open tag groups.") | 4250 "Image used for open tag groups.") |
4244 | 4251 |
4245 (defimage-speedbar speedbar-tag-gt | 4252 (defimage-speedbar speedbar-tag-gt |
4246 ((:type xpm :file "sb-tag-gt.xpm" :ascent center)) | 4253 ((:type xpm :file "sb-tag-gt.xpm" :ascent center)) |
4247 "Image used for open tag groups.") | 4254 "Image used for open tag groups.") |
4257 (defimage-speedbar speedbar-mail | 4264 (defimage-speedbar speedbar-mail |
4258 ((:type xpm :file "sb-mail.xpm" :ascent center)) | 4265 ((:type xpm :file "sb-mail.xpm" :ascent center)) |
4259 "Image used for open tag groups.") | 4266 "Image used for open tag groups.") |
4260 | 4267 |
4261 (defvar speedbar-expand-image-button-alist | 4268 (defvar speedbar-expand-image-button-alist |
4262 '(("<+>" . speedbar-directory-+) | 4269 '(("<+>" . speedbar-directory-plus) |
4263 ("<->" . speedbar-directory--) | 4270 ("<->" . speedbar-directory-minus) |
4264 ("[+]" . speedbar-file-+) | 4271 ("[+]" . speedbar-page-plus) |
4265 ("[-]" . speedbar-file--) | 4272 ("[-]" . speedbar-page-minus) |
4266 ("[?]" . speedbar-file-) | 4273 ("[?]" . speedbar-page) |
4267 ("{+}" . speedbar-tag-+) | 4274 ("{+}" . speedbar-tag-plus) |
4268 ("{-}" . speedbar-tag--) | 4275 ("{-}" . speedbar-tag-minus) |
4269 ("<M>" . speedbar-mail) | 4276 ("<M>" . speedbar-mail) |
4270 (" =>" . speedbar-tag-) | 4277 (" =>" . speedbar-tag) |
4271 (" +>" . speedbar-tag-gt) | 4278 (" +>" . speedbar-tag-gt) |
4272 (" ->" . speedbar-tag-v) | 4279 (" ->" . speedbar-tag-v) |
4273 (">" . speedbar-tag-) | 4280 (">" . speedbar-tag) |
4274 ("@" . speedbar-tag-type) | 4281 ("@" . speedbar-tag-type) |
4275 (" @" . speedbar-tag-type) | 4282 (" @" . speedbar-tag-type) |
4276 ) | 4283 ) |
4277 "List of text and image associations.") | 4284 "List of text and image associations.") |
4278 | 4285 |