From unknown Fri Aug 15 16:18:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41283: 26.3; cc-mode: Incorrect font locking of static functions Resent-From: "George O'Hara" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2020 11:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41283 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 41283@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15895427195676 (code B ref -1); Fri, 15 May 2020 11:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 May 2020 11:38:39 +0000 Received: from localhost ([127.0.0.1]:36061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZYfn-0001TS-Cu for submit@debbugs.gnu.org; Fri, 15 May 2020 07:38:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:33508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZVMB-0000Mu-Bk for submit@debbugs.gnu.org; Fri, 15 May 2020 04:06:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZVMB-00026d-56 for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 04:06:11 -0400 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]:37644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZVM8-0002UA-FA for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 04:06:10 -0400 Received: by mail-il1-x135.google.com with SMTP id n11so1576731ilj.4 for ; Fri, 15 May 2020 01:06:07 -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; bh=UPI9bHkNkdwgwf4jmMxlSPj3hv2j1SOWLLDtUrGVQrg=; b=Hz8hD2P1nrYV1Oriv8RwQx5+/anZHwALb8FOXsYCrmACyBgiYJtYy8/Wze1iE+ugoO WZuDFeA7scGaP71YxwzcWRZEJbs31RnY4l+D1htiE0idVII2kJANBHHLgT2kJdHKHExl xq+45HGV42cKPM2rUtBMq7Jq6/p3/bE1+SI/LIEIp1CWLZQb5c247vQHwIjBYJmzKiGF WSSVJPHAjH96L5XjwoZVScEGJYJ3bJ+F7kK92Vlu8s7jB5xB/G8VcaWrmpmjXi8v1woO yQSbApZLtoeF5I+9YbKxhJO4R0Zbl1bj1a0YScV+DepK4VvAVoqIGoDam341SIEoSDHz mc6Q== 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; bh=UPI9bHkNkdwgwf4jmMxlSPj3hv2j1SOWLLDtUrGVQrg=; b=WbeeC+yk0LafHqc4Vtzja45IABn3zduqUpFtQmMxeaBpzWfpvuHNM9b4b60RqHmY5p kI/N1N1oaD9myuqDHC8qhq0EFquBzXgKBIwW9JDl9JPARyNr8NEzsfrPXxF1zPi7tYpa HVCB4k8KKFsLrKtzmBE8wFPPRAlLI5p3UPmv/blqVcpJBYWudl/3GZcpsjR4maLlBQBP bd1ci2rjSYJlRPxEsMhh5YGUh9LmKkkNFpd4sl2ttjllQ16xUSIcdUCwjCIjdAgrN1sJ nZ65hWWsH44YcfITU1JhGvdHAnFap2s9HrYjRq+R6kYIz4Yw5eNI8oWeNQvuOWR3GdkY wxRg== X-Gm-Message-State: AOAM532nyroSzRsKNKTkeDvr3oyU1G1jn+bl7ZtcLvjsv71/fNQ27P/H Q1TKL5WVW38E62j4DLb2vPb3j+30vaxdShKkrVpZyAZ7 X-Google-Smtp-Source: ABdhPJyniwNvWh/ahxD+sx+X1YTy0+L1kV3g8jmqAj0ZH1LcBeEDWJyh0XWhFxAFt5abAyVbVJxSyuw+h9LS6RF8nxk= X-Received: by 2002:a92:ccc5:: with SMTP id u5mr2065674ilq.126.1589529966676; Fri, 15 May 2020 01:06:06 -0700 (PDT) MIME-Version: 1.0 From: "George O'Hara" Date: Fri, 15 May 2020 09:05:55 +0100 Message-ID: Content-Type: multipart/alternative; boundary="00000000000006151805a5ab496c" Received-SPF: pass client-ip=2607:f8b0:4864:20::135; envelope-from=georgeohara92@gmail.com; helo=mail-il1-x135.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Mailman-Approved-At: Fri, 15 May 2020 07:38:37 -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: -2.1 (--) --00000000000006151805a5ab496c Content-Type: text/plain; charset="UTF-8" Hi, >From 'emacs -Q', C-x C-f and create a buffer called 'test.c'. In this buffer, type: static int some_function(); int static another_function(); some_function is not highlighted, while another_function is. I would expect both to be highlighted. Note that this also happens with C++. In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2020-05-13 built on gohara-t450s Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Linux Mint 19.3 Tricia Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... [2 times] Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2 Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 97752 8020) (symbols 48 20379 1) (miscs 40 84 118) (strings 32 28409 1537) (string-bytes 1 746781) (vectors 16 14596) (vector-slots 8 505938 8384) (floats 8 50 68) (intervals 56 246 4) (buffers 992 13)) --00000000000006151805a5ab496c Content-Type: text/html; charset="UTF-8"
Hi,

>From 'emacs -Q', C-x C-f and create a buffer called 'test.c'.
In this buffer, type:

static int some_function();
int static another_function();

some_function is not highlighted, while another_function is.
I would expect both to be highlighted.
Note that this also happens with C++.


In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2020-05-13 built on gohara-t450s
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Linux Mint 19.3 Tricia

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2

Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 97752 8020)
(symbols 48 20379 1)
(miscs 40 84 118)
(strings 32 28409 1537)
(string-bytes 1 746781)
(vectors 16 14596)
(vector-slots 8 505938 8384)
(floats 8 50 68)
(intervals 56 246 4)
(buffers 992 13))

--00000000000006151805a5ab496c-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 17 12:33:45 2020 Received: (at control) by debbugs.gnu.org; 17 May 2020 16:33:45 +0000 Received: from localhost ([127.0.0.1]:44452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMET-0006gu-7L for submit@debbugs.gnu.org; Sun, 17 May 2020 12:33:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMES-0006gf-91 for control@debbugs.gnu.org; Sun, 17 May 2020 12:33:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33804) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaMEM-0001Op-W0 for control@debbugs.gnu.org; Sun, 17 May 2020 12:33:39 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jaMEM-0003KW-DM for control@debbugs.gnu.org; Sun, 17 May 2020 12:33:38 -0400 Subject: control message for bug 41284 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sun, 17 May 2020 12:33:38 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) merge 41283 41284