(concat "(" (buffer-string) ")")))))))
(cdr (assq sym mdw-config)))
+;; Local variables hacking.
+
+(defun run-local-vars-mode-hook ()
+ "Run a hook for the major-mode after local variables have been processed."
+ (run-hooks (intern (concat (symbol-name major-mode)
+ "-local-variables-hook"))))
+(add-hook 'hack-local-variables-hook 'run-local-vars-mode-hook)
+
;; Set up the load path convincingly.
(dolist (dir (append (and (boundp 'debian-emacs-flavor)
(or (booleanp value)
(every (lambda (v) (memq v '(?\" ?')))
(if (listp value) value (list value)))))
-(put 'mdw-conf-quote-normal 'safe-local-variable '
- mdw-conf-quote-normal-acceptable-value-p)
+(put 'mdw-conf-quote-normal 'safe-local-variable
+ 'mdw-conf-quote-normal-acceptable-value-p)
(defun mdw-fix-up-quote ()
"Apply the setting of `mdw-conf-quote-normal'."
(if (listp flag) flag (list flag)))
(set-syntax-table table)
(and font-lock-mode (font-lock-fontify-buffer)))))))
-(defun mdw-fix-up-quote-hack ()
- "Unpleasant hack to call `mdw-fix-up-quote' at the right time.
-Annoyingly, `hack-local-variables' is done after `set-auto-mode'
-so we wouldn't see a local-variable setting of
-`mdw-conf-quote-normal' in `conf-mode-hook'. Instead, wire
-ourselves onto `hack-local-variables-hook' here, and check the
-setting once it's actually been made."
- (add-hook 'hack-local-variables-hook 'mdw-fix-up-quote t t))
-(add-hook 'conf-mode-hook 'mdw-fix-up-quote-hack t)
+(add-hook 'conf-mode-local-variables-hook 'mdw-fix-up-quote t t)
;;;--------------------------------------------------------------------------
;;; Shell scripts.