Skip to content

Commit a1e318c

Browse files
committed
Cleanup: Use setq-local instead of (set (make-local-variable ...))
1 parent 0c0a44c commit a1e318c

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

lisp/ess-gretl.el

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ end keywords as associated values.")
383383
(defun gretl-indent-line ()
384384
"Indent current line of gretl code."
385385
(interactive)
386-
; (save-excursion
387386
(end-of-line)
388387
(indent-line-to
389388
(or (and (ess-inside-string-p (point-at-bol)) 0)
@@ -397,16 +396,16 @@ end keywords as associated values.")
397396
(if endtok (- gretl-basic-offset) 0)))))
398397
;; previous line ends in =
399398
(save-excursion
400-
(if (and (not (equal (point-min) (line-beginning-position)))
401-
(progn
402-
(forward-line -1)
403-
(end-of-line) (backward-char 1)
404-
(equal (char-after (point)) ?=)))
405-
(+ gretl-basic-offset (current-indentation))
406-
nil))
399+
(if (and (not (equal (point-min) (line-beginning-position)))
400+
(progn
401+
(forward-line -1)
402+
(end-of-line) (backward-char 1)
403+
(equal (char-after (point)) ?=)))
404+
(+ gretl-basic-offset (current-indentation))
405+
nil))
407406
;; take same indentation as previous line
408407
(save-excursion (forward-line -1)
409-
(current-indentation))
408+
(current-indentation))
410409
0))
411410
(when (gretl-at-keyword gretl-block-end-keywords)
412411
(forward-word 1)))
@@ -544,16 +543,16 @@ to gretl, put them in the variable `inferior-gretl-args'."
544543
"\n(Gretl): ess-dialect=%s, buf=%s"
545544
ess-dialect (current-buffer)))
546545
(let* ((r-start-args
547-
(concat inferior-gretl-args " " ; add space just in case
548-
(if start-args
549-
(read-string
550-
(concat "Starting Args [other than `"
551-
inferior-gretl-args
552-
"'] ? "))
553-
nil)))
546+
(concat inferior-gretl-args " " ; add space just in case
547+
(if start-args
548+
(read-string
549+
(concat "Starting Args [other than `"
550+
inferior-gretl-args
551+
"'] ? "))
552+
nil)))
554553
(inf-buf (inferior-ess r-start-args gretl-customize-alist)))
555-
(set (make-local-variable 'indent-line-function) 'gretl-indent-line)
556-
(set (make-local-variable 'gretl-basic-offset) 4)
554+
(setq-local indent-line-function 'gretl-indent-line)
555+
(setq-local gretl-basic-offset 4)
557556
(setq indent-tabs-mode nil)
558557
(goto-char (point-max))
559558
;; (if inferior-ess-language-start

lisp/ess-r-completion.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ Return format suitable for `completion-at-point-functions'."
505505
(ess-process-live-p))
506506
(let ((args (nth 2 (ess-function-arguments (car ess--fn-name-start-cache)))))
507507
(if args
508-
(set (make-local-variable 'ac-use-comphist) nil)
508+
(setq-local ac-use-comphist nil)
509509
(kill-local-variable 'ac-use-comphist))
510510
(delete "..." args)
511511
(mapcar (lambda (a) (concat a ess-R-argument-suffix))

lisp/ess-toolbar.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ X should be a list, see `ess-toolbar-items' for the format."
149149
"Add the ESS toolbar to a particular mode.
150150
The toolbar is added iff `ess-toolbar-global' is nil, else the toolbar
151151
is added globally when ess-toolbar.el is loaded."
152-
(if (and ess-toolbar (not ess-toolbar-global))
153-
(set (make-local-variable 'tool-bar-map) ess-toolbar)))
152+
(when (and ess-toolbar (not ess-toolbar-global))
153+
(setq-local tool-bar-map ess-toolbar)))
154154

155155
;; Make the toolbars. Each toolbar is hopefully made only when this file
156156
;; is loaded; we don't need it to be remade every time.

lisp/ess-tracebug.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,7 @@ ESS internal code assumes default R prompts.")
601601
(with-current-buffer (process-buffer (get-process ess-local-process-name))
602602
(unless ess-error-regexp-alist
603603
(error "Can not activate the traceback for %s dialect" ess-dialect))
604-
(set (make-local-variable 'compilation-error-regexp-alist)
605-
ess-error-regexp-alist)
604+
(setq-local compilation-error-regexp-alist ess-error-regexp-alist)
606605
(let (compilation-mode-font-lock-keywords)
607606
(compilation-setup t))
608607
(setq next-error-function 'ess-tracebug-next-error-function)

lisp/essd-els.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ DIALECT is the desired ess-dialect. If nil, ask for dialect"
149149
(current-buffer)))
150150
(ess-setq-vars-local customize-alist)
151151
(inferior-ess--set-major-mode ess-dialect)
152-
(set (make-local-variable 'ess-remote) t)
152+
(setq-local ess-remote t)
153153
(setq ess-local-process-name (or proc-name ess-current-process-name))
154154

155155
(goto-char (point-max))

0 commit comments

Comments
 (0)