From: Richard M. Stallman Date: Tue, 27 May 1997 14:50:08 +0000 (+0000) Subject: (icon-mode): Adapt to new hideshow and improve regexps. X-Git-Tag: emacs-20.1~1977 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5547fcff13fcd0508df11334b17a2d1130883726;p=emacs.git (icon-mode): Adapt to new hideshow and improve regexps. (icon-forward-sexp-function): Use beginning-of-icon-defun and end-of-icon-defun. --- 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