GNU bug report logs -
#66394
29.1; Make register-read-with-preview more useful
Previous Next
Reported by: Thierry Volpiatto <thievol <at> posteo.net>
Date: Sat, 7 Oct 2023 19:07:01 UTC
Severity: normal
Found in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Thierry Volpiatto <thievol <at> posteo.net>
>> Cc: monnier <at> iro.umontreal.ca, michael_heerdegen <at> web.de,
>> stefankangas <at> gmail.com, 66394 <at> debbugs.gnu.org
>> Date: Sat, 25 Nov 2023 21:14:31 +0000
>>
>> Here a patch with the change suggested by Stefan applied, slighly
>> modified though because it fails if I put the call to
>> cl--generic-prefill-dispatchers at the recommended place.
>>
>> I recompiled Emacs with this patch with no errors.
>
> Thanks.
>
> Stefan, any further comments, or should I install this as submitted?
Do you want the ability to jump to more than one line at the time before
merging, (e.g. C-u 3 C-n and C-u 3 C-p) or is it ok like this for you?
diff --git a/lisp/register.el b/lisp/register.el
index 61bef503f91..bca967a4efe 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -207,7 +207,7 @@ Do nothing when defining or executing kmacros."
(overlay-start (car ovs))
(point-min)))
(setq pos (point))
- (and ovs (forward-line arg))
+ (forward-line (if ovs arg (1- arg)))
(when (and (funcall fn)
(or (> arg 0) (eql pos (point))))
(goto-char (funcall posfn)))
@@ -218,15 +218,15 @@ Do nothing when defining or executing kmacros."
(delete-minibuffer-contents)
(insert str)))))))
-(defun register-preview-next ()
+(defun register-preview-next (&optional arg)
"Goto next line in register preview buffer."
- (interactive)
- (register-preview-forward-line 1))
+ (interactive "p")
+ (register-preview-forward-line arg))
-(defun register-preview-previous ()
+(defun register-preview-previous (&optional arg)
"Goto previous line in register preview buffer."
- (interactive)
- (register-preview-forward-line -1))
+ (interactive "p")
+ (register-preview-forward-line (- arg)))
(defun register-type (register)
"Return REGISTER type.
--
Thierry
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 1 year and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.