|
From: | Andreas Röhler |
Subject: | bug#15443: hs-forward-sexp design issue |
Date: | Mon, 23 Sep 2013 15:13:58 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 |
Am 23.09.2013 13:33, schrieb Andreas Schwab:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:hs-forward-sexp insists to be called with an argument (funcall hs-forward-sexp-func arg))) That way it's not possible to instrument hs-forward-sexp-func just saying (search-forward "something")This is not a function, so what are you trying to do? Andreas.
Did you look into the code in quesition? hs-hide-block-at-point calls (hs-forward-sexp mdata 1) with an hardcoded second argument "1" And here the code of (defun hs-forward-sexp (match-data arg) "Adjust point based on MATCH-DATA and call `hs-forward-sexp-func' w/ ARG. Original match data is restored upon return." (save-match-data (set-match-data match-data) (goto-char (match-beginning hs-block-start-mdata-select)) (funcall hs-forward-sexp-func arg))) While hs-forward-sexp-func is to be set by mode/user it will always be called with "1" as first argument. Can't see any reason for this.
[Prev in Thread] | Current Thread | [Next in Thread] |