comparison lisp/emulation/viper.el @ 14909:7ff1df13b124

*** empty log message ***
author Michael Kifer <kifer@cs.stonybrook.edu>
date Fri, 29 Mar 1996 01:02:28 +0000
parents 20f4c4a078b2
children 43a3308fcf61
comparison
equal deleted inserted replaced
14908:4b99e1ffa095 14909:7ff1df13b124
4 ;; Viper Is also a Package for Emacs Rebels. 4 ;; Viper Is also a Package for Emacs Rebels.
5 ;; 5 ;;
6 ;; Keywords: emulations 6 ;; Keywords: emulations
7 ;; Author: Michael Kifer <kifer@cs.sunysb.edu> 7 ;; Author: Michael Kifer <kifer@cs.sunysb.edu>
8 8
9 (defconst viper-version "2.85 of February 14, 1996" 9 ;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
10
11 (defconst viper-version "2.86 of March 14, 1996"
10 "The current version of Viper") 12 "The current version of Viper")
11
12 ;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
13 13
14 ;; This file is part of GNU Emacs. 14 ;; This file is part of GNU Emacs.
15 15
16 ;; GNU Emacs is free software; you can redistribute it and/or modify 16 ;; GNU Emacs is free software; you can redistribute it and/or modify
17 ;; it under the terms of the GNU General Public License as published by 17 ;; it under the terms of the GNU General Public License as published by
291 ;; starts with a '*'. Then, the user should be offered to save 291 ;; starts with a '*'. Then, the user should be offered to save
292 ;; variables that were changed. This will make user's customization job 292 ;; variables that were changed. This will make user's customization job
293 ;; much easier. 293 ;; much easier.
294 ;; 294 ;;
295 295
296 ;; Code
296 297
297 (require 'advice) 298 (require 'advice)
298 (require 'cl) 299 (require 'cl)
299 (require 'ring) 300 (require 'ring)
300 301
301 (require 'viper-util) 302 (require 'viper-util)
303
304 ;; Compiler pacifier
305 (defvar vip-minibuffer-current-face)
306 (defvar vip-minibuffer-insert-face)
307 (defvar vip-minibuffer-vi-face)
308 (defvar vip-minibuffer-emacs-face)
309 (defvar iso-accents-mode)
310 (defvar zmacs-region-stays)
311 ;; end pacifier
302 312
303 313
304 ;;; Variables 314 ;;; Variables
305 315
306 ;; Is t until viper-mode executes for the very first time. 316 ;; Is t until viper-mode executes for the very first time.
2415 (defun vip-add-newline-at-eob-if-necessary () 2425 (defun vip-add-newline-at-eob-if-necessary ()
2416 (save-excursion 2426 (save-excursion
2417 (end-of-line) 2427 (end-of-line)
2418 ;; make sure all lines end with newline, unless in the minibuffer or 2428 ;; make sure all lines end with newline, unless in the minibuffer or
2419 ;; when requested otherwise (require-final-newline is nil) 2429 ;; when requested otherwise (require-final-newline is nil)
2420 (if (and 2430 (if (and (eobp)
2421 (eobp) 2431 (not (bolp))
2422 (not (bolp)) 2432 require-final-newline
2423 require-final-newline 2433 (not (vip-is-in-minibuffer))
2424 (not (vip-is-in-minibuffer))) 2434 (not buffer-read-only))
2425 (insert "\n")))) 2435 (insert "\n"))))
2426 2436
2427 (defun vip-yank-defun () 2437 (defun vip-yank-defun ()
2428 (mark-defun) 2438 (mark-defun)
2429 (copy-region-as-kill (point) (mark t))) 2439 (copy-region-as-kill (point) (mark t)))