diff options
| author | Miles Bader | 2007-12-06 09:51:45 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-12-06 09:51:45 +0000 |
| commit | 0bd508417142ff377f34aec8dcec9438d9175c2c (patch) | |
| tree | 4d60fe09e5cebf7d79766b11e9cda8cc1c9dbb9b /lisp/emulation | |
| parent | 98fe991da804a42f53f6a5e84cd5eab18a82e181 (diff) | |
| parent | 9fb1ba8090da3528de56158a79bd3527d31c7f2f (diff) | |
| download | emacs-0bd508417142ff377f34aec8dcec9438d9175c2c.tar.gz emacs-0bd508417142ff377f34aec8dcec9438d9175c2c.zip | |
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/cua-base.el | 89 | ||||
| -rw-r--r-- | lisp/emulation/cua-gmrk.el | 4 | ||||
| -rw-r--r-- | lisp/emulation/cua-rect.el | 11 | ||||
| -rw-r--r-- | lisp/emulation/edt-vt100.el | 2 | ||||
| -rw-r--r-- | lisp/emulation/edt.el | 39 | ||||
| -rw-r--r-- | lisp/emulation/pc-select.el | 107 | ||||
| -rw-r--r-- | lisp/emulation/tpu-edt.el | 9 | ||||
| -rw-r--r-- | lisp/emulation/vi.el | 2 | ||||
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 21 | ||||
| -rw-r--r-- | lisp/emulation/viper-ex.el | 6 | ||||
| -rw-r--r-- | lisp/emulation/viper-init.el | 19 | ||||
| -rw-r--r-- | lisp/emulation/viper-keym.el | 17 | ||||
| -rw-r--r-- | lisp/emulation/viper-macs.el | 8 | ||||
| -rw-r--r-- | lisp/emulation/viper-mous.el | 4 | ||||
| -rw-r--r-- | lisp/emulation/viper-util.el | 8 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 15 |
16 files changed, 159 insertions, 202 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index fbb39ee66d3..1f696788869 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -286,7 +286,7 @@ enabled." | |||
| 286 | "*If non-nil, only highlight region if marked with S-<move>. | 286 | "*If non-nil, only highlight region if marked with S-<move>. |
| 287 | When this is non-nil, CUA toggles `transient-mark-mode' on when the region | 287 | When this is non-nil, CUA toggles `transient-mark-mode' on when the region |
| 288 | is marked using shifted movement keys, and off when the mark is cleared. | 288 | is marked using shifted movement keys, and off when the mark is cleared. |
| 289 | But when the mark was set using \\[cua-set-mark], transient-mark-mode | 289 | But when the mark was set using \\[cua-set-mark], Transient Mark mode |
| 290 | is not turned on." | 290 | is not turned on." |
| 291 | :type 'boolean | 291 | :type 'boolean |
| 292 | :group 'cua) | 292 | :group 'cua) |
| @@ -406,8 +406,8 @@ and after the region marked by the rectangle to search." | |||
| 406 | "Global key used to toggle the cua rectangle mark." | 406 | "Global key used to toggle the cua rectangle mark." |
| 407 | :set #'(lambda (symbol value) | 407 | :set #'(lambda (symbol value) |
| 408 | (set symbol value) | 408 | (set symbol value) |
| 409 | (when (and (boundp 'cua--keymaps-initalized) | 409 | (when (and (boundp 'cua--keymaps-initialized) |
| 410 | cua--keymaps-initalized) | 410 | cua--keymaps-initialized) |
| 411 | (define-key cua-global-keymap value | 411 | (define-key cua-global-keymap value |
| 412 | 'cua-set-rectangle-mark) | 412 | 'cua-set-rectangle-mark) |
| 413 | (when (boundp 'cua--rectangle-keymap) | 413 | (when (boundp 'cua--rectangle-keymap) |
| @@ -583,35 +583,37 @@ a cons (TYPE . COLOR), then both properties are affected." | |||
| 583 | 583 | ||
| 584 | ;;; Rectangle support is in cua-rect.el | 584 | ;;; Rectangle support is in cua-rect.el |
| 585 | 585 | ||
| 586 | (autoload 'cua-set-rectangle-mark "cua-rect" nil t nil) | 586 | (autoload 'cua-set-rectangle-mark "cua-rect" |
| 587 | "Start rectangle at mouse click position." t nil) | ||
| 587 | 588 | ||
| 588 | ;; Stub definitions until it is loaded | 589 | ;; Stub definitions until it is loaded |
| 589 | 590 | (defvar cua--rectangle) | |
| 590 | (when (not (featurep 'cua-rect)) | 591 | (defvar cua--last-killed-rectangle) |
| 591 | (defvar cua--rectangle) | 592 | (unless (featurep 'cua-rect) |
| 592 | (setq cua--rectangle nil) | 593 | (setq cua--rectangle nil |
| 593 | (defvar cua--last-killed-rectangle) | 594 | cua--last-killed-rectangle nil)) |
| 594 | (setq cua--last-killed-rectangle nil)) | 595 | |
| 595 | 596 | ;; All behind cua--rectangle tests. | |
| 596 | 597 | (declare-function cua-copy-rectangle "cua-rect" (arg)) | |
| 598 | (declare-function cua-cut-rectangle "cua-rect" (arg)) | ||
| 599 | (declare-function cua--rectangle-left "cua-rect" (&optional val)) | ||
| 600 | (declare-function cua--delete-rectangle "cua-rect" ()) | ||
| 601 | (declare-function cua--insert-rectangle "cua-rect" | ||
| 602 | (rect &optional below paste-column line-count)) | ||
| 603 | (declare-function cua--rectangle-corner "cua-rect" (&optional advance)) | ||
| 604 | (declare-function cua--rectangle-assert "cua-rect" ()) | ||
| 597 | 605 | ||
| 598 | ;;; Global Mark support is in cua-gmrk.el | 606 | ;;; Global Mark support is in cua-gmrk.el |
| 599 | 607 | ||
| 600 | (autoload 'cua-toggle-global-mark "cua-gmrk" nil t nil) | 608 | (autoload 'cua-toggle-global-mark "cua-gmrk" nil t nil) |
| 601 | 609 | ||
| 602 | ;; Stub definitions until cua-gmrk.el is loaded | 610 | ;; Stub definitions until cua-gmrk.el is loaded |
| 603 | 611 | (defvar cua--global-mark-active) | |
| 604 | (when (not (featurep 'cua-gmrk)) | 612 | (unless (featurep 'cua-gmrk) |
| 605 | (defvar cua--global-mark-active) | ||
| 606 | (setq cua--global-mark-active nil)) | 613 | (setq cua--global-mark-active nil)) |
| 607 | 614 | ||
| 608 | 615 | (declare-function cua--insert-at-global-mark "cua-gmrk" (str &optional msg)) | |
| 609 | (provide 'cua-base) | 616 | (declare-function cua--global-mark-post-command "cua-gmrk" ()) |
| 610 | |||
| 611 | (eval-when-compile | ||
| 612 | (require 'cua-rect) | ||
| 613 | (require 'cua-gmrk) | ||
| 614 | ) | ||
| 615 | 617 | ||
| 616 | 618 | ||
| 617 | ;;; Low-level Interface | 619 | ;;; Low-level Interface |
| @@ -874,6 +876,8 @@ With numeric prefix arg, copy to register 0-9 instead." | |||
| 874 | (if (fboundp 'cua--cancel-rectangle) | 876 | (if (fboundp 'cua--cancel-rectangle) |
| 875 | (cua--cancel-rectangle))) | 877 | (cua--cancel-rectangle))) |
| 876 | 878 | ||
| 879 | (declare-function x-clipboard-yank "../term/x-win" ()) | ||
| 880 | |||
| 877 | (defun cua-paste (arg) | 881 | (defun cua-paste (arg) |
| 878 | "Paste last cut or copied region or rectangle. | 882 | "Paste last cut or copied region or rectangle. |
| 879 | An active region is deleted before executing the command. | 883 | An active region is deleted before executing the command. |
| @@ -918,6 +922,7 @@ If global mark is active, copy from register or one character." | |||
| 918 | (cond | 922 | (cond |
| 919 | (regtxt | 923 | (regtxt |
| 920 | (cond | 924 | (cond |
| 925 | ;; This being a cons implies cua-rect is loaded? | ||
| 921 | ((consp regtxt) (cua--insert-rectangle regtxt)) | 926 | ((consp regtxt) (cua--insert-rectangle regtxt)) |
| 922 | ((stringp regtxt) (insert-for-yank regtxt)) | 927 | ((stringp regtxt) (insert-for-yank regtxt)) |
| 923 | (t (message "Unknown data in register %c" cua--register)))) | 928 | (t (message "Unknown data in register %c" cua--register)))) |
| @@ -954,8 +959,8 @@ If global mark is active, copy from register or one character." | |||
| 954 | 959 | ||
| 955 | (defun cua-paste-pop (arg) | 960 | (defun cua-paste-pop (arg) |
| 956 | "Replace a just-pasted text or rectangle with a different text. | 961 | "Replace a just-pasted text or rectangle with a different text. |
| 957 | See `yank-pop' for details about the default behaviour. For an alternative | 962 | See `yank-pop' for details about the default behavior. For an alternative |
| 958 | behaviour, see `cua-paste-pop-rotate-temporarily'." | 963 | behavior, see `cua-paste-pop-rotate-temporarily'." |
| 959 | (interactive "P") | 964 | (interactive "P") |
| 960 | (cond | 965 | (cond |
| 961 | ((eq last-command 'cua--paste-rectangle) | 966 | ((eq last-command 'cua--paste-rectangle) |
| @@ -1225,22 +1230,26 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1225 | 1230 | ||
| 1226 | ;; Handle shifted cursor keys and other movement commands. | 1231 | ;; Handle shifted cursor keys and other movement commands. |
| 1227 | ;; If region is not active, region is activated if key is shifted. | 1232 | ;; If region is not active, region is activated if key is shifted. |
| 1228 | ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). | 1233 | ;; If region is active, region is cancelled if key is unshifted |
| 1229 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. | 1234 | ;; (and region not started with C-SPC). |
| 1235 | ;; If rectangle is active, expand rectangle in specified direction and | ||
| 1236 | ;; ignore the movement. | ||
| 1230 | ((if window-system | 1237 | ((if window-system |
| 1238 | ;; Shortcut for window-system, assuming that input-decode-map is empty. | ||
| 1231 | (memq 'shift (event-modifiers | 1239 | (memq 'shift (event-modifiers |
| 1232 | (aref (this-single-command-raw-keys) 0))) | 1240 | (aref (this-single-command-raw-keys) 0))) |
| 1233 | (or | 1241 | (or |
| 1242 | ;; Check if the final key-sequence was shifted. | ||
| 1234 | (memq 'shift (event-modifiers | 1243 | (memq 'shift (event-modifiers |
| 1235 | (aref (this-single-command-keys) 0))) | 1244 | (aref (this-single-command-keys) 0))) |
| 1236 | ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. | 1245 | ;; If not, maybe the raw key-sequence was mapped by input-decode-map |
| 1237 | (and (boundp 'local-function-key-map) | 1246 | ;; to a shifted key (and then mapped down to its unshifted form). |
| 1238 | local-function-key-map | 1247 | (let* ((keys (this-single-command-raw-keys)) |
| 1239 | (let ((ev (lookup-key local-function-key-map | 1248 | (ev (lookup-key input-decode-map keys))) |
| 1240 | (this-single-command-raw-keys)))) | 1249 | (or (and (vector ev) (memq 'shift (event-modifiers (aref ev 0)))) |
| 1241 | (and (vector ev) | 1250 | ;; Or maybe, the raw key-sequence was not an escape sequence |
| 1242 | (symbolp (setq ev (aref ev 0))) | 1251 | ;; and was shifted (and then mapped down to its unshifted form). |
| 1243 | (string-match "S-" (symbol-name ev))))))) | 1252 | (memq 'shift (event-modifiers (aref keys 0))))))) |
| 1244 | (unless mark-active | 1253 | (unless mark-active |
| 1245 | (push-mark-command nil t)) | 1254 | (push-mark-command nil t)) |
| 1246 | (setq cua--last-region-shifted t) | 1255 | (setq cua--last-region-shifted t) |
| @@ -1326,8 +1335,8 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1326 | (defvar cua--cua-keys-keymap (make-sparse-keymap)) | 1335 | (defvar cua--cua-keys-keymap (make-sparse-keymap)) |
| 1327 | (defvar cua--prefix-override-keymap (make-sparse-keymap)) | 1336 | (defvar cua--prefix-override-keymap (make-sparse-keymap)) |
| 1328 | (defvar cua--prefix-repeat-keymap (make-sparse-keymap)) | 1337 | (defvar cua--prefix-repeat-keymap (make-sparse-keymap)) |
| 1329 | (defvar cua--global-mark-keymap (make-sparse-keymap)) ; Initalized when cua-gmrk.el is loaded | 1338 | (defvar cua--global-mark-keymap (make-sparse-keymap)) ; Initialized when cua-gmrk.el is loaded |
| 1330 | (defvar cua--rectangle-keymap (make-sparse-keymap)) ; Initalized when cua-rect.el is loaded | 1339 | (defvar cua--rectangle-keymap (make-sparse-keymap)) ; Initialized when cua-rect.el is loaded |
| 1331 | (defvar cua--region-keymap (make-sparse-keymap)) | 1340 | (defvar cua--region-keymap (make-sparse-keymap)) |
| 1332 | 1341 | ||
| 1333 | (defvar cua--ena-cua-keys-keymap nil) | 1342 | (defvar cua--ena-cua-keys-keymap nil) |
| @@ -1370,7 +1379,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1370 | (and cua--global-mark-active | 1379 | (and cua--global-mark-active |
| 1371 | (not (window-minibuffer-p))))) | 1380 | (not (window-minibuffer-p))))) |
| 1372 | 1381 | ||
| 1373 | (defvar cua--keymaps-initalized nil) | 1382 | (defvar cua--keymaps-initialized nil) |
| 1374 | 1383 | ||
| 1375 | (defun cua--shift-control-prefix (prefix arg) | 1384 | (defun cua--shift-control-prefix (prefix arg) |
| 1376 | ;; handle S-C-x and S-C-c by emulating the fast double prefix function. | 1385 | ;; handle S-C-x and S-C-c by emulating the fast double prefix function. |
| @@ -1534,9 +1543,9 @@ shifted movement key, set `cua-highlight-region-shift-only'." | |||
| 1534 | (setq mark-even-if-inactive t) | 1543 | (setq mark-even-if-inactive t) |
| 1535 | (setq highlight-nonselected-windows nil) | 1544 | (setq highlight-nonselected-windows nil) |
| 1536 | 1545 | ||
| 1537 | (unless cua--keymaps-initalized | 1546 | (unless cua--keymaps-initialized |
| 1538 | (cua--init-keymaps) | 1547 | (cua--init-keymaps) |
| 1539 | (setq cua--keymaps-initalized t)) | 1548 | (setq cua--keymaps-initialized t)) |
| 1540 | 1549 | ||
| 1541 | (if cua-mode | 1550 | (if cua-mode |
| 1542 | (progn | 1551 | (progn |
| @@ -1600,7 +1609,7 @@ shifted movement key, set `cua-highlight-region-shift-only'." | |||
| 1600 | (setq cua--debug (not cua--debug))) | 1609 | (setq cua--debug (not cua--debug))) |
| 1601 | 1610 | ||
| 1602 | 1611 | ||
| 1603 | (provide 'cua) | 1612 | (provide 'cua-base) |
| 1604 | 1613 | ||
| 1605 | ;;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05 | 1614 | ;;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05 |
| 1606 | ;;; cua-base.el ends here | 1615 | ;;; cua-base.el ends here |
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 6dc4d179d3d..6211a3c3154 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | (provide 'cua-gmrk) | ||
| 31 | |||
| 32 | (eval-when-compile | 30 | (eval-when-compile |
| 33 | (require 'cua-base) | 31 | (require 'cua-base) |
| 34 | (require 'cua-rect) | 32 | (require 'cua-rect) |
| @@ -386,5 +384,7 @@ With prefix argument, don't jump to global mark when cancelling it." | |||
| 386 | 384 | ||
| 387 | (setq cua--global-mark-initialized t)) | 385 | (setq cua--global-mark-initialized t)) |
| 388 | 386 | ||
| 387 | (provide 'cua-gmrk) | ||
| 388 | |||
| 389 | ;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f | 389 | ;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f |
| 390 | ;;; cua-gmrk.el ends here | 390 | ;;; cua-gmrk.el ends here |
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 5c4bc011464..f6b50336815 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el | |||
| @@ -33,12 +33,8 @@ | |||
| 33 | 33 | ||
| 34 | ;;; Code: | 34 | ;;; Code: |
| 35 | 35 | ||
| 36 | (provide 'cua-rect) | ||
| 37 | |||
| 38 | (eval-when-compile | 36 | (eval-when-compile |
| 39 | (require 'cua-base) | 37 | (require 'cua-base)) |
| 40 | (require 'cua-gmrk) | ||
| 41 | ) | ||
| 42 | 38 | ||
| 43 | ;;; Rectangle support | 39 | ;;; Rectangle support |
| 44 | 40 | ||
| @@ -1061,6 +1057,9 @@ The text previously in the rectangle is overwritten by the blanks." | |||
| 1061 | ;; (setq cua-save-point (point)) | 1057 | ;; (setq cua-save-point (point)) |
| 1062 | )))) | 1058 | )))) |
| 1063 | 1059 | ||
| 1060 | (declare-function cua--cut-rectangle-to-global-mark "cua-gmrk" (as-text)) | ||
| 1061 | (declare-function cua--copy-rectangle-to-global-mark "cua-gmrk" (as-text)) | ||
| 1062 | |||
| 1064 | (defun cua-copy-rectangle-as-text (&optional arg delete) | 1063 | (defun cua-copy-rectangle-as-text (&optional arg delete) |
| 1065 | "Copy rectangle, but store as normal text." | 1064 | "Copy rectangle, but store as normal text." |
| 1066 | (interactive "P") | 1065 | (interactive "P") |
| @@ -1491,5 +1490,7 @@ With prefix arg, indent to that column." | |||
| 1491 | 1490 | ||
| 1492 | (setq cua--rectangle-initialized t)) | 1491 | (setq cua--rectangle-initialized t)) |
| 1493 | 1492 | ||
| 1493 | (provide 'cua-rect) | ||
| 1494 | |||
| 1494 | ;;; arch-tag: b730df53-17b9-4a89-bd63-4a71ec196731 | 1495 | ;;; arch-tag: b730df53-17b9-4a89-bd63-4a71ec196731 |
| 1495 | ;;; cua-rect.el ends here | 1496 | ;;; cua-rect.el ends here |
diff --git a/lisp/emulation/edt-vt100.el b/lisp/emulation/edt-vt100.el index 4e094a5f703..fbe56c2c341 100644 --- a/lisp/emulation/edt-vt100.el +++ b/lisp/emulation/edt-vt100.el | |||
| @@ -39,6 +39,8 @@ | |||
| 39 | ;; The following functions are called by the EDT screen width commands defined | 39 | ;; The following functions are called by the EDT screen width commands defined |
| 40 | ;; in edt.el. | 40 | ;; in edt.el. |
| 41 | 41 | ||
| 42 | (declare-function vt100-wide-mode "../term/vt100" (&optional arg)) | ||
| 43 | |||
| 42 | (defun edt-set-term-width-80 () | 44 | (defun edt-set-term-width-80 () |
| 43 | "Set terminal width to 80 columns." | 45 | "Set terminal width to 80 columns." |
| 44 | (vt100-wide-mode -1)) | 46 | (vt100-wide-mode -1)) |
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 4a68e258cb1..1674e7a266b 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -166,28 +166,23 @@ | |||
| 166 | ;;;; VARIABLES and CONSTANTS | 166 | ;;;; VARIABLES and CONSTANTS |
| 167 | ;;;; | 167 | ;;;; |
| 168 | 168 | ||
| 169 | ;; For backward compatibility to Emacs 19. | ||
| 170 | (or (fboundp 'defgroup) | ||
| 171 | (defmacro defgroup (&rest rest))) | ||
| 172 | |||
| 173 | (defgroup edt nil | 169 | (defgroup edt nil |
| 174 | "Emacs emulating EDT." | 170 | "Emacs emulating EDT." |
| 175 | :prefix "edt-" | 171 | :prefix "edt-" |
| 176 | :group 'emulations) | 172 | :group 'emulations) |
| 177 | 173 | ||
| 178 | ;; To silence the byte-compiler | 174 | ;; To silence the byte-compiler |
| 179 | (eval-when-compile | 175 | (defvar *EDT-keys*) |
| 180 | (defvar *EDT-keys*) | 176 | (defvar edt-default-global-map) |
| 181 | (defvar edt-default-global-map) | 177 | (defvar edt-last-copied-word) |
| 182 | (defvar edt-last-copied-word) | 178 | (defvar edt-learn-macro-count) |
| 183 | (defvar edt-learn-macro-count) | 179 | (defvar edt-orig-page-delimiter) |
| 184 | (defvar edt-orig-page-delimiter) | 180 | (defvar edt-orig-transient-mark-mode) |
| 185 | (defvar edt-orig-transient-mark-mode) | 181 | (defvar edt-rect-start-point) |
| 186 | (defvar edt-rect-start-point) | 182 | (defvar edt-user-global-map) |
| 187 | (defvar edt-user-global-map) | 183 | (defvar rect-start-point) |
| 188 | (defvar rect-start-point) | 184 | (defvar time-string) |
| 189 | (defvar time-string) | 185 | (defvar zmacs-region-stays) |
| 190 | (defvar zmacs-region-stays)) | ||
| 191 | 186 | ||
| 192 | ;;; | 187 | ;;; |
| 193 | ;;; Version Information | 188 | ;;; Version Information |
| @@ -198,11 +193,6 @@ | |||
| 198 | ;;; User Configurable Variables | 193 | ;;; User Configurable Variables |
| 199 | ;;; | 194 | ;;; |
| 200 | 195 | ||
| 201 | ;; For backward compatibility to Emacs 19. | ||
| 202 | (or (fboundp 'defcustom) | ||
| 203 | (defmacro defcustom (var value doc &rest ignore) | ||
| 204 | `(defvar ,var ,value ,doc))) | ||
| 205 | |||
| 206 | (defcustom edt-keep-current-page-delimiter nil | 196 | (defcustom edt-keep-current-page-delimiter nil |
| 207 | "*Emacs MUST be restarted for a change in value to take effect! | 197 | "*Emacs MUST be restarted for a change in value to take effect! |
| 208 | Non-nil leaves Emacs value of `page-delimiter' unchanged within EDT | 198 | Non-nil leaves Emacs value of `page-delimiter' unchanged within EDT |
| @@ -1628,6 +1618,8 @@ Argument NUM is the percentage into the buffer to move." | |||
| 1628 | (indent-region (point) (mark) nil) | 1618 | (indent-region (point) (mark) nil) |
| 1629 | (fill-region (point) (mark)))) | 1619 | (fill-region (point) (mark)))) |
| 1630 | 1620 | ||
| 1621 | |||
| 1622 | (declare-function c-mark-function "cc-cmds" ()) | ||
| 1631 | ;;; | 1623 | ;;; |
| 1632 | ;;; MARK SECTION WISELY | 1624 | ;;; MARK SECTION WISELY |
| 1633 | ;;; | 1625 | ;;; |
| @@ -2237,7 +2229,10 @@ Optional argument USER-SETUP non-nil means called from function | |||
| 2237 | ;; function edt-setup-extra-default-bindings. | 2229 | ;; function edt-setup-extra-default-bindings. |
| 2238 | (define-prefix-command 'edt-user-gold-map) | 2230 | (define-prefix-command 'edt-user-gold-map) |
| 2239 | (fset 'edt-user-gold-map (copy-keymap 'edt-default-gold-map)) | 2231 | (fset 'edt-user-gold-map (copy-keymap 'edt-default-gold-map)) |
| 2240 | (edt-setup-user-bindings) | 2232 | ;; This is a function that the user can define for custom bindings. |
| 2233 | ;; See etc/edt-user.doc. | ||
| 2234 | (if (fboundp 'edt-setup-user-bindings) | ||
| 2235 | (edt-setup-user-bindings)) | ||
| 2241 | (edt-select-user-global-map)) | 2236 | (edt-select-user-global-map)) |
| 2242 | 2237 | ||
| 2243 | (defun edt-select-default-global-map() | 2238 | (defun edt-select-default-global-map() |
diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index a4e304616da..c35044b70ec 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el | |||
| @@ -135,8 +135,8 @@ restored to their original values when PC Selection mode is toggled off.") | |||
| 135 | 135 | ||
| 136 | (unless pc-select-default-key-bindings | 136 | (unless pc-select-default-key-bindings |
| 137 | (let ((lst | 137 | (let ((lst |
| 138 | ;; This is to avoid confusion with the delete-selection-mode | 138 | ;; This is to avoid confusion with the delete-selection-mode. |
| 139 | ;; On simple displays you cant see that a region is active and | 139 | ;; On simple displays you can't see that a region is active and |
| 140 | ;; will be deleted on the next keypress IMHO especially for | 140 | ;; will be deleted on the next keypress IMHO especially for |
| 141 | ;; copy-region-as-kill this is confusing. | 141 | ;; copy-region-as-kill this is confusing. |
| 142 | ;; The same goes for exchange-point-and-mark | 142 | ;; The same goes for exchange-point-and-mark |
| @@ -182,7 +182,7 @@ restored to their original values when PC Selection mode is toggled off.") | |||
| 182 | ([prior] . scroll-down-nomark) | 182 | ([prior] . scroll-down-nomark) |
| 183 | 183 | ||
| 184 | ;; Next four lines are from Pete Forman. | 184 | ;; Next four lines are from Pete Forman. |
| 185 | ([C-down] . forward-paragraph-nomark) ; KNextPara cDn | 185 | ([C-down] . forward-paragraph-nomark) ; KNextPara cDn |
| 186 | ([C-up] . backward-paragraph-nomark) ; KPrevPara cUp | 186 | ([C-up] . backward-paragraph-nomark) ; KPrevPara cUp |
| 187 | ([S-C-down] . forward-paragraph-mark) | 187 | ([S-C-down] . forward-paragraph-mark) |
| 188 | ([S-C-up] . backward-paragraph-mark)))) | 188 | ([S-C-up] . backward-paragraph-mark)))) |
| @@ -281,10 +281,17 @@ and `transient-mark-mode'." | |||
| 281 | ;;;; | 281 | ;;;; |
| 282 | ;; non-interactive | 282 | ;; non-interactive |
| 283 | ;;;; | 283 | ;;;; |
| 284 | (defun ensure-mark() | 284 | (defun pc-select-ensure-mark () |
| 285 | ;; make sure mark is active | 285 | ;; make sure mark is active |
| 286 | ;; test if it is active, if it isn't, set it and activate it | 286 | ;; test if it is active, if it isn't, set it and activate it |
| 287 | (or mark-active (set-mark-command nil))) | 287 | (or mark-active (set-mark-command nil)) |
| 288 | ;; Remember who activated the mark. | ||
| 289 | (setq mark-active 'pc-select)) | ||
| 290 | |||
| 291 | (defun pc-select-maybe-deactivate-mark () | ||
| 292 | ;; maybe switch off mark (only if *we* switched it on) | ||
| 293 | (when (eq mark-active 'pc-select) | ||
| 294 | (deactivate-mark))) | ||
| 288 | 295 | ||
| 289 | ;;;;;;;;;;;;;;;;;;;;;;;;;;; | 296 | ;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 290 | ;;;;; forward and mark | 297 | ;;;;; forward and mark |
| @@ -294,7 +301,7 @@ and `transient-mark-mode'." | |||
| 294 | "Ensure mark is active; move point right ARG characters (left if ARG negative). | 301 | "Ensure mark is active; move point right ARG characters (left if ARG negative). |
| 295 | On reaching end of buffer, stop and signal error." | 302 | On reaching end of buffer, stop and signal error." |
| 296 | (interactive "p") | 303 | (interactive "p") |
| 297 | (ensure-mark) | 304 | (pc-select-ensure-mark) |
| 298 | (forward-char arg)) | 305 | (forward-char arg)) |
| 299 | 306 | ||
| 300 | (defun forward-word-mark (&optional arg) | 307 | (defun forward-word-mark (&optional arg) |
| @@ -303,13 +310,13 @@ Normally returns t. | |||
| 303 | If an edge of the buffer is reached, point is left there | 310 | If an edge of the buffer is reached, point is left there |
| 304 | and nil is returned." | 311 | and nil is returned." |
| 305 | (interactive "p") | 312 | (interactive "p") |
| 306 | (ensure-mark) | 313 | (pc-select-ensure-mark) |
| 307 | (forward-word arg)) | 314 | (forward-word arg)) |
| 308 | 315 | ||
| 309 | (defun forward-line-mark (&optional arg) | 316 | (defun forward-line-mark (&optional arg) |
| 310 | "Ensure mark is active; move cursor vertically down ARG lines." | 317 | "Ensure mark is active; move cursor vertically down ARG lines." |
| 311 | (interactive "p") | 318 | (interactive "p") |
| 312 | (ensure-mark) | 319 | (pc-select-ensure-mark) |
| 313 | (forward-line arg) | 320 | (forward-line arg) |
| 314 | (setq this-command 'forward-line) | 321 | (setq this-command 'forward-line) |
| 315 | ) | 322 | ) |
| @@ -319,7 +326,7 @@ and nil is returned." | |||
| 319 | With argument, do it that many times. Negative arg -N means | 326 | With argument, do it that many times. Negative arg -N means |
| 320 | move backward across N balanced expressions." | 327 | move backward across N balanced expressions." |
| 321 | (interactive "p") | 328 | (interactive "p") |
| 322 | (ensure-mark) | 329 | (pc-select-ensure-mark) |
| 323 | (forward-sexp arg)) | 330 | (forward-sexp arg)) |
| 324 | 331 | ||
| 325 | (defun forward-paragraph-mark (&optional arg) | 332 | (defun forward-paragraph-mark (&optional arg) |
| @@ -331,7 +338,7 @@ A line which `paragraph-start' matches either separates paragraphs | |||
| 331 | A paragraph end is the beginning of a line which is not part of the paragraph | 338 | A paragraph end is the beginning of a line which is not part of the paragraph |
| 332 | to which the end of the previous line belongs, or the end of the buffer." | 339 | to which the end of the previous line belongs, or the end of the buffer." |
| 333 | (interactive "p") | 340 | (interactive "p") |
| 334 | (ensure-mark) | 341 | (pc-select-ensure-mark) |
| 335 | (forward-paragraph arg)) | 342 | (forward-paragraph arg)) |
| 336 | 343 | ||
| 337 | (defun next-line-mark (&optional arg) | 344 | (defun next-line-mark (&optional arg) |
| @@ -350,7 +357,7 @@ a semipermanent goal column to which this command always moves. | |||
| 350 | Then it does not try to move vertically. This goal column is stored | 357 | Then it does not try to move vertically. This goal column is stored |
| 351 | in `goal-column', which is nil when there is none." | 358 | in `goal-column', which is nil when there is none." |
| 352 | (interactive "p") | 359 | (interactive "p") |
| 353 | (ensure-mark) | 360 | (pc-select-ensure-mark) |
| 354 | (with-no-warnings (next-line arg)) | 361 | (with-no-warnings (next-line arg)) |
| 355 | (setq this-command 'next-line)) | 362 | (setq this-command 'next-line)) |
| 356 | 363 | ||
| @@ -359,14 +366,14 @@ in `goal-column', which is nil when there is none." | |||
| 359 | With argument ARG not nil or 1, move forward ARG - 1 lines first. | 366 | With argument ARG not nil or 1, move forward ARG - 1 lines first. |
| 360 | If scan reaches end of buffer, stop there without error." | 367 | If scan reaches end of buffer, stop there without error." |
| 361 | (interactive "p") | 368 | (interactive "p") |
| 362 | (ensure-mark) | 369 | (pc-select-ensure-mark) |
| 363 | (end-of-line arg) | 370 | (end-of-line arg) |
| 364 | (setq this-command 'end-of-line)) | 371 | (setq this-command 'end-of-line)) |
| 365 | 372 | ||
| 366 | (defun backward-line-mark (&optional arg) | 373 | (defun backward-line-mark (&optional arg) |
| 367 | "Ensure mark is active; move cursor vertically up ARG lines." | 374 | "Ensure mark is active; move cursor vertically up ARG lines." |
| 368 | (interactive "p") | 375 | (interactive "p") |
| 369 | (ensure-mark) | 376 | (pc-select-ensure-mark) |
| 370 | (if (null arg) | 377 | (if (null arg) |
| 371 | (setq arg 1)) | 378 | (setq arg 1)) |
| 372 | (forward-line (- arg)) | 379 | (forward-line (- arg)) |
| @@ -379,7 +386,7 @@ A near full screen is `next-screen-context-lines' less than a full screen. | |||
| 379 | Negative ARG means scroll upward. | 386 | Negative ARG means scroll upward. |
| 380 | When calling from a program, supply a number as argument or nil." | 387 | When calling from a program, supply a number as argument or nil." |
| 381 | (interactive "P") | 388 | (interactive "P") |
| 382 | (ensure-mark) | 389 | (pc-select-ensure-mark) |
| 383 | (cond (pc-select-override-scroll-error | 390 | (cond (pc-select-override-scroll-error |
| 384 | (condition-case nil (scroll-down arg) | 391 | (condition-case nil (scroll-down arg) |
| 385 | (beginning-of-buffer (goto-char (point-min))))) | 392 | (beginning-of-buffer (goto-char (point-min))))) |
| @@ -395,7 +402,7 @@ of the accessible part of the buffer. | |||
| 395 | Don't use this command in Lisp programs! | 402 | Don't use this command in Lisp programs! |
| 396 | \(goto-char \(point-max)) is faster and avoids clobbering the mark." | 403 | \(goto-char \(point-max)) is faster and avoids clobbering the mark." |
| 397 | (interactive "P") | 404 | (interactive "P") |
| 398 | (ensure-mark) | 405 | (pc-select-ensure-mark) |
| 399 | (let ((size (- (point-max) (point-min)))) | 406 | (let ((size (- (point-max) (point-min)))) |
| 400 | (goto-char (if arg | 407 | (goto-char (if arg |
| 401 | (- (point-max) | 408 | (- (point-max) |
| @@ -427,7 +434,7 @@ Don't use this command in Lisp programs! | |||
| 427 | "Deactivate mark; move point right ARG characters \(left if ARG negative). | 434 | "Deactivate mark; move point right ARG characters \(left if ARG negative). |
| 428 | On reaching end of buffer, stop and signal error." | 435 | On reaching end of buffer, stop and signal error." |
| 429 | (interactive "p") | 436 | (interactive "p") |
| 430 | (setq mark-active nil) | 437 | (pc-select-maybe-deactivate-mark) |
| 431 | (forward-char arg)) | 438 | (forward-char arg)) |
| 432 | 439 | ||
| 433 | (defun forward-word-nomark (&optional arg) | 440 | (defun forward-word-nomark (&optional arg) |
| @@ -436,13 +443,13 @@ Normally returns t. | |||
| 436 | If an edge of the buffer is reached, point is left there | 443 | If an edge of the buffer is reached, point is left there |
| 437 | and nil is returned." | 444 | and nil is returned." |
| 438 | (interactive "p") | 445 | (interactive "p") |
| 439 | (setq mark-active nil) | 446 | (pc-select-maybe-deactivate-mark) |
| 440 | (forward-word arg)) | 447 | (forward-word arg)) |
| 441 | 448 | ||
| 442 | (defun forward-line-nomark (&optional arg) | 449 | (defun forward-line-nomark (&optional arg) |
| 443 | "Deactivate mark; move cursor vertically down ARG lines." | 450 | "Deactivate mark; move cursor vertically down ARG lines." |
| 444 | (interactive "p") | 451 | (interactive "p") |
| 445 | (setq mark-active nil) | 452 | (pc-select-maybe-deactivate-mark) |
| 446 | (forward-line arg) | 453 | (forward-line arg) |
| 447 | (setq this-command 'forward-line) | 454 | (setq this-command 'forward-line) |
| 448 | ) | 455 | ) |
| @@ -452,7 +459,7 @@ and nil is returned." | |||
| 452 | With argument, do it that many times. Negative arg -N means | 459 | With argument, do it that many times. Negative arg -N means |
| 453 | move backward across N balanced expressions." | 460 | move backward across N balanced expressions." |
| 454 | (interactive "p") | 461 | (interactive "p") |
| 455 | (setq mark-active nil) | 462 | (pc-select-maybe-deactivate-mark) |
| 456 | (forward-sexp arg)) | 463 | (forward-sexp arg)) |
| 457 | 464 | ||
| 458 | (defun forward-paragraph-nomark (&optional arg) | 465 | (defun forward-paragraph-nomark (&optional arg) |
| @@ -464,7 +471,7 @@ A line which `paragraph-start' matches either separates paragraphs | |||
| 464 | A paragraph end is the beginning of a line which is not part of the paragraph | 471 | A paragraph end is the beginning of a line which is not part of the paragraph |
| 465 | to which the end of the previous line belongs, or the end of the buffer." | 472 | to which the end of the previous line belongs, or the end of the buffer." |
| 466 | (interactive "p") | 473 | (interactive "p") |
| 467 | (setq mark-active nil) | 474 | (pc-select-maybe-deactivate-mark) |
| 468 | (forward-paragraph arg)) | 475 | (forward-paragraph arg)) |
| 469 | 476 | ||
| 470 | (defun next-line-nomark (&optional arg) | 477 | (defun next-line-nomark (&optional arg) |
| @@ -483,7 +490,7 @@ a semipermanent goal column to which this command always moves. | |||
| 483 | Then it does not try to move vertically. This goal column is stored | 490 | Then it does not try to move vertically. This goal column is stored |
| 484 | in `goal-column', which is nil when there is none." | 491 | in `goal-column', which is nil when there is none." |
| 485 | (interactive "p") | 492 | (interactive "p") |
| 486 | (setq mark-active nil) | 493 | (pc-select-maybe-deactivate-mark) |
| 487 | (with-no-warnings (next-line arg)) | 494 | (with-no-warnings (next-line arg)) |
| 488 | (setq this-command 'next-line)) | 495 | (setq this-command 'next-line)) |
| 489 | 496 | ||
| @@ -492,14 +499,14 @@ in `goal-column', which is nil when there is none." | |||
| 492 | With argument ARG not nil or 1, move forward ARG - 1 lines first. | 499 | With argument ARG not nil or 1, move forward ARG - 1 lines first. |
| 493 | If scan reaches end of buffer, stop there without error." | 500 | If scan reaches end of buffer, stop there without error." |
| 494 | (interactive "p") | 501 | (interactive "p") |
| 495 | (setq mark-active nil) | 502 | (pc-select-maybe-deactivate-mark) |
| 496 | (end-of-line arg) | 503 | (end-of-line arg) |
| 497 | (setq this-command 'end-of-line)) | 504 | (setq this-command 'end-of-line)) |
| 498 | 505 | ||
| 499 | (defun backward-line-nomark (&optional arg) | 506 | (defun backward-line-nomark (&optional arg) |
| 500 | "Deactivate mark; move cursor vertically up ARG lines." | 507 | "Deactivate mark; move cursor vertically up ARG lines." |
| 501 | (interactive "p") | 508 | (interactive "p") |
| 502 | (setq mark-active nil) | 509 | (pc-select-maybe-deactivate-mark) |
| 503 | (if (null arg) | 510 | (if (null arg) |
| 504 | (setq arg 1)) | 511 | (setq arg 1)) |
| 505 | (forward-line (- arg)) | 512 | (forward-line (- arg)) |
| @@ -512,7 +519,7 @@ A near full screen is `next-screen-context-lines' less than a full screen. | |||
| 512 | Negative ARG means scroll upward. | 519 | Negative ARG means scroll upward. |
| 513 | When calling from a program, supply a number as argument or nil." | 520 | When calling from a program, supply a number as argument or nil." |
| 514 | (interactive "P") | 521 | (interactive "P") |
| 515 | (setq mark-active nil) | 522 | (pc-select-maybe-deactivate-mark) |
| 516 | (cond (pc-select-override-scroll-error | 523 | (cond (pc-select-override-scroll-error |
| 517 | (condition-case nil (scroll-down arg) | 524 | (condition-case nil (scroll-down arg) |
| 518 | (beginning-of-buffer (goto-char (point-min))))) | 525 | (beginning-of-buffer (goto-char (point-min))))) |
| @@ -528,7 +535,7 @@ of the accessible part of the buffer. | |||
| 528 | Don't use this command in Lisp programs! | 535 | Don't use this command in Lisp programs! |
| 529 | \(goto-char (point-max)) is faster and avoids clobbering the mark." | 536 | \(goto-char (point-max)) is faster and avoids clobbering the mark." |
| 530 | (interactive "P") | 537 | (interactive "P") |
| 531 | (setq mark-active nil) | 538 | (pc-select-maybe-deactivate-mark) |
| 532 | (let ((size (- (point-max) (point-min)))) | 539 | (let ((size (- (point-max) (point-min)))) |
| 533 | (goto-char (if arg | 540 | (goto-char (if arg |
| 534 | (- (point-max) | 541 | (- (point-max) |
| @@ -561,14 +568,14 @@ Don't use this command in Lisp programs! | |||
| 561 | "Ensure mark is active; move point left ARG characters (right if ARG negative). | 568 | "Ensure mark is active; move point left ARG characters (right if ARG negative). |
| 562 | On attempt to pass beginning or end of buffer, stop and signal error." | 569 | On attempt to pass beginning or end of buffer, stop and signal error." |
| 563 | (interactive "p") | 570 | (interactive "p") |
| 564 | (ensure-mark) | 571 | (pc-select-ensure-mark) |
| 565 | (backward-char arg)) | 572 | (backward-char arg)) |
| 566 | 573 | ||
| 567 | (defun backward-word-mark (&optional arg) | 574 | (defun backward-word-mark (&optional arg) |
| 568 | "Ensure mark is active; move backward until encountering the end of a word. | 575 | "Ensure mark is active; move backward until encountering the end of a word. |
| 569 | With argument, do this that many times." | 576 | With argument, do this that many times." |
| 570 | (interactive "p") | 577 | (interactive "p") |
| 571 | (ensure-mark) | 578 | (pc-select-ensure-mark) |
| 572 | (backward-word arg)) | 579 | (backward-word arg)) |
| 573 | 580 | ||
| 574 | (defun backward-sexp-mark (&optional arg) | 581 | (defun backward-sexp-mark (&optional arg) |
| @@ -576,7 +583,7 @@ With argument, do this that many times." | |||
| 576 | With argument, do it that many times. Negative arg -N means | 583 | With argument, do it that many times. Negative arg -N means |
| 577 | move forward across N balanced expressions." | 584 | move forward across N balanced expressions." |
| 578 | (interactive "p") | 585 | (interactive "p") |
| 579 | (ensure-mark) | 586 | (pc-select-ensure-mark) |
| 580 | (backward-sexp arg)) | 587 | (backward-sexp arg)) |
| 581 | 588 | ||
| 582 | (defun backward-paragraph-mark (&optional arg) | 589 | (defun backward-paragraph-mark (&optional arg) |
| @@ -591,7 +598,7 @@ blank line. | |||
| 591 | 598 | ||
| 592 | See `forward-paragraph' for more information." | 599 | See `forward-paragraph' for more information." |
| 593 | (interactive "p") | 600 | (interactive "p") |
| 594 | (ensure-mark) | 601 | (pc-select-ensure-mark) |
| 595 | (backward-paragraph arg)) | 602 | (backward-paragraph arg)) |
| 596 | 603 | ||
| 597 | (defun previous-line-mark (&optional arg) | 604 | (defun previous-line-mark (&optional arg) |
| @@ -608,7 +615,7 @@ If you are thinking of using this in a Lisp program, consider using | |||
| 608 | `forward-line' with a negative argument instead. It is usually easier | 615 | `forward-line' with a negative argument instead. It is usually easier |
| 609 | to use and more reliable (no dependence on goal column, etc.)." | 616 | to use and more reliable (no dependence on goal column, etc.)." |
| 610 | (interactive "p") | 617 | (interactive "p") |
| 611 | (ensure-mark) | 618 | (pc-select-ensure-mark) |
| 612 | (with-no-warnings (previous-line arg)) | 619 | (with-no-warnings (previous-line arg)) |
| 613 | (setq this-command 'previous-line)) | 620 | (setq this-command 'previous-line)) |
| 614 | 621 | ||
| @@ -617,7 +624,7 @@ to use and more reliable (no dependence on goal column, etc.)." | |||
| 617 | With argument ARG not nil or 1, move forward ARG - 1 lines first. | 624 | With argument ARG not nil or 1, move forward ARG - 1 lines first. |
| 618 | If scan reaches end of buffer, stop there without error." | 625 | If scan reaches end of buffer, stop there without error." |
| 619 | (interactive "p") | 626 | (interactive "p") |
| 620 | (ensure-mark) | 627 | (pc-select-ensure-mark) |
| 621 | (beginning-of-line arg)) | 628 | (beginning-of-line arg)) |
| 622 | 629 | ||
| 623 | 630 | ||
| @@ -627,7 +634,7 @@ A near full screen is `next-screen-context-lines' less than a full screen. | |||
| 627 | Negative ARG means scroll downward. | 634 | Negative ARG means scroll downward. |
| 628 | When calling from a program, supply a number as argument or nil." | 635 | When calling from a program, supply a number as argument or nil." |
| 629 | (interactive "P") | 636 | (interactive "P") |
| 630 | (ensure-mark) | 637 | (pc-select-ensure-mark) |
| 631 | (cond (pc-select-override-scroll-error | 638 | (cond (pc-select-override-scroll-error |
| 632 | (condition-case nil (scroll-up arg) | 639 | (condition-case nil (scroll-up arg) |
| 633 | (end-of-buffer (goto-char (point-max))))) | 640 | (end-of-buffer (goto-char (point-max))))) |
| @@ -643,7 +650,7 @@ of the accessible part of the buffer. | |||
| 643 | Don't use this command in Lisp programs! | 650 | Don't use this command in Lisp programs! |
| 644 | \(goto-char (p\oint-min)) is faster and avoids clobbering the mark." | 651 | \(goto-char (p\oint-min)) is faster and avoids clobbering the mark." |
| 645 | (interactive "P") | 652 | (interactive "P") |
| 646 | (ensure-mark) | 653 | (pc-select-ensure-mark) |
| 647 | (let ((size (- (point-max) (point-min)))) | 654 | (let ((size (- (point-max) (point-min)))) |
| 648 | (goto-char (if arg | 655 | (goto-char (if arg |
| 649 | (+ (point-min) | 656 | (+ (point-min) |
| @@ -663,14 +670,14 @@ Don't use this command in Lisp programs! | |||
| 663 | "Deactivate mark; move point left ARG characters (right if ARG negative). | 670 | "Deactivate mark; move point left ARG characters (right if ARG negative). |
| 664 | On attempt to pass beginning or end of buffer, stop and signal error." | 671 | On attempt to pass beginning or end of buffer, stop and signal error." |
| 665 | (interactive "p") | 672 | (interactive "p") |
| 666 | (setq mark-active nil) | 673 | (pc-select-maybe-deactivate-mark) |
| 667 | (backward-char arg)) | 674 | (backward-char arg)) |
| 668 | 675 | ||
| 669 | (defun backward-word-nomark (&optional arg) | 676 | (defun backward-word-nomark (&optional arg) |
| 670 | "Deactivate mark; move backward until encountering the end of a word. | 677 | "Deactivate mark; move backward until encountering the end of a word. |
| 671 | With argument, do this that many times." | 678 | With argument, do this that many times." |
| 672 | (interactive "p") | 679 | (interactive "p") |
| 673 | (setq mark-active nil) | 680 | (pc-select-maybe-deactivate-mark) |
| 674 | (backward-word arg)) | 681 | (backward-word arg)) |
| 675 | 682 | ||
| 676 | (defun backward-sexp-nomark (&optional arg) | 683 | (defun backward-sexp-nomark (&optional arg) |
| @@ -678,7 +685,7 @@ With argument, do this that many times." | |||
| 678 | With argument, do it that many times. Negative arg -N means | 685 | With argument, do it that many times. Negative arg -N means |
| 679 | move forward across N balanced expressions." | 686 | move forward across N balanced expressions." |
| 680 | (interactive "p") | 687 | (interactive "p") |
| 681 | (setq mark-active nil) | 688 | (pc-select-maybe-deactivate-mark) |
| 682 | (backward-sexp arg)) | 689 | (backward-sexp arg)) |
| 683 | 690 | ||
| 684 | (defun backward-paragraph-nomark (&optional arg) | 691 | (defun backward-paragraph-nomark (&optional arg) |
| @@ -693,7 +700,7 @@ blank line. | |||
| 693 | 700 | ||
| 694 | See `forward-paragraph' for more information." | 701 | See `forward-paragraph' for more information." |
| 695 | (interactive "p") | 702 | (interactive "p") |
| 696 | (setq mark-active nil) | 703 | (pc-select-maybe-deactivate-mark) |
| 697 | (backward-paragraph arg)) | 704 | (backward-paragraph arg)) |
| 698 | 705 | ||
| 699 | (defun previous-line-nomark (&optional arg) | 706 | (defun previous-line-nomark (&optional arg) |
| @@ -706,7 +713,7 @@ The command \\[set-goal-column] can be used to create | |||
| 706 | a semipermanent goal column to which this command always moves. | 713 | a semipermanent goal column to which this command always moves. |
| 707 | Then it does not try to move vertically." | 714 | Then it does not try to move vertically." |
| 708 | (interactive "p") | 715 | (interactive "p") |
| 709 | (setq mark-active nil) | 716 | (pc-select-maybe-deactivate-mark) |
| 710 | (with-no-warnings (previous-line arg)) | 717 | (with-no-warnings (previous-line arg)) |
| 711 | (setq this-command 'previous-line)) | 718 | (setq this-command 'previous-line)) |
| 712 | 719 | ||
| @@ -715,7 +722,7 @@ Then it does not try to move vertically." | |||
| 715 | With argument ARG not nil or 1, move forward ARG - 1 lines first. | 722 | With argument ARG not nil or 1, move forward ARG - 1 lines first. |
| 716 | If scan reaches end of buffer, stop there without error." | 723 | If scan reaches end of buffer, stop there without error." |
| 717 | (interactive "p") | 724 | (interactive "p") |
| 718 | (setq mark-active nil) | 725 | (pc-select-maybe-deactivate-mark) |
| 719 | (beginning-of-line arg)) | 726 | (beginning-of-line arg)) |
| 720 | 727 | ||
| 721 | (defun scroll-up-nomark (&optional arg) | 728 | (defun scroll-up-nomark (&optional arg) |
| @@ -724,7 +731,7 @@ A near full screen is `next-screen-context-lines' less than a full screen. | |||
| 724 | Negative ARG means scroll downward. | 731 | Negative ARG means scroll downward. |
| 725 | When calling from a program, supply a number as argument or nil." | 732 | When calling from a program, supply a number as argument or nil." |
| 726 | (interactive "P") | 733 | (interactive "P") |
| 727 | (setq mark-active nil) | 734 | (pc-select-maybe-deactivate-mark) |
| 728 | (cond (pc-select-override-scroll-error | 735 | (cond (pc-select-override-scroll-error |
| 729 | (condition-case nil (scroll-up arg) | 736 | (condition-case nil (scroll-up arg) |
| 730 | (end-of-buffer (goto-char (point-max))))) | 737 | (end-of-buffer (goto-char (point-max))))) |
| @@ -740,7 +747,7 @@ of the accessible part of the buffer. | |||
| 740 | Don't use this command in Lisp programs! | 747 | Don't use this command in Lisp programs! |
| 741 | \(goto-char (point-min)) is faster and avoids clobbering the mark." | 748 | \(goto-char (point-min)) is faster and avoids clobbering the mark." |
| 742 | (interactive "P") | 749 | (interactive "P") |
| 743 | (setq mark-active nil) | 750 | (pc-select-maybe-deactivate-mark) |
| 744 | (let ((size (- (point-max) (point-min)))) | 751 | (let ((size (- (point-max) (point-min)))) |
| 745 | (goto-char (if arg | 752 | (goto-char (if arg |
| 746 | (+ (point-min) | 753 | (+ (point-min) |
| @@ -968,21 +975,5 @@ but before calling PC Selection mode): | |||
| 968 | (setq pc-select-key-bindings-alist nil | 975 | (setq pc-select-key-bindings-alist nil |
| 969 | pc-select-saved-settings-alist nil)))) | 976 | pc-select-saved-settings-alist nil)))) |
| 970 | 977 | ||
| 971 | 978 | ;; arch-tag: 10697b70-ae07-4f3e-ad23-7814a3f418c2 | |
| 972 | ;;;###autoload | ||
| 973 | (defcustom pc-selection-mode nil | ||
| 974 | "Toggle PC Selection mode. | ||
| 975 | Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style, | ||
| 976 | and cursor movement commands. | ||
| 977 | This mode enables Delete Selection mode and Transient Mark mode. | ||
| 978 | Setting this variable directly does not take effect; | ||
| 979 | you must modify it using \\[customize] or \\[pc-selection-mode]." | ||
| 980 | :set (lambda (symbol value) | ||
| 981 | (pc-selection-mode (if value 1 -1))) | ||
| 982 | :initialize 'custom-initialize-default | ||
| 983 | :type 'boolean | ||
| 984 | :group 'pc-select | ||
| 985 | :require 'pc-select) | ||
| 986 | |||
| 987 | ;;; arch-tag: 10697b70-ae07-4f3e-ad23-7814a3f418c2 | ||
| 988 | ;;; pc-select.el ends here | 979 | ;;; pc-select.el ends here |
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index 425ac450fae..c5ae34e0f07 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el | |||
| @@ -273,7 +273,6 @@ | |||
| 273 | 273 | ||
| 274 | ;;; Code: | 274 | ;;; Code: |
| 275 | 275 | ||
| 276 | (eval-when-compile (require 'cl)) | ||
| 277 | ;; we use picture-mode functions | 276 | ;; we use picture-mode functions |
| 278 | (require 'picture) | 277 | (require 'picture) |
| 279 | 278 | ||
| @@ -1367,6 +1366,9 @@ The search is performed in the current direction." | |||
| 1367 | ;; tpu-search-forward (t) tpu-search-reverse (t) | 1366 | ;; tpu-search-forward (t) tpu-search-reverse (t) |
| 1368 | ;; tpu-search-forward-exit (t) tpu-search-backward-exit (t) | 1367 | ;; tpu-search-forward-exit (t) tpu-search-backward-exit (t) |
| 1369 | 1368 | ||
| 1369 | (declare-function tpu-emacs-search "tpu-edt") | ||
| 1370 | (declare-function tpu-emacs-rev-search "tpu-edt") | ||
| 1371 | |||
| 1370 | (defun tpu-set-search (&optional arg) | 1372 | (defun tpu-set-search (&optional arg) |
| 1371 | "Set the search functions and set the search direction to the current | 1373 | "Set the search functions and set the search direction to the current |
| 1372 | direction. If an argument is specified, don't set the search direction." | 1374 | direction. If an argument is specified, don't set the search direction." |
| @@ -2432,7 +2434,10 @@ If FILE is nil, try to load a default file. The default file names are | |||
| 2432 | (if (eq tpu-global-map parent) | 2434 | (if (eq tpu-global-map parent) |
| 2433 | (set-keymap-parent map (keymap-parent parent)) | 2435 | (set-keymap-parent map (keymap-parent parent)) |
| 2434 | (setq map parent))))) | 2436 | (setq map parent))))) |
| 2435 | (ignore-errors (ad-disable-regexp "\\`tpu-")) | 2437 | ;; Only has an effect if the advice in tpu-extras has been activated. |
| 2438 | (condition-case nil | ||
| 2439 | (with-no-warnings (ad-disable-regexp "\\`tpu-")) | ||
| 2440 | (error nil)) | ||
| 2436 | (setq tpu-edt-mode nil)) | 2441 | (setq tpu-edt-mode nil)) |
| 2437 | 2442 | ||
| 2438 | 2443 | ||
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 81ad04b60d9..de7bcffdf0e 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el | |||
| @@ -1375,6 +1375,8 @@ The following CHAR will be the name for the command or macro." | |||
| 1375 | (setq char (read-char)) | 1375 | (setq char (read-char)) |
| 1376 | (vi-ask-for-info char)))) | 1376 | (vi-ask-for-info char)))) |
| 1377 | 1377 | ||
| 1378 | (declare-function c-mark-function "cc-cmds" ()) | ||
| 1379 | |||
| 1378 | (defun vi-mark-region (arg region) | 1380 | (defun vi-mark-region (arg region) |
| 1379 | "Mark region appropriately. The next char REGION is d(efun),s(-exp),b(uffer), | 1381 | "Mark region appropriately. The next char REGION is d(efun),s(-exp),b(uffer), |
| 1380 | p(aragraph), P(age), f(unction in C/Pascal etc.), w(ord), e(nd of sentence), | 1382 | p(aragraph), P(age), f(unction in C/Pascal etc.), w(ord), e(nd of sentence), |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 5e13edb9495..8603169819f 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (provide 'viper-cmd) | 29 | (provide 'viper-cmd) |
| 30 | (require 'advice) | ||
| 31 | 30 | ||
| 32 | ;; Compiler pacifier | 31 | ;; Compiler pacifier |
| 33 | (defvar viper-minibuffer-current-face) | 32 | (defvar viper-minibuffer-current-face) |
| @@ -48,23 +47,6 @@ | |||
| 48 | (defvar initial) | 47 | (defvar initial) |
| 49 | (defvar undo-beg-posn) | 48 | (defvar undo-beg-posn) |
| 50 | (defvar undo-end-posn) | 49 | (defvar undo-end-posn) |
| 51 | |||
| 52 | ;; loading happens only in non-interactive compilation | ||
| 53 | ;; in order to spare non-viperized emacs from being viperized | ||
| 54 | (if noninteractive | ||
| 55 | (eval-when-compile | ||
| 56 | (let ((load-path (cons (expand-file-name ".") load-path))) | ||
| 57 | (or (featurep 'viper-util) | ||
| 58 | (load "viper-util.el" nil nil 'nosuffix)) | ||
| 59 | (or (featurep 'viper-keym) | ||
| 60 | (load "viper-keym.el" nil nil 'nosuffix)) | ||
| 61 | (or (featurep 'viper-mous) | ||
| 62 | (load "viper-mous.el" nil nil 'nosuffix)) | ||
| 63 | (or (featurep 'viper-macs) | ||
| 64 | (load "viper-macs.el" nil nil 'nosuffix)) | ||
| 65 | (or (featurep 'viper-ex) | ||
| 66 | (load "viper-ex.el" nil nil 'nosuffix)) | ||
| 67 | ))) | ||
| 68 | ;; end pacifier | 50 | ;; end pacifier |
| 69 | 51 | ||
| 70 | 52 | ||
| @@ -3097,6 +3079,9 @@ On reaching beginning of line, stop and signal error." | |||
| 3097 | (setq this-command 'next-line) | 3079 | (setq this-command 'next-line) |
| 3098 | (if com (viper-execute-com 'viper-next-line val com)))) | 3080 | (if com (viper-execute-com 'viper-next-line val com)))) |
| 3099 | 3081 | ||
| 3082 | (declare-function widget-type "wid-edit" (widget)) | ||
| 3083 | (declare-function widget-button-press "wid-edit" (pos &optional event)) | ||
| 3084 | (declare-function viper-set-hooks "viper" ()) | ||
| 3100 | 3085 | ||
| 3101 | (defun viper-next-line-at-bol (arg) | 3086 | (defun viper-next-line-at-bol (arg) |
| 3102 | "Next line at beginning of line. | 3087 | "Next line at beginning of line. |
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index caeecd12c8a..ccc06e0b938 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el | |||
| @@ -47,12 +47,8 @@ | |||
| 47 | (if noninteractive | 47 | (if noninteractive |
| 48 | (eval-when-compile | 48 | (eval-when-compile |
| 49 | (let ((load-path (cons (expand-file-name ".") load-path))) | 49 | (let ((load-path (cons (expand-file-name ".") load-path))) |
| 50 | (or (featurep 'viper-util) | ||
| 51 | (load "viper-util.el" nil nil 'nosuffix)) | ||
| 52 | (or (featurep 'viper-keym) | ||
| 53 | (load "viper-keym.el" nil nil 'nosuffix)) | ||
| 54 | (or (featurep 'viper-cmd) | 50 | (or (featurep 'viper-cmd) |
| 55 | (load "viper-cmd.el" nil nil 'nosuffix)) | 51 | (load "viper-cmd.el" nil t 'nosuffix)) |
| 56 | ))) | 52 | ))) |
| 57 | ;; end pacifier | 53 | ;; end pacifier |
| 58 | 54 | ||
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 1b1e07a0a0c..539a561bb5b 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -26,8 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (provide 'viper-init) | ||
| 30 | |||
| 31 | ;; compiler pacifier | 29 | ;; compiler pacifier |
| 32 | (defvar mark-even-if-inactive) | 30 | (defvar mark-even-if-inactive) |
| 33 | (defvar quail-mode) | 31 | (defvar quail-mode) |
| @@ -429,15 +427,11 @@ delete the text being replaced, as in standard Vi." | |||
| 429 | "*Cursor color when Viper is in Replace state." | 427 | "*Cursor color when Viper is in Replace state." |
| 430 | :type 'string | 428 | :type 'string |
| 431 | :group 'viper) | 429 | :group 'viper) |
| 432 | (if (fboundp 'make-variable-frame-local) | ||
| 433 | (make-variable-frame-local 'viper-replace-overlay-cursor-color)) | ||
| 434 | 430 | ||
| 435 | (defcustom viper-insert-state-cursor-color "Green" | 431 | (defcustom viper-insert-state-cursor-color "Green" |
| 436 | "Cursor color when Viper is in insert state." | 432 | "Cursor color when Viper is in insert state." |
| 437 | :type 'string | 433 | :type 'string |
| 438 | :group 'viper) | 434 | :group 'viper) |
| 439 | (if (fboundp 'make-variable-frame-local) | ||
| 440 | (make-variable-frame-local 'viper-insert-state-cursor-color)) | ||
| 441 | 435 | ||
| 442 | ;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be | 436 | ;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be |
| 443 | ;; confused in some cases. So, this var is nulled for now. | 437 | ;; confused in some cases. So, this var is nulled for now. |
| @@ -446,13 +440,17 @@ delete the text being replaced, as in standard Vi." | |||
| 446 | "Cursor color when Viper is in Emacs state." | 440 | "Cursor color when Viper is in Emacs state." |
| 447 | :type 'string | 441 | :type 'string |
| 448 | :group 'viper) | 442 | :group 'viper) |
| 449 | (if (fboundp 'make-variable-frame-local) | ||
| 450 | (make-variable-frame-local 'viper-emacs-state-cursor-color)) | ||
| 451 | 443 | ||
| 452 | ;; internal var, used to remember the default cursor color of emacs frames | 444 | ;; internal var, used to remember the default cursor color of emacs frames |
| 453 | (defvar viper-vi-state-cursor-color nil) | 445 | (defvar viper-vi-state-cursor-color nil) |
| 446 | |||
| 454 | (if (fboundp 'make-variable-frame-local) | 447 | (if (fboundp 'make-variable-frame-local) |
| 455 | (make-variable-frame-local 'viper-vi-state-cursor-color)) | 448 | (mapc 'make-variable-frame-local |
| 449 | '(viper-replace-overlay-cursor-color | ||
| 450 | viper-insert-state-cursor-color | ||
| 451 | viper-emacs-state-cursor-color | ||
| 452 | viper-vi-state-cursor-color))) | ||
| 453 | |||
| 456 | 454 | ||
| 457 | (viper-deflocalvar viper-replace-overlay nil "") | 455 | (viper-deflocalvar viper-replace-overlay nil "") |
| 458 | (put 'viper-replace-overlay 'permanent-local t) | 456 | (put 'viper-replace-overlay 'permanent-local t) |
| @@ -1025,6 +1023,9 @@ Should be set in `~/.viper' file." | |||
| 1025 | (setq cursor-type '(bar . 2)))) | 1023 | (setq cursor-type '(bar . 2)))) |
| 1026 | 1024 | ||
| 1027 | 1025 | ||
| 1026 | (provide 'viper-init) | ||
| 1027 | |||
| 1028 | |||
| 1028 | ;; Local Variables: | 1029 | ;; Local Variables: |
| 1029 | ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) | 1030 | ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) |
| 1030 | ;; End: | 1031 | ;; End: |
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 0e502720f5e..85a94075720 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el | |||
| @@ -26,8 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (provide 'viper-keym) | ||
| 30 | |||
| 31 | ;; compiler pacifier | 29 | ;; compiler pacifier |
| 32 | (defvar viper-always) | 30 | (defvar viper-always) |
| 33 | (defvar viper-current-state) | 31 | (defvar viper-current-state) |
| @@ -35,19 +33,13 @@ | |||
| 35 | (defvar viper-expert-level) | 33 | (defvar viper-expert-level) |
| 36 | (defvar viper-ex-style-editing) | 34 | (defvar viper-ex-style-editing) |
| 37 | (defvar viper-ex-style-motion) | 35 | (defvar viper-ex-style-motion) |
| 38 | |||
| 39 | ;; loading happens only in non-interactive compilation | ||
| 40 | ;; in order to spare non-viperized emacs from being viperized | ||
| 41 | (if noninteractive | ||
| 42 | (eval-when-compile | ||
| 43 | (let ((load-path (cons (expand-file-name ".") load-path))) | ||
| 44 | (or (featurep 'viper-util) | ||
| 45 | (load "viper-util.el" nil nil 'nosuffix)) | ||
| 46 | ))) | ||
| 47 | ;; end pacifier | 36 | ;; end pacifier |
| 48 | 37 | ||
| 49 | (require 'viper-util) | 38 | (require 'viper-util) |
| 50 | 39 | ||
| 40 | (declare-function viper-ex "viper-ex" (arg &optional string)) | ||
| 41 | (declare-function viper-normalize-minor-mode-map-alist "viper-cmd" ()) | ||
| 42 | (declare-function viper-set-mode-vars-for "viper-cmd" (state)) | ||
| 51 | 43 | ||
| 52 | ;;; Variables | 44 | ;;; Variables |
| 53 | 45 | ||
| @@ -702,6 +694,9 @@ form ((key . function) (key . function) ... )." | |||
| 702 | alist)) | 694 | alist)) |
| 703 | 695 | ||
| 704 | 696 | ||
| 697 | (provide 'viper-keym) | ||
| 698 | |||
| 699 | |||
| 705 | ;;; Local Variables: | 700 | ;;; Local Variables: |
| 706 | ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) | 701 | ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) |
| 707 | ;;; End: | 702 | ;;; End: |
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index 788feaf86e6..6eb7687c4e6 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el | |||
| @@ -39,14 +39,8 @@ | |||
| 39 | (if noninteractive | 39 | (if noninteractive |
| 40 | (eval-when-compile | 40 | (eval-when-compile |
| 41 | (let ((load-path (cons (expand-file-name ".") load-path))) | 41 | (let ((load-path (cons (expand-file-name ".") load-path))) |
| 42 | (or (featurep 'viper-util) | ||
| 43 | (load "viper-util.el" nil nil 'nosuffix)) | ||
| 44 | (or (featurep 'viper-keym) | ||
| 45 | (load "viper-keym.el" nil nil 'nosuffix)) | ||
| 46 | (or (featurep 'viper-mous) | ||
| 47 | (load "viper-mous.el" nil nil 'nosuffix)) | ||
| 48 | (or (featurep 'viper-cmd) | 42 | (or (featurep 'viper-cmd) |
| 49 | (load "viper-cmd.el" nil nil 'nosuffix)) | 43 | (load "viper-cmd.el" nil t 'nosuffix)) |
| 50 | ))) | 44 | ))) |
| 51 | ;; end pacifier | 45 | ;; end pacifier |
| 52 | 46 | ||
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 7a47d321890..dd727cd5f84 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el | |||
| @@ -42,10 +42,8 @@ | |||
| 42 | (if noninteractive | 42 | (if noninteractive |
| 43 | (eval-when-compile | 43 | (eval-when-compile |
| 44 | (let ((load-path (cons (expand-file-name ".") load-path))) | 44 | (let ((load-path (cons (expand-file-name ".") load-path))) |
| 45 | (or (featurep 'viper-util) | ||
| 46 | (load "viper-util.el" nil nil 'nosuffix)) | ||
| 47 | (or (featurep 'viper-cmd) | 45 | (or (featurep 'viper-cmd) |
| 48 | (load "viper-cmd.el" nil nil 'nosuffix)) | 46 | (load "viper-cmd.el" nil t 'nosuffix)) |
| 49 | ))) | 47 | ))) |
| 50 | ;; end pacifier | 48 | ;; end pacifier |
| 51 | 49 | ||
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index c757eb63aef..87bf5235b81 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -44,12 +44,6 @@ | |||
| 44 | 44 | ||
| 45 | (require 'ring) | 45 | (require 'ring) |
| 46 | 46 | ||
| 47 | (if noninteractive | ||
| 48 | (eval-when-compile | ||
| 49 | (let ((load-path (cons (expand-file-name ".") load-path))) | ||
| 50 | (or (featurep 'viper-init) | ||
| 51 | (load "viper-init.el" nil nil 'nosuffix)) | ||
| 52 | ))) | ||
| 53 | ;; end pacifier | 47 | ;; end pacifier |
| 54 | 48 | ||
| 55 | (require 'viper-init) | 49 | (require 'viper-init) |
| @@ -380,6 +374,8 @@ | |||
| 380 | 374 | ||
| 381 | 375 | ||
| 382 | 376 | ||
| 377 | (declare-function viper-forward-Word "viper-cmd" (arg)) | ||
| 378 | |||
| 383 | ;;; Support for :e, :r, :w file globbing | 379 | ;;; Support for :e, :r, :w file globbing |
| 384 | 380 | ||
| 385 | ;; Glob the file spec. | 381 | ;; Glob the file spec. |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 65d40e8bad7..bb3e4eb583d 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -297,28 +297,15 @@ | |||
| 297 | 297 | ||
| 298 | ;;; Code: | 298 | ;;; Code: |
| 299 | 299 | ||
| 300 | (require 'advice) | ||
| 301 | (require 'ring) | ||
| 302 | |||
| 303 | ;; compiler pacifier | 300 | ;; compiler pacifier |
| 304 | (defvar mark-even-if-inactive) | 301 | (defvar mark-even-if-inactive) |
| 305 | (defvar quail-mode) | 302 | (defvar quail-mode) |
| 306 | (defvar viper-expert-level) | 303 | (defvar viper-expert-level) |
| 307 | (defvar viper-mode-string) | 304 | (defvar viper-mode-string) |
| 308 | (defvar viper-major-mode-modifier-list) | 305 | (defvar viper-major-mode-modifier-list) |
| 309 | |||
| 310 | ;; loading happens only in non-interactive compilation | ||
| 311 | ;; in order to spare non-viperized emacs from being viperized | ||
| 312 | (if noninteractive | ||
| 313 | (eval-when-compile | ||
| 314 | (let ((load-path (cons (expand-file-name ".") load-path))) | ||
| 315 | (or (featurep 'viper-init) | ||
| 316 | (load "viper-init.el" nil nil 'nosuffix)) | ||
| 317 | (or (featurep 'viper-cmd) | ||
| 318 | (load "viper-cmd.el" nil nil 'nosuffix)) | ||
| 319 | ))) | ||
| 320 | ;; end pacifier | 306 | ;; end pacifier |
| 321 | 307 | ||
| 308 | (require 'advice) | ||
| 322 | (require 'viper-init) | 309 | (require 'viper-init) |
| 323 | (require 'viper-keym) | 310 | (require 'viper-keym) |
| 324 | 311 | ||