diff options
author | Karl Heuer <kwzh@gnu.org> | 1998-05-30 14:28:56 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1998-05-30 14:28:56 +0000 |
commit | 76a2167a69bb3130af9b416a94943aa20ad38f1e (patch) | |
tree | c4f2392cfee13f7491d7e4a3201fca231c2b356d /lisp/emulation | |
parent | 3133cca3cc746bdc4c7d215389d710a7009cfa4b (diff) | |
download | emacs-76a2167a69bb3130af9b416a94943aa20ad38f1e.tar.gz |
(viper-backward-Word, viper-skip-separators): Bug fixes.
(viper-switch-to-buffer, viper-switch-to-buffer-other-window): Bug fixes.
Diffstat (limited to 'lisp/emulation')
-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." (progn (forward-char) (viper-skip-all-separators-forward 'within-line)))) + ;; check for eob and white space before it. move off of eob + (if (and (eobp) (save-excursion + (viper-backward-char-carefully) + (viper-looking-at-separator))) + (viper-backward-char-carefully)) (viper-skip-all-separators-backward 'within-line) (viper-backward-char-carefully) (if (looking-at "\n") (viper-skip-all-separators-backward 'within-line) - (forward-char)))) + (or (bobp) (forward-char))))) (defun viper-forward-word-kernel (val) (while (> val 0) @@ -3737,24 +3742,20 @@ Null string will repeat previous search." (defun viper-switch-to-buffer () "Switch to buffer in the current window." (interactive) - (let (buffer) + (let ((other-buffer (other-buffer (current-buffer))) + buffer) (setq buffer - (read-buffer - (format "Switch to buffer in this window \(%s\): " - (buffer-name (other-buffer (current-buffer)))))) - (switch-to-buffer buffer) - )) + (read-buffer "Switch to buffer in this window: " other-buffer)) + (switch-to-buffer buffer))) (defun viper-switch-to-buffer-other-window () "Switch to buffer in another window." (interactive) - (let (buffer) + (let ((other-buffer (other-buffer (current-buffer))) + buffer) (setq buffer - (read-buffer - (format "Switch to buffer in another window \(%s\): " - (buffer-name (other-buffer (current-buffer)))))) - (switch-to-buffer-other-window buffer) - )) + (read-buffer "Switch to buffer in another window: " other-buffer)) + (switch-to-buffer-other-window buffer))) (defun viper-kill-buffer () "Kill a buffer." |