* unload-feature and defcustom.
@ 2005-04-29 13:51 Lute Kamstra
2005-04-29 19:02 ` HAVE_SYS_SELECT of sysselect.h Nozomu Ando
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Lute Kamstra @ 2005-04-29 13:51 UTC (permalink / raw)
unload-feature does not completely reverse the effects of defcustom.
Consider this file:
,----[ a.el ]
| (defcustom a-cus-var 'a-value
| "The documentation of `a-cus-var'.")
| (provide 'a)
`----
and do:
(require 'a)
(unload-feature 'a)
Now a-cus-var is not bound, but when I do M-x customize-option, I can
still select (with completion) a-cus-var and that gives me this
customization buffer:
,----[ *Customize Option: A Cus Var* ]
| This is a customization buffer.
| `Raised' buttons show active fields; type RET or click mouse-1
| on an active field to invoke its action. Editing an option value
| changes only the text in the buffer. Invoke the State button to set or
| save the option value. Saving an option normally edits your init file.
| Invoke Custom file for information on how to save in a different file.
| Invoke Help for general information.
|
| Operate on everything in this buffer:
| Set for Current Session Save for Future Sessions
| Reset Reset to Saved Erase Customization Finish
|
| A Cus Var: Hide Value "nil"
| State: CHANGED outside Customize; operating on it here may be unreliable.
|
| The documentation of `a-cus-var'.
| Parent groups: Nil
`----
I think this is undesirable. Could this be easily fixed? (Maybe by
letting customize ignore unbound vars.) Or is better to put this on
the post-release todo list?
Lute.
^ permalink raw reply [flat|nested] 11+ messages in thread
* HAVE_SYS_SELECT of sysselect.h
2005-04-29 13:51 unload-feature and defcustom Lute Kamstra
@ 2005-04-29 19:02 ` Nozomu Ando
2005-05-01 22:43 ` Thien-Thi Nguyen
2005-05-02 1:53 ` YAMAMOTO Mitsuharu
2005-04-30 8:13 ` unload-feature and defcustom David Kastrup
2005-05-01 12:06 ` Richard Stallman
2 siblings, 2 replies; 11+ messages in thread
From: Nozomu Ando @ 2005-04-29 19:02 UTC (permalink / raw)
sysselect.h failes to include <sys/select.h>.
Is this a typo?
---
Nozomu Ando
---
Index: sysselect.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/sysselect.h,v
retrieving revision 1.3
diff -u -u -r1.3 sysselect.h
--- sysselect.h 1 Sep 2003 15:45:56 -0000 1.3
+++ sysselect.h 29 Apr 2005 18:55:39 -0000
@@ -18,7 +18,7 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef HAVE_SYS_SELECT
+#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: unload-feature and defcustom.
2005-04-29 13:51 unload-feature and defcustom Lute Kamstra
2005-04-29 19:02 ` HAVE_SYS_SELECT of sysselect.h Nozomu Ando
@ 2005-04-30 8:13 ` David Kastrup
2005-05-01 12:06 ` Richard Stallman
2 siblings, 0 replies; 11+ messages in thread
From: David Kastrup @ 2005-04-30 8:13 UTC (permalink / raw)
Cc: emacs-devel
Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:
> unload-feature does not completely reverse the effects of defcustom.
>
> Consider this file:
>
> ,----[ a.el ]
> | (defcustom a-cus-var 'a-value
> | "The documentation of `a-cus-var'.")
> | (provide 'a)
> `----
>
> and do:
>
> (require 'a)
> (unload-feature 'a)
>
> I think this is undesirable. Could this be easily fixed? (Maybe by
> letting customize ignore unbound vars.) Or is better to put this on
> the post-release todo list?
post-release, I'd say. It should be noted that files generated with
update-file-autoloads and its cousins actually only contain defvar,
not defcustom, but maybe those are not the most important ones to
unload in general.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: unload-feature and defcustom.
2005-04-29 13:51 unload-feature and defcustom Lute Kamstra
2005-04-29 19:02 ` HAVE_SYS_SELECT of sysselect.h Nozomu Ando
2005-04-30 8:13 ` unload-feature and defcustom David Kastrup
@ 2005-05-01 12:06 ` Richard Stallman
2 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2005-05-01 12:06 UTC (permalink / raw)
Cc: emacs-devel
(require 'a)
(unload-feature 'a)
Now a-cus-var is not bound, but when I do M-x customize-option, I can
still select (with completion) a-cus-var and that gives me this
customization buffer:
I think the cleaner fix is to undo more of what the defcustom
did, so that the variable can't be customized. That could be
fixed in unload-feature. You just need to figure out which
properties ought to be removed and which should not be.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-04-29 19:02 ` HAVE_SYS_SELECT of sysselect.h Nozomu Ando
@ 2005-05-01 22:43 ` Thien-Thi Nguyen
2005-05-01 23:15 ` Thien-Thi Nguyen
2005-05-02 1:53 ` YAMAMOTO Mitsuharu
1 sibling, 1 reply; 11+ messages in thread
From: Thien-Thi Nguyen @ 2005-05-01 22:43 UTC (permalink / raw)
Cc: emacs-devel
Nozomu Ando <nand@mac.com> writes:
> sysselect.h failes to include <sys/select.h>.
>
> Is this a typo?
yes, thanks for spotting it. please install the fix.
thi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-05-01 22:43 ` Thien-Thi Nguyen
@ 2005-05-01 23:15 ` Thien-Thi Nguyen
2005-05-02 0:21 ` Nozomu Ando
0 siblings, 1 reply; 11+ messages in thread
From: Thien-Thi Nguyen @ 2005-05-01 23:15 UTC (permalink / raw)
Cc: emacs-devel
Thien-Thi Nguyen <ttn@gnu.org> writes:
> yes, thanks for spotting it. please install the fix.
never mind; i have just installed it myself.
(btw, do you have write privs to the cvs repo?)
thi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-05-01 23:15 ` Thien-Thi Nguyen
@ 2005-05-02 0:21 ` Nozomu Ando
2005-05-02 1:47 ` Thien-Thi Nguyen
0 siblings, 1 reply; 11+ messages in thread
From: Nozomu Ando @ 2005-05-02 0:21 UTC (permalink / raw)
Cc: Nozomu Ando, emacs-devel
On May 2, 2005, at 8:15 AM, Thien-Thi Nguyen wrote:
> Thien-Thi Nguyen <ttn@gnu.org> writes:
>
>> yes, thanks for spotting it. please install the fix.
>
> never mind; i have just installed it myself.
Thank you.
> (btw, do you have write privs to the cvs repo?)
No.
---
Nozomu Ando
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-05-02 0:21 ` Nozomu Ando
@ 2005-05-02 1:47 ` Thien-Thi Nguyen
0 siblings, 0 replies; 11+ messages in thread
From: Thien-Thi Nguyen @ 2005-05-02 1:47 UTC (permalink / raw)
Cc: emacs-devel
Nozomu Ando <nand@mac.com> writes:
> > (btw, do you have write privs to the cvs repo?)
>
> No.
ok, i will remember this for your future patches
(those that i feel confident about handling :-).
thi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-04-29 19:02 ` HAVE_SYS_SELECT of sysselect.h Nozomu Ando
2005-05-01 22:43 ` Thien-Thi Nguyen
@ 2005-05-02 1:53 ` YAMAMOTO Mitsuharu
2005-05-02 2:44 ` Nozomu Ando
2005-05-04 5:45 ` Harald Maier
1 sibling, 2 replies; 11+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-05-02 1:53 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On Sat, 30 Apr 2005 04:02:12 +0900, Nozomu Ando <nand@mac.com> said:
> -#ifdef HAVE_SYS_SELECT
> +#ifdef HAVE_SYS_SELECT_H
I can't test it with Mac OS X 10.4 Tiger now, but I think this is the
best way to solve the "Can't compile on Tiger" problem.
But with the above change, I could not compile xmenu.c (for X11 build)
or mac.c (for Carbon build) at least when compiling with the GCC
option "-g" on Mac OS X 10.3.9.
In file included from /usr/include/mach/mach_init.h:76,
from /usr/include/mach/mach.h:64,
from /usr/include/sys/event.h:154,
from /usr/include/sys/select.h:71,
from /SOME/WHERE/emacs/src/sysselect.h:22,
from /SOME/WHERE/emacs/src/mac.c:31:
/usr/include/mach/mach_traps.h:103: error: conflicting types for `emacs_init_process'
/SOME/WHERE/emacs/src/lisp.h:3031: error: previous declaration of `emacs_init_process'
In file included from /usr/include/mach/mach_init.h:76,
from /usr/include/mach/mach.h:64,
from /usr/include/sys/event.h:154,
from /usr/include/sys/select.h:71,
from /SOME/WHERE/emacs/src/sysselect.h:22,
from /SOME/WHERE/emacs/src/xmenu.c:51:
/usr/include/mach/mach_traps.h:103: error: conflicting types for `emacs_init_process'
/SOME/WHERE/emacs/src/lisp.h:3031: error: previous declaration of `emacs_init_process'
The following patch seems to fix it, but is there any more elegant
way?
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
*** sysselect.h.~1.4.~ Mon May 2 08:55:47 2005
--- sysselect.h Mon May 2 10:48:14 2005
***************
*** 19,25 ****
--- 19,31 ----
Boston, MA 02111-1307, USA. */
#ifdef HAVE_SYS_SELECT_H
+ #if defined (DARWIN) || defined (MAC_OSX)
+ #undef init_process
+ #endif
#include <sys/select.h>
+ #if defined (DARWIN) || defined (MAC_OSX)
+ #define init_process emacs_init_process
+ #endif
#endif
#ifdef FD_SET
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-05-02 1:53 ` YAMAMOTO Mitsuharu
@ 2005-05-02 2:44 ` Nozomu Ando
2005-05-04 5:45 ` Harald Maier
1 sibling, 0 replies; 11+ messages in thread
From: Nozomu Ando @ 2005-05-02 2:44 UTC (permalink / raw)
Cc: Nozomu Ando, emacs-devel
On May 2, 2005, at 10:53 AM, YAMAMOTO Mitsuharu wrote:
> I can't test it with Mac OS X 10.4 Tiger now, but I think this is the
> best way to solve the "Can't compile on Tiger" problem.
>
> But with the above change, I could not compile xmenu.c (for X11 build)
> or mac.c (for Carbon build) at least when compiling with the GCC
> option "-g" on Mac OS X 10.3.9.
Oops, sorry.
How do you think about changing the function's name "init_process"
which conflicts system library of Mac OS X 10.3 (darwin 7)?
---
Nozomu Ando
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HAVE_SYS_SELECT of sysselect.h
2005-05-02 1:53 ` YAMAMOTO Mitsuharu
2005-05-02 2:44 ` Nozomu Ando
@ 2005-05-04 5:45 ` Harald Maier
1 sibling, 0 replies; 11+ messages in thread
From: Harald Maier @ 2005-05-04 5:45 UTC (permalink / raw)
Cc: Nozomu Ando, emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> The following patch seems to fix it, but is there any more elegant
> way?
I don't think that the file sysselect.h changes very often so the fix
herein seems to me the best. The other suggestion to change the name
of 'init_process' would cause more trouble because the files emacs.c,
process.c, and lisp.h seems to change very often.
Before I saw the patch I changed the return type of init_process from
VOID to INT. This worked too for me. But this means too to change the
files lisp.h and process.c.
Harald
>
> *** sysselect.h.~1.4.~ Mon May 2 08:55:47 2005
> --- sysselect.h Mon May 2 10:48:14 2005
> ***************
> *** 19,25 ****
> --- 19,31 ----
> Boston, MA 02111-1307, USA. */
>
> #ifdef HAVE_SYS_SELECT_H
> + #if defined (DARWIN) || defined (MAC_OSX)
> + #undef init_process
> + #endif
> #include <sys/select.h>
> + #if defined (DARWIN) || defined (MAC_OSX)
> + #define init_process emacs_init_process
> + #endif
> #endif
>
> #ifdef FD_SET
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-05-04 5:45 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-29 13:51 unload-feature and defcustom Lute Kamstra
2005-04-29 19:02 ` HAVE_SYS_SELECT of sysselect.h Nozomu Ando
2005-05-01 22:43 ` Thien-Thi Nguyen
2005-05-01 23:15 ` Thien-Thi Nguyen
2005-05-02 0:21 ` Nozomu Ando
2005-05-02 1:47 ` Thien-Thi Nguyen
2005-05-02 1:53 ` YAMAMOTO Mitsuharu
2005-05-02 2:44 ` Nozomu Ando
2005-05-04 5:45 ` Harald Maier
2005-04-30 8:13 ` unload-feature and defcustom David Kastrup
2005-05-01 12:06 ` Richard Stallman
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).