[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 03/56: Install the proper version.
From: |
Luke Lee |
Subject: |
[elpa] 03/56: Install the proper version. |
Date: |
Thu, 28 Aug 2014 02:21:37 +0000 |
lukelee pushed a commit to branch master
in repository elpa.
commit be726e5fe477b8f87cea28dd8a1ccc5361975b65
Author: Richard M. Stallman <address@hidden>
Date: Mon Apr 14 10:35:17 1997 +0000
Install the proper version.
---
lisp/emulation/crisp.el | 122 ++++++++++++++++++++++++++++++----------------
1 files changed, 79 insertions(+), 43 deletions(-)
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index 4d4cc72..f73b928 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -1,7 +1,9 @@
-;; crisp.el -- Emulator for CRiSP/Brief key bindings
+;;; crisp.el --- Emulator for CRiSP and Brief key bindings
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
;; Author: Gary D. Foster <address@hidden>
-;; Keywords: emulations brief crisp
+;; Keywords: emulations
;; This file is part of GNU Emacs.
@@ -29,25 +31,44 @@
;; Enable this package by putting the following in your .emacs
;; (require 'crisp)
+;; and use M-x crisp-mode to toggle it on or off.
;; This package will automatically default to loading the scroll-lock.el
;; package unless you put (setq crisp-load-scroll-lock nil) in your
-;; .emacs. If this feature is enabled, it will bind meta-f1 to the
+;; .emacs. If this feature is enabled, it will bind Meta-F1 to the
;; scroll-lock mode toggle.
-;; Also, the default keybindings for brief override the Meta-x key to
-;; exit the editor. If you don't like this functionality, you can
+;; Also, the default keybindings for this mode override the Meta-x key to
+;; make it exit the editor. If you don't like this change, you can
;; prevent this key from being rebound with
;; (setq crisp-override-meta-x nil) in your .emacs.
+;; Finally, if you want to change the string displayed in the modeline
+;; when this mode is in effect, override the definition of
+;; `crisp-mode-modeline-string' in your .emacs. The default value is
+;; " *Crisp*" which may be a bit lengthy if you have a lot of things
+;; being displayed there.
+
;; All these overrides should go *before* the (require 'crisp) statement.
;; local variables
(defvar crisp-mode-map (copy-keymap (current-global-map))
- "Keymap for CRiSP emulation.
+ "Local keymap for CRiSP emulation mode.
All the emulation bindings are done here instead of globally.")
+(defvar crisp-mode-modeline-string " *CRiSP*"
+ "String to display in the modeline when CRiSP emulation mode is enabled.")
+
+(defvar crisp-mode-original-keymap (copy-keymap (current-global-map))
+ "The original keymap before CRiSP emulation mode remaps anything.
+This keymap is restored when CRiSP emulation mode is disabled.")
+
+(defvar crisp-mode-enabled nil
+ "Track status of CRiSP emulation mode.
+A value of nil means CRiSP mode is not enabled. A value of t
+indicates CRiSP mode is enabled.")
+
(defvar crisp-override-meta-x t
"Controls overriding the normal Emacs M-x key binding in the CRiSP emulator.
Normally the CRiSP emulator rebinds M-x to save-buffers-exit-emacs
@@ -57,15 +78,24 @@ If this variable is nil when you start the CRiSP emulator,
it
does not alter the binding of M-x.")
(defvar crisp-load-scroll-lock t
- "Controls loading of Scroll Lock in the CRiSP emulator.
-Its default behavior is to load and enable the Scroll Lock minor mode
+ "Controls loading of the Scroll Lock in the CRiSP emulator.
+Its Default behavior is to load and enable the Scroll Lock minor mode
package when enabling the CRiSP emulator.
If this variable is nil when you start the CRiSP emulator, it
does not load Scroll Lock.")
(defvar crisp-load-hook nil
- "Hooks to run after loading the CRiSP emulator package.")
+ "Hooks to run after loadint the CRiSP emulator package.")
+
+(defvar crisp-version "crisp.el release 1.1/$Revision: 1.17 $"
+ "The release number and RCS version for the CRiSP emulator.")
+
+(if (string-match "XEmacs\\Lucid" emacs-version)
+ (add-minor-mode 'crisp-mode-enabled crisp-mode-modeline-string)
+ (or (assq 'crisp-mode-enabled minor-mode-alist)
+ (setq minor-mode-alist
+ (cons '(crisp-mode-enabled crisp-mode-modeline-string)
minor-mode-alist))))
;; and now the keymap defines
@@ -100,8 +130,8 @@ does not load Scroll Lock.")
(define-key crisp-mode-map [(meta f10)] 'compile)
(define-key crisp-mode-map [(SunF37)] 'kill-buffer)
-(define-key crisp-mode-map [(kp_add)] 'x-copy-primary-selection)
-(define-key crisp-mode-map [(kp_subtract)] 'x-kill-primary-selection)
+(define-key crisp-mode-map [(kp-add)] 'x-copy-primary-selection)
+(define-key crisp-mode-map [(kp-subtract)] 'x-kill-primary-selection)
(define-key crisp-mode-map [(insert)] 'x-yank-clipboard-selection)
(define-key crisp-mode-map [(f16)] 'x-copy-primary-selection) ; copy
on Sun5 kbd
(define-key crisp-mode-map [(f20)] 'x-kill-primary-selection) ; cut
on Sun5 kbd
@@ -112,12 +142,23 @@ does not load Scroll Lock.")
(define-key crisp-mode-map [(meta g)] 'goto-line)
(define-key crisp-mode-map [(meta h)] 'help)
(define-key crisp-mode-map [(meta i)] 'overwrite-mode)
+(define-key crisp-mode-map [(meta j)] 'bookmark-jump)
(define-key crisp-mode-map [(meta u)] 'advertised-undo)
(define-key crisp-mode-map [(f14)] 'advertised-undo)
(define-key crisp-mode-map [(meta w)] 'save-buffer)
(if
(eq crisp-override-meta-x 't)
- (define-key crisp-mode-map [(meta x)] 'save-buffers-kill-emacs))
+ (define-key crisp-mode-map [(meta x)] 'save-buffers-kill-emacs))
+(define-key crisp-mode-map [(meta ?0)] (lambda () (interactive)
(bookmark-set "0")))
+(define-key crisp-mode-map [(meta ?1)] (lambda () (interactive)
(bookmark-set "1")))
+(define-key crisp-mode-map [(meta ?2)] (lambda () (interactive)
(bookmark-set "2")))
+(define-key crisp-mode-map [(meta ?3)] (lambda () (interactive)
(bookmark-set "3")))
+(define-key crisp-mode-map [(meta ?4)] (lambda () (interactive)
(bookmark-set "4")))
+(define-key crisp-mode-map [(meta ?5)] (lambda () (interactive)
(bookmark-set "5")))
+(define-key crisp-mode-map [(meta ?6)] (lambda () (interactive)
(bookmark-set "6")))
+(define-key crisp-mode-map [(meta ?7)] (lambda () (interactive)
(bookmark-set "7")))
+(define-key crisp-mode-map [(meta ?8)] (lambda () (interactive)
(bookmark-set "8")))
+(define-key crisp-mode-map [(meta ?9)] (lambda () (interactive)
(bookmark-set "9")))
(define-key crisp-mode-map [(shift right)] 'fkey-forward-word)
(define-key crisp-mode-map [(shift left)] 'fkey-backward-word)
@@ -129,61 +170,56 @@ does not load Scroll Lock.")
(define-key crisp-mode-map [(home)] 'crisp-home)
(define-key crisp-mode-map [(end)] 'crisp-end)
-
(defun crisp-home ()
- "\"Home\" the point, the way CRiSP would do it.
+ "\"Home\" point, the way CRiSP would do it.
The first use moves point to beginning of the line. Second
consecutive use moves point to beginning of the screen. Third
consecutive use moves point to the beginning of the buffer."
(interactive nil)
(cond
((and (eq last-command 'crisp-home) (eq last-last-command 'crisp-home))
- (goto-char (point-min))
- )
+ (goto-char (point-min)))
((eq last-command 'crisp-home)
- (move-to-window-line 0)
- )
+ (move-to-window-line 0))
(t
- (beginning-of-line)
- )
- )
- (setq last-last-command last-command)
-)
+ (beginning-of-line)))
+ (setq last-last-command last-command))
(defun crisp-end ()
- "\"End\" the point, the way CRiSP would do it.
+ "\"End\" point, the way CRiSP would do it.
The first use moves point to end of the line. Second
consecutive use moves point to the end of the screen. Third
consecutive use moves point to the end of the buffer."
(interactive nil)
(cond
((and (eq last-command 'crisp-end) (eq last-last-command 'crisp-end))
- (goto-char (point-max))
- )
+ (goto-char (point-max)))
((eq last-command 'crisp-end)
(move-to-window-line -1)
- (end-of-line)
- )
+ (end-of-line))
(t
- (end-of-line)
- )
- )
- (setq last-last-command last-command)
-)
+ (end-of-line)))
+ (setq last-last-command last-command))
;; Now enable the mode
-(kill-all-local-variables)
-(use-global-map crisp-mode-map)
-
-(if (eq crisp-load-scroll-lock t)
- (require 'scroll-lock))
-
-(if (featurep 'scroll-lock)
- (define-key crisp-mode-map [(meta f1)] 'scroll-lock-mode))
-
-(run-hooks 'crisp-load-hook) ;; allow for hooks
+(defun crisp-mode ()
+ "Toggle CRiSP emulation minor mode."
+ (interactive nil)
+ (setq crisp-mode-enabled (not crisp-mode-enabled))
+ (cond
+ ((eq crisp-mode-enabled 't)
+ (use-global-map crisp-mode-map)
+ (if crisp-load-scroll-lock
+ (require 'scroll-lock))
+ (if (featurep 'scroll-lock)
+ (define-key crisp-mode-map [(meta f1)] 'scroll-lock-mode))
+ (run-hooks 'crisp-load-hook))
+ ((eq crisp-mode-enabled 'nil)
+ (use-global-map crisp-mode-original-keymap))))
(provide 'crisp)
;;; crisp.el ends here
+
+
- [elpa] 37/56: * emulation/crisp.el (crisp-mode-map): Move initialization into declaration. (crisp-mode): Use define-minor-mode., (continued)
- [elpa] 37/56: * emulation/crisp.el (crisp-mode-map): Move initialization into declaration. (crisp-mode): Use define-minor-mode., Luke Lee, 2014/08/27
- [elpa] 41/56: Nuke arch-tags., Luke Lee, 2014/08/27
- [elpa] 47/56: Add 2012 to FSF copyright years for Emacs files, Luke Lee, 2014/08/27
- [elpa] 50/56: Replace version 24.2 with 24.3 where appropriate (hopefully), Luke Lee, 2014/08/27
- [elpa] 43/56: Convert consecutive FSF copyright years to ranges., Luke Lee, 2014/08/27
- [elpa] 49/56: Reduce use of (require 'cl). * admin/bzrmerge.el: Use cl-lib. * leim/quail/hangul.el: Don't require CL. * leim/quail/ipa.el: Use cl-lib. * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el: * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el: * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el: * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el: * international/quail.el, info-xref.el, imenu.el, image-mode.el: * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el: * battery.el, avoid.el, abbrev.el: Use cl-lib. * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el: * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el: * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el: * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el: * calculator.el, autorevert.el, apropos.el: Don't require CL. * emacs-bytecomp.el (byte-recompile-directory, display-call-tree) (byte-compile-unfold-bcf, byte-compile-check-variable): * emacs-byte-opt.el (byte-compile-trueconstp) (byte-compile-nilconstp): * emacs-autoload.el (make-autoload): Use pcase. * face-remap.el (text-scale-adjust): Simplify pcase patterns., Luke Lee, 2014/08/27
- [elpa] 51/56: Aliases to defcustoms must come before the defcustom., Luke Lee, 2014/08/27
- [elpa] 05/56: (crisp-last-last-command): Renamed from last-last-command and defvar added., Luke Lee, 2014/08/27
- [elpa] 01/56: Initial revision, Luke Lee, 2014/08/27
- [elpa] 04/56: (crisp-load-scroll-all): Renamed from ...-lock. (crisp-mode): Use scroll-all... not scroll-lock..., Luke Lee, 2014/08/27
- [elpa] 03/56: Install the proper version.,
Luke Lee <=
- [elpa] 06/56: (crisp-mode): Add autoload cookie., Luke Lee, 2014/08/27
- [elpa] 07/56: Customized., Luke Lee, 2014/08/27
- [elpa] 10/56: (crisp-mark-line): Greatly simplified., Luke Lee, 2014/08/27
- [elpa] 11/56: Fix header comments., Luke Lee, 2014/08/27
- [elpa] 09/56: Don't require cl. (crisp-override-meta-x): Doc fix. (crisp-last-last-command): Doc fix. (mark-something): Function deleted. (crisp-mark-line): Avoid using mark-something. (crisp-region-active): Renamed from region-active. (crisp-set-clipboard): Renamed from copy-primary-selection. (crisp-kill-region): Renamed from kill-primary-selection. (crisp-yank-clipboard): Renamed from yank-clipboard-selection., Luke Lee, 2014/08/27
- [elpa] 12/56: (crisp-mode-map): Don't inherit global-map. Enter it on minor-mode-map-alist. (crisp-mode): Re-named from `crsip-mode-enabled'. Users changed. Autoload. Add custom setter. (crisp-mark-line): Doc fix. (crisp-mode): Autoload. Re-write not to frob keymaps directly. (crisp-mode-hook): Define., Luke Lee, 2014/08/27
- [elpa] 13/56: (crisp-submit-bug-report): Function deleted. Binding deleted also., Luke Lee, 2014/08/27
- [elpa] 14/56: (crisp-mode): (defcustom) Initialize with custom-initialize-default to avoid infinite loop. (crisp-mode): (defun) Call transient-mark-mode here, not when loading the file. Run crisp-mode-hook here, and run crisp-load-hook when loading the file., Luke Lee, 2014/08/27
- [elpa] 15/56: Update author address., Luke Lee, 2014/08/27
- [elpa] 08/56: Added next-buffer/previous-buffer keybindings (bound to M-n/M-p). (crisp-unbury-buffer): New function., Luke Lee, 2014/08/27