aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-27 14:50:08 +0000
committerRichard M. Stallman1997-05-27 14:50:08 +0000
commit5547fcff13fcd0508df11334b17a2d1130883726 (patch)
treed99e72e3f6b254d66f5de4f8eb8b4b076b3a6c38 /lisp
parentffc437583cf2c0094f4ea7ec85cee031804abc2b (diff)
downloademacs-5547fcff13fcd0508df11334b17a2d1130883726.tar.gz
emacs-5547fcff13fcd0508df11334b17a2d1130883726.zip
(icon-mode): Adapt to new hideshow and improve regexps.
(icon-forward-sexp-function): Use beginning-of-icon-defun and end-of-icon-defun.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/icon.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 6c981c4e78a..fa13aa2595d 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -204,7 +204,8 @@ with no args, if that value is non-nil."
204 (setq imenu-generic-expression icon-imenu-generic-expression) 204 (setq imenu-generic-expression icon-imenu-generic-expression)
205 ;; hideshow support 205 ;; hideshow support
206 ;; we start from the assertion that `hs-special-modes-alist' is autoloaded. 206 ;; we start from the assertion that `hs-special-modes-alist' is autoloaded.
207 (pushnew '(icon-mode "procedure" "end" icon-forward-sexp-function) 207 (pushnew '(icon-mode "\\<procedure\\>" "\\<end\\>" nil
208 icon-forward-sexp-function)
208 hs-special-modes-alist :test 'equal) 209 hs-special-modes-alist :test 'equal)
209 (run-hooks 'icon-mode-hook)) 210 (run-hooks 'icon-mode-hook))
210 211
@@ -660,9 +661,10 @@ Returns nil if line starts inside a string, t if in a comment."
660 661
661;;;used by hs-minor-mode 662;;;used by hs-minor-mode
662(defun icon-forward-sexp-function (arg) 663(defun icon-forward-sexp-function (arg)
663 (if (> arg 0) 664 (if (< arg 0)
664 (re-search-forward "^[ \t]*end") 665 (beginning-of-icon-defun)
665 (re-search-backward "^[ \t]procedure"))) 666 (end-of-icon-defun)
667 (forward-char -1)))
666 668
667(provide 'icon-mode) 669(provide 'icon-mode)
668;;; icon.el ends here 670;;; icon.el ends here