Use new style backquotes.
[elisp/apel.git] / pccl.el
diff --git a/pccl.el b/pccl.el
index 4b0dead..c719a3c 100644 (file)
--- a/pccl.el
+++ b/pccl.el
@@ -19,8 +19,8 @@
 
 ;; 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.
 
 ;;; Code:
 
          (>= emacs-major-version 19))))
 
 (unless-broken ccl-usable
-  (require 'ccl)
   (require 'advice)
 
   (if (featurep 'mule)
-      (if (featurep 'xemacs)
-          (if (>= emacs-major-version 21)
-              ;; for XEmacs 21 with mule
-              (require 'pccl-20))
-        (if (>= emacs-major-version 20)
-            ;; for Emacs 20
-            (require 'pccl-20)
-          ;; for Mule 2.*
-          (require 'pccl-om))))
+      (progn
+       (require 'ccl)
+       (if (featurep 'xemacs)
+            (if (>= emacs-major-version 21)
+                ;; for XEmacs 21 with mule
+                (require 'pccl-20))
+          (if (>= emacs-major-version 20)
+              ;; for Emacs 20
+              (require 'pccl-20)
+            ;; for Mule 2.*
+            (require 'pccl-om)))))
 
   (static-if (or (featurep 'xemacs) (< emacs-major-version 21))
     (defadvice define-ccl-program
@@ -54,7 +55,7 @@
       "When CCL-PROGRAM is too long, internal buffer is extended automatically."
       (let ((try-ccl-compile t)
            (prog (eval (ad-get-arg 1))))
-       (ad-set-arg 1 (` '(, prog)))
+       (ad-set-arg 1 `',prog)
        (while try-ccl-compile
          (setq try-ccl-compile nil)
          (condition-case sig
@@ -85,7 +86,8 @@ Value is a list of transformed arguments."
            (setq properties (plist-put properties 'pre-write-conversion tmp)))
        (cond
         ((eq type 'shift-jis)
-         `(,name 1 ,mnemonic ,doc-string () ,properties ,eol-type))
+         `(,name 1 ,mnemonic ,doc-string
+                 nil ,properties ,eol-type))
         ((eq type 'iso2022) ; This is not perfect.
          (if (plist-get props 'escape-quoted)
              (error "escape-quoted is not supported: %S"
@@ -127,20 +129,21 @@ Value is a list of transformed arguments."
                    (setq g3 `(nil ,g3))
                  (setq g3 `(,g3 t))))
            `(,name 2 ,mnemonic ,doc-string
-             (,g0 ,g1 ,g2 ,g3
-              ,(plist-get props 'short)
-              ,(not (plist-get props 'no-ascii-eol))
-              ,(not (plist-get props 'no-ascii-cntl))
-              ,(plist-get props 'seven)
-              t
-              ,(not (plist-get props 'lock-shift))
-              ,use-roman
-              ,use-oldjis
-              ,(plist-get props 'no-iso6429)
-              nil nil nil nil)
-           ,properties ,eol-type)))
-        ((eq type 'big5)
-         `(,name 3 ,mnemonic ,doc-string () ,properties ,eol-type))
+                   (,g0 ,g1 ,g2 ,g3
+                        ,(plist-get props 'short)
+                        ,(not (plist-get props 'no-ascii-eol))
+                        ,(not (plist-get props 'no-ascii-cntl))
+                        ,(plist-get props 'seven)
+                        t
+                        ,(not (plist-get props 'lock-shift))
+                        ,use-roman
+                        ,use-oldjis
+                        ,(plist-get props 'no-iso6429)
+                        nil nil nil nil)
+                   ,properties ,eol-type)))
+         ((eq type 'big5)
+          `(,name 3 ,mnemonic ,doc-string
+                  nil ,properties ,eol-type))
         ((eq type 'ccl)
          `(,name 4 ,mnemonic ,doc-string
                  (,(plist-get props 'decode) . ,(plist-get props 'encode))
@@ -151,7 +154,7 @@ Value is a list of transformed arguments."
     (defadvice make-coding-system
       (before ccl-compat (name type &rest ad-subr-args) activate)
       "Emulate XEmacs style make-coding-system."
-      (when (symbolp type)
+      (when (and (symbolp type) (not (memq type '(t nil))))
         (let ((args (apply 'transform-make-coding-system-args
                           name type ad-subr-args)))
          (setq type (cadr args)