From unknown Wed Aug 20 05:16:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything Resent-From: Felip Moll Original-Sender: "Debbugs-submit" Resent-CC: help-debbugs@gnu.org Resent-Date: Tue, 31 Oct 2017 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29083 X-GNU-PR-Package: debbugs.gnu.org X-GNU-PR-Keywords: To: 29083@debbugs.gnu.org X-Debbugs-Original-To: submit@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150946447120353 (code B ref -1); Tue, 31 Oct 2017 15:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Oct 2017 15:41:11 +0000 Received: from localhost ([127.0.0.1]:44394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Yf9-0005IB-EI for submit@debbugs.gnu.org; Tue, 31 Oct 2017 11:41:11 -0400 Received: from mail-yw0-f181.google.com ([209.85.161.181]:43860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9VtV-0007Lz-Q9 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 08:43:50 -0400 Received: by mail-yw0-f181.google.com with SMTP id y75so14601223ywg.0 for ; Tue, 31 Oct 2017 05:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fuR1QRL5G8yp9OG1Kvg/kSHKesE6yX2AtwdkKNZ81Ys=; b=N7I0xeiAH4THe2mxknK/k+sdg+l74KF411nChVXgKem5S4YtOuswAW5rqEywCORmvq wr9XKKfYknybbNwuwsCRkK7J8ZwNtELGfGzRWxvKl7AybdukB3e8dPx1aIA/P1xHLmho n7colS1ET4FoWFFhPolGN4WcJHqjZxcXVE6tKX4OCF1eCedyvuoyfI+fYLUJ4J91H1g6 ybTwz8asCb8/lsvu4l8cLgdEkobHAX33Ss4xtPJdiGLfYKk4gLr4fm6rCrJvM5MJlyYH CM90lkaJ5VCmMcUIexaZcWrF95Yqqy6i0e0nZs6OwZcSG1Lv+4TaXzEjRIxD+HdBqiHe Oo5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fuR1QRL5G8yp9OG1Kvg/kSHKesE6yX2AtwdkKNZ81Ys=; b=SZ12yD5yIL9Rz93i0nlq+NJjhv26Ow7i3SnMd27JWxT/0Zn+36T9vR4YXlPql4NKbx mhRNVrx8zBLSjmtfpodJ8FFRDwJotwWVUIKBUlCYktuBAGY7D1n0nB91qILbxmHr12HB u4akg5UN4m0uSuuDqOTMmPZ32NXIl6D6+3zDGQNjPhKBVGAGtbtqAgLqQdbY+VZAA8na ifUZc9PYyNZ74DYmTGts2ELyPt1GCryH7xzZ1rHkTh1Pc0P1B1VNh0ZiIAfjTNlM6TLG 570riT/i13N2BrOQkYKDbdq8Gj76cZCsDV6PCaJ+ABZszSvKU9+nUPWQjM0G+8hSDrfD vbUA== X-Gm-Message-State: AMCzsaXtvrIi07hHlJccSB09atZbFHvPgf+aBedGoUpRWBU4no26IHFA LHIngPqAchZPmDvvz76pbzaTzvxaE1Gw0DCLl1S2vA== X-Google-Smtp-Source: ABhQp+R73J3e7phhhdnJF4AXOI8MuOfaHWk249So3EQn+A6jU4fp9RcyJGpDuu1yciuCu+NRS19L0+Mm+0hOt/zS15E= X-Received: by 10.37.230.200 with SMTP id d191mr1013553ybh.348.1509453823724; Tue, 31 Oct 2017 05:43:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.219.129 with HTTP; Tue, 31 Oct 2017 05:43:43 -0700 (PDT) From: Felip Moll Date: Tue, 31 Oct 2017 13:43:43 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Mailman-Approved-At: Tue, 31 Oct 2017 11:41:10 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) When inspecting a C code file, I pressed M-x c-defun-mode in order emacs to show me in which function I was, but nothing happened. Emacs : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu) of 2017-09-15 Package: CC Mode 5.32.99 (C/l) Buffer Style: gnu c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 0) c-indent-comment-alist '((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "" c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+") (other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-nonempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . c-lineup-inexpr-block) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function nil comment-multi-line t comment-start-skip "\\(//+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*= \\)*\\)" ) From unknown Wed Aug 20 05:16:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Tue, 31 Oct 2017 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29083 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: 29083@debbugs.gnu.org Cc: Felip Moll Reply-To: 29083@debbugs.gnu.org, lipixx@gmail.com Received: via spool by 29083-submit@debbugs.gnu.org id=B29083.150946994529662 (code B ref 29083); Tue, 31 Oct 2017 17:13:02 +0000 Received: (at 29083) by debbugs.gnu.org; 31 Oct 2017 17:12:25 +0000 Received: from localhost ([127.0.0.1]:44465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9a5R-0007iL-3J for submit@debbugs.gnu.org; Tue, 31 Oct 2017 13:12:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9a5P-0007i4-Co for 29083@debbugs.gnu.org; Tue, 31 Oct 2017 13:12:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9a5F-00007i-G4 for 29083@debbugs.gnu.org; Tue, 31 Oct 2017 13:12:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9a5F-00007R-DQ; Tue, 31 Oct 2017 13:12:13 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1e9a5D-0001OL-MU; Tue, 31 Oct 2017 13:12:11 -0400 From: Glenn Morris References: Mail-Followup-To: 29083@debbugs.gnu.org, lipixx@gmail.com X-Spook: IMF espionage Disaster management FBI South Africa X-Ran: D(^p>)#bf~B+f~>{ES9/T=g"|aGLTlr?MGoj>%G}J (Felip Moll's message of "Tue, 31 Oct 2017 13:43:43 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Report reassigned to cc-mode: Felip Moll wrote: > When inspecting a C code file, I pressed M-x c-defun-mode in order emacs > to show me in which function I was, but nothing happened. > > Emacs : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu) > of 2017-09-15 > Package: CC Mode 5.32.99 (C/l) > Buffer Style: gnu > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes > gen-string-delim gen-comment-delim syntax-properties 1-bit) > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > c-basic-offset 2 > c-comment-only-line-offset '(0 . 0) > c-indent-comment-alist '((anchored-comment column . 0) (end-block > space . 1) (cpp-end-block space . 2)) > c-indent-comments-syntactically-p nil > c-block-comment-prefix "" > c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . > "#+") (other . "//+\\|\\**")) > c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) > (c-mode . gtkdoc)) > c-cleanup-list '(scope-operator) > c-hanging-braces-alist '((substatement-open before after) > (arglist-cont-nonempty)) > c-hanging-colons-alist nil > c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) > c-backslash-column 48 > c-backslash-max-column 72 > c-special-indent-hook '(c-gnu-impose-minimum) > c-label-minimum-indentation 1 > c-offsets-alist '((inexpr-class . +) > (inexpr-statement . +) > (lambda-intro-cont . +) > (inlambda . c-lineup-inexpr-block) > (template-args-cont c-lineup-template-args +) > (incomposition . +) > (inmodule . +) > (innamespace . +) > (inextern-lang . +) > (composition-close . 0) > (module-close . 0) > (namespace-close . 0) > (extern-lang-close . 0) > (composition-open . 0) > (module-open . 0) > (namespace-open . 0) > (extern-lang-open . 0) > (objc-method-call-cont c-lineup-ObjC-method-call-colons > c-lineup-ObjC-method-call +) > (objc-method-args-cont . c-lineup-ObjC-method-args) > (objc-method-intro . [0]) > (friend . 0) > (cpp-define-intro c-lineup-cpp-define +) > (cpp-macro-cont . +) > (cpp-macro . [0]) > (inclass . +) > (stream-op . c-lineup-streamop) > (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) > (arglist-cont c-lineup-gcc-asm-reg 0) > (comment-intro c-lineup-knr-region-comment c-lineup-comment) > (catch-clause . 0) > (else-clause . 0) > (do-while-closure . 0) > (access-label . -) > (case-label . 0) > (substatement . +) > (statement-case-intro . +) > (statement . 0) > (brace-entry-open . 0) > (brace-list-entry . 0) > (brace-list-intro . +) > (brace-list-close . 0) > (block-close . 0) > (block-open . 0) > (inher-cont . c-lineup-multi-inher) > (inher-intro . +) > (member-init-cont . c-lineup-multi-inher) > (member-init-intro . +) > (annotation-var-cont . +) > (annotation-top-cont . 0) > (topmost-intro . 0) > (knr-argdecl . 0) > (func-decl-cont . +) > (inline-close . 0) > (class-close . 0) > (class-open . 0) > (defun-block-intro . +) > (defun-close . 0) > (defun-open . 0) > (c . c-lineup-C-comments) > (string . c-lineup-dont-change) > (topmost-intro-cont first c-lineup-topmost-intro-cont > c-lineup-gnu-DEFUN-intro-cont) > (brace-list-open . +) > (inline-open . 0) > (arglist-close . c-lineup-arglist) > (arglist-intro . c-lineup-arglist-intro-after-paren) > (statement-cont . +) > (statement-case-open . +) > (label . 0) > (substatement-label . 0) > (substatement-open . +) > (knr-argdecl-intro . 5) > (statement-block-intro . +) > ) > c-buffer-is-cc-mode 'c-mode > c-tab-always-indent t > c-syntactic-indentation t > c-syntactic-indentation-in-macros t > c-ignore-auto-fill '(string cpp code) > c-auto-align-backslashes t > c-backspace-function 'backward-delete-char-untabify > c-delete-function 'delete-char > c-electric-pound-behavior nil > c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu"= )) > c-enable-xemacs-performance-kludge-p nil > c-old-style-variable-behavior nil > defun-prompt-regexp nil > tab-width 8 > comment-column 32 > parse-sexp-ignore-comments t > parse-sexp-lookup-properties t > auto-fill-function nil > comment-multi-line t > comment-start-skip "\\(//+\\|/\\*+\\)\\s *" > fill-prefix nil > fill-column 70 > paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" > adaptive-fill-mode t > adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ > ]*\\([-=E2=80=93!|#%;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ = ]*\\)*\\)" > ) From unknown Wed Aug 20 05:16:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Tue, 31 Oct 2017 17:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29083 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: Felip Moll Cc: 29083@debbugs.gnu.org Received: via spool by 29083-submit@debbugs.gnu.org id=B29083.1509471896358 (code B ref 29083); Tue, 31 Oct 2017 17:45:01 +0000 Received: (at 29083) by debbugs.gnu.org; 31 Oct 2017 17:44:56 +0000 Received: from localhost ([127.0.0.1]:44493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9aat-00005i-UR for submit@debbugs.gnu.org; Tue, 31 Oct 2017 13:44:56 -0400 Received: from ocolin.muc.de ([193.149.48.4]:31875 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9aas-00005X-9j for 29083@debbugs.gnu.org; Tue, 31 Oct 2017 13:44:54 -0400 Received: (qmail 31207 invoked by uid 3782); 31 Oct 2017 17:44:52 -0000 Received: from acm.muc.de (p548C6FCB.dip0.t-ipconnect.de [84.140.111.203]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 31 Oct 2017 18:44:52 +0100 Received: (qmail 7471 invoked by uid 1000); 31 Oct 2017 17:38:24 -0000 Date: Tue, 31 Oct 2017 17:38:24 +0000 Message-ID: <20171031173824.GA7398@ACM> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Felip. On Tue, Oct 31, 2017 at 13:43:43 +0100, Felip Moll wrote: > When inspecting a C code file, I pressed M-x c-defun-mode in order emacs > to show me in which function I was, but nothing happened. Yes, thanks for the report. The bug here seems to be that c-defun-mode is interactive, when it merely returns the function name rather than displaying it. You really need a function calling c-defun-name, which then displays it. Here is what I use. You're welcome to adapt it to do what you need: (eval-after-load "cc-mode" '(progn (defun c-display-defun-name (&optional arg) "Display the name of the current CC mode defun and the position in it. With a prefix arg, push the name onto the kill ring too." (interactive "P") (save-restriction (widen) (c-save-buffer-state ((name (c-defun-name)) (limits (c-declaration-limits t)) (point-bol (c-point 'bol))) (when name (message "%s. Line %s/%s." name (1+ (count-lines (car limits) point-bol)) (count-lines (car limits) (cdr limits))) (if arg (kill-new name)) (sit-for 3 t))))) (define-key c-mode-base-map "\C-cn" 'c-display-defun-name) (put 'c-display-defun-name 'isearch-scroll t))) [ Version information an CC Mode dump snipped, but appreciated. ] -- Alan Mackenzie (Nuremberg, Germany). From unknown Wed Aug 20 05:16:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything Resent-From: Felip Moll Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Tue, 31 Oct 2017 17:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29083 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 29083@debbugs.gnu.org Received: via spool by 29083-submit@debbugs.gnu.org id=B29083.15094724508501 (code B ref 29083); Tue, 31 Oct 2017 17:55:01 +0000 Received: (at 29083) by debbugs.gnu.org; 31 Oct 2017 17:54:10 +0000 Received: from localhost ([127.0.0.1]:44502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9ajp-0002D2-V8 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 13:54:10 -0400 Received: from mail-yw0-f175.google.com ([209.85.161.175]:51661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9ajn-0002Co-KM for 29083@debbugs.gnu.org; Tue, 31 Oct 2017 13:54:08 -0400 Received: by mail-yw0-f175.google.com with SMTP id k3so15472971ywk.8 for <29083@debbugs.gnu.org>; Tue, 31 Oct 2017 10:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TudFaD0Zg2jrINRmWfMXnPoJYaQAftt/+j/eLNTlaPo=; b=A/ROFwWl93krzbDjXi0VsY8wcsrAK0AF0itgIlUsqg2Cx1Ja30ywwi4SiEP7itKpAf zHI8twO1cuMFhmSb3dWFYEpXnTdQLaEUXllKxyczjN+tETvumWp703i5D7Zmme7cKGK3 81mOSJKlp/GftLUgDSIuOWlMDDerK8LzSwZSoSfSN4ulo5Af5goFPq52A4VVjrVA8h6r 8PWu2XZzTerznkIe4gCIVUnIlR34lGKWo2AFBxs0DguPFJ6A4iAYxAEDj8EFfaPJPdzw rKLMerkJxwRoignKYo0wluF3m6tYhp6/+dMkYTV1i6yW62BYEnu2PYLa+1l5sUvMKpqg SxkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TudFaD0Zg2jrINRmWfMXnPoJYaQAftt/+j/eLNTlaPo=; b=ksYOEc3bUhnpZcLe9HyHSSJO+zEj2suMPBV9coUlxvKtqa3Gmdx/HMuGbLbwI2Ix0e mAKNy1oMi+K1oHE5xiY7Al1c2++zDx5uNOeSsWB1kZFH8yqZl7HdyasftqTNdoWW/4WR 0etfpwfisLEm5EJ6VCGEOtFb38QG4tFPc5hy5WC+ptHNyuhFDVP/aNEMoZ3VzMUmg79i uv9MSW8Quig9T2zcU5sCH3dh3RxN52EtFBdH60MPgn1nH7A6H+PdbtdEtqFC7wo2oF3r +tNfudInh3wYxc88cD6WsAJwv34Lr+hGm0d5TY9oFHR8jTaQEDJFXFJlhv5oJjgSbYF7 ANNg== X-Gm-Message-State: AMCzsaUTbzGX6BpNDh4zdOe9rVFPY1g/W3/wjhmbQRE/Sq6IWMzHrc6f +xDWlIeQQcAraSt4W7rnd+FdTeRdWLe9F07+DONv2Q== X-Google-Smtp-Source: ABhQp+QXJCPW8DqUAOFSGaN94Re9CdXfiCwr9PuNhyeB0pXAYJej+v60OjeM8O6c1wXEA3SmznPS1FR1smqZu4PEPcg= X-Received: by 10.37.91.87 with SMTP id p84mr1816065ybb.448.1509472442006; Tue, 31 Oct 2017 10:54:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.219.129 with HTTP; Tue, 31 Oct 2017 10:54:01 -0700 (PDT) In-Reply-To: <20171031173824.GA7398@ACM> References: <20171031173824.GA7398@ACM> From: Felip Moll Date: Tue, 31 Oct 2017 18:54:01 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Hi Alan, This is great. It works and I understand the issue. Just to know, is there any plan to change it to non-interactive and provide such an interactive command in CC Mode? BR Felip M -- Felip Moll Marqu=C3=A8s Computer Science Engineer E-Mail - lipixx@gmail.com WebPage - http://lipix.ciutadella.es 2017-10-31 18:38 GMT+01:00 Alan Mackenzie : > Hello, Felip. > > On Tue, Oct 31, 2017 at 13:43:43 +0100, Felip Moll wrote: >> When inspecting a C code file, I pressed M-x c-defun-mode in order emacs >> to show me in which function I was, but nothing happened. > > Yes, thanks for the report. > > The bug here seems to be that c-defun-mode is interactive, when it > merely returns the function name rather than displaying it. You really > need a function calling c-defun-name, which then displays it. Here is > what I use. You're welcome to adapt it to do what you need: > > (eval-after-load "cc-mode" > '(progn > (defun c-display-defun-name (&optional arg) > "Display the name of the current CC mode defun and the position in= it. > With a prefix arg, push the name onto the kill ring too." > (interactive "P") > (save-restriction > (widen) > (c-save-buffer-state ((name (c-defun-name)) > (limits (c-declaration-limits t)) > (point-bol (c-point 'bol))) > (when name > (message "%s. Line %s/%s." name > (1+ (count-lines (car limits) point-bol)) > (count-lines (car limits) (cdr limits))) > (if arg (kill-new name)) > (sit-for 3 t))))) > (define-key c-mode-base-map "\C-cn" 'c-display-defun-name) > (put 'c-display-defun-name 'isearch-scroll t))) > > [ Version information an CC Mode dump snipped, but appreciated. ] > > -- > Alan Mackenzie (Nuremberg, Germany). From unknown Wed Aug 20 05:16:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Tue, 31 Oct 2017 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29083 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: Felip Moll Cc: 29083@debbugs.gnu.org Received: via spool by 29083-submit@debbugs.gnu.org id=B29083.150948152622932 (code B ref 29083); Tue, 31 Oct 2017 20:26:02 +0000 Received: (at 29083) by debbugs.gnu.org; 31 Oct 2017 20:25:26 +0000 Received: from localhost ([127.0.0.1]:44624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9d6E-0005xn-C2 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 16:25:26 -0400 Received: from ocolin.muc.de ([193.149.48.4]:30058 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9d6B-0005xd-UK for 29083@debbugs.gnu.org; Tue, 31 Oct 2017 16:25:24 -0400 Received: (qmail 1335 invoked by uid 3782); 31 Oct 2017 20:25:21 -0000 Received: from acm.muc.de (p548C6FCB.dip0.t-ipconnect.de [84.140.111.203]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 31 Oct 2017 21:25:20 +0100 Received: (qmail 8832 invoked by uid 1000); 31 Oct 2017 20:18:53 -0000 Date: Tue, 31 Oct 2017 20:18:53 +0000 Message-ID: <20171031201853.GA4199@ACM> References: <20171031173824.GA7398@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello again, Felip. On Tue, Oct 31, 2017 at 18:54:01 +0100, Felip Moll wrote: > Hi Alan, > This is great. It works and I understand the issue. > Just to know, is there any plan to change it to non-interactive and > provide such an interactive command in CC Mode? Yes, I will definitely be removing the interactive specification. As for providing a proper interactive command, perhaps you could help me along by commenting on my function c-display-defun-name. It is merely, at present, my own personal function. What is it missing, what does it have which it possibly shouldn't? I will have to document it in the CC Mode manual, too. > BR > Felip M > -- > Felip Moll Marquès > Computer Science Engineer > E-Mail - lipixx@gmail.com > WebPage - http://lipix.ciutadella.es -- Alan Mackenzie (Nuremberg, Germany). From unknown Wed Aug 20 05:16:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Felip Moll Subject: bug#29083: closed (Re: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything) Message-ID: References: <20171103200241.GA18997@ACM> X-Gnu-PR-Message: they-closed 29083 X-Gnu-PR-Package: cc-mode Reply-To: 29083@debbugs.gnu.org Date: Fri, 03 Nov 2017 20:10:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1509739802-9635-1" This is a multi-part message in MIME format... ------------=_1509739802-9635-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything which was filed against the cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 29083@debbugs.gnu.org. --=20 29083: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29083 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1509739802-9635-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 29083-done) by debbugs.gnu.org; 3 Nov 2017 20:09:47 +0000 Received: from localhost ([127.0.0.1]:49868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAiHj-0002Uq-0Z for submit@debbugs.gnu.org; Fri, 03 Nov 2017 16:09:47 -0400 Received: from ocolin.muc.de ([193.149.48.4]:46996 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eAiHg-0002Uh-UO for 29083-done@debbugs.gnu.org; Fri, 03 Nov 2017 16:09:45 -0400 Received: (qmail 38064 invoked by uid 3782); 3 Nov 2017 20:09:41 -0000 Received: from acm.muc.de (p548C6FD6.dip0.t-ipconnect.de [84.140.111.214]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 03 Nov 2017 21:09:40 +0100 Received: (qmail 19043 invoked by uid 1000); 3 Nov 2017 20:02:41 -0000 Date: Fri, 3 Nov 2017 20:02:41 +0000 To: Felip Moll Subject: Re: bug#29083: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything Message-ID: <20171103200241.GA18997@ACM> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29083-done Cc: 29083-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Felip. On Tue, Oct 31, 2017 at 13:43:43 +0100, Felip Moll wrote: > When inspecting a C code file, I pressed M-x c-defun-mode in order emacs > to show me in which function I was, but nothing happened. I've committed the fix to the three canonical places, namely the standalone CC Mode project, XEmacs, and Emacs's savannah repository, branch emacs-26. The key sequence for the new command c-display-defun-name is C-c C-z. Giving it a prefix arg (with C-u) also pushes the function name onto the kill ring. You can also use this command in the middle of an interactive search if you have set (or customised) isearch-allow-scroll to a non-nil value. I'm closing this bug now. If you want any help to incorporate the fix into Emacs 25.3, please send me private mail. > Emacs : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu) > of 2017-09-15 > Package: CC Mode 5.32.99 (C/l) > Buffer Style: gnu > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes > gen-string-delim gen-comment-delim syntax-properties 1-bit) [ .... ] -- Alan Mackenzie (Nuremberg, Germany). ------------=_1509739802-9635-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 31 Oct 2017 15:41:11 +0000 Received: from localhost ([127.0.0.1]:44394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Yf9-0005IB-EI for submit@debbugs.gnu.org; Tue, 31 Oct 2017 11:41:11 -0400 Received: from mail-yw0-f181.google.com ([209.85.161.181]:43860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9VtV-0007Lz-Q9 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 08:43:50 -0400 Received: by mail-yw0-f181.google.com with SMTP id y75so14601223ywg.0 for ; Tue, 31 Oct 2017 05:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fuR1QRL5G8yp9OG1Kvg/kSHKesE6yX2AtwdkKNZ81Ys=; b=N7I0xeiAH4THe2mxknK/k+sdg+l74KF411nChVXgKem5S4YtOuswAW5rqEywCORmvq wr9XKKfYknybbNwuwsCRkK7J8ZwNtELGfGzRWxvKl7AybdukB3e8dPx1aIA/P1xHLmho n7colS1ET4FoWFFhPolGN4WcJHqjZxcXVE6tKX4OCF1eCedyvuoyfI+fYLUJ4J91H1g6 ybTwz8asCb8/lsvu4l8cLgdEkobHAX33Ss4xtPJdiGLfYKk4gLr4fm6rCrJvM5MJlyYH CM90lkaJ5VCmMcUIexaZcWrF95Yqqy6i0e0nZs6OwZcSG1Lv+4TaXzEjRIxD+HdBqiHe Oo5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fuR1QRL5G8yp9OG1Kvg/kSHKesE6yX2AtwdkKNZ81Ys=; b=SZ12yD5yIL9Rz93i0nlq+NJjhv26Ow7i3SnMd27JWxT/0Zn+36T9vR4YXlPql4NKbx mhRNVrx8zBLSjmtfpodJ8FFRDwJotwWVUIKBUlCYktuBAGY7D1n0nB91qILbxmHr12HB u4akg5UN4m0uSuuDqOTMmPZ32NXIl6D6+3zDGQNjPhKBVGAGtbtqAgLqQdbY+VZAA8na ifUZc9PYyNZ74DYmTGts2ELyPt1GCryH7xzZ1rHkTh1Pc0P1B1VNh0ZiIAfjTNlM6TLG 570riT/i13N2BrOQkYKDbdq8Gj76cZCsDV6PCaJ+ABZszSvKU9+nUPWQjM0G+8hSDrfD vbUA== X-Gm-Message-State: AMCzsaXtvrIi07hHlJccSB09atZbFHvPgf+aBedGoUpRWBU4no26IHFA LHIngPqAchZPmDvvz76pbzaTzvxaE1Gw0DCLl1S2vA== X-Google-Smtp-Source: ABhQp+R73J3e7phhhdnJF4AXOI8MuOfaHWk249So3EQn+A6jU4fp9RcyJGpDuu1yciuCu+NRS19L0+Mm+0hOt/zS15E= X-Received: by 10.37.230.200 with SMTP id d191mr1013553ybh.348.1509453823724; Tue, 31 Oct 2017 05:43:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.219.129 with HTTP; Tue, 31 Oct 2017 05:43:43 -0700 (PDT) From: Felip Moll Date: Tue, 31 Oct 2017 13:43:43 +0100 Message-ID: Subject: CC Mode 5.32.99 (C/l); M-x c-defun-mode doesn't show anything To: submit@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 31 Oct 2017 11:41:10 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) When inspecting a C code file, I pressed M-x c-defun-mode in order emacs to show me in which function I was, but nothing happened. Emacs : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu) of 2017-09-15 Package: CC Mode 5.32.99 (C/l) Buffer Style: gnu c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 0) c-indent-comment-alist '((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "" c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+") (other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-nonempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . c-lineup-inexpr-block) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function nil comment-multi-line t comment-start-skip "\\(//+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*= \\)*\\)" ) ------------=_1509739802-9635-1--