emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 701ed2e 2/2: Use lexical binding in fortran.el


From: Mattias Engdegård
Subject: master 701ed2e 2/2: Use lexical binding in fortran.el
Date: Thu, 22 Oct 2020 06:27:07 -0400 (EDT)

branch: master
commit 701ed2e4edd470f8b45de7671becde30b3786989
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Use lexical binding in fortran.el
    
    * lisp/progmodes/fortran.el: Use lexical binding.
    (fortran-make-syntax-propertize-function): Hoist use of lexical
    variable to outside the 'eval' call.
---
 lisp/progmodes/fortran.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index abc860b..206d1f2 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -1,4 +1,4 @@
-;;; fortran.el --- Fortran mode for GNU Emacs
+;;; fortran.el --- Fortran mode for GNU Emacs -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1986, 1993-1995, 1997-2020 Free Software Foundation,
 ;; Inc.
@@ -495,13 +495,13 @@ This is used to fontify fixed-format Fortran comments."
   ;; `byte-compile', but simple benchmarks indicate that it's probably not
   ;; worth the trouble (about 0.5% of slow down).
   (eval                         ;I hate `eval', but it's hard to avoid it here.
-   '(syntax-propertize-rules
+   `(syntax-propertize-rules
      ("^[CcDd\\*]" (0 "<"))
      ;; We mark all chars after line-length as "comment-start", rather than
      ;; just the first one.  This is so that a closing ' that's past the
      ;; line-length will indeed be ignored (and will result in a string that
      ;; leaks into subsequent lines).
-     ((format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
+     (,(format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
       (1 "<")))))
 
 (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]