/[climacs]/climacs/text-syntax.lisp
ViewVC logotype

Diff of /climacs/text-syntax.lisp

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

revision 1.4 by rstrandh, Mon Jan 17 13:35:52 2005 UTC revision 1.5 by mvilleneuve, Mon Jan 17 23:10:24 2005 UTC
# Line 2  Line 2 
2    
3  ;;;  (c) copyright 2005 by  ;;;  (c) copyright 2005 by
4  ;;;           Robert Strandh (strandh@labri.fr)  ;;;           Robert Strandh (strandh@labri.fr)
5    ;;;  (c) copyright 2005 by
6    ;;;           Matthieu Villeneuve (matthieu.villeneuve@free.fr)
7    
8  ;;; This library is free software; you can redistribute it and/or  ;;; This library is free software; you can redistribute it and/or
9  ;;; modify it under the terms of the GNU Library General Public  ;;; modify it under the terms of the GNU Library General Public
# Line 119  Line 121 
121                 (if (typep (element* paragraphs pos1) 'left-sticky-mark)                 (if (typep (element* paragraphs pos1) 'left-sticky-mark)
122                     (offset (element* paragraphs (1+ pos1)))                     (offset (element* paragraphs (1+ pos1)))
123                     (offset (element* paragraphs pos1))))))))                     (offset (element* paragraphs pos1))))))))
124    
125    (defmethod syntax-line-indentation (mark tab-width (syntax text-syntax))
126      (loop with indentation = 0
127            with mark2 = (clone-mark mark)
128            until (beginning-of-buffer-p mark2)
129            do (previous-line mark2)
130               (setf indentation (line-indentation mark2 tab-width))
131            while (empty-line-p mark2)
132            finally (return indentation)))

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

  ViewVC Help
Powered by ViewVC 1.1.5