diff options
| author | Glenn Morris | 2013-05-21 20:13:56 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-05-21 20:13:56 -0700 |
| commit | 0cdffd7dd407452c8d60931736a5be52cf9ed7b6 (patch) | |
| tree | 0ce2f01293b833e673dc341aa7396d2e78eb0d0e /lisp/mail | |
| parent | ab56a6f42c21c8c074b5e50a928955a8d69768f7 (diff) | |
| download | emacs-0cdffd7dd407452c8d60931736a5be52cf9ed7b6.tar.gz emacs-0cdffd7dd407452c8d60931736a5be52cf9ed7b6.zip | |
Small speedbar-related clean-up
* lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape):
Remove unnecessary declarations.
(dframe-message): Doc fix.
* lisp/info.el (dframe-select-attached-frame, dframe-current-frame):
Declare.
* lisp/speedbar.el (speedbar-message): Make it an obsolete alias.
Update all callers.
(speedbar-with-attached-buffer)
(speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete.
(speedbar-with-writable): Use backquote.
* lisp/emacs-lisp/eieio-opt.el (eieio-describe-class-sb):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click):
Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame
rather than speedbar- aliases.
* lisp/mail/rmail.el: Load dframe rather than speedbar when compiling.
(speedbar-make-specialized-keymap, speedbar-insert-button)
(dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame)
(speedbar-do-function-pointer): Declare.
(rmail-speedbar-button, rmail-speedbar-find-file)
(rmail-speedbar-move-message):
Use dframe-with-attached-buffer rather than speedbar- alias.
* lisp/progmodes/gud.el: Load dframe rather than speedbar when compiling.
(dframe-message, speedbar-make-specialized-keymap)
(speedbar-add-expansion-list, speedbar-mode-functions-list)
(speedbar-make-tag-line, speedbar-remove-localized-speedbar-support)
(speedbar-insert-button, dframe-select-attached-frame)
(dframe-maybee-jump-to-attached-frame)
(speedbar-change-initial-expansion-list)
(speedbar-previously-used-expansion-list-name): Declare.
(gud-speedbar-item-info, gud-gdb-goto-stackframe):
Use dframe-message, dframe-with-attached-buffer rather than
speedbar- aliases.
(gud-sentinel): Silence compiler.
* lisp/progmodes/vhdl-mode.el (speedbar-refresh)
(speedbar-do-function-pointer, speedbar-add-supported-extension)
(speedbar-add-mode-functions-list, speedbar-make-specialized-keymap)
(speedbar-change-initial-expansion-list, speedbar-add-expansion-list)
(speedbar-extension-list-to-regex, speedbar-directory-buttons)
(speedbar-file-lists, speedbar-make-tag-line)
(speedbar-line-directory, speedbar-goto-this-file)
(speedbar-center-buffer-smartly, speedbar-change-expand-button-char)
(speedbar-delete-subblock, speedbar-position-cursor-on-line)
(speedbar-make-button, speedbar-reset-scanners)
(speedbar-files-item-info, speedbar-line-text)
(speedbar-find-file-in-frame, speedbar-set-timer)
(dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare.
(speedbar-with-writable): Do not (re)define it.
(vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame
rather than speedbar- alias.
* lisp/cedet/ede/speedbar.el (ede-file-find, ede-tag-find):
* lisp/cedet/semantic/sb.el (semantic-sb-token-jump):
Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias.
* lisp/mh-e/mh-speed.el (mh-speed-view):
Use dframe-with-attached-buffer rather than speedbar- alias.
Diffstat (limited to 'lisp/mail')
| -rw-r--r-- | lisp/mail/rmail.el | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index af7ad220595..e29becedb6e 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4310,8 +4310,6 @@ This has an effect only if a summary buffer exists." | |||
| 4310 | (restore-buffer-modified-p nil))))))) | 4310 | (restore-buffer-modified-p nil))))))) |
| 4311 | 4311 | ||
| 4312 | ;;; Speedbar support for RMAIL files. | 4312 | ;;; Speedbar support for RMAIL files. |
| 4313 | (eval-when-compile (require 'speedbar)) | ||
| 4314 | |||
| 4315 | (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" | 4313 | (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" |
| 4316 | "Regexp matching Rmail folder names to be displayed in Speedbar. | 4314 | "Regexp matching Rmail folder names to be displayed in Speedbar. |
| 4317 | Enabling this permits Speedbar to display your folders for easy | 4315 | Enabling this permits Speedbar to display your folders for easy |
| @@ -4326,12 +4324,12 @@ browsing, and moving of messages." | |||
| 4326 | (defvar rmail-speedbar-key-map nil | 4324 | (defvar rmail-speedbar-key-map nil |
| 4327 | "Keymap used when in rmail display mode.") | 4325 | "Keymap used when in rmail display mode.") |
| 4328 | 4326 | ||
| 4327 | (declare-function speedbar-make-specialized-keymap "speedbar" ()) | ||
| 4328 | |||
| 4329 | (defun rmail-install-speedbar-variables () | 4329 | (defun rmail-install-speedbar-variables () |
| 4330 | "Install those variables used by speedbar to enhance rmail." | 4330 | "Install those variables used by speedbar to enhance rmail." |
| 4331 | (if rmail-speedbar-key-map | 4331 | (unless rmail-speedbar-key-map |
| 4332 | nil | ||
| 4333 | (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) | 4332 | (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) |
| 4334 | |||
| 4335 | (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) | 4333 | (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) |
| 4336 | (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) | 4334 | (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) |
| 4337 | (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) | 4335 | (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) |
| @@ -4346,6 +4344,9 @@ browsing, and moving of messages." | |||
| 4346 | (looking-at "<M> "))]) | 4344 | (looking-at "<M> "))]) |
| 4347 | "Additional menu-items to add to speedbar frame.") | 4345 | "Additional menu-items to add to speedbar frame.") |
| 4348 | 4346 | ||
| 4347 | (declare-function speedbar-insert-button "speedbar" | ||
| 4348 | (text face mouse function &optional token prevline)) | ||
| 4349 | |||
| 4349 | ;; Make sure our special speedbar major mode is loaded | 4350 | ;; Make sure our special speedbar major mode is loaded |
| 4350 | (if (featurep 'speedbar) | 4351 | (if (featurep 'speedbar) |
| 4351 | (rmail-install-speedbar-variables) | 4352 | (rmail-install-speedbar-variables) |
| @@ -4387,19 +4388,27 @@ current message into that RMAIL folder." | |||
| 4387 | (speedbar-insert-button file 'speedbar-file-face 'highlight | 4388 | (speedbar-insert-button file 'speedbar-file-face 'highlight |
| 4388 | 'rmail-speedbar-find-file nil t))))))) | 4389 | 'rmail-speedbar-find-file nil t))))))) |
| 4389 | 4390 | ||
| 4391 | (eval-when-compile (require 'dframe)) | ||
| 4392 | ;; Part of the macro expansion of dframe-with-attached-buffer. | ||
| 4393 | ;; At runtime, will be pulled in as a require of speedbar. | ||
| 4394 | (declare-function dframe-select-attached-frame "dframe" (&optional frame)) | ||
| 4395 | (declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) | ||
| 4396 | |||
| 4390 | (defun rmail-speedbar-button (text token indent) | 4397 | (defun rmail-speedbar-button (text token indent) |
| 4391 | "Execute an rmail command specified by TEXT. | 4398 | "Execute an rmail command specified by TEXT. |
| 4392 | The command used is TOKEN. INDENT is not used." | 4399 | The command used is TOKEN. INDENT is not used." |
| 4393 | (speedbar-with-attached-buffer | 4400 | (dframe-with-attached-buffer |
| 4394 | (funcall token t))) | 4401 | (funcall token t))) |
| 4395 | 4402 | ||
| 4396 | (defun rmail-speedbar-find-file (text token indent) | 4403 | (defun rmail-speedbar-find-file (text token indent) |
| 4397 | "Load in the rmail file TEXT. | 4404 | "Load in the rmail file TEXT. |
| 4398 | TOKEN and INDENT are not used." | 4405 | TOKEN and INDENT are not used." |
| 4399 | (speedbar-with-attached-buffer | 4406 | (dframe-with-attached-buffer |
| 4400 | (message "Loading in RMAIL file %s..." text) | 4407 | (message "Loading in RMAIL file %s..." text) |
| 4401 | (rmail text))) | 4408 | (rmail text))) |
| 4402 | 4409 | ||
| 4410 | (declare-function speedbar-do-function-pointer "speedbar" ()) | ||
| 4411 | |||
| 4403 | (defun rmail-speedbar-move-message-to-folder-on-line () | 4412 | (defun rmail-speedbar-move-message-to-folder-on-line () |
| 4404 | "If the current line is a folder, move current message to it." | 4413 | "If the current line is a folder, move current message to it." |
| 4405 | (interactive) | 4414 | (interactive) |
| @@ -4413,7 +4422,7 @@ TOKEN and INDENT are not used." | |||
| 4413 | (defun rmail-speedbar-move-message (text token indent) | 4422 | (defun rmail-speedbar-move-message (text token indent) |
| 4414 | "From button TEXT, copy current message to the rmail file specified by TOKEN. | 4423 | "From button TEXT, copy current message to the rmail file specified by TOKEN. |
| 4415 | TEXT and INDENT are not used." | 4424 | TEXT and INDENT are not used." |
| 4416 | (speedbar-with-attached-buffer | 4425 | (dframe-with-attached-buffer |
| 4417 | (message "Moving message to %s" token) | 4426 | (message "Moving message to %s" token) |
| 4418 | ;; expand-file-name is needed due to the unhelpful way in which | 4427 | ;; expand-file-name is needed due to the unhelpful way in which |
| 4419 | ;; rmail-output expands non-absolute filenames against rmail-default-file. | 4428 | ;; rmail-output expands non-absolute filenames against rmail-default-file. |