From 5547fcff13fcd0508df11334b17a2d1130883726 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 27 May 1997 14:50:08 +0000 Subject: [PATCH] (icon-mode): Adapt to new hideshow and improve regexps. (icon-forward-sexp-function): Use beginning-of-icon-defun and end-of-icon-defun. --- lisp/progmodes/icon.el | 10 ++++++---- 1 file 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." (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 "\\" "\\" nil + icon-forward-sexp-function) hs-special-modes-alist :test 'equal) (run-hooks 'icon-mode-hook)) @@ -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 -- 2.39.5