* Re: Warnings in cc mode [not found] <E1EbOsE-0000q9-I3@fencepost.gnu.org> @ 2005-11-15 10:34 ` Alan Mackenzie 2005-11-15 23:22 ` Richard M. Stallman 2005-11-16 0:06 ` Stefan Monnier 0 siblings, 2 replies; 3+ messages in thread From: Alan Mackenzie @ 2005-11-15 10:34 UTC (permalink / raw) Cc: bug-cc-mode, emacs-devel [cc to emacs-devel@gnu.org added] Hi, Richard: On Sun, 13 Nov 2005, Richard M. Stallman wrote: >Would you please DTRT? >In toplevel form: >cc-fonts.el:160:16:Warning: `font-lock-reference-face' is an obsolete > variable; use `font-lock-constant-face' instead. We can surely fix this in CC Mode 5.31, since support for Emacs 19.34 is being dropped. CC Mode 5.30.n (the current released version) still supports 19.34. font-lock-reference-face became obsolete at Emacs 20.1, I believe. >In c-make-styles-buffer-local: >cc-styles.el:621:27:Warning: `make-variable-buffer-local' should be >called at > toplevel This implements a user option to have CC Mode style variables global rather than buffer-local. This is an ancient compatibility thing which probably isn't useful any more (if it ever was). However, _somebody_ out there is probably still using it. :-( So I think it should stay as it is. What is so bad about calling `make-variable-buffer-local' from a function rather than top level? Or even, for that matter, calling it from an `eval-after-load' form? -- Alan Mackenzie (Munich, Germany) ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Warnings in cc mode 2005-11-15 10:34 ` Warnings in cc mode Alan Mackenzie @ 2005-11-15 23:22 ` Richard M. Stallman 2005-11-16 0:06 ` Stefan Monnier 1 sibling, 0 replies; 3+ messages in thread From: Richard M. Stallman @ 2005-11-15 23:22 UTC (permalink / raw) Cc: bug-cc-mode, emacs-devel So I think it should stay as it is. What is so bad about calling `make-variable-buffer-local' from a function rather than top level? It usually means someone meant to call make-local-variable and wrote make-variable-buffer-local by mistake. If that call is correct, please install a call to with-no-warnings around it, to suppress the warning. By the way, when will you install the new CC mode in Emacs? ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Warnings in cc mode 2005-11-15 10:34 ` Warnings in cc mode Alan Mackenzie 2005-11-15 23:22 ` Richard M. Stallman @ 2005-11-16 0:06 ` Stefan Monnier 1 sibling, 0 replies; 3+ messages in thread From: Stefan Monnier @ 2005-11-16 0:06 UTC (permalink / raw) Cc: Richard M. Stallman, bug-cc-mode, emacs-devel > What is so bad about calling `make-variable-buffer-local' from a function > rather than top level? Or even, for that matter, calling it from an > `eval-after-load' form? make-variable-buffer-local changes the behavior of a variable globally and for ever. So it's a property of the variable and should only ever appear right next to the corresponding defvar. Many people incorrectly use make-variable-buffer-local where they meant make-local-variable, and this warning catches this (that's the reason why I added the warning). Just like for all warnings, there are corner cases where the warning is triggered in a situation where the code is actually really doing what it intends to do. Stefan ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-16 0:06 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1EbOsE-0000q9-I3@fencepost.gnu.org> 2005-11-15 10:34 ` Warnings in cc mode Alan Mackenzie 2005-11-15 23:22 ` Richard M. Stallman 2005-11-16 0:06 ` Stefan Monnier
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.