/[emacs]/emacs/lisp/gnus/mm-util.el
ViewVC logotype

Diff of /emacs/lisp/gnus/mm-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29.2.1 by schwab, Thu Jul 22 16:45:51 2004 UTC revision 1.29.2.2 by rsteib, Tue Aug 31 14:47:59 2004 UTC
# Line 1  Line 1 
1  ;;; mm-util.el --- Utility functions for Mule and low level things  ;;; mm-util.el --- Utility functions for Mule and low level things
2  ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003  ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
3  ;;   Free Software Foundation, Inc.  ;;   Free Software Foundation, Inc.
4    
5  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
# Line 611  Use unibyte mode for this." Line 611  Use unibyte mode for this."
611  (put 'mm-with-unibyte-buffer 'lisp-indent-function 0)  (put 'mm-with-unibyte-buffer 'lisp-indent-function 0)
612  (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body))  (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body))
613    
614    (defmacro mm-with-multibyte-buffer (&rest forms)
615      "Create a temporary buffer, and evaluate FORMS there like `progn'.
616    Use multibyte mode for this."
617      `(let ((default-enable-multibyte-characters t))
618         (with-temp-buffer ,@forms)))
619    (put 'mm-with-multibyte-buffer 'lisp-indent-function 0)
620    (put 'mm-with-multibyte-buffer 'edebug-form-spec '(body))
621    
622  (defmacro mm-with-unibyte-current-buffer (&rest forms)  (defmacro mm-with-unibyte-current-buffer (&rest forms)
623    "Evaluate FORMS with current buffer temporarily made unibyte.    "Evaluate FORMS with current buffer temporarily made unibyte.
624  Also bind `default-enable-multibyte-characters' to nil.  Also bind `default-enable-multibyte-characters' to nil.
# Line 632  Equivalent to `progn' in XEmacs" Line 640  Equivalent to `progn' in XEmacs"
640  (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))  (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))
641    
642  (defmacro mm-with-unibyte (&rest forms)  (defmacro mm-with-unibyte (&rest forms)
643    "Eval the FORMS with the default value of `enable-multibyte-characters' nil, ."    "Eval the FORMS with the default value of `enable-multibyte-characters' nil."
644    `(let (default-enable-multibyte-characters)    `(let (default-enable-multibyte-characters)
645       ,@forms))       ,@forms))
646  (put 'mm-with-unibyte 'lisp-indent-function 0)  (put 'mm-with-unibyte 'lisp-indent-function 0)
647  (put 'mm-with-unibyte 'edebug-form-spec '(body))  (put 'mm-with-unibyte 'edebug-form-spec '(body))
648    
649    (defmacro mm-with-multibyte (&rest forms)
650      "Eval the FORMS with the default value of `enable-multibyte-characters' t."
651      `(let ((default-enable-multibyte-characters t))
652         ,@forms))
653    (put 'mm-with-multibyte 'lisp-indent-function 0)
654    (put 'mm-with-multibyte 'edebug-form-spec '(body))
655    
656  (defun mm-find-charset-region (b e)  (defun mm-find-charset-region (b e)
657    "Return a list of Emacs charsets in the region B to E."    "Return a list of Emacs charsets in the region B to E."
658    (cond    (cond

Legend:
Removed from v.1.29.2.1  
changed lines
  Added in v.1.29.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26