Changeset 12545


Ignore:
Timestamp:
Aug 6, 2009, 6:04:32 PM (10 years ago)
Author:
rme
Message:

In send-input-region-to-lisp: re-indent an IF form. Add a call to
set-charprop-value to make the input region bold after it is entered.
(This will only be visible when using the experimental
xhemlock-text-storage subclass.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/hemlock/src/listener.lisp

    r12428 r12545  
    236236               (top-listener-input-stream))
    237237              (balanced-expressions-in-region input-region))
    238           ;; complete expression: send it to lisp
    239           (let* ((string (region-to-string input-region))
    240                  (ring (value interactive-history)))
    241             (when (and (or (zerop (ring-length ring))
    242                            (string/= string (region-to-string (ring-ref ring 0))))
    243                        (> (length string) (value minimum-interactive-input-length)))
    244               (ring-push (copy-region input-region) ring))
    245             (insert-character (region-end input-region) #\NewLine)
    246             (push (cons r nil) (value input-regions))
    247             (move-mark (value buffer-input-mark) (current-point))
    248             (append-font-regions (current-buffer))
    249             (hemlock-ext:send-string-to-listener (current-buffer) (concatenate 'string string '(#\Newline)))
    250             (buffer-end (current-point)))
    251           ;; incomplete expression: enter a newline
    252           (progn
    253             (insert-character (current-point-for-insertion) #\NewLine))))))
     238        ;; complete expression: send it to lisp
     239        (let* ((string (region-to-string input-region))
     240               (ring (value interactive-history)))
     241          (when (and (or (zerop (ring-length ring))
     242                         (string/= string (region-to-string (ring-ref ring 0))))
     243                     (> (length string) (value minimum-interactive-input-length)))
     244            (ring-push (copy-region input-region) ring))
     245          (insert-character (region-end input-region) #\NewLine)
     246          (push (cons r nil) (value input-regions))
     247          (set-charprop-value (region-start input-region) :font-weight :bold
     248                              :end (region-end input-region))
     249          (move-mark (value buffer-input-mark) (current-point))
     250          (append-font-regions (current-buffer))
     251          (hemlock-ext:send-string-to-listener (current-buffer) (concatenate 'string string '(#\Newline)))
     252          (buffer-end (current-point)))
     253        ;; incomplete expression: enter a newline
     254        (progn
     255          (insert-character (current-point-for-insertion) #\NewLine))))))
    254256
    255257(defun copy-region-to-input (region)
Note: See TracChangeset for help on using the changeset viewer.