diff options
| author | Karl Heuer | 1998-05-30 14:28:56 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-05-30 14:28:56 +0000 |
| commit | 6d459c4d919e70ae44fab621371040cffc97e047 (patch) | |
| tree | 6343088704e8814898cd7bde6dd131e92a2d251c | |
| parent | 3d729a9a750a3156d4b458409eaaff3e2b6feae2 (diff) | |
| download | emacs-6d459c4d919e70ae44fab621371040cffc97e047.tar.gz emacs-6d459c4d919e70ae44fab621371040cffc97e047.zip | |
(viper-backward-Word, viper-skip-separators): Bug fixes.
(viper-switch-to-buffer, viper-switch-to-buffer-other-window): Bug fixes.
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index cfb98fd8ca2..1ccb84c34bf 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -2549,11 +2549,16 @@ On reaching beginning of line, stop and signal error." | |||
| 2549 | (progn | 2549 | (progn |
| 2550 | (forward-char) | 2550 | (forward-char) |
| 2551 | (viper-skip-all-separators-forward 'within-line)))) | 2551 | (viper-skip-all-separators-forward 'within-line)))) |
| 2552 | ;; check for eob and white space before it. move off of eob | ||
| 2553 | (if (and (eobp) (save-excursion | ||
| 2554 | (viper-backward-char-carefully) | ||
| 2555 | (viper-looking-at-separator))) | ||
| 2556 | (viper-backward-char-carefully)) | ||
| 2552 | (viper-skip-all-separators-backward 'within-line) | 2557 | (viper-skip-all-separators-backward 'within-line) |
| 2553 | (viper-backward-char-carefully) | 2558 | (viper-backward-char-carefully) |
| 2554 | (if (looking-at "\n") | 2559 | (if (looking-at "\n") |
| 2555 | (viper-skip-all-separators-backward 'within-line) | 2560 | (viper-skip-all-separators-backward 'within-line) |
| 2556 | (forward-char)))) | 2561 | (or (bobp) (forward-char))))) |
| 2557 | 2562 | ||
| 2558 | (defun viper-forward-word-kernel (val) | 2563 | (defun viper-forward-word-kernel (val) |
| 2559 | (while (> val 0) | 2564 | (while (> val 0) |
| @@ -3737,24 +3742,20 @@ Null string will repeat previous search." | |||
| 3737 | (defun viper-switch-to-buffer () | 3742 | (defun viper-switch-to-buffer () |
| 3738 | "Switch to buffer in the current window." | 3743 | "Switch to buffer in the current window." |
| 3739 | (interactive) | 3744 | (interactive) |
| 3740 | (let (buffer) | 3745 | (let ((other-buffer (other-buffer (current-buffer))) |
| 3746 | buffer) | ||
| 3741 | (setq buffer | 3747 | (setq buffer |
| 3742 | (read-buffer | 3748 | (read-buffer "Switch to buffer in this window: " other-buffer)) |
| 3743 | (format "Switch to buffer in this window \(%s\): " | 3749 | (switch-to-buffer buffer))) |
| 3744 | (buffer-name (other-buffer (current-buffer)))))) | ||
| 3745 | (switch-to-buffer buffer) | ||
| 3746 | )) | ||
| 3747 | 3750 | ||
| 3748 | (defun viper-switch-to-buffer-other-window () | 3751 | (defun viper-switch-to-buffer-other-window () |
| 3749 | "Switch to buffer in another window." | 3752 | "Switch to buffer in another window." |
| 3750 | (interactive) | 3753 | (interactive) |
| 3751 | (let (buffer) | 3754 | (let ((other-buffer (other-buffer (current-buffer))) |
| 3755 | buffer) | ||
| 3752 | (setq buffer | 3756 | (setq buffer |
| 3753 | (read-buffer | 3757 | (read-buffer "Switch to buffer in another window: " other-buffer)) |
| 3754 | (format "Switch to buffer in another window \(%s\): " | 3758 | (switch-to-buffer-other-window buffer))) |
| 3755 | (buffer-name (other-buffer (current-buffer)))))) | ||
| 3756 | (switch-to-buffer-other-window buffer) | ||
| 3757 | )) | ||
| 3758 | 3759 | ||
| 3759 | (defun viper-kill-buffer () | 3760 | (defun viper-kill-buffer () |
| 3760 | "Kill a buffer." | 3761 | "Kill a buffer." |