From f25aef2e1e79cdd0cb1007bb1078d6894ebc4aeb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 21 Feb 2012 20:02:44 -0800 Subject: [PATCH] dired-guess-shell-alist-default tiny nroff change * dired-x.el (dired-guess-shell-alist-default): Remove escape sequences from nroff output. Fixes: debbugs:172 --- lisp/ChangeLog | 5 +++++ lisp/dired-x.el | 22 ++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8bedc86ce88..7d8fdb27daa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-02-22 Glenn Morris + + * dired-x.el (dired-guess-shell-alist-default): + Remove escape sequences from nroff output. (Bug#172) + 2012-02-21 Glenn Morris * vc/emerge.el (emerge-defvar-local): diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 067d15764f8..b45a340706f 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -964,24 +964,26 @@ replace it with a dir-locals-file `./%s'" ;; FIXME "man ./" does not work with dired-do-shell-command, ;; because there seems to be no way for us to modify the filename, ;; only the command. Hmph. `dired-man' works though. - (list "\\.\\(?:[0-9]\\|man\\)\\'" '(let ((loc (Man-support-local-filenames))) - (cond ((eq loc 'man-db) "man -l") - ((eq loc 'man) "man ./") - (t - "cat * | tbl | nroff -man -h")))) + (list "\\.\\(?:[0-9]\\|man\\)\\'" + '(let ((loc (Man-support-local-filenames))) + (cond ((eq loc 'man-db) "man -l") + ((eq loc 'man) "man ./") + (t + "cat * | tbl | nroff -man -h | col -b")))) (list "\\.\\(?:[0-9]\\|man\\)\\.g?z\\'" '(let ((loc (Man-support-local-filenames))) (cond ((eq loc 'man-db) "man -l") ((eq loc 'man) "man ./") - (t "gunzip -qc * | tbl | nroff -man -h"))) + (t "gunzip -qc * | tbl | nroff -man -h | col -b"))) ;; Optional decompression. '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) - (list "\\.[0-9]\\.Z\\'" '(let ((loc (Man-support-local-filenames))) - (cond ((eq loc 'man-db) "man -l") - ((eq loc 'man) "man ./") - (t "zcat * | tbl | nroff -man -h"))) + (list "\\.[0-9]\\.Z\\'" + '(let ((loc (Man-support-local-filenames))) + (cond ((eq loc 'man-db) "man -l") + ((eq loc 'man) "man ./") + (t "zcat * | tbl | nroff -man -h | col -b"))) ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) -- 2.39.2