comparison lisp/emacs-lisp/syntax.el @ 49598:0d8b17d428b5

Trailing whitepace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 13:24:35 +0000
parents c4da69acaa79
children 9bf93e387b5e d7ddb3e565de
comparison
equal deleted inserted replaced
49597:e88404e8f2cf 49598:0d8b17d428b5
111 in OLP-PPSS (with or without its corresponding OLD-POS) to try and 111 in OLP-PPSS (with or without its corresponding OLD-POS) to try and
112 avoid a more expansive scan. 112 avoid a more expansive scan.
113 Point is at POS when this function returns." 113 Point is at POS when this function returns."
114 ;; Default values. 114 ;; Default values.
115 (unless pos (setq pos (point))) 115 (unless pos (setq pos (point)))
116 ;; 116 ;;
117 (let ((old-ppss (cdr syntax-ppss-last)) 117 (let ((old-ppss (cdr syntax-ppss-last))
118 (old-pos (car syntax-ppss-last)) 118 (old-pos (car syntax-ppss-last))
119 (ppss nil) 119 (ppss nil)
120 (pt-min (point-min))) 120 (pt-min (point-min)))
121 (if (and old-pos (> old-pos pos)) (setq old-pos nil)) 121 (if (and old-pos (> old-pos pos)) (setq old-pos nil))
127 (1+ (car (aref syntax-ppss-stats 5))))))) 127 (1+ (car (aref syntax-ppss-stats 5)))))))
128 (progn 128 (progn
129 (incf (car (aref syntax-ppss-stats 0))) 129 (incf (car (aref syntax-ppss-stats 0)))
130 (incf (cdr (aref syntax-ppss-stats 0)) (- pos old-pos)) 130 (incf (cdr (aref syntax-ppss-stats 0)) (- pos old-pos))
131 (parse-partial-sexp old-pos pos nil nil old-ppss)) 131 (parse-partial-sexp old-pos pos nil nil old-ppss))
132 132
133 (cond 133 (cond
134 ;; Use OLD-PPSS if possible and close enough. 134 ;; Use OLD-PPSS if possible and close enough.
135 ((and (not old-pos) old-ppss 135 ((and (not old-pos) old-ppss
136 ;; BEWARE! We rely on the undocumented 9th field. 136 ;; BEWARE! We rely on the undocumented 9th field.
137 ;; The 9th field currently contains the list of positions 137 ;; The 9th field currently contains the list of positions
251 (if (or (null syntax-ppss-cache) 251 (if (or (null syntax-ppss-cache)
252 (> (- (caar syntax-ppss-cache) pos) 252 (> (- (caar syntax-ppss-cache) pos)
253 syntax-ppss-max-span)) 253 syntax-ppss-max-span))
254 (push pair syntax-ppss-cache) 254 (push pair syntax-ppss-cache)
255 (setcar syntax-ppss-cache pair))))))))) 255 (setcar syntax-ppss-cache pair)))))))))
256 256
257 (setq syntax-ppss-last (cons pos ppss)) 257 (setq syntax-ppss-last (cons pos ppss))
258 ppss))) 258 ppss)))
259 259
260 ;; Debugging functions 260 ;; Debugging functions
261 261