Show
Ignore:
Timestamp:
05/13/06 11:31:18 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/emacs-lisp/syntax.el

    r4037 r4079  
    2828;; The main exported function is `syntax-ppss'.  You might also need 
    2929;; to call `syntax-ppss-flush-cache' or to add it to 
    30 ;; after-change-functions'(although this is automatically done by 
     30;; before-change-functions'(although this is automatically done by 
    3131;; syntax-ppss when needed, but that might fail if syntax-ppss is 
    32 ;; called in a context where after-change-functions is temporarily 
     32;; called in a context where before-change-functions is temporarily 
    3333;; let-bound to nil). 
    3434 
     
    9595      (setcar syntax-ppss-last nil))) 
    9696  ;; Unregister if there's no cache left.  Sadly this doesn't work 
    97   ;; because `after-change-functions' is temporarily bound to nil here. 
     97  ;; because `before-change-functions' is temporarily bound to nil here. 
    9898  ;; (unless syntax-ppss-cache 
    99   ;;   (remove-hook 'after-change-functions 
    100   ;;             'syntax-ppss-after-change-function t)) 
     99  ;;   (remove-hook 'before-change-functions 'syntax-ppss-flush-cache t)) 
    101100  ) 
    102101 
     
    149148                 ;; in (nth 9 old-ppss), but that doesn't seem to happen in 
    150149                 ;; practice and it would complicate this code (and the 
    151                  ;; after-change-function code even more).  But maybe it 
     150                 ;; before-change-function code even more).  But maybe it 
    152151                 ;; would be useful in "degenerate" cases such as when the 
    153152                 ;; whole file is wrapped in a set of parenthesis. 
     
    177176              (if cache (setq pt-min (caar cache) ppss (cdar cache))) 
    178177 
    179               ;; Setup the after-change function if necessary. 
     178              ;; Setup the before-change function if necessary. 
    180179              (unless (or syntax-ppss-cache syntax-ppss-last) 
    181                 (add-hook 'after-change-functions 
    182                           'syntax-ppss-flush-cache nil t)) 
     180                (add-hook 'before-change-functions 
     181                          'syntax-ppss-flush-cache t t)) 
    183182 
    184183              ;; Use the best of OLD-POS and CACHE.