diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfe2b2ee82d..d30fbe87852 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -210,6 +210,15 @@ keysyms rather than byte sequences. (tpu-copy-keyfile): Don't force the user to use tpu-mapper.el. +2007-06-11 Stefan Monnier + + * font-lock.el (font-lock-add-keywords): In case font-lock was only + half-activated, forcefully activate it completely. + +2007-06-11 Richard Stallman + + * cus-edit.el (custom-variable-type): Doc fix. + 2007-06-11 Stefan Monnier * progmodes/sh-script.el (sh-font-lock-backslash-quote) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 4dae3bab018..0984fc73e43 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2500,7 +2500,8 @@ However, setting it through Custom sets the default value.") (defun custom-variable-type (symbol) "Return a widget suitable for editing the value of SYMBOL. If SYMBOL has a `custom-type' property, use that. -Otherwise, look up symbol in `custom-guess-type-alist'." +Otherwise, try matching SYMBOL against `custom-guess-name-alist' and +try matching its doc string against `custom-guess-doc-alist'." (let* ((type (or (get symbol 'custom-type) (and (not (get symbol 'standard-value)) (custom-guess-type symbol)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c826a5f20c6..265cc4bf682 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -698,6 +698,14 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', ;; contain the new keywords. (font-lock-update-removed-keyword-alist mode keywords how)) (t + (when (and font-lock-mode + (not (or font-lock-keywords font-lock-defaults))) + ;; The major mode has not set any keywords, so when we enabled + ;; font-lock-mode it only enabled the font-core.el part, not the + ;; font-lock-mode-internal. Try again. + (font-lock-mode -1) + (set (make-local-variable 'font-lock-defaults) '(nil t)) + (font-lock-mode 1)) ;; Otherwise set or add the keywords now. ;; This is a no-op if it has been done already in this buffer ;; for the correct major mode.