diff options
| author | Juri Linkov | 2018-11-16 01:09:54 +0200 |
|---|---|---|
| committer | Juri Linkov | 2018-11-16 01:09:54 +0200 |
| commit | f22a16ae066cc512322f115c2098837d74feeff8 (patch) | |
| tree | 963546bf637693d1903f6f95742f1aa8e2c37e5a | |
| parent | ce915653df74166fe6eb5783d57619b73cd74681 (diff) | |
| download | emacs-f22a16ae066cc512322f115c2098837d74feeff8.tar.gz emacs-f22a16ae066cc512322f115c2098837d74feeff8.zip | |
* 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.
| -rw-r--r-- | etc/NEWS | 1 | ||||
| -rw-r--r-- | lisp/windmove.el | 20 |
2 files changed, 11 insertions, 10 deletions
| @@ -371,6 +371,7 @@ To disable it, set the new defcustom 'diff-font-lock-refine' to nil. | |||
| 371 | *** File headers can be shortened, mimicking Magit's diff format. | 371 | *** File headers can be shortened, mimicking Magit's diff format. |
| 372 | To enable it, set the new defcustom 'diff-font-lock-prettify to t. | 372 | To enable it, set the new defcustom 'diff-font-lock-prettify to t. |
| 373 | 373 | ||
| 374 | +++ | ||
| 374 | *** Prefix arg of 'diff-goto-source' means jump to the old revision | 375 | *** Prefix arg of 'diff-goto-source' means jump to the old revision |
| 375 | of the file under version control if point is on an old changed line, | 376 | of the file under version control if point is on an old changed line, |
| 376 | or to the new revision of the file otherwise. | 377 | or to the new revision of the file otherwise. |
diff --git a/lisp/windmove.el b/lisp/windmove.el index 598e495c7a9..c38524fede6 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -481,8 +481,8 @@ DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'." | |||
| 481 | "Move to the window at direction DIR. | 481 | "Move to the window at direction DIR. |
| 482 | DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'. | 482 | DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'. |
| 483 | If no window is at direction DIR, an error is signaled. | 483 | If no window is at direction DIR, an error is signaled. |
| 484 | If `windmove-create-window' is non-nil, instead of signalling an error | 484 | If `windmove-create-window' is non-nil, try to create a new window |
| 485 | it creates a new window at direction DIR ." | 485 | in direction DIR instead." |
| 486 | (let ((other-window (windmove-find-other-window dir arg window))) | 486 | (let ((other-window (windmove-find-other-window dir arg window))) |
| 487 | (when (and windmove-create-window | 487 | (when (and windmove-create-window |
| 488 | (or (null other-window) | 488 | (or (null other-window) |
| @@ -510,9 +510,9 @@ With no prefix argument, or with prefix argument equal to zero, | |||
| 510 | it is relative to the top edge (for positive ARG) or the bottom edge | 510 | it is relative to the top edge (for positive ARG) or the bottom edge |
| 511 | \(for negative ARG) of the current window. | 511 | \(for negative ARG) of the current window. |
| 512 | If no window is at the desired location, an error is signaled | 512 | If no window is at the desired location, an error is signaled |
| 513 | unless `windmove-create-window' is non-nil that creates a new window." | 513 | unless `windmove-create-window' is non-nil and a new window is created." |
| 514 | (interactive "P") | 514 | (interactive "P") |
| 515 | (windmove-do-window-select 'left arg)) | 515 | (windmove-do-window-select 'left (and arg (prefix-numeric-value arg)))) |
| 516 | 516 | ||
| 517 | ;;;###autoload | 517 | ;;;###autoload |
| 518 | (defun windmove-up (&optional arg) | 518 | (defun windmove-up (&optional arg) |
| @@ -522,9 +522,9 @@ is relative to the position of point in the window; otherwise it is | |||
| 522 | relative to the left edge (for positive ARG) or the right edge (for | 522 | relative to the left edge (for positive ARG) or the right edge (for |
| 523 | negative ARG) of the current window. | 523 | negative ARG) of the current window. |
| 524 | If no window is at the desired location, an error is signaled | 524 | If no window is at the desired location, an error is signaled |
| 525 | unless `windmove-create-window' is non-nil that creates a new window." | 525 | unless `windmove-create-window' is non-nil and a new window is created." |
| 526 | (interactive "P") | 526 | (interactive "P") |
| 527 | (windmove-do-window-select 'up arg)) | 527 | (windmove-do-window-select 'up (and arg (prefix-numeric-value arg)))) |
| 528 | 528 | ||
| 529 | ;;;###autoload | 529 | ;;;###autoload |
| 530 | (defun windmove-right (&optional arg) | 530 | (defun windmove-right (&optional arg) |
| @@ -534,9 +534,9 @@ With no prefix argument, or with prefix argument equal to zero, | |||
| 534 | otherwise it is relative to the top edge (for positive ARG) or the | 534 | otherwise it is relative to the top edge (for positive ARG) or the |
| 535 | bottom edge (for negative ARG) of the current window. | 535 | bottom edge (for negative ARG) of the current window. |
| 536 | If no window is at the desired location, an error is signaled | 536 | If no window is at the desired location, an error is signaled |
| 537 | unless `windmove-create-window' is non-nil that creates a new window." | 537 | unless `windmove-create-window' is non-nil and a new window is created." |
| 538 | (interactive "P") | 538 | (interactive "P") |
| 539 | (windmove-do-window-select 'right arg)) | 539 | (windmove-do-window-select 'right (and arg (prefix-numeric-value arg)))) |
| 540 | 540 | ||
| 541 | ;;;###autoload | 541 | ;;;###autoload |
| 542 | (defun windmove-down (&optional arg) | 542 | (defun windmove-down (&optional arg) |
| @@ -546,9 +546,9 @@ With no prefix argument, or with prefix argument equal to zero, | |||
| 546 | it is relative to the left edge (for positive ARG) or the right edge | 546 | it is relative to the left edge (for positive ARG) or the right edge |
| 547 | \(for negative ARG) of the current window. | 547 | \(for negative ARG) of the current window. |
| 548 | If no window is at the desired location, an error is signaled | 548 | If no window is at the desired location, an error is signaled |
| 549 | unless `windmove-create-window' is non-nil that creates a new window." | 549 | unless `windmove-create-window' is non-nil and a new window is created." |
| 550 | (interactive "P") | 550 | (interactive "P") |
| 551 | (windmove-do-window-select 'down arg)) | 551 | (windmove-do-window-select 'down (and arg (prefix-numeric-value arg)))) |
| 552 | 552 | ||
| 553 | 553 | ||
| 554 | ;;; set up keybindings | 554 | ;;; set up keybindings |