diff options
| author | Michael Kifer | 2000-02-28 06:16:44 +0000 |
|---|---|---|
| committer | Michael Kifer | 2000-02-28 06:16:44 +0000 |
| commit | 55d7ff38f14396444ef366bfe74eee6dadcf9853 (patch) | |
| tree | a8137d4485668b1f6b3bab36682127a990b681a5 /lisp/emulation | |
| parent | 387023ee15566c21fd04a9137a0d6c1fd2410269 (diff) | |
| download | emacs-55d7ff38f14396444ef366bfe74eee6dadcf9853.tar.gz emacs-55d7ff38f14396444ef366bfe74eee6dadcf9853.zip | |
* viper-cmd.el (viper-envelop-ESC-key): added the option to
translate all ESC key sequences.
(viper-goto-mark-subr): restore markers for files for which
they were saved.
* viper-init.el (viper-translate-all-ESC-keysequences): new variable.
* viper-util.el (viper-set-replace-overlay-glyphs,
viper-set-replace-overlay): always check if the replacement
overlay is live.
* viper.el (viper-vi-state-mode-list): added major modes.
* ediff-wind.el: minor comment changes.
* ediff.el: copyright notice date fix.
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 18 | ||||
| -rw-r--r-- | lisp/emulation/viper-init.el | 13 | ||||
| -rw-r--r-- | lisp/emulation/viper-util.el | 6 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 4 |
4 files changed, 38 insertions, 3 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index a2b94552204..91be4cf7765 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -890,7 +890,8 @@ as a Meta key and any number of multiple escapes is allowed." | |||
| 890 | ;; ESC-sequences). | 890 | ;; ESC-sequences). |
| 891 | (let* ((first-key (elt keyseq 0)) | 891 | (let* ((first-key (elt keyseq 0)) |
| 892 | (key-mod (event-modifiers first-key))) | 892 | (key-mod (event-modifiers first-key))) |
| 893 | (cond ((viper-ESC-event-p first-key) | 893 | (cond ((and (viper-ESC-event-p first-key) |
| 894 | (not viper-translate-all-ESC-keysequences)) | ||
| 894 | ;; put keys following ESC on the unread list | 895 | ;; put keys following ESC on the unread list |
| 895 | ;; and return ESC as the key-sequence | 896 | ;; and return ESC as the key-sequence |
| 896 | (viper-set-unread-command-events (subseq keyseq 1)) | 897 | (viper-set-unread-command-events (subseq keyseq 1)) |
| @@ -1857,6 +1858,8 @@ Undo previous insertion and inserts new." | |||
| 1857 | 1858 | ||
| 1858 | ;; Thie is a temp hook that uses free variables init-message and initial. | 1859 | ;; Thie is a temp hook that uses free variables init-message and initial. |
| 1859 | ;; A dirty feature, but it is the simplest way to have it do the right thing. | 1860 | ;; A dirty feature, but it is the simplest way to have it do the right thing. |
| 1861 | ;; The init-message and initial vars come from the scope set by | ||
| 1862 | ;; viper-read-string-with-history | ||
| 1860 | (defun viper-minibuffer-standard-hook () | 1863 | (defun viper-minibuffer-standard-hook () |
| 1861 | (if (stringp init-message) | 1864 | (if (stringp init-message) |
| 1862 | (viper-tmp-insert-at-eob init-message)) | 1865 | (viper-tmp-insert-at-eob init-message)) |
| @@ -4284,6 +4287,19 @@ One can use `` and '' to temporarily jump 1 step back." | |||
| 4284 | (let* ((buff (current-buffer)) | 4287 | (let* ((buff (current-buffer)) |
| 4285 | (reg (1+ (- char ?a))) | 4288 | (reg (1+ (- char ?a))) |
| 4286 | (text-marker (get-register reg))) | 4289 | (text-marker (get-register reg))) |
| 4290 | ;; If marker points to file that had markers set (and those markers | ||
| 4291 | ;; were saved (as e.g., in session.el), then restore those markers | ||
| 4292 | (if (and (consp text-marker) | ||
| 4293 | (eq (car text-marker) 'file-query) | ||
| 4294 | (or (find-buffer-visiting (nth 1 text-marker)) | ||
| 4295 | (y-or-n-p (format "Visit file %s again? " | ||
| 4296 | (nth 1 text-marker))))) | ||
| 4297 | (save-excursion | ||
| 4298 | (find-file (nth 1 text-marker)) | ||
| 4299 | (when (and (<= (nth 2 text-marker) (point-max)) | ||
| 4300 | (<= (point-min) (nth 2 text-marker))) | ||
| 4301 | (setq text-marker (copy-marker (nth 2 text-marker))) | ||
| 4302 | (set-register reg text-marker)))) | ||
| 4287 | (if com (viper-move-marker-locally 'viper-com-point (point))) | 4303 | (if com (viper-move-marker-locally 'viper-com-point (point))) |
| 4288 | (if (not (viper-valid-marker text-marker)) | 4304 | (if (not (viper-valid-marker text-marker)) |
| 4289 | (error viper-EmptyTextmarker char)) | 4305 | (error viper-EmptyTextmarker char)) |
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index acc95b1ef05..bd479456ee4 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -505,6 +505,19 @@ on a dumb terminal." | |||
| 505 | :type 'integer | 505 | :type 'integer |
| 506 | :group 'viper-misc) | 506 | :group 'viper-misc) |
| 507 | 507 | ||
| 508 | (defcustom viper-translate-all-ESC-keysequences (not (viper-window-display-p)) | ||
| 509 | "Allow translation of all key sequences into commands. | ||
| 510 | Normally, Viper lets Emacs translate only those ESC key sequences that are | ||
| 511 | defined in the low-level key-translation-map or function-key-map, such as those | ||
| 512 | emitted by the arrow and function keys. Other sequences, e.g., \\e/, are | ||
| 513 | treated as ESQ command followed by a `/'. This is done for people who type fast | ||
| 514 | and tend to hit other characters right after they hit ESC. Other people like | ||
| 515 | Emacs to translate ESC sequences all the time. | ||
| 516 | The default is to translate all sequences only when using a dumb terminal. | ||
| 517 | This permits you to use ESC as a meta key in insert mode." | ||
| 518 | :type 'boolean | ||
| 519 | :group 'viper-misc) | ||
| 520 | |||
| 508 | ;; Modes and related variables | 521 | ;; Modes and related variables |
| 509 | 522 | ||
| 510 | ;; Current mode. One of: `emacs-state', `vi-state', `insert-state' | 523 | ;; Current mode. One of: `emacs-state', `vi-state', `insert-state' |
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index b8fdf3365ba..b384710e1e3 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -73,6 +73,7 @@ | |||
| 73 | (fset 'viper-overlay-p (symbol-function 'extentp)) | 73 | (fset 'viper-overlay-p (symbol-function 'extentp)) |
| 74 | (fset 'viper-overlay-get (symbol-function 'extent-property)) | 74 | (fset 'viper-overlay-get (symbol-function 'extent-property)) |
| 75 | (fset 'viper-move-overlay (symbol-function 'set-extent-endpoints)) | 75 | (fset 'viper-move-overlay (symbol-function 'set-extent-endpoints)) |
| 76 | (fset 'viper-overlay-live-p (symbol-function 'extent-live-p)) | ||
| 76 | (if (viper-window-display-p) | 77 | (if (viper-window-display-p) |
| 77 | (fset 'viper-iconify (symbol-function 'iconify-frame))) | 78 | (fset 'viper-iconify (symbol-function 'iconify-frame))) |
| 78 | (cond ((viper-has-face-support-p) | 79 | (cond ((viper-has-face-support-p) |
| @@ -88,6 +89,7 @@ | |||
| 88 | (fset 'viper-overlay-p (symbol-function 'overlayp)) | 89 | (fset 'viper-overlay-p (symbol-function 'overlayp)) |
| 89 | (fset 'viper-overlay-get (symbol-function 'overlay-get)) | 90 | (fset 'viper-overlay-get (symbol-function 'overlay-get)) |
| 90 | (fset 'viper-move-overlay (symbol-function 'move-overlay)) | 91 | (fset 'viper-move-overlay (symbol-function 'move-overlay)) |
| 92 | (fset 'viper-overlay-live-p (symbol-function 'overlayp)) | ||
| 91 | (if (viper-window-display-p) | 93 | (if (viper-window-display-p) |
| 92 | (fset 'viper-iconify (symbol-function 'iconify-or-deiconify-frame))) | 94 | (fset 'viper-iconify (symbol-function 'iconify-or-deiconify-frame))) |
| 93 | (cond ((viper-has-face-support-p) | 95 | (cond ((viper-has-face-support-p) |
| @@ -704,7 +706,7 @@ | |||
| 704 | (viper-move-overlay viper-replace-overlay beg end)) | 706 | (viper-move-overlay viper-replace-overlay beg end)) |
| 705 | 707 | ||
| 706 | (defun viper-set-replace-overlay (beg end) | 708 | (defun viper-set-replace-overlay (beg end) |
| 707 | (if (viper-overlay-p viper-replace-overlay) | 709 | (if (viper-overlay-live-p viper-replace-overlay) |
| 708 | (viper-move-replace-overlay beg end) | 710 | (viper-move-replace-overlay beg end) |
| 709 | (setq viper-replace-overlay (viper-make-overlay beg end (current-buffer))) | 711 | (setq viper-replace-overlay (viper-make-overlay beg end (current-buffer))) |
| 710 | ;; never detach | 712 | ;; never detach |
| @@ -729,6 +731,8 @@ | |||
| 729 | 731 | ||
| 730 | 732 | ||
| 731 | (defun viper-set-replace-overlay-glyphs (before-glyph after-glyph) | 733 | (defun viper-set-replace-overlay-glyphs (before-glyph after-glyph) |
| 734 | (or (viper-overlay-live-p viper-replace-overlay) | ||
| 735 | (viper-set-replace-overlay (point-min) (point-min))) | ||
| 732 | (if (or (not (viper-has-face-support-p)) | 736 | (if (or (not (viper-has-face-support-p)) |
| 733 | viper-use-replace-region-delimiters) | 737 | viper-use-replace-region-delimiters) |
| 734 | (let ((before-name (if viper-xemacs-p 'begin-glyph 'before-string)) | 738 | (let ((before-name (if viper-xemacs-p 'begin-glyph 'before-string)) |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 4e95448ab2b..f5094a1b8da 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Keywords: emulations | 6 | ;; Keywords: emulations |
| 7 | ;; Author: Michael Kifer <kifer@cs.sunysb.edu> | 7 | ;; Author: Michael Kifer <kifer@cs.sunysb.edu> |
| 8 | 8 | ||
| 9 | ;; Copyright (C) 1994 -- 1999 Free Software Foundation, Inc. | 9 | ;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. |
| 10 | 10 | ||
| 11 | (defconst viper-version "3.08 of October 31, 1999" | 11 | (defconst viper-version "3.08 of October 31, 1999" |
| 12 | "The current version of Viper") | 12 | "The current version of Viper") |
| @@ -393,9 +393,11 @@ widget." | |||
| 393 | asm-mode | 393 | asm-mode |
| 394 | prolog-mode | 394 | prolog-mode |
| 395 | flora-mode | 395 | flora-mode |
| 396 | sql-mode | ||
| 396 | 397 | ||
| 397 | text-mode indented-text-mode | 398 | text-mode indented-text-mode |
| 398 | tex-mode latex-mode bibtex-mode | 399 | tex-mode latex-mode bibtex-mode |
| 400 | ps-mode | ||
| 399 | 401 | ||
| 400 | completion-list-mode | 402 | completion-list-mode |
| 401 | 403 | ||