[Openmcl-cvs-notifications] r14734 - in /trunk/source/cocoa-ide/hemlock/src: bindings.lisp filecoms.lisp morecoms.lisp

gz at clozure.com gz at clozure.com
Mon Apr 25 18:33:10 CDT 2011


Author: gz
Date: Mon Apr 25 18:33:10 2011
New Revision: 14734

Log:
Add "Insert Date and Time" and "Insert Date", bind the former to c-x c-d.  =
Also bind c-S and c-R same as c-s and c-r, respectively, and bind c-=3D to =
"What Cursor Position"

Modified:
    trunk/source/cocoa-ide/hemlock/src/bindings.lisp
    trunk/source/cocoa-ide/hemlock/src/filecoms.lisp
    trunk/source/cocoa-ide/hemlock/src/morecoms.lisp

Modified: trunk/source/cocoa-ide/hemlock/src/bindings.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/cocoa-ide/hemlock/src/bindings.lisp (original)
+++ trunk/source/cocoa-ide/hemlock/src/bindings.lisp Mon Apr 25 18:33:10 20=
11
@@ -64,7 +64,9 @@
 (bind-key "Select Previous Line" #k"shift-uparrow")
 (bind-key "Query Replace" #k"meta-%")
 (bind-key "Reverse Incremental Search" #k"control-r")
+(bind-key "Reverse Incremental Search" #k"control-R")
 (bind-key "Incremental Search" #k"control-s")
+(bind-key "Incremental Search" #k"control-S")
 (bind-key "Forward Search" #k"meta-s")
 (bind-key "Reverse Search" #k"meta-r")
 (bind-key "Transpose Characters" #k"control-t")
@@ -84,6 +86,8 @@
 (bind-key "Abort Command" #k"control-x control-g")
 (bind-key "Abort Command" #k"control-x control-G")
 =

+;(bind-key "Insert Date" #k"control-x control-d")
+(bind-key "Insert Date and Time" #k"control-x control-d")
 =

 (bind-key "Process File Options" #k"control-x m" :global)
 (bind-key "Ensure File Options Line" #k"control-meta-M" :global)
@@ -93,6 +97,7 @@
 (bind-key "Undo" #k"control-\/")
 (bind-key "Describe Key" #k"meta-?")
 (bind-key "What Cursor Position" #k"control-x =3D")
+(bind-key "What Cursor Position" #k"control-=3D")
 =

 =

 #||
@@ -326,7 +331,9 @@
 (bind-key "Illegal" #k"control-meta-l" :mode "Echo Area")
 (bind-key "Illegal" #k"meta-x" :mode "Echo Area")
 (bind-key "Illegal" #k"control-s" :mode "Echo Area")
+(bind-key "Illegal" #k"control-S" :mode "Echo Area")
 (bind-key "Illegal" #k"control-r" :mode "Echo Area")
+(bind-key "Illegal" #k"control-R" :mode "Echo Area")
 (bind-key "Illegal" #k"hyper-t" :mode "Echo Area")
 =

 =

@@ -917,7 +924,9 @@
       (bind-key "I-Search Self Insert" key :mode "I-Search"))))
 =

 (bind-key "I-Search Repeat Forward" #k"control-s" :mode "I-Search")
+(bind-key "I-Search Repeat Forward" #k"control-S" :mode "I-Search")
 (bind-key "I-Search Repeat Backward" #k"control-r" :mode "I-Search")
+(bind-key "I-Search Repeat Backward" #k"control-R" :mode "I-Search")
 (bind-key "I-Search Backup" #k"backspace" :mode "I-Search")
 (bind-key "I-Search Backup" #k"delete" :mode "I-Search")
 (bind-key "I-Search Abort" #k"control-g" :mode "I-Search")

Modified: trunk/source/cocoa-ide/hemlock/src/filecoms.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/cocoa-ide/hemlock/src/filecoms.lisp (original)
+++ trunk/source/cocoa-ide/hemlock/src/filecoms.lisp Mon Apr 25 18:33:10 20=
11
@@ -657,15 +657,3 @@
     (setf (buffer-writable buffer) t)
     (message "Buffer ~S is now writable." (buffer-name buffer))))
 =

-
-
-
-(defun universal-time-to-string (ut)
-  (multiple-value-bind (sec min hour day month year)
-		       (decode-universal-time ut)
-    (format nil "~2,'0D-~A-~2,'0D ~2,'0D:~2,'0D:~2,'0D"
-	    day (svref '#("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug"
-			  "Sep" "Oct" "Nov" "Dec")
-		       (1- month))
-	    (rem year 100)
-	    hour min sec)))

Modified: trunk/source/cocoa-ide/hemlock/src/morecoms.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/cocoa-ide/hemlock/src/morecoms.lisp (original)
+++ trunk/source/cocoa-ide/hemlock/src/morecoms.lisp Mon Apr 25 18:33:10 20=
11
@@ -47,6 +47,30 @@
   (declare (ignore p))
   (abort-to-toplevel))
 =

+
+(defcommand "Insert Date and Time" (p)
+  "Inserts the current date and time.  With prefix argument, inserts date =
only"
+  (multiple-value-bind (date time) (current-date-time-strings)
+    (let ((point (current-point)))
+      (push-new-buffer-mark point) ;; leave mark at beginning
+      (insert-string point (if p date (format nil "~a ~a" date time))))))
+
+(defcommand "Insert Date" (p)
+  "Inserts the current date.  With prefix argument, inserts date and time"
+  (multiple-value-bind (date time) (current-date-time-strings)
+    (let ((point (current-point)))
+      (push-new-buffer-mark point) ;; leave mark at beginning
+      (insert-string point (if p (format nil "~a ~a" date time) date)))))
+
+(defun current-date-time-strings ()
+  (multiple-value-bind (sec min hour day month year) (get-decoded-time)
+    (values (format nil "~2,'0D-~A-~4D"
+                    day (svref '#("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul=
" "Aug"
+                                  "Sep" "Oct" "Nov" "Dec")
+                               (1- month))
+                    year)
+            (format nil "~2,'0D:~2,'0D:~2,'0D" hour min sec))))
+    =

 ;;;; Casing commands...
 =

 (defcommand "Uppercase Word" (p)



More information about the Openmcl-cvs-notifications mailing list