From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Covering of prog-mode Date: Tue, 3 Dec 2024 23:35:24 +0300 Message-ID: References: <9DcjRFc6mjPoYRJQDQSESEsOIWpwSvvcnILKIFJaESJ6yFQPwvYjvnh9EFf-nYUeVrXNlZbP2FV5D1X3PdxSpO82MJs-xNnaOdbnEuuymYI=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24223"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.12 (2023-09-09) Cc: help-gnu-emacs@gnu.org To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 21:41:07 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIZhi-00069V-Q0 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 21:41:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIZh2-0001bi-Vs; Tue, 03 Dec 2024 15:40:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIZgh-0001Qn-Kk for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 15:40:04 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIZge-0003BM-0z for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 15:40:02 -0500 Original-Received: from localhost ([::ffff:41.75.174.232]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000008201D.00000000674F6C9C.0035A8E5; Tue, 03 Dec 2024 13:39:56 -0700 Mail-Followup-To: Heime , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148572 Archived-At: * Heime [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