Desculpe pelo seu problema. Eu não vejo o problema que você reporta, seguindo sua receita. Talvez a descrição não esteja completa? Eu posso ativar pretty-control-l-mode
e whitespace-mode
, e o comportamento que vejo para cada um parece normal. Talvez haja alguma configuração personalizada usada para whitespace-style
ou algo assim?
De qualquer forma, talvez ajude se você fizer uma alteração como essa para pretty-control-l-mode
. Se assim for, deixe-me saber e vou aplicá-lo ao pp-c-l.el
. (Para testar, defina a nova opção como nil
.)
(defcustom pp^L-use-window-display-table-flag t
"Non-nil: use 'window-display-table'; nil: use 'buffer-display-table'."
:type 'boolean :group 'Pretty-Control-L)
(define-minor-mode pretty-control-l-mode
"Toggle pretty display of Control-l ('^L') characters.
With ARG, turn pretty display of '^L' on if and only if ARG is positive."
:init-value nil :global t :group 'Pretty-Control-L
(if pretty-control-l-mode
(add-hook 'window-configuration-change-hook 'refresh-pretty-control-l)
(remove-hook 'window-configuration-change-hook 'refresh-pretty-control-l))
(walk-windows
(lambda (window)
(let ((display-table (if pp^L-use-window-display-table-flag ; <=========
(or (window-display-table window)
(make-display-table))
(if buffer-display-table
(copy-sequence buffer-display-table)
(make-display-table)))))
(aset display-table ?4 (and pretty-control-l-mode
(pp^L-^L-display-table-entry window)))
(if pp^L-use-window-display-table-flag ; <=========
(set-window-display-table window display-table)
(setq buffer-display-table display-table))))
'no-minibuf
'visible))
ATUALIZADO para adicionar um tópico de comentário , caso os comentários sejam excluídos em algum momento:
BTW, I wonder if the hierarchy of display tables described in the doc shouldn't perhaps be applied using inheritance of some kind. Seems a bit primitive for one level (e.g. window) to completely shadow a lower level (e.g. buffer). You might consider sending a question about this to M-x report-emacs-bug. – Drew Sep 24 '14 at 16:36
Ping? Could you please let me know if the change above helps? Thx. – Drew Oct 14 '14 at 18:12
I just read this answer (I have not been around this part of the Internet for a while...). I will check this when I get round to it, perhaps in a few days or so. I'll get back with an ‘Answer approved’ (if it works), or comments (otherwise), as appropriate, later. – Johan E Oct 25 '14 at 22:32
I edited the question to add a more fleshed-out recipe for showing the problem. I'd be interested whether you get the same results. --- Also, is there a way to shadow a system installed .el-file with a user-supplied one (I'm really just a “user”, not a lisp-programmer...)? I don't really feel like messing with the files installed by deb-packages. (That's why I did the problem-recipe before testing your answer...) – Johan E Oct 27 '14 at 1:02
Five seconds after I wrote the last comment I realized that I could just paste the code into scratch and C-j-run it to test. (No need to edit any files.) The results: It works a charm! Thank you! (=> Answer accepted) However, I'd still like to know if you get the same results as I from my problem-recipe (before patching the code). – Johan E Oct 27 '14 at 1:09
I just followed your new recipe, and I saw everything you described (so clearly). And then I read the new comment that you just added. Glad to know that things work OK. Thx for your feedback. – Drew Oct 27 '14 at 1:12