Changeset 12599


Ignore:
Timestamp:
Aug 17, 2009, 4:33:08 AM (10 years ago)
Author:
gb
Message:

In PARSE-LISP-LINE-INFO, don't create an ignored region for the
character following one with :CHAR-QUOTE syntax (e.g., #
) if the
quoting character is at the end of a line.

In the "Confirm Listener Input" command, don't send (or try to parse)
the input region if it ends in a #
; just append a #\Newline.

(Eventually sending input that contains a quoted #\Newline will likely
cause the REPL to complain that the symbol whose name is #
is unbound;
this is how SLIME, ILisp, and MCL behave in this rather bizarre case.)

This is all intended to fix ticket:570 .

Location:
trunk/source/cocoa-ide/hemlock/src
Files:
2 edited

Legend:

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

    r12541 r12599  
    327327          (:char-quote
    328328           (mark-after mark)
    329            (push-range (cons (mark-charpos mark) (1+ (mark-charpos mark)))
    330                        line-info)
     329           (let* ((charpos (mark-charpos mark))
     330                  (nextpos (1+ charpos))
     331                  (linelen (line-length (mark-line mark))))
     332             (when (> linelen nextpos)
     333               (push-range (cons charpos nextpos)
     334                           line-info)))
    331335           (mark-after mark))
    332336         
  • trunk/source/cocoa-ide/hemlock/src/listener.lisp

    r12545 r12599  
    322322  (declare (ignore p))
    323323  (if (point-at-prompt-p)
    324       (send-input-region-to-lisp)
     324    (progn
     325      (if (eq (character-attribute :lisp-syntax (previous-character (buffer-end-mark (current-buffer)))) :char-quote)
     326        (let* ((point (current-point)))
     327          (buffer-end point)
     328          (insert-character point #\newline))
     329        (send-input-region-to-lisp)))
    325330      (if (region-active-p)
    326331          (let ((selected-region (current-region nil nil)))
Note: See TracChangeset for help on using the changeset viewer.