Mercurial > emacs
comparison lisp/msb.el @ 85810:0ab0355c4c17
(msb-unload-hook): Remove function and variable.
(msb-unload-function): New-style unload function,
adapted from `msb-unload-hook'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 31 Oct 2007 00:30:09 +0000 |
parents | a14b49f75b09 |
children | d3e87ee5aa0e |
comparison
equal
deleted
inserted
replaced
85809:a3af441f6431 | 85810:0ab0355c4c17 |
---|---|
953 (if msb-files-by-directory | 953 (if msb-files-by-directory |
954 "*Files by type*" | 954 "*Files by type*" |
955 "*Files by directory*") | 955 "*Files by directory*") |
956 'msb--toggle-menu-type))))))) | 956 'msb--toggle-menu-type))))))) |
957 | 957 |
958 (defun msb--create-buffer-menu () | 958 (defun msb--create-buffer-menu () |
959 (save-match-data | 959 (save-match-data |
960 (save-excursion | 960 (save-excursion |
961 (msb--create-buffer-menu-2)))) | 961 (msb--create-buffer-menu-2)))) |
962 | 962 |
963 (defun msb--toggle-menu-type () | 963 (defun msb--toggle-menu-type () |
1102 (when (cdr frames) | 1102 (when (cdr frames) |
1103 (let* ((frame-length (length frames)) | 1103 (let* ((frame-length (length frames)) |
1104 (f-title (format "Frames (%d)" frame-length))) | 1104 (f-title (format "Frames (%d)" frame-length))) |
1105 ;; List only the N most recently selected frames | 1105 ;; List only the N most recently selected frames |
1106 (when (and (integerp msb-max-menu-items) | 1106 (when (and (integerp msb-max-menu-items) |
1107 (> msb-max-menu-items 1) | 1107 (> msb-max-menu-items 1) |
1108 (> frame-length msb-max-menu-items)) | 1108 (> frame-length msb-max-menu-items)) |
1109 (setcdr (nthcdr msb-max-menu-items frames) nil)) | 1109 (setcdr (nthcdr msb-max-menu-items frames) nil)) |
1110 (setq frames-menu | 1110 (setq frames-menu |
1111 (nconc | 1111 (nconc |
1112 (list 'frame f-title '(nil) 'keymap f-title) | 1112 (list 'frame f-title '(nil) 'keymap f-title) |
1147 (msb-menu-bar-update-buffers t)) | 1147 (msb-menu-bar-update-buffers t)) |
1148 (remove-hook 'menu-bar-update-hook 'msb-menu-bar-update-buffers) | 1148 (remove-hook 'menu-bar-update-hook 'msb-menu-bar-update-buffers) |
1149 (add-hook 'menu-bar-update-hook 'menu-bar-update-buffers) | 1149 (add-hook 'menu-bar-update-hook 'menu-bar-update-buffers) |
1150 (menu-bar-update-buffers t))) | 1150 (menu-bar-update-buffers t))) |
1151 | 1151 |
1152 (defun msb-unload-hook () | 1152 (defun msb-unload-function () |
1153 (msb-mode 0)) | 1153 "Unload the Msb library." |
1154 (add-hook 'msb-unload-hook 'msb-unload-hook) | 1154 (msb-mode -1) |
1155 ;; continue standard unloading | |
1156 nil) | |
1155 | 1157 |
1156 (provide 'msb) | 1158 (provide 'msb) |
1157 (eval-after-load "msb" '(run-hooks 'msb-after-load-hook 'msb-after-load-hooks)) | 1159 (eval-after-load "msb" '(run-hooks 'msb-after-load-hook 'msb-after-load-hooks)) |
1158 | 1160 |
1159 ;; arch-tag: 403f9e82-b92e-4e7a-a797-5d6d9b76da36 | 1161 ;; arch-tag: 403f9e82-b92e-4e7a-a797-5d6d9b76da36 |