Commit 90365353 authored by Chong Yidong's avatar Chong Yidong
Browse files

Revert to 2010-12-03T11:48:24Z!jan.h.d@swipnet.se.

parent e5bd1670
......@@ -62,6 +62,7 @@ SIGTYPE
SYSTEM_TYPE
** Machine specific macros, decribed in detail in src/m/template.h
EXPLICIT_SIGN_EXTEND
LOAD_AVE_CVT
LOAD_AVE_TYPE
VIRT_ADDR_VARIES
......
2010-12-03 Andreas Schwab <schwab@linux-m68k.org>
* CPP-DEFINES (EXPLICIT_SIGN_EXTEND): Remove.
2010-10-12 Glenn Morris <rgm@gnu.org>
* notes/nextstep: Move here from ../nextstep/DEV-NOTES.
......
This diff is collapsed.
2010-12-03 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el: Rearrange code to allow macros to be autoloaded by
gnus-sum.el.
(nnir-retrieve-headers-override-function): Make this variable
customizable.
(nnir-retrieve-headers): Remove obsolete subject-mangling code.
* gnus-sum.el (nnir-article-group,nnir-article-rsv): Autoload macros
from nnir.el.
2010-12-03 Julien Danjou <julien@danjou.info>
* gnus-demon.el (gnus-demon-init): Fix time computing when time is nil.
2010-12-03 Katsumi Yamaoka <yamaoka@jpl.org>
 
* gnus-util.el (gnus-macroexpand-all): Don't modify argument;
......
......@@ -121,7 +121,7 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
;; If t, replace by 1
(time (cond ((eq time t)
gnus-demon-timestep)
((null time) nil)
((null time))
(t (* time gnus-demon-timestep))))
(timer
(cond
......
......@@ -60,8 +60,6 @@
(autoload 'gnus-article-outlook-unwrap-lines "deuglify" nil t)
(autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t)
(autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t)
(autoload 'nnir-article-rsv "nnir" nil nil 'macro)
(autoload 'nnir-article-group "nnir" nil nil 'macro)
(defcustom gnus-kill-summary-on-exit t
"*If non-nil, kill the summary buffer when you exit from it.
......
......@@ -163,9 +163,7 @@
;; `nnir-engines'. Then, users can choose the backend by setting
;; `nnir-search-engine' as a server variable.
;;; Code:
;;; Setup:
;;; Setup Code:
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
......@@ -173,117 +171,12 @@
(require 'nnoo)
(require 'gnus-group)
(require 'gnus-sum)
(require 'message)
(require 'gnus-util)
(eval-when-compile
(require 'cl))
;;; Internal Variables:
(defvar nnir-current-query nil
"Internal: stores current query (= group name).")
(defvar nnir-current-server nil
"Internal: stores current server (does it ever change?).")
(defvar nnir-current-group-marked nil
"Internal: stores current list of process-marked groups.")
(defvar nnir-artlist nil
"Internal: stores search result.")
(defvar nnir-tmp-buffer " *nnir*"
"Internal: temporary buffer.")
(defvar nnir-search-history ()
"Internal: the history for querying search options in nnir")
(defvar nnir-extra-parms nil
"Internal: stores request for extra search parms")
;; Imap variables
(defvar nnir-imap-search-arguments
'(("Whole message" . "TEXT")
("Subject" . "SUBJECT")
("To" . "TO")
("From" . "FROM")
("Imap" . ""))
"Mapping from user readable keys to IMAP search items for use in nnir")
(defvar nnir-imap-search-other "HEADER %S"
"The IMAP search item to use for anything other than
`nnir-imap-search-arguments'. By default this is the name of an
email header field")
(defvar nnir-imap-search-argument-history ()
"The history for querying search options in nnir")
;;; Helper macros
;; Data type article list.
(defmacro nnir-artlist-length (artlist)
"Returns number of articles in artlist."
`(length ,artlist))
(defmacro nnir-artlist-article (artlist n)
"Returns from ARTLIST the Nth artitem (counting starting at 1)."
`(when (> ,n 0)
(elt ,artlist (1- ,n))))
(defmacro nnir-artitem-group (artitem)
"Returns the group from the ARTITEM."
`(elt ,artitem 0))
(defmacro nnir-artitem-number (artitem)
"Returns the number from the ARTITEM."
`(elt ,artitem 1))
(defmacro nnir-artitem-rsv (artitem)
"Returns the Retrieval Status Value (RSV, score) from the ARTITEM."
`(elt ,artitem 2))
(defmacro nnir-article-group (article)
"Returns the group for ARTICLE"
`(nnir-artitem-group (nnir-artlist-article nnir-artlist ,article)))
(defmacro nnir-article-number (article)
"Returns the number for ARTICLE"
`(nnir-artitem-number (nnir-artlist-article nnir-artlist ,article)))
(defmacro nnir-article-rsv (article)
"Returns the rsv for ARTICLE"
`(nnir-artitem-rsv (nnir-artlist-article nnir-artlist ,article)))
(defsubst nnir-article-ids (article)
"Returns the pair `(nnir id . real id)' of ARTICLE"
(cons article (nnir-article-number article)))
(defmacro nnir-categorize (sequence keyfunc &optional valuefunc)
"Sorts a sequence into categories and returns a list of the form
`((key1 (element11 element12)) (key2 (element21 element22))'.
The category key for a member of the sequence is obtained
as `(keyfunc member)' and the corresponding element is just
`member'. If `valuefunc' is non-nil, the element of the list
is `(valuefunc member)'."
`(unless (null ,sequence)
(let (value)
(mapcar
(lambda (member)
(let ((y (,keyfunc member))
(x ,(if valuefunc
`(,valuefunc member)
'member)))
(if (assoc y value)
(push x (cadr (assoc y value)))
(push (list y (list x)) value))))
,sequence)
value)))
;;; Finish setup:
(require 'gnus-sum)
(eval-when-compile
(autoload 'nnimap-buffer "nnimap")
......@@ -330,17 +223,6 @@ If nil this will use `gnus-summary-line-format'."
:type '(regexp)
:group 'nnir)
(defcustom nnir-retrieve-headers-override-function nil
"*If non-nil, a function that accepts an article list and group
and populates the `nntp-server-buffer' with the retrieved
headers. Must return either 'nov or 'headers indicating the
retrieved header format.
If this variable is nil, or if the provided function returns nil for a search
result, `gnus-retrieve-headers' will be called instead."
:type '(function)
:group 'nnir)
(defcustom nnir-imap-default-search-key "Whole message"
"*The default IMAP search key for an nnir search. Must be one of
the keys in `nnir-imap-search-arguments'. To use raw imap queries
......@@ -503,6 +385,24 @@ arrive at the correct group name, \"mail.misc\"."
:type '(directory)
:group 'nnir)
;; Imap variables
(defvar nnir-imap-search-arguments
'(("Whole message" . "TEXT")
("Subject" . "SUBJECT")
("To" . "TO")
("From" . "FROM")
("Imap" . ""))
"Mapping from user readable keys to IMAP search items for use in nnir")
(defvar nnir-imap-search-other "HEADER %S"
"The IMAP search item to use for anything other than
`nnir-imap-search-arguments'. By default this is the name of an
email header field")
(defvar nnir-imap-search-argument-history ()
"The history for querying search options in nnir")
;;; Developer Extension Variable:
(defvar nnir-engines
......@@ -544,6 +444,101 @@ needs the variables `nnir-namazu-program',
Add an entry here when adding a new search engine.")
(defvar nnir-retrieve-headers-override-function nil
"If non-nil, a function that accepts an article list and group
and populates the `nntp-server-buffer' with the retrieved
headers. Must return either 'nov or 'headers indicating the
retrieved header format.
If this variable is nil, or if the provided function returns nil for a search
result, `gnus-retrieve-headers' will be called instead.")
;;; Internal Variables:
(defvar nnir-current-query nil
"Internal: stores current query (= group name).")
(defvar nnir-current-server nil
"Internal: stores current server (does it ever change?).")
(defvar nnir-current-group-marked nil
"Internal: stores current list of process-marked groups.")
(defvar nnir-artlist nil
"Internal: stores search result.")
(defvar nnir-tmp-buffer " *nnir*"
"Internal: temporary buffer.")
(defvar nnir-search-history ()
"Internal: the history for querying search options in nnir")
(defvar nnir-extra-parms nil
"Internal: stores request for extra search parms")
;;; Code:
;;; Helper macros
;; Data type article list.
(defmacro nnir-artlist-length (artlist)
"Returns number of articles in artlist."
`(length ,artlist))
(defmacro nnir-artlist-article (artlist n)
"Returns from ARTLIST the Nth artitem (counting starting at 1)."
`(when (> ,n 0)
(elt ,artlist (1- ,n))))
(defmacro nnir-artitem-group (artitem)
"Returns the group from the ARTITEM."
`(elt ,artitem 0))
(defmacro nnir-artitem-number (artitem)
"Returns the number from the ARTITEM."
`(elt ,artitem 1))
(defmacro nnir-artitem-rsv (artitem)
"Returns the Retrieval Status Value (RSV, score) from the ARTITEM."
`(elt ,artitem 2))
(defmacro nnir-article-group (article)
"Returns the group for ARTICLE"
`(nnir-artitem-group (nnir-artlist-article nnir-artlist ,article)))
(defmacro nnir-article-number (article)
"Returns the number for ARTICLE"
`(nnir-artitem-number (nnir-artlist-article nnir-artlist ,article)))
(defmacro nnir-article-rsv (article)
"Returns the rsv for ARTICLE"
`(nnir-artitem-rsv (nnir-artlist-article nnir-artlist ,article)))
(defsubst nnir-article-ids (article)
"Returns the pair `(nnir id . real id)' of ARTICLE"
(cons article (nnir-article-number article)))
(defmacro nnir-categorize (sequence keyfunc &optional valuefunc)
"Sorts a sequence into categories and returns a list of the form
`((key1 (element11 element12)) (key2 (element21 element22))'.
The category key for a member of the sequence is obtained
as `(keyfunc member)' and the corresponding element is just
`member'. If `valuefunc' is non-nil, the element of the list
is `(valuefunc member)'."
`(unless (null ,sequence)
(let (value)
(mapcar
(lambda (member)
(let ((y (,keyfunc member))
(x ,(if valuefunc
`(,valuefunc member)
'member)))
(if (assoc y value)
(push x (cadr (assoc y value)))
(push (list y (list x)) value))))
,sequence)
value)))
;; Gnus glue.
......@@ -638,6 +633,11 @@ Add an entry here when adding a new search engine.")
(art (car (rassoc artno articleids))))
(when art
(mail-header-set-number novitem art)
;; (mail-header-set-subject
;; novitem
;; (format "[%d: %s/%d] %s"
;; (nnir-article-rsv art) artgroup artno
;; (mail-header-subject novitem)))
(push novitem headers))
(forward-line 1)))))
(setq headers
......
2010-12-03 Andreas Schwab <schwab@linux-m68k.org>
* lisp.h (union Lisp_Object): Explicitly declare signedness of
bit-field.
(XINT): Remove variant for EXPLICIT_SIGN_EXTEND.
* m/alpha.h (EXPLICIT_SIGN_EXTEND): Don't define.
* m/amdx86-64.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/ia64.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/ibms390.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/ibms390x.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/iris4d.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/m68k.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/sparc.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/template.h (EXPLICIT_SIGN_EXTEND): Likewise.
* m/hp800.h: Remove file.
* m/mips.h: Remove file.
2010-12-03 Jan Djärv <jan.h.d@swipnet.se>
 
* nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background
......
......@@ -267,9 +267,7 @@ union Lisp_Object
struct
{
/* Use explict signed, the signedness of a bit-field of type
int is implementation defined. */
signed EMACS_INT val : VALBITS;
EMACS_INT val : VALBITS;
enum Lisp_Type type : GCTYPEBITS;
} s;
struct
......@@ -292,9 +290,7 @@ union Lisp_Object
struct
{
enum Lisp_Type type : GCTYPEBITS;
/* Use explict signed, the signedness of a bit-field of type
int is implementation defined. */
signed EMACS_INT val : VALBITS;
EMACS_INT val : VALBITS;
} s;
struct
{
......@@ -451,8 +447,20 @@ enum pvec_type
#endif
#define XHASH(a) ((a).i)
#define XTYPE(a) ((enum Lisp_Type) (a).u.type)
#ifdef EXPLICIT_SIGN_EXTEND
/* Make sure we sign-extend; compilers have been known to fail to do so.
We additionally cast to EMACS_INT since it seems that some compilers
have been known to fail to do so, even though the bitfield is declared
as EMACS_INT already. */
#define XINT(a) ((((EMACS_INT) (a).s.val) << (BITS_PER_EMACS_INT - VALBITS)) \
>> (BITS_PER_EMACS_INT - VALBITS))
#else
#define XINT(a) ((a).s.val)
#endif /* EXPLICIT_SIGN_EXTEND */
#define XUINT(a) ((a).u.val)
#ifdef USE_LSB_TAG
......
......@@ -30,6 +30,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* __alpha defined automatically */
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
......
......@@ -31,6 +31,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define EMACS_INT long
#define EMACS_UINT unsigned long
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
......
/* machine description file for hp9000 series 800 machines.
Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010 Free Software Foundation, Inc.
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/>. */
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c
(do not change this comment) */
......@@ -31,6 +31,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define EMACS_INT long
#define EMACS_UINT unsigned long
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
......
......@@ -19,6 +19,13 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
......
......@@ -27,6 +27,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define EMACS_INT long
#define EMACS_UINT unsigned long
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#undef EXPLICIT_SIGN_EXTEND
/* On the 64 bit architecture, we can use 60 bits for addresses */
#define VALBITS 60
......
......@@ -19,6 +19,13 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
the value field of a LISP_OBJECT). */
......
......@@ -24,6 +24,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define m68k
#endif
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
#ifdef GNU_LINUX
#ifdef __ELF__
#define DATA_SEG_BITS 0x80000000
......
/* m- file for Mips machines.
Copyright (C) 1987, 1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010 Free Software Foundation, Inc.
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/>. */
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee
(do not change this comment) */
......@@ -20,6 +20,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* __sparc__ is defined by the compiler by default. */
/* XINT must explicitly sign-extend
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
......
......@@ -22,6 +22,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
does not define it automatically.
Ones defined so far include m68k and many others */
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
the 24-bit bit field into an int. In other words, if bit fields
are always unsigned.
This flag only matters if you use USE_LISP_UNION_TYPE. */
#define EXPLICIT_SIGN_EXTEND
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment