[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 14/56: (crisp-mode): (defcustom) Initialize with custom-initializ
From: |
Luke Lee |
Subject: |
[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. |
Date: |
Thu, 28 Aug 2014 02:21:42 +0000 |
lukelee pushed a commit to branch master
in repository elpa.
commit f6e5a3960b423e964169a1f55efdaf4c6b22835f
Author: Karl Heuer <address@hidden>
Date: Sun Jun 13 02:37:28 1999 +0000
(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.
---
lisp/emulation/crisp.el | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index 74811fe..74b7632 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -84,6 +84,7 @@ indicates CRiSP mode is enabled.
Setting this variable directly does not take effect;
use either M-x customize or the function `crisp-mode'."
:set (lambda (symbol value) (crisp-mode (if value 1 0)))
+ :initialize 'custom-initialize-default
:require 'crisp
:version "20.4"
:type 'boolean
@@ -145,15 +146,6 @@ does not load the scroll-all package."
'clipboard-yank
'yank-clipboard-selection))
-;; force transient-mark-mode in Emacs, so that the marking routines
-;; work as expected. If the user turns off transient mark mode,
-;; most things will still work fine except the crisp-(copy|kill)
-;; functions won't work quite as nicely when regions are marked
-;; differently and could really confuse people. Caveat emptor.
-
-(if (fboundp 'transient-mark-mode)
- (transient-mark-mode t))
-
(defun crisp-region-active ()
"Compatibility function to test for an active region."
(if (boundp 'zmacs-region-active-p)
@@ -358,8 +350,6 @@ normal CRiSP binding) and when it is nil M-x will run
(save-buffers-kill-emacs)
(call-interactively 'execute-extended-command)))
-;; Now enable the mode
-
;;;###autoload
(defun crisp-mode (&optional arg)
"Toggle CRiSP emulation minor mode.
@@ -369,11 +359,18 @@ With ARG, turn CRiSP mode on if ARG is positive, off
otherwise."
(not crisp-mode)
(> (prefix-numeric-value arg) 0)))
(when crisp-mode
+ ;; Force transient-mark-mode, so that the marking routines work as
+ ;; expected. If the user turns off transient mark mode, most
+ ;; things will still work fine except the crisp-(copy|kill)
+ ;; functions won't work quite as nicely when regions are marked
+ ;; differently and could really confuse people. Caveat emptor.
+ (if (fboundp 'transient-mark-mode)
+ (transient-mark-mode t))
(if crisp-load-scroll-all
(require 'scroll-all))
(if (featurep 'scroll-all)
(define-key crisp-mode-map [(meta f1)] 'scroll-all-mode))
- (run-hooks 'crisp-load-hook)))
+ (run-hooks 'crisp-mode-hook)))
(if (fboundp 'add-minor-mode)
(add-minor-mode 'crisp-mode 'crisp-mode-modeline-string
@@ -385,6 +382,7 @@ With ARG, turn CRiSP mode on if ARG is positive, off
otherwise."
(setq minor-mode-map-alist (cons (cons 'crisp-mode crisp-mode-map)
minor-mode-map-alist))))
+(run-hooks 'crisp-load-hook)
(provide 'crisp)
;;; crisp.el ends here
- [elpa] 01/56: Initial revision, (continued)
- [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, 2014/08/27
- [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 <=
- [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
- [elpa] 16/56: (brief-mode): New alias., Luke Lee, 2014/08/27
- [elpa] 17/56: Trailing whitepace deleted., Luke Lee, 2014/08/27
- [elpa] 18/56: * man.el (Man-getpage-in-background): Always use `setenv' for environment variables, instead of modifying process-environment directly. The previous version let-bound process-environment -- the let-binding is skipped for GROFF_NO_SGR because there is already a let-binding in effect in some outer scope., Luke Lee, 2014/08/27
- [elpa] 20/56: Add arch taglines, Luke Lee, 2014/08/27
- [elpa] 22/56: Sync to HEAD, Luke Lee, 2014/08/27
- [elpa] 19/56: (top-level): Quote second arg to `eval-after-load'., Luke Lee, 2014/08/27
- [elpa] 23/56: Update years in copyright notice; nfc., Luke Lee, 2014/08/27
- [elpa] 26/56: Update years in copyright notice; nfc., Luke Lee, 2014/08/27