[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 053d706: CC Mode: Convert the handling of c-special-indent-hook t
From: |
Alan Mackenzie |
Subject: |
master 053d706: CC Mode: Convert the handling of c-special-indent-hook to standard usage |
Date: |
Fri, 2 Oct 2020 06:36:55 -0400 (EDT) |
branch: master
commit 053d70660bcec9b66834e52c4860b32083da77a0
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Alan Mackenzie <acm@muc.de>
CC Mode: Convert the handling of c-special-indent-hook to standard usage
* lisp/progmodes/cc-styles.el (c-set-style): Use kill-local-variable rather
than copying the hook's global value to the local binding.
(c-make-styles-buffer-local): Remove redundant make-variable-buffer-local.
---
lisp/progmodes/cc-styles.el | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index 36be9f6..855e467 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -395,8 +395,7 @@ a null operation."
;; remain. This is not necessary for c-offsets-alist, since
;; c-get-style-variables contains every valid offset type in the
;; fallback entry.
- (setq c-special-indent-hook
- (default-value 'c-special-indent-hook)))
+ (kill-local-variable 'c-special-indent-hook))
(mapc (lambda (elem)
(c-set-style-1 elem dont-override))
;; Need to go through the variables backwards when we
@@ -644,7 +643,7 @@ CC Mode by making sure the proper entries are present on
(defun c-make-styles-buffer-local (&optional this-buf-only-p)
"Make all CC Mode style variables buffer local.
-If `this-buf-only-p' is non-nil, the style variables will be made
+If THIS-BUF-ONLY-P is non-nil, the style variables will be made
buffer local only in the current buffer. Otherwise they'll be made
permanently buffer local in any buffer that changes their values.
@@ -662,7 +661,6 @@ any reason to call this function directly."
;; Hooks must be handled specially
(if this-buf-only-p
(if (featurep 'xemacs) (make-local-hook 'c-special-indent-hook))
- (with-no-warnings (make-variable-buffer-local 'c-special-indent-hook))
(setq c-style-variables-are-local-p t))
))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 053d706: CC Mode: Convert the handling of c-special-indent-hook to standard usage,
Alan Mackenzie <=