gildea@BBN.COM (Stephen Gildea) (01/05/89)
Currently, comment-start is "*String to insert to start a new comment, or nil if no comment syntax defined." This is a pain for simple routines that want to insert some text into a buffer, surrounded by comment delimiters. It would be much more convenient if comment-start were always a string ("" if no comment syntax) and the test for whether there is a comment syntax be whether or not comment-start-skip is non-nil. < Stephen
merlyn@intelob.biin.com (Randal L. Schwartz @ Stonehenge) (01/06/89)
In article <8901042305.AA26705@prep.ai.mit.edu>, gildea@BBN (Stephen Gildea) writes: | Currently, comment-start is "*String to insert to start a new comment, | or nil if no comment syntax defined." This is a pain for simple | routines that want to insert some text into a buffer, surrounded by | comment delimiters. It would be much more convenient if comment-start | were always a string ("" if no comment syntax) and the test for | whether there is a comment syntax be whether or not comment-start-skip | is non-nil. I disagree. For one, I can use (not comment-start) as a test now to see if a comment syntax is defined or not. Also, if the behavior you want is to *always* insert a string, try: (insert (or comment-start "")) Looks pretty simple to me. -- Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 on contract to BiiN Technical Information Services (for now :-), in a former Intel building in Hillsboro, Oregon, USA. <merlyn@intelob.biin.com> or ...!tektronix!inteloa[!intelob]!merlyn SOME MAILERS REQUIRE <merlyn@intelob.intel.com> GRRRRR! Standard disclaimer: I *am* my employer!
gildea@BBN.COM (Stephen Gildea) (01/07/89)
Date: 5 Jan 89 17:58:26 GMT From: "Randal L. Schwartz @ Stonehenge" <tektronix!reed!ogccse!littlei!omepd!merlyn@cis.ohio-state.edu> References: <8901042305.AA26705@prep.ai.mit.edu> In article <8901042305.AA26705@prep.ai.mit.edu>, gildea@BBN.COM writes: | Currently, comment-start is "*String to insert to start a new comment, | or nil if no comment syntax defined." This is a pain for simple | routines that want to insert some text into a buffer, surrounded by | comment delimiters. It would be much more convenient if comment-start | were always a string ("" if no comment syntax) and the test for | whether there is a comment syntax be whether or not comment-start-skip | is non-nil. I disagree. For one, I can use (not comment-start) as a test now to see if a comment syntax is defined or not. ... Read the original more carefully. Under this proposal, the test to see if a comment syntax is defined is simply (if comment-start-skip ...) instead of the currently-used (if comment-start ...). < Stephen