mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-18 11:50:38 -08:00
* viper*el: replaced old-style backquotes.
* ediff*el: replaced old-style backquotes. * ediff-merge (ediff-looks-like-combined-merge,ediff-get-combined-region): changed to support the new format for ediff-combination-pattern. * ediff-diff (ediff-set-fine-overlays-in-one-buffer): changed to support the new format for ediff-combination-pattern.
This commit is contained in:
parent
22d92d6b53
commit
7d3f9fd8e8
2 changed files with 110 additions and 88 deletions
|
|
@ -1,3 +1,16 @@
|
||||||
|
1999-11-24 Michael Kifer <kifer@cs.sunysb.edu>
|
||||||
|
|
||||||
|
* viper*el: replaced old-style backquotes.
|
||||||
|
|
||||||
|
* ediff*el: replaced old-style backquotes.
|
||||||
|
|
||||||
|
* ediff-merge
|
||||||
|
(ediff-looks-like-combined-merge,ediff-get-combined-region):
|
||||||
|
changed to support the new format for ediff-combination-pattern.
|
||||||
|
|
||||||
|
* ediff-diff (ediff-set-fine-overlays-in-one-buffer):
|
||||||
|
changed to support the new format for ediff-combination-pattern.
|
||||||
|
|
||||||
1999-11-24 Dave Love <fx@gnu.org>
|
1999-11-24 Dave Love <fx@gnu.org>
|
||||||
|
|
||||||
* custom.el (custom-declare-group): Purecopy DOC.
|
* custom.el (custom-declare-group): Purecopy DOC.
|
||||||
|
|
|
||||||
|
|
@ -404,8 +404,7 @@
|
||||||
(defun viper-normalize-minor-mode-map-alist ()
|
(defun viper-normalize-minor-mode-map-alist ()
|
||||||
(setq minor-mode-map-alist
|
(setq minor-mode-map-alist
|
||||||
(viper-append-filter-alist
|
(viper-append-filter-alist
|
||||||
(list
|
(list (cons 'viper-vi-intercept-minor-mode viper-vi-intercept-map)
|
||||||
(cons 'viper-vi-intercept-minor-mode viper-vi-intercept-map)
|
|
||||||
(cons 'viper-vi-minibuffer-minor-mode viper-minibuffer-map)
|
(cons 'viper-vi-minibuffer-minor-mode viper-minibuffer-map)
|
||||||
(cons 'viper-vi-local-user-minor-mode viper-vi-local-user-map)
|
(cons 'viper-vi-local-user-minor-mode viper-vi-local-user-map)
|
||||||
(cons 'viper-vi-kbd-minor-mode viper-vi-kbd-map)
|
(cons 'viper-vi-kbd-minor-mode viper-vi-kbd-map)
|
||||||
|
|
@ -457,8 +456,6 @@
|
||||||
minor-mode-map-alist)))
|
minor-mode-map-alist)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Viper mode-changing commands and utilities
|
;; Viper mode-changing commands and utilities
|
||||||
|
|
||||||
|
|
@ -1021,8 +1018,8 @@ as a Meta key and any number of multiple escapes is allowed."
|
||||||
`(key-binding (char-to-string ,event-char))))
|
`(key-binding (char-to-string ,event-char))))
|
||||||
(funcall func prefix-arg)
|
(funcall func prefix-arg)
|
||||||
(setq prefix-arg nil))
|
(setq prefix-arg nil))
|
||||||
;; some other command -- let emacs do it in its own way
|
;; some other command -- let emacs do it in its own way
|
||||||
(viper-set-unread-command-events event-char))
|
(viper-set-unread-command-events event-char))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1044,86 +1041,86 @@ as a Meta key and any number of multiple escapes is allowed."
|
||||||
(if (memq char '(?# ?\")) (error ""))
|
(if (memq char '(?# ?\")) (error ""))
|
||||||
(setq com (cons char com))
|
(setq com (cons char com))
|
||||||
(setq cont nil))
|
(setq cont nil))
|
||||||
;; If com is nil we set com as char, and read more. Again, if char is
|
;; If com is nil we set com as char, and read more. Again, if char is
|
||||||
;; ", we read the name of register and store it in viper-use-register.
|
;; ", we read the name of register and store it in viper-use-register.
|
||||||
;; if char is !, =, or #, a complete com is formed so we exit the while
|
;; if char is !, =, or #, a complete com is formed so we exit the while
|
||||||
;; loop.
|
;; loop.
|
||||||
(cond ((memq char '(?! ?=))
|
(cond ((memq char '(?! ?=))
|
||||||
(setq com char)
|
(setq com char)
|
||||||
(setq char (read-char))
|
(setq char (read-char))
|
||||||
(setq cont nil))
|
(setq cont nil))
|
||||||
((= char ?#)
|
((= char ?#)
|
||||||
;; read a char and encode it as com
|
;; read a char and encode it as com
|
||||||
(setq com (+ 128 (read-char)))
|
(setq com (+ 128 (read-char)))
|
||||||
(setq char (read-char)))
|
(setq char (read-char)))
|
||||||
((= char ?\")
|
((= char ?\")
|
||||||
(let ((reg (read-char)))
|
(let ((reg (read-char)))
|
||||||
(if (viper-valid-register reg)
|
(if (viper-valid-register reg)
|
||||||
(setq viper-use-register reg)
|
(setq viper-use-register reg)
|
||||||
(error ""))
|
(error ""))
|
||||||
(setq char (read-char))))
|
(setq char (read-char))))
|
||||||
(t
|
(t
|
||||||
(setq com char)
|
(setq com char)
|
||||||
(setq char (read-char))))))
|
(setq char (read-char))))))
|
||||||
|
|
||||||
(if (atom com)
|
(if (atom com)
|
||||||
;; `com' is a single char, so we construct the command argument
|
;; `com' is a single char, so we construct the command argument
|
||||||
;; and if `char' is `?', we describe the arg; otherwise
|
;; and if `char' is `?', we describe the arg; otherwise
|
||||||
;; we prepare the command that will be executed at the end.
|
;; we prepare the command that will be executed at the end.
|
||||||
(progn
|
(progn
|
||||||
(setq cmd-info (cons value com))
|
(setq cmd-info (cons value com))
|
||||||
(while (= char ?U)
|
(while (= char ?U)
|
||||||
(viper-describe-arg cmd-info)
|
(viper-describe-arg cmd-info)
|
||||||
(setq char (read-char)))
|
(setq char (read-char)))
|
||||||
;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
|
;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
|
||||||
;; execute it at the very end
|
;; execute it at the very end
|
||||||
(or (viper-movement-command-p char)
|
(or (viper-movement-command-p char)
|
||||||
(viper-digit-command-p char)
|
(viper-digit-command-p char)
|
||||||
(viper-regsuffix-command-p char)
|
(viper-regsuffix-command-p char)
|
||||||
(= char ?!) ; bang command
|
(= char ?!) ; bang command
|
||||||
(error ""))
|
(error ""))
|
||||||
(setq cmd-to-exec-at-end
|
(setq cmd-to-exec-at-end
|
||||||
(viper-exec-form-in-vi
|
(viper-exec-form-in-vi
|
||||||
`(key-binding (char-to-string ,char)))))
|
`(key-binding (char-to-string ,char)))))
|
||||||
|
|
||||||
;; as com is non-nil, this means that we have a command to execute
|
;; as com is non-nil, this means that we have a command to execute
|
||||||
(if (memq (car com) '(?r ?R))
|
(if (memq (car com) '(?r ?R))
|
||||||
;; execute apropriate region command.
|
;; execute apropriate region command.
|
||||||
(let ((char (car com)) (com (cdr com)))
|
(let ((char (car com)) (com (cdr com)))
|
||||||
(setq prefix-arg (cons value com))
|
(setq prefix-arg (cons value com))
|
||||||
(if (= char ?r) (viper-region prefix-arg)
|
(if (= char ?r) (viper-region prefix-arg)
|
||||||
(viper-Region prefix-arg))
|
(viper-Region prefix-arg))
|
||||||
;; reset prefix-arg
|
;; reset prefix-arg
|
||||||
(setq prefix-arg nil))
|
(setq prefix-arg nil))
|
||||||
;; otherwise, reset prefix arg and call appropriate command
|
;; otherwise, reset prefix arg and call appropriate command
|
||||||
(setq value (if (null value) 1 value))
|
(setq value (if (null value) 1 value))
|
||||||
(setq prefix-arg nil)
|
(setq prefix-arg nil)
|
||||||
(cond
|
(cond
|
||||||
;; If we change ?C to ?c here, then cc will enter replacement mode
|
;; If we change ?C to ?c here, then cc will enter replacement mode
|
||||||
;; rather than deleting lines. However, it will affect 1 less line than
|
;; rather than deleting lines. However, it will affect 1 less line than
|
||||||
;; normal. We decided to not use replacement mode here and follow Vi,
|
;; normal. We decided to not use replacement mode here and follow Vi,
|
||||||
;; since replacement mode on n full lines can be achieved with nC.
|
;; since replacement mode on n full lines can be achieved with nC.
|
||||||
((equal com '(?c . ?c)) (viper-line (cons value ?C)))
|
((equal com '(?c . ?c)) (viper-line (cons value ?C)))
|
||||||
((equal com '(?d . ?d)) (viper-line (cons value ?D)))
|
((equal com '(?d . ?d)) (viper-line (cons value ?D)))
|
||||||
((equal com '(?d . ?y)) (viper-yank-defun))
|
((equal com '(?d . ?y)) (viper-yank-defun))
|
||||||
((equal com '(?y . ?y)) (viper-line (cons value ?Y)))
|
((equal com '(?y . ?y)) (viper-line (cons value ?Y)))
|
||||||
((equal com '(?< . ?<)) (viper-line (cons value ?<)))
|
((equal com '(?< . ?<)) (viper-line (cons value ?<)))
|
||||||
((equal com '(?> . ?>)) (viper-line (cons value ?>)))
|
((equal com '(?> . ?>)) (viper-line (cons value ?>)))
|
||||||
((equal com '(?! . ?!)) (viper-line (cons value ?!)))
|
((equal com '(?! . ?!)) (viper-line (cons value ?!)))
|
||||||
((equal com '(?= . ?=)) (viper-line (cons value ?=)))
|
((equal com '(?= . ?=)) (viper-line (cons value ?=)))
|
||||||
(t (error "")))))
|
(t (error "")))))
|
||||||
|
|
||||||
(if cmd-to-exec-at-end
|
(if cmd-to-exec-at-end
|
||||||
(progn
|
(progn
|
||||||
(setq last-command-char char)
|
(setq last-command-char char)
|
||||||
(setq last-command-event
|
(setq last-command-event
|
||||||
(viper-copy-event
|
(viper-copy-event
|
||||||
(if viper-xemacs-p (character-to-event char) char)))
|
(if viper-xemacs-p (character-to-event char) char)))
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(funcall cmd-to-exec-at-end cmd-info)
|
(funcall cmd-to-exec-at-end cmd-info)
|
||||||
(error
|
(error
|
||||||
(error "")))))
|
(error "")))))
|
||||||
))
|
))
|
||||||
|
|
||||||
(defun viper-describe-arg (arg)
|
(defun viper-describe-arg (arg)
|
||||||
(let (val com)
|
(let (val com)
|
||||||
|
|
@ -1660,6 +1657,7 @@ invokes the command before that, etc."
|
||||||
(viper-push-onto-ring viper-d-com 'viper-command-ring)))
|
(viper-push-onto-ring viper-d-com 'viper-command-ring)))
|
||||||
(setq viper-this-command-keys nil))
|
(setq viper-this-command-keys nil))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-prev-destructive-command (next)
|
(defun viper-prev-destructive-command (next)
|
||||||
"Find previous destructive command in the history of destructive commands.
|
"Find previous destructive command in the history of destructive commands.
|
||||||
With prefix argument, find next destructive command."
|
With prefix argument, find next destructive command."
|
||||||
|
|
@ -1679,11 +1677,13 @@ With prefix argument, find next destructive command."
|
||||||
(setq viper-d-com cmd))
|
(setq viper-d-com cmd))
|
||||||
(viper-display-current-destructive-command)))
|
(viper-display-current-destructive-command)))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-next-destructive-command ()
|
(defun viper-next-destructive-command ()
|
||||||
"Find next destructive command in the history of destructive commands."
|
"Find next destructive command in the history of destructive commands."
|
||||||
(interactive)
|
(interactive)
|
||||||
(viper-prev-destructive-command 'next))
|
(viper-prev-destructive-command 'next))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-insert-prev-from-insertion-ring (arg)
|
(defun viper-insert-prev-from-insertion-ring (arg)
|
||||||
"Cycle through insertion ring in the direction of older insertions.
|
"Cycle through insertion ring in the direction of older insertions.
|
||||||
Undoes previous insertion and inserts new.
|
Undoes previous insertion and inserts new.
|
||||||
|
|
@ -1723,6 +1723,7 @@ Undo previous insertion and inserts new."
|
||||||
(interactive)
|
(interactive)
|
||||||
(viper-insert-prev-from-insertion-ring 'next))
|
(viper-insert-prev-from-insertion-ring 'next))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; some region utilities
|
;; some region utilities
|
||||||
|
|
||||||
|
|
@ -1838,6 +1839,7 @@ Undo previous insertion and inserts new."
|
||||||
(funcall hook)
|
(funcall hook)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
;; Interpret last event in the local map first; if fails, use exit-minibuffer.
|
;; Interpret last event in the local map first; if fails, use exit-minibuffer.
|
||||||
;; Run viper-minibuffer-exit-hook before exiting.
|
;; Run viper-minibuffer-exit-hook before exiting.
|
||||||
(defun viper-exit-minibuffer ()
|
(defun viper-exit-minibuffer ()
|
||||||
|
|
@ -2518,6 +2520,7 @@ On reaching end of line, stop and signal error."
|
||||||
(forward-char val)
|
(forward-char val)
|
||||||
(if com (viper-execute-com 'viper-forward-char val com)))))
|
(if com (viper-execute-com 'viper-forward-char val com)))))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-backward-char (arg)
|
(defun viper-backward-char (arg)
|
||||||
"Move point left ARG characters (right if ARG negative).
|
"Move point left ARG characters (right if ARG negative).
|
||||||
On reaching beginning of line, stop and signal error."
|
On reaching beginning of line, stop and signal error."
|
||||||
|
|
@ -2533,6 +2536,7 @@ On reaching beginning of line, stop and signal error."
|
||||||
(backward-char val)
|
(backward-char val)
|
||||||
(if com (viper-execute-com 'viper-backward-char val com)))))
|
(if com (viper-execute-com 'viper-backward-char val com)))))
|
||||||
|
|
||||||
|
|
||||||
;; Like forward-char, but doesn't move at end of buffer.
|
;; Like forward-char, but doesn't move at end of buffer.
|
||||||
;; Returns distance traveled
|
;; Returns distance traveled
|
||||||
;; (positive or 0, if arg positive; negative if arg negative).
|
;; (positive or 0, if arg positive; negative if arg negative).
|
||||||
|
|
@ -2546,6 +2550,7 @@ On reaching beginning of line, stop and signal error."
|
||||||
(- (viper-chars-in-region pt (point)))
|
(- (viper-chars-in-region pt (point)))
|
||||||
(viper-chars-in-region pt (point)))))
|
(viper-chars-in-region pt (point)))))
|
||||||
|
|
||||||
|
|
||||||
;; Like backward-char, but doesn't move at beg of buffer.
|
;; Like backward-char, but doesn't move at beg of buffer.
|
||||||
;; Returns distance traveled
|
;; Returns distance traveled
|
||||||
;; (negative or 0, if arg positive; positive if arg negative).
|
;; (negative or 0, if arg positive; positive if arg negative).
|
||||||
|
|
@ -2594,6 +2599,7 @@ On reaching beginning of line, stop and signal error."
|
||||||
(viper-skip-all-separators-backward 'within-line)
|
(viper-skip-all-separators-backward 'within-line)
|
||||||
(or (bobp) (forward-char)))))
|
(or (bobp) (forward-char)))))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-forward-word-kernel (val)
|
(defun viper-forward-word-kernel (val)
|
||||||
(while (> val 0)
|
(while (> val 0)
|
||||||
(cond ((viper-looking-at-alpha)
|
(cond ((viper-looking-at-alpha)
|
||||||
|
|
@ -2877,6 +2883,7 @@ On reaching beginning of line, stop and signal error."
|
||||||
(back-to-indentation)
|
(back-to-indentation)
|
||||||
(if com (viper-execute-com 'viper-next-line-at-bol val com))))
|
(if com (viper-execute-com 'viper-next-line-at-bol val com))))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-previous-line (arg)
|
(defun viper-previous-line (arg)
|
||||||
"Go to previous line."
|
"Go to previous line."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
|
@ -3985,6 +3992,7 @@ Null string will repeat previous search."
|
||||||
(ding))
|
(ding))
|
||||||
(delete-backward-char val t)))
|
(delete-backward-char val t)))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-del-backward-char-in-insert ()
|
(defun viper-del-backward-char-in-insert ()
|
||||||
"Delete 1 char backwards while in insert mode."
|
"Delete 1 char backwards while in insert mode."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -3992,6 +4000,7 @@ Null string will repeat previous search."
|
||||||
(beep 1)
|
(beep 1)
|
||||||
(delete-backward-char 1 t)))
|
(delete-backward-char 1 t)))
|
||||||
|
|
||||||
|
|
||||||
(defun viper-del-backward-char-in-replace ()
|
(defun viper-del-backward-char-in-replace ()
|
||||||
"Delete one character in replace mode.
|
"Delete one character in replace mode.
|
||||||
If `viper-delete-backwards-in-replace' is t, then DEL key actually deletes
|
If `viper-delete-backwards-in-replace' is t, then DEL key actually deletes
|
||||||
|
|
@ -4559,6 +4568,7 @@ sensitive for VI-style look-and-feel."
|
||||||
(and (> viper-expert-level 0) (> 5 viper-expert-level)))
|
(and (> viper-expert-level 0) (> 5 viper-expert-level)))
|
||||||
(viper-set-hooks)))
|
(viper-set-hooks)))
|
||||||
|
|
||||||
|
|
||||||
;; Ask user expert level.
|
;; Ask user expert level.
|
||||||
(defun viper-ask-level (dont-change-unless)
|
(defun viper-ask-level (dont-change-unless)
|
||||||
(let ((ask-buffer " *viper-ask-level*")
|
(let ((ask-buffer " *viper-ask-level*")
|
||||||
|
|
@ -4797,7 +4807,6 @@ Mail anyway (y or n)? ")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Smoothes out the difference between Emacs' unread-command-events
|
;; Smoothes out the difference between Emacs' unread-command-events
|
||||||
;; and XEmacs unread-command-event. Arg is a character, an event, a list of
|
;; and XEmacs unread-command-event. Arg is a character, an event, a list of
|
||||||
;; events or a sequence of keys.
|
;; events or a sequence of keys.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue