X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;ds=sidebyside;f=lisp%2Fbinhex.el;h=dd76ce90809ee25837f4f55acd23d489603fd136;hb=d0ae8eae7ea91ca2d0b832c70bb2e938d107558a;hp=d6045d030393bc8c0c927ffe24990e0195b451e6;hpb=6d3039252bb175eba53a2028cbf3c0e90112388d;p=gnus diff --git a/lisp/binhex.el b/lisp/binhex.el index d6045d030..dd76ce908 100644 --- a/lisp/binhex.el +++ b/lisp/binhex.el @@ -1,17 +1,16 @@ -;;; binhex.el --- elisp native binhex decode +;;; binhex.el --- decode BinHex-encoded text -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: binhex news ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,12 +18,15 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: +;; BinHex is a binary-to-text encoding scheme similar to uuencode. +;; The command `binhex-decode-region' decodes BinHex-encoded text, via +;; the external program "hexbin" if that is available, or an Emacs +;; Lisp implementation if not. + ;;; Code: (eval-when-compile (require 'cl)) @@ -77,10 +79,11 @@ input and write the converted data to its standard output." ;;;###autoload (defconst binhex-begin-line - "^:...............................................................$") + "^:...............................................................$" + "Regular expression matching the start of a BinHex encoded region.") (defconst binhex-body-line "^[^:]...............................................................$") -(defconst binhex-end-line ":$") +(defconst binhex-end-line ":$") ; unused (defvar binhex-temporary-file-directory (cond ((fboundp 'temp-directory) (temp-directory)) @@ -223,7 +226,8 @@ If HEADER-ONLY is non-nil only decode header and return filename." (goto-char start) (when (re-search-forward binhex-begin-line end t) (setq work-buffer (generate-new-buffer " *binhex-work*")) - (with-current-buffer work-buffer (set-buffer-multibyte nil)) + (unless (featurep 'xemacs) + (with-current-buffer work-buffer (set-buffer-multibyte nil))) (beginning-of-line) (setq bits 0 counter 0) (while tmp @@ -329,5 +333,4 @@ If HEADER-ONLY is non-nil only decode header and return filename." (provide 'binhex) -;; arch-tag: 8476badd-1e76-4f1d-a640-f9a38c72eed8 ;;; binhex.el ends here