Changeset 7899
- Timestamp:
- Dec 12, 2007, 6:05:30 AM (17 years ago)
- Location:
- branches/event-ide/ccl
- Files:
-
- 3 edited
-
cocoa-ide/hemlock/src/indent.lisp (modified) (6 diffs)
-
cocoa-ide/hemlock/src/lispmode.lisp (modified) (2 diffs)
-
level-1/l1-error-system.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/event-ide/ccl/cocoa-ide/hemlock/src/indent.lisp
r7433 r7899 22 22 everywhere in Hemlock yet, so do not change it." 23 23 :value 8) 24 25 (defhvar "Indent with Tabs" 26 "If true, indentation is done using a mixture of tabs and spaces. If false, 27 only spaces are used." 28 :value nil) 29 24 30 25 31 (defun indent-using-tabs (mark column) … … 36 42 37 43 38 (defhvar "Indent with Tabs" 39 "Function that takes a mark and a number of spaces and inserts tabs and spaces 40 to indent that number of spaces using \"Spaces per Tab\"." 41 :value #'indent-using-tabs) 42 43 44 (defun tab-to-tab-stop (mark) 45 (insert-character mark #\tab)) 44 (defun indent-to-column (mark column) 45 "Inserts whitespace to move MARK to COLUMN, assuming mark is at column 0" 46 (if (value indent-with-tabs) 47 (indent-using-tabs mark column) 48 (indent-using-spaces mark column))) 49 50 (defun indent-to-tab-stop (mark) 51 (if (value indent-with-tabs) 52 (insert-character mark #\tab) 53 (let* ((tab (value spaces-per-tab))) 54 (dotimes (i (- tab (mod (mark-column mark) tab))) 55 (insert-character mark #\space))))) 46 56 47 57 (defhvar "Indent Function" 48 58 "Indentation function which is invoked by \"Indent\" command. 49 59 It takes a :left-inserting mark that may be moved." 50 :value #' tab-to-tab-stop)60 :value #'indent-to-tab-stop) 51 61 52 62 … … 61 71 (line-start mark line) 62 72 (delete-horizontal-space mark) 63 ( funcall (value indent-with-tabs)mark indentation))))73 (indent-to-column mark indentation)))) 64 74 65 75 … … 142 152 it is used instead of the \"Fill Column\"." 143 153 "Centers current line using fill-column." 144 (let* ((indent-function (value indent-with-tabs)) 145 (region (if (region-active-p) 154 (let* ((region (if (region-active-p) 146 155 (current-region) 147 156 (region (current-point) (current-point)))) … … 156 165 (if (and (plusp spaces) 157 166 (not (zerop len))) 158 ( funcall indent-function temp (ceiling spaces 2)))167 (indent-to-column temp (ceiling spaces 2))) 159 168 (unless (line-offset temp 1) (return)) 160 169 (line-start temp)))))) … … 290 299 (delete-characters mark1 (- (mark-charpos mark1))) 291 300 (if (plusp new-column) 292 ( funcall (value indent-with-tabs)mark1 new-column)))))301 (indent-to-column mark1 new-column))))) 293 302 (line-offset mark1 1 0))))) -
branches/event-ide/ccl/cocoa-ide/hemlock/src/lispmode.lisp
r7844 r7899 1244 1244 (t 1245 1245 (delete-horizontal-space m) 1246 ( funcall (value indent-with-tabs)m col))))))1246 (indent-to-column m col)))))) 1247 1247 1248 1248 … … 1711 1711 (hack (make-empty-region))) 1712 1712 ;; Generate prefix. 1713 (funcall (value indent-with-tabs) 1714 (region-end hack) (1+ (mark-column mark))) 1713 (indent-to-column (region-end hack) (1+ (mark-column mark))) 1715 1714 ;; Skip opening double quote and fill string starting on its own line. 1716 1715 (mark-after mark) -
branches/event-ide/ccl/level-1/l1-error-system.lisp
r7126 r7899 1020 1020 (mod #x110000) 1021 1021 (array * (* *)) ;2d array 1022 (array * (* * ));3d array1022 (array * (* * *)) ;3d array 1023 1023 (array t) 1024 1024 (array bit)
Note:
See TracChangeset
for help on using the changeset viewer.
