unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Marshall, Simon" <simon.marshall@misys.com>
Cc: "'Gordon.Grimes@bcbsnc.com'" <Gordon.Grimes@bcbsnc.com>
Subject: FW: comint.el fix
Date: Fri, 20 Jun 2003 15:19:37 +0100	[thread overview]
Message-ID: <FC3DA3DC8D4AD311AB910020352A8FDC10755432@eagle.midas-kapiti.com> (raw)

Over to you guys.  There are 2 (if ...) forms in comint-arguments where
this change seems applicable, though I've not tested the suggested
change at all.
 
-----Original Message-----
From: Gordon Grimes [mailto:Gordon.Grimes@bcbsnc.com] 
Sent: 20 June 2003 15:08
To: shivers@cs.cmu.edu; simon@gnu.org
Subject: comint.el fix


Hi,
I don't use the patch utils so I'll just detail the fix.  Also, there's
no version information in my comint.el file so I can't refer you to a
version.
 
Problem:
When completing a "!$" history item with TAB, the behavior is wrong if
the preceeding line had a ";" not surrounded by spaces.
 
Example:
% echo hi; echo bye
% echo !$       ## completes to "echo echo bye" rather than simply "echo
bye".
 
Cause:
An extra token from the preceeding line is grabbed because the second
token "hi;" is split into two but the token counter is incremented only
once.
 
In function 'comint-arguments', the variable 'count' is incremented in
the '(if beg..." conditional. It assumes that the variable 'args' will
get a single element added ('str') if the clause is executed. However,
the function 'comint-delim-arg' splits tokens such as "foo;" into "foo
;".  
 
Fix:
Rather than incrementing 'count', just set it to the length of the list
(outside of the conditional):
 
    (if beg
       (setq str ......
               args ....
       )
    )  ;; end of if
    (setq count (length args))    ;; unconditional
 
enjoy,
gordon

             reply	other threads:[~2003-06-20 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-20 14:19 Marshall, Simon [this message]
2003-06-22  3:01 ` FW: comint.el fix Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2003-06-23 10:23 Marshall, Simon

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=FC3DA3DC8D4AD311AB910020352A8FDC10755432@eagle.midas-kapiti.com \
    --to=simon.marshall@misys.com \
    --cc=Gordon.Grimes@bcbsnc.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).