Start a new file gnus-compat.el for the new compatabilty regime
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Feb 2012 19:25:37 +0000 (20:25 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Feb 2012 19:25:37 +0000 (20:25 +0100)
* gnus-compat.el: New file.
* gnus.el (gnus-compat): Require it.

lisp/ChangeLog
lisp/gnus-compat.el [new file with mode: 0644]
lisp/gnus.el

index 16c1823..f005cc3 100644 (file)
@@ -1,5 +1,9 @@
 2012-02-01  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus.el (gnus-compat): Require it.
+
+       * gnus-compat.el: New file.
+
        * gnus-start.el (gnus-clean-old-newsrc): New function.
        (gnus-read-newsrc-file): Use it.
 
diff --git a/lisp/gnus-compat.el b/lisp/gnus-compat.el
new file mode 100644 (file)
index 0000000..db2c452
--- /dev/null
@@ -0,0 +1,38 @@
+;;; gnus-compat.el --- Compatability functions for Gnus
+
+;; Copyright (C) 2012 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Keywords: compat
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This package defines and redefines a bunch of functions for Gnus
+;; usage.  The basic (and somewhat unsound) idea is to make all
+;; Emacsen look like the current trunk of Emacs.  So it will define
+;; functions "missing" in other Emacs instances, and redefine other
+;; functions to work like the Emacs trunk versions.
+
+(provide 'gnus-compat)
+
+(when (and (not (fboundp 'help-function-arglist))
+          (fboundp 'function-arglist))
+  (defun help-function-arglist (def &optional preserve-names)
+    (cdr (car (read-from-string (downcase (function-arglist def)))))))
+
+;; gnus-compat.el ends here
index 33ae74e..2ebdfb1 100644 (file)
@@ -36,6 +36,7 @@
 (require 'wid-edit)
 (require 'mm-util)
 (require 'nnheader)
+(require 'gnus-compat)
 
 ;; These are defined afterwards with gnus-define-group-parameter
 (defvar gnus-ham-process-destinations)