beautifying an R package
Martin Maechler
maechler at stat.math.ethz.ch
Wed Oct 11 15:32:10 CEST 2000
Answering myself :
>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch> writes:
>>>>> "Rich" == Rich Heiberger <rmh at surfer.sbm.temple.edu> writes:
Rich> On the "_" key. It's a good plan to default it to " <- " when
Rich> writing code. It is necessary to retain its original value "_"
Rich> when inside quotation marks. The "_" is frequently used as a
Rich> character in file names, for example "_Data" in S-Plus 4.x and
Rich> air_band.q in the R library of scripts.
MM> how frequently? `C-q _' ("q" for "quote") will always give plain
MM> "_"
(yes, but see below..)
Rich> unfortunately, the need for the distinction in default
Rich> behaviors---within and without quotation marks---makes the coding
Rich> of the switch more difficult.
MM> Yes, one would have to use an ``electric binding'' which might work
MM> well here, since we already have (a more or less correct) function
>>> (defun inside-string/comment-p (pos)
>>> .........
MM> What are 5.1.17 release plans?
MM> Can/should the above
MM> electrification be done before?
in the mean time, 5.1.17 has been released as a test release..
But the above idea, an electric "_" key,
was too easy not to be done, once I tried...
This is now committed for 5.1.18 with the following entry in "new features":
o New `ess-smart-underscore' function, now assigned to "_" by default.
Inserts `ess-S-assign' (customizable " <- "), unless inside string
and comments where plain "_" is used instead.
Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe or unsubscribe
(in the "body", not the subject !) To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the ESS-help
mailing list