widget to customize the actual face object `ediff-fine-diff-face-A'
this variable represents.")
(ediff-hide-face 'ediff-fine-diff-face-A)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-fine-diff-face-A "gray3"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-fine-diff-face-A "gray3"))
;;(defvar ediff-fine-diff-face-B
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-fine-diff-face-B'
this variable represents.")
(ediff-hide-face 'ediff-fine-diff-face-B)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-fine-diff-face-B "gray3"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-fine-diff-face-B "gray3"))
;;(defvar ediff-fine-diff-face-C
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-fine-diff-face-C'
this variable represents.")
(ediff-hide-face 'ediff-fine-diff-face-C)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-fine-diff-face-C "gray3"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-fine-diff-face-C "gray3"))
;;(defvar ediff-fine-diff-face-Ancestor
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-fine-diff-face-Ancestor'
this variable represents.")
(ediff-hide-face 'ediff-fine-diff-face-Ancestor)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap
- 'ediff-fine-diff-face-Ancestor "gray3"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-fine-diff-face-Ancestor "gray3"))
;;(defvar ediff-even-diff-face-A
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-even-diff-face-A'
this variable represents.")
(ediff-hide-face 'ediff-even-diff-face-A)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-even-diff-face-A "Stipple"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-even-diff-face-A "Stipple"))
;;(defvar ediff-even-diff-face-B
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-even-diff-face-B'
this variable represents.")
(ediff-hide-face 'ediff-even-diff-face-B)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-even-diff-face-B "Stipple"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-even-diff-face-B "Stipple"))
;;(defvar ediff-even-diff-face-C
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-even-diff-face-C'
this variable represents.")
(ediff-hide-face 'ediff-even-diff-face-C)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-even-diff-face-C "Stipple"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-even-diff-face-C "Stipple"))
;;(defvar ediff-even-diff-face-Ancestor
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-even-diff-face-Ancestor'
this variable represents.")
(ediff-hide-face 'ediff-even-diff-face-Ancestor)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap
- 'ediff-even-diff-face-Ancestor "Stipple"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-even-diff-face-Ancestor "Stipple"))
;; Association between buffer types and even-diff-face symbols
(defconst ediff-even-diff-face-alist
widget to customize the actual face object `ediff-odd-diff-face-A'
this variable represents.")
(ediff-hide-face 'ediff-odd-diff-face-A)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-odd-diff-face-A "gray1"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-odd-diff-face-A "gray1"))
;;(defvar ediff-odd-diff-face-B
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-odd-diff-face-B'
this variable represents.")
(ediff-hide-face 'ediff-odd-diff-face-B)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-odd-diff-face-B "gray1"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-odd-diff-face-B "gray1"))
;;(defvar ediff-odd-diff-face-C
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-odd-diff-face-C'
this variable represents.")
(ediff-hide-face 'ediff-odd-diff-face-C)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-odd-diff-face-C "gray1"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-odd-diff-face-C "gray1"))
;;(defvar ediff-odd-diff-face-Ancestor
;; (if (ediff-has-face-support-p)
widget to customize the actual face object `ediff-odd-diff-face-Ancestor'
this variable represents.")
(ediff-hide-face 'ediff-odd-diff-face-Ancestor)
-;; Until custom.el for XEmacs starts supporting :stipple we do this.
-;; This means that some use customization may be trashed.
-(if (and ediff-xemacs-p
- (ediff-has-face-support-p)
- (not (ediff-color-display-p)))
- (ediff-set-face-pixmap 'ediff-odd-diff-face-Ancestor "gray1"))
+
+;;;; Until custom.el for XEmacs starts supporting :stipple we do this.
+;;;; This means that some user customization may be trashed.
+;;(if (and ediff-xemacs-p
+;; (ediff-has-face-support-p)
+;; (not (ediff-color-display-p)))
+;; (ediff-set-face-pixmap 'ediff-odd-diff-face-Ancestor "gray1"))
;; Association between buffer types and odd-diff-face symbols
(defconst ediff-odd-diff-face-alist
;; Quote region by each line with a user supplied string.
(defun viper-quote-region ()
- (setq viper-quote-string
- (viper-read-string-with-history
- "Quote string: "
- nil
- 'viper-quote-region-history
- viper-quote-string))
- (viper-enlarge-region (point) (mark t))
- (if (> (point) (mark t)) (exchange-point-and-mark))
- (insert viper-quote-string)
- (beginning-of-line)
- (forward-line 1)
- (while (and (< (point) (mark t)) (bolp))
- (insert viper-quote-string)
+ (let ((quote-str viper-quote-string)
+ (donot-change-dafault t))
+ (setq quote-str
+ (viper-read-string-with-history
+ "Quote string: "
+ nil
+ 'viper-quote-region-history
+ (cond ((string-match "tex.*-mode" (symbol-name major-mode)) "%%")
+ ((string-match "java.*-mode" (symbol-name major-mode)) "//")
+ ((string-match "perl.*-mode" (symbol-name major-mode)) "#")
+ ((string-match "lisp.*-mode" (symbol-name major-mode)) ";;")
+ ((memq major-mode '(c-mode cc-mode c++-mode)) "//")
+ ((memq major-mode '(sh-mode shell-mode)) "#")
+ (t (setq donot-change-dafault nil)
+ quote-str))))
+ (or donot-change-dafault
+ (setq viper-quote-string quote-str))
+ (viper-enlarge-region (point) (mark t))
+ (if (> (point) (mark t)) (exchange-point-and-mark))
+ (insert quote-str)
(beginning-of-line)
- (forward-line 1)))
+ (forward-line 1)
+ (while (and (< (point) (mark t)) (bolp))
+ (insert quote-str)
+ (beginning-of-line)
+ (forward-line 1))))
;; Tells whether BEG is on the same line as END.
;; If one of the args is nil, it'll return nil.
;;; Reading string with history
(defun viper-read-string-with-history (prompt &optional initial
- history-var default keymap)
+ history-var default keymap
+ init-message)
;; Read string, prompting with PROMPT and inserting the INITIAL
;; value. Uses HISTORY-VAR. DEFAULT is the default value to accept if the
- ;; input is an empty string. Use KEYMAP, if given, or the
- ;; minibuffer-local-map.
+ ;; input is an empty string.
;; Default value is displayed until the user types something in the
;; minibuffer.
+ ;; KEYMAP is used, if given, instead of minibuffer-local-map.
+ ;; INIT-MESSAGE is the message temporarily displayed after entering the
+ ;; minibuffer.
(let ((minibuffer-setup-hook
- '(lambda ()
+ (function
+ (lambda ()
+ (if (stringp init-message)
+ (viper-tmp-insert-at-eob init-message))
(if (stringp initial)
(progn
;; don't wait if we have unread events or in kbd macro
(sit-for 840))
(erase-buffer)
(insert initial)))
- (viper-minibuffer-setup-sentinel)))
+ (viper-minibuffer-setup-sentinel))))
(val "")
(padding "")
temp-msg)
;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
-(defconst viper-version "3.002 (Polyglot) of October 23, 1997"
+(defconst viper-version "3.004 (Polyglot) of November 11, 1997"
"The current version of Viper")
;; This file is part of GNU Emacs.
(viper-standard-value
'mode-line-buffer-identification viper-saved-non-viper-variables)
global-mode-string
- (viper-standard-value 'global-mode-string viper-saved-non-viper-variables))
+ (delq 'viper-mode-string global-mode-string))
(if viper-emacs-p
(setq-default
(viper-delocalize-var 'viper-emacs-global-user-minor-mode)
(viper-delocalize-var 'viper-emacs-state-modifier-minor-mode)
+ (viper-delocalize-var 'viper-current-state)
+ (viper-delocalize-var 'viper-mode-string)
+
(setq-default viper-vi-minibuffer-minor-mode nil
viper-insert-minibuffer-minor-mode nil
viper-vi-intercept-minor-mode nil
viper-emacs-kbd-minor-mode nil
viper-emacs-global-user-minor-mode nil
viper-emacs-state-modifier-minor-mode nil
+
+ viper-current-state 'emacs-state
+ viper-mode-string viper-emacs-state-id
)
;; remove all hooks set by viper
viper-insert-intercept-map "\C-c\\" 'viper-escape-to-vi)
(if viper-mode
- (progn
- (setq viper-emacs-intercept-minor-mode t
- viper-emacs-local-user-minor-mode t
- viper-emacs-global-user-minor-mode t
- viper-emacs-kbd-minor-mode t
- viper-emacs-state-modifier-minor-mode t)
- (setq-default viper-emacs-intercept-minor-mode t
- viper-emacs-local-user-minor-mode t
- viper-emacs-global-user-minor-mode t
- viper-emacs-kbd-minor-mode t
- viper-emacs-state-modifier-minor-mode t)
- ))
+ (setq-default viper-emacs-intercept-minor-mode t
+ viper-emacs-local-user-minor-mode t
+ viper-emacs-global-user-minor-mode t
+ viper-emacs-kbd-minor-mode t
+ viper-emacs-state-modifier-minor-mode t))
+(if (and viper-mode (eq viper-current-state 'emacs-state))
+ (setq viper-emacs-intercept-minor-mode t
+ viper-emacs-local-user-minor-mode t
+ viper-emacs-global-user-minor-mode t
+ viper-emacs-kbd-minor-mode t
+ viper-emacs-state-modifier-minor-mode t))
(if (and viper-mode