GNU bug report logs -
#15443
hs-forward-sexp design issue
Previous Next
Full log
View this message in rfc822 format
Am 23.09.2013 13:33, schrieb Andreas Schwab:
> Andreas Röhler <andreas.roehler <at> 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.
This bug report was last modified 9 years and 150 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.