GNU bug report logs -
#21195
25.0.50; Let MARKER arg to `set-marker' be a number
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 5 Aug 2015 17:41:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 25.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > Minor enhancement request. Let `set-marker' (aka `move-marker') accept
> > a buffer position that is just a number as its first arg. IOW, give
> > `set-marker' this behavior:
> >
> > (defun new-set-marker (num-or-marker position &optional buffer)
> > "..."
> > (unless (markerp num-or-marker)
> > (setq num-or-marker (with-current-buffer buffer
> > (copy-marker num-or-marker))))
> > (set-marker num-or-marker position buffer))
>
> Hm... Well, I don't really see the point. `set-marker' is so
> conceptually clean. And saying `(set-marker (make-marker) ...)' is so
> easy. Closing.
Well, I said it was minor. Consider funcalling, applying, or
mapping over positions, which can be markers.
Sure, you can use an anonymous function that does just what
you need (test with markerp, copy-marker if not a marker)...
But why shouldn't `set-marker' do this? It's trivial and
costs only a call to `markerp' for doing what `set-marker'
does now.
This bug report was last modified 9 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.