/[climacs]/climacs/java-syntax-commands.lisp
ViewVC logotype

Diff of /climacs/java-syntax-commands.lisp

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

revision 1.2 by thenriksen, Tue Nov 20 12:59:54 2007 UTC revision 1.3 by thenriksen, Sat Dec 8 08:55:06 2007 UTC
# Line 58  Line 58 
58      ()      ()
59    "Fill paragraph at point. Will have no effect unless there is a    "Fill paragraph at point. Will have no effect unless there is a
60  string at point."  string at point."
61    (let* ((pane (current-window))    (let* ((token (form-around (current-syntax) (offset (point))))
62           (buffer (buffer pane))           (fill-column (auto-fill-column (current-view))))
          (implementation (implementation buffer))  
          (syntax (syntax buffer))  
          (token (form-around syntax (offset (point pane))))  
          (fill-column (auto-fill-column pane))  
          (tab-width (tab-space-count (stream-default-view pane))))  
63      (when (typep token 'string-form)      (when (typep token 'string-form)
64        (with-accessors ((offset1 start-offset)        (with-accessors ((offset1 start-offset)
65                         (offset2 end-offset)) token                         (offset2 end-offset)) token
66          (fill-region (make-instance 'standard-right-sticky-mark          (fill-region (make-buffer-mark (current-buffer) offset1 :right)
67                                      :buffer implementation                       (make-buffer-mark (current-buffer) offset2 :right)
                                     :offset offset1)  
                      (make-instance 'standard-right-sticky-mark  
                                     :buffer implementation  
                                     :offset offset2)  
68                       #'(lambda (mark)                       #'(lambda (mark)
69                           (syntax-line-indentation mark tab-width syntax))                           (syntax-line-indentation
70                              mark (tab-space-count (current-view)) syntax))
71                       fill-column                       fill-column
72                       tab-width                       (tab-space-count (current-view))
73                       syntax                       syntax
74                       t)))))                       t)))))
75    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.5