[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113134: lisp/bs.el, emacs-lock.el: Use defvar-local
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] trunk r113134: lisp/bs.el, emacs-lock.el: Use defvar-local, setq-local. |
Date: |
Sat, 22 Jun 2013 02:33:45 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113134
revision-id: address@hidden
parent: address@hidden
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sat 2013-06-22 04:33:33 +0200
message:
lisp/bs.el, emacs-lock.el: Use defvar-local, setq-local.
* lisp/bs.el (bs-buffer-show-mark): Make defvar-local.
(bs-mode): Use setq-local.
* lisp/emacs-lock.el (emacs-lock-mode, emacs-lock--old-mode)
(emacs-lock--try-unlocking): Make defvar-local.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/bs.el bs.el-20091113204419-o5vbwnq5f7feedwu-1737
lisp/emacs-lock.el emacslock.el-20110705113219-ow9goco1t3qf274t-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-06-22 00:37:18 +0000
+++ b/lisp/ChangeLog 2013-06-22 02:33:33 +0000
@@ -1,3 +1,11 @@
+2013-06-22 Juanma Barranquero <address@hidden>
+
+ * bs.el (bs-buffer-show-mark): Make defvar-local.
+ (bs-mode): Use setq-local.
+
+ * emacs-lock.el (emacs-lock-mode, emacs-lock--old-mode)
+ (emacs-lock--try-unlocking): Make defvar-local.
+
2013-06-22 Glenn Morris <address@hidden>
* play/cookie1.el (cookie-apropos): Minor simplification.
=== modified file 'lisp/bs.el'
--- a/lisp/bs.el 2013-01-01 09:11:05 +0000
+++ b/lisp/bs.el 2013-06-22 02:33:33 +0000
@@ -336,15 +336,13 @@
;; Internal globals
;; ----------------------------------------------------------------------
-(defvar bs-buffer-show-mark nil
+(defvar-local bs-buffer-show-mark nil
"Flag for the current mode for showing this buffer.
A value of nil means buffer will be shown depending on the current
configuration.
A value of `never' means to never show the buffer.
A value of `always' means to show buffer regardless of the configuration.")
-(make-variable-buffer-local 'bs-buffer-show-mark)
-
;; Make face named region (for XEmacs)
(unless (facep 'region)
(make-face 'region)
@@ -648,17 +646,14 @@
to show always.
\\[bs-visit-tags-table] -- call `visit-tags-table' on current line's buffer.
\\[bs-help] -- display this help text."
- (make-local-variable 'font-lock-defaults)
- (make-local-variable 'font-lock-verbose)
- (make-local-variable 'font-lock-global-modes)
(buffer-disable-undo)
(setq buffer-read-only t
truncate-lines t
- show-trailing-whitespace nil
- font-lock-global-modes '(not bs-mode)
- font-lock-defaults '(bs-mode-font-lock-keywords t)
- font-lock-verbose nil)
- (set (make-local-variable 'revert-buffer-function) 'bs-refresh)
+ show-trailing-whitespace nil)
+ (setq-local font-lock-defaults '(bs-mode-font-lock-keywords t))
+ (setq-local font-lock-verbose nil)
+ (setq-local font-lock-global-modes '(not bs-mode))
+ (setq-local revert-buffer-function 'bs-refresh)
(add-hook 'window-size-change-functions 'bs--track-window-changes)
(add-hook 'kill-buffer-hook 'bs--remove-hooks nil t)
(add-hook 'change-major-mode-hook 'bs--remove-hooks nil t))
=== modified file 'lisp/emacs-lock.el'
--- a/lisp/emacs-lock.el 2013-01-01 09:11:05 +0000
+++ b/lisp/emacs-lock.el 2013-06-22 02:33:33 +0000
@@ -27,7 +27,7 @@
;; This package defines a minor mode Emacs Lock to mark a buffer as
;; protected against accidental killing, or exiting Emacs, or both.
;; Buffers associated with inferior modes, like shell or telnet, can
-;; be treated specially, by auto-unlocking them if their interior
+;; be treated specially, by auto-unlocking them if their inferior
;; processes are dead.
;;; Code:
@@ -88,26 +88,23 @@
:group 'emacs-lock
:version "24.3")
-(defvar emacs-lock-mode nil
+(defvar-local emacs-lock-mode nil
"If non-nil, the current buffer is locked.
It can be one of the following values:
exit -- Emacs cannot exit while the buffer is locked
kill -- the buffer cannot be killed, but Emacs can exit as usual
all -- the buffer is locked against both actions
nil -- the buffer is not locked")
-(make-variable-buffer-local 'emacs-lock-mode)
(put 'emacs-lock-mode 'permanent-local t)
-(defvar emacs-lock--old-mode nil
+(defvar-local emacs-lock--old-mode nil
"Most recent locking mode set on the buffer.
Internal use only.")
-(make-variable-buffer-local 'emacs-lock--old-mode)
(put 'emacs-lock--old-mode 'permanent-local t)
-(defvar emacs-lock--try-unlocking nil
+(defvar-local emacs-lock--try-unlocking nil
"Non-nil if current buffer should be checked for auto-unlocking.
Internal use only.")
-(make-variable-buffer-local 'emacs-lock--try-unlocking)
(put 'emacs-lock--try-unlocking 'permanent-local t)
(defun emacs-lock-live-process-p (buffer-or-name)
@@ -188,6 +185,7 @@
(define-obsolete-variable-alias 'emacs-lock-from-exiting
'emacs-lock-mode "24.1")
+
;;;###autoload
(define-minor-mode emacs-lock-mode
"Toggle Emacs Lock mode in the current buffer.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113134: lisp/bs.el, emacs-lock.el: Use defvar-local, setq-local.,
Juanma Barranquero <=