Ticket #162: lisp-complete-symbol-2.patch
| File lisp-complete-symbol-2.patch, 1.8 kB (added by gotoh, 3 years ago) |
|---|
-
lisp.el
old new 522 522 considered." 523 523 (interactive) 524 524 525 (let ((window (get-buffer-window "*Completions*"))) 525 (let* ((end (point)) 526 (beg (with-syntax-table emacs-lisp-mode-syntax-table 527 (save-excursion 528 (backward-sexp 1) 529 (while (= (char-syntax (following-char)) ?\') 530 (forward-char 1)) 531 (point)))) 532 (pattern (buffer-substring-no-properties beg end)) 533 (window (get-buffer-window "*Completions*"))) 526 534 (if (and (eq last-command this-command) 527 535 window (window-live-p window) (window-buffer window) 528 (buffer-name (window-buffer window))) 536 (buffer-name (window-buffer window)) 537 (string= (with-current-buffer (window-buffer window) 538 last-pattern) pattern)) 529 539 ;; If this command was repeated, and 530 540 ;; there's a fresh completion window with a live buffer, 531 541 ;; and this command is repeated, scroll that window. … … 537 547 (scroll-up)))) 538 548 539 549 ;; Do completion. 540 (let* ((end (point)) 541 (beg (with-syntax-table emacs-lisp-mode-syntax-table 542 (save-excursion 543 (backward-sexp 1) 544 (while (= (char-syntax (following-char)) ?\') 545 (forward-char 1)) 546 (point)))) 547 (pattern (buffer-substring-no-properties beg end)) 548 (predicate 550 (let* ((predicate 549 551 (or predicate 550 552 (save-excursion 551 553 (goto-char beg) … … 587 589 (setq list (nreverse new)))) 588 590 (with-output-to-temp-buffer "*Completions*" 589 591 (display-completion-list list))) 592 (with-current-buffer "*Completions*" 593 (set (make-local-variable 'last-pattern) pattern)) 590 594 (message "Making completion list...%s" "done"))))))) 591 595 592 596 ;;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e
