Synch with the flim-1_14 branch.
[elisp/flim.git] / std11.el
index 9cef3e2..14eb7e5 100644 (file)
--- a/std11.el
+++ b/std11.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:
 
@@ -44,9 +44,7 @@ The optional argument BOUNDs the search; it is a buffer position."
     (if (re-search-forward "^$" bound t)
        (goto-char (1- (match-beginning 0)))
       (end-of-line)
-      ))
-  (point)
-  )
+      (point))))
 
 ;;;###autoload
 (defun std11-fetch-field (name)
@@ -238,7 +236,7 @@ If non-nil, std11-wrap-as-quoted-string use encode-coding-string.")
           ;; unlimited patch by simm-emacs@fan.gr.jp
           ;;   Mon, 10 Jan 2000 13:03:02 +0900
           (if std11-filename-coding-system
-              (encode-coding-system string std11-filename-coding-system)
+              (encode-coding-string string std11-filename-coding-system)
             (std11-wrap-as-quoted-pairs string std11-non-qtext-char-list))
          "\""))
 
@@ -497,7 +495,7 @@ be the result."
              (cons (cons 'word elt) rest)
            )))))
 
-(defun std11-parse-word-or-comment (lal)
+(defun std11-parse-word-or-comment-or-period (lal)
   (let ((ret (std11-parse-token-or-comment lal)))
     (if ret
        (let ((elt (car ret))
@@ -509,12 +507,15 @@ be the result."
                 )
                ((assq 'comment elt)
                 (cons (cons 'comment-word elt) rest)
+                )
+               ((string-equal (cdr (assq 'specials elt)) ".")
+                (cons (cons 'period elt) rest)
                 ))
          ))))
 
 (defun std11-parse-phrase (lal)
   (let (ret phrase)
-    (while (setq ret (std11-parse-word-or-comment lal))
+    (while (setq ret (std11-parse-word-or-comment-or-period lal))
       (setq phrase (append phrase (cdr (car ret))))
       (setq lal (cdr ret))
       )
@@ -779,6 +780,8 @@ represents addr-spec of RFC 822."
                    ((eq name 'comment) "")
                    ((eq name 'quoted-string)
                     (concat "\"" (cdr token) "\""))
+                   ((eq name 'domain-literal)
+                    (concat "[" (cdr token) "]"))
                    (t (cdr token)))
                   )))
             seq "")