[gnu.emacs.bug] comment-line-start

dodd%mycenae.cchem.Berkeley.EDU@JADE.BERKELEY.EDU (Lawrence R. Dodd) (01/02/90)

   This is probably not a bug but I have spent about an hour trying to
get it to work with no success.  I would like to set the string
inserted to start a new full-line comment to "C".  That is, the
default value is "c" and I want it to be capital "C".  The GNU Emacs
Manual states that this is normally set properly by Fortran mode and
one need not change it.  Well I can change it from within the editor
by typing

M-x set-variable RET column-line-start RET "C" RET

but I have been trying unsuccessfully to put it in my .emacs file.  I
managed to figure out that

(setq comment-start "C")

Will fix the Text mode comment start string to "C" but

(setq comment-line-start "C")

does not do the same for the comment line string.  What am I doing
wrong?

                            Larry
                            dodd@mycenae.cchem.berkeley.edu

                            Lawrence Robert Dodd
                            B71A Hildebrand Hall
                            Department of Chemical Engineering
                            College of Chemistry
                            University of California at Berkeley
                            Berkeley, California 94720

                            Work:  (415) 642-3699
                            Home:  (415) 845-1014

gildea@ALEXANDER.BBN.COM (Stephen Gildea) (01/03/90)

    Date: Mon, 1 Jan 90 17:06:36 PST
    From: "Lawrence R. Dodd" <dodd%mycenae.cchem.Berkeley.EDU@jade.berkeley.edu>
    
       This is probably not a bug but I have spent about an hour trying to
    get it to work with no success.  I would like to set the string
    inserted to start a new full-line comment to "C".  That is, the
    default value is "c" and I want it to be capital "C".  The GNU Emacs
    Manual states that this is normally set properly by Fortran mode and
    one need not change it.    

    ...

    (setq comment-line-start "C")
    
    does not do the same for the comment line string.  What am I doing
    wrong?


The variable comment-line-start is mode-specific, so you must set it
with a mode hook.  Try the following in your .emacs file:    

(setq fortran-mode-hook '(lambda () (setq comment-line-start "C")))

 < Stephen

dodd%mycenae.cchem.Berkeley.EDU@JADE.BERKELEY.EDU (Lawrence R. Dodd) (01/03/90)

Stephen,

  Thanks for the info.  I actually discovered that very late last
night.  Once I learned that little trick with the "lambda" things
just took off.

                            Larry
                            dodd@mycenae.cchem.berkeley.edu