comparison lisp/progmodes/pascal.el @ 66114:13abee3a9bc6

* message.el (message-expand-group): Pass the common prefix substring of completion to `display-completion-list'. * mh-comp.el (mh-complete-word): Pass the common prefix substring of completion to `display-completion-list'. * dabbrev.el (dabbrev-completion): Pass the common prefix substring of completion to `display-completion-list'. * filecache.el (file-cache-minibuffer-complete) (file-cache-complete): Ditto. * tempo.el (tempo-display-completions): Ditto. * wid-edit.el (widget-file-complete, widget-color-complete): Ditto. * emacs-lisp/lisp.el (lisp-complete-symbol): Ditto. * eshell/em-hist.el (eshell-list-history): Ditto. * mail/mailabbrev.el (mail-abbrev-complete-alias): Ditto. * progmodes/etags.el (complete-tag): Ditto. * progmodes/make-mode.el (makefile-complete): Ditto. * progmodes/meta-mode.el (meta-complete-symbol): Ditto. * progmodes/octave-mod.el (octave-complete-symbol): Ditto. * progmodes/pascal.el (pascal-complete-word) (pascal-show-completions): Ditto. * textmodes/bibtex.el (bibtex-complete-internal): Ditto. * simple.el (completion-common-substring): New variable. (completion-setup-function): Use `completion-common-substring' to put faces. * minibuf.c (Fdisplay_completion_list): Add new optional argument COMMON_SUBSTRING. Bind `completion-common-substring' to the optional argument during running `completion-setup-hook'.
author Masatake YAMATO <jet@gyve.org>
date Sun, 16 Oct 2005 09:31:48 +0000
parents 4a74f7c2bd7b
children a11fdee52c05 0ca0d9181b5e
comparison
equal deleted inserted replaced
66113:bfb1c3364c23 66114:13abee3a9bc6
1376 ;; Display buffer if the current completion didn't help 1376 ;; Display buffer if the current completion didn't help
1377 ;; on completing the label. 1377 ;; on completing the label.
1378 ((and (not (null (cdr allcomp))) (= (length pascal-str) 1378 ((and (not (null (cdr allcomp))) (= (length pascal-str)
1379 (length match))) 1379 (length match)))
1380 (with-output-to-temp-buffer "*Completions*" 1380 (with-output-to-temp-buffer "*Completions*"
1381 (display-completion-list allcomp)) 1381 (display-completion-list allcomp pascal-str))
1382 ;; Wait for a keypress. Then delete *Completion* window 1382 ;; Wait for a keypress. Then delete *Completion* window
1383 (momentary-string-display "" (point)) 1383 (momentary-string-display "" (point))
1384 (delete-window (get-buffer-window (get-buffer "*Completions*"))) 1384 (delete-window (get-buffer-window (get-buffer "*Completions*")))
1385 ))))) 1385 )))))
1386 1386
1396 (string= pascal-last-word-shown pascal-str)) 1396 (string= pascal-last-word-shown pascal-str))
1397 pascal-last-completions 1397 pascal-last-completions
1398 (all-completions pascal-str 'pascal-completion)))) 1398 (all-completions pascal-str 'pascal-completion))))
1399 ;; Show possible completions in a temporary buffer. 1399 ;; Show possible completions in a temporary buffer.
1400 (with-output-to-temp-buffer "*Completions*" 1400 (with-output-to-temp-buffer "*Completions*"
1401 (display-completion-list allcomp)) 1401 (display-completion-list allcomp pascal-str))
1402 ;; Wait for a keypress. Then delete *Completion* window 1402 ;; Wait for a keypress. Then delete *Completion* window
1403 (momentary-string-display "" (point)) 1403 (momentary-string-display "" (point))
1404 (delete-window (get-buffer-window (get-buffer "*Completions*"))))) 1404 (delete-window (get-buffer-window (get-buffer "*Completions*")))))
1405 1405
1406 1406