diff options
Diffstat (limited to 'lisp/progmodes/project.el')
| -rw-r--r-- | lisp/progmodes/project.el | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b6161351f0b..8afd5ce7959 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- | 1 | ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. |
| 4 | ;; Version: 0.5.0 | 4 | ;; Version: 0.5.1 |
| 5 | ;; Package-Requires: ((emacs "26.3")) | 5 | ;; Package-Requires: ((emacs "26.3") (xref "1.0.2")) |
| 6 | 6 | ||
| 7 | ;; This is a GNU ELPA :core package. Avoid using functionality that | 7 | ;; This is a GNU ELPA :core package. Avoid using functionality that |
| 8 | ;; not compatible with the version of Emacs recorded above. | 8 | ;; not compatible with the version of Emacs recorded above. |
| @@ -731,24 +731,6 @@ pattern to search for." | |||
| 731 | (user-error "No matches for: %s" regexp)) | 731 | (user-error "No matches for: %s" regexp)) |
| 732 | xrefs)) | 732 | xrefs)) |
| 733 | 733 | ||
| 734 | (defun project--process-file-region (start end program | ||
| 735 | &optional buffer display | ||
| 736 | &rest args) | ||
| 737 | ;; FIXME: This branching shouldn't be necessary, but | ||
| 738 | ;; call-process-region *is* measurably faster, even for a program | ||
| 739 | ;; doing some actual work (for a period of time). Even though | ||
| 740 | ;; call-process-region also creates a temp file internally | ||
| 741 | ;; (http://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00211.html). | ||
| 742 | (if (not (file-remote-p default-directory)) | ||
| 743 | (apply #'call-process-region | ||
| 744 | start end program nil buffer display args) | ||
| 745 | (let ((infile (make-temp-file "ppfr"))) | ||
| 746 | (unwind-protect | ||
| 747 | (progn | ||
| 748 | (write-region start end infile nil 'silent) | ||
| 749 | (apply #'process-file program infile buffer display args)) | ||
| 750 | (delete-file infile))))) | ||
| 751 | |||
| 752 | (defun project--read-regexp () | 734 | (defun project--read-regexp () |
| 753 | (let ((sym (thing-at-point 'symbol))) | 735 | (let ((sym (thing-at-point 'symbol))) |
| 754 | (read-regexp "Find regexp" (and sym (regexp-quote sym))))) | 736 | (read-regexp "Find regexp" (and sym (regexp-quote sym))))) |