diff options
| author | Michael Kifer | 2005-10-06 00:09:49 +0000 |
|---|---|---|
| committer | Michael Kifer | 2005-10-06 00:09:49 +0000 |
| commit | e2de3a29450c31966bcb8336c1f52b2ad495298a (patch) | |
| tree | b0eabde48df09afaec7eb3f7ec30876c0711196b | |
| parent | 20ef86730cca82a1a2e212a665c0b119ed2d70b2 (diff) | |
| download | emacs-e2de3a29450c31966bcb8336c1f52b2ad495298a.tar.gz emacs-e2de3a29450c31966bcb8336c1f52b2ad495298a.zip | |
2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu>
* ediff-merge.el (ediff-merge-region-is-non-clash): new defsubst.
(ediff-merge-region-is-non-clash-to-skip): previouslu called
ediff-merge-region-is-non-clash.
* ediff-mult.el (ediff-append-custom-diff,ediff-meta-show-patch): use
insert-buffer-substring.
* ediff-ptch.el (ediff-fixup-patch-map): use better heuristics for
selecting files to patch. Also bug fixes.
* ediff-util.el (ediff-setup): bug fix.
(ediff-next-difference): Never skip clashes that differ in white space
only.
* ediff-wind.el (ediff-setup-control-frame,ediff-destroy-control-frame):
check the menubar feature.
* viper-cmd.el (viper-normalize-minor-mode-map-alist,
viper-refresh-mode-line): use make-local-variable to localize some vars
instead of make-variable-buffer-local. Suggested by Stefan Monnier.
* viper-init.el (viper-make-variable-buffer-local): delete alias.
(viper-restore-cursor-type,viper-set-insert-cursor-type): use
make-local-variable instead of make-variable-buffer-local. Suggested by
Stefan Monnier.
* viper.el (viper-mode): don't use viper-make-variable-buffer-local.
(viper-comint-mode-hook): use make-local-variable on
require-final-newline.
(viper-non-hook-settings): don't use make-variable-buffer-local.
| -rw-r--r-- | lisp/ChangeLog | 33 | ||||
| -rw-r--r-- | lisp/ediff-merg.el | 8 | ||||
| -rw-r--r-- | lisp/ediff-mult.el | 7 | ||||
| -rw-r--r-- | lisp/ediff-ptch.el | 21 | ||||
| -rw-r--r-- | lisp/ediff-util.el | 12 | ||||
| -rw-r--r-- | lisp/ediff-wind.el | 5 | ||||
| -rw-r--r-- | lisp/ediff.el | 2 | ||||
| -rw-r--r-- | lisp/emulation/viper-cmd.el | 23 | ||||
| -rw-r--r-- | lisp/emulation/viper-init.el | 17 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 30 |
10 files changed, 96 insertions, 62 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e1ffe963d1..2584c184dad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -12,6 +12,39 @@ | |||
| 12 | (gdb-locals-mode): Use `gdb-local-font-lock-keywords' | 12 | (gdb-locals-mode): Use `gdb-local-font-lock-keywords' |
| 13 | (gdb-threads-font-lock-keywords): New font lock keywords definition. | 13 | (gdb-threads-font-lock-keywords): New font lock keywords definition. |
| 14 | (gdb-threads-mode): Use `gdb-threads-font-lock-keywords'. | 14 | (gdb-threads-mode): Use `gdb-threads-font-lock-keywords'. |
| 15 | |||
| 16 | 2005-10-05 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 17 | |||
| 18 | * ediff-merge.el (ediff-merge-region-is-non-clash): new defsubst. | ||
| 19 | (ediff-merge-region-is-non-clash-to-skip): previouslu called | ||
| 20 | ediff-merge-region-is-non-clash. | ||
| 21 | |||
| 22 | * ediff-mult.el (ediff-append-custom-diff,ediff-meta-show-patch): use | ||
| 23 | insert-buffer-substring. | ||
| 24 | |||
| 25 | * ediff-ptch.el (ediff-fixup-patch-map): use better heuristics for | ||
| 26 | selecting files to patch. Also bug fixes. | ||
| 27 | |||
| 28 | * ediff-util.el (ediff-setup): bug fix. | ||
| 29 | (ediff-next-difference): Never skip clashes that differ in white space | ||
| 30 | only. | ||
| 31 | |||
| 32 | * ediff-wind.el (ediff-setup-control-frame,ediff-destroy-control-frame): | ||
| 33 | check the menubar feature. | ||
| 34 | |||
| 35 | * viper-cmd.el (viper-normalize-minor-mode-map-alist, | ||
| 36 | viper-refresh-mode-line): use make-local-variable to localize some vars | ||
| 37 | instead of make-variable-buffer-local. Suggested by Stefan Monnier. | ||
| 38 | |||
| 39 | * viper-init.el (viper-make-variable-buffer-local): delete alias. | ||
| 40 | (viper-restore-cursor-type,viper-set-insert-cursor-type): use | ||
| 41 | make-local-variable instead of make-variable-buffer-local. Suggested by | ||
| 42 | Stefan Monnier. | ||
| 43 | |||
| 44 | * viper.el (viper-mode): don't use viper-make-variable-buffer-local. | ||
| 45 | (viper-comint-mode-hook): use make-local-variable on | ||
| 46 | require-final-newline. | ||
| 47 | (viper-non-hook-settings): don't use make-variable-buffer-local. | ||
| 15 | 48 | ||
| 16 | 2005-10-05 Stefan Monnier <monnier@iro.umontreal.ca> | 49 | 2005-10-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 17 | 50 | ||
diff --git a/lisp/ediff-merg.el b/lisp/ediff-merg.el index cb93dea3831..b08238467df 100644 --- a/lisp/ediff-merg.el +++ b/lisp/ediff-merg.el | |||
| @@ -103,11 +103,15 @@ Buffer B." | |||
| 103 | ) | 103 | ) |
| 104 | (make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default) | 104 | (make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default) |
| 105 | 105 | ||
| 106 | ;; check if there is no clash between the ancestor and one of the variants. | ||
| 107 | (defsubst ediff-merge-region-is-non-clash (n) | ||
| 108 | (string-match "prefer" (or (ediff-get-state-of-merge n) ""))) | ||
| 109 | |||
| 106 | ;; If ediff-show-clashes-only, check if there is no clash between the ancestor | 110 | ;; If ediff-show-clashes-only, check if there is no clash between the ancestor |
| 107 | ;; and one of the variants. | 111 | ;; and one of the variants. |
| 108 | (defsubst ediff-merge-region-is-non-clash (n) | 112 | (defsubst ediff-merge-region-is-non-clash-to-skip (n) |
| 109 | (and ediff-show-clashes-only | 113 | (and ediff-show-clashes-only |
| 110 | (string-match "prefer" (or (ediff-get-state-of-merge n) "")))) | 114 | (ediff-merge-region-is-non-clash n))) |
| 111 | 115 | ||
| 112 | ;; If ediff-skip-changed-regions, check if the merge region differs from | 116 | ;; If ediff-skip-changed-regions, check if the merge region differs from |
| 113 | ;; the current default. If a region is different from the default, it means | 117 | ;; the current default. If a region is different from the default, it means |
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index 436c1817edf..532b491adfa 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el | |||
| @@ -1624,7 +1624,7 @@ Useful commands: | |||
| 1624 | (save-excursion | 1624 | (save-excursion |
| 1625 | (set-buffer meta-diff-buff) | 1625 | (set-buffer meta-diff-buff) |
| 1626 | (goto-char (point-max)) | 1626 | (goto-char (point-max)) |
| 1627 | (insert-buffer custom-diff-buf) | 1627 | (insert-buffer-substring custom-diff-buf) |
| 1628 | (insert "\n"))) | 1628 | (insert "\n"))) |
| 1629 | ;; if ediff session is not live, run diff directly on the files | 1629 | ;; if ediff session is not live, run diff directly on the files |
| 1630 | ((memq metajob '(ediff-directories | 1630 | ((memq metajob '(ediff-directories |
| @@ -1643,7 +1643,7 @@ Useful commands: | |||
| 1643 | (save-excursion | 1643 | (save-excursion |
| 1644 | (set-buffer meta-diff-buff) | 1644 | (set-buffer meta-diff-buff) |
| 1645 | (goto-char (point-max)) | 1645 | (goto-char (point-max)) |
| 1646 | (insert-buffer tmp-buf) | 1646 | (insert-buffer-substring tmp-buf) |
| 1647 | (insert "\n"))) | 1647 | (insert "\n"))) |
| 1648 | (t | 1648 | (t |
| 1649 | (ediff-kill-buffer-carefully meta-diff-buff) | 1649 | (ediff-kill-buffer-carefully meta-diff-buff) |
| @@ -1691,7 +1691,8 @@ all marked sessions must be active." | |||
| 1691 | (ediff-get-session-objC-name info))) | 1691 | (ediff-get-session-objC-name info))) |
| 1692 | (set-buffer (get-buffer-create ediff-tmp-buffer)) | 1692 | (set-buffer (get-buffer-create ediff-tmp-buffer)) |
| 1693 | (erase-buffer) | 1693 | (erase-buffer) |
| 1694 | (insert-buffer patchbuffer) | 1694 | (insert-buffer-substring patchbuffer) |
| 1695 | (goto-char (point-min)) | ||
| 1695 | (display-buffer ediff-tmp-buffer 'not-this-window) | 1696 | (display-buffer ediff-tmp-buffer 'not-this-window) |
| 1696 | )) | 1697 | )) |
| 1697 | (error "The patch buffer wasn't found")))) | 1698 | (error "The patch buffer wasn't found")))) |
diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el index 78bad19bab8..9379b6127a9 100644 --- a/lisp/ediff-ptch.el +++ b/lisp/ediff-ptch.el | |||
| @@ -297,16 +297,23 @@ program." | |||
| 297 | ;; (file1 . file2). Get it using ediff-get-session-objA. | 297 | ;; (file1 . file2). Get it using ediff-get-session-objA. |
| 298 | (ediff-get-session-objA-name session-info)) | 298 | (ediff-get-session-objA-name session-info)) |
| 299 | ;; base-dir1 is the dir part of the 1st file in the patch | 299 | ;; base-dir1 is the dir part of the 1st file in the patch |
| 300 | (base-dir1 (file-name-directory (car proposed-file-names))) | 300 | (base-dir1 |
| 301 | (or (file-name-directory (car proposed-file-names)) | ||
| 302 | "")) | ||
| 301 | ;; directory part of the 2nd file in the patch | 303 | ;; directory part of the 2nd file in the patch |
| 302 | (base-dir2 (file-name-directory (cdr proposed-file-names))) | 304 | (base-dir2 |
| 305 | (or (file-name-directory (cdr proposed-file-names)) | ||
| 306 | "")) | ||
| 303 | ) | 307 | ) |
| 304 | ;; If both base-dir1 and base-dir2 are relative, assume that | 308 | ;; If both base-dir1 and base-dir2 are relative and exist, |
| 309 | ;; assume that | ||
| 305 | ;; these dirs lead to the actual files starting at the present | 310 | ;; these dirs lead to the actual files starting at the present |
| 306 | ;; directory. So, we don't strip these relative dirs from the | 311 | ;; directory. So, we don't strip these relative dirs from the |
| 307 | ;; file names. This is a heuristic intended to improve guessing | 312 | ;; file names. This is a heuristic intended to improve guessing |
| 308 | (unless (or (and base-dir1 (file-name-absolute-p base-dir1)) | 313 | (unless (or (file-name-absolute-p base-dir1) |
| 309 | (and base-dir2 (file-name-absolute-p base-dir2))) | 314 | (file-name-absolute-p base-dir2) |
| 315 | (not (file-exists-p base-dir1)) | ||
| 316 | (not (file-exists-p base-dir2))) | ||
| 310 | (setq base-dir1 "" | 317 | (setq base-dir1 "" |
| 311 | base-dir2 "")) | 318 | base-dir2 "")) |
| 312 | (or (string= (car proposed-file-names) "/dev/null") | 319 | (or (string= (car proposed-file-names) "/dev/null") |
| @@ -377,8 +384,8 @@ other files, enter /dev/null | |||
| 377 | (concat actual-dir (cdr proposed-file-names))))) | 384 | (concat actual-dir (cdr proposed-file-names))))) |
| 378 | )) | 385 | )) |
| 379 | ediff-patch-map) | 386 | ediff-patch-map) |
| 380 | ;; check for the shorter existing file in each pair and discard the other | 387 | ;; Check for the existing files in each pair and discard the nonexisting |
| 381 | ;; one | 388 | ;; ones. If both exist, ask the user. |
| 382 | (mapcar (lambda (session-info) | 389 | (mapcar (lambda (session-info) |
| 383 | (let* ((file1 (car (ediff-get-session-objA-name session-info))) | 390 | (let* ((file1 (car (ediff-get-session-objA-name session-info))) |
| 384 | (file2 (cdr (ediff-get-session-objA-name session-info))) | 391 | (file2 (cdr (ediff-get-session-objA-name session-info))) |
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 9ab24ce5f64..41f294c1b13 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -329,7 +329,7 @@ to invocation.") | |||
| 329 | ediff-word-mode-job (ediff-word-mode-job)) | 329 | ediff-word-mode-job (ediff-word-mode-job)) |
| 330 | 330 | ||
| 331 | ;; Don't delete variants in case of ediff-buffer-* jobs without asking. | 331 | ;; Don't delete variants in case of ediff-buffer-* jobs without asking. |
| 332 | ;; This is because u may loose work---dangerous. | 332 | ;; This is because one may loose work---dangerous. |
| 333 | (if (string-match "buffer" (symbol-name ediff-job-name)) | 333 | (if (string-match "buffer" (symbol-name ediff-job-name)) |
| 334 | (setq ediff-keep-variants t)) | 334 | (setq ediff-keep-variants t)) |
| 335 | 335 | ||
| @@ -368,6 +368,7 @@ to invocation.") | |||
| 368 | (save-excursion | 368 | (save-excursion |
| 369 | (set-buffer buffer-C) | 369 | (set-buffer buffer-C) |
| 370 | (insert-buffer-substring buf) | 370 | (insert-buffer-substring buf) |
| 371 | (goto-char (point-min)) | ||
| 371 | (funcall (ediff-with-current-buffer buf major-mode)) | 372 | (funcall (ediff-with-current-buffer buf major-mode)) |
| 372 | (widen) ; merge buffer is always widened | 373 | (widen) ; merge buffer is always widened |
| 373 | (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t) | 374 | (add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t) |
| @@ -1729,7 +1730,7 @@ With a prefix argument, go forward that many differences." | |||
| 1729 | (or (>= n ediff-number-of-differences) | 1730 | (or (>= n ediff-number-of-differences) |
| 1730 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1731 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
| 1731 | ;; this won't exec if regexp-skip is t | 1732 | ;; this won't exec if regexp-skip is t |
| 1732 | (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1733 | (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
| 1733 | skip-changed | 1734 | skip-changed |
| 1734 | (ediff-skip-merge-region-if-changed-from-default-p n)) | 1735 | (ediff-skip-merge-region-if-changed-from-default-p n)) |
| 1735 | (ediff-install-fine-diff-if-necessary n)) | 1736 | (ediff-install-fine-diff-if-necessary n)) |
| @@ -1744,6 +1745,7 @@ With a prefix argument, go forward that many differences." | |||
| 1744 | skip-changed | 1745 | skip-changed |
| 1745 | ;; skip difference regions that differ in white space | 1746 | ;; skip difference regions that differ in white space |
| 1746 | (and ediff-ignore-similar-regions | 1747 | (and ediff-ignore-similar-regions |
| 1748 | (ediff-merge-region-is-non-clash n) | ||
| 1747 | (or (eq (ediff-no-fine-diffs-p n) t) | 1749 | (or (eq (ediff-no-fine-diffs-p n) t) |
| 1748 | (and (ediff-merge-job) | 1750 | (and (ediff-merge-job) |
| 1749 | (eq (ediff-no-fine-diffs-p n) 'C))) | 1751 | (eq (ediff-no-fine-diffs-p n) 'C))) |
| @@ -1754,7 +1756,7 @@ With a prefix argument, go forward that many differences." | |||
| 1754 | (or (>= n ediff-number-of-differences) | 1756 | (or (>= n ediff-number-of-differences) |
| 1755 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1757 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
| 1756 | ;; this won't exec if regexp-skip is t | 1758 | ;; this won't exec if regexp-skip is t |
| 1757 | (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1759 | (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
| 1758 | skip-changed | 1760 | skip-changed |
| 1759 | (ediff-skip-merge-region-if-changed-from-default-p n)) | 1761 | (ediff-skip-merge-region-if-changed-from-default-p n)) |
| 1760 | (ediff-install-fine-diff-if-necessary n)) | 1762 | (ediff-install-fine-diff-if-necessary n)) |
| @@ -1778,7 +1780,7 @@ With a prefix argument, go back that many differences." | |||
| 1778 | (or (< n 0) | 1780 | (or (< n 0) |
| 1779 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1781 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
| 1780 | ;; this won't exec if regexp-skip is t | 1782 | ;; this won't exec if regexp-skip is t |
| 1781 | (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1783 | (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
| 1782 | skip-changed | 1784 | skip-changed |
| 1783 | (ediff-skip-merge-region-if-changed-from-default-p n)) | 1785 | (ediff-skip-merge-region-if-changed-from-default-p n)) |
| 1784 | (ediff-install-fine-diff-if-necessary n)) | 1786 | (ediff-install-fine-diff-if-necessary n)) |
| @@ -1802,7 +1804,7 @@ With a prefix argument, go back that many differences." | |||
| 1802 | (or (< n 0) | 1804 | (or (< n 0) |
| 1803 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) | 1805 | (setq regexp-skip (funcall ediff-skip-diff-region-function n)) |
| 1804 | ;; this won't exec if regexp-skip is t | 1806 | ;; this won't exec if regexp-skip is t |
| 1805 | (setq non-clash-skip (ediff-merge-region-is-non-clash n) | 1807 | (setq non-clash-skip (ediff-merge-region-is-non-clash-to-skip n) |
| 1806 | skip-changed | 1808 | skip-changed |
| 1807 | (ediff-skip-merge-region-if-changed-from-default-p n)) | 1809 | (ediff-skip-merge-region-if-changed-from-default-p n)) |
| 1808 | (ediff-install-fine-diff-if-necessary n)) | 1810 | (ediff-install-fine-diff-if-necessary n)) |
diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el index 26ff106088f..e15c92d4bc9 100644 --- a/lisp/ediff-wind.el +++ b/lisp/ediff-wind.el | |||
| @@ -900,7 +900,7 @@ into icons, regardless of the window manager." | |||
| 900 | 900 | ||
| 901 | (ediff-with-current-buffer ctl-buffer | 901 | (ediff-with-current-buffer ctl-buffer |
| 902 | (ediff-cond-compile-for-xemacs-or-emacs | 902 | (ediff-cond-compile-for-xemacs-or-emacs |
| 903 | (set-buffer-menubar nil) ; xemacs | 903 | (when (featurep 'menubar) (set-buffer-menubar nil)) ; xemacs |
| 904 | nil ; emacs | 904 | nil ; emacs |
| 905 | ) | 905 | ) |
| 906 | ;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse)) | 906 | ;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse)) |
| @@ -1054,7 +1054,8 @@ into icons, regardless of the window manager." | |||
| 1054 | (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame)) | 1054 | (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame)) |
| 1055 | (let ((ctl-frame ediff-control-frame)) | 1055 | (let ((ctl-frame ediff-control-frame)) |
| 1056 | (ediff-cond-compile-for-xemacs-or-emacs | 1056 | (ediff-cond-compile-for-xemacs-or-emacs |
| 1057 | (set-buffer-menubar default-menubar) ; xemacs | 1057 | (when (featurep 'menubar) |
| 1058 | (set-buffer-menubar default-menubar)) ; xemacs | ||
| 1058 | nil ; emacs | 1059 | nil ; emacs |
| 1059 | ) | 1060 | ) |
| 1060 | (setq ediff-control-frame nil) | 1061 | (setq ediff-control-frame nil) |
diff --git a/lisp/ediff.el b/lisp/ediff.el index 8d4bb4d86fe..696fc9668e6 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | ;; Keywords: comparing, merging, patching, tools, unix | 8 | ;; Keywords: comparing, merging, patching, tools, unix |
| 9 | 9 | ||
| 10 | (defconst ediff-version "2.80.1" "The current version of Ediff") | 10 | (defconst ediff-version "2.80.1" "The current version of Ediff") |
| 11 | (defconst ediff-date "September 19, 2005" "Date of last update") | 11 | (defconst ediff-date "October 5, 2005" "Date of last update") |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 398c47d4784..08ebbbcc9d0 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -494,13 +494,20 @@ | |||
| 494 | viper-empty-keymap)) | 494 | viper-empty-keymap)) |
| 495 | )) | 495 | )) |
| 496 | 496 | ||
| 497 | ;; in emacs with emulation-mode-map-alists, nothing needs to be done | 497 | ;; This var is not local in Emacs, so we make it local. It must be local |
| 498 | ;; because although the stack of minor modes can be the same for all buffers, | ||
| 499 | ;; the associated *keymaps* can be different. In Viper, | ||
| 500 | ;; viper-vi-local-user-map, viper-insert-local-user-map, and others can have | ||
| 501 | ;; different keymaps for different buffers. Also, the keymaps associated | ||
| 502 | ;; with viper-vi/insert-state-modifier-minor-mode can be different. | ||
| 503 | ;; ***This is needed only in case emulation-mode-map-alists is not defined. | ||
| 504 | ;; In emacs with emulation-mode-map-alists, nothing needs to be done | ||
| 498 | (unless | 505 | (unless |
| 499 | (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) | 506 | (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) |
| 500 | (setq minor-mode-map-alist | 507 | (set (make-local-variable 'minor-mode-map-alist) |
| 501 | (viper-append-filter-alist | 508 | (viper-append-filter-alist |
| 502 | (append viper--intercept-key-maps viper--key-maps) | 509 | (append viper--intercept-key-maps viper--key-maps) |
| 503 | minor-mode-map-alist))) | 510 | minor-mode-map-alist))) |
| 504 | ) | 511 | ) |
| 505 | 512 | ||
| 506 | 513 | ||
| @@ -509,7 +516,7 @@ | |||
| 509 | 516 | ||
| 510 | ;; Modifies mode-line-buffer-identification. | 517 | ;; Modifies mode-line-buffer-identification. |
| 511 | (defun viper-refresh-mode-line () | 518 | (defun viper-refresh-mode-line () |
| 512 | (setq viper-mode-string | 519 | (set (make-local-variable 'viper-mode-string) |
| 513 | (cond ((eq viper-current-state 'emacs-state) viper-emacs-state-id) | 520 | (cond ((eq viper-current-state 'emacs-state) viper-emacs-state-id) |
| 514 | ((eq viper-current-state 'vi-state) viper-vi-state-id) | 521 | ((eq viper-current-state 'vi-state) viper-vi-state-id) |
| 515 | ((eq viper-current-state 'replace-state) viper-replace-state-id) | 522 | ((eq viper-current-state 'replace-state) viper-replace-state-id) |
| @@ -4781,7 +4788,7 @@ sensitive for VI-style look-and-feel." | |||
| 4781 | level-changed t) | 4788 | level-changed t) |
| 4782 | (insert " | 4789 | (insert " |
| 4783 | Please specify your level of familiarity with the venomous VI PERil | 4790 | Please specify your level of familiarity with the venomous VI PERil |
| 4784 | (and the VI Plan for Emacs Rescue). | 4791 | \(and the VI Plan for Emacs Rescue). |
| 4785 | You can change it at any time by typing `M-x viper-set-expert-level RET' | 4792 | You can change it at any time by typing `M-x viper-set-expert-level RET' |
| 4786 | 4793 | ||
| 4787 | 1 -- BEGINNER: Almost all Emacs features are suppressed. | 4794 | 1 -- BEGINNER: Almost all Emacs features are suppressed. |
| @@ -5000,5 +5007,5 @@ Mail anyway (y or n)? ") | |||
| 5000 | 5007 | ||
| 5001 | 5008 | ||
| 5002 | 5009 | ||
| 5003 | ;;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2 | 5010 | ;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2 |
| 5004 | ;;; viper-cmd.el ends here | 5011 | ;;; viper-cmd.el ends here |
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 8aa7e4649d4..33713e8a869 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -115,11 +115,6 @@ In all likelihood, you don't need to bother with this setting." | |||
| 115 | 115 | ||
| 116 | ;;; Macros | 116 | ;;; Macros |
| 117 | 117 | ||
| 118 | ;; Fool the compiler to avoid warnings. | ||
| 119 | ;; Viper calls make-variable-buffer-local from within other functions, which | ||
| 120 | ;; triggers compiler warnings. | ||
| 121 | (defalias 'viper-make-variable-buffer-local 'make-variable-buffer-local) | ||
| 122 | |||
| 123 | (defmacro viper-deflocalvar (var default-value &optional documentation) | 118 | (defmacro viper-deflocalvar (var default-value &optional documentation) |
| 124 | `(progn | 119 | `(progn |
| 125 | (defvar ,var ,default-value | 120 | (defvar ,var ,default-value |
| @@ -1019,19 +1014,19 @@ Should be set in `~/.viper' file." | |||
| 1019 | (defun viper-restore-cursor-type () | 1014 | (defun viper-restore-cursor-type () |
| 1020 | (condition-case nil | 1015 | (condition-case nil |
| 1021 | (if viper-xemacs-p | 1016 | (if viper-xemacs-p |
| 1022 | (setq bar-cursor nil) | 1017 | (set (make-local-variable 'bar-cursor) nil) |
| 1023 | (setq cursor-type default-cursor-type)) | 1018 | (setq cursor-type default-cursor-type)) |
| 1024 | (error nil))) | 1019 | (error nil))) |
| 1025 | 1020 | ||
| 1026 | (defun viper-set-insert-cursor-type () | 1021 | (defun viper-set-insert-cursor-type () |
| 1027 | (if viper-xemacs-p | 1022 | (if viper-xemacs-p |
| 1028 | (setq bar-cursor 2) | 1023 | (set (make-local-variable 'bar-cursor) 2) |
| 1029 | (setq cursor-type '(bar . 2)))) | 1024 | (setq cursor-type '(bar . 2)))) |
| 1030 | 1025 | ||
| 1031 | 1026 | ||
| 1032 | ;;; Local Variables: | 1027 | ;; Local Variables: |
| 1033 | ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) | 1028 | ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) |
| 1034 | ;;; End: | 1029 | ;; End: |
| 1035 | 1030 | ||
| 1036 | ;;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250 | 1031 | ;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250 |
| 1037 | ;;; viper-init.el ends here | 1032 | ;;; viper-init.el ends here |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index b3fd6d139c0..a361469382e 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.11.5 of September 19, 2005" | 12 | (defconst viper-version "3.11.5 of October 5, 2005" |
| 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. |
| @@ -605,8 +605,6 @@ This startup message appears whenever you load Viper, unless you type `y' now." | |||
| 605 | )) | 605 | )) |
| 606 | (viper-set-expert-level 'dont-change-unless))) | 606 | (viper-set-expert-level 'dont-change-unless))) |
| 607 | 607 | ||
| 608 | (if viper-xemacs-p | ||
| 609 | (viper-make-variable-buffer-local 'bar-cursor)) | ||
| 610 | (if (eq major-mode 'viper-mode) | 608 | (if (eq major-mode 'viper-mode) |
| 611 | (setq major-mode 'fundamental-mode)) | 609 | (setq major-mode 'fundamental-mode)) |
| 612 | 610 | ||
| @@ -627,8 +625,8 @@ This startup message appears whenever you load Viper, unless you type `y' now." | |||
| 627 | 625 | ||
| 628 | ;; This hook designed to enable Vi-style editing in comint-based modes." | 626 | ;; This hook designed to enable Vi-style editing in comint-based modes." |
| 629 | (defun viper-comint-mode-hook () | 627 | (defun viper-comint-mode-hook () |
| 630 | (setq require-final-newline nil | 628 | (set (make-local-variable 'require-final-newline) nil) |
| 631 | viper-ex-style-editing nil | 629 | (setq viper-ex-style-editing nil |
| 632 | viper-ex-style-motion nil) | 630 | viper-ex-style-motion nil) |
| 633 | (viper-change-state-to-insert)) | 631 | (viper-change-state-to-insert)) |
| 634 | 632 | ||
| @@ -1000,17 +998,6 @@ It also can't undo some Viper settings." | |||
| 1000 | ;; these are primarily advices and Vi-ish variable settings | 998 | ;; these are primarily advices and Vi-ish variable settings |
| 1001 | (defun viper-non-hook-settings () | 999 | (defun viper-non-hook-settings () |
| 1002 | 1000 | ||
| 1003 | ;; This var is not local in Emacs, so we make it local. It must be local | ||
| 1004 | ;; because although the stack of minor modes can be the same for all buffers, | ||
| 1005 | ;; the associated *keymaps* can be different. In Viper, | ||
| 1006 | ;; viper-vi-local-user-map, viper-insert-local-user-map, and others can have | ||
| 1007 | ;; different keymaps for different buffers. Also, the keymaps associated | ||
| 1008 | ;; with viper-vi/insert-state-modifier-minor-mode can be different. | ||
| 1009 | ;; ***This is needed only in case emulation-mode-map-alists is not defined | ||
| 1010 | (unless | ||
| 1011 | (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) | ||
| 1012 | (viper-make-variable-buffer-local 'minor-mode-map-alist)) | ||
| 1013 | |||
| 1014 | ;; Viper changes the default mode-line-buffer-identification | 1001 | ;; Viper changes the default mode-line-buffer-identification |
| 1015 | (setq-default mode-line-buffer-identification '(" %b")) | 1002 | (setq-default mode-line-buffer-identification '(" %b")) |
| 1016 | 1003 | ||
| @@ -1018,8 +1005,6 @@ It also can't undo some Viper settings." | |||
| 1018 | (setq next-line-add-newlines nil | 1005 | (setq next-line-add-newlines nil |
| 1019 | require-final-newline t) | 1006 | require-final-newline t) |
| 1020 | 1007 | ||
| 1021 | (viper-make-variable-buffer-local 'require-final-newline) | ||
| 1022 | |||
| 1023 | ;; don't bark when mark is inactive | 1008 | ;; don't bark when mark is inactive |
| 1024 | (if viper-emacs-p | 1009 | (if viper-emacs-p |
| 1025 | (setq mark-even-if-inactive t)) | 1010 | (setq mark-even-if-inactive t)) |
| @@ -1027,7 +1012,6 @@ It also can't undo some Viper settings." | |||
| 1027 | (setq scroll-step 1) | 1012 | (setq scroll-step 1) |
| 1028 | 1013 | ||
| 1029 | ;; Variable displaying the current Viper state in the mode line. | 1014 | ;; Variable displaying the current Viper state in the mode line. |
| 1030 | (viper-deflocalvar viper-mode-string viper-emacs-state-id) | ||
| 1031 | (or (memq 'viper-mode-string global-mode-string) | 1015 | (or (memq 'viper-mode-string global-mode-string) |
| 1032 | (setq global-mode-string | 1016 | (setq global-mode-string |
| 1033 | (append '("" viper-mode-string) (cdr global-mode-string)))) | 1017 | (append '("" viper-mode-string) (cdr global-mode-string)))) |
| @@ -1336,9 +1320,9 @@ These two lines must come in the order given. | |||
| 1336 | (provide 'viper) | 1320 | (provide 'viper) |
| 1337 | 1321 | ||
| 1338 | 1322 | ||
| 1339 | ;;; Local Variables: | 1323 | ;; Local Variables: |
| 1340 | ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) | 1324 | ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) |
| 1341 | ;;; End: | 1325 | ;; End: |
| 1342 | 1326 | ||
| 1343 | ;;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79 | 1327 | ;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79 |
| 1344 | ;;; viper.el ends here | 1328 | ;;; viper.el ends here |