Changeset 7899


Ignore:
Timestamp:
Dec 12, 2007, 2:05:30 PM (13 years ago)
Author:
gz
Message:

Update from trunk to rev 7897

Location:
branches/event-ide/ccl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/indent.lisp

    r7433 r7899  
    2222   everywhere in Hemlock yet, so do not change it."
    2323  :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
    2430
    2531(defun indent-using-tabs (mark column)
     
    3642
    3743
    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)))))
    4656
    4757(defhvar "Indent Function"
    4858  "Indentation function which is invoked by \"Indent\" command.
    4959   It takes a :left-inserting mark that may be moved."
    50   :value #'tab-to-tab-stop)
     60  :value #'indent-to-tab-stop)
    5161
    5262
     
    6171      (line-start mark line)
    6272      (delete-horizontal-space mark)
    63       (funcall (value indent-with-tabs) mark indentation))))
     73      (indent-to-column mark indentation))))
    6474
    6575
     
    142152   it is used instead of the \"Fill Column\"."
    143153  "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)
    146155                     (current-region)
    147156                     (region (current-point) (current-point))))
     
    156165          (if (and (plusp spaces)
    157166                   (not (zerop len)))
    158               (funcall indent-function temp (ceiling spaces 2)))
     167              (indent-to-column temp (ceiling spaces 2)))
    159168          (unless (line-offset temp 1) (return))
    160169          (line-start temp))))))
     
    290299                   (delete-characters mark1 (- (mark-charpos mark1)))
    291300                   (if (plusp new-column)
    292                        (funcall (value indent-with-tabs) mark1 new-column)))))
     301                       (indent-to-column mark1 new-column)))))
    293302        (line-offset mark1 1 0)))))
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/lispmode.lisp

    r7844 r7899  
    12441244            (t
    12451245             (delete-horizontal-space m)
    1246              (funcall (value indent-with-tabs) m col))))))
     1246             (indent-to-column m col))))))
    12471247
    12481248
     
    17111711           (hack (make-empty-region)))
    17121712      ;; 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)))
    17151714      ;; Skip opening double quote and fill string starting on its own line.
    17161715      (mark-after mark)
  • branches/event-ide/ccl/level-1/l1-error-system.lisp

    r7126 r7899  
    10201020    (mod #x110000)
    10211021    (array * (* *))                     ;2d array
    1022     (array * (* *))                     ;3d array
     1022    (array * (* * *))                   ;3d array
    10231023    (array t)
    10241024    (array bit)
Note: See TracChangeset for help on using the changeset viewer.