diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 12:29:42 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 12:29:42 +0000 |
commit | f1180544bb5ff44cdb45b8734734294b0a2fa7a4 (patch) | |
tree | 626b0db999b924834efc1f437eb47776ea6bd797 /lisp/jit-lock.el | |
parent | 37d1e6800ca66b7977ebafb51ddb31a9de077e15 (diff) | |
download | emacs-f1180544bb5ff44cdb45b8734734294b0a2fa7a4.tar.gz |
Trailing whitespace deleted.
Diffstat (limited to 'lisp/jit-lock.el')
-rw-r--r-- | lisp/jit-lock.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 2f832bf3dad..b143393c867 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -38,7 +38,7 @@ (progn ,@body) (unless ,modified (restore-buffer-modified-p nil)))))) - + (defmacro with-buffer-prepared-for-jit-lock (&rest body) "Execute BODY in current buffer, overriding several variables. Preserves the `buffer-modified-p' state of the current buffer." @@ -52,7 +52,7 @@ Preserves the `buffer-modified-p' state of the current buffer." buffer-file-truename) ,@body)))) - + ;;; Customization. @@ -82,9 +82,9 @@ To reduce machine load during stealth fontification, at the cost of stealth taking longer to fontify, you could increase the value of this variable. See also `jit-lock-stealth-load'." :type '(choice (const :tag "never" nil) - (number :tag "seconds")) + (number :tag "seconds")) :group 'jit-lock) - + (defcustom jit-lock-stealth-load (if (condition-case nil (load-average) (error)) 200) @@ -325,7 +325,7 @@ Defaults to the whole buffer. END can be out of bounds." ;; stop at the start of the line following NEXT. (goto-char next) (setq next (line-beginning-position 2)) (goto-char start) (setq start (line-beginning-position)) - + ;; Fontify the chunk, and mark it as fontified. ;; We mark it first, to make sure that we don't indefinitely ;; re-execute this fontification if an error occurs. @@ -378,7 +378,7 @@ Value is nil if there is nothing more to fontify." ((< (- around start) (- next around)) start) (t next)))) result)))) - + (defun jit-lock-stealth-fontify () "Fontify buffers stealthily. @@ -393,7 +393,7 @@ This functions is called after Emacs has been idle for (while (and buffers (not (input-pending-p))) (let ((buffer (car buffers))) (setq buffers (cdr buffers)) - + (with-current-buffer buffer (when jit-lock-mode ;; This is funny. Calling sit-for with 3rd arg non-nil @@ -447,14 +447,14 @@ This functions is called after Emacs has been idle for (while (and (setq start (jit-lock-stealth-chunk-start point)) (sit-for nice)) - + ;; fontify a block. (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) ;; If stealth jit-locking is done backwards, this leads to ;; excessive O(n^2) refontification. -stef ;; (when (>= jit-lock-first-unfontify-pos start) ;; (setq jit-lock-first-unfontify-pos end)) - + ;; Wait a little if load is too high. (when (and jit-lock-stealth-load (> (car (load-average)) jit-lock-stealth-load)) @@ -489,7 +489,7 @@ This functions is called after Emacs has been idle for (sit-for 0) ;; (message "Jit-Defer Done") ))) - + (defun jit-lock-after-change (start end old-len) "Mark the rest of the buffer as not fontified after a change. @@ -508,7 +508,7 @@ will take place when text is fontified stealthily." ;; be inconsistent with the buffer's content. (goto-char start) (setq start (line-beginning-position)) - + ;; If we're in text that matches a multi-line font-lock pattern, ;; make sure the whole text will be redisplayed. ;; I'm not sure this is ever necessary and/or sufficient. -stef @@ -516,7 +516,7 @@ will take place when text is fontified stealthily." (setq start (or (previous-single-property-change start 'font-lock-multiline) (point-min)))) - + ;; Make sure we change at least one char (in case of deletions). (setq end (min (max end (1+ start)) (point-max))) ;; Request refontification. @@ -525,7 +525,7 @@ will take place when text is fontified stealthily." (when jit-lock-first-unfontify-pos (setq jit-lock-first-unfontify-pos (min jit-lock-first-unfontify-pos start)))))) - + (provide 'jit-lock) ;;; jit-lock.el ends here |