From: Jean Louis <bugs@gnu.support>
To: Heime <heimeborgia@protonmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Covering of prog-mode
Date: Tue, 3 Dec 2024 23:35:24 +0300 [thread overview]
Message-ID: <Z09rjGrtt8DF6LiD@lco2> (raw)
In-Reply-To: <w5w7xI5caog3dG77uC3u_F6RPbqRKX8xRMH-oPrzZlBgDGaAFKMMEXx0ebdS6_-yi45HOyMvflGF-t3FncBQSthEp_flF73fv60BoKklXOE=@protonmail.com>
* Heime <heimeborgia@protonmail.com> [2024-12-03 23:28]:
> If I do so for c-mode, how can I find out if it is included in prog-mode?
I understand.
But on my side I cannot find `c-mode':
Debugger entered--Lisp error: (file-error "Can't find library" "c-mode")
find-library-name("c-mode")
find-library("c-mode")
funcall-interactively(find-library "c-mode")
command-execute(find-library record)
execute-extended-command(nil "find-library" nil)
funcall-interactively(execute-extended-command nil "find-library" nil)
command-execute(execute-extended-command)
It is function, and I find it is function by doing:
C-h f c-mode RET
then I see:
c-mode is an autoloaded interactive native-comp-function in
‘cc-mode.el’.
(c-mode)
Major mode for editing C code.
then in that window I see hyperlinked file cc-mode.el so I press
there, then I move to top of the file, and I find:
;; This package provides GNU Emacs major modes for editing C, C++,
;; Objective-C, Java, CORBA's IDL, Pike and AWK code. As of the
;; latest Emacs and XEmacs releases, it is the default package for
;; editing these languages. This package is called "CC Mode", and
;; should be spelled exactly this way.
and then I put attention on your question to find if it is dependent
maybe on `prog-mode', so I use `C-s prog-mode' and indeed I am finding
occurences.
When we are by occurences, M-x occur RET prog-mode RET gives me more
summarized information:
11 matches in 10 lines for "prog-mode" in buffer: cc-mode.el
339: (when (boundp 'prog-mode-map)
340: (c-set-keymap-parent c-mode-base-map prog-mode-map))
2829:(unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
2832:(define-derived-mode c-mode prog-mode "C"
2928:(define-derived-mode c++-mode prog-mode "C++"
2976:(define-derived-mode objc-mode prog-mode "ObjC"
3029:(define-derived-mode java-mode prog-mode "Java"
3073:(define-derived-mode idl-mode prog-mode "IDL"
3118:(define-derived-mode pike-mode prog-mode "Pike"
3176:(define-derived-mode awk-mode prog-mode "AWK"
so yes, the cc-mode.el and c-mode command are all somehow derived from
prog-mode, you see?
--
Jean Louis
next prev parent reply other threads:[~2024-12-03 20:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 23:59 Covering of prog-mode Heime via Users list for the GNU Emacs text editor
2024-12-03 6:22 ` Jean Louis
2024-12-03 12:44 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 20:20 ` Jean Louis
2024-12-03 20:27 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 20:35 ` Jean Louis [this message]
2024-12-03 20:49 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 21:05 ` Jean Louis
2024-12-03 21:21 ` Heime via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z09rjGrtt8DF6LiD@lco2 \
--to=bugs@gnu.support \
--cc=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).