diff options
| author | Paul Eggert | 2016-04-11 09:07:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-04-11 09:07:16 -0700 |
| commit | 435da5d2955ce35be4785b7d46566ed9b42ea9fb (patch) | |
| tree | 581fac64374d0997e53bba0ae3cbd4968fa55121 /lisp/progmodes | |
| parent | 7c9e6254bbac949aa5493ab1741d2523a7d595b7 (diff) | |
| parent | b134c206bc07dbbb9e74b3be2db269c4f1196e40 (diff) | |
| download | emacs-435da5d2955ce35be4785b7d46566ed9b42ea9fb.tar.gz emacs-435da5d2955ce35be4785b7d46566ed9b42ea9fb.zip | |
Merge from origin/emacs-25
b134c20 Sync with gnulib
bb30fa9 Fix last change on 2016-01-02
488a72f ; Spelling fixes
9b1aab9 Port run-prolog EMACS to SWI-Prolog 7.2.3
0e7bcec Avoid crashes due to unreasonably large or small text scaling
85f257c Improve documentation of 'with-eval-after-load'
668c7bc Improve handling of non-ASCII characters in Git log messages
b570769 Remove undefined behavior in OS X dumper.
97211f3 Fix clipping of xwidgets
e87fbc0 Improve Lisp-level documentation of tooltips
9f1786e Faces names should not end in "-face".
3283271 * src/xsmfns.c (syms_of_xsmfns): Remove stray "s in doc strings.
a1f221b Comint and compile no longer set EMACS
5c28890 * lisp/subr.el (read-key): Don't let the prompt linger (bug#2...
a75b9a6 Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emac...
c93ae7a Allow to customize names of executables used by grep.el
f6497c6 Set locale encoding to UTF-8 when run from OS X GUI.
7ad1d07 Avoid signaling errors in 'M-n' at the 'C-x C-f' prompt
a3f1ac2 Avoid infinite loop in 'studlify-word'
f36df4b Don’t recommend obsolete EMACS env var
fb0b531 * lisp/emacs-lisp/package.el: Change from a few days ago need...
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/compile.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 48 | ||||
| -rw-r--r-- | lisp/progmodes/prolog.el | 16 |
3 files changed, 46 insertions, 26 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0b15a283090..b7ab408f744 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1702,14 +1702,6 @@ Returns the compilation buffer created." | |||
| 1702 | (list "TERM=emacs" | 1702 | (list "TERM=emacs" |
| 1703 | (format "TERMCAP=emacs:co#%d:tc=unknown:" | 1703 | (format "TERMCAP=emacs:co#%d:tc=unknown:" |
| 1704 | (window-width)))) | 1704 | (window-width)))) |
| 1705 | |||
| 1706 | ;; Set the EMACS variable, but | ||
| 1707 | ;; don't override users' setting of $EMACS. | ||
| 1708 | ;; Remove this hack once Bash 4.4-or-later is common, | ||
| 1709 | ;; since it can break 'configure'. | ||
| 1710 | (unless (getenv "EMACS") | ||
| 1711 | (list "EMACS=t")) | ||
| 1712 | |||
| 1713 | (list (format "INSIDE_EMACS=%s,compile" emacs-version)) | 1705 | (list (format "INSIDE_EMACS=%s,compile" emacs-version)) |
| 1714 | (copy-sequence process-environment)))) | 1706 | (copy-sequence process-environment)))) |
| 1715 | (set (make-local-variable 'compilation-arguments) | 1707 | (set (make-local-variable 'compilation-arguments) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 2b44b58f245..a478c95eb4f 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -427,21 +427,34 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 427 | This gets tacked on the end of the generated expressions.") | 427 | This gets tacked on the end of the generated expressions.") |
| 428 | 428 | ||
| 429 | ;;;###autoload | 429 | ;;;###autoload |
| 430 | (defvar grep-program (purecopy "grep") | 430 | (defcustom grep-program (purecopy "grep") |
| 431 | "The default grep program for `grep-command' and `grep-find-command'. | 431 | "The default grep program for `grep-command' and `grep-find-command'. |
| 432 | This variable's value takes effect when `grep-compute-defaults' is called.") | 432 | This variable's value takes effect when `grep-compute-defaults' is called." |
| 433 | :type 'string | ||
| 434 | :version "25.1" | ||
| 435 | :group 'grep) | ||
| 433 | 436 | ||
| 434 | ;;;###autoload | 437 | ;;;###autoload |
| 435 | (defvar find-program (purecopy "find") | 438 | (defcustom grep-find-program (purecopy "find") |
| 436 | "The default find program. | 439 | "The default find program. |
| 437 | This is used by commands like `grep-find-command', `find-dired' | 440 | This is used by commands like `grep-find-command', `find-dired' |
| 438 | and others.") | 441 | and others." |
| 442 | :type 'string | ||
| 443 | :version "25.1" | ||
| 444 | :group 'grep) | ||
| 445 | |||
| 446 | (define-obsolete-variable-alias 'find-program 'grep-find-program "25.1") | ||
| 439 | 447 | ||
| 440 | ;;;###autoload | 448 | ;;;###autoload |
| 441 | (defvar xargs-program (purecopy "xargs") | 449 | (defcustom grep-xargs-program (purecopy "xargs") |
| 442 | "The default xargs program for `grep-find-command'. | 450 | "The default xargs program for `grep-find-command'. |
| 443 | See `grep-find-use-xargs'. | 451 | See `grep-find-use-xargs'. |
| 444 | This variable's value takes effect when `grep-compute-defaults' is called.") | 452 | This variable's value takes effect when `grep-compute-defaults' is called." |
| 453 | :type 'string | ||
| 454 | :version "25.1" | ||
| 455 | :group 'grep) | ||
| 456 | |||
| 457 | (define-obsolete-variable-alias 'xargs-program 'grep-xargs-program "25.1") | ||
| 445 | 458 | ||
| 446 | ;;;###autoload | 459 | ;;;###autoload |
| 447 | (defvar grep-find-use-xargs nil | 460 | (defvar grep-find-use-xargs nil |
| @@ -611,13 +624,14 @@ This function is called from `compilation-filter-hook'." | |||
| 611 | (unless grep-find-use-xargs | 624 | (unless grep-find-use-xargs |
| 612 | (setq grep-find-use-xargs | 625 | (setq grep-find-use-xargs |
| 613 | (cond | 626 | (cond |
| 614 | ((grep-probe find-program | 627 | ((grep-probe grep-find-program |
| 615 | `(nil nil nil ,null-device "-exec" "echo" | 628 | `(nil nil nil ,null-device "-exec" "echo" |
| 616 | "{}" "+")) | 629 | "{}" "+")) |
| 617 | 'exec-plus) | 630 | 'exec-plus) |
| 618 | ((and | 631 | ((and |
| 619 | (grep-probe find-program `(nil nil nil ,null-device "-print0")) | 632 | (grep-probe grep-find-program |
| 620 | (grep-probe xargs-program `(nil nil nil "-0" "echo"))) | 633 | `(nil nil nil ,null-device "-print0")) |
| 634 | (grep-probe grep-xargs-program `(nil nil nil "-0" "echo"))) | ||
| 621 | 'gnu) | 635 | 'gnu) |
| 622 | (t | 636 | (t |
| 623 | 'exec)))) | 637 | 'exec)))) |
| @@ -628,10 +642,11 @@ This function is called from `compilation-filter-hook'." | |||
| 628 | ;; after the pipe symbol be quoted if they use | 642 | ;; after the pipe symbol be quoted if they use |
| 629 | ;; forward slashes as directory separators. | 643 | ;; forward slashes as directory separators. |
| 630 | (format "%s . -type f -print0 | \"%s\" -0 %s" | 644 | (format "%s . -type f -print0 | \"%s\" -0 %s" |
| 631 | find-program xargs-program grep-command)) | 645 | grep-find-program grep-xargs-program |
| 646 | grep-command)) | ||
| 632 | ((memq grep-find-use-xargs '(exec exec-plus)) | 647 | ((memq grep-find-use-xargs '(exec exec-plus)) |
| 633 | (let ((cmd0 (format "%s . -type f -exec %s" | 648 | (let ((cmd0 (format "%s . -type f -exec %s" |
| 634 | find-program grep-command)) | 649 | grep-find-program grep-command)) |
| 635 | (null (if grep-use-null-device | 650 | (null (if grep-use-null-device |
| 636 | (format "%s " null-device) | 651 | (format "%s " null-device) |
| 637 | ""))) | 652 | ""))) |
| @@ -643,7 +658,8 @@ This function is called from `compilation-filter-hook'." | |||
| 643 | (1+ (length cmd0))))) | 658 | (1+ (length cmd0))))) |
| 644 | (t | 659 | (t |
| 645 | (format "%s . -type f -print | \"%s\" %s" | 660 | (format "%s . -type f -print | \"%s\" %s" |
| 646 | find-program xargs-program grep-command))))) | 661 | grep-find-program grep-xargs-program |
| 662 | grep-command))))) | ||
| 647 | (unless grep-find-template | 663 | (unless grep-find-template |
| 648 | (setq grep-find-template | 664 | (setq grep-find-template |
| 649 | (let ((gcmd (format "%s <C> %s <R>" | 665 | (let ((gcmd (format "%s <C> %s <R>" |
| @@ -653,17 +669,17 @@ This function is called from `compilation-filter-hook'." | |||
| 653 | ""))) | 669 | ""))) |
| 654 | (cond ((eq grep-find-use-xargs 'gnu) | 670 | (cond ((eq grep-find-use-xargs 'gnu) |
| 655 | (format "%s <D> <X> -type f <F> -print0 | \"%s\" -0 %s" | 671 | (format "%s <D> <X> -type f <F> -print0 | \"%s\" -0 %s" |
| 656 | find-program xargs-program gcmd)) | 672 | grep-find-program grep-xargs-program gcmd)) |
| 657 | ((eq grep-find-use-xargs 'exec) | 673 | ((eq grep-find-use-xargs 'exec) |
| 658 | (format "%s <D> <X> -type f <F> -exec %s {} %s%s" | 674 | (format "%s <D> <X> -type f <F> -exec %s {} %s%s" |
| 659 | find-program gcmd null | 675 | grep-find-program gcmd null |
| 660 | (shell-quote-argument ";"))) | 676 | (shell-quote-argument ";"))) |
| 661 | ((eq grep-find-use-xargs 'exec-plus) | 677 | ((eq grep-find-use-xargs 'exec-plus) |
| 662 | (format "%s <D> <X> -type f <F> -exec %s %s{} +" | 678 | (format "%s <D> <X> -type f <F> -exec %s %s{} +" |
| 663 | find-program gcmd null)) | 679 | grep-find-program gcmd null)) |
| 664 | (t | 680 | (t |
| 665 | (format "%s <D> <X> -type f <F> -print | \"%s\" %s" | 681 | (format "%s <D> <X> -type f <F> -print | \"%s\" %s" |
| 666 | find-program xargs-program gcmd)))))))) | 682 | grep-find-program grep-xargs-program gcmd)))))))) |
| 667 | 683 | ||
| 668 | ;; Save defaults for this host. | 684 | ;; Save defaults for this host. |
| 669 | (setq grep-host-defaults-alist | 685 | (setq grep-host-defaults-alist |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 9ee405b31e1..212a5fa69ab 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -1374,8 +1374,20 @@ the variable `prolog-prompt-regexp'." | |||
| 1374 | () | 1374 | () |
| 1375 | (with-current-buffer (get-buffer-create "*prolog*") | 1375 | (with-current-buffer (get-buffer-create "*prolog*") |
| 1376 | (prolog-inferior-mode) | 1376 | (prolog-inferior-mode) |
| 1377 | (apply 'make-comint-in-buffer "prolog" (current-buffer) | 1377 | |
| 1378 | (prolog-program-name) nil (prolog-program-switches)) | 1378 | ;; The "INFERIOR=yes" hack is for SWI-Prolog 7.2.3 and earlier, |
| 1379 | ;; which assumes it is running under Emacs if either INFERIOR=yes or | ||
| 1380 | ;; if EMACS is set to a nonempty value. The EMACS setting is | ||
| 1381 | ;; obsolescent, so set INFERIOR. Newer versions of SWI-Prolog should | ||
| 1382 | ;; know about INSIDE_EMACS (which replaced EMACS) and should not need | ||
| 1383 | ;; this hack. | ||
| 1384 | (let ((process-environment | ||
| 1385 | (if (getenv "INFERIOR") | ||
| 1386 | process-environment | ||
| 1387 | (cons "INFERIOR=yes" process-environment)))) | ||
| 1388 | (apply 'make-comint-in-buffer "prolog" (current-buffer) | ||
| 1389 | (prolog-program-name) nil (prolog-program-switches))) | ||
| 1390 | |||
| 1379 | (unless prolog-system | 1391 | (unless prolog-system |
| 1380 | ;; Setup auto-detection. | 1392 | ;; Setup auto-detection. |
| 1381 | (setq-local | 1393 | (setq-local |