]> git.eshelyaron.com Git - emacs.git/commitdiff
(icon-mode): Adapt to new hideshow and improve regexps.
authorRichard M. Stallman <rms@gnu.org>
Tue, 27 May 1997 14:50:08 +0000 (14:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 27 May 1997 14:50:08 +0000 (14:50 +0000)
(icon-forward-sexp-function): Use beginning-of-icon-defun and
end-of-icon-defun.

lisp/progmodes/icon.el

index 6c981c4e78a97a8f1b653434ecb4ce51b3ed325c..fa13aa2595d8098b9c20f9f2d823e76c846cc793 100644 (file)
@@ -204,7 +204,8 @@ with no args, if that value is non-nil."
   (setq imenu-generic-expression icon-imenu-generic-expression)
   ;; hideshow support
   ;; we start from the assertion that `hs-special-modes-alist' is autoloaded.
-  (pushnew '(icon-mode  "procedure" "end" icon-forward-sexp-function)
+  (pushnew '(icon-mode  "\\<procedure\\>" "\\<end\\>" nil 
+                       icon-forward-sexp-function)
           hs-special-modes-alist :test 'equal)
   (run-hooks 'icon-mode-hook))
 \f
@@ -660,9 +661,10 @@ Returns nil if line starts inside a string, t if in a comment."
 
 ;;;used by hs-minor-mode
 (defun icon-forward-sexp-function (arg)
-  (if (> arg 0)
-      (re-search-forward "^[ \t]*end")
-    (re-search-backward "^[ \t]procedure")))
+  (if (< arg 0)
+      (beginning-of-icon-defun)
+    (end-of-icon-defun)
+    (forward-char -1)))
 
 (provide 'icon-mode)
 ;;; icon.el ends here