From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: v. 29.1.1 | Missing syntax colouring option
Date: Thu, 10 Aug 2023 17:44:33 +0200 [thread overview]
Message-ID: <875y5mvr4u.fsf@dataswamp.org> (raw)
In-Reply-To: CAM_8-Cj75vcfY4qHoC2q8QeP8wwSpBgTDHf26rmfgTM+_1Jriw@mail.gmail.com
Ricky Tigg wrote:
> Hello. As a regular Fedora GNU-Linux user I am used to
> gnome-editor.
Welcome to the real world :)
> an option dedicated to set the *coding language* is missing
> from the UI.
You can change mode manually with, e.g. M-x emacs-lisp-mode RET
But it is better to have this done automatically, one way is
to base it on file extensions (suffixes) like this
(setq auto-mode-alist `(
("\\.bal\\'" . balance-mode)
("\\.cl\\'" . common-lisp-mode)
("\\.dat\\'" . gnuplot-mode)
("\\.gpi\\'" . gnuplot-mode)
("\\.grm\\'" . sml-mode)
("\\.lu\\'" . lua-mode)
("\\.nqp\\'" . perl-mode)
("\\.php\\'" . html-mode)
("\\.pic\\'" . nroff-mode)
("\\.pl\\'" . prolog-mode)
("\\.sed\\'" . conf-mode)
("\\.service\\'" . conf-mode)
("\\.tap\\'" . gcode-mode)
("\\.tex\\'" . latex-mode)
("\\.xr\\'" . conf-xdefaults-mode)
("torrc\\'" . conf-mode)
("keys\\'" . conf-mode)
("DOS\\'" . text-mode)
,@auto-mode-alist) )
> The extension of the file I work with is *ps1*. I doubt
> Emacs knows how to determine that the expected code language
> is PowerShell as there is no syntax coloring.
On the contrary, in MELPA there are 4 packages devoted to
PowerShell, one is powershell which provides a "Mode for
editing PowerShell scripts". It is very likely they provide
font lock.
> Having to repeatedly specify the same path is without doubt
> not an option in modern software.
There are many ways to do that, one of the simplest is to not
kill buffers (or the Emacs session) and then simply use the
buffer menu to find files recently in use.
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2023-08-10 15:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 11:18 v. 29.1.1 | Missing syntax colouring option Ricky Tigg
2023-08-10 15:44 ` Emanuel Berg [this message]
2023-08-10 16:08 ` [External] : " Drew Adams
2023-08-10 19:47 ` Emanuel Berg
2023-08-10 17:48 ` Eli Zaretskii
2023-08-10 18:09 ` Emanuel Berg
2023-08-10 19:49 ` Jens Schmidt via Users list for the GNU Emacs text editor
2023-08-10 20:24 ` Emanuel Berg
2023-08-10 19:56 ` Rudolf Schlatte
2023-08-10 20:27 ` Emanuel Berg
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y5mvr4u.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.