Accept internal time format for SECS arg.
(timer-relative-time): Doc fix.
* jit-lock.el: "Stealth fontification by requeuing timers" patch,
adapted from Martin Rudalics.
(jit-lock-stealth-repeat-timer, jit-lock-stealth-buffers): New vars.
(jit-lock-mode): Create jit-lock-stealth-repeat-timer.
(jit-lock-stealth-fontify): Reschedule as a idle timer instead of
using sit-for.
(jit-lock-start, jit-lock-end): New dynamic scoped vars.
(jit-lock-after-change-extend-region-functions): New hook.
(jit-lock-after-change): Use it instead of hard-coding font-lock code.
(with-buffer-unmodified, with-buffer-prepared-for-jit-lock):
Add edebug info.
(jit-lock-mode): Setup/cancel the new timer.
(jit-lock-context-fontify): New fun. Extracted from
context fontification code of jit-lock-stealth-fontify.
(jit-lock-stealth-fontify): Don't do context fontification any more.
(jit-lock-defer-timer, jit-lock-buffers): New vars.
(jit-lock-mode): Initialize them. Cancel the timers more carefully.
(jit-lock-function): Defer fontification if requested.
(jit-lock-stealth-chunk-start): Pay attention to the new non-nil value.
(jit-lock-stealth-fontify): Check the new `jit-lock-defer-multiline'
text property.
(jit-lock-deferred-fontify): New fun.
(jit-lock-functions): Make buffer-local.
(jit-lock-saved-fontify-buffer-function): Remove.
(jit-lock-mode): Remove autoload cookie.
Remove font-lock specific code.
(jit-lock-unregister): Don't bother handling complex hooks any more.
(jit-lock-refontify): New function.
(jit-lock-fontify-buffer): Use it.
(jit-lock-function-1): Replaced by jit-lock-fontify-now.
(jit-lock-fontify-now): Renamed from jit-lock-function-1.
Add optional args START and END.
Never call font-lock-fontify-region directly.
(jit-lock-function, jit-lock-stealth-fontify): Use it.
(jit-lock-mode): Make sure font-lock-keywords-only is bound before use.
(jit-lock-functions): New var.
(jit-lock-function-1): Use it if non-nil.
Don't switch the syntax-table. Don't set parse-sexp-lookup-properties.
Set the `fontified' property before doing the fontification to avoid
repeatedly going through the same error.
Don't turn errors into messages.
Renamed from with-buffer-prepared-for-font-lock and use
inhibit-modification-hooks rather than setting *-change-functions.
Update all functions to use the new name.
(jit-lock-first-unfontify-pos): New semantics (and doc).
(jit-lock-mode): Make non-interactive.
Don't automatically turn on font-lock.
Set jit-lock-first-unfontify-pos to indicate deferred-contextual mode.
Always use jit-lock-after-change.
Remove and restore font-lock-after-change-function.
(turn-on-jit-lock, jit-lock-after-fontify-buffer)
(jit-lock-after-unfontify-buffer): Remove.
(jit-lock-stealth-fontify):
Reset jit-lock-first-unfontify-pos to point-max rather than to nil.
(jit-lock-after-change): Set the `fontified' text-prop to nil.
Use consistent make-local-variable style for font-lock-fontified.
(jit-lock-fontify-buffer):
Don't bother checking for font-lock-mode and jit-lock-mode.
(jit-lock-fontify-buffer): New function for JIT refontification.
(jit-lock-mode): Fix docstring.
Use jit-lock-fontify-buffer for font-lock-fontify-buffer-function.
Remove jit-lock-after-change from the _local_ hook.
(jit-lock-function-1): Fix docstring.
restore-buffer-modified-p.
(with-buffer-prepared-for-font-lock): Use with-buffer-unmodified.
(jit-lock-function, jit-lock-stealth-fontify): Don't use
with-buffer-unmodified.