From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joris Steyn Newsgroups: gmane.emacs.bugs Subject: bug#18845: 24.4; cc-mode derived modes broken because cl is used but not required Date: Sun, 26 Oct 2014 23:02:38 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ed20e84c1a905065a92c4 X-Trace: ger.gmane.org 1414361417 23238 80.91.229.3 (26 Oct 2014 22:10:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2014 22:10:17 +0000 (UTC) To: 18845@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 26 23:10:11 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XiW0n-0004La-9C for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Oct 2014 23:10:09 +0100 Original-Received: from localhost ([::1]:58492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiW0m-00025C-PD for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Oct 2014 18:10:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiW0j-00023C-5t for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:10:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiW0h-0007r0-EU for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:10:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiW0h-0007qk-Ad for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XiW0g-0006kx-Ld for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joris Steyn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Oct 2014 22:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18845 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141436134925887 (code B ref -1); Sun, 26 Oct 2014 22:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2014 22:09:09 +0000 Original-Received: from localhost ([127.0.0.1]:36238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiVzo-0006jR-8b for submit@debbugs.gnu.org; Sun, 26 Oct 2014 18:09:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60267) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiVtj-0006aP-EK for submit@debbugs.gnu.org; Sun, 26 Oct 2014 18:02:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiVtc-0006Ao-Nv for submit@debbugs.gnu.org; Sun, 26 Oct 2014 18:02:46 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiVtc-0006Ai-Ki for submit@debbugs.gnu.org; Sun, 26 Oct 2014 18:02:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiVta-00017L-Oi for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:02:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiVtZ-0006AD-1N for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:02:42 -0400 Original-Received: from mail-ig0-x231.google.com ([2607:f8b0:4001:c05::231]:62021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiVtY-00069m-JN for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 18:02:40 -0400 Original-Received: by mail-ig0-f177.google.com with SMTP id h18so1925228igc.10 for ; Sun, 26 Oct 2014 15:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=lZCL1WFVHw8EMcRGPE996ps9TT4yQ1dQvcedyU7WXIE=; b=d9JFruqfFlEzf49L4tTgapuSI2ZMHO0OVTsRUxZ+zQpHzbqwMQzb1l3lO05Pl6nHms trcC+xK8XiZcVhYSucbtyCKQlDnZ/ErFEc732/PCRsqTHHdhaMwHmWhEWLyRWudKznre 6dGbkCmc1ZWDXTS9pKJkw3Ub3Dgvga7jrFLFNX3wF4wKXu3ZbQYFOUrVJtJrsv6FtdJN AVYbzMPY1UEvfZi1T4rejTvqegVEtp9ZiW6MhDVkwPnN+zRMxunO8sm11dFg9H8rquPy kOV27Lk7dN67L9FSSl3YYrIwJOVnOhYEI63hEl4BDa561rTRRwsW6j1pPlQ6WQAIbHMe uIRQ== X-Received: by 10.107.3.101 with SMTP id 98mr18337557iod.25.1414360958548; Sun, 26 Oct 2014 15:02:38 -0700 (PDT) Original-Received: by 10.107.45.215 with HTTP; Sun, 26 Oct 2014 15:02:38 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sun, 26 Oct 2014 18:09:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95127 --001a113ed20e84c1a905065a92c4 Content-Type: text/plain; charset=UTF-8 cc-mode in emacs 24.4 uses the cl compatibility package at compile-time but does not require it when used like this: (require 'cc-mode) (eval-when-compile (require 'cc-langs)) ; Symbol's function definition is void: set-difference (c-lang-const c-matchers-2 c) ; Symbol's function definition is void: cl-macroexpand-all (c-lang-defconst c-other-kwds t nil) I observed breakage of php-mode and csharp-mode, but this affects any derived mode that does not require cl or requires cl-lib instead of cl. This seems to be recently fixed in trunk (revno 118032) so maybe no further action is required and this bug report can be closed. What would be the most appropriate way for affected derived modes to work around this issue? Suppose I add: (eval-when-compile (if (and (= emacs-major-version 24) (= emacs-minor-version 4)) (require 'cl))) would that be fine and won't there be a future 24.4 release that fixes this issue? In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3) of 2014-10-21 on bitzer.hoetzel.info Windowing system distributor `The X.Org Foundation', version 11.0.11601000 System Description: Arch Linux Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: C locale-coding-system: nil Major mode: Lisp Interaction Minor modes in effect: tooltip-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 font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 72116 7225) (symbols 48 17651 0) (miscs 40 37 96) (strings 32 9247 4331) (string-bytes 1 253012) (vectors 16 8990) (vector-slots 8 383789 17145) (floats 8 64 304) (intervals 56 210 111) (buffers 960 12) (heap 1024 26191 1090)) --001a113ed20e84c1a905065a92c4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
cc-mode in emacs 24.4 uses the cl compatibility packa= ge at compile-time
but does not require it when used like this:

= =C2=A0 (require 'cc-mode)

=C2=A0 (eval-when-compile
=C2=A0=C2= =A0=C2=A0 (require 'cc-langs))

=C2=A0 ; Symbol's function de= finition is void: set-difference
=C2=A0 (c-lang-const c-matchers-2 c)
=C2=A0 ; Symbol's function definition is void: cl-macroexpand-all<= br>=C2=A0 (c-lang-defconst c-other-kwds t nil)

I observed breakage o= f php-mode and csharp-mode, but this affects any
derived mode that does = not require cl or requires cl-lib instead of cl.

This seems to be re= cently fixed in trunk (revno 118032) so maybe no
further action is requi= red and this bug report can be closed.

What would be the most approp= riate way for affected derived modes to
work around this issue? Suppose = I add:

=C2=A0 (eval-when-compile
=C2=A0=C2=A0=C2=A0 (if (and (=3D= emacs-major-version 24) (=3D emacs-minor-version 4))
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (require 'cl)))

would that be fine and won't th= ere be a future 24.4 release that fixes
this issue?



In GN= U Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3)
=C2=A0of = 2014-10-21 on bitzer.hoetzel.info
Windowing system distributor `The X.Org Foundation', version 11.0.= 11601000
System Description:=C2=A0=C2=A0=C2=A0 Arch Linux

Configu= red using:
=C2=A0`configure --prefix=3D/usr --sysconfdir=3D/etc --libexe= cdir=3D/usr/lib
=C2=A0--localstatedir=3D/var --with-x-toolkit=3Dgtk3 --w= ith-xft
=C2=A0'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -= fstack-protector-strong
=C2=A0--param=3Dssp-buffer-size=3D4' CPPFLAG= S=3D-D_FORTIFY_SOURCE=3D2
=C2=A0LDFLAGS=3D-Wl,-O1,--sort-common,--as-nee= ded,-z,relro'

Important settings:
=C2=A0 value of $LANG: C=C2=A0 locale-coding-system: nil

Major mode: Lisp Interaction
Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 electric-inden= t-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2= =A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-fo= nt-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t<= br>=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2= =A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transi= ent-mark-mode: t

Recent input:
M-x r e p o <tab> r <tab&= gt; <return>

Recent messages:
For information about GNU Ema= cs and the GNU system, type C-h C-a.
Making completion list...

Lo= ad-path shadows:
None found.

Features:
(shadow sort gnus-util = mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-b= odies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendm= ail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils he= lp-mode easymenu time-date tooltip
electric uniquify ediff-hook vc-hooks= lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-op= t fringe tabulated-list newcomment
lisp-mode prog-mode register page men= u-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock synta= x facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese= tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak = czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-= cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cu= s-face macroexp files
text-properties overlay sha1 md5 base64 format env= code-pages mule
custom widget hashtable-print-readable backquote make-n= etwork-process
dbusbind gfilenotify dynamic-setting system-font-setting<= br>font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 72116 7225)
=C2=A0(symbols 48 17651 = 0)
=C2=A0(miscs 40 37 96)
=C2=A0(strings 32 9247 4331)
=C2=A0(stri= ng-bytes 1 253012)
=C2=A0(vectors 16 8990)
=C2=A0(vector-slots 8 3837= 89 17145)
=C2=A0(floats 8 64 304)
=C2=A0(intervals 56 210 111)
=C2= =A0(buffers 960 12)
=C2=A0(heap 1024 26191 1090))

--001a113ed20e84c1a905065a92c4--