* ntlm.el (ntlm-string-as-unibyte): New macro.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 5 Jan 2004 04:52:23 +0000 (04:52 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 5 Jan 2004 04:52:23 +0000 (04:52 +0000)
(ntlm-build-auth-response): Use it.

Remove Emacs 20 stuff:
* dgnushack.el (dgnushack-compile): Don't modify max-specpdl-size.
(butlast, mapc, remove): Remove the compiler macros.
* gnus-msg.el (gnus-summary-news-other-window): Use remove instead of delq
 and copy-sequence.
* gnus-art.el (popup-menu): Remove the compiler macro.
* nnmail.el (nnmail-split-fancy): Don't support customizing with Emacs 20.

lisp/ChangeLog
lisp/dgnushack.el
lisp/gnus-art.el
lisp/gnus-msg.el
lisp/nnmail.el
lisp/ntlm.el

index 54106dc..77c7d25 100644 (file)
@@ -1,3 +1,17 @@
+2004-01-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * ntlm.el (ntlm-string-as-unibyte): New macro.
+       (ntlm-build-auth-response): Use it.
+
+       Remove Emacs 20 stuff:
+       * dgnushack.el (dgnushack-compile): Don't modify max-specpdl-size.
+       (butlast, mapc, remove): Remove the compiler macros.
+       * gnus-msg.el (gnus-summary-news-other-window): Use remove instead
+       of delq and copy-sequence.
+       * gnus-art.el (popup-menu): Remove the compiler macro.
+       * nnmail.el (nnmail-split-fancy): Don't support customizing with
+       Emacs 20.
+
 2004-01-05  Simon Josefsson  <jas@extundo.com>
 
        * ntlm.el: Fix namespace.  Change smb-passwd-hash into
index 4d4b30b..77da9b9 100644 (file)
 
 ;(push "/usr/share/emacs/site-lisp" load-path)
 
-;; Define compiler macros for the functions provided by cl in old Emacsen.
-(unless (featurep 'xemacs)
-  (define-compiler-macro butlast (&whole form x &optional n)
-    (if (>= emacs-major-version 21)
-       form
-      (if n
-         `(let ((x ,x)
-                (n ,n))
-            (if (and n (<= n 0))
-                x
-              (let ((m (length x)))
-                (or n (setq n 1))
-                (and (< n m)
-                     (progn
-                       (if (> n 0)
-                           (progn
-                             (setq x (copy-sequence x))
-                             (setcdr (nthcdr (- (1- m) n) x) nil)))
-                       x)))))
-       `(let* ((x ,x)
-               (m (length x)))
-          (and (< 1 m)
-               (progn
-                 (setq x (copy-sequence x))
-                 (setcdr (nthcdr (- m 2) x) nil)
-                 x))))))
-
-  (define-compiler-macro remove (&whole form item seq)
-    (if (>= emacs-major-version 21)
-       form
-      `(delete ,item (copy-sequence ,seq))))
-
-  (define-compiler-macro mapc (&whole form fn seq &rest rest)
-    (if (>= emacs-major-version 21)
-       form
-      (if rest
-         `(let* ((fn ,fn)
-                 (seq ,seq)
-                 (args (list seq ,@rest))
-                 (m (apply (function min) (mapcar (function length) args)))
-                 (n 0))
-            (while (< n m)
-              (apply fn (mapcar (function (lambda (arg) (nth n arg))) args))
-              (setq n (1+ n)))
-            seq)
-       `(let ((seq ,seq))
-          (mapcar ,fn seq)
-          seq)))))
-
 ;; If we are building w3 in a different directory than the source
 ;; directory, we must read *.el from source directory and write *.elc
 ;; into the building directory.  For that, we define this function
@@ -244,9 +195,6 @@ dgnushack-compile."
 
 (defun dgnushack-compile (&optional warn)
   ;;(setq byte-compile-dynamic t)
-  (when (and (not (featurep 'xemacs))
-            (< emacs-major-version 21))
-    (setq max-specpdl-size 1200))
   (unless warn
     (setq byte-compile-warnings
          '(free-vars unresolved callargs redefine)))
index f1e647f..f15b743 100644 (file)
@@ -3893,22 +3893,6 @@ General format specifiers can also be used.  See Info node
                (vector (caddr c) (car c) :enable t))
              gnus-mime-button-commands)))
 
-(eval-when-compile
-  (define-compiler-macro popup-menu (&whole form
-                                           menu &optional position prefix)
-    (if (and (fboundp 'popup-menu)
-            (not (memq 'popup-menu (assoc "lmenu" load-history))))
-       form
-      ;; Gnus is probably running under Emacs 20.
-      `(let* ((menu (cdr ,menu))
-             (response (x-popup-menu
-                        t (list (car menu)
-                                (cons "" (mapcar (lambda (c)
-                                                   (cons (caddr c) (car c)))
-                                                 (cdr menu)))))))
-        (if response
-            (call-interactively (nth 3 (assq response menu))))))))
-
 (defun gnus-mime-button-menu (event prefix)
  "Construct a context-sensitive menu of MIME commands."
  (interactive "e\nP")
index 3539b58..a1223df 100644 (file)
@@ -673,9 +673,9 @@ network.  The corresponding back end must have a 'request-post method."
            (progn
              (message-news (gnus-group-real-name gnus-newsgroup-name))
              (set (make-local-variable 'gnus-discouraged-post-methods)
-                  (delq
+                  (remove
                    (car (gnus-find-method-for-group gnus-newsgroup-name))
-                   (copy-sequence gnus-discouraged-post-methods))))))
+                   gnus-discouraged-post-methods)))))
       (save-excursion
        (set-buffer buffer)
        (setq gnus-newsgroup-name group)))))
index c5d9392..242035b 100644 (file)
@@ -403,13 +403,13 @@ This is copy of the `lazy' widget in Emacs 21.4 provided for compatibility."
                             (const :format "" &)
                             (editable-list :inline t nnmail-split-fancy))
                       (list :tag "Function with fixed arguments (:)"
-                            :value (: nil)
+                            :value (:)
                             (const :format "" :value :)
                             function 
                             (editable-list :inline t (sexp :tag "Arg"))
                             )
                       (list :tag "Function with split arguments (!)"
-                            :value (! nil)
+                            :value (!)
                             (const :format "" !)
                             function
                             (editable-list :inline t nnmail-split-fancy))
index 656d090..84522c5 100644 (file)
@@ -105,13 +105,19 @@ is not given."
            domain              ;bufer field
            )))
 
+(eval-when-compile
+  (defmacro ntlm-string-as-unibyte (string)
+    (if (fboundp 'string-as-unibyte)
+       `(string-as-unibyte ,string)
+      string)))
+
 (defun ntlm-build-auth-response (challenge user password-hashes)
   "Return the response string to a challenge string CHALLENGE given by
 the NTLM based server for the user USER and the password hash list
 PASSWORD-HASHES.  NTLM uses two hash values which are represented
 by PASSWORD-HASHES.  PASSWORD-HASHES should be a return value of
  (list (ntlm-smb-passwd-hash password) (ntlm-md4hash password))"
-  (let* ((rchallenge (string-as-unibyte challenge))
+  (let* ((rchallenge (ntlm-string-as-unibyte challenge))
         ;; get fields within challenge struct
         ;;(ident (substring rchallenge 0 8))   ;ident, 8 bytes
         ;;(msgType (substring rchallenge 8 12))        ;msgType, 4 bytes