From: Vivek Dasmohapatra <vivek@etla.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 4941@debbugs.gnu.org
Subject: bug#4941: hexl mode update (variable word size in hexl mode)
Date: Fri, 13 Apr 2012 01:39:51 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.2.00.1204130137340.29517@octopus.pepperfish.net> (raw)
In-Reply-To: <m3fwc9aqk1.fsf@stories.gnus.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 391 bytes --]
> `-mode' functions don't usually take additional arguments to control
> setup, so I think having a defcustom here is fine. I've applied your
> patch to the Emacs trunk.
As I noted earlier, a user found a bug in the display code when
editing files in hexl - the hex portion of the display would get
scrambled when the word size was <> 16 bits.
The attached patch should fix that problem.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-diff; name=hexl-editing.patch, Size: 912 bytes --]
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -249,7 +249,6 @@ as that will override any bit grouping options set here."
(defun hexl-line-displen ()
"The length of a hexl display line (varies with `hexl-bits')."
(+ 60 (/ 128 (or hexl-bits 16))))
-;; --
(defun hexl-mode--minor-mode-p (var)
(memq var '(ruler-mode hl-line-mode)))
@@ -964,11 +963,7 @@ CH must be a unibyte character whose value is between 0 and 255."
(error "Invalid character 0x%x -- must be in the range [0..255]" ch))
(let ((address (hexl-current-address t)))
(while (> num 0)
- (let ((hex-position
- (+ (* (/ address 16) (hexl-line-displen))
- 10 (point-min)
- (* 2 (% address 16))
- (/ (% address 16) 2)))
+ (let ((hex-position (hexl-address-to-marker address))
(ascii-position
(+ (* (/ address 16) (hexl-line-displen))
(hexl-ascii-start-column)
next prev parent reply other threads:[~2012-04-13 0:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 13:20 bug#4941: hexl mode update (variable word size in hexl mode) Vivek Dasmohapatra
2009-12-24 3:32 ` Stefan Monnier
2009-12-24 18:23 ` Vivek Dasmohapatra
2012-04-11 13:56 ` Lars Magne Ingebrigtsen
2012-04-11 15:02 ` Vivek Dasmohapatra
2012-04-12 16:00 ` Lars Magne Ingebrigtsen
2012-04-12 16:02 ` Vivek Dasmohapatra
2012-04-13 0:39 ` Vivek Dasmohapatra [this message]
2012-04-14 11:08 ` 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=alpine.DEB.2.00.1204130137340.29517@octopus.pepperfish.net \
--to=vivek@etla.org \
--cc=4941@debbugs.gnu.org \
--cc=larsi@gnus.org \
/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.