;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;; Commentary:
+;;; Commentary:
;; Extended completion for the Emacs minibuffer.
;;
;; is supported in include file names.
-;; Code:
+;;; Code:
(defvar PC-meta-flag t
"*If nil, TAB does normal Emacs completion and M-TAB does Partial Completion.
(delete-char 1)
(setq end (1- end))))
(setq improved t))
- (insert (substring prefix i (1+ i)))
+ ;; Use format to discard text properties.
+ (insert (format "%s" (substring prefix i (1+ i))))
(setq end (1+ end)))
(setq i (1+ i)))
(or pt (equal (point) beg)
;; If totally ambiguous, display a list of completions
(if (or completion-auto-help
(eq mode 'help))
- (with-output-to-temp-buffer " *Completions*"
+ (with-output-to-temp-buffer "*Completions*"
(display-completion-list (sort helpposs 'string-lessp)))
(PC-temp-minibuffer-message " (Next char not unique)"))
nil)))))
(if (null mode)
(PC-temp-minibuffer-message " (Sole completion)"))
(delete-region beg end)
- (insert (if filename
- (substitute-in-file-name (concat dirname (car poss)))
- (car poss))))
+ (insert (format "%s"
+ (if filename
+ (substitute-in-file-name (concat dirname (car poss)))
+ (car poss)))))
t)))))