diff options
| author | Paul Eggert | 2011-04-04 23:45:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-04 23:45:27 -0700 |
| commit | ca23cc8840efb1354ebe16c6bb99bf1f8880e9b6 (patch) | |
| tree | e95220daac6b9ffb47966df747308a11c0623179 /lisp/progmodes | |
| parent | d5efd1d1b54595db795d6fddb32404cc74923d77 (diff) | |
| parent | b87a82007428428e2f24af64a59799402bb1651e (diff) | |
| download | emacs-ca23cc8840efb1354ebe16c6bb99bf1f8880e9b6.tar.gz emacs-ca23cc8840efb1354ebe16c6bb99bf1f8880e9b6.zip | |
Merge from mainline.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/grep.el | 37 | ||||
| -rw-r--r-- | lisp/progmodes/idlwave.el | 19 |
2 files changed, 34 insertions, 22 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index a4c9b7fccba..58f2ee98f3c 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -440,10 +440,11 @@ This variable's value takes effect when `grep-compute-defaults' is called.") | |||
| 440 | 440 | ||
| 441 | ;;;###autoload | 441 | ;;;###autoload |
| 442 | (defvar grep-find-use-xargs nil | 442 | (defvar grep-find-use-xargs nil |
| 443 | "Non-nil means that `grep-find' uses the `xargs' utility by default. | 443 | "How to invoke find and grep. |
| 444 | If `exec', use `find -exec'. | 444 | If `exec', use `find -exec {} ;'. |
| 445 | If `exec-plus' use `find -exec {} +'. | ||
| 445 | If `gnu', use `find -print0' and `xargs -0'. | 446 | If `gnu', use `find -print0' and `xargs -0'. |
| 446 | Any other non-nil value means to use `find -print' and `xargs'. | 447 | Any other value means to use `find -print' and `xargs'. |
| 447 | 448 | ||
| 448 | This variable's value takes effect when `grep-compute-defaults' is called.") | 449 | This variable's value takes effect when `grep-compute-defaults' is called.") |
| 449 | 450 | ||
| @@ -561,6 +562,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 561 | (unless grep-find-use-xargs | 562 | (unless grep-find-use-xargs |
| 562 | (setq grep-find-use-xargs | 563 | (setq grep-find-use-xargs |
| 563 | (cond | 564 | (cond |
| 565 | ((grep-probe find-program | ||
| 566 | `(nil nil nil ,null-device "-exec" "echo" | ||
| 567 | "{}" "+")) | ||
| 568 | 'exec-plus) | ||
| 564 | ((and | 569 | ((and |
| 565 | (grep-probe find-program `(nil nil nil ,null-device "-print0")) | 570 | (grep-probe find-program `(nil nil nil ,null-device "-print0")) |
| 566 | (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo"))) | 571 | (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo"))) |
| @@ -575,13 +580,17 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 575 | ;; forward slashes as directory separators. | 580 | ;; forward slashes as directory separators. |
| 576 | (format "%s . -type f -print0 | \"%s\" -0 -e %s" | 581 | (format "%s . -type f -print0 | \"%s\" -0 -e %s" |
| 577 | find-program xargs-program grep-command)) | 582 | find-program xargs-program grep-command)) |
| 578 | ((eq grep-find-use-xargs 'exec) | 583 | ((memq grep-find-use-xargs '(exec exec-plus)) |
| 579 | (let ((cmd0 (format "%s . -type f -exec %s" | 584 | (let ((cmd0 (format "%s . -type f -exec %s" |
| 580 | find-program grep-command))) | 585 | find-program grep-command)) |
| 586 | (null (if grep-use-null-device | ||
| 587 | (format "%s " null-device) | ||
| 588 | ""))) | ||
| 581 | (cons | 589 | (cons |
| 582 | (format "%s {} %s %s" | 590 | (if (eq grep-find-use-xargs 'exec-plus) |
| 583 | cmd0 null-device | 591 | (format "%s %s{} +" cmd0 null) |
| 584 | (shell-quote-argument ";")) | 592 | (format "%s {} %s%s" cmd0 null |
| 593 | (shell-quote-argument ";"))) | ||
| 585 | (1+ (length cmd0))))) | 594 | (1+ (length cmd0))))) |
| 586 | (t | 595 | (t |
| 587 | (format "%s . -type f -print | \"%s\" %s" | 596 | (format "%s . -type f -print | \"%s\" %s" |
| @@ -589,14 +598,20 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 589 | (unless grep-find-template | 598 | (unless grep-find-template |
| 590 | (setq grep-find-template | 599 | (setq grep-find-template |
| 591 | (let ((gcmd (format "%s <C> %s <R>" | 600 | (let ((gcmd (format "%s <C> %s <R>" |
| 592 | grep-program grep-options))) | 601 | grep-program grep-options)) |
| 602 | (null (if grep-use-null-device | ||
| 603 | (format "%s " null-device) | ||
| 604 | ""))) | ||
| 593 | (cond ((eq grep-find-use-xargs 'gnu) | 605 | (cond ((eq grep-find-use-xargs 'gnu) |
| 594 | (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s" | 606 | (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s" |
| 595 | find-program xargs-program gcmd)) | 607 | find-program xargs-program gcmd)) |
| 596 | ((eq grep-find-use-xargs 'exec) | 608 | ((eq grep-find-use-xargs 'exec) |
| 597 | (format "%s . <X> -type f <F> -exec %s {} %s %s" | 609 | (format "%s . <X> -type f <F> -exec %s {} %s%s" |
| 598 | find-program gcmd null-device | 610 | find-program gcmd null |
| 599 | (shell-quote-argument ";"))) | 611 | (shell-quote-argument ";"))) |
| 612 | ((eq grep-find-use-xargs 'exec-plus) | ||
| 613 | (format "%s . <X> -type f <F> -exec %s %s{} +" | ||
| 614 | find-program gcmd null)) | ||
| 600 | (t | 615 | (t |
| 601 | (format "%s . <X> -type f <F> -print | \"%s\" %s" | 616 | (format "%s . <X> -type f <F> -print | \"%s\" %s" |
| 602 | find-program xargs-program gcmd)))))))) | 617 | find-program xargs-program gcmd)))))))) |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 5b7e07a5aad..8066e1c3a7f 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -7068,10 +7068,9 @@ If these don't exist, a letter in the string is automatically selected." | |||
| 7068 | ;; No quick reply: Show help | 7068 | ;; No quick reply: Show help |
| 7069 | (save-window-excursion | 7069 | (save-window-excursion |
| 7070 | (with-output-to-temp-buffer "*Completions*" | 7070 | (with-output-to-temp-buffer "*Completions*" |
| 7071 | (mapcar (lambda(x) | 7071 | (dolist (x keys-alist) |
| 7072 | (princ (nth 1 x)) | 7072 | (princ (nth 1 x)) |
| 7073 | (princ "\n")) | 7073 | (princ "\n"))) |
| 7074 | keys-alist)) | ||
| 7075 | (setq char (read-char))) | 7074 | (setq char (read-char))) |
| 7076 | (setq char (read-char))) | 7075 | (setq char (read-char))) |
| 7077 | (message nil) | 7076 | (message nil) |
| @@ -9313,13 +9312,11 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." | |||
| 9313 | (princ "================================================\n\n") | 9312 | (princ "================================================\n\n") |
| 9314 | (princ (format fmt "KEY" "ACTION" "")) | 9313 | (princ (format fmt "KEY" "ACTION" "")) |
| 9315 | (princ (format fmt "---" "------" ""))) | 9314 | (princ (format fmt "---" "------" ""))) |
| 9316 | (mapcar | 9315 | (dolist (list abbrevs) |
| 9317 | (lambda (list) | 9316 | (setq str (car list) |
| 9318 | (setq str (car list) | 9317 | rpl (nth 1 list) |
| 9319 | rpl (nth 1 list) | 9318 | func (nth 2 list)) |
| 9320 | func (nth 2 list)) | 9319 | (princ (format fmt str rpl func))))) |
| 9321 | (princ (format fmt str rpl func))) | ||
| 9322 | abbrevs))) | ||
| 9323 | ;; Make sure each abbreviation uses only one display line | 9320 | ;; Make sure each abbreviation uses only one display line |
| 9324 | (with-current-buffer "*Help*" | 9321 | (with-current-buffer "*Help*" |
| 9325 | (setq truncate-lines t))) | 9322 | (setq truncate-lines t))) |