emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/pcomplete.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/pcomplete.el [emacs-unicode-2]
Date: Mon, 28 Jun 2004 04:36:22 -0400

Index: emacs/lisp/pcomplete.el
diff -c emacs/lisp/pcomplete.el:1.13.6.1 emacs/lisp/pcomplete.el:1.13.6.2
*** emacs/lisp/pcomplete.el:1.13.6.1    Fri Apr 16 12:50:08 2004
--- emacs/lisp/pcomplete.el     Mon Jun 28 07:28:44 2004
***************
*** 1,6 ****
  ;;; pcomplete.el --- programmable completion
  
! ;; Copyright (C) 1999, 2000, 2001, 2002 Free Sofware Foundation
  
  ;; Author: John Wiegley <address@hidden>
  ;; Keywords: processes abbrev
--- 1,6 ----
  ;;; pcomplete.el --- programmable completion
  
! ;; Copyright (C) 1999, 2000,01,02,03,04 Free Sofware Foundation
  
  ;; Author: John Wiegley <address@hidden>
  ;; Keywords: processes abbrev
***************
*** 505,511 ****
  
  (defsubst pcomplete-actual-arg (&optional index offset)
    "Return the actual text representation of the last argument.
! This different from `pcomplete-arg', which returns the textual value
  that the last argument evaluated to.  This function returns what the
  user actually typed in."
    (buffer-substring (pcomplete-begin index offset) (point)))
--- 505,511 ----
  
  (defsubst pcomplete-actual-arg (&optional index offset)
    "Return the actual text representation of the last argument.
! This is different from `pcomplete-arg', which returns the textual value
  that the last argument evaluated to.  This function returns what the
  user actually typed in."
    (buffer-substring (pcomplete-begin index offset) (point)))
***************
*** 531,537 ****
        (throw 'pcompleted nil))))
  
  (defun pcomplete-match-string (which &optional index offset)
!   "Like `string-match', but on the current completion argument."
    (let ((arg (pcomplete-arg (or index 1) offset)))
      (if arg
        (match-string which arg)
--- 531,537 ----
        (throw 'pcompleted nil))))
  
  (defun pcomplete-match-string (which &optional index offset)
!   "Like `match-string', but on the current completion argument."
    (let ((arg (pcomplete-arg (or index 1) offset)))
      (if arg
        (match-string which arg)
***************
*** 583,590 ****
  (defun pcomplete-comint-setup (completef-sym)
    "Setup a comint buffer to use pcomplete.
  COMPLETEF-SYM should be the symbol where the
! dynamic-complete-functions are kept.  For comint mode itself, this is
! `comint-dynamic-complete-functions'."
    (set (make-local-variable 'pcomplete-parse-arguments-function)
         'pcomplete-parse-comint-arguments)
    (make-local-variable completef-sym)
--- 583,590 ----
  (defun pcomplete-comint-setup (completef-sym)
    "Setup a comint buffer to use pcomplete.
  COMPLETEF-SYM should be the symbol where the
! dynamic-complete-functions are kept.  For comint mode itself,
! this is `comint-dynamic-complete-functions'."
    (set (make-local-variable 'pcomplete-parse-arguments-function)
         'pcomplete-parse-comint-arguments)
    (make-local-variable completef-sym)
***************
*** 709,715 ****
  If PREDICATE is non-nil, it will also be used to refine the match
  \(files for which the PREDICATE returns nil will be excluded).
  If no directory information can be extracted from the completed
! component, DEFAULT-DIRECTORY is used as the basis for completion."
    (let* ((name (substitute-env-vars pcomplete-stub))
         (default-directory (expand-file-name
                             (or (file-name-directory name)
--- 709,715 ----
  If PREDICATE is non-nil, it will also be used to refine the match
  \(files for which the PREDICATE returns nil will be excluded).
  If no directory information can be extracted from the completed
! component, `default-directory' is used as the basis for completion."
    (let* ((name (substitute-env-vars pcomplete-stub))
         (default-directory (expand-file-name
                             (or (file-name-directory name)
***************
*** 809,819 ****
  (defun pcomplete-opt (options &optional prefix no-ganging args-follow)
    "Complete a set of OPTIONS, each beginning with PREFIX (?- by default).
  PREFIX may be t, in which case no PREFIX character is necessary.
! If REQUIRED is non-nil, the options must be present.
! If NO-GANGING is non-nil, each option is separate.  -xy is not allowed.
! If ARGS-FOLLOW is non-nil, then options which arguments which take may
! have the argument appear after a ganged set of options.  This is how
! tar behaves, for example."
    (if (and (= pcomplete-index pcomplete-last)
           (string= (pcomplete-arg) "-"))
        (let ((len (length options))
--- 809,818 ----
  (defun pcomplete-opt (options &optional prefix no-ganging args-follow)
    "Complete a set of OPTIONS, each beginning with PREFIX (?- by default).
  PREFIX may be t, in which case no PREFIX character is necessary.
! If NO-GANGING is non-nil, each option is separate (-xy is not allowed).
! If ARGS-FOLLOW is non-nil, then options which take arguments may have
! the argument appear after a ganged set of options.  This is how tar
! behaves, for example."
    (if (and (= pcomplete-index pcomplete-last)
           (string= (pcomplete-arg) "-"))
        (let ((len (length options))
***************
*** 864,870 ****
            (setq index (1+ index))))))))
  
  (defun pcomplete--here (&optional form stub paring form-only)
!   "Complete aganst the current argument, if at the end.
  See the documentation for `pcomplete-here'."
    (if (< pcomplete-index pcomplete-last)
        (progn
--- 863,869 ----
            (setq index (1+ index))))))))
  
  (defun pcomplete--here (&optional form stub paring form-only)
!   "Complete against the current argument, if at the end.
  See the documentation for `pcomplete-here'."
    (if (< pcomplete-index pcomplete-last)
        (progn
***************
*** 893,899 ****
      (throw 'pcomplete-completions (eval form))))
  
  (defmacro pcomplete-here (&optional form stub paring form-only)
!   "Complete aganst the current argument, if at the end.
  If completion is to be done here, evaluate FORM to generate the list
  of strings which will be used for completion purposes.  If STUB is a
  string, use it as the completion stub instead of the default (which is
--- 892,898 ----
      (throw 'pcomplete-completions (eval form))))
  
  (defmacro pcomplete-here (&optional form stub paring form-only)
!   "Complete against the current argument, if at the end.
  If completion is to be done here, evaluate FORM to generate the list
  of strings which will be used for completion purposes.  If STUB is a
  string, use it as the completion stub instead of the default (which is
***************
*** 913,922 ****
  
  If PARING is nil, this argument will be pared against previous
  arguments using the function `file-truename' to normalize them.
! PARING may be a function, in which case that function is for
! normalization.  If PARING is the value t, the argument dealt with by
! this call will not participate in argument paring.  If it the integer
! 0, all previous arguments that have been seen will be cleared.
  
  If FORM-ONLY is non-nil, only the result of FORM will be used to
  generate the completions list.  This means that the hook
--- 912,922 ----
  
  If PARING is nil, this argument will be pared against previous
  arguments using the function `file-truename' to normalize them.
! PARING may be a function, in which case that function is used for
! normalization.  If PARING is t, the argument dealt with by this
! call will not participate in argument paring.  If it is the
! integer 0, all previous arguments that have been seen will be
! cleared.
  
  If FORM-ONLY is non-nil, only the result of FORM will be used to
  generate the completions list.  This means that the hook
***************
*** 1129,1138 ****
  
  (defun pcomplete--help ()
    "Produce context-sensitive help for the current argument.
! If specific documentation can't be given, be generic.
! INFODOC specifies the Info node to goto.  DOCUMENTATION is a sexp
! which will produce documentation for the argument (it is responsible
! for displaying in its own buffer)."
    (if (and pcomplete-help
           (or (and (stringp pcomplete-help)
                    (fboundp 'Info-goto-node))
--- 1129,1135 ----
  
  (defun pcomplete--help ()
    "Produce context-sensitive help for the current argument.
! If specific documentation can't be given, be generic."
    (if (and pcomplete-help
           (or (and (stringp pcomplete-help)
                    (fboundp 'Info-goto-node))
***************
*** 1150,1161 ****
  
  ;; general utilities
  
- (defsubst pcomplete-time-less-p (t1 t2)
-   "Say whether time T1 is less than time T2."
-   (or (< (car t1) (car t2))
-       (and (= (car t1) (car t2))
-          (< (nth 1 t1) (nth 1 t2)))))
- 
  (defun pcomplete-pare-list (l r &optional pred)
    "Destructively remove from list L all elements matching any in list R.
  Test is done using `equal'.
--- 1147,1152 ----




reply via email to

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