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

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

define-key for fortran code


From: jaime-escalante
Subject: define-key for fortran code
Date: Sat, 29 May 2021 15:18:45 +0200

> Sent: Saturday, May 29, 2021 at 4:23 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" 
> <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: define-key for fortran code
>
> jaime-escalante wrote:
>
> > I wonder what I can use "define-key" for fortran code (for
> > both f77 and f90)
>
> (require 'f90)
> (require 'fortran)
>
> (defun define-fortran-key (key fun)
>   (define-key f90-mode-map     key fun)
>   (define-key fortran-mode-map key fun) )
>
> (define-fortran-key "q" #'kill-emacs) ; e.g.
>

I cannot follow how to use your function

(define-key f90-mode-map key fun)

I was passing the key sequence as (kbd "H-o q"), you are using "key" and just 
pass
"q" to it.  Could I just pass "H-o q" to it?



reply via email to

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