[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp (2.0.52); completion detection in console
From: |
slashdevslashnull |
Subject: |
Re: tramp (2.0.52); completion detection in console |
Date: |
Sat, 15 Apr 2006 15:19:23 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Michael Albinus <address@hidden> writes:
> If I understand correctly, you need to handle C-<TAB> additionally. Why
> that? Do you have enabled partial completion mode, and want to get
> basic behaviour? Doesn't a simple <TAB> complete?
>
> Best regards, Michael.
Sorry, i should have been a little bit more verbose. I dont have partial
completion mode enabled, but 'last-input-event' reports 9 (which happens
to be the ASCII Tab Character) when i press tab (without control) in
console and '(event-modifiers 9)' evaluates to '(control)'. This happens
because 'event-modifiers' treats 9 as a character and regards all
characters < 32 as control characters and reports the control modifier
as set for them. I didnt verify this first when i fixed it for me and
was not sure about the original check so i just left it in and did 'my'
check first. If its safe to assume that '?\t' is always <32 and
'event-modifiers' behaviour wont change you could (and should)
completely omit the check for 'event-modifiers' on '?\t':
*** /home/matthi/.emacs.d/lisp/tramp.el.~131~ 2006-04-15 14:54:03.000000000
+0200
--- /home/matthi/.emacs.d/lisp/tramp.el 2006-04-15 13:52:15.000000000 +0200
***************
*** 4456,4465 ****
((or (equal last-input-event 'tab)
;; Emacs
(and (integerp last-input-event)
! (not (event-modifiers last-input-event))
! (or (char-equal last-input-event ?\?)
! (char-equal last-input-event ?\t) ; handled by 'tab already?
! (char-equal last-input-event ?\ )))
;; XEmacs
(and (featurep 'xemacs)
(not (event-modifiers last-input-event))
--- 4456,4466 ----
((or (equal last-input-event 'tab)
;; Emacs
(and (integerp last-input-event)
! (or
! (char-equal last-input-event ?\t)
! (and (not (event-modifiers last-input-event))
! (or (char-equal last-input-event ?\?)
! (char-equal last-input-event ?\ )))))
;; XEmacs
(and (featurep 'xemacs)
(not (event-modifiers last-input-event))