emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hexl: doesn't play nicely with dynamic-completion-mode


From: Chris Moore
Subject: Re: hexl: doesn't play nicely with dynamic-completion-mode
Date: Sun, 9 Sep 2007 20:01:30 +0200

On 9/9/07, Richard Stallman <address@hidden> wrote:

This is an inelegant way of doing it;
does it fix your problem?

No, it doesn't.  It ends up calling self-insert-command, which inserts the '.' character, rather than calling hexl-self-insert-command, which inserts the hex code for the '.' character.

This is an inelegant way of doing it which does work:

*** Backup/completion.el.~1~    Sun Sep  9 19:44:37 2007
--- completion.el    Sun Sep  9 19:58:42 2007
***************
*** 2231,2238 ****
 
  (defun completion-separator-self-insert-command (arg)
    (interactive "p")
!   (use-completion-before-separator)
!   (self-insert-command arg))
 
  (defun completion-separator-self-insert-autofilling (arg)
    (interactive "p")
--- 2231,2241 ----
 
  (defun completion-separator-self-insert-command (arg)
    (interactive "p")
!   (message "major is '%s'" major-mode)
!   (if (eq major-mode 'hexl-mode)
!       (hexl-self-insert-command arg)
!     (use-completion-before-separator)
!     (self-insert-command arg)))
 
  (defun completion-separator-self-insert-autofilling (arg)
    (interactive "p")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]