> In CUA, I have this: > (define-minor-mode cua-mode > "..." > :global t > ...)
> Now, assume I have a buffer `xyz' which definitely don't want > cua-mode enabled. > If I do things in the following sequence, it works alright: > M-x cua-mode RET > C-x b xyz RET > M-: (set (make-local-variable 'cua-mode) nil) RET > But if I (accidentally) do it in this sequence: > C-x b xyz RET > M-: (set (make-local-variable 'cua-mode) nil) RET > M-x cua-mode RET > then I end up _enabling_ cua mode in just the xyz buffer, > while the global setting is still nil. > I think that it would make sense if specifying :global t on > define-minor-mode would enforce changing the default (global) value of > the mode variable rather than the potentially buffer-local value. IIRC, the reason why I used `setq' is that most pre-existing global minor modes used setq rather than setq-default. I assumed the reason was to make it possible to make the mode buffer-local in a specific buffer. Feel free to change it to setq-default if you feel it's better. I don't have any preference. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel