aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2000-02-18 23:35:24 +0000
committerThien-Thi Nguyen2000-02-18 23:35:24 +0000
commita23c5037e7a10473af54a8db1ebd49dcea4f832f (patch)
treea427f40eaa3ab2ebcb9a2b48df23b7f77f13bb13
parent31047e0d1ab20a2948fc673f1a700b75a8c9c38c (diff)
downloademacs-a23c5037e7a10473af54a8db1ebd49dcea4f832f.tar.gz
emacs-a23c5037e7a10473af54a8db1ebd49dcea4f832f.zip
(hs-flag-region): No longer use `intangible' overlay property.
(hs-toggle-hiding): New command. (hs-mouse-toggle-hiding): Use `hs-toggle-hiding'. (hs-minor-mode): Move call to `hs-grok-mode-type' early on. Fix omission bug: Run `hs-minor-mode-hook' for both activation and deactivation.
-rw-r--r--lisp/ChangeLog52
-rw-r--r--lisp/progmodes/hideshow.el33
2 files changed, 52 insertions, 33 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dabc4653ec3..e44ba00336d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12000-02-18 Thien-Thi Nguyen <ttn@gnu.org>
2
3 * progmodes/hideshow.el (hs-flag-region): No longer use
4 `intangible' overlay property.
5
6 (hs-toggle-hiding): New command.
7 (hs-mouse-toggle-hiding): Use `hs-toggle-hiding'.
8
9 (hs-minor-mode): Move call to `hs-grok-mode-type' early on.
10 Fix omission bug: Run `hs-minor-mode-hook' for both activation
11 and deactivation.
12
12000-02-18 Gerd Moellmann <gerd@gnu.org> 132000-02-18 Gerd Moellmann <gerd@gnu.org>
2 14
3 * emacs-lisp/cl-macs.el (caar, cadr, cdar, cddr): Add defsetfs. 15 * emacs-lisp/cl-macs.el (caar, cadr, cdar, cddr): Add defsetfs.
@@ -27,11 +39,11 @@
27 39
282000-02-17 Gerd Moellmann <gerd@gnu.org> 402000-02-17 Gerd Moellmann <gerd@gnu.org>
29 41
30 * dired-aux.el (dired-do-copy): Remove spurious character.`n' 42 * dired-aux.el (dired-do-copy): Remove spurious character.`n'
31 within the code. 43 within the code.
32 44
332000-02-16 Dave Love <fx@gnu.org> 452000-02-16 Dave Love <fx@gnu.org>
34 46
35 * faces.el: Don't require custom. Add more specific :groups to 47 * faces.el: Don't require custom. Add more specific :groups to
36 various deffaces. 48 various deffaces.
37 (set-face-attribute): Purecopy args. 49 (set-face-attribute): Purecopy args.
@@ -446,7 +458,7 @@
446 (idlwave-statement-match): Fixed problem with assignment regexp. 458 (idlwave-statement-match): Fixed problem with assignment regexp.
447 (idlwave-font-lock-keywords): Improved regexp for keyword 459 (idlwave-font-lock-keywords): Improved regexp for keyword
448 parameters. 460 parameters.
449 (idlwave-surround): New argument LENGTH to support padding of 461 (idlwave-surround): New argument LENGTH to support padding of
450 operators longer than 1 char. 462 operators longer than 1 char.
451 463
452 * progmodes/idlw-shell.el (idlwave-shell-print): Fixed bug with 464 * progmodes/idlw-shell.el (idlwave-shell-print): Fixed bug with
@@ -466,7 +478,7 @@
466 (idlwave-shell-make-new-bp-overlay): Fixed glyph display for Emacs 478 (idlwave-shell-make-new-bp-overlay): Fixed glyph display for Emacs
467 21. 479 21.
468 (idlwave-shell-print-expression-function): New option. 480 (idlwave-shell-print-expression-function): New option.
469 481
470 * progmodes/idlw-toolbar.el (idlwave-toolbar-add-everywhere, 482 * progmodes/idlw-toolbar.el (idlwave-toolbar-add-everywhere,
471 idlwave-toolbar-remove-everywhere): Keybindings prefix is now 483 idlwave-toolbar-remove-everywhere): Keybindings prefix is now
472 `tool-bar' instead of `toolbar'. 484 `tool-bar' instead of `toolbar'.
@@ -534,7 +546,7 @@
534 documentation. 546 documentation.
535 (view-mode-exit): Keep entry in `view-return-to-alist' only when a 547 (view-mode-exit): Keep entry in `view-return-to-alist' only when a
536 window is not deleted. Modifies change 1998-04-26. 548 window is not deleted. Modifies change 1998-04-26.
537 549
5382000-01-31 Gerd Moellmann <gerd@gnu.org> 5502000-01-31 Gerd Moellmann <gerd@gnu.org>
539 551
540 * windmove.el: New file. 552 * windmove.el: New file.
@@ -542,7 +554,7 @@
542 * progmodes/ebnf2ps.el, progmodes/ebnf-bnf.el, 554 * progmodes/ebnf2ps.el, progmodes/ebnf-bnf.el,
543 progmodes/ebnf-iso.el, progmodes/ebnf-otz.el, 555 progmodes/ebnf-iso.el, progmodes/ebnf-otz.el,
544 progmodes/ebnf-yac.el: Update copyright and license info. 556 progmodes/ebnf-yac.el: Update copyright and license info.
545 557
546 * jit-lock.el (jit-lock-function): Widen before calculating end 558 * jit-lock.el (jit-lock-function): Widen before calculating end
547 position. 559 position.
548 (jit-lock-stealth-chunk-start): Rewritten. 560 (jit-lock-stealth-chunk-start): Rewritten.
@@ -597,7 +609,7 @@
597 currently selected frame. 609 currently selected frame.
598 (iswitchb-make-buflist): If iswitchb-use-frame-buffer-list is 610 (iswitchb-make-buflist): If iswitchb-use-frame-buffer-list is
599 non-nil, pass the selected frame to function buffer-list. 611 non-nil, pass the selected frame to function buffer-list.
600 612
6012000-01-29 Vinicius Jose Latorre <vinicius@cpqd.com.br> 6132000-01-29 Vinicius Jose Latorre <vinicius@cpqd.com.br>
602 614
603 * progmodes/ebnf2ps.el (ebnf-syntax): Doc fix 615 * progmodes/ebnf2ps.el (ebnf-syntax): Doc fix
@@ -702,7 +714,7 @@
702 * subr.el (dolist, dotimes): Copied from cl-macs.el 714 * subr.el (dolist, dotimes): Copied from cl-macs.el
703 and made to work. 715 and made to work.
704 716
705 * mail/undigest.el (rmail-digest-end-regexps): 717 * mail/undigest.el (rmail-digest-end-regexps):
706 Variable replaces rmail-digest-end-regexp. 718 Variable replaces rmail-digest-end-regexp.
707 Allows multiple regexps for detecting the end line. 719 Allows multiple regexps for detecting the end line.
708 (undigestify-rmail-message): Corresponding changes. 720 (undigestify-rmail-message): Corresponding changes.
@@ -731,7 +743,7 @@
731 * emacs-lisp/copyright.el (copyright-update): Removed the 743 * emacs-lisp/copyright.el (copyright-update): Removed the
732 requirement for a trailing space from `copyright-regexp', to 744 requirement for a trailing space from `copyright-regexp', to
733 support copyrights with owner specified on a separate line.. 745 support copyrights with owner specified on a separate line..
734 746
735 * align.el: New file. 747 * align.el: New file.
736 748
737 * menu-bar.el (menu-bar-tools-menu): Add EUDC submenu. 749 * menu-bar.el (menu-bar-tools-menu): Add EUDC submenu.
@@ -769,7 +781,7 @@
769 * net/eudc-bob.el, net/eudc-export.el, net/eudc-hotlist.el, 781 * net/eudc-bob.el, net/eudc-export.el, net/eudc-hotlist.el,
770 net/eudc-vars.el, net/eudc.el, net/eudcb-bbdb.el, 782 net/eudc-vars.el, net/eudc.el, net/eudcb-bbdb.el,
771 net/eudcb-ldap.el, net/eudcb-ph.el, net/ldap.el: New files. 783 net/eudcb-ldap.el, net/eudcb-ph.el, net/ldap.el: New files.
772 784
773 * add-log.el (add-change-log-entry): Fix error trying an `(insert 785 * add-log.el (add-change-log-entry): Fix error trying an `(insert
774 nil)'. 786 nil)'.
775 787
@@ -788,7 +800,7 @@
788 debug-on-error, and propagate new value to global binding, if 800 debug-on-error, and propagate new value to global binding, if
789 eval-expression-debug-on-error is non-nil, 801 eval-expression-debug-on-error is non-nil,
790 (eval-expression-debug-on-error): Change doc string. 802 (eval-expression-debug-on-error): Change doc string.
791 803
7922000-01-11 Richard M. Stallman <rms@caffeine.ai.mit.edu> 8042000-01-11 Richard M. Stallman <rms@caffeine.ai.mit.edu>
793 805
794 * emacs-lisp/edebug.el (with-syntax-table): Add a def-edebug-spec. 806 * emacs-lisp/edebug.el (with-syntax-table): Add a def-edebug-spec.
@@ -818,14 +830,14 @@
818 830
819 * add-log.el (add-log-current-defun): Handle user-defined 831 * add-log.el (add-log-current-defun): Handle user-defined
820 add-log-current-function returning nil, 832 add-log-current-function returning nil,
821 833
822 * add-log.el (add-change-log-entry): Insert version number 834 * add-log.el (add-change-log-entry): Insert version number
823 if having found a current function 835 if having found a current function
824 836
825 * add-log.el (add-log-current-defun): Call 837 * add-log.el (add-log-current-defun): Call
826 `add-log-current-defun-function'. Try matches at level 0 and 838 `add-log-current-defun-function'. Try matches at level 0 and
827 level 1. Strip whitespace from defun found. 839 level 1. Strip whitespace from defun found.
828 840
8292000-01-10 John Wiegley <johnw@gnu.org> 8412000-01-10 John Wiegley <johnw@gnu.org>
830 842
831 * allout.el (isearch-done/outline-provisions): Added `edit' 843 * allout.el (isearch-done/outline-provisions): Added `edit'
@@ -840,7 +852,7 @@
840 852
841 * vc-hooks.el (vc-parse-buffer): Handle mixtures of dates 853 * vc-hooks.el (vc-parse-buffer): Handle mixtures of dates
842 before and after the year 2000. 854 before and after the year 2000.
843 855
844 * textmodes/ispell-merged.el (xemacsp, version18p, version-20p): 856 * textmodes/ispell-merged.el (xemacsp, version18p, version-20p):
845 Add ispell- prefix. 857 Add ispell- prefix.
846 858
@@ -888,13 +900,13 @@
888 already accepted on this line. Don't allow query-replace on line 900 already accepted on this line. Don't allow query-replace on line
889 starting with math characters. Doesn't resend a line already sent 901 starting with math characters. Doesn't resend a line already sent
890 to ispell process. Fixes alignment error bug. 902 to ispell process. Fixes alignment error bug.
891 903
8922000-01-10 Richard M. Stallman <rms@caffeine.ai.mit.edu> 9042000-01-10 Richard M. Stallman <rms@caffeine.ai.mit.edu>
893 905
894 * dired-x.el (dired-guess-shell-alist-default): 906 * dired-x.el (dired-guess-shell-alist-default):
895 Suggest xloadimage, which is free, not xv, which isn't. 907 Suggest xloadimage, which is free, not xv, which isn't.
896 908
897 * ange-ftp.el (ange-ftp-file-name-nondirectory): 909 * ange-ftp.el (ange-ftp-file-name-nondirectory):
898 Don't ever include the host name or user name in the value. 910 Don't ever include the host name or user name in the value.
899 911
9002000-01-09 Gerd Moellmann <gerd@gnu.org> 9122000-01-09 Gerd Moellmann <gerd@gnu.org>
@@ -904,7 +916,7 @@
904 916
9052000-01-09 Stephen Eglen <stephen@gnu.org> 9172000-01-09 Stephen Eglen <stephen@gnu.org>
906 918
907 * dired-x.el (dired-guess-shell-alist-default): Suggest xv 919 * dired-x.el (dired-guess-shell-alist-default): Suggest xv
908 for .png files. 920 for .png files.
909 921
9102000-01-09 Per Abrahamsen <abraham@dina.kvl.dk> 9222000-01-09 Per Abrahamsen <abraham@dina.kvl.dk>
@@ -916,7 +928,7 @@
916 * progmodes/cperl-mode.el: Replace ^F with ^L. 928 * progmodes/cperl-mode.el: Replace ^F with ^L.
917 929
918 * sendmail.el (toplevel): Provide `sendmail' when compiling 930 * sendmail.el (toplevel): Provide `sendmail' when compiling
919 before `require'ing rmail and mailalias to prevent infinite 931 before `require'ing rmail and mailalias to prevent infinite
920 recursion. 932 recursion.
921 933
9222000-01-08 Dave Love <fx@gnu.org> 9342000-01-08 Dave Love <fx@gnu.org>
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 879e14876ed..14e7fe07b59 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -29,7 +29,7 @@
29 29
30;; * Commands provided 30;; * Commands provided
31;; 31;;
32;; This file provides Hideshow Minor Mode. When active, eight commands 32;; This file provides Hideshow Minor Mode. When active, nine commands
33;; are available, implementing block hiding and showing. They (and their 33;; are available, implementing block hiding and showing. They (and their
34;; keybindings) are: 34;; keybindings) are:
35;; 35;;
@@ -39,6 +39,7 @@
39;; hs-show-all C-c S 39;; hs-show-all C-c S
40;; hs-show-region C-c R 40;; hs-show-region C-c R
41;; hs-hide-level C-c L 41;; hs-hide-level C-c L
42;; hs-toggle-hiding
42;; hs-mouse-toggle-hiding [(shift button-2)] 43;; hs-mouse-toggle-hiding [(shift button-2)]
43;; hs-hide-initial-comment-block 44;; hs-hide-initial-comment-block
44;; 45;;
@@ -105,8 +106,7 @@
105;; 106;;
106;; where X = {emacs-lisp,c,c++,perl,...}. You can also manually toggle 107;; where X = {emacs-lisp,c,c++,perl,...}. You can also manually toggle
107;; hideshow minor mode by typing `M-x hs-minor-mode'. After hideshow is 108;; hideshow minor mode by typing `M-x hs-minor-mode'. After hideshow is
108;; activated, `hs-minor-mode-hook' is run w/ `run-hooks'. A good hook 109;; activated or deactivated, `hs-minor-mode-hook' is run w/ `run-hooks'.
109;; to add is `hs-hide-initial-comment-block'.
110 110
111;; * Bugs 111;; * Bugs
112;; 112;;
@@ -183,7 +183,7 @@
183 :group 'hideshow) 183 :group 'hideshow)
184 184
185(defcustom hs-minor-mode-hook nil 185(defcustom hs-minor-mode-hook nil
186 "*Hook called when hideshow minor mode is activated." 186 "*Hook called when hideshow minor mode is activated or deactivated."
187 :type 'hook 187 :type 'hook
188 :group 'hideshow) 188 :group 'hideshow)
189 189
@@ -395,7 +395,6 @@ on what kind of block it is suppose to hide."
395 (when flag 395 (when flag
396 (let ((overlay (make-overlay from to))) 396 (let ((overlay (make-overlay from to)))
397 (overlay-put overlay 'invisible 'hs) 397 (overlay-put overlay 'invisible 'hs)
398 (overlay-put overlay 'intangible t)
399 (overlay-put overlay 'hs flag) 398 (overlay-put overlay 'hs flag)
400 (when (or (eq hs-isearch-open t) (eq hs-isearch-open flag)) 399 (when (or (eq hs-isearch-open t) (eq hs-isearch-open flag))
401 (overlay-put overlay 'isearch-open-invisible 'hs-isearch-show) 400 (overlay-put overlay 'isearch-open-invisible 'hs-isearch-show)
@@ -766,6 +765,15 @@ The hook `hs-hide-hook' is run; see `run-hooks'."
766 (hs-safety-is-job-n) 765 (hs-safety-is-job-n)
767 (run-hooks 'hs-hide-hook))) 766 (run-hooks 'hs-hide-hook)))
768 767
768(defun hs-toggle-hiding ()
769 "Toggle hiding/showing of a block.
770See `hs-hide-block' and `hs-show-block'."
771 (interactive)
772 (hs-life-goes-on
773 (if (hs-already-hidden-p)
774 (hs-show-block)
775 (hs-hide-block))))
776
769(defun hs-mouse-toggle-hiding (e) 777(defun hs-mouse-toggle-hiding (e)
770 "Toggle hiding/showing of a block. 778 "Toggle hiding/showing of a block.
771This command should be bound to a mouse key. 779This command should be bound to a mouse key.
@@ -774,9 +782,7 @@ See `hs-hide-block' and `hs-show-block'."
774 (interactive "@e") 782 (interactive "@e")
775 (hs-life-goes-on 783 (hs-life-goes-on
776 (mouse-set-point e) 784 (mouse-set-point e)
777 (if (hs-already-hidden-p) 785 (hs-toggle-hiding)))
778 (hs-show-block)
779 (hs-hide-block))))
780 786
781(defun hs-hide-initial-comment-block () 787(defun hs-hide-initial-comment-block ()
782 "Hide the first block of comments in a file. 788 "Hide the first block of comments in a file.
@@ -800,7 +806,6 @@ With ARG, turn hideshow minor mode on if ARG is positive, off otherwise.
800When hideshow minor mode is on, the menu bar is augmented with hideshow 806When hideshow minor mode is on, the menu bar is augmented with hideshow
801commands and the hideshow commands are enabled. 807commands and the hideshow commands are enabled.
802The value '(hs . t) is added to `buffer-invisibility-spec'. 808The value '(hs . t) is added to `buffer-invisibility-spec'.
803Last, the normal hook `hs-minor-mode-hook' is run; see `run-hooks'.
804 809
805The main commands are: `hs-hide-all', `hs-show-all', `hs-hide-block', 810The main commands are: `hs-hide-all', `hs-show-all', `hs-hide-block',
806`hs-show-block', `hs-hide-level' and `hs-show-region'. There is also 811`hs-show-block', `hs-hide-level' and `hs-show-region'. There is also
@@ -809,6 +814,8 @@ The main commands are: `hs-hide-all', `hs-show-all', `hs-hide-block',
809Turning hideshow minor mode off reverts the menu bar and the 814Turning hideshow minor mode off reverts the menu bar and the
810variables to default values and disables the hideshow commands. 815variables to default values and disables the hideshow commands.
811 816
817Lastly, the normal hook `hs-minor-mode-hook' is run using `run-hooks'.
818
812Key bindings: 819Key bindings:
813\\{hs-minor-mode-map}" 820\\{hs-minor-mode-map}"
814 821
@@ -819,14 +826,14 @@ Key bindings:
819 (> (prefix-numeric-value arg) 0))) 826 (> (prefix-numeric-value arg) 0)))
820 (if hs-minor-mode 827 (if hs-minor-mode
821 (progn 828 (progn
829 (hs-grok-mode-type)
822 (easy-menu-add hs-minor-mode-menu) 830 (easy-menu-add hs-minor-mode-menu)
823 (make-variable-buffer-local 'line-move-ignore-invisible) 831 (make-variable-buffer-local 'line-move-ignore-invisible)
824 (setq line-move-ignore-invisible t) 832 (setq line-move-ignore-invisible t)
825 (add-to-invisibility-spec '(hs . t)) ; hs invisible 833 (add-to-invisibility-spec '(hs . t)))
826 (hs-grok-mode-type)
827 (run-hooks 'hs-minor-mode-hook))
828 (easy-menu-remove hs-minor-mode-menu) 834 (easy-menu-remove hs-minor-mode-menu)
829 (remove-from-invisibility-spec '(hs . t)))) 835 (remove-from-invisibility-spec '(hs . t)))
836 (run-hooks 'hs-minor-mode-hook))
830 837
831;;--------------------------------------------------------------------------- 838;;---------------------------------------------------------------------------
832;; load-time actions 839;; load-time actions