Mercurial > emacs
comparison lisp/emulation/viper-cmd.el @ 65856:d64aeb0dc54e
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.
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Thu, 06 Oct 2005 00:09:49 +0000 |
parents | ed770a0a7846 |
children | 067115a6e738 aa89c814f853 |
comparison
equal
deleted
inserted
replaced
65855:97ab21c68453 | 65856:d64aeb0dc54e |
---|---|
492 (cdr | 492 (cdr |
493 (assoc major-mode viper-emacs-state-modifier-alist)) | 493 (assoc major-mode viper-emacs-state-modifier-alist)) |
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 |
507 | 514 |
508 ;; Viper mode-changing commands and utilities | 515 ;; Viper mode-changing commands and utilities |
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) |
516 ((eq viper-current-state 'insert-state) viper-insert-state-id))) | 523 ((eq viper-current-state 'insert-state) viper-insert-state-id))) |
517 | 524 |
4779 (setq repeated t)) | 4786 (setq repeated t)) |
4780 (setq dont-change-unless t | 4787 (setq dont-change-unless t |
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. |
4788 Feels almost like straight Vi. File name completion and | 4795 Feels almost like straight Vi. File name completion and |
4789 command history in the minibuffer are thrown in as a bonus. | 4796 command history in the minibuffer are thrown in as a bonus. |
4998 )) | 5005 )) |
4999 | 5006 |
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 |