1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

* 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.
This commit is contained in:
Michael Kifer 2000-02-28 06:16:44 +00:00
parent 387023ee15
commit 55d7ff38f1
8 changed files with 55 additions and 5 deletions

View file

@ -1,3 +1,17 @@
2000-02-28 Michael Kifer <kifer@cs.sunysb.edu>
* 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.
2000-02-27 Jason Rumney <jasonr@gnu.org>
* faces.el (face-font-family-alternatives): Add arial to helv.

View file

@ -311,6 +311,7 @@ the value of this variable and the variables `ediff-help-message-*' in
ediff-brief-help-message))
(run-hooks 'ediff-display-help-hook))
;;;###autoload
(defun ediff-customize ()
(interactive)
(customize-group "ediff"))

View file

@ -274,8 +274,8 @@ into icons, regardless of the window manager."
))
;; Select the lowest window on the frame.
(defun ediff-select-lowest-window ()
"Select the lowest window on the frame."
(if ediff-xemacs-p
(select-window (frame-lowest-window))
(let* ((lowest-window (selected-window))

View file

@ -1,6 +1,6 @@
;;; ediff.el --- a comprehensive visual interface to diff & patch
;; Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
;; Created: February 2, 1994

View file

@ -890,7 +890,8 @@ as a Meta key and any number of multiple escapes is allowed."
;; ESC-sequences).
(let* ((first-key (elt keyseq 0))
(key-mod (event-modifiers first-key)))
(cond ((viper-ESC-event-p first-key)
(cond ((and (viper-ESC-event-p first-key)
(not viper-translate-all-ESC-keysequences))
;; put keys following ESC on the unread list
;; and return ESC as the key-sequence
(viper-set-unread-command-events (subseq keyseq 1))
@ -1857,6 +1858,8 @@ Undo previous insertion and inserts new."
;; Thie is a temp hook that uses free variables init-message and initial.
;; A dirty feature, but it is the simplest way to have it do the right thing.
;; The init-message and initial vars come from the scope set by
;; viper-read-string-with-history
(defun viper-minibuffer-standard-hook ()
(if (stringp init-message)
(viper-tmp-insert-at-eob init-message))
@ -4284,6 +4287,19 @@ One can use `` and '' to temporarily jump 1 step back."
(let* ((buff (current-buffer))
(reg (1+ (- char ?a)))
(text-marker (get-register reg)))
;; If marker points to file that had markers set (and those markers
;; were saved (as e.g., in session.el), then restore those markers
(if (and (consp text-marker)
(eq (car text-marker) 'file-query)
(or (find-buffer-visiting (nth 1 text-marker))
(y-or-n-p (format "Visit file %s again? "
(nth 1 text-marker)))))
(save-excursion
(find-file (nth 1 text-marker))
(when (and (<= (nth 2 text-marker) (point-max))
(<= (point-min) (nth 2 text-marker)))
(setq text-marker (copy-marker (nth 2 text-marker)))
(set-register reg text-marker))))
(if com (viper-move-marker-locally 'viper-com-point (point)))
(if (not (viper-valid-marker text-marker))
(error viper-EmptyTextmarker char))

View file

@ -505,6 +505,19 @@ on a dumb terminal."
:type 'integer
:group 'viper-misc)
(defcustom viper-translate-all-ESC-keysequences (not (viper-window-display-p))
"Allow translation of all key sequences into commands.
Normally, Viper lets Emacs translate only those ESC key sequences that are
defined in the low-level key-translation-map or function-key-map, such as those
emitted by the arrow and function keys. Other sequences, e.g., \\e/, are
treated as ESQ command followed by a `/'. This is done for people who type fast
and tend to hit other characters right after they hit ESC. Other people like
Emacs to translate ESC sequences all the time.
The default is to translate all sequences only when using a dumb terminal.
This permits you to use ESC as a meta key in insert mode."
:type 'boolean
:group 'viper-misc)
;; Modes and related variables
;; Current mode. One of: `emacs-state', `vi-state', `insert-state'

View file

@ -73,6 +73,7 @@
(fset 'viper-overlay-p (symbol-function 'extentp))
(fset 'viper-overlay-get (symbol-function 'extent-property))
(fset 'viper-move-overlay (symbol-function 'set-extent-endpoints))
(fset 'viper-overlay-live-p (symbol-function 'extent-live-p))
(if (viper-window-display-p)
(fset 'viper-iconify (symbol-function 'iconify-frame)))
(cond ((viper-has-face-support-p)
@ -88,6 +89,7 @@
(fset 'viper-overlay-p (symbol-function 'overlayp))
(fset 'viper-overlay-get (symbol-function 'overlay-get))
(fset 'viper-move-overlay (symbol-function 'move-overlay))
(fset 'viper-overlay-live-p (symbol-function 'overlayp))
(if (viper-window-display-p)
(fset 'viper-iconify (symbol-function 'iconify-or-deiconify-frame)))
(cond ((viper-has-face-support-p)
@ -704,7 +706,7 @@
(viper-move-overlay viper-replace-overlay beg end))
(defun viper-set-replace-overlay (beg end)
(if (viper-overlay-p viper-replace-overlay)
(if (viper-overlay-live-p viper-replace-overlay)
(viper-move-replace-overlay beg end)
(setq viper-replace-overlay (viper-make-overlay beg end (current-buffer)))
;; never detach
@ -729,6 +731,8 @@
(defun viper-set-replace-overlay-glyphs (before-glyph after-glyph)
(or (viper-overlay-live-p viper-replace-overlay)
(viper-set-replace-overlay (point-min) (point-min)))
(if (or (not (viper-has-face-support-p))
viper-use-replace-region-delimiters)
(let ((before-name (if viper-xemacs-p 'begin-glyph 'before-string))

View file

@ -6,7 +6,7 @@
;; Keywords: emulations
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
;; Copyright (C) 1994 -- 1999 Free Software Foundation, Inc.
;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
(defconst viper-version "3.08 of October 31, 1999"
"The current version of Viper")
@ -393,9 +393,11 @@ widget."
asm-mode
prolog-mode
flora-mode
sql-mode
text-mode indented-text-mode
tex-mode latex-mode bibtex-mode
ps-mode
completion-list-mode