Mercurial > emacs
comparison lisp/progmodes/hideshow.el @ 81554:ed157fbce08b
Untabify; nfc.
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Fri, 22 Jun 2007 08:03:38 +0000 |
parents | 638ed5cc0e55 |
children | a0461babeddf |
comparison
equal
deleted
inserted
replaced
81553:a8101d5b9dd9 | 81554:ed157fbce08b |
---|---|
703 (save-excursion | 703 (save-excursion |
704 (let ((c-reg (hs-inside-comment-p))) | 704 (let ((c-reg (hs-inside-comment-p))) |
705 (if (and c-reg (nth 0 c-reg)) | 705 (if (and c-reg (nth 0 c-reg)) |
706 ;; point is inside a comment, and that comment is hidable | 706 ;; point is inside a comment, and that comment is hidable |
707 (goto-char (nth 0 c-reg)) | 707 (goto-char (nth 0 c-reg)) |
708 (end-of-line) | 708 (end-of-line) |
709 (when (and (not c-reg) | 709 (when (and (not c-reg) |
710 (hs-find-block-beginning) | 710 (hs-find-block-beginning) |
711 (looking-at hs-block-start-regexp)) | 711 (looking-at hs-block-start-regexp)) |
712 ;; point is inside a block | 712 ;; point is inside a block |
713 (goto-char (match-end 0))))) | 713 (goto-char (match-end 0))))) |
904 (> (prefix-numeric-value arg) 0))) | 904 (> (prefix-numeric-value arg) 0))) |
905 (if hs-minor-mode | 905 (if hs-minor-mode |
906 (progn | 906 (progn |
907 (hs-grok-mode-type) | 907 (hs-grok-mode-type) |
908 ;; Turn off this mode if we change major modes. | 908 ;; Turn off this mode if we change major modes. |
909 (add-hook 'change-major-mode-hook | 909 (add-hook 'change-major-mode-hook |
910 'turn-off-hideshow | 910 'turn-off-hideshow |
911 nil t) | 911 nil t) |
912 (easy-menu-add hs-minor-mode-menu) | 912 (easy-menu-add hs-minor-mode-menu) |
913 (set (make-local-variable 'line-move-ignore-invisible) t) | 913 (set (make-local-variable 'line-move-ignore-invisible) t) |
914 (add-to-invisibility-spec '(hs . t))) | 914 (add-to-invisibility-spec '(hs . t))) |
915 (easy-menu-remove hs-minor-mode-menu) | 915 (easy-menu-remove hs-minor-mode-menu) |
916 (remove-from-invisibility-spec '(hs . t)) | 916 (remove-from-invisibility-spec '(hs . t)) |