* bug#32743: 27.0.50; down-list RFC
@ 2018-09-16 7:17 Andreas Röhler
2019-07-13 2:18 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Röhler @ 2018-09-16 7:17 UTC (permalink / raw)
To: 32743
Hi all,
‘down-list’ currently returns nil if successful but Scan error:
"Containing expression ends prematurely" if no further list exist downwards.
Suggest to return position reached if successful and nil if no further
list exist.
BTW with current or-clause, second expression will be never be
executed due to error thrown as mentioned:
(goto-char (or (scan-lists (point) inc -1) (buffer-end arg)))
Also reaching buffer-end doesn't make sense IMO in this case, point
should not change then while returning nil.
Thanks,
Andreas
gladly running GNU Emacs 27.0.50 (build 1, i686-pc-linux-gnu, GTK+
Version 3.14.5) of 2018-09-15
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#32743: 27.0.50; down-list RFC
2018-09-16 7:17 bug#32743: 27.0.50; down-list RFC Andreas Röhler
@ 2019-07-13 2:18 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-13 2:18 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 32743
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> ‘down-list’ currently returns nil if successful but Scan error:
> "Containing expression ends prematurely" if no further list exist downwards.
>
> Suggest to return position reached if successful and nil if no further
> list exist.
Hm... I'm not sure that makes sense -- this is down-list:
(let ((inc (if (> arg 0) 1 -1)))
(while (/= arg 0)
(goto-char (or (scan-lists (point) inc -1) (buffer-end arg)))
(setq arg (- arg inc)))))
It very much looks like a command just meant for interactive use, and if
you want to do something programmatically in this area, you should
probably just use scan-lists directly.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-13 2:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-16 7:17 bug#32743: 27.0.50; down-list RFC Andreas Röhler
2019-07-13 2:18 ` Lars Ingebrigtsen
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).