GNU bug report logs -
#31289
madx mode for emacs
Previous Next
Reported by: Oscar Blanco <orblancog <at> gmail.com>
Date: Fri, 27 Apr 2018 15:20:01 UTC
Severity: wishlist
Tags: patch
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
[forwarding to list, minus copyright assignment; no need to publish that]
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello,
I have made the modifications to madx.el, and I am attaching the copyright
assignment that I signed in February.
o
Il giorno gio 25 ott 2018 alle ore 00:30 Noam Postavsky <npostavs <at> gmail.com>
ha scritto:
> Oscar Blanco <orblancog <at> gmail.com> writes:
>
> > I attached again the script with the corresponding modifications. I
> > understand that an additional script called madx-autoloads.el is
> required.
>
> The madx-autoloads.el will be generated when installing the package from
> forms that are prefix with
>
> ;;;###autoload
>
> See `(elisp) Autoload'. You can test it out using M-x
> package-install-file.
>
> > ;;; madx.el --- Major mode for editing MAD-X files in Emacs
>
> > ;; Copyright (C) 2013, 2016 Oscar BLANCO
> > ;; 2017, 2018 FSF
>
> You don't seem to be listed in copyright assignment file; to officially
> assign copyright to the FSF you need to sign some legal papers.
> Instructions to begin the process are at
>
> https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future
>
> > (defconst madx-font-lock-keywords-face-all
> > ;; madx-font-lock-keywords-programflow
> > `((,(regexp-opt '(;; font-lock-keyword-face
> > ;; madx-font-lock-keywords-programflow
> > "IF"
> > "ELSEIF"
> > "ELSE"
> > "WHILE"
> > "MACRO"
> > ) 'words)
>
> I would prefer the close paren grouped with the sexp it closes, as in
>
> `((,(regexp-opt '(;; font-lock-keyword-face
> ;; madx-font-lock-keywords-programflow
> "IF"
> "ELSEIF"
> "ELSE"
> "WHILE"
> "MACRO")
> 'words)
> . font-lock-keyword-face))
>
> > ;; some variables already optimized
> > "\\|RE[1-6][1-6]"
> > "\\|T[1-6][1-6][1-6]"
> > "\\|TM[1-6][1-6][1-6]"
>
> These two could be written as just "\\|TM?[1-6][1-6][1-6]"
>
> > "\\||BETA[1-3][1-3]"
> > "\\|BETA[1-3][1-3]P"
>
> I guess that extra "|" is a typo; again you could coalesce these into
> "\\|BETA[1-3][1-3]P?", similar for the following ones.
>
> > "\\|ALFA[1-3][1-3]"
> > "\\|ALFA[1-3][1-3]P"
> > "\\|GAMA[1-3][1-3]"
> > "\\|GAMA[1-3][1-3]P"
> > "\\|GAMA[1-3][1-3]"
> > "\\|DISP[1-4]P[1-3]"
> > "\\|EIGN[1-6][1-6]"
> > "\\|R[1-6][1-6]"
> > "\\|RM[1-6][1-6]")
> > . font-lock-variable-name-face))
> > "Highlighting expressions for MAD-X mode (variable-name-all).")
>
> > (define-derived-mode madx-mode fundamental-mode "madx"
> > "Major mode for editing Methodical Accelerator Design X script files."
> > (kill-all-local-variables)
> > ;; (use-local-map madx-mode-map)
> > (set-syntax-table madx-mode-syntax-table)
>
> define-derived-mode already does kill-all-local-variables,
> use-local-map, and set-syntax-table, so you don't need to put them here.
>
--
Oscar BLANCO
[Message part 4 (text/html, inline)]
[madx.el (text/x-emacs-lisp, attachment)]
This bug report was last modified 5 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.