diff options
| author | Eli Zaretskii | 2009-03-07 13:31:35 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-03-07 13:31:35 +0000 |
| commit | 1bf0da029a5bfa7114003224a414d739d7ccc5cb (patch) | |
| tree | 756b00c95fe28b2186e6731a31a9095a61f6e23c | |
| parent | 47f588bbf8e731ac3159281650f36957d2cb1424 (diff) | |
| download | emacs-1bf0da029a5bfa7114003224a414d739d7ccc5cb.tar.gz emacs-1bf0da029a5bfa7114003224a414d739d7ccc5cb.zip | |
(Man-init-defvars) [windows-nt]: Use a special command list. Don't invoke Awk.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/man.el | 75 |
2 files changed, 50 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f97bf7cb240..4e0a1344bd1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-03-07 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * man.el (Man-init-defvars) [windows-nt]: Use a special command | ||
| 4 | list. Don't invoke Awk. | ||
| 5 | |||
| 1 | 2009-03-06 Glenn Morris <rgm@gnu.org> | 6 | 2009-03-06 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * mail/rmailmm.el (rmail-mime-media-type-handlers-alist): Fix doc and | 8 | * mail/rmailmm.el (rmail-mime-media-type-handlers-alist): Fix doc and |
diff --git a/lisp/man.el b/lisp/man.el index 9c2fa952fd2..3aadfa2d5e1 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -486,36 +486,51 @@ This is necessary if one wants to dump man.el with Emacs." | |||
| 486 | (apply 'list | 486 | (apply 'list |
| 487 | (cons | 487 | (cons |
| 488 | Man-sed-command | 488 | Man-sed-command |
| 489 | (list | 489 | (if (eq system-type 'windows-nt) |
| 490 | (if Man-sed-script | 490 | ;; Windows needs ".." quoting, not '..'. |
| 491 | (concat "-e '" Man-sed-script "'") | 491 | (list |
| 492 | "") | 492 | "-e \"/Reformatting page. Wait/d\"" |
| 493 | "-e '/^[\001-\032][\001-\032]*$/d'" | 493 | "-e \"/Reformatting entry. Wait/d\"" |
| 494 | "-e '/\e[789]/s///g'" | 494 | "-e \"/^[ \t][ \t]*-[ \t][0-9]*[ \t]-[ \t]*Formatted:.*[0-9]$/d\"" |
| 495 | "-e '/Reformatting page. Wait/d'" | 495 | "-e \"/^[ \t]*Page[ \t][0-9]*.*(printed[ \t][0-9\\/]*)$/d\"" |
| 496 | "-e '/Reformatting entry. Wait/d'" | 496 | "-e \"/^Printed[ \t][0-9].*[0-9]$/d\"" |
| 497 | "-e '/^[ \t]*Hewlett-Packard[ \t]Company[ \t]*-[ \t][0-9]*[ \t]-/d'" | 497 | "-e \"/^[ \t]*X[ \t]Version[ \t]1[01].*Release[ \t][0-9]/d\"" |
| 498 | "-e '/^[ \t]*Hewlett-Packard[ \t]*-[ \t][0-9]*[ \t]-.*$/d'" | 498 | "-e \"/^[A-Za-z].*Last[ \t]change:/d\"" |
| 499 | "-e '/^[ \t][ \t]*-[ \t][0-9]*[ \t]-[ \t]*Formatted:.*[0-9]$/d'" | 499 | "-e \"/[ \t]*Copyright [0-9]* UNIX System Laboratories, Inc.$/d\"" |
| 500 | "-e '/^[ \t]*Page[ \t][0-9]*.*(printed[ \t][0-9\\/]*)$/d'" | 500 | "-e \"/^[ \t]*Rev\\..*Page [0-9][0-9]*$/d\"") |
| 501 | "-e '/^Printed[ \t][0-9].*[0-9]$/d'" | 501 | (list |
| 502 | "-e '/^[ \t]*X[ \t]Version[ \t]1[01].*Release[ \t][0-9]/d'" | 502 | (if Man-sed-script |
| 503 | "-e '/^[A-Za-z].*Last[ \t]change:/d'" | 503 | (concat "-e '" Man-sed-script "'") |
| 504 | "-e '/^Sun[ \t]Release[ \t][0-9].*[0-9]$/d'" | 504 | "") |
| 505 | "-e '/[ \t]*Copyright [0-9]* UNIX System Laboratories, Inc.$/d'" | 505 | "-e '/^[\001-\032][\001-\032]*$/d'" |
| 506 | "-e '/^[ \t]*Rev\\..*Page [0-9][0-9]*$/d'" | 506 | "-e '/\e[789]/s///g'" |
| 507 | )) | 507 | "-e '/Reformatting page. Wait/d'" |
| 508 | (cons | 508 | "-e '/Reformatting entry. Wait/d'" |
| 509 | Man-awk-command | 509 | "-e '/^[ \t]*Hewlett-Packard[ \t]Company[ \t]*-[ \t][0-9]*[ \t]-/d'" |
| 510 | (list | 510 | "-e '/^[ \t]*Hewlett-Packard[ \t]*-[ \t][0-9]*[ \t]-.*$/d'" |
| 511 | "'\n" | 511 | "-e '/^[ \t][ \t]*-[ \t][0-9]*[ \t]-[ \t]*Formatted:.*[0-9]$/d'" |
| 512 | "BEGIN { blankline=0; anonblank=0; }\n" | 512 | "-e '/^[ \t]*Page[ \t][0-9]*.*(printed[ \t][0-9\\/]*)$/d'" |
| 513 | "/^$/ { if (anonblank==0) next; }\n" | 513 | "-e '/^Printed[ \t][0-9].*[0-9]$/d'" |
| 514 | "{ anonblank=1; }\n" | 514 | "-e '/^[ \t]*X[ \t]Version[ \t]1[01].*Release[ \t][0-9]/d'" |
| 515 | "/^$/ { blankline++; next; }\n" | 515 | "-e '/^[A-Za-z].*Last[ \t]change:/d'" |
| 516 | "{ if (blankline>0) { print \"\"; blankline=0; } print $0; }\n" | 516 | "-e '/^Sun[ \t]Release[ \t][0-9].*[0-9]$/d'" |
| 517 | "'" | 517 | "-e '/[ \t]*Copyright [0-9]* UNIX System Laboratories, Inc.$/d'" |
| 518 | )) | 518 | "-e '/^[ \t]*Rev\\..*Page [0-9][0-9]*$/d'" |
| 519 | ))) | ||
| 520 | ;; Windows doesn't support multi-line commands, so don't | ||
| 521 | ;; invoke Awk there. | ||
| 522 | (unless (eq system-type 'windows-nt) | ||
| 523 | (cons | ||
| 524 | Man-awk-command | ||
| 525 | (list | ||
| 526 | "'\n" | ||
| 527 | "BEGIN { blankline=0; anonblank=0; }\n" | ||
| 528 | "/^$/ { if (anonblank==0) next; }\n" | ||
| 529 | "{ anonblank=1; }\n" | ||
| 530 | "/^$/ { blankline++; next; }\n" | ||
| 531 | "{ if (blankline>0) { print \"\"; blankline=0; } print $0; }\n" | ||
| 532 | "'" | ||
| 533 | ))) | ||
| 519 | (if (not Man-uses-untabify-flag) | 534 | (if (not Man-uses-untabify-flag) |
| 520 | ;; The outer list will be stripped off by apply. | 535 | ;; The outer list will be stripped off by apply. |
| 521 | (list (cons | 536 | (list (cons |