# HG changeset patch # User Richard M. Stallman # Date 864744608 0 # Node ID fa550516120f29bd041ee4322832c60b1000157a # Parent 51505698190056b7e39de7c91daa3b6c735a5ba0 (icon-mode): Adapt to new hideshow and improve regexps. (icon-forward-sexp-function): Use beginning-of-icon-defun and end-of-icon-defun. diff -r 515056981900 -r fa550516120f lisp/progmodes/icon.el --- a/lisp/progmodes/icon.el Tue May 27 05:02:45 1997 +0000 +++ b/lisp/progmodes/icon.el Tue May 27 14:50:08 1997 +0000 @@ -204,7 +204,8 @@ (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 @@ ;;;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