[Top][All Lists]

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

Re: Changing buffer mode

From: Emanuel Berg
Subject: Re: Changing buffer mode
Date: Fri, 22 Jul 2022 20:21:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

carlmarcos--- via Users list for the GNU Emacs text editor wrote:

> From studying your code and my original code. Do you
> approve of it, or could it be improved a bit more?

It looks good I guess but I don't think it's a good idea to
begin with, I think it's better to let Emacs handle this for
you, and if it doesn't the way you'd expect or like,
configure it, e.g.

;;; -*- lexical-binding: t -*-
;; this file:

(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)
    ("keys\\'"       . conf-mode)
    ("*"             . text-mode)
  ,@auto-mode-alist) )

underground experts united

reply via email to

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