aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorKaroly Lorentey2006-10-14 17:36:28 +0000
committerKaroly Lorentey2006-10-14 17:36:28 +0000
commit12b6af5c7ed2cfdb9783312bf890cf1e6c80c67a (patch)
tree1775f9fd1c92defd8b61304a08ec00da95bc4539 /lisp/emulation
parent3f87f67ee215ffeecbd2f53bd7f342cdf03f47df (diff)
parentf763da8d0808af7c80d72bc586bf4fcf50b37ddd (diff)
downloademacs-12b6af5c7ed2cfdb9783312bf890cf1e6c80c67a.tar.gz
emacs-12b6af5c7ed2cfdb9783312bf890cf1e6c80c67a.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-413 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-414 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-415 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-416 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-417 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-418 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-419 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-420 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-421 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-422 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-423 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-424 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-425 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-426 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-427 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-428 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-429 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-430 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-431 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-432 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-433 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-434 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-435 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-436 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-437 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-438 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-439 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-440 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-441 lisp/url/url-methods.el: Fix format error when http_proxy is empty string * emacs@sv.gnu.org/emacs--devo--0--patch-442 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-443 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-444 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-445 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-446 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-447 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-448 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-449 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-450 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-451 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-452 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-453 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-454 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-455 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-456 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-457 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-458 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-459 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-460 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-461 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-462 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-463 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-464 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-465 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-466 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-467 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-468 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-469 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-470 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-471 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-472 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-473 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-128 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-129 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-130 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-131 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-132 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-133 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-134 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-135 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-136 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-137 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-138 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-139 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-140 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-141 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-142 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-143 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-144 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-145 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-146 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-147 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-148 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-149 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-582
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/cua-base.el140
-rw-r--r--lisp/emulation/viper-cmd.el13
-rw-r--r--lisp/emulation/viper.el2
3 files changed, 83 insertions, 72 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index b16ae17eda0..236e3e2c9ad 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1097,73 +1097,79 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1097;;; Pre-command hook 1097;;; Pre-command hook
1098 1098
1099(defun cua--pre-command-handler-1 () 1099(defun cua--pre-command-handler-1 ()
1100 (let ((movement (eq (get this-command 'CUA) 'move))) 1100 ;; Cancel prefix key timeout if user enters another key.
1101 1101 (when cua--prefix-override-timer
1102 ;; Cancel prefix key timeout if user enters another key. 1102 (if (timerp cua--prefix-override-timer)
1103 (when cua--prefix-override-timer 1103 (cancel-timer cua--prefix-override-timer))
1104 (if (timerp cua--prefix-override-timer) 1104 (setq cua--prefix-override-timer nil))
1105 (cancel-timer cua--prefix-override-timer)) 1105
1106 (setq cua--prefix-override-timer nil)) 1106 (cond
1107 1107 ;; Only symbol commands can have necessary properties
1108 ;; Handle shifted cursor keys and other movement commands. 1108 ((not (symbolp this-command))
1109 ;; If region is not active, region is activated if key is shifted. 1109 nil)
1110 ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). 1110
1111 ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. 1111 ;; Handle delete-selection property on non-movement commands
1112 (if movement 1112 ((not (eq (get this-command 'CUA) 'move))
1113 (cond 1113 (when (and mark-active (not deactivate-mark))
1114 ((if window-system 1114 (let* ((ds (or (get this-command 'delete-selection)
1115 (memq 'shift (event-modifiers 1115 (get this-command 'pending-delete)))
1116 (aref (this-single-command-raw-keys) 0))) 1116 (nc (cond
1117 (or 1117 ((not ds) nil)
1118 (memq 'shift (event-modifiers 1118 ((eq ds 'yank)
1119 (aref (this-single-command-keys) 0))) 1119 'cua-paste)
1120 ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. 1120 ((eq ds 'kill)
1121 (and (boundp 'local-function-key-map) 1121 (if cua--rectangle
1122 local-function-key-map 1122 'cua-copy-rectangle
1123 (let ((ev (lookup-key local-function-key-map 1123 'cua-copy-region))
1124 (this-single-command-raw-keys)))) 1124 ((eq ds 'supersede)
1125 (and (vector ev) 1125 (if cua--rectangle
1126 (symbolp (setq ev (aref ev 0))) 1126 'cua-delete-rectangle
1127 (string-match "S-" (symbol-name ev))))))) 1127 'cua-delete-region))
1128 (unless mark-active 1128 (t
1129 (push-mark-command nil t)) 1129 (if cua--rectangle
1130 (setq cua--last-region-shifted t) 1130 'cua-delete-rectangle ;; replace?
1131 (setq cua--explicit-region-start nil)) 1131 'cua-replace-region)))))
1132 ((or cua--explicit-region-start cua--rectangle) 1132 (if nc
1133 (unless mark-active 1133 (setq this-original-command this-command
1134 (push-mark-command nil nil))) 1134 this-command nc)))))
1135 (t 1135
1136 ;; If we set mark-active to nil here, the region highlight will not be 1136 ;; Handle shifted cursor keys and other movement commands.
1137 ;; removed by the direct_output_ commands. 1137 ;; If region is not active, region is activated if key is shifted.
1138 (setq deactivate-mark t))) 1138 ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC).
1139 1139 ;; If rectangle is active, expand rectangle in specified direction and ignore the movement.
1140 ;; Handle delete-selection property on other commands 1140 ((if window-system
1141 (if (and mark-active (not deactivate-mark)) 1141 (memq 'shift (event-modifiers
1142 (let* ((ds (or (get this-command 'delete-selection) 1142 (aref (this-single-command-raw-keys) 0)))
1143 (get this-command 'pending-delete))) 1143 (or
1144 (nc (cond 1144 (memq 'shift (event-modifiers
1145 ((not ds) nil) 1145 (aref (this-single-command-keys) 0)))
1146 ((eq ds 'yank) 1146 ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home.
1147 'cua-paste) 1147 (and (boundp 'local-function-key-map)
1148 ((eq ds 'kill) 1148 local-function-key-map
1149 (if cua--rectangle 1149 (let ((ev (lookup-key local-function-key-map
1150 'cua-copy-rectangle 1150 (this-single-command-raw-keys))))
1151 'cua-copy-region)) 1151 (and (vector ev)
1152 ((eq ds 'supersede) 1152 (symbolp (setq ev (aref ev 0)))
1153 (if cua--rectangle 1153 (string-match "S-" (symbol-name ev)))))))
1154 'cua-delete-rectangle 1154 (unless mark-active
1155 'cua-delete-region)) 1155 (push-mark-command nil t))
1156 (t 1156 (setq cua--last-region-shifted t)
1157 (if cua--rectangle 1157 (setq cua--explicit-region-start nil))
1158 'cua-delete-rectangle ;; replace? 1158
1159 'cua-replace-region))))) 1159 ;; Set mark if user explicitly said to do so
1160 (if nc 1160 ((or cua--explicit-region-start cua--rectangle)
1161 (setq this-original-command this-command 1161 (unless mark-active
1162 this-command nc))))) 1162 (push-mark-command nil nil)))
1163 1163
1164 ;; Detect extension of rectangles by mouse or other movement 1164 ;; Else clear mark after this command.
1165 (setq cua--buffer-and-point-before-command 1165 (t
1166 (if cua--rectangle (cons (current-buffer) (point)))))) 1166 ;; If we set mark-active to nil here, the region highlight will not be
1167 ;; removed by the direct_output_ commands.
1168 (setq deactivate-mark t)))
1169
1170 ;; Detect extension of rectangles by mouse or other movement
1171 (setq cua--buffer-and-point-before-command
1172 (if cua--rectangle (cons (current-buffer) (point)))))
1167 1173
1168(defun cua--pre-command-handler () 1174(defun cua--pre-command-handler ()
1169 (when cua-mode 1175 (when cua-mode
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index af757a2a55c..61d99e6c78d 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -892,12 +892,17 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
892 (t 892 (t
893 ;;(setq ch (read-char-exclusive)) 893 ;;(setq ch (read-char-exclusive))
894 (setq ch (aref (read-key-sequence nil) 0)) 894 (setq ch (aref (read-key-sequence nil) 0))
895 (if viper-xemacs-p
896 (setq ch (event-to-character ch)))
895 ;; replace ^M with the newline 897 ;; replace ^M with the newline
896 (if (eq ch ?\C-m) (setq ch ?\n)) 898 (if (eq ch ?\C-m) (setq ch ?\n))
897 ;; Make sure ^V and ^Q work as quotation chars 899 ;; Make sure ^V and ^Q work as quotation chars
898 (if (memq ch '(?\C-v ?\C-q)) 900 (if (memq ch '(?\C-v ?\C-q))
899 ;;(setq ch (read-char-exclusive)) 901 (progn
900 (setq ch (aref (read-key-sequence nil) 0)) 902 ;;(setq ch (read-char-exclusive))
903 (setq ch (aref (read-key-sequence nil) 0))
904 (if viper-xemacs-p
905 (setq ch (event-to-character ch))))
901 ) 906 )
902 (insert ch)) 907 (insert ch))
903 ) 908 )
@@ -1750,7 +1755,7 @@ invokes the command before that, etc."
1750 1755
1751;; Hook used in viper-undo 1756;; Hook used in viper-undo
1752(defun viper-after-change-undo-hook (beg end len) 1757(defun viper-after-change-undo-hook (beg end len)
1753 (if undo-in-progress 1758 (if (and (boundp 'undo-in-progress) undo-in-progress)
1754 (setq undo-beg-posn beg 1759 (setq undo-beg-posn beg
1755 undo-end-posn (or end beg)) 1760 undo-end-posn (or end beg))
1756 ;; some other hooks may be changing various text properties in 1761 ;; some other hooks may be changing various text properties in
@@ -3093,7 +3098,7 @@ If point is on a widget or a button, simulate clicking on that widget/button."
3093 (and (consp widget) 3098 (and (consp widget)
3094 (get (widget-type widget) 'widget-type)))) 3099 (get (widget-type widget) 'widget-type))))
3095 (widget-button-press (point)) 3100 (widget-button-press (point))
3096 (if (button-at (point)) 3101 (if (and (fboundp 'button-at) (fboundp 'push-button) (button-at (point)))
3097 (push-button) 3102 (push-button)
3098 ;; not a widget or a button 3103 ;; not a widget or a button
3099 (viper-leave-region-active) 3104 (viper-leave-region-active)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 0ba7bdd041a..ea70ad609ad 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -9,7 +9,7 @@
9;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 9;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
10;; Keywords: emulations 10;; Keywords: emulations
11 11
12(defconst viper-version "3.12 of February 18, 2006" 12(defconst viper-version "3.13 of September 18, 2006"
13 "The current version of Viper") 13 "The current version of Viper")
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.