]> code.delx.au - gnu-emacs/commitdiff
Minor backslash fixes in manuals and scripts
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Sep 2015 22:52:09 +0000 (15:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Sep 2015 22:59:13 +0000 (15:59 -0700)
* Makefile.in (install-arch-indep):
* admin/charsets/compact.awk:
* admin/charsets/gb180302.awk (gb_to_index):
* admin/charsets/gb180304.awk (gb_to_index):
Avoid undefined behavior in Awk regular expression backslashes.
* doc/misc/efaq.texi (Matching parentheses):
Omit unnecessary backslashes.
* doc/misc/gnus-faq.texi (FAQ 5-8):
Avoid undefined behavior in suggested sed backslash usage.

Makefile.in
admin/charsets/compact.awk
admin/charsets/gb180302.awk
admin/charsets/gb180304.awk
doc/misc/efaq.texi
doc/misc/gnus-faq.texi

index 3cfbe5704ff8eb9a2fd98bcca3fa4c921270e98e..4ee84f96ad6cbb13801d258235d9b24e63432c19 100644 (file)
@@ -593,8 +593,8 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
              rm -f $${subdir}/.gitignore ; \
              rm -f $${subdir}/.arch-inventory ; \
              rm -f $${subdir}/.DS_Store ; \
-             rm -f $${subdir}/\#* ; \
-             rm -f $${subdir}/.\#* ; \
+             rm -f $${subdir}/#* ; \
+             rm -f $${subdir}/.#* ; \
              rm -f $${subdir}/*~ ; \
              rm -f $${subdir}/*.orig ; \
              rm -f $${subdir}/ChangeLog* ; \
index b7d1fd19d8ee1f0bd52ed7f93ac911d53b1d5918..21e03ee41576fed0d8734ed94eb56f941c6ff918 100644 (file)
@@ -69,7 +69,7 @@ function decode_hex(str, idx) {
   return n;
 }
 
-/^\#/ {
+/^#/ {
   print;
   next;
 }
@@ -119,4 +119,3 @@ END {
        printf "0x%04X-0x%04X 0x%04X\n", from_code, to_code, from_unicode;
     }
 }
-
index 40d92bf9be45adc675541621209f0816665494d8..4947f966371ee6024d3f249689f8d6c4c7ba1555 100644 (file)
@@ -53,7 +53,7 @@ function decode_hex(str) {
 function gb_to_index(gb) {
   b0 = int(gb / 256);
   b1 = gb % 256;
-  idx = (((b0 - 129)) * 191 + b1 - 64); 
+  idx = (((b0 - 129)) * 191 + b1 - 64);
 #  if (b1 >= 128)
 #    idx--;
   return idx
@@ -67,7 +67,7 @@ function index_to_gb(idx) {
   return (b0 * 256 + b1);
 }
 
-/^\#/ {
+/^#/ {
   print;
   next;
 }
@@ -108,4 +108,3 @@ END {
     printf "0x%04X-0x%04X 0x%04X\n",
       index_to_gb(from_gb), index_to_gb(to_gb), from_unicode;
 }
-
index 3c16cb556ea0fb2ef0afe2d13c942e4614447a31..81d7e7301bf51fc639839d8d70bc1e73f9be9049 100644 (file)
@@ -49,7 +49,7 @@ function decode_hex(str) {
 function gb_to_index(gb) {
   b0 = int(gb / 256);
   b1 = gb % 256;
-  idx = (((b0 - 129)) * 191 + b1 - 64); 
+  idx = (((b0 - 129)) * 191 + b1 - 64);
 #  if (b1 >= 127)
 #    idx--;
   return idx
@@ -65,7 +65,7 @@ function index_to_gb(idx) {
   return sprintf("%02X%02X%02X%02X", b0, b1, b2, b3);
 }
 
-/^\#/ {
+/^#/ {
   print;
   next;
 }
@@ -119,4 +119,3 @@ END {
        }
     }
 }
-
index 3e9109d0924956a396e8bdd40dcccd69294ca692..6557f4d017b6c90aa7be7c279d50b7dd4c953e4f 100644 (file)
@@ -2089,8 +2089,8 @@ parenthesis, it simply inserts a % like normal.
 (defun match-paren (arg)
   "Go to the matching paren if on a paren; otherwise insert %."
   (interactive "p")
-  (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
-        ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
+  (cond ((looking-at "\\s(") (forward-list 1) (backward-char 1))
+        ((looking-at "\\s)") (forward-char 1) (backward-list 1))
         (t (self-insert-command (or arg 1)))))
 @end lisp
 
index 19c78bf56c65b784a5fc2a6571508d601c24b8b4..26b9210b0dd365f3c10433e8ef136724721af6e9 100644 (file)
@@ -1528,7 +1528,7 @@ and create the actual X-face by saying
 
 @example
 cat file.xbm | xbm2ikon | compface > file.face
-cat file.face | sed 's/\\/\\\\/g;s/\"/\\\"/g;' > file.face.quoted
+cat file.face | sed 's/["\\]/\\&/g' > file.face.quoted
 @end example
 @noindent