summaryrefslogtreecommitdiff
path: root/lisp/progmodes/prog-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/prog-mode.el')
-rw-r--r--lisp/progmodes/prog-mode.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 407466932d9..5037020f94e 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -35,6 +35,13 @@
"Generic programming mode, from which others derive."
:group 'languages)
+(defcustom prog-mode-hook nil
+ "Normal hook run when entering programming modes."
+ :type 'hook
+ :options '(flyspell-prog-mode abbrev-mode flymake-mode linum-mode
+ prettify-symbols-mode)
+ :group 'prog-mode)
+
(defvar prog-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [?\C-\M-q] 'prog-indent-sexp)
@@ -116,7 +123,7 @@ support it."
(font-lock-add-keywords nil prettify-symbols--keywords)
(setq-local font-lock-extra-managed-props
(cons 'composition font-lock-extra-managed-props))
- (font-lock-fontify-buffer))
+ (font-lock-flush))
;; Turn off
(when prettify-symbols--keywords
(font-lock-remove-keywords nil prettify-symbols--keywords)