* spam.el (spam-point-at-eol): Replace with point-at-eol.
authorJesper Harder <harder@ifa.au.dk>
Mon, 5 Jan 2004 17:03:24 +0000 (17:03 +0000)
committerJesper Harder <harder@ifa.au.dk>
Mon, 5 Jan 2004 17:03:24 +0000 (17:03 +0000)
* smime.el (smime-point-at-eol): Replace with point-at-eol.

* rfc2047.el (rfc2047-point-at-bol, rfc2047-point-at-eol): Replace
with point-at-{eol,bol}.

* netrc.el (netrc-point-at-eol): Replace with point-at-eol.

* imap.el (imap-point-at-eol): Replace with point-at-eol.

* flow-fill.el (fill-flowed-point-at-bol,
fill-flowed-point-at-eol): Replace with point-at-{eol,bol}.

lisp/ChangeLog
lisp/flow-fill.el
lisp/imap.el
lisp/netrc.el
lisp/rfc2047.el
lisp/smime.el
lisp/spam.el

index 01ba6b9..7dce9b5 100644 (file)
@@ -1,5 +1,19 @@
 2004-01-05  Jesper Harder  <harder@ifa.au.dk>
 
+       * spam.el (spam-point-at-eol): Replace with point-at-eol.
+
+       * smime.el (smime-point-at-eol): Replace with point-at-eol.
+
+       * rfc2047.el (rfc2047-point-at-bol, rfc2047-point-at-eol): Replace
+       with point-at-{eol,bol}.
+
+       * netrc.el (netrc-point-at-eol): Replace with point-at-eol.
+
+       * imap.el (imap-point-at-eol): Replace with point-at-eol.
+
+       * flow-fill.el (fill-flowed-point-at-bol,
+       fill-flowed-point-at-eol): Replace with point-at-{eol,bol}.
+
        * gnus-util.el (gnus-point-at-bol, gnus-point-at-eol): Remove.
        Replace with point-at-{eol,bol} throughout all files.
 
index cec7739..db24c4e 100644 (file)
@@ -70,17 +70,6 @@ RFC 2646 suggests 66 characters for readability."
                 (sexp)
                 (integer)))
 
-(eval-and-compile
-  (defalias 'fill-flowed-point-at-bol
-       (if (fboundp 'point-at-bol)
-           'point-at-bol
-         'line-beginning-position))
-
-   (defalias 'fill-flowed-point-at-eol
-       (if (fboundp 'point-at-eol)
-           'point-at-eol
-         'line-end-position)))
-
 ;;;###autoload
 (defun fill-flowed-encode (&optional buffer)
   (with-current-buffer (or buffer (current-buffer))
@@ -142,8 +131,8 @@ RFC 2646 suggests 66 characters for readability."
                (let ((fill-prefix (when quote (concat quote " ")))
                      (fill-column (eval fill-flowed-display-column))
                      filladapt-mode)
-                 (fill-region (fill-flowed-point-at-bol)
-                              (min (1+ (fill-flowed-point-at-eol))
+                 (fill-region (point-at-bol)
+                              (min (1+ (point-at-eol))
                                    (point-max))
                               'left 'nosqueeze))
              (error
index 485c903..7e0c9b9 100644 (file)
   (autoload 'utf7-decode "utf7")
   (autoload 'format-spec "format-spec")
   (autoload 'format-spec-make "format-spec")
-  (autoload 'open-tls-stream "tls")
-  ;; Avoid use gnus-point-at-eol so we're independent of Gnus.  These
-  ;; days we have point-at-eol anyhow.
-  (if (fboundp 'point-at-eol)
-      (defalias 'imap-point-at-eol 'point-at-eol)
-    (defun imap-point-at-eol ()
-      (save-excursion
-       (end-of-line)
-       (point)))))
+  (autoload 'open-tls-stream "tls"))
 
 ;; User variables.
 
@@ -2452,7 +2444,7 @@ Return nil if no complete line has arrived."
                              ;; next line for Courier IMAP bug.
                              (skip-chars-forward " ")
                              (point)))
-               (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0))
+               (> (skip-chars-forward "^ )" (point-at-eol)) 0))
       (push (buffer-substring start (point)) flag-list))
     (assert (eq (char-after) ?\)) t "In imap-parse-flag-list")
     (imap-forward)
index 3bfc76d..184128e 100644 (file)
 ;;; .netrc and .authinforc parsing
 ;;;
 
-(eval-and-compile
-  (defalias 'netrc-point-at-eol
-    (if (fboundp 'point-at-eol)
-       'point-at-eol
-      'line-end-position)))
-
 (defun netrc-parse (file)
   "Parse FILE and return an list of all entries in the file."
   (when (file-exists-p file)
@@ -52,7 +46,7 @@
        (goto-char (point-min))
        ;; Go through the file, line by line.
        (while (not (eobp))
-         (narrow-to-region (point) (netrc-point-at-eol))
+         (narrow-to-region (point) (point-at-eol))
          ;; For each line, get the tokens and values.
          (while (not (eobp))
            (skip-chars-forward "\t ")
index d4d6e96..cc8f52f 100644 (file)
@@ -55,18 +55,6 @@ Value is what BODY returns."
 (require 'base64)
 (autoload 'mm-body-7-or-8 "mm-bodies")
 
-(eval-and-compile
-  ;; Avoid gnus-util for mm- code.
-  (defalias 'rfc2047-point-at-bol
-    (if (fboundp 'point-at-bol)
-       'point-at-bol
-      'line-beginning-position))
-
-  (defalias 'rfc2047-point-at-eol
-    (if (fboundp 'point-at-eol)
-       'point-at-eol
-      'line-end-position)))
-
 (defvar rfc2047-header-encoding-alist
   '(("Newsgroups" . nil)
     ("Followup-To" . nil)
@@ -134,7 +122,7 @@ quoted-printable and base64 respectively.")
    (progn
      (forward-line 1)
      (if (re-search-forward "^[^ \n\t]" nil t)
-        (rfc2047-point-at-bol)
+        (point-at-bol)
        (point-max))))
   (goto-char (point-min)))
 
@@ -424,7 +412,7 @@ By default, the region is treated as containing addresses (see
                   (t 8)))
         (pre (- b (save-restriction
                     (widen)
-                    (rfc2047-point-at-bol))))
+                    (point-at-bol))))
         ;; encoded-words must not be longer than 75 characters,
         ;; including charset, encoding etc.  This leaves us with
         ;; 75 - (length start) - 2 - 2 characters.  The last 2 is for
@@ -483,7 +471,7 @@ By default, the region is treated as containing addresses (see
          (first t)
          (bol (save-restriction
                 (widen)
-                (rfc2047-point-at-bol))))
+                (point-at-bol))))
       (while (not (eobp))
        (when (and (or break qword-break)
                   (> (- (point) bol) 76))
@@ -554,18 +542,18 @@ By default, the region is treated as containing addresses (see
     (goto-char (point-min))
     (let ((bol (save-restriction
                 (widen)
-                (rfc2047-point-at-bol)))
-         (eol (rfc2047-point-at-eol)))
+                (point-at-bol)))
+         (eol (point-at-eol)))
       (forward-line 1)
       (while (not (eobp))
        (if (and (looking-at "[ \t]")
-                (< (- (rfc2047-point-at-eol) bol) 76))
+                (< (- (point-at-eol) bol) 76))
            (delete-region eol (progn
                                 (goto-char eol)
                                 (skip-chars-forward "\r\n")
                                 (point)))
-         (setq bol (rfc2047-point-at-bol)))
-       (setq eol (rfc2047-point-at-eol))
+         (setq bol (point-at-bol)))
+       (setq eol (point-at-eol))
        (forward-line 1)))))
 
 (defun rfc2047-b-encode-region (b e)
@@ -585,7 +573,7 @@ By default, the region is treated as containing addresses (see
       (narrow-to-region (goto-char b) e)
       (let ((bol (save-restriction
                   (widen)
-                  (rfc2047-point-at-bol))))
+                  (point-at-bol))))
        (quoted-printable-encode-region
         b e nil
         ;; = (\075), _ (\137), ? (\077) are used in the encoded word.
index af7f955..33a14ea 100644 (file)
@@ -512,13 +512,6 @@ A string or a list of strings is returned."
            (caddr curkey)
          (smime-get-certfiles keyfile otherkeys)))))
 
-;; Use mm-util?
-(eval-and-compile
-  (defalias 'smime-point-at-eol
-    (if (fboundp 'point-at-eol)
-       'point-at-eol
-      'line-end-position)))
-
 (defun smime-buffer-as-string-region (b e)
   "Return each line in region between B and E as a list of strings."
   (save-excursion
index 130fcd8..737d584 100644 (file)
@@ -763,11 +763,6 @@ spam-use-* variable.")
       (apply 'spam-ham-move-routine (car groups))
     (spam-ham-copy-or-move-routine nil groups)))
 
-(eval-and-compile
-  (defalias 'spam-point-at-eol (if (fboundp 'point-at-eol)
-                                  'point-at-eol
-                                'line-end-position)))
-
 (defun spam-get-article-as-string (article)
   (let ((article-buffer (spam-get-article-as-buffer article))
        article-string)
@@ -1368,7 +1363,7 @@ functions")
        ;; check the return now (we're back in the temp buffer)
        (goto-char (point-min))
        (if (not (eobp))
-           (setq category (buffer-substring (point) (spam-point-at-eol))))
+           (setq category (buffer-substring (point) (point-at-eol))))
        (when (not (zerop (length category))) ; we need a category here
          (if spam-ifile-all-categories
              (setq return category)
@@ -1556,7 +1551,7 @@ REMOVE not nil, remove the ADDRESSES."
       (with-temp-buffer
        (insert-file-contents file)
        (while (not (eobp))
-         (setq address (buffer-substring (point) (spam-point-at-eol)))
+         (setq address (buffer-substring (point) (point-at-eol)))
          (forward-line 1)
          ;; insert the e-mail address if detected, otherwise the raw data
          (unless (zerop (length address))