all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wilfred Hughes <me@wilfred.me.uk>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 24645@debbugs.gnu.org
Subject: bug#24645: [PATCH] hexl-mode does not fontify buffer
Date: Wed, 2 Nov 2016 00:34:05 -0400	[thread overview]
Message-ID: <CAFXAjY4N5=AbOez7jQzLUXJfdz2+Gb8C0Svq1G3ui7FnWD=tMQ@mail.gmail.com> (raw)
In-Reply-To: <23e1e973-5ad1-90af-5be4-6dbb96b01cb6@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

Fair enough. Here's an updated patch that respects global-font-lock-mode.

On 8 October 2016 at 14:42, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 08.10.2016 21:39, Wilfred Hughes wrote:
>>
>> hexl-mode does not ensure font-lock is enabled, so the faces
>> hexl-address-region and hexl-ascii-region are not applied.
>
>
> Would a user who disabled global-font-lock-mode really want that?
>

[-- Attachment #2: 0001-Apply-font-lock-in-hexl-mode-buffers.patch --]
[-- Type: text/x-patch, Size: 719 bytes --]

From 9b2cf43f673d8317df86270a40320909d4e6c186 Mon Sep 17 00:00:00 2001
From: Wilfred Hughes <me@wilfred.me.uk>
Date: Sat, 8 Oct 2016 14:25:43 -0400
Subject: [PATCH] Apply font-lock in hexl-mode buffers.

* lisp/hexl.el (hexl-mode): After setting font-lock-defaults, we need to
  call `font-lock-ensure' to apply hexl-mode faces.
---
 lisp/hexl.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/hexl.el b/lisp/hexl.el
index 5f099a5..519b052 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -402,6 +402,8 @@ hexl-mode
 			  "hexl-current-address")
 
     (if hexl-follow-ascii (hexl-follow-ascii 1)))
+  (when global-font-lock-mode
+    (font-lock-ensure))
   (run-mode-hooks 'hexl-mode-hook))
 
 
-- 
2.10.1


  reply	other threads:[~2016-11-02  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-08 18:39 bug#24645: [PATCH] hexl-mode does not fontify buffer Wilfred Hughes
2016-10-08 18:42 ` Dmitry Gutov
2016-11-02  4:34   ` Wilfred Hughes [this message]
2019-06-27 11:30     ` bug#14194: " Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFXAjY4N5=AbOez7jQzLUXJfdz2+Gb8C0Svq1G3ui7FnWD=tMQ@mail.gmail.com' \
    --to=me@wilfred.me.uk \
    --cc=24645@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.