aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Janík2002-04-11 13:41:49 +0000
committerPavel Janík2002-04-11 13:41:49 +0000
commitbc6f379196962ead04bba5c7cf87ec6365f20edc (patch)
tree5eb9b042abe39b66a90965faf6c04e70fd38e8e6
parente7572209e48f2e95ca9f07867d8b6b4eb3f794e7 (diff)
downloademacs-bc6f379196962ead04bba5c7cf87ec6365f20edc.tar.gz
emacs-bc6f379196962ead04bba5c7cf87ec6365f20edc.zip
(menu-bar-adv-search-menu): Add incremental search.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/menu-bar.el32
2 files changed, 24 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b59aad5af9c..ff6ad3b4795 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12002-04-11 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2
3 * menu-bar.el (menu-bar-adv-search-menu): Add incremental search.
4
12002-04-11 Andreas Schwab <schwab@suse.de> 52002-04-11 Andreas Schwab <schwab@suse.de>
2 6
3 * files.el (file-name-non-special): Handle return value of t from 7 * files.el (file-name-non-special): Handle return value of t from
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index cdad7aeda95..f933b135bef 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -285,6 +285,14 @@ A large number or nil slows down menu responsiveness."
285(define-key menu-bar-adv-search-menu [re-search-forward] 285(define-key menu-bar-adv-search-menu [re-search-forward]
286 '(menu-item "Search Regexp..." nonincremental-re-search-forward 286 '(menu-item "Search Regexp..." nonincremental-re-search-forward
287 :help "Search forward for a regular expression")) 287 :help "Search forward for a regular expression"))
288(define-key menu-bar-adv-search-menu [separator-tag-isearch]
289 '(menu-item "--"))
290(define-key menu-bar-adv-search-menu [isearch-backward]
291 '(menu-item "Incremental Search Backwards..." isearch-backward
292 :help "Incremental search backwards for a string"))
293(define-key menu-bar-adv-search-menu [isearch-forward]
294 '(menu-item "Incremental Search..." isearch-forward
295 :help "Incremental search forward for a string"))
288(define-key menu-bar-search-menu [re-search] 296(define-key menu-bar-search-menu [re-search]
289 (list 'menu-item "Advanced Search/Replace" menu-bar-adv-search-menu 297 (list 'menu-item "Advanced Search/Replace" menu-bar-adv-search-menu
290 :help "Regexp and Tags search and replace")) 298 :help "Regexp and Tags search and replace"))
@@ -530,7 +538,7 @@ Do the same for the keys of the same name."
530 (substring help 1) ".") 538 (substring help 1) ".")
531 (interactive) 539 (interactive)
532 (if ,(if body `(progn . ,body) 540 (if ,(if body `(progn . ,body)
533 `(progn 541 `(progn
534 (custom-load-symbol ',variable) 542 (custom-load-symbol ',variable)
535 (let ((set (or (get ',variable 'custom-set) 'set-default)) 543 (let ((set (or (get ',variable 'custom-set) 'set-default))
536 (get (or (get ',variable 'custom-get) 'default-value))) 544 (get (or (get ',variable 'custom-get) 'default-value)))
@@ -543,7 +551,7 @@ Do the same for the keys of the same name."
543 ;; options the user have already set explicitly in his init 551 ;; options the user have already set explicitly in his init
544 ;; file. Unfortunately, he could very likely call the function 552 ;; file. Unfortunately, he could very likely call the function
545 ;; defined above there. So we put `customize-mark-as-set' in a 553 ;; defined above there. So we put `customize-mark-as-set' in a
546 ;; lambda expression. 554 ;; lambda expression.
547 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11. 555 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
548 '(menu-item ,doc (lambda () 556 '(menu-item ,doc (lambda ()
549 (interactive) 557 (interactive)
@@ -616,7 +624,7 @@ Do the same for the keys of the same name."
616 (message "Display-time mode disabled."))) 624 (message "Display-time mode disabled.")))
617 625
618(define-key menu-bar-showhide-menu [showhide-date-time] 626(define-key menu-bar-showhide-menu [showhide-date-time]
619 '(menu-item "Date and time" (lambda () 627 '(menu-item "Date and Time" (lambda ()
620 (interactive) 628 (interactive)
621 (showhide-date-time) 629 (showhide-date-time)
622 (customize-mark-as-set 'display-time-mode)) 630 (customize-mark-as-set 'display-time-mode))
@@ -632,13 +640,13 @@ Do the same for the keys of the same name."
632 :button (:toggle 640 :button (:toggle
633 . (and (boundp 'speedbar-frame) 641 . (and (boundp 'speedbar-frame)
634 (frame-live-p (symbol-value 'speedbar-frame)) 642 (frame-live-p (symbol-value 'speedbar-frame))
635 (frame-visible-p 643 (frame-visible-p
636 (symbol-value 'speedbar-frame)))))) 644 (symbol-value 'speedbar-frame))))))
637 645
638(defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar")) 646(defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar"))
639 647
640(define-key menu-bar-showhide-scroll-bar-menu [right] 648(define-key menu-bar-showhide-scroll-bar-menu [right]
641 '(menu-item "On the Right" 649 '(menu-item "On the Right"
642 (lambda () 650 (lambda ()
643 (interactive) 651 (interactive)
644 (customize-set-variable 'scroll-bar-mode 'right)) 652 (customize-set-variable 'scroll-bar-mode 'right))
@@ -648,7 +656,7 @@ Do the same for the keys of the same name."
648 (frame-parameters))) 'right)))) 656 (frame-parameters))) 'right))))
649 657
650(define-key menu-bar-showhide-scroll-bar-menu [left] 658(define-key menu-bar-showhide-scroll-bar-menu [left]
651 '(menu-item "On the Left" 659 '(menu-item "On the Left"
652 (lambda () 660 (lambda ()
653 (interactive) 661 (interactive)
654 (customize-set-variable 'scroll-bar-mode 'left)) 662 (customize-set-variable 'scroll-bar-mode 'left))
@@ -658,7 +666,7 @@ Do the same for the keys of the same name."
658 (frame-parameters))) 'left)))) 666 (frame-parameters))) 'left))))
659 667
660(define-key menu-bar-showhide-scroll-bar-menu [none] 668(define-key menu-bar-showhide-scroll-bar-menu [none]
661 '(menu-item "None" 669 '(menu-item "None"
662 (lambda () 670 (lambda ()
663 (interactive) 671 (interactive)
664 (customize-set-variable 'scroll-bar-mode nil)) 672 (customize-set-variable 'scroll-bar-mode nil))
@@ -668,7 +676,7 @@ Do the same for the keys of the same name."
668 (frame-parameters))) nil)))) 676 (frame-parameters))) nil))))
669 677
670(define-key menu-bar-showhide-menu [showhide-scroll-bar] 678(define-key menu-bar-showhide-menu [showhide-scroll-bar]
671 (list 'menu-item "Scroll-Bar" menu-bar-showhide-scroll-bar-menu 679 (list 'menu-item "Scroll-bar" menu-bar-showhide-scroll-bar-menu
672 :visible 'window-system 680 :visible 'window-system
673 :help "Select scroll-bar mode")) 681 :help "Select scroll-bar mode"))
674 682
@@ -681,7 +689,7 @@ Do the same for the keys of the same name."
681 (message "Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear."))) 689 (message "Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear.")))
682 690
683(define-key menu-bar-showhide-menu [showhide-menu-bar] 691(define-key menu-bar-showhide-menu [showhide-menu-bar]
684 '(menu-item "Menu-bar" 692 '(menu-item "Menu-bar"
685 (lambda () 693 (lambda ()
686 (interactive) 694 (interactive)
687 (showhide-menu-bar) 695 (showhide-menu-bar)
@@ -697,7 +705,7 @@ Do the same for the keys of the same name."
697 (message "Tool-bar mode disabled."))) 705 (message "Tool-bar mode disabled.")))
698 706
699(define-key menu-bar-showhide-menu [showhide-tool-bar] 707(define-key menu-bar-showhide-menu [showhide-tool-bar]
700 '(menu-item "Tool-bar" 708 '(menu-item "Tool-bar"
701 (lambda () 709 (lambda ()
702 (interactive) 710 (interactive)
703 (showhide-tool-bar) 711 (showhide-tool-bar)
@@ -778,7 +786,7 @@ Do the same for the keys of the same name."
778 (interactive) 786 (interactive)
779 (toggle-text-mode-auto-fill) 787 (toggle-text-mode-auto-fill)
780 ;; This is somewhat questionable, as `text-mode-hook' 788 ;; This is somewhat questionable, as `text-mode-hook'
781 ;; might have changed outside customize. 789 ;; might have changed outside customize.
782 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11. 790 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
783 (customize-mark-as-set 'text-mode-hook)) 791 (customize-mark-as-set 'text-mode-hook))
784 :help "Automatically fill text between left and right margins" 792 :help "Automatically fill text between left and right margins"
@@ -791,7 +799,7 @@ Do the same for the keys of the same name."
791 (interactive) 799 (interactive)
792 (setq truncate-lines (not truncate-lines)) 800 (setq truncate-lines (not truncate-lines))
793 (set-buffer-modified-p (buffer-modified-p)) 801 (set-buffer-modified-p (buffer-modified-p))
794 (message "Truncate long lines %s" 802 (message "Truncate long lines %s"
795 (if truncate-lines "enabled" "disabled"))) 803 (if truncate-lines "enabled" "disabled")))
796 :help "Truncate long lines on the screen" 804 :help "Truncate long lines on the screen"
797 :button (:toggle . truncate-lines))) 805 :button (:toggle . truncate-lines)))