[Openmcl-cvs-notifications] r14209 - in /trunk/source/cocoa-ide/hemlock/src: bindings.lisp lispmode.lisp
rme at clozure.com
rme at clozure.com
Tue Aug 24 00:43:37 CDT 2010
Author: rme
Date: Tue Aug 24 00:43:37 2010
New Revision: 14209
Log:
New Hemlock command "Insert Sharp Comment", bound to M-#.
See ticket:725.
Modified:
trunk/source/cocoa-ide/hemlock/src/bindings.lisp
trunk/source/cocoa-ide/hemlock/src/lispmode.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 Tue Aug 24 00:43:37 20=
10
@@ -403,6 +403,7 @@
(bind-key "Delete Previous Character Expanding Tabs" #k"delete" :mode "Lis=
p")
(bind-key "Goto Absolute Line" #k"meta-g")
;;;(bind-key "Set Package Name" #k"control-x p" :mode "Lisp")
+(bind-key "Insert Sharp Comment" #k"meta-#")
=
#+listener-bindings
(progn
Modified: trunk/source/cocoa-ide/hemlock/src/lispmode.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/lispmode.lisp (original)
+++ trunk/source/cocoa-ide/hemlock/src/lispmode.lisp Tue Aug 24 00:43:37 20=
10
@@ -2284,3 +2284,24 @@
(defcommand "Set Package Name" (p)
(variable-value 'current-package :buffer buffer)
||# =
+
+(defcommand "Insert Sharp Comment" (p)
+ "Inserts #| |# around the selection and puts point between them."
+ (declare (ignore p))
+ (multiple-value-bind (start end) (buffer-selection-range (current-buffer=
))
+ (let ((point (current-point)))
+ (cond ((=3D start end)
+ (insert-string point "#|")
+ (insert-character point #\newline)
+ (insert-character point #\newline)
+ (insert-string point "|#")
+ (character-offset point -3))
+ (t
+ (with-mark ((start-mark point :left-inserting)
+ (end-mark point :left-inserting))
+ (move-to-absolute-position start-mark start)
+ (move-to-absolute-position end-mark end)
+ (insert-string start-mark "#|
+")
+ (insert-string end-mark "
+|#")))))))
More information about the Openmcl-cvs-notifications
mailing list