aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2014-06-13 19:57:18 -0400
committerNoah Misch <noah@leadboat.com>2014-06-13 19:57:18 -0400
commit81300ea4443766aad2631fad8d02d09dd66954a2 (patch)
tree7ea8222129ffdc5be5ac40d08f108a8d7b2617ac /src
parent3f8c23c4d31d4a0e801041733deb2c7cfa577b32 (diff)
downloadpostgresql-81300ea4443766aad2631fad8d02d09dd66954a2.tar.gz
postgresql-81300ea4443766aad2631fad8d02d09dd66954a2.zip
emacs.samples: Reliably override ".dir-locals.el".
Back-patch to 9.4, where .dir-locals.el was introduced.
Diffstat (limited to 'src')
-rw-r--r--src/tools/editors/emacs.samples7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/editors/emacs.samples b/src/tools/editors/emacs.samples
index e469d5525eb..a510afd051b 100644
--- a/src/tools/editors/emacs.samples
+++ b/src/tools/editors/emacs.samples
@@ -30,7 +30,12 @@
(add-hook 'c-mode-hook
(defun postgresql-c-mode-hook ()
(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