Mercurial > emacs
changeset 17969:fa550516120f
(icon-mode): Adapt to new hideshow and improve regexps.
(icon-forward-sexp-function): Use beginning-of-icon-defun and
end-of-icon-defun.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 27 May 1997 14:50:08 +0000 |
parents | 515056981900 |
children | 720d1f98ae42 |
files | lisp/progmodes/icon.el |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 "\\<procedure\\>" "\\<end\\>" 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