GNU bug report logs - #19206
25.0.50; CC Mode tracks wrong source files

Previous Next

Packages: cc-mode, emacs;

Reported by: Sebastian Wiesner <swiesner <at> lunaryorn.com>

Date: Fri, 28 Nov 2014 10:21:02 UTC

Severity: normal

Found in version 25.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Subject: bug#19206: closed (Re: bug#19206: 25.0.50; CC Mode tracks wrong
 source files)
Date: Tue, 13 Jan 2015 16:11:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#19206: 25.0.50; CC Mode tracks wrong source files

which was filed against the emacs,cc-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 19206 <at> debbugs.gnu.org.

-- 
19206: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19206
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: 19206-done <at> debbugs.gnu.org
Subject: Re: bug#19206: 25.0.50; CC Mode tracks wrong source files
Date: Tue, 13 Jan 2015 17:09:59 +0100 (CET)
In article <mailman.14863.1417170074.1147.bug-gnu-emacs <at> gnu.org> you wrote:
> CC Mode tracks wrong source files when a CC Mode derived mode is
> installed non-interactively.

Bug fixed.

-- 
Alan Mackenzie (Nuremberg, Germany).


[Message part 3 (message/rfc822, inline)]
From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; CC Mode tracks wrong source files
Date: Fri, 28 Nov 2014 11:19:01 +0100
CC Mode tracks wrong source files when a CC Mode derived mode is
installed non-interactively.

To reproduce, save the following code as `cc-miscompile.el'

(require 'package)
(require 'cc-defs)

(defun main ()
  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))

  (setq package-user-dir (make-temp-file "cc-miscompile" 'directory))

  (package-initialize)
  (package-refresh-contents)
  (package-install 'd-mode)

  (require 'd-mode)

  (let ((source (get (intern "c-typedef-decl-kwds" c-lang-constants) 'source)))
    (message "Sources: %S" (mapcar 'car source)))

  (delete-directory package-user-dir 'recursive))

(main)

and run it with `emacs -Q --script cc-miscompile.el'.  The output is as
follows (package.el output shortened for readility):

Contacting host: melpa.org:80
Contacting host: elpa.gnu.org:80
[…]
Sources: (d-mode cc-miscompile cc-langs)

Note that `cc-miscompile' ends up in the source list of
`c-typedef-decl-kwds', even though it never actually calls any `c-*'
functions at all.

Naturally, CC Mode will later try to load this file, and fail if it is
not in the `load-path'.  This effectively breaks installations of D
Mode from non-interactive Emacs sessions.

I did not try to find the culprit.  The CC Mode code is convoluted
beyond my understanding.



This bug report was last modified 10 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.