/[emacs]/emacs/lisp/emacs-lisp/syntax.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/syntax.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by pj, Thu May 2 05:30:01 2002 UTC revision 1.5.2.1 by miles, Fri Apr 4 06:20:16 2003 UTC
# Line 113  avoid a more expansive scan. Line 113  avoid a more expansive scan.
113  Point is at POS when this function returns."  Point is at POS when this function returns."
114    ;; Default values.    ;; Default values.
115    (unless pos (setq pos (point)))    (unless pos (setq pos (point)))
116    ;;    ;;
117    (let ((old-ppss (cdr syntax-ppss-last))    (let ((old-ppss (cdr syntax-ppss-last))
118          (old-pos (car syntax-ppss-last))          (old-pos (car syntax-ppss-last))
119          (ppss nil)          (ppss nil)
# Line 129  Point is at POS when this function retur Line 129  Point is at POS when this function retur
129            (incf (car (aref syntax-ppss-stats 0)))            (incf (car (aref syntax-ppss-stats 0)))
130            (incf (cdr (aref syntax-ppss-stats 0)) (- pos old-pos))            (incf (cdr (aref syntax-ppss-stats 0)) (- pos old-pos))
131            (parse-partial-sexp old-pos pos nil nil old-ppss))            (parse-partial-sexp old-pos pos nil nil old-ppss))
132          
133        (cond        (cond
134         ;; Use OLD-PPSS if possible and close enough.         ;; Use OLD-PPSS if possible and close enough.
135         ((and (not old-pos) old-ppss         ((and (not old-pos) old-ppss
# Line 253  Point is at POS when this function retur Line 253  Point is at POS when this function retur
253                             syntax-ppss-max-span))                             syntax-ppss-max-span))
254                      (push pair syntax-ppss-cache)                      (push pair syntax-ppss-cache)
255                    (setcar syntax-ppss-cache pair)))))))))                    (setcar syntax-ppss-cache pair)))))))))
256          
257        (setq syntax-ppss-last (cons pos ppss))        (setq syntax-ppss-last (cons pos ppss))
258        ppss)))        ppss)))
259    
# Line 282  Point is at POS when this function retur Line 282  Point is at POS when this function retur
282  ;;   (with-current-buffer (or buffer (current-buffer))  ;;   (with-current-buffer (or buffer (current-buffer))
283  ;;     (syntax-ppss-depth (syntax-ppss))))  ;;     (syntax-ppss-depth (syntax-ppss))))
284    
 (defun syntax-after (pos)  
   "Return the syntax of the char after POS."  
   (unless (or (< pos (point-min)) (>= pos (point-max)))  
     (let ((st (if parse-sexp-lookup-properties  
                   (get-char-property pos 'syntax-table))))  
       (if (consp st) st  
         (aref (or st (syntax-table)) (char-after pos))))))  
   
285  (provide 'syntax)  (provide 'syntax)
286  ;;; syntax.el ends here  ;;; syntax.el ends here

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26