Changeset 2931

Show
Ignore:
Timestamp:
01/11/08 11:53:58 (11 months ago)
Author:
vivainio
Message:

readline.get_endidx is configurable, for emacs users

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ipython/trunk/IPython/completer.py

    r2904 r2931  
    248248        self.readline.set_completer_delims(delims) 
    249249        self.get_line_buffer = self.readline.get_line_buffer 
     250        self.get_endidx = self.readline.get_endidx 
    250251        self.omit__names = omit__names 
    251252        self.merge_completions = shell.rc.readline_merge_completions         
     
    273274                         self.python_func_kw_matches] 
    274275 
     276     
    275277    # Code contributed by Alex Schmolck, for ipython/emacs integration 
    276278    def all_completions(self, text): 
     
    561563             
    562564        return None 
    563          
    564      
     565                
    565566    def complete(self, text, state,line_buffer=None): 
    566567        """Return the next possible completion for 'text'. 
     
    585586        # an editor (as long as autoindent is off). 
    586587 
     588        # It should be noted that at least pyreadline still shows 
     589        # file completions - is there a way around it? 
     590         
    587591        # don't apply this on 'dumb' terminals, such as emacs buffers, so we 
    588592        # don't interfere with their own tab-completion mechanism. 
     
    599603        magic_prefix = self.magic_prefix 
    600604 
    601         self.lbuf = self.full_lbuf[:self.readline.get_endidx()] 
     605        self.lbuf = self.full_lbuf[:self.get_endidx()] 
    602606 
    603607        try: 
  • ipython/trunk/doc/ChangeLog

    r2930 r2931  
    77    * ipy_user_conf.py: Added an example on how to change term  
    88    colors in config file (through using autoexec). 
     9 
     10    * completer.py, test_completer.py: Ability to specify custom 
     11    get_endidx to replace readline.get_endidx. For emacs users. 
    912     
    10132008-01-10 Ville Vainio  <vivainio@gmail.com>