* Fontless Info @ 2013-02-19 8:01 Aidan Gauland 2013-02-19 10:16 ` Tassilo Horn 2013-02-19 16:58 ` Glenn Morris 0 siblings, 2 replies; 21+ messages in thread From: Aidan Gauland @ 2013-02-19 8:01 UTC (permalink / raw) To: emacs-devel When I updated my local trunk a couple days ago (and built and installed), the Info reader stopped fontifying (not sure that's the correct term) the *info* buffer. It's still usable otherwise, but links aren't colored blue and underlined, headings aren't bold and larger (in X), etc. All plain and ugly text. This is the same in X and in a terminal. Emacs was run with -Q, and I ran `make distclean' before rebuilding again to make sure it wasn't a problem with my local build. This appears to be a bug, but if no one else can reproduce it... Regards, Aidan Gauland ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 8:01 Fontless Info Aidan Gauland @ 2013-02-19 10:16 ` Tassilo Horn 2013-02-19 15:00 ` Drew Adams 2013-02-19 16:20 ` Eli Zaretskii 2013-02-19 16:58 ` Glenn Morris 1 sibling, 2 replies; 21+ messages in thread From: Tassilo Horn @ 2013-02-19 10:16 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-devel Aidan Gauland <aidalgol@no8wireless.co.nz> writes: Hi Aidan, > Emacs was run with -Q, and I ran `make distclean' before rebuilding > again to make sure it wasn't a problem with my local build. This > appears to be a bug, but if no one else can reproduce it... You are not alone. I've just updated my emacs copy, and I can reproduce the issue. So it's clearly a bug. Bye, Tassilo ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 10:16 ` Tassilo Horn @ 2013-02-19 15:00 ` Drew Adams 2013-02-19 16:33 ` Eli Zaretskii 2013-02-19 16:20 ` Eli Zaretskii 1 sibling, 1 reply; 21+ messages in thread From: Drew Adams @ 2013-02-19 15:00 UTC (permalink / raw) To: 'Tassilo Horn', 'Aidan Gauland'; +Cc: emacs-devel > > Emacs was run with -Q, and I ran `make distclean' before rebuilding > > again to make sure it wasn't a problem with my local build. This > > appears to be a bug, but if no one else can reproduce it... > > You are not alone. I've just updated my emacs copy, and I > can reproduce the issue. So it's clearly a bug. Dunno whether it is related, but there are already two font-lock regression bugs filed for trunk builds after Feb 15. See bugs #13730, #13751. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 15:00 ` Drew Adams @ 2013-02-19 16:33 ` Eli Zaretskii 0 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2013-02-19 16:33 UTC (permalink / raw) To: Drew Adams; +Cc: emacs-devel, aidalgol, tsdh > From: "Drew Adams" <drew.adams@oracle.com> > Date: Tue, 19 Feb 2013 07:00:51 -0800 > Cc: emacs-devel@gnu.org > > > > Emacs was run with -Q, and I ran `make distclean' before rebuilding > > > again to make sure it wasn't a problem with my local build. This > > > appears to be a bug, but if no one else can reproduce it... > > > > You are not alone. I've just updated my emacs copy, and I > > can reproduce the issue. So it's clearly a bug. > > Dunno whether it is related, but there are already two font-lock regression bugs > filed for trunk builds after Feb 15. See bugs #13730, #13751. Looks like they all come from the same change, yes. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 10:16 ` Tassilo Horn 2013-02-19 15:00 ` Drew Adams @ 2013-02-19 16:20 ` Eli Zaretskii 2013-02-19 17:58 ` Drew Adams 2013-02-19 23:10 ` Alan Mackenzie 1 sibling, 2 replies; 21+ messages in thread From: Eli Zaretskii @ 2013-02-19 16:20 UTC (permalink / raw) To: Tassilo Horn, Alan Mackenzie; +Cc: aidalgol, emacs-devel > From: Tassilo Horn <tsdh@gnu.org> > Date: Tue, 19 Feb 2013 11:16:25 +0100 > Cc: emacs-devel@gnu.org > > Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > > > Emacs was run with -Q, and I ran `make distclean' before rebuilding > > again to make sure it wasn't a problem with my local build. This > > appears to be a bug, but if no one else can reproduce it... > > You are not alone. I've just updated my emacs copy, and I can reproduce > the issue. So it's clearly a bug. This happens because font-lock-mode gets turned off in Info buffers. Type "M-x font-lock-mode RET", and all the niceties are back. (You could guess that this is the problem if you'd go to the un-decorated text and type "M-x describe-text-properties RET" there.) The reason seems to be the changes in revision 111794: their result is that, after Info mode is turned on and turns on font-lock, font-lock is turned off again by something called global-font-lock-mode-check-buffers. And to make things _really_ interesting, if you run this under Edebug, the problem disappears... Since the voodoo of easy-mmode is beyond me, I'll let others fix this. ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 16:20 ` Eli Zaretskii @ 2013-02-19 17:58 ` Drew Adams 2013-02-19 18:48 ` Drew Adams 2013-02-19 23:23 ` Alan Mackenzie 2013-02-19 23:10 ` Alan Mackenzie 1 sibling, 2 replies; 21+ messages in thread From: Drew Adams @ 2013-02-19 17:58 UTC (permalink / raw) To: 'Eli Zaretskii', 'Tassilo Horn', 'Alan Mackenzie' Cc: aidalgol, emacs-devel > This happens because font-lock-mode gets turned off in Info buffers. > Type "M-x font-lock-mode RET", and all the niceties are back. (You > could guess that this is the problem if you'd go to the un-decorated > text and type "M-x describe-text-properties RET" there.) The same thing is true for the symptoms of bug #13751: font locking gets turned off in Emacs Lisp buffers if you do (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) and in Dired buffers if you use Dired+. In all such cases, `M-x font-lock-mode' turns it back on, but it should never have been turned off. > The reason seems to be the changes in revision 111794: their result is > that, after Info mode is turned on and turns on font-lock, font-lock > is turned off again by something called > global-font-lock-mode-check-buffers. But the definition of `global-font-lock-mode-check-buffers' has not changed since before this regression was introduced, AFAICT. Nothing in its file, font-core.el, was changed. It is the definition of `define-globalized-minor-mode' that was changed, radically it seems. `C-h f global-font-lock-mode-check-buffers' shows no doc string but tells us it is a compiled function in `font-core.el'. There is however no explicit definition of it in that file. It is created by `define-globalized-minor-mode'. Our help system sends the user on a wild goose chase here. S?he has no hope of reorientation and finding a way out of the swamp. You can't get there from here. Emacs seems to be little-by-little losing its character of being self-documenting, by the use more and more of macros that generate functions without doc. And by the use more and more of `defstruct' without providing doc for accessor etc. functions. Dommage. At the very least (and no, it would by no means be a substitute for documenting the resulting objects themselves), the doc for `define-globalized-minor-mode' should mention the objects that it creates, such as function `MODE-check-buffers'. > Since the voodoo of easy-mmode is beyond me, I'll let others fix this. Hear, hear. "Easy", indeed. Easy for those defining things, perhaps. Hard on Emacs users. Dommage. ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 17:58 ` Drew Adams @ 2013-02-19 18:48 ` Drew Adams 2013-02-19 20:53 ` Eli Zaretskii 2013-02-19 23:23 ` Alan Mackenzie 1 sibling, 1 reply; 21+ messages in thread From: Drew Adams @ 2013-02-19 18:48 UTC (permalink / raw) To: 'Eli Zaretskii', 'Tassilo Horn', 'Alan Mackenzie' Cc: aidalgol, emacs-devel > The same thing is true for the symptoms of bug #13751: > font locking gets turned off in Emacs Lisp buffers if you do > (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) > and in Dired buffers if you use Dired+. > > In all such cases, `M-x font-lock-mode' turns it back on, but > it should never have been turned off. Actually, there is more breakage than that. Even if you use `M-x font-lock-mode' to turn the mode back on, in Emacs-Lisp mode keywords such as `&optional' are no longer highlighted. Dunno whether this regression is independent of the more general one that turns off font-lock mode when it should be on. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 18:48 ` Drew Adams @ 2013-02-19 20:53 ` Eli Zaretskii 2013-02-19 21:05 ` Drew Adams 2013-02-19 21:14 ` Drew Adams 0 siblings, 2 replies; 21+ messages in thread From: Eli Zaretskii @ 2013-02-19 20:53 UTC (permalink / raw) To: Drew Adams; +Cc: acm, emacs-devel, aidalgol, tsdh > From: "Drew Adams" <drew.adams@oracle.com> > Cc: <aidalgol@no8wireless.co.nz>, <emacs-devel@gnu.org> > Date: Tue, 19 Feb 2013 10:48:08 -0800 > > Even if you use `M-x font-lock-mode' to turn the mode back on, in Emacs-Lisp > mode keywords such as `&optional' are no longer highlighted. Use "M-x describe-text-properties RET" to see what face, if any, is there. > Dunno whether this regression is independent of the more general one that turns > off font-lock mode when it should be on. It's probably another problem. There was some change in that area lately: 2013-02-18 Michael Heerdegen <michael_heerdegen@web.de> * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Use font-lock-keyword-face for macros and special forms (bug#8345). 2013-02-17 Stefan Monnier <monnier@iro.umontreal.ca> * font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2): Don't assume all identifier chars have syntax word. * emacs-lisp/lisp-mode.el (lisp-mode-variables): Remove bar-not-symbol. Adjust callers. (lisp-mode-variables): Don't set a font-lock-syntax-table. ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 20:53 ` Eli Zaretskii @ 2013-02-19 21:05 ` Drew Adams 2013-02-19 21:21 ` Eli Zaretskii 2013-02-20 11:08 ` Michael Heerdegen 2013-02-19 21:14 ` Drew Adams 1 sibling, 2 replies; 21+ messages in thread From: Drew Adams @ 2013-02-19 21:05 UTC (permalink / raw) To: 'Eli Zaretskii'; +Cc: acm, emacs-devel, aidalgol, tsdh > > Even if you use `M-x font-lock-mode' to turn the mode back > > on, in Emacs-Lisp mode keywords such as `&optional' are no > > longer highlighted. > > Use "M-x describe-text-properties RET" to see what face, if any, is > there. No face there. All it says is this: There are text properties here: fontified t > > Dunno whether this regression is independent of the more > > general one that turns off font-lock mode when it should be on. > > It's probably another problem. There was some change in that area > lately: > > 2013-02-18 Michael Heerdegen <michael_heerdegen@web.de> > > * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): > Use font-lock-keyword-face for macros and special forms > (bug#8345). Hm. Does eldoc.el fiddle with stuff even if you don't use Eldoc? My recipe was from `emacs -Q', and I did not turn on eldoc-mode. > 2013-02-17 Stefan Monnier <monnier@iro.umontreal.ca> > > * font-lock.el (lisp-font-lock-keywords-1, > lisp-font-lock-keywords-2): > Don't assume all identifier chars have syntax word. > * emacs-lisp/lisp-mode.el (lisp-mode-variables): > Remove bar-not-symbol. Adjust callers. > (lisp-mode-variables): Don't set a font-lock-syntax-table. Perhaps that is more pertinent. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 21:05 ` Drew Adams @ 2013-02-19 21:21 ` Eli Zaretskii 2013-02-19 21:25 ` Drew Adams 2013-02-20 11:08 ` Michael Heerdegen 1 sibling, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2013-02-19 21:21 UTC (permalink / raw) To: Drew Adams; +Cc: acm, emacs-devel, aidalgol, tsdh > From: "Drew Adams" <drew.adams@oracle.com> > Cc: <tsdh@gnu.org>, <acm@muc.de>, <aidalgol@no8wireless.co.nz>, > <emacs-devel@gnu.org> > Date: Tue, 19 Feb 2013 13:05:03 -0800 > > > > Even if you use `M-x font-lock-mode' to turn the mode back > > > on, in Emacs-Lisp mode keywords such as `&optional' are no > > > longer highlighted. > > > > Use "M-x describe-text-properties RET" to see what face, if any, is > > there. > > No face there. All it says is this: > > There are text properties here: > fontified t Then that's another problem. Look for code which should have (or did in the past) put a face there, but now doesn't. > > > Dunno whether this regression is independent of the more > > > general one that turns off font-lock mode when it should be on. > > > > It's probably another problem. There was some change in that area > > lately: > > > > 2013-02-18 Michael Heerdegen <michael_heerdegen@web.de> > > > > * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): > > Use font-lock-keyword-face for macros and special forms > > (bug#8345). > > Hm. Does eldoc.el fiddle with stuff even if you don't use Eldoc? My recipe was > from `emacs -Q', and I did not turn on eldoc-mode. No idea. I just pasted things that seemed relevant. ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 21:21 ` Eli Zaretskii @ 2013-02-19 21:25 ` Drew Adams 0 siblings, 0 replies; 21+ messages in thread From: Drew Adams @ 2013-02-19 21:25 UTC (permalink / raw) To: 'Eli Zaretskii'; +Cc: acm, emacs-devel, aidalgol, tsdh > > No face there. All it says is this: > > > > There are text properties here: > > fontified t > > Then that's another problem. Look for code which should have (or did > in the past) put a face there, but now doesn't. That is the case for `&optional'. That's the bug. It should have a face (face `font-lock-type-face), but it does not. Font-lock no doubt does not recognize it as something to fontify. I see no mystery there. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 21:05 ` Drew Adams 2013-02-19 21:21 ` Eli Zaretskii @ 2013-02-20 11:08 ` Michael Heerdegen 1 sibling, 0 replies; 21+ messages in thread From: Michael Heerdegen @ 2013-02-20 11:08 UTC (permalink / raw) To: emacs-devel "Drew Adams" <drew.adams@oracle.com> writes: > > 2013-02-18 Michael Heerdegen <michael_heerdegen@web.de> > > > > * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): > > Use font-lock-keyword-face for macros and special forms > > (bug#8345). > > Hm. Does eldoc.el fiddle with stuff even if you don't use Eldoc? My > recipe was from `emacs -Q', and I did not turn on eldoc-mode. This change also has nothing to do with font locking - we just use the font-lock-keyword-face. So, this change can't be related to the problem. Michael. ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 20:53 ` Eli Zaretskii 2013-02-19 21:05 ` Drew Adams @ 2013-02-19 21:14 ` Drew Adams 1 sibling, 0 replies; 21+ messages in thread From: Drew Adams @ 2013-02-19 21:14 UTC (permalink / raw) To: 'Eli Zaretskii'; +Cc: acm, emacs-devel, aidalgol, tsdh > > Dunno whether this regression is independent of the more > > general one that turns off font-lock mode when it should be on. > > It's probably another problem. There was some change in that area > lately: OK - it's bug #13767. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 17:58 ` Drew Adams 2013-02-19 18:48 ` Drew Adams @ 2013-02-19 23:23 ` Alan Mackenzie 2013-02-20 4:02 ` Drew Adams 1 sibling, 1 reply; 21+ messages in thread From: Alan Mackenzie @ 2013-02-19 23:23 UTC (permalink / raw) To: Drew Adams Cc: 'Eli Zaretskii', emacs-devel, aidalgol, 'Tassilo Horn' 'Evening, Drew! On Tue, Feb 19, 2013 at 09:58:31AM -0800, Drew Adams wrote: > But the definition of `global-font-lock-mode-check-buffers' has not changed > since before this regression was introduced, AFAICT. Nothing in its file, > font-core.el, was changed. > It is the definition of `define-globalized-minor-mode' that was changed, > radically it seems. > `C-h f global-font-lock-mode-check-buffers' shows no doc string but tells us it > is a compiled function in `font-core.el'. There is however no explicit > definition of it in that file. It is created by `define-globalized-minor-mode'. > Our help system sends the user on a wild goose chase here. S?he has no hope of > reorientation and finding a way out of the swamp. You can't get there from > here. I agree with you, here. However, that info, "font-core.el" needs to be in the C-h f somewhere, since that is where the macro invocation is that generated `global-font-lock-mode-check-buffers'. But information is missing, more precisely, that that defun was generated by the macro define-globalized-minor-mode. May I suggest, even request, that you specify what the information from C-h f should look like, and perhaps even extend the infrastructure to implement it. > Emacs seems to be little-by-little losing its character of being > self-documenting, by the use more and more of macros that generate functions > without doc. And by the use more and more of `defstruct' without providing doc > for accessor etc. functions. Dommage. > At the very least (and no, it would by no means be a substitute for documenting > the resulting objects themselves), the doc for `define-globalized-minor-mode' > should mention the objects that it creates, such as function > `MODE-check-buffers'. This is partly done, in that a doc string for the global minor mode function is generated, even if not for the helper functions. > > Since the voodoo of easy-mmode is beyond me, I'll let others fix this. > Hear, hear. "Easy", indeed. Easy for those defining things, perhaps. Hard on > Emacs users. Dommage. Shame indeed, but not beyond repair. Good night! -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: Fontless Info 2013-02-19 23:23 ` Alan Mackenzie @ 2013-02-20 4:02 ` Drew Adams 0 siblings, 0 replies; 21+ messages in thread From: Drew Adams @ 2013-02-20 4:02 UTC (permalink / raw) To: 'Alan Mackenzie' Cc: 'Eli Zaretskii', emacs-devel, aidalgol, 'Tassilo Horn' > > Our help system sends the user on a wild goose chase here. > > S?he has no hope of reorientation and finding a way out > > of the swamp. You can't get there from here. > > I agree with you, here. However, that info, "font-core.el" > needs to be in the C-h f somewhere, since that is where the > macro invocation is that generated > `global-font-lock-mode-check-buffers'. But information is > missing, more precisely, that that defun was generated by > the macro define-globalized-minor-mode. Yes, that's the info missing. More precisely, that that function is created in the process of defining globalized minor mode whatever. At least it is good that the link takes you to the right place. That in itself is a strong hint that maybe the `define-globalized-mode' also creates this function. > May I suggest, even request, that you specify what the > information from C-h f should look like, See previous - say that it is defined as part of the process of defining the mode. And say what its relation is to the mode: it is a helper function that does... The description of what the function does, including how it is related to the particular mode, could be added to the doc generated doc string. But the `C-h f' info that introduces that doc, and which describes the location of the definition, should mention that it is defined in the process of defining the mode by `define-globalized-minor-mode. Or some such. The point is to add both: (a) some orientation info on where to find the definition (i.e., the fact that it gets defined as part of the mode definition) and (b) info about the relation of the generated function to the mode - what it does for the mode etc. > and perhaps even extend the infrastructure to implement it. Someone else will need to do that, I'm afraid. > > Emacs seems to be little-by-little losing its character of being > > self-documenting, by the use more and more of macros that > > generate functions without doc. And by the use more and more > > of `defstruct' without providing doc for accessor etc. > > functions. Dommage. > > > At the very least..., the doc for `define-globalized-minor-mode' > > should mention the objects that it creates, such as function > > `MODE-check-buffers'. > > This is partly done, in that a doc string for the global minor mode > function is generated, even if not for the helper functions. Yes, but that generated mode doc string does not mention the helper functions. The doc string for the mode should mention its associated functions, just like the doc for a defstruct should mention its helper functions. And the doc for each helper function should mention what it helps, and how. This is part of describing what it's for, what it does. > > > Since the voodoo of easy-mmode is beyond me, I'll let > > > others fix this. > > > Hear, hear. "Easy", indeed. Easy for those defining > > things, perhaps. Hard on Emacs users. Dommage. > > Shame indeed, but not beyond repair. That's good to hear. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 16:20 ` Eli Zaretskii 2013-02-19 17:58 ` Drew Adams @ 2013-02-19 23:10 ` Alan Mackenzie 2013-02-20 10:58 ` Alan Mackenzie 2013-02-23 4:58 ` Dmitry Gutov 1 sibling, 2 replies; 21+ messages in thread From: Alan Mackenzie @ 2013-02-19 23:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel, aidalgol, Tassilo Horn Hi, Eli. On Tue, Feb 19, 2013 at 06:20:41PM +0200, Eli Zaretskii wrote: > > From: Tassilo Horn <tsdh@gnu.org> > > Date: Tue, 19 Feb 2013 11:16:25 +0100 > > Cc: emacs-devel@gnu.org > > Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > > > Emacs was run with -Q, and I ran `make distclean' before rebuilding > > > again to make sure it wasn't a problem with my local build. This > > > appears to be a bug, but if no one else can reproduce it... > > You are not alone. I've just updated my emacs copy, and I can reproduce > > the issue. So it's clearly a bug. > This happens because font-lock-mode gets turned off in Info buffers. > Type "M-x font-lock-mode RET", and all the niceties are back. (You > could guess that this is the problem if you'd go to the un-decorated > text and type "M-x describe-text-properties RET" there.) > The reason seems to be the changes in revision 111794: their result is > that, after Info mode is turned on and turns on font-lock, font-lock > is turned off again by something called > global-font-lock-mode-check-buffers. And to make things _really_ > interesting, if you run this under Edebug, the problem disappears... Thanks for the prod! > Since the voodoo of easy-mmode is beyond me, I'll let others fix this. This might well do the trick: === modified file 'lisp/emacs-lisp/easy-mmode.el' *** lisp/emacs-lisp/easy-mmode.el 2013-02-15 20:01:51 +0000 --- lisp/emacs-lisp/easy-mmode.el 2013-02-19 23:03:30 +0000 *************** *** 417,423 **** ;; Go through existing buffers. (dolist (buf (buffer-list)) (with-current-buffer buf ! (if ,global-mode (,turn-on) (when ,mode (,mode -1)))))) ;; Autoloading define-globalized-minor-mode autoloads everything ;; up-to-here. --- 417,425 ---- ;; Go through existing buffers. (dolist (buf (buffer-list)) (with-current-buffer buf ! (if ,global-mode ! (,turn-on) ! (when ,mode (let (,disable-MODE) (,mode -1))))))) ;; Autoloading define-globalized-minor-mode autoloads everything ;; up-to-here. *************** *** 439,445 **** (if ,mode (,mode -1)) (unless (eq ,MODE-major-mode major-mode) (if ,mode ! (progn (,mode -1) (,turn-on)) (,turn-on)))) --- 441,447 ---- (if ,mode (,mode -1)) (unless (eq ,MODE-major-mode major-mode) (if ,mode ! (let (,disable-MODE) (,mode -1) (,turn-on)) (,turn-on)))) -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 23:10 ` Alan Mackenzie @ 2013-02-20 10:58 ` Alan Mackenzie 2013-02-23 4:58 ` Dmitry Gutov 1 sibling, 0 replies; 21+ messages in thread From: Alan Mackenzie @ 2013-02-20 10:58 UTC (permalink / raw) To: emacs-devel; +Cc: aidalgol, Tassilo Horn On Tue, Feb 19, 2013 at 11:10:46PM +0000, Alan Mackenzie wrote: > On Tue, Feb 19, 2013 at 06:20:41PM +0200, Eli Zaretskii wrote: > > > From: Tassilo Horn <tsdh@gnu.org> > > > Date: Tue, 19 Feb 2013 11:16:25 +0100 > > > Cc: emacs-devel@gnu.org > > > Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > > > > Emacs was run with -Q, and I ran `make distclean' before rebuilding > > > > again to make sure it wasn't a problem with my local build. This > > > > appears to be a bug, but if no one else can reproduce it... > > > You are not alone. I've just updated my emacs copy, and I can reproduce > > > the issue. So it's clearly a bug. > > This happens because font-lock-mode gets turned off in Info buffers. > > Type "M-x font-lock-mode RET", and all the niceties are back. (You > > could guess that this is the problem if you'd go to the un-decorated > > text and type "M-x describe-text-properties RET" there.) > > The reason seems to be the changes in revision 111794: their result is > > that, after Info mode is turned on and turns on font-lock, font-lock > > is turned off again by something called > > global-font-lock-mode-check-buffers. And to make things _really_ > > interesting, if you run this under Edebug, the problem disappears... > Thanks for the prod! > > Since the voodoo of easy-mmode is beyond me, I'll let others fix this. > This might well do the trick: > === modified file 'lisp/emacs-lisp/easy-mmode.el' > *** lisp/emacs-lisp/easy-mmode.el 2013-02-15 20:01:51 +0000 > --- lisp/emacs-lisp/easy-mmode.el 2013-02-19 23:03:30 +0000 > *************** > *** 417,423 **** > ;; Go through existing buffers. > (dolist (buf (buffer-list)) > (with-current-buffer buf > ! (if ,global-mode (,turn-on) (when ,mode (,mode -1)))))) > ;; Autoloading define-globalized-minor-mode autoloads everything > ;; up-to-here. > --- 417,425 ---- > ;; Go through existing buffers. > (dolist (buf (buffer-list)) > (with-current-buffer buf > ! (if ,global-mode > ! (,turn-on) > ! (when ,mode (let (,disable-MODE) (,mode -1))))))) > ;; Autoloading define-globalized-minor-mode autoloads everything > ;; up-to-here. > *************** > *** 439,445 **** > (if ,mode (,mode -1)) > (unless (eq ,MODE-major-mode major-mode) > (if ,mode > ! (progn > (,mode -1) > (,turn-on)) > (,turn-on)))) > --- 441,447 ---- > (if ,mode (,mode -1)) > (unless (eq ,MODE-major-mode major-mode) > (if ,mode > ! (let (,disable-MODE) > (,mode -1) > (,turn-on)) > (,turn-on)))) I forgot to add that after applying the patch you will need to regenerate and load font-core.elc. Seeing as how that file is dumped with the Emacs binary, you're probably as well just doing a "make bootstrap". -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 23:10 ` Alan Mackenzie 2013-02-20 10:58 ` Alan Mackenzie @ 2013-02-23 4:58 ` Dmitry Gutov 2013-02-24 18:08 ` Alan Mackenzie 1 sibling, 1 reply; 21+ messages in thread From: Dmitry Gutov @ 2013-02-23 4:58 UTC (permalink / raw) To: Alan Mackenzie; +Cc: Eli Zaretskii, Tassilo Horn, aidalgol, emacs-devel Hey Alan, Alan Mackenzie <acm@muc.de> writes: >> This happens because font-lock-mode gets turned off in Info buffers. >> Type "M-x font-lock-mode RET", and all the niceties are back. (You >> could guess that this is the problem if you'd go to the un-decorated >> text and type "M-x describe-text-properties RET" there.) > >> The reason seems to be the changes in revision 111794: their result is >> that, after Info mode is turned on and turns on font-lock, font-lock >> is turned off again by something called >> global-font-lock-mode-check-buffers. And to make things _really_ >> interesting, if you run this under Edebug, the problem disappears... > > Thanks for the prod! > >> Since the voodoo of easy-mmode is beyond me, I'll let others fix this. > > This might well do the trick: I've applied the patch, bootstrapped, and it [still] has problems with whitespace-mode. To reproduce: 1. Run emacs -Q 2. Eval (add-hook 'prog-mode 'whitespace-mode) 3. Open any .el file, for example => no syntax highligting > === modified file 'lisp/emacs-lisp/easy-mmode.el' > *** lisp/emacs-lisp/easy-mmode.el 2013-02-15 20:01:51 +0000 > --- lisp/emacs-lisp/easy-mmode.el 2013-02-19 23:03:30 +0000 > *************** > *** 417,423 **** > ;; Go through existing buffers. > (dolist (buf (buffer-list)) > (with-current-buffer buf > ! (if ,global-mode (,turn-on) (when ,mode (,mode -1)))))) > > ;; Autoloading define-globalized-minor-mode autoloads everything > ;; up-to-here. > --- 417,425 ---- > ;; Go through existing buffers. > (dolist (buf (buffer-list)) > (with-current-buffer buf > ! (if ,global-mode > ! (,turn-on) > ! (when ,mode (let (,disable-MODE) (,mode -1))))))) > > ;; Autoloading define-globalized-minor-mode autoloads everything > ;; up-to-here. > *************** > *** 439,445 **** > (if ,mode (,mode -1)) > (unless (eq ,MODE-major-mode major-mode) > (if ,mode > ! (progn > (,mode -1) > (,turn-on)) > (,turn-on)))) > --- 441,447 ---- > (if ,mode (,mode -1)) > (unless (eq ,MODE-major-mode major-mode) > (if ,mode > ! (let (,disable-MODE) > (,mode -1) > (,turn-on)) > (,turn-on)))) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-23 4:58 ` Dmitry Gutov @ 2013-02-24 18:08 ` Alan Mackenzie 2013-02-26 5:43 ` Dmitry Gutov 0 siblings, 1 reply; 21+ messages in thread From: Alan Mackenzie @ 2013-02-24 18:08 UTC (permalink / raw) To: Dmitry Gutov; +Cc: Eli Zaretskii, emacs-devel, aidalgol, Tassilo Horn Hello, Dmitry. On Sat, Feb 23, 2013 at 08:58:50AM +0400, Dmitry Gutov wrote: > Hey Alan, > Alan Mackenzie <acm@muc.de> writes: > > This might well do the trick: > I've applied the patch, bootstrapped, and it [still] has problems with > whitespace-mode. To reproduce: > 1. Run emacs -Q > 2. Eval (add-hook 'prog-mode 'whitespace-mode) > 3. Open any .el file, for example => no syntax highligting OK, thanks. whitespace-mode disables then re-enables font lock mode. The code in define-globalized-minor-mode was recording the disable, but not the re-enable, so it thought the major mode hook had disabled font lock mode. I've amended it so that it now takes account of the re-enabling too. I think this solves the immediate problem. Here's the patch (based off the trunk of a few days ago). As always, please do a complete rebuild after applying the patch. Let me know how it goes, please. === modified file 'lisp/emacs-lisp/easy-mmode.el' *** lisp/emacs-lisp/easy-mmode.el 2013-02-15 20:01:51 +0000 --- lisp/emacs-lisp/easy-mmode.el 2013-02-24 17:53:33 +0000 *************** *** 359,366 **** (MODE-check-buffers (intern (concat global-mode-name "-check-buffers"))) (MODE-cmhh (intern (concat global-mode-name "-cmhh"))) ! (MODE-disable-in-buffer ! (intern (concat global-mode-name "-disable-in-buffer"))) (minor-MODE-hook (intern (concat mode-name "-hook"))) (disable-MODE (intern (concat "disable-" mode-name))) (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))) --- 359,366 ---- (MODE-check-buffers (intern (concat global-mode-name "-check-buffers"))) (MODE-cmhh (intern (concat global-mode-name "-cmhh"))) ! (set-disable-MODE-in-buffer ! (intern (concat "set-disable-" global-mode-name "-in-buffer"))) (minor-MODE-hook (intern (concat mode-name "-hook"))) (disable-MODE (intern (concat "disable-" mode-name))) (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))) *************** *** 409,431 **** (add-hook 'find-file-hook ',MODE-check-buffers) (add-hook 'change-major-mode-hook ',MODE-cmhh)) (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) - (remove-hook 'change-major-mode-after-body-hook - ',MODE-enable-in-buffers) (remove-hook 'find-file-hook ',MODE-check-buffers) (remove-hook 'change-major-mode-hook ',MODE-cmhh)) ;; Go through existing buffers. (dolist (buf (buffer-list)) (with-current-buffer buf ! (if ,global-mode (,turn-on) (when ,mode (,mode -1)))))) ;; Autoloading define-globalized-minor-mode autoloads everything ;; up-to-here. :autoload-end ! ;; A function which checks whether MODE has been disabled in the major ! ;; mode hook which has just been run. ! (add-hook ',minor-MODE-hook ',MODE-disable-in-buffer) ;; List of buffers left to process. (defvar ,MODE-buffers nil) --- 409,431 ---- (add-hook 'find-file-hook ',MODE-check-buffers) (add-hook 'change-major-mode-hook ',MODE-cmhh)) (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) (remove-hook 'find-file-hook ',MODE-check-buffers) (remove-hook 'change-major-mode-hook ',MODE-cmhh)) ;; Go through existing buffers. (dolist (buf (buffer-list)) (with-current-buffer buf ! (if ,global-mode ! (,turn-on) ! (when ,mode (let (,disable-MODE) (,mode -1))))))) ;; Autoloading define-globalized-minor-mode autoloads everything ;; up-to-here. :autoload-end ! ;; A function which checks whether MODE has been left disabled ! ;; in the major mode hook which has just been run. ! (add-hook ',minor-MODE-hook ',set-disable-MODE-in-buffer) ;; List of buffers left to process. (defvar ,MODE-buffers nil) *************** *** 439,445 **** (if ,mode (,mode -1)) (unless (eq ,MODE-major-mode major-mode) (if ,mode ! (progn (,mode -1) (,turn-on)) (,turn-on)))) --- 439,445 ---- (if ,mode (,mode -1)) (unless (eq ,MODE-major-mode major-mode) (if ,mode ! (let (,disable-MODE) (,mode -1) (,turn-on)) (,turn-on)))) *************** *** 457,469 **** (add-to-list ',MODE-buffers (current-buffer)) (add-hook 'post-command-hook ',MODE-check-buffers)) (put ',MODE-cmhh 'definition-name ',global-mode) ! ;; disable-MODE is set in MODE-disable-in-buffer and cleared by ! ;; kill-all-local-variables. (defvar-local ,disable-MODE nil) ! (defun ,MODE-disable-in-buffer () ! (unless ,mode ! (setq ,disable-MODE t))) ! (put ',MODE-disable-in-buffer 'definition-name ',global-mode)))) ;;; ;;; easy-mmode-defmap --- 457,468 ---- (add-to-list ',MODE-buffers (current-buffer)) (add-hook 'post-command-hook ',MODE-check-buffers)) (put ',MODE-cmhh 'definition-name ',global-mode) ! ;; disable-MODE is set/cleared in set-disable-MODE-in-buffer ! ;; and cleared by kill-all-local-variables. (defvar-local ,disable-MODE nil) ! (defun ,set-disable-MODE-in-buffer () ! (setq ,disable-MODE (not ,mode))) ! (put ',set-disable-MODE-in-buffer 'definition-name ',global-mode)))) ;;; ;;; easy-mmode-defmap -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-24 18:08 ` Alan Mackenzie @ 2013-02-26 5:43 ` Dmitry Gutov 0 siblings, 0 replies; 21+ messages in thread From: Dmitry Gutov @ 2013-02-26 5:43 UTC (permalink / raw) To: Alan Mackenzie; +Cc: Eli Zaretskii, emacs-devel, aidalgol, Tassilo Horn On 24.02.2013 22:08, Alan Mackenzie wrote: > Hello, Dmitry. > > On Sat, Feb 23, 2013 at 08:58:50AM +0400, Dmitry Gutov wrote: >> Hey Alan, > >> Alan Mackenzie <acm@muc.de> writes: > >>> This might well do the trick: > >> I've applied the patch, bootstrapped, and it [still] has problems with >> whitespace-mode. To reproduce: > >> 1. Run emacs -Q > >> 2. Eval (add-hook 'prog-mode 'whitespace-mode) > >> 3. Open any .el file, for example => no syntax highligting > > OK, thanks. whitespace-mode disables then re-enables font lock mode. > The code in define-globalized-minor-mode was recording the disable, but > not the re-enable, so it thought the major mode hook had disabled font > lock mode. > > I've amended it so that it now takes account of the re-enabling too. I > think this solves the immediate problem. > > Here's the patch (based off the trunk of a few days ago). As always, > please do a complete rebuild after applying the patch. Let me know how > it goes, please. The patch fixes the above problem indeed, but meanwhile Stefan has installed a smaller patch in revno 111881 that seems to work just as well. Sorry for not responding earlier, I've been trying to debug a related mmm-mode <-> whitespace-mode interaction regression that still hasn't been addressed by either of the patches. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Fontless Info 2013-02-19 8:01 Fontless Info Aidan Gauland 2013-02-19 10:16 ` Tassilo Horn @ 2013-02-19 16:58 ` Glenn Morris 1 sibling, 0 replies; 21+ messages in thread From: Glenn Morris @ 2013-02-19 16:58 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-devel Aidan Gauland wrote: > appears to be a bug, but if no one else can reproduce it... http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13730 ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2013-02-26 5:43 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-19 8:01 Fontless Info Aidan Gauland 2013-02-19 10:16 ` Tassilo Horn 2013-02-19 15:00 ` Drew Adams 2013-02-19 16:33 ` Eli Zaretskii 2013-02-19 16:20 ` Eli Zaretskii 2013-02-19 17:58 ` Drew Adams 2013-02-19 18:48 ` Drew Adams 2013-02-19 20:53 ` Eli Zaretskii 2013-02-19 21:05 ` Drew Adams 2013-02-19 21:21 ` Eli Zaretskii 2013-02-19 21:25 ` Drew Adams 2013-02-20 11:08 ` Michael Heerdegen 2013-02-19 21:14 ` Drew Adams 2013-02-19 23:23 ` Alan Mackenzie 2013-02-20 4:02 ` Drew Adams 2013-02-19 23:10 ` Alan Mackenzie 2013-02-20 10:58 ` Alan Mackenzie 2013-02-23 4:58 ` Dmitry Gutov 2013-02-24 18:08 ` Alan Mackenzie 2013-02-26 5:43 ` Dmitry Gutov 2013-02-19 16:58 ` Glenn Morris
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).