Changeset 8029


Ignore:
Timestamp:
Jan 8, 2008, 8:39:43 PM (12 years ago)
Author:
gz
Message:

Assume 1 special arg for any form starting with "with-". Remove a bunch of
now-redundant defindent's for well-behaved with-xxx forms.

Remove some unteresting #+cmu code, change #+openmcl => #+clozure in a few places.

Make alpha value be optional in gui::color-values-to-nscolor

Remove bindings-gb.lisp (moving the two bindings it contained into
bindings.lisp).

Location:
branches/event-ide/ccl/cocoa-ide
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • branches/event-ide/ccl/cocoa-ide/cocoa-utils.lisp

    r7911 r8029  
    102102  (float number ccl::+cgfloat-zero+))
    103103
    104 (defun color-values-to-nscolor (red green blue alpha)
     104(defun color-values-to-nscolor (red green blue &optional alpha)
    105105  (#/colorWithCalibratedRed:green:blue:alpha: ns:ns-color
    106106                                              (cgfloat red)
    107107                                              (cgfloat green)
    108108                                              (cgfloat blue)
    109                                               (cgfloat alpha)))
     109                                              (cgfloat (or alpha 1.0))))
    110110
    111111(defun windows ()
  • branches/event-ide/ccl/cocoa-ide/compile-hemlock.lisp

    r7993 r8029  
    8989    "symbol-completion"
    9090    "bindings"
    91     "bindings-gb"                       ;Gilbert's bindings
    92     )) 
     91    ))
    9392
    9493(defun compile-hemlock (&optional force)
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/bindings.lisp

    r7993 r8029  
    9292(bind-key "End of Buffer" #k"end")
    9393(bind-key "Undo" #k"control-_")
     94(bind-key "Undo" #k"control-\/")
    9495(bind-key "Describe Key" #k"meta-?")
    9596(bind-key "What Cursor Position" #k"control-x =")
     
    192193(bind-key "Expand Dynamic Abbreviation" #k"meta-`") ;; MCL binding
    193194
     195(bind-key "Help" #k"control-h")
    194196
    195197
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/defsyn.lisp

    r6 r8029  
    6565(setf (character-attribute :word-delimiter
    6666                           #+CMU #\formfeed
    67                            #+(or EXCL sbcl CLISP OpenMCL) #\page) 1)
     67                           #+(or EXCL sbcl CLISP Clozure) #\page) 1)
    6868(setf (character-attribute :word-delimiter #\tab) 1)
    6969(setf (character-attribute :word-delimiter #\newline) 1)
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/fill.lisp

    r7993 r8029  
    6464(setf (character-attribute :paragraph-delimiter #\linefeed) 1)
    6565(setf (character-attribute :paragraph-delimiter
    66                            #+CMU #\formfeed #+(or sbcl EXCL CLISP OpenMCL) #\page) 1)
     66                           #+CMU #\formfeed #+(or sbcl EXCL CLISP Clozure) #\page) 1)
    6767(setf (character-attribute :paragraph-delimiter #\tab) 1)
    6868(setf (character-attribute :paragraph-delimiter #\newline) 1)
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/lispmode.lisp

    r7929 r8029  
    818818  :value 2)
    819819
     820(defhvar "Indent With-anything"
     821  "This is the number of special arguments implicitly assumed to be supplied
     822   in calls to functions whose names begin with \"WITH-\". If set to NIL, this
     823   feature is disabled."
     824  :value 1)
     825
    820826(defvar *special-forms* (make-hash-table :test #'equal))
    821827
     
    833839;;; Hemlock forms.
    834840;;;
    835 (defindent "with-mark" 1)
    836 (defindent "with-random-typeout" 1)
    837 (defindent "with-pop-up-display" 1)
    838841(defindent "defhvar" 1)
    839842(defindent "hlet" 1)
     
    841844(defindent "defattribute" 1)
    842845(defindent "command-case" 1)
    843 (defindent "with-input-from-region" 1)
    844 (defindent "with-output-to-mark" 1)
    845846(defindent "do-strings" 1)
    846847(defindent "save-for-undo" 1)
     
    848849(defindent "do-headers-buffers" 1)
    849850(defindent "do-headers-lines" 1)
    850 (defindent "with-headers-mark" 1)
    851851(defindent "frob" 1) ;cover silly FLET and MACROLET names for Rob and Bill.
    852 (defindent "with-writable-buffer" 1)
    853852
    854853;;; Common Lisp forms.
     
    901900(defindent "unwind-protect" 1)
    902901(defindent "when" 1)
    903 (defindent "with-input-from-string" 1)
    904 (defindent "with-open-file" 1)
    905 (defindent "with-open-stream" 1)
    906 (defindent "with-output-to-string" 1)
    907 (defindent "with-package-iterator" 1)
    908902
    909903;;; Error/condition system forms.
     
    914908(defindent "restart-bind" 1)
    915909(defindent "restart-case" 1)
    916 (defindent "with-simple-restart" 1)
    917910;;; These are for RESTART-CASE branch formatting.
    918911(defindent "store-value" 1)
     
    966959;;; CLOS forms.
    967960;;;
    968 (defindent "with-slots" 1)
    969961(defindent "with-accessors" 2)
    970962(defindent "defclass" 2)
     
    978970
    979971;;; Multiprocessing forms.
    980 (defindent "with-lock-grabbed" 1)
    981972(defindent "process-wait" 1)
    982973
     
    10201011                                 (and (> (length fname) 2)
    10211012                                      (string= fname "DEF" :end1 3)
    1022                                       (value indent-defanything)))))
     1013                                      (value indent-defanything))
     1014                                 (and (> (length fname) 4)
     1015                                      (string= fname "WITH-" :end1 5)
     1016                                      (value indent-with-anything)))))
    10231017          (declare (simple-string fname))
    10241018          ;; Now that we have the form name, did it have special syntax?
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/rompsite.lisp

    r7993 r8029  
    276276   function was defined in.  If it was not defined in some file, nil is
    277277   returned."
    278   #+CMU
    279   (flet ((frob (code)
    280            (let ((info (kernel:%code-debug-info code)))
    281              (when info
    282                (let ((sources (c::debug-info-source info)))
    283                  (when sources
    284                    (let ((source (car sources)))
    285                      (when (eq (c::debug-source-from source) :file)
    286                        (c::debug-source-name source)))))))))
     278  (flet ((true-namestring (path) (namestring (truename path))))
    287279    (typecase function
    288       (symbol (fun-defined-from-pathname (fdefinition function)))
    289       (kernel:byte-closure
    290        (fun-defined-from-pathname (kernel:byte-closure-function function)))
    291       (kernel:byte-function
    292        (frob (c::byte-function-component function)))
    293       (function
    294        (frob (kernel:function-code-header (kernel:%function-self function))))
    295       (t nil)))
    296     #+openmcl
    297     (flet ((true-namestring (path) (namestring (truename path))))
    298       (typecase function
    299         (function (fun-defined-from-pathname (ccl::function-name function)))
    300         (symbol (let* ((info (ccl::%source-files function)))
    301                   (if (atom info)
    302                     (true-namestring info)
    303                     (let* ((finfo (assq 'function info)))
    304                       (when finfo
    305                         (true-namestring
    306                          (if (atom finfo)
    307                            finfo
    308                            (car finfo)))))))))))
     280      (function (fun-defined-from-pathname (ccl:function-name function)))
     281      (symbol (let* ((info (ccl::%source-files function)))
     282                (if (atom info)
     283                  (true-namestring info)
     284                  (let* ((finfo (assq 'function info)))
     285                    (when finfo
     286                      (true-namestring
     287                       (if (atom finfo)
     288                         finfo
     289                         (car finfo)))))))))))
    309290
    310291
Note: See TracChangeset for help on using the changeset viewer.