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

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

Re: Using comment characters for specific major modes


From: martin-kemp
Subject: Re: Using comment characters for specific major modes
Date: Tue, 8 Jun 2021 11:14:59 +0200 (CEST)

Might have found a problem when trying it in the scratch buffer.


From: Jean Louis <bugs@gnu.support>
To: martin-kemp@brusseler.com
Subject: Re: Using comment characters for specific major modes
Date: 06/06/2021 22:50:39 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 20:37]:
> I understand better now, you try to set "cs" in the "let" using cond.
> 
> 
> 
> Am still getting nil though.  Have changed the code somewhat.

(defun my-cs ()
(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"))))
cs))

(my-cs) ⇒ ";;"

It works, as I turnedd on emacs-lisp mode.


-- 
Jean

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

In support of Richard M. Stallman
https://stallmansupport.org/




reply via email to

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