emacs.samples: Reliably override ".dir-locals.el".
Back-patch to 9.4, where .dir-locals.el was introduced.
This commit is contained in:
parent
3f8c23c4d3
commit
81300ea444
|
@ -30,7 +30,12 @@
|
||||||
(add-hook 'c-mode-hook
|
(add-hook 'c-mode-hook
|
||||||
(defun postgresql-c-mode-hook ()
|
(defun postgresql-c-mode-hook ()
|
||||||
(when (string-match "/postgres\\(ql\\)?/" buffer-file-name)
|
(when (string-match "/postgres\\(ql\\)?/" buffer-file-name)
|
||||||
(c-set-style "postgresql"))))
|
(c-set-style "postgresql")
|
||||||
|
;; Don't override the style we just set with the style in
|
||||||
|
;; `dir-locals-file'. Emacs 23.4.1 needs this; it is obsolete,
|
||||||
|
;; albeit harmless, by Emacs 24.3.1.
|
||||||
|
(set (make-local-variable 'ignored-local-variables)
|
||||||
|
(append '(c-file-style) ignored-local-variables)))))
|
||||||
|
|
||||||
|
|
||||||
;;; Perl files
|
;;; Perl files
|
||||||
|
|
Loading…
Reference in New Issue