Mercurial > emacs
comparison lisp/speedbar.el @ 71091:3407291ee367
*** empty log message ***
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Tue, 30 May 2006 08:10:16 +0000 |
parents | f30d66ed3e9a |
children | 4dac62a8a77b a8190f7e546e |
comparison
equal
deleted
inserted
replaced
71090:d135a47c9bbe | 71091:3407291ee367 |
---|---|
919 (defvar speedbar-easymenu-definition-trailer | 919 (defvar speedbar-easymenu-definition-trailer |
920 (append | 920 (append |
921 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) | 921 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) |
922 (list ["Customize..." speedbar-customize t])) | 922 (list ["Customize..." speedbar-customize t])) |
923 (list | 923 (list |
924 ["Detach" speedbar-detach (and speedbar-frame | |
925 (eq (selected-frame) speedbar-frame)) ] | |
926 ["Close" dframe-close-frame t] | 924 ["Close" dframe-close-frame t] |
927 ["Quit" delete-frame t] )) | 925 ["Quit" delete-frame t] )) |
928 "Menu items appearing at the end of the speedbar menu.") | 926 "Menu items appearing at the end of the speedbar menu.") |
929 | 927 |
930 (defvar speedbar-desired-buffer nil | 928 (defvar speedbar-desired-buffer nil |
1045 (t | 1043 (t |
1046 (dframe-reposition-frame speedbar-frame | 1044 (dframe-reposition-frame speedbar-frame |
1047 (dframe-attached-frame speedbar-frame) | 1045 (dframe-attached-frame speedbar-frame) |
1048 speedbar-default-position)))) | 1046 speedbar-default-position)))) |
1049 | 1047 |
1050 (defun speedbar-detach () | |
1051 "Detach the current Speedbar from auto-updating. | |
1052 Doing this allows the creation of a second speedbar." | |
1053 (interactive) | |
1054 (let ((buffer speedbar-buffer)) | |
1055 (dframe-detach 'speedbar-frame 'speedbar-cached-frame 'speedbar-buffer) | |
1056 (save-excursion | |
1057 (set-buffer buffer) | |
1058 ;; Permanently disable auto-updating in this speedbar buffer. | |
1059 (set (make-local-variable 'speedbar-update-flag) nil) | |
1060 (set (make-local-variable 'speedbar-update-flag-disable) t) | |
1061 ;; Make local copies of all the different variables to prevent | |
1062 ;; funny stuff later... | |
1063 ))) | |
1064 | |
1065 (defsubst speedbar-current-frame () | 1048 (defsubst speedbar-current-frame () |
1066 "Return the frame to use for speedbar based on current context." | 1049 "Return the frame to use for speedbar based on current context." |
1067 (dframe-current-frame 'speedbar-frame 'speedbar-mode)) | 1050 (dframe-current-frame 'speedbar-frame 'speedbar-mode)) |
1068 | 1051 |
1069 (defun speedbar-handle-delete-frame (e) | 1052 (defun speedbar-handle-delete-frame (e) |
1222 (if speedbar-shown-directories | 1205 (if speedbar-shown-directories |
1223 ;; file display mode version | 1206 ;; file display mode version |
1224 (speedbar-initial-menu) | 1207 (speedbar-initial-menu) |
1225 (save-excursion | 1208 (save-excursion |
1226 (dframe-select-attached-frame speedbar-frame) | 1209 (dframe-select-attached-frame speedbar-frame) |
1227 (if (local-variable-p | 1210 (eval (nth 1 (assoc speedbar-initial-expansion-list-name |
1228 'speedbar-easymenu-definition-special | 1211 speedbar-initial-expansion-mode-alist))))) |
1229 (current-buffer)) | |
1230 ;; If bound locally, we can use it | |
1231 speedbar-easymenu-definition-special))) | |
1232 ;; Dynamic menu stuff | 1212 ;; Dynamic menu stuff |
1233 '("-") | 1213 '("-") |
1234 (list (cons "Displays" | 1214 (list (cons "Displays" |
1235 (let ((displays nil) | 1215 (let ((displays nil) |
1236 (alist speedbar-initial-expansion-mode-alist)) | 1216 (alist speedbar-initial-expansion-mode-alist)) |