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

Re: Another changelog rant



Wichert Akkerman <wichert@wiggy.net> writes:

> Previously Peter S Galbraith wrote:
> > The "mode: debian-changelog" line is still useful for Debian
> > native packages because the mode gets invoked properly when you
> > edit an installed log file,
> > e.g. /usr/share/doc/debiandoc-sgml/changelog.gz (It's not named
> > changelog.Debian.gz so we can't autoload based on the name)
> 
> But you can easily view the type based on a regexp match on the
> first line (vim does that :)

(mapcar #'(lambda (element)
            (setq auto-mode-alist
		  (cons element auto-mode-alist)))
	'(("/linux/.*\\.[ch]\\'"  . linux-c-mode)
	  ("/usr/share/doc/changelog\\..*" . debian-changelog-mode)))

Something along the above in your ~/.emacs or better let dpkg-dev-el
to handle it. But vim's approach is interesting too, I bet emacs will
have this ability added soon. ;)



Reply to: