;;; viper-util.el --- Utilities used by viper.el
-;; Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 1999-2014 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
result))
;; Emacs used to count each multibyte character as several positions in the buffer,
-;; so we had to use Emacs' chars-in-region to count characters. Since 20.3,
+;; so we had to use Emacs's chars-in-region to count characters. Since 20.3,
;; Emacs counts multibyte characters as 1 position. XEmacs has always been
;; counting each char as just one pos. So, now we can simply subtract beg from
;; end to determine the number of characters in a region.
(abbreviate-file-name file)))
;; Sit for VAL milliseconds. XEmacs doesn't support the millisecond arg
-;; in sit-for, so this function smoothes out the differences.
+;; in sit-for, so this function smooths out the differences.
(defsubst viper-sit-for-short (val &optional nodisp)
(sit-for (/ val 1000.0) nodisp))
char-p (= (length base-key-name) 1))
(setq mod-char-list
(mapcar
- '(lambda (elt) (upcase (substring (symbol-name elt) 0 1)))
+ (lambda (elt) (upcase (substring (symbol-name elt) 0 1)))
modifiers))
(if char-p
(setq key-name
lis)))
-;; Smoothes out the difference between Emacs' unread-command-events
+;; Smooths out the difference between Emacs's unread-command-events
;; and XEmacs unread-command-event. Arg is a character, an event, a list of
;; events or a sequence of keys.
;;
;; XEmacs only
(defun viper-event-vector-p (vec)
(and (vectorp vec)
- (eval (cons 'and (mapcar '(lambda (elt) (if (eventp elt) t)) vec)))))
+ (eval (cons 'and (mapcar (lambda (elt) (if (eventp elt) t)) vec)))))
;; check if vec is a vector of character symbols
the `Local variables' section of a file."
(setq viper-related-files-and-buffers-ring
(make-ring (1+ (length other-files-or-buffers))))
- (mapc '(lambda (elt)
+ (mapc (lambda (elt)
(viper-ring-insert viper-related-files-and-buffers-ring elt))
other-files-or-buffers)
(viper-ring-insert viper-related-files-and-buffers-ring (buffer-name))
(viper-update-syntax-classes))
(defcustom viper-syntax-preference 'reformed-vi
- "*Syntax type characterizing Viper's alphanumeric symbols.
+ "Syntax type characterizing Viper's alphanumeric symbols.
Affects movement and change commands that deal with Vi-style words.
Works best when set in the hooks to various major modes.