Mercurial > emacs
comparison lisp/menu-bar.el @ 90718:f1d13e615070
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 523-544)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 168-171)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-150
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 07 Dec 2006 04:14:14 +0000 |
parents | dbe3f29e61d6 091b7540d54d |
children | 6588c6259dfb |
comparison
equal
deleted
inserted
replaced
90717:06937e972ad0 | 90718:f1d13e615070 |
---|---|
460 (not (mouse-region-match))) | 460 (not (mouse-region-match))) |
461 :help | 461 :help |
462 "Delete the text in region between mark and current position")) | 462 "Delete the text in region between mark and current position")) |
463 (defvar yank-menu (cons "Select Yank" nil)) | 463 (defvar yank-menu (cons "Select Yank" nil)) |
464 (fset 'yank-menu (cons 'keymap yank-menu)) | 464 (fset 'yank-menu (cons 'keymap yank-menu)) |
465 (define-key menu-bar-edit-menu [select-paste] | 465 (define-key menu-bar-edit-menu [paste-from-menu] |
466 '(menu-item "Select and Paste" yank-menu | 466 '(menu-item "Paste from kill menu" yank-menu |
467 :enable (and (cdr yank-menu) (not buffer-read-only)))) | 467 :enable (and (cdr yank-menu) (not buffer-read-only)) |
468 :help "Choose a string from the kill ring and paste it")) | |
468 (define-key menu-bar-edit-menu [paste] | 469 (define-key menu-bar-edit-menu [paste] |
469 '(menu-item "Paste" yank | 470 '(menu-item "Paste" yank |
470 :enable (and | 471 :enable (and |
471 ;; Emacs compiled --without-x doesn't have | 472 ;; Emacs compiled --without-x doesn't have |
472 ;; x-selection-exists-p. | 473 ;; x-selection-exists-p. |
621 `(progn | 622 `(progn |
622 (custom-load-symbol ',variable) | 623 (custom-load-symbol ',variable) |
623 (let ((set (or (get ',variable 'custom-set) 'set-default)) | 624 (let ((set (or (get ',variable 'custom-set) 'set-default)) |
624 (get (or (get ',variable 'custom-get) 'default-value))) | 625 (get (or (get ',variable 'custom-get) 'default-value))) |
625 (funcall set ',variable (not (funcall get ',variable)))))) | 626 (funcall set ',variable (not (funcall get ',variable)))))) |
626 (message ,message "enabled") | 627 (message ,message "enabled globally") |
627 (message ,message "disabled")) | 628 (message ,message "disabled globally")) |
628 ;; The function `customize-mark-as-set' must only be called when | 629 ;; The function `customize-mark-as-set' must only be called when |
629 ;; a variable is set interactively, as the purpose is to mark it as | 630 ;; a variable is set interactively, as the purpose is to mark it as |
630 ;; a candidate for "Save Options", and we do not want to save options | 631 ;; a candidate for "Save Options", and we do not want to save options |
631 ;; the user have already set explicitly in his init file. | 632 ;; the user have already set explicitly in his init file. |
632 (if interactively (customize-mark-as-set ',variable))) | 633 (if interactively (customize-mark-as-set ',variable))) |
812 | 813 |
813 (define-key menu-bar-showhide-fringe-menu [indicate-empty-lines] | 814 (define-key menu-bar-showhide-fringe-menu [indicate-empty-lines] |
814 (menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines | 815 (menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines |
815 "Empty Line Indicators" | 816 "Empty Line Indicators" |
816 "Indicating of empty lines %s" | 817 "Indicating of empty lines %s" |
817 "Indicate trailing empty lines in fringe")) | 818 "Indicate trailing empty lines in fringe, globally")) |
818 | 819 |
819 (defun menu-bar-showhide-fringe-menu-customize () | 820 (defun menu-bar-showhide-fringe-menu-customize () |
820 "Show customization buffer for `fringe-mode'." | 821 "Show customization buffer for `fringe-mode'." |
821 (interactive) | 822 (interactive) |
822 (customize-variable 'fringe-mode)) | 823 (customize-variable 'fringe-mode)) |
1016 (:visible (and (boundp 'cua-enable-cua-keys) | 1017 (:visible (and (boundp 'cua-enable-cua-keys) |
1017 (not cua-enable-cua-keys))))) | 1018 (not cua-enable-cua-keys))))) |
1018 | 1019 |
1019 (define-key menu-bar-options-menu [case-fold-search] | 1020 (define-key menu-bar-options-menu [case-fold-search] |
1020 (menu-bar-make-toggle toggle-case-fold-search case-fold-search | 1021 (menu-bar-make-toggle toggle-case-fold-search case-fold-search |
1021 "Case-Insensitive Search" | 1022 "Case-Insensitive Search" |
1022 "Case-Insensitive Search %s" | 1023 "Case-Insensitive Search %s" |
1023 "Ignore letter-case in search")) | 1024 "Globally ignore letter-case in search")) |
1024 | 1025 |
1025 (defun menu-bar-text-mode-auto-fill () | 1026 (defun menu-bar-text-mode-auto-fill () |
1026 (interactive) | 1027 (interactive) |
1027 (toggle-text-mode-auto-fill) | 1028 (toggle-text-mode-auto-fill) |
1028 ;; This is somewhat questionable, as `text-mode-hook' | 1029 ;; This is somewhat questionable, as `text-mode-hook' |
1594 "..." | 1595 "..." |
1595 (substring name -12)) | 1596 (substring name -12)) |
1596 name)))) | 1597 name)))) |
1597 ;; Compute the maximum length of any name. | 1598 ;; Compute the maximum length of any name. |
1598 (dolist (buf buffer-list) | 1599 (dolist (buf buffer-list) |
1599 (unless (eq ?\ (aref (cdr buf) 0)) | 1600 (unless (eq ?\s (aref (cdr buf) 0)) |
1600 (setq menu-bar-update-buffers-maxbuf | 1601 (setq menu-bar-update-buffers-maxbuf |
1601 (max menu-bar-update-buffers-maxbuf | 1602 (max menu-bar-update-buffers-maxbuf |
1602 (length (cdr buf)))))) | 1603 (length (cdr buf)))))) |
1603 ;; Set ALIST to an alist of the form | 1604 ;; Set ALIST to an alist of the form |
1604 ;; ITEM-STRING . BUFFER | 1605 ;; ITEM-STRING . BUFFER |
1605 (dolist (buf buffer-list) | 1606 (dolist (buf buffer-list) |
1606 (unless (eq ?\ (aref (cdr buf) 0)) | 1607 (unless (eq ?\s (aref (cdr buf) 0)) |
1607 (push (menu-bar-update-buffers-1 buf) alist))) | 1608 (push (menu-bar-update-buffers-1 buf) alist))) |
1608 ;; Now make the actual list of items, and add | 1609 ;; Now make the actual list of items, and add |
1609 ;; some miscellaneous buffer commands to the end. | 1610 ;; some miscellaneous buffer commands to the end. |
1610 (mapcar (lambda (pair) | 1611 (mapcar (lambda (pair) |
1611 ;; This is somewhat risque, to use | 1612 ;; This is somewhat risque, to use |