bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21195: 25.0.50; Let MARKER arg to `set-marker' be a number


From: Lars Ingebrigtsen
Subject: bug#21195: 25.0.50; Let MARKER arg to `set-marker' be a number
Date: Sat, 30 Apr 2016 23:42:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Drew Adams <address@hidden> writes:

> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]