--- a/keyboardMacros.rc Tue Jun 03 18:46:11 2008 +0200
+++ b/keyboardMacros.rc Thu Jun 05 12:05:57 2008 +0200
@@ -500,6 +500,28 @@
]
'.
+macros at:#SingleQuoteSelection put:'
+ "place single quotes around the selected text"
+
+ |line1 col1 line2 col2|
+
+ line1 := self selectionStartLine.
+ col1 := self selectionStartCol.
+ line2 := self selectionEndLine.
+ col2 := self selectionEndCol.
+ (line1 notNil
+ and:[ col1 notNil
+ and:[ line2 notNil
+ and:[ col2 notNil ]]])
+ ifTrue:[
+ self insertString:Character quote asString atLine:line2 col:col2+1.
+ self insertString:Character quote asString atLine:line1 col:col1.
+ self selectFromLine:line1 col:col1 toLine:line2 col:col2+2.
+ ] ifFalse:[
+ self beep.
+ ]
+'.
+
"/macros keys do:[:k |
"/ Transcript showCR:k.
"/].