/[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.8 by dholman, Wed Jul 20 09:41:06 2005 UTC revision 1.9 by dmurray, Sat Aug 6 20:51:19 2005 UTC
# Line 148  Line 148 
148                           (incf pos1))                           (incf pos1))
149                          (t nil))))))))                          (t nil))))))))
150    
151    (defmethod backward-paragraph (mark (syntax text-syntax))
   
 (defgeneric beginning-of-paragraph (mark text-syntax))  
   
 (defmethod beginning-of-paragraph (mark (syntax text-syntax))  
152    (with-slots (paragraphs) syntax    (with-slots (paragraphs) syntax
153       (let ((pos1 (index-of-mark-after-offset paragraphs (offset mark))))       (let ((pos1 (index-of-mark-after-offset paragraphs (offset mark))))
154         (when (> pos1 0)         (when (> pos1 0)
# Line 161  Line 157 
157                     (offset (element* paragraphs (- pos1 2)))                     (offset (element* paragraphs (- pos1 2)))
158                     (offset (element* paragraphs (1- pos1)))))))))                     (offset (element* paragraphs (1- pos1)))))))))
159    
160  (defgeneric end-of-paragraph (mark text-syntax))  (defmethod forward-paragraph (mark (syntax text-syntax))
   
 (defmethod end-of-paragraph (mark (syntax text-syntax))  
161    (with-slots (paragraphs) syntax    (with-slots (paragraphs) syntax
162      (let ((pos1 (index-of-mark-after-offset      (let ((pos1 (index-of-mark-after-offset
163                   paragraphs                   paragraphs
# Line 176  Line 170 
170                     (offset (element* paragraphs (1+ pos1)))                     (offset (element* paragraphs (1+ pos1)))
171                     (offset (element* paragraphs pos1))))))))                     (offset (element* paragraphs pos1))))))))
172    
173     (defmethod backward-sentence (mark (syntax text-syntax))
  (defgeneric backward-expression (mark text-syntax))  
   
  (defmethod backward-expression (mark (syntax text-syntax))  
174     (with-slots (sentence-beginnings) syntax     (with-slots (sentence-beginnings) syntax
175        (let ((pos1 (index-of-mark-after-offset sentence-beginnings (offset mark))))        (let ((pos1 (index-of-mark-after-offset sentence-beginnings (offset mark))))
176          (when (> pos1 0)          (when (> pos1 0)
177           (setf (offset mark)           (setf (offset mark)
178                     (offset (element* sentence-beginnings (1- pos1))))))))                     (offset (element* sentence-beginnings (1- pos1))))))))
  (defgeneric forward-expression (mark text-syntax))  
179    
180   (defmethod forward-expression (mark (syntax text-syntax))   (defmethod forward-sentence (mark (syntax text-syntax))
181     (with-slots (sentence-endings) syntax     (with-slots (sentence-endings) syntax
182       (let ((pos1 (index-of-mark-after-offset       (let ((pos1 (index-of-mark-after-offset
183                    sentence-endings                    sentence-endings

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.5