[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/syntax.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/syntax.el |
Date: |
Wed, 16 Jul 2003 11:17:02 -0400 |
Index: emacs/lisp/emacs-lisp/syntax.el
diff -c emacs/lisp/emacs-lisp/syntax.el:1.7 emacs/lisp/emacs-lisp/syntax.el:1.8
*** emacs/lisp/emacs-lisp/syntax.el:1.7 Tue Feb 4 07:53:34 2003
--- emacs/lisp/emacs-lisp/syntax.el Wed Jul 16 11:17:02 2003
***************
*** 1,6 ****
;;; syntax.el --- helper functions to find syntactic context
! ;; Copyright (C) 2000 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
--- 1,6 ----
;;; syntax.el --- helper functions to find syntactic context
! ;; Copyright (C) 2000, 2003 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
***************
*** 25,31 ****
;;; Commentary:
;; The main exported function is `syntax-ppss'. You might also need
! ;; to call `syntax-ppss-after-change-function' or to add it to
;; after-change-functions'(although this is automatically done by
;; syntax-ppss when needed, but that might fail if syntax-ppss is
;; called in a context where after-change-functions is temporarily
--- 25,31 ----
;;; Commentary:
;; The main exported function is `syntax-ppss'. You might also need
! ;; to call `syntax-ppss-flush-cache' or to add it to
;; after-change-functions'(although this is automatically done by
;; syntax-ppss when needed, but that might fail if syntax-ppss is
;; called in a context where after-change-functions is temporarily
***************
*** 73,79 ****
"Cache of (LAST-POS . LAST-PPSS).")
(make-variable-buffer-local 'syntax-ppss-last)
! (defun syntax-ppss-after-change-function (beg &rest ignored)
;; Flush invalid cache entries.
(while (and syntax-ppss-cache (> (caar syntax-ppss-cache) beg))
(setq syntax-ppss-cache (cdr syntax-ppss-cache)))
--- 73,81 ----
"Cache of (LAST-POS . LAST-PPSS).")
(make-variable-buffer-local 'syntax-ppss-last)
! (defalias 'syntax-ppss-after-change-function 'syntax-ppss-flush-cache)
! (defun syntax-ppss-flush-cache (beg &rest ignored)
! "Flush the cache of `syntax-ppss' starting at position BEG."
;; Flush invalid cache entries.
(while (and syntax-ppss-cache (> (caar syntax-ppss-cache) beg))
(setq syntax-ppss-cache (cdr syntax-ppss-cache)))
***************
*** 106,115 ****
"Parse-Partial-Sexp State at POS.
The returned value is the same as `parse-partial-sexp' except that
the 2nd and 6th values of the returned state cannot be relied upon.
-
- If the caller knows the PPSS of a nearby position, she can pass it
- in OLP-PPSS (with or without its corresponding OLD-POS) to try and
- avoid a more expansive scan.
Point is at POS when this function returns."
;; Default values.
(unless pos (setq pos (point)))
--- 108,113 ----
***************
*** 172,179 ****
;; Setup the after-change function if necessary.
(unless (or syntax-ppss-cache syntax-ppss-last)
! (add-hook 'after-change-functions
! 'syntax-ppss-after-change-function nil t))
;; Use the best of OLD-POS and CACHE.
(if (or (not old-pos) (< old-pos pt-min))
--- 170,176 ----
;; Setup the after-change function if necessary.
(unless (or syntax-ppss-cache syntax-ppss-last)
! (add-hook 'after-change-functions 'syntax-ppss-flush-cache nil t))
;; Use the best of OLD-POS and CACHE.
(if (or (not old-pos) (< old-pos pt-min))
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/syntax.el,
Stefan Monnier <=