From: Noam Postavsky <npostavs@gmail.com>
To: 31289@debbugs.gnu.org
Cc: Oscar Blanco <orblancog@gmail.com>
Subject: bug#31289: madx mode for emacs
Date: Thu, 25 Oct 2018 19:18:18 -0400 [thread overview]
Message-ID: <87a7n1lio5.fsf@gmail.com> (raw)
In-Reply-To: <87h8h9ljox.fsf@gmail.com> (Noam Postavsky's message of "Thu, 25 Oct 2018 18:56:14 -0400")
> the copyright assignment that I signed in February.
Hmm, something has gone wrong then, I don't see it listed. Eli, what's
the procedure for resolving this?
> ;;;###autoload
> (define-derived-mode madx-mode fundamental-mode "madx"
> "Major mode for editing Methodical Accelerator Design X script files."
> (make-local-variable 'font-lock-defaults)
> (setq font-lock-defaults '(madx-font-lock-keywords nil t))
The make-local-variable isn't needed since font-lock-defaults
"Automatically becomes buffer-local when set".
> ;; Enable syntax highlighting
> ;;;###autoload
> (global-font-lock-mode t)
> ;;;###autoload
> (setq font-lock-maximum-decoration t)
These shouldn't go in a library file, they're user preferences (and
already the default anyway).
> ;; Highlighting .madx and .seq buffers
> ;;;###autoload
> (setq auto-mode-alist (append '(("\\.\\(\\(madx\\)\\|\\(seq\\)\\)$" . madx-mode))
> auto-mode-alist))
It's better to use add-to-list here, so that loading the file multiple
times won't keep adding entries to auto-mode-alist. Also, the regex has
some redundant grouping and you should use \\' (end of string) rather
than $ (end of line).
(add-to-list 'auto-mode-alist '("\\.\\(madx\\|seq\\)\\'" . madx-mode))
next prev parent reply other threads:[~2018-10-25 23:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 11:00 bug#31289: madx mode for emacs Oscar Blanco
2018-06-22 0:50 ` Noam Postavsky
2018-10-05 6:52 ` Oscar Blanco
2018-10-24 22:30 ` Noam Postavsky
2018-10-25 22:56 ` Noam Postavsky
2018-10-25 23:18 ` Noam Postavsky [this message]
2018-10-26 6:42 ` Eli Zaretskii
2018-10-27 3:27 ` Richard Stallman
2018-10-26 10:41 ` Noam Postavsky
2018-10-26 10:53 ` Noam Postavsky
2018-10-27 10:53 ` Noam Postavsky
2019-09-28 18:13 ` Stefan Kangas
2019-09-28 18:46 ` Noam Postavsky
2019-09-28 18:55 ` Stefan Kangas
2020-01-15 20:26 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7n1lio5.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=31289@debbugs.gnu.org \
--cc=orblancog@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).