Changeset 569
- Timestamp:
- Feb 26, 2004, 11:58:06 AM (21 years ago)
- Location:
- trunk/ccl
- Files:
-
- 14 edited
-
examples/cocoa-editor.lisp (modified) (3 diffs)
-
examples/cocoa-listener.lisp (modified) (2 diffs)
-
examples/cocoa-window.lisp (modified) (3 diffs)
-
examples/hemlock-textstorage.lisp (modified) (15 diffs)
-
hemlock/src/bindings.lisp (modified) (1 diff)
-
hemlock/src/buffer.lisp (modified) (1 diff)
-
hemlock/src/cocoa-hemlock.lisp (modified) (1 diff)
-
hemlock/src/filecoms.lisp (modified) (1 diff)
-
hemlock/src/htext1.lisp (modified) (2 diffs)
-
hemlock/src/htext2.lisp (modified) (1 diff)
-
hemlock/src/htext3.lisp (modified) (2 diffs)
-
hemlock/src/modeline.lisp (modified) (1 diff)
-
hemlock/src/struct.lisp (modified) (1 diff)
-
level-1/l1-readloop.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/cocoa-editor.lisp
r568 r569 95 95 (define-objc-method ((:id init) lisp-editor-document) 96 96 (let* ((doc (send-super 'init))) 97 (setf (slot-value doc 'textstorage) 98 (make-textstorage-for-hemlock-buffer 99 (hemlock-buffer-from-nsstring 100 #@"" 101 (lisp-string-from-nsstring (send doc 'display-name)) 102 "Lisp"))) 97 (unless (%null-ptr-p doc) 98 (let* ((buffer (hi::make-buffer 99 (lisp-string-from-nsstring (send doc 'display-name)) 100 :modes '("Lisp")))) 101 (setf (slot-value doc 'textstorage) 102 (make-textstorage-for-hemlock-buffer 103 buffer) 104 (hi::buffer-document buffer) doc))) 103 105 doc)) 104 106 107 108 (define-objc-method ((:id :read-from-file filename 109 :of-type type) 110 lisp-editor-document) 111 (declare (ignorable type)) 112 (let* ((pathname (lisp-string-from-nsstring filename)) 113 (buffer-name (hi::pathname-to-buffer-name pathname)) 114 (buffer (hi::make-buffer buffer-name)) 115 (data (make-objc-instance 'ns:ns-data 116 :with-contents-of-file filename)) 117 (string (make-objc-instance 'ns:ns-string 118 :with-data data 119 :encoding #$NSMacOSRomanStringEncoding))) 120 (setf (hi::buffer-pathname buffer) pathname) 121 (nsstring-to-buffer string buffer) 122 (hi::buffer-start (hi::buffer-point buffer)) 123 (setf (hi::buffer-modified buffer) nil) 124 (hi::process-file-options buffer pathname) 125 (setf (slot-value self 'textstorage) 126 (make-textstorage-for-hemlock-buffer buffer) 127 (hi::buffer-document buffer) (%setf-macptr (%null-ptr) self)))) 128 129 130 131 (define-objc-method ((:id :data-representation-of-type type) 132 lisp-editor-document) 133 (declare (ignorable type)) 134 (send (send (slot-value self 'text-view) 'string) 135 :data-using-encoding #$NSASCIIStringEncoding 136 :allow-lossy-conversion t)) 105 137 106 138 (define-objc-method ((:void make-window-controllers) lisp-editor-document) … … 110 142 (slot-value self 'textstorage) nil nil)))) 111 143 (send self :add-window-controller controller) 112 (send controller 'release))) 113 114 (define-objc-method ((:<BOOL> :load-data-representation data :of-type type) 115 lisp-editor-document) 116 (declare (ignorable data type)) 117 (let* ((nsstring 118 nil) 119 120 121 (define-objc-method ((:id :data-representation-of-type ((* :char) type)) 122 lisp-editor-document) 123 (declare (ignorable type)) 124 (send (send (slot-value self 'text-view) 'string) 125 :data-using-encoding #$NSASCIIStringEncoding 126 :allow-lossy-conversion t)) 127 128 144 (send controller 'release))) 129 145 130 146 #| … … 174 190 (define-objc-method ((:void close) lisp-editor-document) 175 191 (send-super 'close) 192 (let* ((textstorage (slot-value self 'textstorage))) 193 (setf (slot-value self 'textstorage) (%null-ptr)) 194 (unless (%null-ptr-p textstorage) 195 (close-hemlock-textstorage textstorage))) 176 196 (let* ((info (info-from-document self))) 177 197 (when info -
trunk/ccl/examples/cocoa-listener.lisp
r568 r569 297 297 298 298 299 299 ) 300 300 ;;; The LispListenerDocument class. 301 301 … … 305 305 (:metaclass ns:+ns-object)) 306 306 307 #-hemlock 308 (progn 307 309 (define-objc-class-method ((:id top-listener) lisp-listener-document) 308 310 (let* ((all-documents (send *NSApp* 'ordered-Documents))) -
trunk/ccl/examples/cocoa-window.lisp
r568 r569 271 271 (defparameter *default-font-size* 12.0e0) 272 272 273 (defparameter *font-attribute-names* 274 '((:bold . #.#$NSBoldFontMask) 275 (:italic . #.#$NSItalicFontMask) 276 (:small-caps . #.#$NSSmallCapsFontMask))) 273 277 274 278 ;;; Try to find the specified font. If it doesn't exist (or isn't 275 279 ;;; fixed-pitch), try to find a fixed-pitch font of the indicated size. 276 280 (defun default-font (&key (name *default-font-name*) 277 (size *default-font-size*)) 281 (size *default-font-size*) 282 (attributes ())) 283 278 284 (setq size (float size 0.0f0)) 279 285 (with-cstrs ((name name)) … … 284 290 (let* ((fontname (send (@class ns-string) :string-with-c-string name)) 285 291 (font (send (@class ns-font) 286 :font-with-name fontname :matrix matrix))) 292 :font-with-name fontname :matrix matrix)) 293 (implemented-attributes ())) 287 294 (if (or (%null-ptr-p font) 288 295 (and … … 291 298 (setq font (send (@class ns-font) 292 299 :user-fixed-pitch-font-of-size size))) 293 font))))) 300 (when attributes 301 (dolist (attr-name attributes) 302 (let* ((pair (assoc attr-name *font-attribute-names*)) 303 (newfont)) 304 (when pair 305 (setq newfont 306 (send 307 (send (@class "NSFontManager") 'shared-font-manager) 308 :convert-font font 309 :to-have-trait (cdr pair))) 310 (unless (eql font newfont) 311 (setq font newfont) 312 (push attr-name implemented-attributes)))))) 313 (values font implemented-attributes)))))) 294 314 295 315 (defparameter *tab-width* 8) -
trunk/ccl/examples/hemlock-textstorage.lisp
r568 r569 224 224 (unless (eq buffer hi::*current-buffer*) 225 225 (setf (hi::current-buffer) buffer)) 226 (let* ((pane (text-view-pane self))) 227 (unless (eql pane (hi::current-window)) 228 (setf (hi::current-window) pane))) 229 #+debug 230 (format t "~& key-event = ~s" key-event) 226 231 (hi::interpret-key-event key-event info)))))))) 227 232 … … 242 247 243 248 (defun make-textstorage-for-hemlock-buffer (buffer) 244 (setf (hi::buffer-text-storage buffer) 245 (make-objc-instance 'lisp-text-storage 246 :with-string 247 (make-instance 248 'hemlock-buffer-string 249 :display 250 (reset-display-cache 251 (make-hemlock-display) 252 buffer))))) 249 (make-objc-instance 'lisp-text-storage 250 :with-string 251 (make-instance 252 'hemlock-buffer-string 253 :display 254 (reset-display-cache 255 (make-hemlock-display) 256 buffer)))) 253 257 254 258 (defclass modeline-view (ns:ns-view) … … 257 261 258 262 259 (defloadvar *modeline-text-attributes* 260 (create-text-attributes :color (send (@class "NSColor") 'black-color) 261 :font (default-font 262 :name "Courier New Bold Italic" 263 :size 10.0))) 263 (defloadvar *modeline-text-attributes* nil) 264 (defparameter *modeline-font-name* "Courier New Bold Italic") 265 (defparameter *modeline-font-size* 10.0) 264 266 265 267 (defun buffer-for-modeline-view (mv) … … 279 281 (buffer (buffer-for-modeline-view modeline-view))) 280 282 (when buffer 283 ;; You don't want to know why this is done this way. 284 (unless *modeline-text-attributes* 285 (setq *modeline-text-attributes* 286 (create-text-attributes :color (send (@class "NSColor") 'black-color) 287 :font (default-font 288 :name *modeline-font-name* 289 :size *modeline-font-size*)))) 290 281 291 (let* ((string 282 292 (apply #'concatenate 'string … … 470 480 471 481 (defun new-hemlock-document-window (&key 472 (x 0.0)473 (y 0.0)482 (x 200.0) 483 (y 200.0) 474 484 (height 200.0) 475 485 (width 500.0) … … 537 547 (defun hemlock-buffer-from-nsstring (nsstring name &rest modes) 538 548 (let* ((buffer (hi::make-buffer name :modes modes))) 549 (nsstring-to-buffer nsstring buffer))) 550 551 (defun nsstring-to-buffer (nsstring buffer) 539 552 (hi::delete-region (hi::buffer-region buffer)) 540 553 (hi::modifying-buffer buffer) … … 542 555 (let* ((string-len (send nsstring 'length)) 543 556 (line-start 0) 557 (first-line-terminator ()) 544 558 (first-line (hi::mark-line mark)) 545 559 (previous first-line) … … 550 564 (do* ((number (+ (hi::line-number first-line) hi::line-increment) 551 565 (+ number hi::line-increment))) 552 ((= line-start string-len)) 566 ((= line-start string-len) 567 (let* ((line (hi::mark-line mark))) 568 (hi::insert-string mark (make-string 0)) 569 (setf (hi::line-next previous) line 570 (hi::line-previous line) previous)) 571 nil) 553 572 (setf (pref remaining-range :<NSR>ange.location) line-start) 554 573 (send nsstring … … 558 577 :for-range remaining-range) 559 578 (let* ((contents-end (pref contents-end-index :unsigned)) 579 (line-end (pref line-end-index :unsigned)) 560 580 (chars (make-string (- contents-end line-start)))) 561 581 (do* ((i line-start (1+ i)) … … 563 583 ((= i contents-end)) 564 584 (setf (schar chars j) (code-char (send nsstring :character-at-index i)))) 585 (unless first-line-terminator 586 (let* ((terminator (code-char 587 (send nsstring :character-at-index 588 contents-end)))) 589 (setq first-line-terminator 590 (case terminator 591 (#\return (if (= line-end (+ contents-end 2)) 592 :cp/m 593 :mac)) 594 (t :unix))))) 565 595 (if (eq previous first-line) 566 596 (progn … … 577 607 (setf (hi::line-next previous) line) 578 608 (setq previous line)))) 579 (setq line-start (pref line-end-index :unsigned)))))))) 609 (setq line-start line-end))))) 610 (when first-line-terminator 611 (setf (hi::buffer-external-format buffer) first-line-terminator)))) 580 612 (setf (hi::buffer-modified buffer) nil) 581 buffer)) 582 613 buffer) 614 615 616 617 618 583 619 (setq hi::*beep-function* #'(lambda (stream) 584 620 (declare (ignore stream)) … … 616 652 (funcall f tv))))))))) 617 653 618 (defun hi::textstorage-begin-editing (textstorage) 619 (send textstorage 'begin-editing)) 620 621 (defun hi::textstorage-end-editing (textstorage) 622 (send textstorage 'end-editing)) 623 624 (defun hi::textstorage-set-point-position (textstorage) 625 (let* ((string (send textstorage 'string)) 654 (defun hi::document-begin-editing (document) 655 (send (slot-value document 'textstorage) 'begin-editing)) 656 657 (defun hi::document-end-editing (document) 658 (send (slot-value document 'textstorage) 'end-editing)) 659 660 (defun hi::document-set-point-position (document) 661 (let* ((textstorage (slot-value document 'textstorage)) 662 (string (send textstorage 'string)) 626 663 (buffer (hemlock-display-buffer (hemlock-buffer-string-display string))) 627 664 (point (hi::buffer-point buffer)) … … 637 674 (defun hi::buffer-note-insertion (buffer mark n) 638 675 (when (hi::bufferp buffer) 639 (let* ((textstorage (hi::buffer-text-storage buffer))) 676 (let* ((document (hi::buffer-document buffer)) 677 (textstorage (if document (slot-value document 'textstorage)))) 640 678 (when textstorage 641 679 (let* ((pos (mark-absolute-position mark))) … … 655 693 :change-in-length 0)))))) 656 694 695 657 696 658 697 (defun hi::buffer-note-deletion (buffer mark n) 659 698 (when (hi::bufferp buffer) 660 (let* ((textstorage (hi::buffer-text-storage buffer))) 699 (let* ((document (hi::buffer-document buffer)) 700 (textstorage (if document (slot-value document 'textstorage)))) 661 701 (when textstorage 662 702 (let* ((pos (mark-absolute-position mark))) … … 671 711 :change-in-length (- n))))))) 672 712 673 713 (defun hi::set-document-modified (document flag) 714 (let* ((windowcontrollers (send document 'window-controllers))) 715 (dotimes (i (send windowcontrollers 'length)) 716 (send (send windowcontrollers :object-at-index i) 717 :set-document-edited flag)))) 718 719 (defun hi::document-panes (document) 720 (let* ((ts (slot-value document 'textstorage)) 721 (panes ())) 722 (for-each-textview-using-storage 723 ts 724 #'(lambda (tv) 725 (let* ((pane (text-view-pane tv))) 726 (unless (%null-ptr-p pane) 727 (push pane panes))))) 728 panes)) 674 729 730 731 -
trunk/ccl/hemlock/src/bindings.lisp
r566 r569 65 65 (bind-key "Scroll Next Window Up" #k"control-meta-V") 66 66 67 (bind-key "Process File Options" #k"control-meta-m") 68 (bind-key "Ensure File Options Line" #k"control-meta-M") 67 69 (bind-key "Help" #k"home") 68 70 (bind-key "Help" #k"control-_") -
trunk/ccl/hemlock/src/buffer.lisp
r6 r569 46 46 (setf (buffer-modified-tick buffer) (tick)) 47 47 (setf (buffer-unmodified-tick buffer) (tick))) 48 (let* ((document (buffer-document buffer))) 49 (if document (set-document-modified document sense))) 48 50 sense) 49 51 -
trunk/ccl/hemlock/src/cocoa-hemlock.lisp
r566 r569 6 6 7 7 (in-package :hemlock-internals) 8 9 (defun buffer-windows (buffer) 10 (let* ((doc (buffer-document buffer))) 11 (when doc 12 (document-panes doc)))) 13 14 (defvar *current-window* ()) 15 16 (defvar *window-list* ()) 17 (defun current-window () 18 "Return the current window. The current window is specially treated by 19 redisplay in several ways, the most important of which is that is does 20 recentering, ensuring that the Buffer-Point of the current window's 21 Window-Buffer is always displayed. This may be set with Setf." 22 *current-window*) 23 24 (defun %set-current-window (new-window) 25 #+not-yet 26 (invoke-hook hemlock::set-window-hook new-window) 27 #+clx 28 (move-mark (window-point *current-window*) 29 (buffer-point (window-buffer *current-window*))) 30 #+clx 31 (move-mark (buffer-point (window-buffer new-window)) 32 (window-point new-window)) 33 (setq *current-window* new-window)) 34 -
trunk/ccl/hemlock/src/filecoms.lisp
r6 r569 212 212 (declare (ignore p)) 213 213 (process-file-options (current-buffer))) 214 215 (defcommand "Ensure File Options Line" (p) 216 "Insert a default file options line at the beginning of the buffer, unless such a line already exists." 217 "Insert a default file options line at the beginning of the buffer, unless such a line already exists." 218 (declare (ignore p)) 219 (let* ((buffer (current-buffer)) 220 (string 221 (line-string (mark-line (buffer-start-mark buffer)))) 222 (found (search "-*-" string)) 223 (end (if found (search "-*-" string :start2 (+ found 3))))) 224 (unless end 225 (let* ((mode (buffer-major-mode buffer))) 226 (unless mode 227 ;; Try to derive the buffer's major mode from its pathname's 228 ;; type. 229 (let* ((pathname (buffer-pathname buffer)) 230 (type (if pathname (pathname-type pathname))) 231 (hook (if type 232 (assoc (string-downcase type) *file-type-hooks* 233 :test #'string=)))) 234 (when hook 235 (funcall (cdr hook) buffer type) 236 (setq mode (buffer-major-mode buffer))))) 237 (with-mark ((mark (buffer-start-mark buffer))) 238 (if (string-equal mode "Lisp") 239 (let* ((package-name 240 (if (hemlock-bound-p 'current-package :buffer buffer) 241 (variable-value 'hemlock::current-package 242 :buffer buffer) 243 "CL-USER"))) 244 (insert-string 245 mark 246 (format nil ";;; -*- Mode: Lisp; Package: ~a -*-" package-name))) 247 (insert-string 248 mark 249 (format nil ";;; -*- Mode: ~a -*-" (or mode "Fundamental")))) 250 (insert-character mark #\NewLine)))) 251 (buffer-start (buffer-point buffer)))) 252 253 254 255 256 257 258 259 260 261 262 263 214 264 215 265 (defcommand "Insert File" (p &optional pathname (buffer (current-buffer))) -
trunk/ccl/hemlock/src/htext1.lisp
r562 r569 162 162 `(incf now-tick)) 163 163 164 (defun buffer- textstorage-begin-editing (buffer)164 (defun buffer-document-begin-editing (buffer) 165 165 (when (bufferp buffer) 166 (let* (( textstorage (buffer-text-storagebuffer)))167 (when textstorage (textstorage-begin-editing textstorage)))))168 169 (defun buffer- textstorage-end-editing (buffer)166 (let* ((document (buffer-document buffer))) 167 (when document (document-begin-editing document))))) 168 169 (defun buffer-document-end-editing (buffer) 170 170 (when (bufferp buffer) 171 (let* (( textstorage (buffer-text-storagebuffer)))172 (when textstorage (textstorage-end-editing textstorage)))))171 (let* ((document (buffer-document buffer))) 172 (when document (document-end-editing document))))) 173 173 174 174 … … 194 194 (unwind-protect 195 195 (progn 196 (if ,bp (buffer- textstorage-begin-editing ,b))196 (if ,bp (buffer-document-begin-editing ,b)) 197 197 (hemlock-ext:without-interrupts ,@forms)) 198 (if ,bp (buffer- textstorage-end-editing ,b))))))198 (if ,bp (buffer-document-end-editing ,b)))))) 199 199 200 200 (defmacro always-change-line (mark new-line) -
trunk/ccl/hemlock/src/htext2.lisp
r562 r569 22 22 (let* ((line (mark-line mark)) 23 23 (buffer (if line (line-%buffer line))) 24 ( textstorage (if buffer (buffer-text-storagebuffer))))24 (document (if buffer (buffer-document buffer)))) 25 25 (if (and buffer 26 26 (eq mark (buffer-point buffer)) 27 textstorage)28 ( textstorage-set-point-position textstorage))27 document) 28 (document-set-point-position document)) 29 29 mark)) 30 30 -
trunk/ccl/hemlock/src/htext3.lisp
r562 r569 27 27 (buffer (line-%buffer line))) 28 28 (modifying-buffer buffer 29 (modifying-line line mark)30 (cond ((char= character #\newline)31 (let* ((next (line-next line))32 (new-chars (subseq (the simple-string *open-chars*)33 0 *left-open-pos*))34 (new-line (make-line :%buffer buffer35 :chars (decf *cache-modification-tick*)36 :previous line37 :next next)))38 (maybe-move-some-marks (charpos line new-line) *left-open-pos*39 (- charpos *left-open-pos*))40 (setf (line-%chars line) new-chars)41 (setf (line-next line) new-line)42 (if next (setf (line-previous next) new-line))43 (number-line new-line)44 (setq *open-line* new-line *left-open-pos* 0)))45 (t46 (if (= *right-open-pos* *left-open-pos*)47 (grow-open-chars))29 (modifying-line line mark) 30 (cond ((char= character #\newline) 31 (let* ((next (line-next line)) 32 (new-chars (subseq (the simple-string *open-chars*) 33 0 *left-open-pos*)) 34 (new-line (make-line :%buffer buffer 35 :chars (decf *cache-modification-tick*) 36 :previous line 37 :next next))) 38 (maybe-move-some-marks (charpos line new-line) *left-open-pos* 39 (- charpos *left-open-pos*)) 40 (setf (line-%chars line) new-chars) 41 (setf (line-next line) new-line) 42 (if next (setf (line-previous next) new-line)) 43 (number-line new-line) 44 (setq *open-line* new-line *left-open-pos* 0))) 45 (t 46 (if (= *right-open-pos* *left-open-pos*) 47 (grow-open-chars)) 48 48 49 (maybe-move-some-marks (charpos line) *left-open-pos*50 (1+ charpos))49 (maybe-move-some-marks (charpos line) *left-open-pos* 50 (1+ charpos)) 51 51 52 (cond53 ((eq (mark-%kind mark) :right-inserting)54 (decf *right-open-pos*)55 (setf (char (the simple-string *open-chars*) *right-open-pos*)56 character))57 (t58 (setf (char (the simple-string *open-chars*) *left-open-pos*)59 character)60 (incf *left-open-pos*)))))61 (buffer-note-insertion buffer mark 1))))52 (cond 53 ((eq (mark-%kind mark) :right-inserting) 54 (decf *right-open-pos*) 55 (setf (char (the simple-string *open-chars*) *right-open-pos*) 56 character)) 57 (t 58 (setf (char (the simple-string *open-chars*) *left-open-pos*) 59 character) 60 (incf *left-open-pos*))))) 61 (buffer-note-insertion buffer mark 1)))) 62 62 63 63 … … 71 71 (declare (simple-string string)) 72 72 (unless (zerop (- end start)) 73 (modifying-buffer buffer 74 (modifying-line line mark) 75 (if (%sp-find-character string start end #\newline) 76 (with-mark ((mark mark :left-inserting)) 77 (do ((left-index start (1+ right-index)) 78 (right-index 79 (%sp-find-character string start end #\newline) 80 (%sp-find-character string (1+ right-index) end #\newline))) 81 ((null right-index) 82 (if (/= left-index end) 83 (insert-string mark string left-index end))) 84 (insert-string mark string left-index right-index) 85 (insert-character mark #\newline))) 86 (let ((length (- end start))) 87 (if (<= *right-open-pos* (+ *left-open-pos* end)) 88 (grow-open-chars (* (+ *line-cache-length* end) 2))) 73 (modifying-buffer 74 buffer 75 (modifying-line line mark) 76 (if (%sp-find-character string start end #\newline) 77 (with-mark ((mark mark :left-inserting)) 78 (do ((left-index start (1+ right-index)) 79 (right-index 80 (%sp-find-character string start end #\newline) 81 (%sp-find-character string (1+ right-index) end #\newline))) 82 ((null right-index) 83 (if (/= left-index end) 84 (insert-string mark string left-index end))) 85 (insert-string mark string left-index right-index) 86 (insert-character mark #\newline))) 87 (let ((length (- end start))) 88 (if (<= *right-open-pos* (+ *left-open-pos* end)) 89 (grow-open-chars (* (+ *line-cache-length* end) 2))) 89 90 90 (maybe-move-some-marks (charpos line) *left-open-pos*91 (+ charpos length))92 (cond93 ((eq (mark-%kind mark) :right-inserting)94 (let ((new (- *right-open-pos* length)))95 (%sp-byte-blt string start *open-chars* new *right-open-pos*)96 (setq *right-open-pos* new)))97 (t98 (let ((new (+ *left-open-pos* length)))99 (%sp-byte-blt string start *open-chars* *left-open-pos* new)100 (setq *left-open-pos* new))))))101 (buffer-note-insertion buffer mark (- end start))))))91 (maybe-move-some-marks (charpos line) *left-open-pos* 92 (+ charpos length)) 93 (cond 94 ((eq (mark-%kind mark) :right-inserting) 95 (let ((new (- *right-open-pos* length))) 96 (%sp-byte-blt string start *open-chars* new *right-open-pos*) 97 (setq *right-open-pos* new))) 98 (t 99 (let ((new (+ *left-open-pos* length))) 100 (%sp-byte-blt string start *open-chars* *left-open-pos* new) 101 (setq *left-open-pos* new)))))) 102 (buffer-note-insertion buffer mark (- end start)))))) 102 103 103 104 -
trunk/ccl/hemlock/src/modeline.lisp
r566 r569 100 100 "Hemlock ")) 101 101 102 (make-modeline-field :name :external-format :width 4 103 :function #'(lambda (buffer window) 104 "Returns indication of buffer's external-format" 105 (declare (ignore window)) 106 (format nil "[~c] " 107 (schar 108 (string (buffer-external-format buffer)) 0)))) 102 (make-modeline-field 103 :name :external-format 104 :function #'(lambda (buffer window) 105 "Returns an indication of buffer's external-format, iff it's 106 other than :DEFAULT" 107 (declare (ignore window)) 108 (let* ((external-format (buffer-external-format buffer))) 109 (case external-format 110 ((:unix nil)) 111 (:mac "[CR] ") 112 (:cp/m "[CRLF] "))))) 113 109 114 110 115 (make-modeline-field -
trunk/ccl/hemlock/src/struct.lisp
r566 r569 96 96 windows ; List of all windows into this buffer. 97 97 #-clx 98 text-storage ; text storageobject associated with this buffer98 document ; NSDocument object associated with this buffer 99 99 var-values ; the buffer's local variables 100 100 variables ; string-table of local variables -
trunk/ccl/level-1/l1-readloop.lisp
r535 r569 158 158 159 159 (defun quit (&optional (exit-status 0)) 160 (unless (typep exit-status '(signed-byte 32)) 161 (report-bad-arg exit-status '(signed-byte 32))) 160 162 (let* ((ip *initial-process*) 161 163 (cp *current-process*))
Note:
See TracChangeset
for help on using the changeset viewer.
