From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Andreas Schwab <schwab@suse.de>
Cc: 15443@debbugs.gnu.org
Subject: bug#15443: hs-forward-sexp design issue
Date: Mon, 23 Sep 2013 15:13:58 +0200 [thread overview]
Message-ID: <52403E96.5030301@easy-emacs.de> (raw)
In-Reply-To: <mvm61tr4vt1.fsf@hawking.suse.de>
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.
next prev parent reply other threads:[~2013-09-23 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 11:10 bug#15443: hs-forward-sexp design issue Andreas Röhler
2013-09-23 11:33 ` Andreas Schwab
2013-09-23 13:13 ` Andreas Röhler [this message]
2013-09-23 13:16 ` Andreas Schwab
2015-12-26 0:59 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52403E96.5030301@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=15443@debbugs.gnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).