jdk/src/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
child 1510 e747d3193ef2
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.management.remote.rmi;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.security.ProtectionDomain;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
    <p>A class loader that only knows how to define a limited number
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
    of classes, and load a limited number of other classes through
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
    delegation to another loader.  It is used to get around a problem
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
    with Serialization, in particular as used by RMI (including
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    RMI/IIOP).  The JMX Remote API defines exactly what class loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    must be used to deserialize arguments on the server, and return
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    values on the client.  We communicate this class loader to RMI by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    setting it as the context class loader.  RMI uses the context
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    class loader to load classes as it deserializes, which is what we
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    want.  However, before consulting the context class loader, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    looks up the call stack for a class with a non-null class loader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    and uses that if it finds one.  So, in the standalone version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    javax.management.remote, if the class you're looking for is known
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    to the loader of jmxremote.jar (typically the system class loader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    then that loader will load it.  This contradicts the class-loading
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    semantics required.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    <p>We get around the problem by ensuring that the search up the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    call stack will find a non-null class loader that doesn't load any
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    classes of interest, namely this one.  So even though this loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    is indeed consulted during deserialization, it never finds the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    class being deserialized.  RMI then proceeds to use the context
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    class loader, as we require.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    <p>This loader is constructed with the name and byte-code of one
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    or more classes that it defines, and a class-loader to which it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    will delegate certain other classes required by that byte-code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    We construct the byte-code somewhat painstakingly, by compiling
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    the Java code directly, converting into a string, copying that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    string into the class that needs this loader, and using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    stringToBytes method to convert it into the byte array.  We
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    compile with -g:none because there's not much point in having
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    line-number information and the like in these directly-encoded
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    <p>The referencedClassNames should contain the names of all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    classes that are referenced by the classes defined by this loader.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    It is not necessary to include standard J2SE classes, however.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    Here, a class is referenced if it is the superclass or a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    superinterface of a defined class, or if it is the type of a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    field, parameter, or return value.  A class is not referenced if
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    it only appears in the throws clause of a method or constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    Of course, referencedClassNames should not contain any classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    that the user might want to deserialize, because the whole point
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    of this loader is that it does not find such classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
class NoCallStackClassLoader extends ClassLoader {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    /** Simplified constructor when this loader only defines one class.  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    public NoCallStackClassLoader(String className,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                                  byte[] byteCode,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                                  String[] referencedClassNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
                                  ClassLoader referencedClassLoader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                                  ProtectionDomain protectionDomain) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        this(new String[] {className}, new byte[][] {byteCode},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
             referencedClassNames, referencedClassLoader, protectionDomain);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    public NoCallStackClassLoader(String[] classNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                                  byte[][] byteCodes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                                  String[] referencedClassNames,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                                  ClassLoader referencedClassLoader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                                  ProtectionDomain protectionDomain) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        super(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        /* Validation. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        if (classNames == null || classNames.length == 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            || byteCodes == null || classNames.length != byteCodes.length
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
            || referencedClassNames == null || protectionDomain == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            throw new IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        for (int i = 0; i < classNames.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
            if (classNames[i] == null || byteCodes[i] == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                throw new IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        for (int i = 0; i < referencedClassNames.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
            if (referencedClassNames[i] == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                throw new IllegalArgumentException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        this.classNames = classNames;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        this.byteCodes = byteCodes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        this.referencedClassNames = referencedClassNames;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        this.referencedClassLoader = referencedClassLoader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        this.protectionDomain = protectionDomain;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    /* This method is called at most once per name.  Define the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * if it is one of the classes whose byte code we have, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * delegate the load if it is one of the referenced classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    protected Class findClass(String name) throws ClassNotFoundException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        for (int i = 0; i < classNames.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            if (name.equals(classNames[i])) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                return defineClass(classNames[i], byteCodes[i], 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                                   byteCodes[i].length, protectionDomain);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        /* If the referencedClassLoader is null, it is the bootstrap
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
         * class loader, and there's no point in delegating to it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
         * because it's already our parent class loader.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        if (referencedClassLoader != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
            for (int i = 0; i < referencedClassNames.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                if (name.equals(referencedClassNames[i]))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                    return referencedClassLoader.loadClass(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        throw new ClassNotFoundException(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    private final String[] classNames;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    private final byte[][] byteCodes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    private final String[] referencedClassNames;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
    private final ClassLoader referencedClassLoader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    private final ProtectionDomain protectionDomain;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * <p>Construct a <code>byte[]</code> using the characters of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * given <code>String</code>.  Only the low-order byte of each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * character is used.  This method is useful to reduce the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * footprint of classes that include big byte arrays (e.g. the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * byte code of other classes), because a string takes up much
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * less space in a class file than the byte code to initialize a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * <code>byte[]</code> with the same number of bytes.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * <p>We use just one byte per character even though characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * contain two bytes.  The resultant output length is much the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * same: using one byte per character is shorter because it has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * more characters in the optimal 1-127 range but longer because
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * it has more zero bytes (which are frequent, and are encoded as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * two bytes in classfile UTF-8).  But one byte per character has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * two key advantages: (1) you can see the string constants, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * is reassuring, (2) you don't need to know whether the class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * file length is odd.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * <p>This method differs from {@link String#getBytes()} in that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * it does not use any encoding.  So it is guaranteed that each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * byte of the result is numerically identical (mod 256) to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * corresponding character of the input.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    public static byte[] stringToBytes(String s) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        final int slen = s.length();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        byte[] bytes = new byte[slen];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        for (int i = 0; i < slen; i++)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
            bytes[i] = (byte) s.charAt(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        return bytes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
You can use the following Emacs function to convert class files into
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
strings to be used by the stringToBytes method above.  Select the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
whole (defun...) with the mouse and type M-x eval-region, or save it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
to a file and do M-x load-file.  Then visit the *.class file and do
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
M-x class-string.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
;; class-string.el
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
;; visit the *.class file with emacs, then invoke this function
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
(defun class-string ()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
  "Construct a Java string whose bytes are the same as the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
buffer.  The resultant string is put in a buffer called *string*,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
possibly with a numeric suffix like <2>.  From there it can be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
insert-buffer'd into a Java program."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  (interactive)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  (let* ((s (buffer-string))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
         (slen (length s))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
         (i 0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
         (buf (generate-new-buffer "*string*")))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    (set-buffer buf)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    (insert "\"")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    (while (< i slen)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
      (if (> (current-column) 61)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
          (insert "\"+\n\""))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
      (let ((c (aref s i)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        (insert (cond
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
                 ((> c 126) (format "\\%o" c))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                 ((= c ?\") "\\\"")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                 ((= c ?\\) "\\\\")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                 ((< c 33)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                  (let ((nextc (if (< (1+ i) slen)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                                   (aref s (1+ i))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                                 ?\0)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                    (cond
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                     ((and (<= nextc ?7) (>= nextc ?0))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
                      (format "\\%03o" c))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                     (t
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
                      (format "\\%o" c)))))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                 (t c))))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
      (setq i (1+ i)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    (insert "\"")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    (switch-to-buffer buf)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
*/