summaryrefslogtreecommitdiff
path: root/lisp/progmodes/perl-mode.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-12-01 12:09:55 +0800
committerChong Yidong <cyd@gnu.org>2012-12-01 12:09:55 +0800
commit92eadba57fe86a49d67a7e3d797e3180ca0f6ae7 (patch)
tree0b6588412e5b894cd2ee09e08fda5e52201d5ba9 /lisp/progmodes/perl-mode.el
parent75b4f59c279cbab4ad6a056b39f876b9a7518267 (diff)
downloademacs-92eadba57fe86a49d67a7e3d797e3180ca0f6ae7.tar.gz
Convert several major modes to setq-local.
* emacs-lisp/lisp-mode.el (lisp-mode-variables, lisp-mode): * progmodes/autoconf.el (autoconf-mode): * progmodes/js.el (js-mode): * progmodes/make-mode.el (makefile-mode, makefile-makepp-mode) (makefile-bsdmake-mode, makefile-imake-mode, makefile-browse): * progmodes/perl-mode.el (perl-mode): * progmodes/sh-script.el (sh-mode, sh-set-shell): * textmodes/css-mode.el (css-mode): * textmodes/sgml-mode.el (html-mode, sgml-mode) (sgml-tags-invisible, sgml-guess-indent): * textmodes/tex-mode.el (tex-common-initialization) (latex-complete-bibtex-keys, tex-shell, tex-main-file) (doctex-mode, plain-tex-mode, latex-mode): * textmodes/texinfo.el (texinfo-mode): Use setq-local.
Diffstat (limited to 'lisp/progmodes/perl-mode.el')
-rw-r--r--lisp/progmodes/perl-mode.el32
1 files changed, 15 insertions, 17 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index d2f7fc7a059..f8ae0030cf0 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -631,15 +631,15 @@ Various indentation styles: K&R BSD BLK GNU LW
Turning on Perl mode runs the normal hook `perl-mode-hook'."
:abbrev-table perl-mode-abbrev-table
- (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter))
- (set (make-local-variable 'paragraph-separate) paragraph-start)
- (set (make-local-variable 'paragraph-ignore-fill-prefix) t)
- (set (make-local-variable 'indent-line-function) #'perl-indent-line)
- (set (make-local-variable 'comment-start) "# ")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'comment-start-skip) "\\(^\\|\\s-\\);?#+ *")
- (set (make-local-variable 'comment-indent-function) #'perl-comment-indent)
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
+ (setq-local paragraph-start (concat "$\\|" page-delimiter))
+ (setq-local paragraph-separate paragraph-start)
+ (setq-local paragraph-ignore-fill-prefix t)
+ (setq-local indent-line-function #'perl-indent-line)
+ (setq-local comment-start "# ")
+ (setq-local comment-end "")
+ (setq-local comment-start-skip "\\(^\\|\\s-\\);?#+ *")
+ (setq-local comment-indent-function #'perl-comment-indent)
+ (setq-local parse-sexp-ignore-comments t)
;; Tell font-lock.el how to handle Perl.
(setq font-lock-defaults '((perl-font-lock-keywords
perl-font-lock-keywords-1
@@ -647,22 +647,20 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
nil nil ((?\_ . "w")) nil
(font-lock-syntactic-face-function
. perl-font-lock-syntactic-face-function)))
- (set (make-local-variable 'syntax-propertize-function)
- #'perl-syntax-propertize-function)
+ (setq-local syntax-propertize-function #'perl-syntax-propertize-function)
(add-hook 'syntax-propertize-extend-region-functions
#'syntax-propertize-multiline 'append 'local)
;; Electricity.
;; FIXME: setup electric-layout-rules.
- (set (make-local-variable 'electric-indent-chars)
- (append '(?\{ ?\} ?\; ?\:) electric-indent-chars))
+ (setq-local electric-indent-chars
+ (append '(?\{ ?\} ?\; ?\:) electric-indent-chars))
(add-hook 'electric-indent-functions #'perl-electric-noindent-p nil t)
;; Tell imenu how to handle Perl.
- (set (make-local-variable 'imenu-generic-expression)
- perl-imenu-generic-expression)
+ (setq-local imenu-generic-expression perl-imenu-generic-expression)
(setq imenu-case-fold-search nil)
;; Setup outline-minor-mode.
- (set (make-local-variable 'outline-regexp) perl-outline-regexp)
- (set (make-local-variable 'outline-level) 'perl-outline-level))
+ (setq-local outline-regexp perl-outline-regexp)
+ (setq-local outline-level 'perl-outline-level))
;; This is used by indent-for-comment
;; to decide how much to indent a comment in Perl code