unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* c-subword-mode
@ 2006-02-26 22:50 Nick Roberts
  2006-03-01 17:55 ` c-subword-mode Richard Stallman
  2006-03-01 20:34 ` c-subword-mode Alan Mackenzie
  0 siblings, 2 replies; 6+ messages in thread
From: Nick Roberts @ 2006-02-26 22:50 UTC (permalink / raw)
  Cc: bug-cc-mode


With CC Mode 5.31.3 and GNU Emacs 22.0.50.71 (i686-pc-linux-gnu, X toolkit,
Xaw3d scroll bars) of 2006-02-25:

Sometimes I get error messages saying that c-subword-mode is a void variable.
c-subword-mode seems to be a function, so the patch below might be a fix.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** cc-cmds.el	25 Feb 2006 17:51:43 +1300	1.44
--- cc-cmds.el	27 Feb 2006 11:43:36 +1300	
*************** With universal argument, inserts the ana
*** 259,265 ****
  		     (if c-hungry-delete-key "h" "")
  		     (if (and
  			  ;; cc-subword might not be loaded.
! 			  (boundp 'c-subword-mode)
  			  (symbol-value 'c-subword-mode))
  			 "w"
  		       "")))
--- 259,265 ----
  		     (if c-hungry-delete-key "h" "")
  		     (if (and
  			  ;; cc-subword might not be loaded.
! 			  (fboundp 'c-subword-mode)
  			  (symbol-value 'c-subword-mode))
  			 "w"
  		       "")))


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c-subword-mode
  2006-02-26 22:50 c-subword-mode Nick Roberts
@ 2006-03-01 17:55 ` Richard Stallman
  2006-03-01 20:39   ` c-subword-mode Nick Roberts
  2006-03-01 20:34 ` c-subword-mode Alan Mackenzie
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2006-03-01 17:55 UTC (permalink / raw)
  Cc: emacs-devel, bug-cc-mode

    Sometimes I get error messages saying that c-subword-mode is a void variable.
    c-subword-mode seems to be a function, so the patch below might be a fix.

That patch seems wrong to me.  If c-subword-mode is defined as a function 
and not as a variable, your patch will CAUSE such an error rather than
prevent it.

Can you provide a Lisp-level backtrace from some occasion where you
get that error?


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c-subword-mode
  2006-02-26 22:50 c-subword-mode Nick Roberts
  2006-03-01 17:55 ` c-subword-mode Richard Stallman
@ 2006-03-01 20:34 ` Alan Mackenzie
  2006-03-01 20:48   ` c-subword-mode Nick Roberts
  1 sibling, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2006-03-01 20:34 UTC (permalink / raw)
  Cc: emacs-devel, bug-cc-mode

Hi, Nick!

On Mon, 27 Feb 2006, Nick Roberts wrote:


>With CC Mode 5.31.3 and GNU Emacs 22.0.50.71 (i686-pc-linux-gnu, X toolkit,
>Xaw3d scroll bars) of 2006-02-25:

>Sometimes I get error messages saying that c-subword-mode is a void variable.
>c-subword-mode seems to be a function, so the patch below might be a fix.

c-subword-mode is normally defined as (define-minor-mode c-subword-mode
....), so it is has both function and variable bindings.  [On older
Emacsen (< 21.1) lacking define-minor-mode, a stub function is defined instead.]

Can you give any more details about how you get a "void variable" error.
It surely cannot be at cc-cmds.el L263.  I don't think the patch is
right.

>-- 
>Nick                                           http://www.inet.net.nz/~nickrob


>*** cc-cmds.el	25 Feb 2006 17:51:43 +1300	1.44
>--- cc-cmds.el	27 Feb 2006 11:43:36 +1300	
>*************** With universal argument, inserts the ana
>*** 259,265 ****
>  		     (if c-hungry-delete-key "h" "")
>  		     (if (and
>  			  ;; cc-subword might not be loaded.
>! 			  (boundp 'c-subword-mode)
>  			  (symbol-value 'c-subword-mode))
>  			 "w"
>  		       "")))
>--- 259,265 ----
>  		     (if c-hungry-delete-key "h" "")
>  		     (if (and
>  			  ;; cc-subword might not be loaded.
>! 			  (fboundp 'c-subword-mode)
>  			  (symbol-value 'c-subword-mode))
>  			 "w"
>  		       "")))

-- 
Alan Mackenzie (Munich, Germany)




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c-subword-mode
  2006-03-01 17:55 ` c-subword-mode Richard Stallman
@ 2006-03-01 20:39   ` Nick Roberts
  2006-03-04 13:38     ` c-subword-mode Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Roberts @ 2006-03-01 20:39 UTC (permalink / raw)
  Cc: emacs-devel, bug-cc-mode

 >     Sometimes I get error messages saying that c-subword-mode is a void
 >     variable.  c-subword-mode seems to be a function, so the patch below
 >     might be a fix.
 > 
 > That patch seems wrong to me.  If c-subword-mode is defined as a function 
 > and not as a variable, your patch will CAUSE such an error rather than
 > prevent it.

Yes it probably is wrong, but I don't see the point of the test if
c-subword-mode is a function.

 > Can you provide a Lisp-level backtrace from some occasion where you
 > get that error?

If I load a C file, I get:

Debugger entered--Lisp error: (void-variable c-subword-mode)
  c-update-modeline()
  c-basic-common-init(c-mode ((java-mode . "java") (awk-mode . "awk") (other . "gnu")))
  c-common-init(c-mode)
  c-mode()
  set-auto-mode-0(c-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer myprog.c> "~/myprog.c" nil nil "~/myprog.c" (458851 773))
  find-file-noselect("~/myprog.c" nil nil t)
  find-file("~/myprog.c" t)
  call-interactively(find-file)

It's probably due to my build.  If I load cc-mode first, I don't get the error.


-- 
Nick                                           http://www.inet.net.nz/~nickrob


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c-subword-mode
  2006-03-01 20:34 ` c-subword-mode Alan Mackenzie
@ 2006-03-01 20:48   ` Nick Roberts
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Roberts @ 2006-03-01 20:48 UTC (permalink / raw)
  Cc: emacs-devel, bug-cc-mode

 > c-subword-mode is normally defined as (define-minor-mode c-subword-mode
 > ....), so it is has both function and variable bindings.  [On older
 > Emacsen (< 21.1) lacking define-minor-mode, a stub function is defined instead.]

Yes, I misread the code. c-subword-mode just appeared as a function because
it wasn't loaded.

 > Can you give any more details about how you get a "void variable" error.
 > It surely cannot be at cc-cmds.el L263.  I don't think the patch is
 > right.

The patch is surely wrong.  I don't think I've built Emacs correctly.
Sorry for the noise.


-- 
Nick                                           http://www.inet.net.nz/~nickrob


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c-subword-mode
  2006-03-01 20:39   ` c-subword-mode Nick Roberts
@ 2006-03-04 13:38     ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2006-03-04 13:38 UTC (permalink / raw)
  Cc: bug-cc-mode, emacs-devel

    It's probably due to my build.

What does that mean?

				    If I load cc-mode first, I don't get the error.

It's normal for people to visit C files without loading cc-mode first,
so that case does need to work.  Why do you think it is your fault?


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-04 13:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-26 22:50 c-subword-mode Nick Roberts
2006-03-01 17:55 ` c-subword-mode Richard Stallman
2006-03-01 20:39   ` c-subword-mode Nick Roberts
2006-03-04 13:38     ` c-subword-mode Richard Stallman
2006-03-01 20:34 ` c-subword-mode Alan Mackenzie
2006-03-01 20:48   ` c-subword-mode Nick Roberts

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).