help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using comment characters for specific major modes


From: martin-kemp
Subject: Using comment characters for specific major modes
Date: Sun, 6 Jun 2021 19:36:27 +0200 (CEST)

I understand better now, you try to set "cs" in the "let" using cond.



Am still getting nil though.  Have changed the code somewhat.



   (let* ( (m 62) (n 69)
       (lena (- m (current-column)))
       (cs   (cond ((eq major-mode 'emacs-lisp-mode) ";;")
               ((eq major-mode 'texinfo-mode)    "@c")
               ((eq major-mode 'f90-mode)        "!!")
               ((eq major-mode 'fortran-mode)    "cc"))) )



(messsage "cs: %s" cs))









From: Jean Louis <bugs@gnu.support>
To: martin-kemp@brusseler.com
Subject: Re: Using comment characters for specific major modes
Date: 06/06/2021 18:56:46 Europe/Paris
Cc: Stefan Möding <s.moeding@gmail.com>;
   help-gnu-emacs@gnu.org

* martin-kemp@brusseler.com <martin-kemp@brusseler.com> [2021-06-06 19:23]:
>    (let (cs) ;; ok I think it is declared but nil
>      (cond 
> 
>        ((eq major-mode 'emacs-lisp-mode) ";;")
>        ((eq major-mode 'texinfo-mode)    "@c")
>        ((eq major-mode 'f90-mode)        "!!")
>        ((eq major-mode 'fortran-mode)    "cc")) ;;; this evaluates
> ;; to comments but 
;; does not assign it 
;; to variable


This form begin would assign evaluation from `cond' to variable `cs':

(let ((cs (cond 


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]