diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/ido.el | 28 |
2 files changed, 21 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3e20def85e3..60573c74d06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-02-04 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * ido.el (ido-magic-forward-char, ido-magic-backward-char) | ||
| 4 | (ido-magic-delete-char): Use prefix arg. | ||
| 5 | |||
| 1 | 2008-02-03 Juanma Barranquero <lekktu@gmail.com> | 6 | 2008-02-03 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * term/w32-win.el (image-library-alist): Prefer libpng12 to libpng13, | 8 | * term/w32-win.el (image-library-alist): Prefer libpng12 to libpng13, |
diff --git a/lisp/ido.el b/lisp/ido.el index 750eb6e6dfc..314f495a7b1 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -2537,17 +2537,18 @@ If no merge has yet taken place, toggle automatic merging option." | |||
| 2537 | 2537 | ||
| 2538 | ;;; Magic C-f | 2538 | ;;; Magic C-f |
| 2539 | 2539 | ||
| 2540 | (defun ido-magic-forward-char () | 2540 | (defun ido-magic-forward-char (arg) |
| 2541 | "Move forward in user input or perform magic action. | 2541 | "Move forward in user input or perform magic action. |
| 2542 | If no user input is present, or at end of input, perform magic actions: | 2542 | If no user input is present, or at end of input, perform magic actions: |
| 2543 | C-x C-b ... C-f switch to ido-find-file. | 2543 | C-x C-b ... C-f switch to ido-find-file. |
| 2544 | C-x C-f ... C-f fallback to non-ido find-file. | 2544 | C-x C-f ... C-f fallback to non-ido find-file. |
| 2545 | C-x C-d ... C-f fallback to non-ido brief dired. | 2545 | C-x C-d ... C-f fallback to non-ido brief dired. |
| 2546 | C-x d ... C-f fallback to non-ido dired." | 2546 | C-x d ... C-f fallback to non-ido dired." |
| 2547 | (interactive) | 2547 | (interactive "P") |
| 2548 | (cond | 2548 | (cond |
| 2549 | ((not (eobp)) | 2549 | ((or arg (not (eobp))) |
| 2550 | (forward-char 1)) | 2550 | (forward-char (min (prefix-numeric-value arg) |
| 2551 | (- (point-max) (point))))) | ||
| 2551 | ((memq ido-cur-item '(file dir)) | 2552 | ((memq ido-cur-item '(file dir)) |
| 2552 | (ido-fallback-command)) | 2553 | (ido-fallback-command)) |
| 2553 | (ido-context-switch-command | 2554 | (ido-context-switch-command |
| @@ -2557,17 +2558,19 @@ C-x d ... C-f fallback to non-ido dired." | |||
| 2557 | 2558 | ||
| 2558 | ;;; Magic C-b | 2559 | ;;; Magic C-b |
| 2559 | 2560 | ||
| 2560 | (defun ido-magic-backward-char () | 2561 | (defun ido-magic-backward-char (arg) |
| 2561 | "Move backward in user input or perform magic action. | 2562 | "Move backward in user input or perform magic action. |
| 2562 | If no user input is present, or at start of input, perform magic actions: | 2563 | If no user input is present, or at start of input, perform magic actions: |
| 2563 | C-x C-f C-b switch to `ido-switch-buffer'. | 2564 | C-x C-f C-b switch to `ido-switch-buffer'. |
| 2564 | C-x C-d C-b switch to `ido-switch-buffer'. | 2565 | C-x C-d C-b switch to `ido-switch-buffer'. |
| 2565 | C-x d C-b switch to `ido-switch-buffer'. | 2566 | C-x d C-b switch to `ido-switch-buffer'. |
| 2566 | C-x C-b C-b fallback to non-ido `switch-to-buffer'." | 2567 | C-x C-b C-b fallback to non-ido `switch-to-buffer'." |
| 2567 | (interactive) | 2568 | (interactive "P") |
| 2568 | (cond | 2569 | (cond |
| 2569 | ((> (point) (minibuffer-prompt-end)) | 2570 | ((or arg (> (point) (minibuffer-prompt-end))) |
| 2570 | (forward-char -1)) | 2571 | (forward-char |
| 2572 | (- (min (prefix-numeric-value arg) | ||
| 2573 | (- (point) (minibuffer-prompt-end)))))) | ||
| 2571 | ((eq last-command this-command) | 2574 | ((eq last-command this-command) |
| 2572 | (when (and (memq ido-cur-item '(file dir)) | 2575 | (when (and (memq ido-cur-item '(file dir)) |
| 2573 | (not (bobp))) | 2576 | (not (bobp))) |
| @@ -2581,14 +2584,15 @@ C-x C-b C-b fallback to non-ido `switch-to-buffer'." | |||
| 2581 | 2584 | ||
| 2582 | ;;; Magic C-d | 2585 | ;;; Magic C-d |
| 2583 | 2586 | ||
| 2584 | (defun ido-magic-delete-char () | 2587 | (defun ido-magic-delete-char (arg) |
| 2585 | "Delete following char in user input or perform magic action. | 2588 | "Delete following char in user input or perform magic action. |
| 2586 | If at end of user input, perform magic actions: | 2589 | If at end of user input, perform magic actions: |
| 2587 | C-x C-f ... C-d enter dired on current directory." | 2590 | C-x C-f ... C-d enter dired on current directory." |
| 2588 | (interactive) | 2591 | (interactive "P") |
| 2589 | (cond | 2592 | (cond |
| 2590 | ((not (eobp)) | 2593 | ((or arg (not (eobp))) |
| 2591 | (delete-char 1)) | 2594 | (delete-char (min (prefix-numeric-value arg) |
| 2595 | (- (point-max) (point))))) | ||
| 2592 | (ido-context-switch-command | 2596 | (ido-context-switch-command |
| 2593 | nil) | 2597 | nil) |
| 2594 | ((memq ido-cur-item '(file dir)) | 2598 | ((memq ido-cur-item '(file dir)) |