--- a/keyboard.rc Thu Jun 04 16:55:54 1998 +0200
+++ b/keyboard.rc Thu Jun 04 17:56:33 1998 +0200
@@ -41,118 +41,120 @@
"/
macros at:#F99 put:'
- "replace selection by
- corresponding
- unix commands output"
+ "replace selection by
+ corresponding
+ unix commands output"
- |sel|
+ |sel|
- sel := self selection.
- sel notNil ifTrue:[
- self replace:
- (PipeStream readingFrom:(sel asString))
- contents asString
- ]'.
+ sel := self selection.
+ sel notNil ifTrue:[
+ self replace:
+ (PipeStream readingFrom:(sel asString))
+ contents asString
+ ]'.
"/
"/ macro to toggle tabs
"/
macros at:#F98 put:'
- "toggle between 4-col
- and 8-col tabs"
+ "toggle between 4-col
+ and 8-col tabs"
- (tabPositions == self class tab4Positions)
- ifTrue:[self setTab8]
- ifFalse:[self setTab4]'.
+ (tabPositions == self class tab4Positions)
+ ifTrue:[self setTab8]
+ ifFalse:[self setTab4]'.
"/
"/ macro to get next spelling error, and select it
"/
macros at:#F97 put:'
- |errs thisErr sl sc|
+ |errs thisErr sl sc|
- thisErr := Smalltalk at:#''_thisError''.
- thisErr isNil ifTrue:[
- errs := Smalltalk at:#''_spellOutput''.
- (errs notNil and:[errs notEmpty]) ifTrue:[
- thisErr := errs removeFirst.
- errs isEmpty ifTrue:[Smalltalk removeKey:''_spellOut'']
- ].
- Smalltalk at:#''_lastErrLine'' put:1.
- Smalltalk at:#''_lastErrCol'' put:1.
- ].
- thisErr notNil ifTrue:[
- sl := Smalltalk at:#''_lastErrLine''.
- sc := Smalltalk at:#''_lastErrCol''.
- self searchForwardFor:thisErr
- startingAtLine:sl col:sc
- ifFound:[:fl :fc | self selectWordAtLine:fl col:fc.
- Smalltalk at:#''_lastErrLine'' put:fl.
- Smalltalk at:#''_lastErrCol'' put:fc+1]
- ifAbsent:[self device beep]
- ]'.
+ thisErr := Smalltalk at:#''_thisError''.
+ thisErr isNil ifTrue:[
+ errs := Smalltalk at:#''_spellOutput''.
+ (errs notNil and:[errs notEmpty]) ifTrue:[
+ thisErr := errs removeFirst.
+ errs isEmpty ifTrue:[Smalltalk removeKey:''_spellOut'']
+ ].
+ Smalltalk at:#''_lastErrLine'' put:1.
+ Smalltalk at:#''_lastErrCol'' put:1.
+ ].
+ thisErr notNil ifTrue:[
+ sl := Smalltalk at:#''_lastErrLine''.
+ sc := Smalltalk at:#''_lastErrCol''.
+ self searchForwardFor:thisErr
+ startingAtLine:sl col:sc
+ ifFound:[:fl :fc | self selectWordAtLine:fl col:fc.
+ Smalltalk at:#''_lastErrLine'' put:fl.
+ Smalltalk at:#''_lastErrCol'' put:fc+1]
+ ifAbsent:[self device beep]
+ ]'.
"/
"/ macro to send contents to spell; remember spelling errors
"/ does not work on all systems (some do not have spell ...)
"/
macros at:#F96 put:'
- |p f s|
+ |p f s|
- f := Filename newTemporary. s := f writeStream.
- s nextPutAll:self contents asString.
- s close.
- p := PipeStream readingFrom:''spell '' , f pathName.
- Smalltalk at:#''_spellOutput'' put:p contents asString asCollectionOfLines.
- p close.
- self information:''F7 positions on the next spelling error''.
- '.
+ f := Filename newTemporary. s := f writeStream.
+ s nextPutAll:self contents asString.
+ s close.
+ p := PipeStream readingFrom:''spell '' , f pathName.
+ Smalltalk at:#''_spellOutput'' put:p contents asString asCollectionOfLines.
+ p close.
+ self information:''F7 positions on the next spelling error''.
+ '.
"/
"/ macro to indent by 4
"/
macros at:#F95 put:'
- "indent selected line-range
- by 4 spaces (i.e. to the right)"
+ "indent selected line-range
+ by 4 spaces (i.e. to the right)"
- self selectionStartLine notNil ifTrue:[
- self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
- |line|
+ self selectionStartLine notNil ifTrue:[
+ self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+ |line|
- line := self listAt:lineNr.
- line notNil ifTrue:[
- line notEmpty ifTrue:[
- line := '' '' , line.
- self at:lineNr put:line
- ]
- ]
- ]
+ line := self listAt:lineNr.
+ line notNil ifTrue:[
+ line notEmpty ifTrue:[
+ line := '' '' , line.
+ self withoutRedrawAt:lineNr put:line.
+ self invalidateLine:lineNr.
]
- '.
+ ]
+ ].
+ ]
+ '.
"/
"/ macro to undent by 4
"/
macros at:#F94 put:'
- "undent selected line-range
- by 4 spaces (i.e. to the left)"
+ "undent selected line-range
+ by 4 spaces (i.e. to the left)"
- self selectionStartLine notNil ifTrue:[
- self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
- |line|
+ self selectionStartLine notNil ifTrue:[
+ self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+ |line|
- line := self listAt:lineNr.
- line notNil ifTrue:[
- line notEmpty ifTrue:[
- (line startsWith:'' '') ifTrue:[
- line := line copyFrom:5.
- self at:lineNr put:line
- ]
- ]
- ]
+ line := self listAt:lineNr.
+ line notNil ifTrue:[
+ line notEmpty ifTrue:[
+ (line startsWith:'' '') ifTrue:[
+ line := line copyFrom:5.
+ self withoutRedrawAt:lineNr put:line.
+ self invalidateLine:lineNr.
]
]
- '.
+ ]
+ ].
+ ]
+ '.
!
"*