X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=texi%2Finfohack.el;h=f991593eab2835adb8c4d041d3966ac558536405;hb=a672b0a0b117c6790d1a6bac3dc91463ce5df2f0;hp=9412b18c7754d2e6b22d822484e5b242d396c153;hpb=ffac4574bb9d2be3a614ecacbb20e3e0608768bf;p=elisp%2Fgnus.git- diff --git a/texi/infohack.el b/texi/infohack.el index 9412b18..f991593 100644 --- a/texi/infohack.el +++ b/texi/infohack.el @@ -18,18 +18,34 @@ ;; 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., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Code: (let ((default-directory (expand-file-name "../lisp/"))) - ;; Adjust `load-path' for APEL. - (load-file "dgnushack.el") + (if (file-exists-p (expand-file-name "dgnuspath.el")) + (load (expand-file-name "dgnuspath.el") nil nil t)) ;; Replace "./" with "../lisp/" in `load-path'. (setq load-path (mapcar 'expand-file-name load-path))) + +(when (featurep 'xemacs) + (condition-case nil + (require 'timer-funcs) + (error " +You should upgrade your XEmacs packages, especially xemacs-base.\n"))) + +;; XEmacs 21.4.17 doesn't provide `line-end-position' which is used +;; when formatting Info files. 2005-02-23 +(condition-case nil + (require 'poe) + (error "\nIn %s, +APEL was not found or an error occurred. You will need to run the +configure script again adding the --with-addpath=APEL_PATH option.\n" + load-path)) + (load-file (expand-file-name "ptexinfmt.el" "./")) (if (fboundp 'texinfo-copying) @@ -131,8 +147,7 @@ Both characters must have the same length of multi-byte form." (let ((auto-save-default nil) (find-file-run-dired nil) coding-system-for-write - (error 0) - (undo-outer-limit (eval '(lsh -1 -1)))) + (error 0)) (condition-case err (progn (find-file file) @@ -192,20 +207,25 @@ Both characters must have the same length of multi-byte form." (texinfo-every-node-update) (set-buffer-modified-p nil) (message "texinfo formatting %s..." file) - (if (featurep 'mule) - ;; Encode messages to terminal. - (let ((si:message (symbol-function 'message))) - (fset 'message - (byte-compile - `(lambda (fmt &rest args) - (funcall ,si:message "%s" - (encode-coding-string - (apply 'format fmt args) - 'iso-2022-7bit))))) - (unwind-protect - (texinfo-format-buffer nil) - (fset 'message si:message))) - (texinfo-format-buffer nil)) + (let ((si:message (symbol-function 'message))) + ;; Encode messages to terminal. + (fset + 'message + (byte-compile + (if (featurep 'xemacs) + `(lambda (fmt &rest args) + (unless (and (string-equal fmt "%s clean") + (equal (car args) buffer-file-name)) + (funcall ,si:message "%s" + (encode-coding-string (apply 'format fmt args) + 'iso-2022-7bit)))) + `(lambda (fmt &rest args) + (funcall ,si:message "%s" + (encode-coding-string (apply 'format fmt args) + 'iso-2022-7bit)))))) + (unwind-protect + (texinfo-format-buffer nil) + (fset 'message si:message))) (if (buffer-modified-p) (progn (message "Saving modified %s" (buffer-file-name)) (save-buffer))))