aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2014-07-27 11:41:59 +0200
committerThien-Thi Nguyen2014-07-27 11:41:59 +0200
commit11fb71017b03f01a7e9e2db24973e756a41e16ec (patch)
treea741cc9acee63565acedd5d529cf539dd6bde4e7
parentc76059efc6e9a7545e46f12c03cd54a3060d63be (diff)
downloademacs-11fb71017b03f01a7e9e2db24973e756a41e16ec.tar.gz
emacs-11fb71017b03f01a7e9e2db24973e756a41e16ec.zip
Use `defvar-local' more.
* lisp/progmodes/hideshow.el (hs-c-start-regexp, hs-block-start-regexp) (hs-block-start-mdata-select, hs-block-end-regexp) (hs-forward-sexp-func, hs-adjust-block-beginning): ...here; remove corresponding `make-variable-buffer-local' top-level calls.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/progmodes/hideshow.el19
2 files changed, 15 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1a272725b9e..454dc823ef7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12014-07-27 Thien-Thi Nguyen <ttn@gnu.org>
2
3 Use `defvar-local' more.
4 * progmodes/hideshow.el
5 (hs-c-start-regexp, hs-block-start-regexp)
6 (hs-block-start-mdata-select, hs-block-end-regexp)
7 (hs-forward-sexp-func, hs-adjust-block-beginning): ...here;
8 remove corresponding `make-variable-buffer-local' top-level calls.
9
12014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org> 102014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
2 11
3 Cleanup error signals. (Bug#18067) 12 Cleanup error signals. (Bug#18067)
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 45420f2a250..a016c3283eb 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -390,37 +390,31 @@ Use the command `hs-minor-mode' to toggle or set this variable.")
390 :help "Do not hidden code or comment blocks when isearch matches inside them" 390 :help "Do not hidden code or comment blocks when isearch matches inside them"
391 :active t :style radio :selected (eq hs-isearch-open nil)]))) 391 :active t :style radio :selected (eq hs-isearch-open nil)])))
392 392
393(defvar hs-c-start-regexp nil 393(defvar-local hs-c-start-regexp nil
394 "Regexp for beginning of comments. 394 "Regexp for beginning of comments.
395Differs from mode-specific comment regexps in that 395Differs from mode-specific comment regexps in that
396surrounding whitespace is stripped.") 396surrounding whitespace is stripped.")
397(make-variable-buffer-local 'hs-c-start-regexp)
398 397
399(defvar hs-block-start-regexp nil 398(defvar-local hs-block-start-regexp nil
400 "Regexp for beginning of block.") 399 "Regexp for beginning of block.")
401(make-variable-buffer-local 'hs-block-start-regexp)
402 400
403(defvar hs-block-start-mdata-select nil 401(defvar-local hs-block-start-mdata-select nil
404 "Element in `hs-block-start-regexp' match data to consider as block start. 402 "Element in `hs-block-start-regexp' match data to consider as block start.
405The internal function `hs-forward-sexp' moves point to the beginning of this 403The internal function `hs-forward-sexp' moves point to the beginning of this
406element (using `match-beginning') before calling `hs-forward-sexp-func'.") 404element (using `match-beginning') before calling `hs-forward-sexp-func'.")
407(make-variable-buffer-local 'hs-block-start-mdata-select)
408 405
409(defvar hs-block-end-regexp nil 406(defvar-local hs-block-end-regexp nil
410 "Regexp for end of block.") 407 "Regexp for end of block.")
411(make-variable-buffer-local 'hs-block-end-regexp)
412 408
413 409(defvar-local hs-forward-sexp-func 'forward-sexp
414(defvar hs-forward-sexp-func 'forward-sexp
415 "Function used to do a `forward-sexp'. 410 "Function used to do a `forward-sexp'.
416Should change for Algol-ish modes. For single-character block 411Should change for Algol-ish modes. For single-character block
417delimiters -- ie, the syntax table regexp for the character is 412delimiters -- ie, the syntax table regexp for the character is
418either `(' or `)' -- `hs-forward-sexp-func' would just be 413either `(' or `)' -- `hs-forward-sexp-func' would just be
419`forward-sexp'. For other modes such as simula, a more specialized 414`forward-sexp'. For other modes such as simula, a more specialized
420function is necessary.") 415function is necessary.")
421(make-variable-buffer-local 'hs-forward-sexp-func)
422 416
423(defvar hs-adjust-block-beginning nil 417(defvar-local hs-adjust-block-beginning nil
424 "Function used to tweak the block beginning. 418 "Function used to tweak the block beginning.
425The block is hidden from the position returned by this function, 419The block is hidden from the position returned by this function,
426as opposed to hiding it from the position returned when searching 420as opposed to hiding it from the position returned when searching
@@ -439,7 +433,6 @@ It should return the position from where we should start hiding.
439It should not move the point. 433It should not move the point.
440 434
441See `hs-c-like-adjust-block-beginning' for an example of using this.") 435See `hs-c-like-adjust-block-beginning' for an example of using this.")
442(make-variable-buffer-local 'hs-adjust-block-beginning)
443 436
444(defvar hs-headline nil 437(defvar hs-headline nil
445 "Text of the line where a hidden block begins, set during isearch. 438 "Text of the line where a hidden block begins, set during isearch.