[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ qualified method names
From: |
Alan Mackenzie |
Subject: |
Re: C++ qualified method names |
Date: |
Fri, 26 May 2017 10:21:01 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hello, Eli.
On Fri, May 26, 2017 at 12:39:00 +0300, Eli Zaretskii wrote:
> In the C++ method below:
> void
> regcache::raw_supply_integer (int foo)
> {
> whatever (foo);
> }
> invoking "M-: (c-defun-name) RET" produces "raw_supply_integer". Why
> does it exclude the class qualification? Is there a way to have that
> included? This is important e.g. when producing a ChangeLog entry for
> such methods.
Please try the following: it has the disadvantage that it doesn't strip
WS when somebody writes the declaration as "regcache :: \n
raw_supply_integer". But it should work in the vast majority of cases.
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index a5ddcb4b92..9c0798e752 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1870,7 +1870,7 @@ c-defun-name
(c-backward-token-2)
(c-backward-syntactic-ws))
(setq name-end (point))
- (c-backward-token-2)
+ (c-back-over-compound-identifier)
(buffer-substring-no-properties (point) name-end)))))))))
(defun c-declaration-limits (near)
--
Alan Mackenzie (Nuremberg, Germany).