;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; 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
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
(let ((completion-ignore-case t)
(candidates (if (fboundp 'cp-supported-codepages)
(cp-supported-codepages)
- ;; Removed in Emacs 23 (unicode), sosignal an error:
- (error "`codepage-setup' is obsolete in this Emacs version."))))
+ ;; Removed in Emacs 23 (unicode), so signal an error:
+ (error "`codepage-setup' not present in this Emacs version."))))
(list (completing-read "Setup DOS Codepage: (default 437) " candidates
nil t nil nil "437"))))
(when alias
(intern (format "windows-%s" number)))))
(let* ((cp (intern (format "cp%s" number))))
(unless (mm-coding-system-p cp)
- (codepage-setup number))
+ (if (fboundp 'codepage-setup) ; silence compiler
+ (codepage-setup number)
+ (error "`codepage-setup' not present in this Emacs version.")))
(when (and alias
;; Don't add alias if setup of cp failed.
(mm-coding-system-p cp))
(put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0)
(put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))
-(defmacro mm-with-unibyte (&rest forms)
- "Eval the FORMS with the default value of `enable-multibyte-characters' nil."
- `(let (default-enable-multibyte-characters)
- ,@forms))
-(put 'mm-with-unibyte 'lisp-indent-function 0)
-(put 'mm-with-unibyte 'edebug-form-spec '(body))
-
-(defmacro mm-with-multibyte (&rest forms)
- "Eval the FORMS with the default value of `enable-multibyte-characters' t."
- `(let ((default-enable-multibyte-characters t))
- ,@forms))
-(put 'mm-with-multibyte 'lisp-indent-function 0)
-(put 'mm-with-multibyte 'edebug-form-spec '(body))
-
(defun mm-find-charset-region (b e)
"Return a list of Emacs charsets in the region B to E."
(cond