Commit 8c5de2a1 authored by Glenn Morris's avatar Glenn Morris
Browse files

(fortran-mode-abbrev-table, fortran-line-length): Use mapc rather than mapcar.

parent 1eff4ba3
...@@ -649,7 +649,7 @@ Used in the Fortran entry in `hs-special-modes-alist'.") ...@@ -649,7 +649,7 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
(let (abbrevs-changed) (let (abbrevs-changed)
;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible. ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
;; Only use `apply' to quieten the byte-compiler. ;; Only use `apply' to quieten the byte-compiler.
(mapcar (mapc
(function (lambda (element) (function (lambda (element)
(condition-case nil (condition-case nil
(apply 'define-abbrev fortran-mode-abbrev-table (apply 'define-abbrev fortran-mode-abbrev-table
...@@ -852,20 +852,20 @@ Fortran mode. If the optional argument GLOBAL is non-nil, it ...@@ -852,20 +852,20 @@ Fortran mode. If the optional argument GLOBAL is non-nil, it
affects all Fortran buffers, and also the default." affects all Fortran buffers, and also the default."
(interactive "p") (interactive "p")
(let (new) (let (new)
(mapcar (lambda (buff) (mapc (lambda (buff)
(with-current-buffer buff (with-current-buffer buff
(when (eq major-mode 'fortran-mode) (when (eq major-mode 'fortran-mode)
(setq fortran-line-length nchars (setq fortran-line-length nchars
fill-column fortran-line-length fill-column fortran-line-length
new (fortran-font-lock-syntactic-keywords)) new (fortran-font-lock-syntactic-keywords))
;; Refontify only if necessary. ;; Refontify only if necessary.
(unless (equal new font-lock-syntactic-keywords) (unless (equal new font-lock-syntactic-keywords)
(setq font-lock-syntactic-keywords (setq font-lock-syntactic-keywords
(fortran-font-lock-syntactic-keywords)) (fortran-font-lock-syntactic-keywords))
(if font-lock-mode (font-lock-mode 1)))))) (if font-lock-mode (font-lock-mode 1))))))
(if global (if global
(buffer-list) (buffer-list)
(list (current-buffer)))) (list (current-buffer))))
(if global (if global
(setq-default fortran-line-length nchars)))) (setq-default fortran-line-length nchars))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment