From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19129@debbugs.gnu.org
Subject: bug#19129: 25.0.50; recenter-positions is missing a reference to move-to-window-line-top-bottom
Date: Fri, 21 Nov 2014 11:10:30 +0100 [thread overview]
Message-ID: <87zjbk984p.fsf@vsl28t2g.ww011> (raw)
In-Reply-To: <83zjbl3riz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Nov 2014 10:08:04 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
>> Date: Fri, 21 Nov 2014 00:28:42 +0100
>>
>> please close the bug (or can I do this as well?)
>
> Anyone can, by sending an email message to 19129-done@debbugs.gnu.org.
I see, thanks, I'll do that for #19129.
Please tell me briefly what are you thinking of introducing an extra
defcustom for move-to-window-line-top-bottom?
diff --git a/lisp/window.el b/lisp/window.el
index 91a0e15..8b9c7f5 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7475,6 +7475,27 @@ cycling order is middle -> top -> bottom."
:version "23.2"
:group 'windows)
+(defcustom move-to-window-line-positions '(middle top bottom)
+ "Cycling order for `move-to-window-line-top-bottom'.
+A list of elements with possible values `top', `middle', `bottom',
+integer or float numbers that define the cycling order for
+the command `move-to-window-line-top-bottom'.
+
+Top and bottom destinations are `scroll-margin' lines from the true
+window top and bottom. Middle redraws the frame and centers point
+vertically within the window. Integer number moves current line to
+the specified absolute window-line. Float number between 0.0 and 1.0
+means the percentage of the screen space from the top. The default
+cycling order is middle -> top -> bottom."
+ :type '(repeat (choice
+ (const :tag "Top" top)
+ (const :tag "Middle" middle)
+ (const :tag "Bottom" bottom)
+ (integer :tag "Line number")
+ (float :tag "Percentage")))
+ :version "25.1"
+ :group 'windows)
+
(defun recenter-top-bottom (&optional arg)
"Move current buffer line to the specified window line.
With no prefix argument, successive calls place point according
@@ -7515,16 +7536,16 @@ With a prefix argument ARG, acts like `move-to-window-line'.
With no argument, positions point at center of window.
Successive calls position point at positions defined
-by `recenter-positions'."
+by `move-to-window-line-positions'."
(interactive "P")
(cond
(arg (move-to-window-line arg)) ; Always respect ARG.
(t
(setq recenter-last-op
(if (eq this-command last-command)
- (car (or (cdr (member recenter-last-op recenter-positions))
- recenter-positions))
- (car recenter-positions)))
+ (car (or (cdr (member recenter-last-op move-to-window-line-positions))
+ move-to-window-line-positions))
+ (car move-to-window-line-positions)))
(let ((this-scroll-margin
(min (max 0 scroll-margin)
(truncate (/ (window-body-height) 4.0)))))
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
next prev parent reply other threads:[~2014-11-21 10:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 22:14 bug#19129: 25.0.50; recenter-positions is missing a reference to move-to-window-line-top-bottom H. Dieter Wilhelm
2014-11-20 22:42 ` Drew Adams
2014-11-20 23:28 ` H. Dieter Wilhelm
2014-11-21 8:08 ` Eli Zaretskii
2014-11-21 10:10 ` H. Dieter Wilhelm [this message]
2014-11-21 15:33 ` Eli Zaretskii
2014-11-21 8:04 ` Eli Zaretskii
2014-11-21 8:52 ` H. Dieter Wilhelm
2014-11-21 15:14 ` Drew Adams
2014-11-21 15:30 ` Eli Zaretskii
2014-11-21 17:05 ` H. Dieter Wilhelm
2014-11-21 21:37 ` H. Dieter Wilhelm
[not found] <<87r3wxbju9.fsf@vsl28t2g.ww011>
[not found] ` <<831tox5692.fsf@gnu.org>
[not found] ` <<87wq6p9br6.fsf@vsl28t2g.ww011>
[not found] ` <<06151e7f-aaa2-4c36-886b-9754e980a31f@default>
[not found] ` <<83wq6o370s.fsf@gnu.org>
2014-11-21 15:38 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zjbk984p.fsf@vsl28t2g.ww011 \
--to=dieter@duenenhof-wilhelm.de \
--cc=19129@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.