Commit f22a16ae authored by Juri Linkov's avatar Juri Linkov

* lisp/windmove.el: Support more prefix args (bug#32790)

* lisp/windmove.el (windmove-left, windmove-up, windmove-right)
(windmove-down): Use prefix-numeric-value to support more prefix args
like 'C-u' and 'M--'.  Doc fix.
parent ce915653
Pipeline #74 canceled with stage
......@@ -371,6 +371,7 @@ To disable it, set the new defcustom 'diff-font-lock-refine' to nil.
*** File headers can be shortened, mimicking Magit's diff format.
To enable it, set the new defcustom 'diff-font-lock-prettify to t.
+++
*** Prefix arg of 'diff-goto-source' means jump to the old revision
of the file under version control if point is on an old changed line,
or to the new revision of the file otherwise.
......
......@@ -481,8 +481,8 @@ DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'."
"Move to the window at direction DIR.
DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'.
If no window is at direction DIR, an error is signaled.
If `windmove-create-window' is non-nil, instead of signalling an error
it creates a new window at direction DIR ."
If `windmove-create-window' is non-nil, try to create a new window
in direction DIR instead."
(let ((other-window (windmove-find-other-window dir arg window)))
(when (and windmove-create-window
(or (null other-window)
......@@ -510,9 +510,9 @@ With no prefix argument, or with prefix argument equal to zero,
it is relative to the top edge (for positive ARG) or the bottom edge
\(for negative ARG) of the current window.
If no window is at the desired location, an error is signaled
unless `windmove-create-window' is non-nil that creates a new window."
unless `windmove-create-window' is non-nil and a new window is created."
(interactive "P")
(windmove-do-window-select 'left arg))
(windmove-do-window-select 'left (and arg (prefix-numeric-value arg))))
;;;###autoload
(defun windmove-up (&optional arg)
......@@ -522,9 +522,9 @@ is relative to the position of point in the window; otherwise it is
relative to the left edge (for positive ARG) or the right edge (for
negative ARG) of the current window.
If no window is at the desired location, an error is signaled
unless `windmove-create-window' is non-nil that creates a new window."
unless `windmove-create-window' is non-nil and a new window is created."
(interactive "P")
(windmove-do-window-select 'up arg))
(windmove-do-window-select 'up (and arg (prefix-numeric-value arg))))
;;;###autoload
(defun windmove-right (&optional arg)
......@@ -534,9 +534,9 @@ With no prefix argument, or with prefix argument equal to zero,
otherwise it is relative to the top edge (for positive ARG) or the
bottom edge (for negative ARG) of the current window.
If no window is at the desired location, an error is signaled
unless `windmove-create-window' is non-nil that creates a new window."
unless `windmove-create-window' is non-nil and a new window is created."
(interactive "P")
(windmove-do-window-select 'right arg))
(windmove-do-window-select 'right (and arg (prefix-numeric-value arg))))
;;;###autoload
(defun windmove-down (&optional arg)
......@@ -546,9 +546,9 @@ With no prefix argument, or with prefix argument equal to zero,
it is relative to the left edge (for positive ARG) or the right edge
\(for negative ARG) of the current window.
If no window is at the desired location, an error is signaled
unless `windmove-create-window' is non-nil that creates a new window."
unless `windmove-create-window' is non-nil and a new window is created."
(interactive "P")
(windmove-do-window-select 'down arg))
(windmove-do-window-select 'down (and arg (prefix-numeric-value arg))))
;;; set up keybindings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment