phracek pushed to emacs (f21). "emacs grep warns 'GREP_OPTIONS is deprecated' (#1176547) (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 7 10:10:40 UTC 2015


>From 7f49f14f8f645032a154757d9a2445848951e164 Mon Sep 17 00:00:00 2001
From: Petr Hracek <phracek at redhat.com>
Date: Tue, 7 Apr 2015 12:10:02 +0200
Subject: emacs grep warns 'GREP_OPTIONS is deprecated' (#1176547)

Signed-off-by: Petr Hracek <phracek at redhat.com>

diff --git a/emacs-grep-deprecated.patch b/emacs-grep-deprecated.patch
new file mode 100644
index 0000000..7aa44b1
--- /dev/null
+++ b/emacs-grep-deprecated.patch
@@ -0,0 +1,54 @@
+diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
+index 9962945..763f906 100644
+--- a/lisp/progmodes/grep.el
++++ b/lisp/progmodes/grep.el
+@@ -77,11 +77,10 @@ in grep buffers, so if you have globally disabled font-lock-mode,
+ you will not get highlighting.
+ 
+ This option sets the environment variable GREP_COLORS to specify
+-markers for highlighting and GREP_OPTIONS to add the --color
+-option in front of any explicit grep options before starting
+-the grep.
++markers for highlighting and adds the --color option in front of
++any explicit grep options before starting the grep.
+ 
+-When this option is `auto', grep uses `--color=auto' to highlight
++When this option is `auto', grep uses `--color' to highlight
+ matches only when it outputs to a terminal (when `grep' is the last
+ command in the pipe), thus avoiding the use of any potentially-harmful
+ escape sequences when standard output goes to a file or pipe.
+@@ -97,7 +96,7 @@ To change the default value, use Customize or call the function
+   :type '(choice (const :tag "Do not highlight matches with grep markers" nil)
+ 		 (const :tag "Highlight matches with grep markers" t)
+ 		 (const :tag "Use --color=always" always)
+-		 (const :tag "Use --color=auto" auto)
++		 (const :tag "Use --color" auto)
+ 		 (other :tag "Not Set" auto-detect))
+   :set 'grep-apply-setting
+   :version "22.1"
+@@ -467,10 +466,6 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
+     ;; `setenv' modifies `process-environment' let-bound in `compilation-start'
+     ;; Any TERM except "dumb" allows GNU grep to use `--color=auto'
+     (setenv "TERM" "emacs-grep")
+-    (setenv "GREP_OPTIONS"
+-	    (concat (getenv "GREP_OPTIONS")
+-		    " --color=" (if (eq grep-highlight-matches 'always)
+-				    "always" "auto")))
+     ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions
+     (setenv "GREP_COLOR" "01;31")
+     ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions
+@@ -570,7 +565,13 @@ This function is called from `compilation-filter-hook'."
+     (unless (and grep-command grep-find-command
+ 		 grep-template grep-find-template)
+       (let ((grep-options
+-	     (concat (if grep-use-null-device "-n" "-nH")
++	     (concat (and grep-highlight-matches
++                      (grep-probe grep-program
++                                  `(nil nil nil "--color" "x" ,null-device)
++                                  nil 1)
++                      (if (eq grep-highlight-matches 'always)
++                           "--color=always " "--color "))
++                 (if grep-use-null-device "-n" "-nH")
+ 		     (if (grep-probe grep-program
+ 				     `(nil nil nil "-e" "foo" ,null-device)
+ 				     nil 1)
diff --git a/emacs.spec b/emacs.spec
index 2c5b7f7..70dece6 100644
--- a/emacs.spec
+++ b/emacs.spec
@@ -3,7 +3,7 @@ Summary:        GNU Emacs text editor
 Name:           emacs
 Epoch:          1
 Version:        24.4
-Release:        5%{?dist}
+Release:        6%{?dist}
 License:        GPLv3+ and CC0-1.0
 URL:            http://www.gnu.org/software/emacs/
 Group:          Applications/Editors
@@ -25,6 +25,7 @@ Patch1:         emacs-spellchecker.patch
 Patch2:         emacs-pdf-default.patch
 Patch3:         emacs-adds-extra-spaces.patch
 Patch4:         emacs-no-bitmap-icon.patch
+Patch5:         emacs-grep-deprecated.patch
 
 BuildRequires:  atk-devel cairo-devel freetype-devel fontconfig-devel dbus-devel giflib-devel glibc-devel libpng-devel
 BuildRequires:  libjpeg-devel libtiff-devel libX11-devel libXau-devel libXdmcp-devel libXrender-devel libXt-devel
@@ -53,8 +54,8 @@ BuildRequires:  util-linux
 Requires:       desktop-file-utils dejavu-sans-mono-fonts
 Requires(preun): %{_sbindir}/alternatives
 Requires(posttrans): %{_sbindir}/alternatives
-Requires: emacs-common = %{epoch}:%{version}-%{release}
-Provides: emacs(bin) = %{epoch}:%{version}-%{release}
+Requires:       emacs-common = %{epoch}:%{version}-%{release}
+Provides:       emacs(bin) = %{epoch}:%{version}-%{release}
 
 %if 0%{!?rhel:1}
 # Turn off the brp-python-bytecompile script since this script doesn't
@@ -85,12 +86,12 @@ without leaving the editor.
 This package provides an emacs binary with support for X windows.
 
 %package nox
-Summary: GNU Emacs text editor without X support
-Group: Applications/Editors
+Summary:        GNU Emacs text editor without X support
+Group:          Applications/Editors
 Requires(preun): %{_sbindir}/alternatives
 Requires(posttrans): %{_sbindir}/alternatives
-Requires: emacs-common = %{epoch}:%{version}-%{release}
-Provides: emacs(bin) = %{epoch}:%{version}-%{release}
+Requires:       emacs-common = %{epoch}:%{version}-%{release}
+Provides:       emacs(bin) = %{epoch}:%{version}-%{release}
 
 %description nox
 Emacs is a powerful, customizable, self-documenting, modeless text
@@ -102,18 +103,18 @@ This package provides an emacs binary with no X windows support for running
 on a terminal.
 
 %package common
-Summary: Emacs common files
+Summary:        Emacs common files
 # The entire source code is GPLv3+ except lib-src/etags.c which is
 # also BSD.  Manual (info) is GFDL.
-License: GPLv3+ and GFDL and BSD
-Group: Applications/Editors
+License:        GPLv3+ and GFDL and BSD
+Group:          Applications/Editors
 Requires(preun): /sbin/install-info
 Requires(preun): %{_sbindir}/alternatives
 Requires(posttrans): %{_sbindir}/alternatives
 Requires(post): /sbin/install-info
-Requires: %{name}-filesystem = %{epoch}:%{version}-%{release}
-Provides: %{name}-el = %{epoch}:%{version}-%{release}
-Obsoletes: emacs-el < 1:24.3-28
+Requires:       %{name}-filesystem = %{epoch}:%{version}-%{release}
+Provides:       %{name}-el = %{epoch}:%{version}-%{release}
+Obsoletes:      emacs-el < 1:24.3-28
 
 %description common
 Emacs is a powerful, customizable, self-documenting, modeless text
@@ -124,10 +125,10 @@ without leaving the editor.
 This package contains all the common files needed by emacs or emacs-nox.
 
 %package terminal
-Summary: A desktop menu item for GNU Emacs terminal.
-Group: Applications/Editors
-Requires: emacs = %{epoch}:%{version}-%{release}
-BuildArch: noarch
+Summary:        A desktop menu item for GNU Emacs terminal.
+Group:          Applications/Editors
+Requires:       emacs = %{epoch}:%{version}-%{release}
+BuildArch:      noarch
 
 %description terminal
 Contains a desktop menu item running GNU Emacs terminal. Install
@@ -137,9 +138,9 @@ Please note that emacs-terminal is a temporary package and it will be
 removed when another terminal becomes capable of handling Malayalam.
 
 %package filesystem
-Summary: Emacs filesystem layout
-Group: Applications/Editors
-BuildArch: noarch
+Summary:        Emacs filesystem layout
+Group:          Applications/Editors
+BuildArch:      noarch
 
 %description filesystem
 This package provides some directories which are required by other
@@ -152,6 +153,7 @@ packages that add functionality to Emacs.
 %patch2 -p1 -b .pdf-default.patch
 %patch3 -p1 -b .add-extra-spaces
 %patch4 -p1 -b .no-bitmap-icon
+%patch5 -p1 -b .grep-deprecated
 
 # We prefer our emacs.desktop file
 cp %SOURCE1 etc/emacs.desktop
@@ -435,6 +437,9 @@ update-desktop-database &> /dev/null || :
 %dir %{_datadir}/emacs/site-lisp/site-start.d
 
 %changelog
+* Tue Apr  7 2015 Petr Hracek <phracek at redhat.com> - 1:24.4-6
+- emacs grep warns 'GREP_OPTIONS is deprecated' (#1176547)
+
 * Fri Mar 27 2015 Petr Hracek <phracek at redhat.com> - 1:24.4-5
 - emacs option --no-bitmap-icon does not work (#1199160)
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/emacs.git/commit/?h=f21&id=7f49f14f8f645032a154757d9a2445848951e164


More information about the scm-commits mailing list