Now on revision 108607. ------------------------------------------------------------ revno: 108607 committer: Paul Eggert branch nick: trunk timestamp: Wed 2012-06-13 21:02:35 -0700 message: .gdbinit: Update to match recent lisp.h changes. diff: === modified file 'src/.gdbinit' --- src/.gdbinit 2012-06-13 13:40:48 +0000 +++ src/.gdbinit 2012-06-14 04:02:35 +0000 @@ -60,7 +60,7 @@ if gdb_use_struct set $bugfix = $bugfix.i end - set $int = gdb_use_lsb ? $bugfix >> (gdb_gctypebits - 1) : $bugfix << gdb_gctypebits) >> gdb_gctypebits + set $int = gdb_use_lsb ? $bugfix >> (gdb_gctypebits - 1) : $bugfix << (gdb_gctypebits - 1) >> (gdb_gctypebits - 1) end define xgettype @@ -1189,7 +1189,7 @@ end define xreload - set $tagmask = (((long)1 << gdb_gctypebits) - 1) + set $tagmask = ((1 << gdb_gctypebits) - 1) # The consing_since_gc business widens the 1 to EMACS_INT, # a symbol not directly visible to GDB. set $valmask = gdb_use_lsb ? ~($tagmask) : ((consing_since_gc - consing_since_gc + 1) << gdb_valbits) - 1 === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-14 02:27:39 +0000 +++ src/ChangeLog 2012-06-14 04:02:35 +0000 @@ -1,5 +1,9 @@ 2012-06-14 Paul Eggert + * .gdbinit (xgetint): Fix recently-introduced paren typo. + Assume USE_2_TAGS_FOR_INTS. + (xreload): Adjust $tagmask width to match recent lisp.h change. + Simplify lisp.h in minor ways that should not affect code. * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined. (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P) ------------------------------------------------------------ revno: 108606 committer: Paul Eggert branch nick: trunk timestamp: Wed 2012-06-13 19:27:39 -0700 message: Simplify lisp.h in minor ways that should not affect code. * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined. (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P) (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number): Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined. (INTTYPEBITS): New macro, for clarity. (INTMASK, MOST_POSITIVE_FIXNUM): Use it. (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P): Simplify now that USE_LSB_TAG is always defined. (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast. (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-13 21:37:23 +0000 +++ src/ChangeLog 2012-06-14 02:27:39 +0000 @@ -1,3 +1,17 @@ +2012-06-14 Paul Eggert + + Simplify lisp.h in minor ways that should not affect code. + * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined. + (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P) + (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number): + Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined. + (INTTYPEBITS): New macro, for clarity. + (INTMASK, MOST_POSITIVE_FIXNUM): Use it. + (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P): Simplify + now that USE_LSB_TAG is always defined. + (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast. + (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler. + 2012-06-13 Juanma Barranquero * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies. === modified file 'src/lisp.h' --- src/lisp.h 2012-06-13 13:40:48 +0000 +++ src/lisp.h 2012-06-14 02:27:39 +0000 @@ -230,31 +230,18 @@ /* Define the fundamental Lisp data structures. */ -/* If USE_2_TAGBITS_FOR_INTS is defined, then Lisp integers use - 2 tags, to give them one extra bit, thus extending their range from - e.g -2^28..2^28-1 to -2^29..2^29-1. */ -#define USE_2_TAGS_FOR_INTS - /* This is the set of Lisp data types. */ -#if !defined USE_2_TAGS_FOR_INTS -# define LISP_INT_TAG Lisp_Int -# define case_Lisp_Int case Lisp_Int -# define LISP_STRING_TAG 4 -# define LISP_INT_TAG_P(x) ((x) == Lisp_Int) -#else -# define LISP_INT_TAG Lisp_Int0 -# define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 -# if USE_LSB_TAG -# define LISP_INT1_TAG 4 -# define LISP_STRING_TAG 1 -# define LISP_INT_TAG_P(x) (((x) & 3) == 0) -# else -# define LISP_INT1_TAG 1 -# define LISP_STRING_TAG 4 -# define LISP_INT_TAG_P(x) (((x) & 6) == 0) -# endif -#endif +/* Lisp integers use 2 tags, to give them one extra bit, thus + extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ +#define INTTYPEBITS (GCTYPEBITS - 1) +#define FIXNUM_BITS (VALBITS + 1) +#define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1)) +#define LISP_INT_TAG Lisp_Int0 +#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 +#define LISP_INT1_TAG (USE_LSB_TAG ? 1 << INTTYPEBITS : 1) +#define LISP_STRING_TAG (5 - LISP_INT1_TAG) +#define LISP_INT_TAG_P(x) (((x) & ~LISP_INT1_TAG) == 0) /* Stolen from GDB. The only known compiler that doesn't support enums in bitfields is MSVC. */ @@ -268,12 +255,8 @@ enum Lisp_Type { /* Integer. XINT (obj) is the integer value. */ -#ifdef USE_2_TAGS_FOR_INTS Lisp_Int0 = 0, Lisp_Int1 = LISP_INT1_TAG, -#else - Lisp_Int = 0, -#endif /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */ Lisp_Symbol = 2, @@ -416,68 +399,50 @@ XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */ /* Return a perfect hash of the Lisp_Object representation. */ -#define XHASH(a) XLI(a) +#define XHASH(a) XLI (a) #if USE_LSB_TAG -#define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1) -#define XTYPE(a) ((enum Lisp_Type) (XLI(a) & TYPEMASK)) -#ifdef USE_2_TAGS_FOR_INTS -# define XINT(a) (((EMACS_INT) XLI(a)) >> (GCTYPEBITS - 1)) -# define XUINT(a) (((EMACS_UINT) XLI(a)) >> (GCTYPEBITS - 1)) -# define make_number(N) XIL(((EMACS_INT) (N)) << (GCTYPEBITS - 1)) -#else -# define XINT(a) (((EMACS_INT) XLI(a)) >> GCTYPEBITS) -# define XUINT(a) (((EMACS_UINT) XLI(a)) >> GCTYPEBITS) -# define make_number(N) XIL(((EMACS_INT) (N)) << GCTYPEBITS) -#endif +#define TYPEMASK ((1 << GCTYPEBITS) - 1) +#define XTYPE(a) ((enum Lisp_Type) (XLI (a) & TYPEMASK)) +#define XINT(a) (XLI (a) >> INTTYPEBITS) +#define XUINT(a) ((EMACS_UINT) XLI (a) >> INTTYPEBITS) +#define make_number(N) XIL ((EMACS_INT) (N) << INTTYPEBITS) #define XSET(var, type, ptr) \ - (eassert (XTYPE (XIL((intptr_t) (ptr))) == 0), /* Check alignment. */ \ - (var) = XIL((type) | (intptr_t) (ptr))) + (eassert (XTYPE (XIL ((intptr_t) (ptr))) == 0), /* Check alignment. */ \ + (var) = XIL ((type) | (intptr_t) (ptr))) -#define XPNTR(a) ((intptr_t) (XLI(a) & ~TYPEMASK)) -#define XUNTAG(a, type) ((intptr_t) (XLI(a) - (type))) +#define XPNTR(a) ((intptr_t) (XLI (a) & ~TYPEMASK)) +#define XUNTAG(a, type) ((intptr_t) (XLI (a) - (type))) #else /* not USE_LSB_TAG */ #define VALMASK VAL_MAX -/* One need to override this if there must be high bits set in data space - (doing the result of the below & ((1 << (GCTYPE + 1)) - 1) would work - on all machines, but would penalize machines which don't need it) - */ -#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) XLI(a)) >> VALBITS)) +#define XTYPE(a) ((enum Lisp_Type) ((EMACS_UINT) XLI (a) >> VALBITS)) /* For integers known to be positive, XFASTINT provides fast retrieval and XSETFASTINT provides fast storage. This takes advantage of the - fact that Lisp_Int is 0. */ -#define XFASTINT(a) (XLI(a) + 0) -#define XSETFASTINT(a, b) ((a) = XIL(b)) + fact that Lisp integers have zero-bits in their tags. */ +#define XFASTINT(a) (XLI (a) + 0) +#define XSETFASTINT(a, b) ((a) = XIL (b)) /* Extract the value of a Lisp_Object as a (un)signed integer. */ -#ifdef USE_2_TAGS_FOR_INTS -# define XINT(a) ((((EMACS_INT) XLI(a)) << (GCTYPEBITS - 1)) >> (GCTYPEBITS - 1)) -# define XUINT(a) ((EMACS_UINT) (XLI(a) & (1 + (VALMASK << 1)))) -# define make_number(N) XIL((((EMACS_INT) (N)) & (1 + (VALMASK << 1)))) -#else -# define XINT(a) ((((EMACS_INT) XLI(a)) << (BITS_PER_EMACS_INT - VALBITS)) \ - >> (BITS_PER_EMACS_INT - VALBITS)) -# define XUINT(a) ((EMACS_UINT) (XLI(a) & VALMASK)) -# define make_number(N) \ - XIL((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) -#endif +#define XINT(a) (XLI (a) << INTTYPEBITS >> INTTYPEBITS) +#define XUINT(a) ((EMACS_UINT) (XLI (a) & INTMASK)) +#define make_number(N) XIL ((EMACS_INT) (N) & INTMASK) -#define XSET(var, type, ptr) \ - ((var) = XIL((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ +#define XSET(var, type, ptr) \ + ((var) = XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ + ((intptr_t) (ptr) & VALMASK))) #ifdef DATA_SEG_BITS /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which were stored in a Lisp_Object */ -#define XPNTR(a) ((uintptr_t) ((XLI(a) & VALMASK)) | DATA_SEG_BITS)) +#define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS)) #else -#define XPNTR(a) ((uintptr_t) (XLI(a) & VALMASK)) +#define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK)) #endif #endif /* not USE_LSB_TAG */ @@ -499,19 +464,9 @@ #define EQ(x, y) (XHASH (x) == XHASH (y)) -/* Number of bits in a fixnum, including the sign bit. */ -#ifdef USE_2_TAGS_FOR_INTS -# define FIXNUM_BITS (VALBITS + 1) -#else -# define FIXNUM_BITS VALBITS -#endif - -/* Mask indicating the significant bits of a fixnum. */ -#define INTMASK (((EMACS_INT) 1 << FIXNUM_BITS) - 1) - /* Largest and smallest representable fixnum values. These are the C values. */ -#define MOST_POSITIVE_FIXNUM (INTMASK / 2) +#define MOST_POSITIVE_FIXNUM (EMACS_INT_MAX >> INTTYPEBITS) #define MOST_NEGATIVE_FIXNUM (-1 - MOST_POSITIVE_FIXNUM) /* Value is non-zero if I doesn't fit into a Lisp fixnum. It is @@ -817,7 +772,7 @@ /* When the vector is allocated from a vector block, NBYTES is used if the vector is not on a free list, and VECTOR is used otherwise. For large vector-like objects, BUFFER or VECTOR is used as a pointer - to the next vector-like object. It is generally a buffer or a + to the next vector-like object. It is generally a buffer or a Lisp_Vector alias, so for convenience it is a union instead of a pointer: this way, one can write P->next.vector instead of ((struct Lisp_Vector *) P->next). */ ------------------------------------------------------------ revno: 108605 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2012-06-13 23:37:23 +0200 message: src/makefile.w32-in ($(BLD)/data.$(O)): Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-13 18:11:05 +0000 +++ src/ChangeLog 2012-06-13 21:37:23 +0000 @@ -1,3 +1,7 @@ +2012-06-13 Juanma Barranquero + + * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies. + 2012-06-13 Glenn Morris * s/bsd-common.h (BSD4_3): === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-05-28 01:58:42 +0000 +++ src/makefile.w32-in 2012-06-13 21:37:23 +0000 @@ -676,6 +676,7 @@ $(BLD)/data.$(O) : \ $(SRC)/data.c \ $(SRC)/buffer.h \ + $(SRC)/keymap.h \ $(SRC)/puresize.h \ $(SRC)/syssignal.h \ $(GNU_LIB)/intprops.h \ ------------------------------------------------------------ revno: 108604 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 16:52:25 -0400 message: * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't add print-func. * lisp/files.el: Require cl-lib. (file-name-non-special): Replace case -> cl-case. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 15:46:29 +0000 +++ lisp/ChangeLog 2012-06-13 20:52:25 +0000 @@ -1,5 +1,10 @@ 2012-06-13 Stefan Monnier + * files.el: Require cl-lib. + (file-name-non-special): Replace case -> cl-case. + + * emacs-lisp/cl-macs.el (cl-defstruct): Don't add print-func. + * emacs-lisp/edebug.el (edebug-read-function): Remove old incorrect mapping from #' to function*. === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2012-06-12 18:10:34 +0000 +++ lisp/emacs-lisp/cl-macs.el 2012-06-13 20:52:25 +0000 @@ -2731,14 +2731,17 @@ (if (cl--safe-expr-p `(progn ,@(mapcar #'cl-second descs))) (push (cons name t) side-eff)))) (if print-auto (nconc print-func (list '(princ ")" cl-s) t))) - (if print-func - (push `(push - ;; The auto-generated function does not pay attention to - ;; the depth argument cl-n. - (lambda (cl-x cl-s ,(if print-auto '_cl-n 'cl-n)) - (and ,pred-form ,print-func)) - cl-custom-print-functions) - forms)) + ;; Don't bother adding to cl-custom-print-functions since it's not used + ;; by anything anyway! + ;;(if print-func + ;; (push `(if (boundp 'cl-custom-print-functions) + ;; (push + ;; ;; The auto-generated function does not pay attention to + ;; ;; the depth argument cl-n. + ;; (lambda (cl-x cl-s ,(if print-auto '_cl-n 'cl-n)) + ;; (and ,pred-form ,print-func)) + ;; cl-custom-print-functions)) + ;; forms)) (push `(setq ,tag-symbol (list ',tag)) forms) (push `(cl-eval-when (compile load eval) (put ',name 'cl-struct-slots ',descs) === modified file 'lisp/files.el' --- lisp/files.el 2012-06-08 13:18:26 +0000 +++ lisp/files.el 2012-06-13 20:52:25 +0000 @@ -28,6 +28,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defvar font-lock-keywords) (defgroup backup nil @@ -6459,20 +6461,20 @@ "/" (substring (car pair) 2))))) (setq file-arg-indices (cdr file-arg-indices)))) - (case method + (cl-case method (identity (car arguments)) (add (concat "/:" (apply operation arguments))) (insert-file-contents (let ((visit (nth 1 arguments))) (prog1 - (apply operation arguments) + (apply operation arguments) (when (and visit buffer-file-name) (setq buffer-file-name (concat "/:" buffer-file-name)))))) (unquote-then-quote (let ((buffer-file-name (substring buffer-file-name 2))) (apply operation arguments))) - (t - (apply operation arguments))))) + (t + (apply operation arguments))))) ;; Symbolic modes and read-file-modes. ------------------------------------------------------------ revno: 108603 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-06-13 14:11:05 -0400 message: Remove some unused definitions from src/s * src/s/bsd-common.h (BSD4_3): * src/s/usg5-4-common.h (USG5_4): No longer define; unused. * admin/CPP-DEFINES, src/s/template.h: Related edits. diff: === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-06-13 13:40:48 +0000 +++ admin/CPP-DEFINES 2012-06-13 18:11:05 +0000 @@ -79,7 +79,6 @@ BROKEN_SIGPOLL BROKEN_SIGPTY BSD4_2 -BSD4_3 BSD_SYSTEM CLASH_DETECTION DATA_SEG_BITS @@ -238,7 +237,6 @@ USE_TOOLKIT_SCROLL_BARS USG USG5 -USG5_4 USG_SUBTTY_WORKS VALBITS WRETCODE === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-13 13:40:48 +0000 +++ src/ChangeLog 2012-06-13 18:11:05 +0000 @@ -1,3 +1,8 @@ +2012-06-13 Glenn Morris + + * s/bsd-common.h (BSD4_3): + * s/usg5-4-common.h (USG5_4): No longer define; unused. + 2012-06-13 Andreas Schwab * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct === modified file 'src/s/bsd-common.h' --- src/s/bsd-common.h 2012-06-12 17:43:09 +0000 +++ src/s/bsd-common.h 2012-06-13 18:11:05 +0000 @@ -23,9 +23,12 @@ /* We give these symbols the numeric values found in to avoid warnings about redefined macros. */ -#ifndef BSD4_3 -#define BSD4_3 1 -#endif /* BSD4_3 */ + +/* Nothing in Emacs uses this any more. + ifndef BSD4_3 + define BSD4_3 1 + endif +*/ #ifndef BSD_SYSTEM #define BSD_SYSTEM 43 === modified file 'src/s/template.h' --- src/s/template.h 2012-06-11 23:17:11 +0000 +++ src/s/template.h 2012-06-13 18:11:05 +0000 @@ -27,7 +27,6 @@ /* #define USG */ /* #define HPUX */ /* #define BSD4_2 */ -/* #define BSD4_3 */ /* #define BSD_SYSTEM */ /* Emacs can read input using SIGIO and buffering characters itself, === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2012-06-13 02:39:20 +0000 +++ src/s/usg5-4-common.h 2012-06-13 18:11:05 +0000 @@ -24,7 +24,8 @@ #define USG /* System III, System V, etc */ #define USG5 -#define USG5_4 +/* Nothing in Emacs use this any more. */ +/* #define USG5_4 */ /* setjmp and longjmp can safely replace _setjmp and _longjmp, but they will run slower. */ ------------------------------------------------------------ revno: 108602 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2012-06-13 18:25:03 +0200 message: lisp/url/url-handlers.el (url-handler-regexp): Declare. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-06-12 10:00:53 +0000 +++ lisp/url/ChangeLog 2012-06-13 16:25:03 +0000 @@ -1,3 +1,7 @@ +2012-06-13 Juanma Barranquero + + * url-handlers.el (url-handler-regexp): Declare. + 2012-06-12 Chong Yidong * url-handlers.el: Re-order file to avoid recursive load. === modified file 'lisp/url/url-handlers.el' --- lisp/url/url-handlers.el 2012-06-12 10:00:53 +0000 +++ lisp/url/url-handlers.el 2012-06-13 16:25:03 +0000 @@ -90,6 +90,8 @@ ;; verify-visited-file-modtime ;; write-region +(defvar url-handler-regexp) ; defined below to avoid recursive load (revno:108572) + ;;;###autoload (define-minor-mode url-handler-mode "Toggle using `url' library for URL filenames (URL Handler mode). ------------------------------------------------------------ revno: 108601 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 11:46:29 -0400 message: * lisp/emacs-lisp/edebug.el (edebug-read-function): Remove old incorrect mapping from #' to function*. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 15:28:10 +0000 +++ lisp/ChangeLog 2012-06-13 15:46:29 +0000 @@ -1,3 +1,8 @@ +2012-06-13 Stefan Monnier + + * emacs-lisp/edebug.el (edebug-read-function): Remove old incorrect + mapping from #' to function*. + 2012-06-13 Chong Yidong * mouse.el (mouse-drag-track): Do not set the mark if the user === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2012-06-12 05:47:14 +0000 +++ lisp/emacs-lisp/edebug.el 2012-06-13 15:46:29 +0000 @@ -919,8 +919,7 @@ (cond ((eq ?\' (following-char)) (forward-char 1) (list - (edebug-storing-offsets (- (point) 2) - (if (featurep 'cl) 'function* 'function)) + (edebug-storing-offsets (- (point) 2) 'function) (edebug-read-storing-offsets stream))) ((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?0)) ------------------------------------------------------------ revno: 108600 fixes bug(s): http://debbugs.gnu.org/11588 committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-06-13 23:28:10 +0800 message: Do not set mark on single mouse-1 clicks. * mouse.el (mouse-drag-track): Do not set the mark if the user releases the mouse without selecting anything. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 13:56:57 +0000 +++ lisp/ChangeLog 2012-06-13 15:28:10 +0000 @@ -1,3 +1,8 @@ +2012-06-13 Chong Yidong + + * mouse.el (mouse-drag-track): Do not set the mark if the user + releases the mouse without selecting anything (Bug#11588). + 2012-06-13 Stefan Monnier * textmodes/tex-mode.el (latex-indent): Recognize tex-verbatim at EOB === modified file 'lisp/mouse.el' --- lisp/mouse.el 2012-05-04 23:16:47 +0000 +++ lisp/mouse.el 2012-06-13 15:28:10 +0000 @@ -805,7 +805,7 @@ ;; when setting point near the right fringe (but see below). (auto-hscroll-mode-saved auto-hscroll-mode) (auto-hscroll-mode nil) - event end end-point) + moved-off-start event end end-point) (setq mouse-selection-click-count click-count) ;; In case the down click is in the middle of some intangible text, @@ -840,6 +840,9 @@ (redisplay)) (setq end (event-end event) end-point (posn-point end)) + ;; Note whether the mouse has left the starting position. + (unless (eq end-point start-point) + (setq moved-off-start t)) (if (and (eq (posn-window end) start-window) (integer-or-marker-p end-point)) (mouse--drag-set-mark-and-point start-point @@ -880,11 +883,11 @@ (let (deactivate-mark) (copy-region-as-kill (mark) (point))))) - ;; If point hasn't moved, run the binding of the - ;; terminating up-event. - (if do-multi-click - (goto-char start-point) - (deactivate-mark)) + ;; Otherwise, run binding of terminating up-event. + (cond + (do-multi-click (goto-char start-point)) + (moved-off-start (deactivate-mark)) + (t (pop-mark))) (when (and (functionp fun) (= start-hscroll (window-hscroll start-window)) ;; Don't run the up-event handler if the window ------------------------------------------------------------ revno: 108599 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11646 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 09:56:57 -0400 message: * lisp/textmodes/tex-mode.el (latex-indent): Recognize tex-verbatim at EOB. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 13:18:59 +0000 +++ lisp/ChangeLog 2012-06-13 13:56:57 +0000 @@ -1,5 +1,8 @@ 2012-06-13 Stefan Monnier + * textmodes/tex-mode.el (latex-indent): Recognize tex-verbatim at EOB + as well (bug#11646). + * loadup.el: Count byte-code functions as well. * emacs-lisp/byte-opt.el (featurep): Move compiler-macro... === modified file 'lisp/textmodes/tex-mode.el' --- lisp/textmodes/tex-mode.el 2012-04-16 23:57:09 +0000 +++ lisp/textmodes/tex-mode.el 2012-06-13 13:56:57 +0000 @@ -2686,7 +2686,9 @@ "Syntax table used while computing indentation.") (defun latex-indent (&optional arg) - (if (and (eq (get-text-property (line-beginning-position) 'face) + (if (and (eq (get-text-property (if (and (eobp) (bolp)) + (max (point-min) (1- (point))) + (line-beginning-position)) 'face) 'tex-verbatim)) 'noindent (with-syntax-table tex-latex-indent-syntax-table ------------------------------------------------------------ revno: 108598 committer: Andreas Schwab branch nick: emacs timestamp: Wed 2012-06-13 15:40:48 +0200 message: Use a simple struct to implement compile time checks for the Lisp_Object type * configure.in: Rename --enable-use-lisp-union-type to --enable-check-lisp-object-type and define CHECK_LISP_OBJECT_TYPE instead of USE_LISP_UNION_TYPE. * admin/make-emacs: Rename --union-type to --check-lisp-type. Define CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE. * admin/CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from USE_LISP_UNION_TYPE. * src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct instead of union. (XLI, XIL): Define. (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use them. * src/emacs.c (gdb_use_struct): Renamed from gdb_use_union. * src/.gdbinit: Check gdb_use_struct instead of gdb_use_union. * src/alloc.c (widen_to_Lisp_Object): Removed. (mark_memory): Use XIL instead of widen_to_Lisp_Object. * src/frame.c (delete_frame): Remove outdated comment. * src/w32fns.c (Fw32_register_hot_key): Use XLI instead of checking USE_LISP_UNION_TYPE. (Fw32_unregister_hot_key): Likewise. (Fw32_toggle_lock_key): Likewise. * src/w32menu.c (add_menu_item): Likewise. (w32_menu_display_help): Use XIL instead of checking USE_LISP_UNION_TYPE. * src/w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE. (init_heap): Likewise. * src/w32term.c (w32_read_socket): Update comment. diff: === modified file 'ChangeLog' --- ChangeLog 2012-06-12 19:03:32 +0000 +++ ChangeLog 2012-06-13 13:40:48 +0000 @@ -1,3 +1,9 @@ +2012-06-13 Andreas Schwab + + * configure.in: Rename --enable-use-lisp-union-type to + --enable-check-lisp-object-type and define CHECK_LISP_OBJECT_TYPE + instead of USE_LISP_UNION_TYPE. + 2012-06-12 Glenn Morris * configure.in (HAVE_PROCFS, _STRUCTURED_PROC): New AC_DEFINEs. === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-06-13 02:39:20 +0000 +++ admin/CPP-DEFINES 2012-06-13 13:40:48 +0000 @@ -46,7 +46,7 @@ REL_ALLOC Compile in the relocatable memory allocator ralloc.c. SYSTEM_MALLOC Use the system library's malloc. subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it. -USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int. +DEBUG_LISP_OBJECT_TYPE Define it in lisp.h enable compile time checks on Lisp_Object use. ** System specific macros, described in detail in src/s/template.h CLASH_DETECTION === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-06-10 13:20:58 +0000 +++ admin/ChangeLog 2012-06-13 13:40:48 +0000 @@ -1,3 +1,10 @@ +2012-06-13 Andreas Schwab + + * make-emacs: Rename --union-type to --check-lisp-type. Define + CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE. + * CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from + USE_LISP_UNION_TYPE. + 2012-06-03 Glenn Morris * quick-install-emacs (PUBLIC_LIBSRC_SCRIPTS): Remove rcs-checkin. === modified file 'admin/make-emacs' --- admin/make-emacs 2012-01-19 07:21:25 +0000 +++ admin/make-emacs 2012-06-13 13:40:48 +0000 @@ -42,7 +42,7 @@ "check-marked" => \$check_marked, "all" => \$all, "no-optim" => \$no_optim, - "union-type" => \$union_type, + "check-lisp-type" => \$check_lisp_type, "gprof" => \$profile, "malloc-check" => \$malloc_check, "no-mcheck" => \$no_mcheck, @@ -70,7 +70,7 @@ --check-marked GC_CHECK_MARKED_OBJECTS=1 --optim no debug defines --gprof make Emacs for profiling - --union-type define USE_LISP_UNION_TYPE (bad for GDB) + --check-lisp-type define CHECK_LISP_OBJECT_TYPE --malloc-check define GC_MALLOC_CHECK --no-mcheck don't define GC_MCHECK --wall compile with -Wall @@ -140,7 +140,7 @@ } } -$defs = "$defs -DUSE_LISP_UNION_TYPE" if $union_type; +$defs = "$defs -DCHECK_LISP_OBJECT_TYPE" if $check_lisp_type; $defs = "$defs -DGC_MALLOC_CHECK=1 -DGC_PROTECT_MALLOC_STATE=1" if $malloc_check; $defs = "$defs -DGC_MCHECK=1" unless $no_mcheck; === modified file 'configure.in' --- configure.in 2012-06-12 19:15:47 +0000 +++ configure.in 2012-06-13 13:40:48 +0000 @@ -309,13 +309,13 @@ [Define this to check for errors in cons list.]) fi -AC_ARG_ENABLE(use-lisp-union-type, -[AS_HELP_STRING([--enable-use-lisp-union-type], - [use a union for the Lisp_Object data type. - This is only useful for development for catching certain types of bugs.])], +AC_ARG_ENABLE(check-lisp-object-type, +[AS_HELP_STRING([--enable-check-lisp-object-type], + [enable compile time checks for the Lisp_Object data type. + This is useful for development for catching certain types of bugs.])], if test "${enableval}" != "no"; then - AC_DEFINE(USE_LISP_UNION_TYPE, 1, - [Define this to use a lisp union for the Lisp_Object data type.]) + AC_DEFINE(CHECK_LISP_OBJECT_TYPE, 1, + [Define this to enable compile time checks for the Lisp_Object data type.]) fi) === modified file 'etc/NEWS' --- etc/NEWS 2012-06-13 07:33:38 +0000 +++ etc/NEWS 2012-06-13 13:40:48 +0000 @@ -49,6 +49,11 @@ (from the bin and libexec directories, respectively). The former is no longer relevant, the latter is replaced by lisp (in vc-sccs.el). +** The configuration option '--enable-use-lisp-union-type' has been +renamed to '--enable-check-lisp-object-type', as the resulting +Lisp_Object type no longer uses a union to implement the compile time +check that this option enables. + * Startup Changes in Emacs 24.2 === modified file 'src/.gdbinit' --- src/.gdbinit 2012-05-01 00:07:23 +0000 +++ src/.gdbinit 2012-06-13 13:40:48 +0000 @@ -49,17 +49,26 @@ # Using a constant runs into GDB bugs sometimes. define xgetptr set $bugfix = $arg0 - set $ptr = (gdb_use_union ? (gdb_use_lsb ? $bugfix.u.val << gdb_gctypebits : $bugfix.u.val) : $bugfix & $valmask) | gdb_data_seg_bits + if gdb_use_struct + set $bugfix = $bugfix.i + end + set $ptr = $bugfix & $valmask | gdb_data_seg_bits end define xgetint set $bugfix = $arg0 - set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix >> (gdb_gctypebits - 1) : $bugfix << gdb_gctypebits) >> gdb_gctypebits + if gdb_use_struct + set $bugfix = $bugfix.i + end + set $int = gdb_use_lsb ? $bugfix >> (gdb_gctypebits - 1) : $bugfix << gdb_gctypebits) >> gdb_gctypebits end define xgettype set $bugfix = $arg0 - set $type = gdb_use_union ? $bugfix.s.type : (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits) + if gdb_use_struct + set $bugfix = $bugfix.i + end + set $type = (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits) end # Set up something to print out s-expressions. @@ -949,15 +958,8 @@ define xpr xtype - if gdb_use_union - if $type == Lisp_Int - xint - end - end - if !gdb_use_union - if $type == Lisp_Int0 || $type == Lisp_Int1 - xint - end + if $type == Lisp_Int0 || $type == Lisp_Int1 + xint end if $type == Lisp_Symbol xsymbol === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-13 02:39:20 +0000 +++ src/ChangeLog 2012-06-13 13:40:48 +0000 @@ -1,3 +1,26 @@ +2012-06-13 Andreas Schwab + + * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct + instead of union. + (XLI, XIL): Define. + (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use + them. + * emacs.c (gdb_use_struct): Renamed from gdb_use_union. + * .gdbinit: Check gdb_use_struct instead of gdb_use_union. + * alloc.c (widen_to_Lisp_Object): Removed. + (mark_memory): Use XIL instead of widen_to_Lisp_Object. + * frame.c (delete_frame): Remove outdated comment. + * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking + USE_LISP_UNION_TYPE. + (Fw32_unregister_hot_key): Likewise. + (Fw32_toggle_lock_key): Likewise. + * w32menu.c (add_menu_item): Likewise. + (w32_menu_display_help): Use XIL instead of checking + USE_LISP_UNION_TYPE. + * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE. + (init_heap): Likewise. + * w32term.c (w32_read_socket): Update comment. + 2012-06-13 Glenn Morris * s/usg5-4-common.h, src/s/unixware.h: === modified file 'src/alloc.c' --- src/alloc.c 2012-06-13 00:26:40 +0000 +++ src/alloc.c 2012-06-13 13:40:48 +0000 @@ -1585,21 +1585,6 @@ (i) = balance_intervals (i); \ } while (0) -/* Convert the pointer-sized word P to EMACS_INT while preserving its - type and ptr fields. */ -static Lisp_Object -widen_to_Lisp_Object (void *p) -{ - intptr_t i = (intptr_t) p; -#ifdef USE_LISP_UNION_TYPE - Lisp_Object obj; - obj.i = i; - return obj; -#else - return i; -#endif -} - /*********************************************************************** String Allocation ***********************************************************************/ @@ -4678,7 +4663,7 @@ void *p = *(void **) ((char *) pp + i); mark_maybe_pointer (p); if (POINTERS_MIGHT_HIDE_IN_OBJECTS) - mark_maybe_object (widen_to_Lisp_Object (p)); + mark_maybe_object (XIL ((intptr_t) p)); } } === modified file 'src/emacs.c' --- src/emacs.c 2012-06-13 00:26:40 +0000 +++ src/emacs.c 2012-06-13 13:40:48 +0000 @@ -109,10 +109,10 @@ #else int gdb_use_lsb EXTERNALLY_VISIBLE = 0; #endif -#ifndef USE_LISP_UNION_TYPE -int gdb_use_union EXTERNALLY_VISIBLE = 0; +#ifndef CHECK_LISP_OBJECT_TYPE +int gdb_use_struct EXTERNALLY_VISIBLE = 0; #else -int gdb_use_union EXTERNALLY_VISIBLE = 1; +int gdb_use_struct EXTERNALLY_VISIBLE = 1; #endif int gdb_valbits EXTERNALLY_VISIBLE = VALBITS; int gdb_gctypebits EXTERNALLY_VISIBLE = GCTYPEBITS; === modified file 'src/frame.c' --- src/frame.c 2012-06-01 03:41:03 +0000 +++ src/frame.c 2012-06-13 13:40:48 +0000 @@ -1152,10 +1152,6 @@ described for Fdelete_frame. */ Lisp_Object delete_frame (Lisp_Object frame, Lisp_Object force) - /* If we use `register' here, gcc-4.0.2 on amd64 using - -DUSE_LISP_UNION_TYPE complains further down that we're getting the - address of `force'. Go figure. */ - { struct frame *f; struct frame *sf = SELECTED_FRAME (); === modified file 'src/lisp.h' --- src/lisp.h 2012-06-13 00:26:40 +0000 +++ src/lisp.h 2012-06-13 13:40:48 +0000 @@ -149,14 +149,12 @@ #endif #endif /* ENABLE_CHECKING */ -/* Use the configure flag --enable-use-lisp-union-type to make - Lisp_Object use a union type instead of the default int. The flag - causes USE_LISP_UNION_TYPE to be defined. */ +/* Use the configure flag --enable-check-lisp-object-type to make + Lisp_Object use a struct type instead of the default int. The flag + causes CHECK_LISP_OBJECT_TYPE to be defined. */ /***** Select the tagging scheme. *****/ -/* There are basically two options that control the tagging scheme: - - USE_LISP_UNION_TYPE says that Lisp_Object should be a union instead - of an integer. +/* The following option controls the tagging scheme: - USE_LSB_TAG means that we can assume the least 3 bits of pointers are always 0, and we can thus use them to hold tag bits, without restricting our addressing space. @@ -237,11 +235,6 @@ e.g -2^28..2^28-1 to -2^29..2^29-1. */ #define USE_2_TAGS_FOR_INTS -/* Making it work for the union case is too much trouble. */ -#ifdef USE_LISP_UNION_TYPE -# undef USE_2_TAGS_FOR_INTS -#endif - /* This is the set of Lisp data types. */ #if !defined USE_2_TAGS_FOR_INTS @@ -335,29 +328,17 @@ Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ }; -#ifdef USE_LISP_UNION_TYPE - -typedef -union Lisp_Object - { - /* Used for comparing two Lisp_Objects; - also, positive integers can be accessed fast this way. */ - EMACS_INT i; - - struct - { - /* Use explicit signed, the signedness of a bit-field of type - int is implementation defined. */ - signed EMACS_INT val : VALBITS; - ENUM_BF (Lisp_Type) type : GCTYPEBITS; - } s; - struct - { - EMACS_UINT val : VALBITS; - ENUM_BF (Lisp_Type) type : GCTYPEBITS; - } u; - } -Lisp_Object; +#ifdef CHECK_LISP_OBJECT_TYPE + +typedef struct { EMACS_INT i; } Lisp_Object; + +#define XLI(o) (o).i +static inline Lisp_Object +XIL (EMACS_INT i) +{ + Lisp_Object o = { i }; + return o; +} static inline Lisp_Object LISP_MAKE_RVALUE (Lisp_Object o) @@ -367,14 +348,16 @@ #define LISP_INITIALLY_ZERO {0} -#else /* USE_LISP_UNION_TYPE */ +#else /* CHECK_LISP_OBJECT_TYPE */ -/* If union type is not wanted, define Lisp_Object as just a number. */ +/* If a struct type is not wanted, define Lisp_Object as just a number. */ typedef EMACS_INT Lisp_Object; +#define XLI(o) (o) +#define XIL(i) (i) #define LISP_MAKE_RVALUE(o) (0+(o)) #define LISP_INITIALLY_ZERO 0 -#endif /* USE_LISP_UNION_TYPE */ +#endif /* CHECK_LISP_OBJECT_TYPE */ /* In the size word of a vector, this bit means the vector has been marked. */ @@ -432,30 +415,28 @@ For example, if tem is a Lisp_Object whose type is Lisp_Cons, XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */ -#ifndef USE_LISP_UNION_TYPE - /* Return a perfect hash of the Lisp_Object representation. */ -#define XHASH(a) (a) +#define XHASH(a) XLI(a) #if USE_LSB_TAG #define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1) -#define XTYPE(a) ((enum Lisp_Type) ((a) & TYPEMASK)) +#define XTYPE(a) ((enum Lisp_Type) (XLI(a) & TYPEMASK)) #ifdef USE_2_TAGS_FOR_INTS -# define XINT(a) (((EMACS_INT) (a)) >> (GCTYPEBITS - 1)) -# define XUINT(a) (((EMACS_UINT) (a)) >> (GCTYPEBITS - 1)) -# define make_number(N) (((EMACS_INT) (N)) << (GCTYPEBITS - 1)) +# define XINT(a) (((EMACS_INT) XLI(a)) >> (GCTYPEBITS - 1)) +# define XUINT(a) (((EMACS_UINT) XLI(a)) >> (GCTYPEBITS - 1)) +# define make_number(N) XIL(((EMACS_INT) (N)) << (GCTYPEBITS - 1)) #else -# define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS) -# define XUINT(a) (((EMACS_UINT) (a)) >> GCTYPEBITS) -# define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS) +# define XINT(a) (((EMACS_INT) XLI(a)) >> GCTYPEBITS) +# define XUINT(a) (((EMACS_UINT) XLI(a)) >> GCTYPEBITS) +# define make_number(N) XIL(((EMACS_INT) (N)) << GCTYPEBITS) #endif -#define XSET(var, type, ptr) \ - (eassert (XTYPE ((intptr_t) (ptr)) == 0), /* Check alignment. */ \ - (var) = (type) | (intptr_t) (ptr)) +#define XSET(var, type, ptr) \ + (eassert (XTYPE (XIL((intptr_t) (ptr))) == 0), /* Check alignment. */ \ + (var) = XIL((type) | (intptr_t) (ptr))) -#define XPNTR(a) ((intptr_t) ((a) & ~TYPEMASK)) -#define XUNTAG(a, type) ((intptr_t) ((a) - (type))) +#define XPNTR(a) ((intptr_t) (XLI(a) & ~TYPEMASK)) +#define XUNTAG(a, type) ((intptr_t) (XLI(a) - (type))) #else /* not USE_LSB_TAG */ @@ -465,91 +446,42 @@ (doing the result of the below & ((1 << (GCTYPE + 1)) - 1) would work on all machines, but would penalize machines which don't need it) */ -#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) >> VALBITS)) +#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) XLI(a)) >> VALBITS)) /* For integers known to be positive, XFASTINT provides fast retrieval and XSETFASTINT provides fast storage. This takes advantage of the fact that Lisp_Int is 0. */ -#define XFASTINT(a) ((a) + 0) -#define XSETFASTINT(a, b) ((a) = (b)) +#define XFASTINT(a) (XLI(a) + 0) +#define XSETFASTINT(a, b) ((a) = XIL(b)) /* Extract the value of a Lisp_Object as a (un)signed integer. */ #ifdef USE_2_TAGS_FOR_INTS -# define XINT(a) ((((EMACS_INT) (a)) << (GCTYPEBITS - 1)) >> (GCTYPEBITS - 1)) -# define XUINT(a) ((EMACS_UINT) ((a) & (1 + (VALMASK << 1)))) -# define make_number(N) ((((EMACS_INT) (N)) & (1 + (VALMASK << 1)))) +# define XINT(a) ((((EMACS_INT) XLI(a)) << (GCTYPEBITS - 1)) >> (GCTYPEBITS - 1)) +# define XUINT(a) ((EMACS_UINT) (XLI(a) & (1 + (VALMASK << 1)))) +# define make_number(N) XIL((((EMACS_INT) (N)) & (1 + (VALMASK << 1)))) #else -# define XINT(a) ((((EMACS_INT) (a)) << (BITS_PER_EMACS_INT - VALBITS)) \ - >> (BITS_PER_EMACS_INT - VALBITS)) -# define XUINT(a) ((EMACS_UINT) ((a) & VALMASK)) +# define XINT(a) ((((EMACS_INT) XLI(a)) << (BITS_PER_EMACS_INT - VALBITS)) \ + >> (BITS_PER_EMACS_INT - VALBITS)) +# define XUINT(a) ((EMACS_UINT) (XLI(a) & VALMASK)) # define make_number(N) \ - ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) + XIL((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) #endif #define XSET(var, type, ptr) \ - ((var) = ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ - + ((intptr_t) (ptr) & VALMASK))) + ((var) = XIL((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ + + ((intptr_t) (ptr) & VALMASK))) #ifdef DATA_SEG_BITS /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which were stored in a Lisp_Object */ -#define XPNTR(a) ((uintptr_t) (((a) & VALMASK)) | DATA_SEG_BITS)) +#define XPNTR(a) ((uintptr_t) ((XLI(a) & VALMASK)) | DATA_SEG_BITS)) #else -#define XPNTR(a) ((uintptr_t) ((a) & VALMASK)) +#define XPNTR(a) ((uintptr_t) (XLI(a) & VALMASK)) #endif #endif /* not USE_LSB_TAG */ -#else /* USE_LISP_UNION_TYPE */ - -#ifdef USE_2_TAGS_FOR_INTS -# error "USE_2_TAGS_FOR_INTS is not supported with USE_LISP_UNION_TYPE" -#endif - -#define XHASH(a) ((a).i) -#define XTYPE(a) ((enum Lisp_Type) (a).u.type) -#define XINT(a) ((EMACS_INT) (a).s.val) -#define XUINT(a) ((EMACS_UINT) (a).u.val) - -#if USE_LSB_TAG - -# define XSET(var, vartype, ptr) \ - (eassert (((uintptr_t) (ptr) & ((1 << GCTYPEBITS) - 1)) == 0), \ - (var).u.val = (uintptr_t) (ptr) >> GCTYPEBITS, \ - (var).u.type = (vartype)) - -/* Some versions of gcc seem to consider the bitfield width when issuing - the "cast to pointer from integer of different size" warning, so the - cast is here to widen the value back to its natural size. */ -# define XPNTR(v) ((intptr_t) (v).s.val << GCTYPEBITS) - -#else /* !USE_LSB_TAG */ - -# define XSET(var, vartype, ptr) \ - ((var).s.val = (intptr_t) (ptr), (var).s.type = (vartype)) - -#ifdef DATA_SEG_BITS -/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers - which were stored in a Lisp_Object */ -#define XPNTR(a) ((intptr_t) (XUINT (a) | DATA_SEG_BITS)) -#else -#define XPNTR(a) ((intptr_t) XUINT (a)) -#endif - -#endif /* !USE_LSB_TAG */ - -static inline Lisp_Object -make_number (EMACS_INT n) -{ - Lisp_Object o; - o.s.val = n; - o.s.type = Lisp_Int; - return o; -} - -#endif /* USE_LISP_UNION_TYPE */ - /* For integers known to be positive, XFASTINT sometimes provides faster retrieval and XSETFASTINT provides faster storage. If not, fallback on the non-accelerated path. */ === modified file 'src/w32fns.c' --- src/w32fns.c 2012-05-28 17:22:40 +0000 +++ src/w32fns.c 2012-06-13 13:40:48 +0000 @@ -6326,13 +6326,8 @@ /* Notify input thread about new hot-key definition, so that it takes effect without needing to switch focus. */ -#ifdef USE_LISP_UNION_TYPE - PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, - (WPARAM) key.i, 0); -#else - PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, - (WPARAM) key, 0); -#endif + PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, + (WPARAM) XLI (key), 0); } return key; @@ -6354,13 +6349,8 @@ { /* Notify input thread about hot-key definition being removed, so that it takes effect without needing focus switch. */ -#ifdef USE_LISP_UNION_TYPE - if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY, - (WPARAM) XINT (XCAR (item)), (LPARAM) item.i)) -#else - if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY, - (WPARAM) XINT (XCAR (item)), (LPARAM) item)) -#endif + if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY, + (WPARAM) XINT (XCAR (item)), (LPARAM) XLI (item))) { MSG msg; GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); @@ -6432,13 +6422,8 @@ if (!dwWindowsThreadId) return make_number (w32_console_toggle_lock_key (vk_code, new_state)); -#ifdef USE_LISP_UNION_TYPE - if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY, - (WPARAM) vk_code, (LPARAM) new_state.i)) -#else - if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY, - (WPARAM) vk_code, (LPARAM) new_state)) -#endif + if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY, + (WPARAM) vk_code, (LPARAM) XLI (new_state))) { MSG msg; GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); === modified file 'src/w32heap.c' --- src/w32heap.c 2012-06-13 00:26:40 +0000 +++ src/w32heap.c 2012-06-13 13:40:48 +0000 @@ -114,7 +114,7 @@ return data_region_end; } -#if !defined USE_LISP_UNION_TYPE && !USE_LSB_TAG +#if !USE_LSB_TAG static char * allocate_heap (void) { @@ -141,7 +141,7 @@ return ptr; } -#else /* USE_LISP_UNION_TYPE || USE_LSB_TAG */ +#else /* USE_LSB_TAG */ static char * allocate_heap (void) { @@ -160,7 +160,7 @@ return ptr; } -#endif /* USE_LISP_UNION_TYPE || USE_LSB_TAG */ +#endif /* USE_LSB_TAG */ /* Emulate Unix sbrk. Note that ralloc.c expects the return value to @@ -259,7 +259,7 @@ exit (1); } -#if !defined USE_LISP_UNION_TYPE && !USE_LSB_TAG +#if !USE_LSB_TAG /* Ensure that the addresses don't use the upper tag bits since the Lisp type goes there. */ if (((unsigned long) data_region_base & ~VALMASK) != 0) === modified file 'src/w32menu.c' --- src/w32menu.c 2012-05-25 18:19:24 +0000 +++ src/w32menu.c 2012-06-13 13:40:48 +0000 @@ -1533,11 +1533,7 @@ until it is ready to be displayed, since GC can happen while menus are active. */ if (!NILP (wv->help)) -#ifdef USE_LISP_UNION_TYPE - info.dwItemData = (DWORD) (wv->help).i; -#else - info.dwItemData = (DWORD) (wv->help); -#endif + info.dwItemData = (DWORD) XLI (wv->help); if (wv->button_type == BUTTON_TYPE_RADIO) { /* CheckMenuRadioItem allows us to differentiate TOGGLE and @@ -1612,12 +1608,7 @@ info.fMask = MIIM_DATA; get_menu_item_info (menu, item, FALSE, &info); -#ifdef USE_LISP_UNION_TYPE - help = info.dwItemData ? (Lisp_Object) ((EMACS_INT) info.dwItemData) - : Qnil; -#else - help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil; -#endif + help = info.dwItemData ? XIL (info.dwItemData) : Qnil; } /* Store the help echo in the keyboard buffer as the X toolkit === modified file 'src/w32term.c' --- src/w32term.c 2012-05-28 17:22:40 +0000 +++ src/w32term.c 2012-06-13 13:40:48 +0000 @@ -4342,7 +4342,7 @@ /* If the contents of the global variable help_echo_string has changed, generate a HELP_EVENT. */ -#if 0 /* The below is an invalid comparison when USE_LISP_UNION_TYPE. +#if 0 /* The below is an invalid comparison when CHECK_LISP_OBJECT_TYPE. But it was originally changed to this to fix a bug, so I have not removed it completely in case the bug is still there. */ if (help_echo_string != previous_help_echo_string || ------------------------------------------------------------ revno: 108597 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 09:18:59 -0400 message: * lisp/loadup.el: Count byte-code functions as well. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 13:16:34 +0000 +++ lisp/ChangeLog 2012-06-13 13:18:59 +0000 @@ -1,5 +1,7 @@ 2012-06-13 Stefan Monnier + * loadup.el: Count byte-code functions as well. + * emacs-lisp/byte-opt.el (featurep): Move compiler-macro... * emacs-lisp/bytecomp.el (featurep): ...here (bug#11692). === modified file 'lisp/loadup.el' --- lisp/loadup.el 2012-05-30 03:59:42 +0000 +++ lisp/loadup.el 2012-06-13 13:18:59 +0000 @@ -321,6 +321,7 @@ (when (hash-table-p purify-flag) (let ((strings 0) (vectors 0) + (bytecodes 0) (conses 0) (others 0)) (maphash (lambda (k v) @@ -328,10 +329,11 @@ ((stringp k) (setq strings (1+ strings))) ((vectorp k) (setq vectors (1+ vectors))) ((consp k) (setq conses (1+ conses))) + ((byte-code-function-p v) (setq bytecodes (1+ bytecodes))) (t (setq others (1+ others))))) purify-flag) - (message "Pure-hashed: %d strings, %d vectors, %d conses, %d others" - strings vectors conses others))) + (message "Pure-hashed: %d strings, %d vectors, %d conses, %d bytecodes, %d others" + strings vectors conses bytecodes others))) ;; Avoid error if user loads some more libraries now and make sure the ;; hash-consing hash table is GC'd. ------------------------------------------------------------ revno: 108596 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11692 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 09:16:34 -0400 message: * lisp/emacs-lisp/byte-opt.el (featurep): Move compiler-macro... * lisp/emacs-lisp/bytecomp.el (featurep): ...here. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 12:46:33 +0000 +++ lisp/ChangeLog 2012-06-13 13:16:34 +0000 @@ -1,5 +1,8 @@ 2012-06-13 Stefan Monnier + * emacs-lisp/byte-opt.el (featurep): Move compiler-macro... + * emacs-lisp/bytecomp.el (featurep): ...here (bug#11692). + * emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt (bug#11649). Add cl-defun and cl-defmacro. === modified file 'lisp/emacs-lisp/byte-opt.el' --- lisp/emacs-lisp/byte-opt.el 2012-06-10 13:28:26 +0000 +++ lisp/emacs-lisp/byte-opt.el 2012-06-13 13:16:34 +0000 @@ -1158,16 +1158,6 @@ ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, ;; string-make-multibyte for constant args. -(put 'featurep 'compiler-macro - (lambda (form &rest _ignore) - ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so - ;; we can safely optimize away this test. - (if (member (cdr-safe form) '(((quote xemacs)) ((quote sxemacs)))) - nil - (if (member (cdr-safe form) '(((quote emacs)))) - t - form)))) - (put 'set 'byte-optimizer 'byte-optimize-set) (defun byte-optimize-set (form) (let ((var (car-safe (cdr-safe form)))) === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2012-06-11 15:52:50 +0000 +++ lisp/emacs-lisp/bytecomp.el 2012-06-13 13:16:34 +0000 @@ -4539,6 +4539,16 @@ (setq command-line-args-left (cdr command-line-args-left))) (kill-emacs 0)) +;;; Core compiler macros. + +(put 'featurep 'compiler-macro + (lambda (form feature &rest _ignore) + ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so + ;; we can safely optimize away this test. + (if (member feature '('xemacs 'sxemacs 'emacs)) + (eval form) + form))) + (provide 'byte-compile) (provide 'bytecomp) ------------------------------------------------------------ revno: 108595 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11649 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 08:46:33 -0400 message: * lisp/emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt. Add cl-defun and cl-defmacro. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 12:36:29 +0000 +++ lisp/ChangeLog 2012-06-13 12:46:33 +0000 @@ -1,3 +1,8 @@ +2012-06-13 Stefan Monnier + + * emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt + (bug#11649). Add cl-defun and cl-defmacro. + 2012-06-13 Drew Adams * help-mode.el (help-bookmark-make-record, help-bookmark-jump): === modified file 'lisp/emacs-lisp/autoload.el' --- lisp/emacs-lisp/autoload.el 2012-06-10 13:28:26 +0000 +++ lisp/emacs-lisp/autoload.el 2012-06-13 12:46:33 +0000 @@ -151,7 +151,8 @@ easy-mmode-define-global-mode define-global-minor-mode define-globalized-minor-mode easy-mmode-define-minor-mode define-minor-mode - defun* defmacro* define-overloadable-function)) + cl-defun defun* cl-defmacro defmacro* + define-overloadable-function)) (let* ((macrop (memq car '(defmacro defmacro*))) (name (nth 1 form)) (args (cl-case car @@ -161,7 +162,7 @@ ((define-generic-mode define-derived-mode define-compilation-mode) nil) (t))) - (body (nthcdr (get car 'doc-string-elt) form)) + (body (nthcdr (or (get car 'doc-string-elt) 3) form)) (doc (if (stringp (car body)) (pop body)))) ;; Add the usage form at the end where describe-function-1 ;; can recover it. ------------------------------------------------------------ revno: 108594 author: Drew Adams committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-06-13 08:36:29 -0400 message: * lisp/help-mode.el (help-bookmark-make-record, help-bookmark-jump): Fix last change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 11:56:53 +0000 +++ lisp/ChangeLog 2012-06-13 12:36:29 +0000 @@ -1,3 +1,8 @@ +2012-06-13 Drew Adams + + * help-mode.el (help-bookmark-make-record, help-bookmark-jump): + Fix last change. + 2012-06-13 Michael Albinus * net/dbus.el (dbus-call-method): Use timeout for `read-event'. @@ -134,13 +139,13 @@ gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. - (tramp-open-connection-setup-interactive-shell): Use - `tramp-cleanup'. Move check for busyboxes ... - (tramp-find-shell): ... here. Simplify implementation. Set - "remote-shell" property also for alternative shells. - (tramp-remote-coding-commands): Check "test -c /dev/stdout". If - failing, a regular file would be written otherwise. Reported by - Dmitry Kurochkin . + (tramp-open-connection-setup-interactive-shell): + Use `tramp-cleanup'. Move check for busyboxes ... + (tramp-find-shell): ... here. Simplify implementation. + Set "remote-shell" property also for alternative shells. + (tramp-remote-coding-commands): Check "test -c /dev/stdout". + If failing, a regular file would be written otherwise. + Reported by Dmitry Kurochkin . (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the @@ -148,15 +153,15 @@ (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. - (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw - `suppress', if there was a failed connection shortly before. + (tramp-maybe-open-connection): Use `tramp-cleanup'. + Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) - (tramp-get-inline-compress, tramp-get-inline-coding): Read - connection properties from the process cache. + (tramp-get-inline-compress, tramp-get-inline-coding): + Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) - (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New - defconsts. + (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): + New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. @@ -170,17 +175,17 @@ Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) - (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use - `tramp-get-connection-buffer'). + (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): + Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. - (tramp-smb-maybe-open-connection): Handle wrong passwords. Use - `tramp-smb-server-version'. + (tramp-smb-maybe-open-connection): Handle wrong passwords. + Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. - (tramp-methods, tramp-rsh-end-of-line): Remove - `tramp-password-end-of-line' from docstring. + (tramp-methods, tramp-rsh-end-of-line): + Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. @@ -200,8 +205,8 @@ `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if - `tramp-message-show-message' is nil. Use - `tramp-get-connection-buffer'. + `tramp-message-show-message' is nil. + Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate @@ -219,8 +224,8 @@ (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) - (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set - tramp-autoload cookie. + (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): + Set tramp-autoload cookie. * net/trampver.el: Update release number. === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2012-06-13 11:13:17 +0000 +++ lisp/help-mode.el 2012-06-13 12:36:29 +0000 @@ -808,9 +808,8 @@ (unless (car help-xref-stack-item) (error "Cannot create bookmark - help command not known")) `(,@(bookmark-make-record-default 'NO-FILE 'NO-CONTEXT) - (buffer-name . "*Help*") (help-fn . ,(car help-xref-stack-item)) - (help-arg . ,(cadr help-xref-stack-item)) + (help-args . ,(cdr help-xref-stack-item)) (position . ,(point)) (handler . help-bookmark-jump))) @@ -819,10 +818,10 @@ "Jump to help-mode bookmark BOOKMARK. Handler function for record returned by `help-bookmark-make-record'. BOOKMARK is a bookmark name or a bookmark record." - (let ((help-fn (bookmark-prop-get bookmark 'help-fn)) - (help-arg (bookmark-prop-get bookmark 'help-arg)) - (position (bookmark-prop-get bookmark 'position))) - (funcall help-fn help-arg) + (let ((help-fn (bookmark-prop-get bookmark 'help-fn)) + (help-args (bookmark-prop-get bookmark 'help-args)) + (position (bookmark-prop-get bookmark 'position))) + (apply help-fn help-args) (pop-to-buffer "*Help*") (goto-char position))) ------------------------------------------------------------ revno: 108593 committer: Michael Albinus branch nick: trunk timestamp: Wed 2012-06-13 13:56:53 +0200 message: * net/dbus.el (dbus-call-method): Use timeout for `read-event'. Otherwise, it blocks in batch mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 11:13:17 +0000 +++ lisp/ChangeLog 2012-06-13 11:56:53 +0000 @@ -1,3 +1,8 @@ +2012-06-13 Michael Albinus + + * net/dbus.el (dbus-call-method): Use timeout for `read-event'. + Otherwise, it blocks in batch mode. + 2012-06-13 Juanma Barranquero * help-mode.el (bookmark-make-record-default): Declare. === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2012-05-13 09:05:04 +0000 +++ lisp/net/dbus.el 2012-06-13 11:56:53 +0000 @@ -269,7 +269,7 @@ ;; default 25". Events which are not from D-Bus must be restored. (with-timeout ((if timeout (/ timeout 1000.0) 25)) (while (eq (gethash key dbus-return-values-table :ignore) :ignore) - (let ((event (let (unread-command-events) (read-event)))) + (let ((event (let (unread-command-events) (read-event nil nil 0.1)))) (when (and event (not (ignore-errors (dbus-check-event event)))) (setq unread-command-events (append unread-command-events (list event))))))) ------------------------------------------------------------ revno: 108592 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2012-06-13 13:13:17 +0200 message: lisp/help-mode.el (bookmark-make-record-default): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-13 07:33:38 +0000 +++ lisp/ChangeLog 2012-06-13 11:13:17 +0000 @@ -1,3 +1,7 @@ +2012-06-13 Juanma Barranquero + + * help-mode.el (bookmark-make-record-default): Declare. + 2012-06-13 Chong Yidong * emacs-lisp/package.el (list-packages): Compute a list of === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2012-06-12 01:03:10 +0000 +++ lisp/help-mode.el 2012-06-13 11:13:17 +0000 @@ -799,6 +799,8 @@ ;; Bookmark support (declare-function bookmark-prop-get "bookmark" (bookmark prop)) +(declare-function bookmark-make-record-default "bookmark" + (&optional no-file no-context posn)) (defun help-bookmark-make-record () "Create and return a help-mode bookmark record. ------------------------------------------------------------ revno: 108591 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-06-13 06:20:28 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-06-12 04:35:14 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-06-13 10:20:28 +0000 @@ -267,7 +267,7 @@ ;;;;;; cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case ;;;;;; cl-load-time-value cl-eval-when cl-destructuring-bind cl-function ;;;;;; cl-defmacro cl-defun cl-gentemp cl-gensym) "cl-macs" "cl-macs.el" -;;;;;; "a0ba9f3a4a4c091875d8315052259e91") +;;;;;; "32abce1bd6f38339285a6071e1be5e59") ;;; Generated autoloads from cl-macs.el (autoload 'cl-gensym "cl-macs" "\ ------------------------------------------------------------ revno: 108590 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-06-13 06:17:27 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-06-12 10:17:28 +0000 +++ autogen/config.in 2012-06-13 10:17:27 +0000 @@ -46,6 +46,12 @@ /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T +/* Define if SA_RESTART should not be used. */ +#undef BROKEN_SA_RESTART + +/* Define if SIGIO should not be used. */ +#undef BROKEN_SIGIO + /* Define if Emacs cannot be dumped on your system. */ #undef CANNOT_DUMP @@ -585,6 +591,9 @@ /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN +/* Define if you have the /proc filesystem. */ +#undef HAVE_PROCFS + /* Define to 1 if you have the `pstat_getdynamic' function. */ #undef HAVE_PSTAT_GETDYNAMIC @@ -961,6 +970,9 @@ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O +/* Define if termio.h should not be included. */ +#undef NO_TERMIO + /* Define to 1 if `NSInteger' is defined. */ #undef NS_HAVE_NSINTEGER @@ -1100,6 +1112,10 @@ /* Define to 1 if using an X toolkit. */ #undef USE_X_TOOLKIT +/* Define for USG systems where it works to open a pty's tty in the parent + process, then close and reopen it in the child. */ +#undef USG_SUBTTY_WORKS + /* Version number of package */ #undef VERSION @@ -1181,6 +1197,9 @@ /* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE +/* Needed for system_process_attributes on Solaris. */ +#undef _STRUCTURED_PROC + /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE @@ -1335,7 +1354,9 @@ #define subprocesses /* Include the os dependent file. */ -#include config_opsysfile +#ifdef config_opsysfile +# include config_opsysfile +#endif /* GNUstep needs a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. === modified file 'autogen/configure' --- autogen/configure 2012-06-12 10:17:28 +0000 +++ autogen/configure 2012-06-13 10:17:27 +0000 @@ -2511,6 +2511,63 @@ } # ac_fn_c_check_header_preproc +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2578,63 +2635,6 @@ } # ac_fn_c_check_func -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_member - # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -3172,8 +3172,66 @@ as_fn_append ac_header_list " pthread.h" as_fn_append ac_header_list " malloc/malloc.h" as_fn_append ac_header_list " maillock.h" +as_fn_append ac_func_list " gethostname" +as_fn_append ac_func_list " rename" +as_fn_append ac_func_list " closedir" +as_fn_append ac_func_list " mkdir" +as_fn_append ac_func_list " rmdir" +as_fn_append ac_func_list " getrusage" +as_fn_append ac_func_list " get_current_dir_name" +as_fn_append ac_func_list " random" +as_fn_append ac_func_list " lrand48" +as_fn_append ac_func_list " logb" +as_fn_append ac_func_list " frexp" +as_fn_append ac_func_list " fmod" +as_fn_append ac_func_list " rint" +as_fn_append ac_func_list " cbrt" +as_fn_append ac_func_list " setsid" +as_fn_append ac_func_list " strerror" +as_fn_append ac_func_list " fpathconf" +as_fn_append ac_func_list " select" +as_fn_append ac_func_list " euidaccess" +as_fn_append ac_func_list " getpagesize" +as_fn_append ac_func_list " setlocale" +as_fn_append ac_func_list " utimes" +as_fn_append ac_func_list " getrlimit" +as_fn_append ac_func_list " setrlimit" +as_fn_append ac_func_list " setpgid" +as_fn_append ac_func_list " getcwd" +as_fn_append ac_func_list " getwd" +as_fn_append ac_func_list " shutdown" +as_fn_append ac_func_list " getaddrinfo" +as_fn_append ac_func_list " __fpending" +as_fn_append ac_func_list " strsignal" +as_fn_append ac_func_list " setitimer" +as_fn_append ac_func_list " sendto" +as_fn_append ac_func_list " recvfrom" +as_fn_append ac_func_list " getsockname" +as_fn_append ac_func_list " getpeername" +as_fn_append ac_func_list " getifaddrs" +as_fn_append ac_func_list " freeifaddrs" +as_fn_append ac_func_list " gai_strerror" +as_fn_append ac_func_list " mkstemp" +as_fn_append ac_func_list " getline" +as_fn_append ac_func_list " getdelim" +as_fn_append ac_func_list " fsync" +as_fn_append ac_func_list " sync" +as_fn_append ac_func_list " difftime" +as_fn_append ac_func_list " posix_memalign" +as_fn_append ac_func_list " getpwent" +as_fn_append ac_func_list " endpwent" +as_fn_append ac_func_list " getgrent" +as_fn_append ac_func_list " endgrent" +as_fn_append ac_func_list " touchlock" +as_fn_append ac_func_list " cfmakeraw" +as_fn_append ac_func_list " cfsetspeed" +as_fn_append ac_func_list " copysign" +as_fn_append ac_func_list " __executable_start" as_fn_append ac_header_list " sys/un.h" +as_fn_append ac_func_list " grantpt" +as_fn_append ac_func_list " getpt" as_fn_append ac_func_list " tzset" +as_fn_append ac_func_list " snprintf" as_fn_append ac_func_list " readlinkat" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" @@ -8073,7 +8131,7 @@ LIB_MATH=-lm LIB_STANDARD= START_FILES= -SYSTEM_TYPE=`echo $opsys | sed -e 's/0-9.*//' -e 's|-|/|'` +SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'` case $opsys in cygwin ) @@ -8847,19 +8905,6 @@ done -for ac_func in getifaddrs freeifaddrs -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default #if HAVE_SYS_SOCKET_H @@ -10425,23 +10470,14 @@ CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" LIBS="$IMAGEMAGICK_LIBS $LIBS" - for ac_func in MagickExportImagePixels -do : - ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" -if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MAGICKEXPORTIMAGEPIXELS 1 -_ACEOF - -fi -done - - for ac_func in MagickMergeImageLayers -do : - ac_fn_c_check_func "$LINENO" "MagickMergeImageLayers" "ac_cv_func_MagickMergeImageLayers" -if test "x$ac_cv_func_MagickMergeImageLayers" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MAGICKMERGEIMAGELAYERS 1 + for ac_func in MagickExportImagePixels MagickMergeImageLayers +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -12977,17 +13013,6 @@ There may be a \`development' package to install containing liblockfile." "$LINENO" 5 fi fi -for ac_func in touchlock -do : - ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" -if test "x$ac_cv_func_touchlock" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TOUCHLOCK 1 -_ACEOF - -fi -done - @@ -13039,17 +13064,10 @@ -for ac_func in gethostname \ -rename closedir mkdir rmdir getrusage get_current_dir_name \ -random lrand48 logb frexp fmod rint cbrt setsid \ -strerror fpathconf select euidaccess getpagesize setlocale \ -utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ -__fpending strsignal setitimer \ -sendto recvfrom getsockname getpeername \ -gai_strerror mkstemp getline getdelim fsync sync \ -difftime posix_memalign \ -getpwent endpwent getgrent endgrent \ -cfmakeraw cfsetspeed copysign __executable_start + + + + for ac_func in $ac_func_list do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13063,6 +13081,117 @@ done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 $as_echo_n "checking for __builtin_unwind_init... " >&6; } if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : @@ -13203,29 +13332,13 @@ # UNIX98 PTYs. -for ac_func in grantpt -do : - ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GRANTPT 1 -_ACEOF - -fi -done + + # PTY-related GNU extensions. -for ac_func in getpt -do : - ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPT 1 -_ACEOF - -fi -done + + # Check this now, so that we will NOT find the above functions in ncurses. @@ -14168,22 +14281,6 @@ - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 $as_echo_n "checking whether localtime caches TZ... " >&6; } if test "${emacs_cv_localtime_cache+set}" = set; then : @@ -14577,16 +14674,8 @@ fi -for ac_func in snprintf -do : - ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" -if test "x$ac_cv_func_snprintf" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SNPRINTF 1 -_ACEOF - -fi -done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 @@ -14690,6 +14779,54 @@ fi +case $opsys in + darwin | gnu | hpux* | *bsd ) + +$as_echo "#define NO_TERMIO 1" >>confdefs.h + + ;; +esac + +case $opsys in + hpux* | irix6-5 | openbsd | sol2* | unixware ) + +$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h + + ;; +esac + +case $opsys in + gnu-* | sol2-10 ) + +$as_echo "#define HAVE_PROCFS 1" >>confdefs.h + + ;; +esac + +case $opsys in + gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; + + hpux11) + +$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h + + +$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h + + + opsysfile="s/hpux10-20.h" + ;; + + openbsd) opsysfile="s/netbsd.h" ;; + + sol2-10) + +$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h + + opsysfile="s/sol2-6.h" + ;; +esac + # Set up the CFLAGS for real compilation, so we can substitute it. CFLAGS="$REAL_CFLAGS" CPPFLAGS="$REAL_CPPFLAGS" @@ -14739,7 +14876,11 @@ ## Used in lwlib/Makefile.in. -S_FILE="\$(srcdir)/${opsysfile}" +if test -n "${opsysfile}"; then + S_FILE="\$(srcdir)/${opsysfile}" +else + S_FILE= +fi @@ -14758,11 +14899,13 @@ #define EMACS_CONFIG_OPTIONS "${ac_configure_args}" _ACEOF +if test -n "$opsysfile"; then cat >>confdefs.h <<_ACEOF #define config_opsysfile "${opsysfile}" _ACEOF +fi XMENU_OBJ= XOBJ= @@ -21731,8 +21874,7 @@ Configured for \`${canonical}'. Where should the build process find the source code? ${srcdir} - What operating system file should Emacs use? - \`${opsysfile}' + What operating system file should Emacs use? ${opsysfile-none} What compiler should emacs be built with? ${CC} ${CFLAGS} Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} ------------------------------------------------------------ revno: 108589 committer: Deniz Dogan branch nick: trunk timestamp: Wed 2012-06-13 11:10:01 +0200 message: * tutorials/TUTORIAL.sv: Fix grammar and a couple of typos. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-06-10 13:20:58 +0000 +++ etc/ChangeLog 2012-06-13 09:10:01 +0000 @@ -1,3 +1,7 @@ +2012-06-13 Deniz Dogan + + * tutorials/TUTORIAL.sv: Fix grammar and a couple of typos. + 2012-06-04 Paul Eggert * PROBLEMS (68000 C compiler problems): Remove obsolete section. === modified file 'etc/tutorials/TUTORIAL.sv' --- etc/tutorials/TUTORIAL.sv 2012-01-25 06:12:10 +0000 +++ etc/tutorials/TUTORIAL.sv 2012-06-13 09:10:01 +0000 @@ -11,7 +11,7 @@ den och trycker sedan . Viktigt: För att avsluta Emacs trycker du C-x C-c (två tecken). -För att avsluta kommandon som inte skrivits in fullt, tryck C-g. +För att avsluta kommandon som inte skrivits in fullt, tryck C-g. Tecknen ">>" i vänstermarginalen anger att du kan prova ett kommando. Till exempel: <> @@ -291,24 +291,24 @@ >> Slå C-x 1 och se hur dokumentationsfönstret nu försvinner. Kommandot skiljer sig lite från andra kommandon du har lärt dig -eftersom det består av två tecken. Det startar med tecknet -KONTROLL-x. Det är faktisk många kommandon som startar med KONTROLL-x -och många av dem har med filer, skärmbilder och liknande saker att -göra. Dessa kommandon är två, tre eller fyra tecken långa. +eftersom det består av två tecken. Det startar med tecknet KONTROLL-x. +Det finns många kommandon som startar med KONTROLL-x och många av dem +har med filer, skärmbilder och liknande saker att göra. Dessa +kommandon är två, tre eller fyra tecken långa. * SKRIVA OCH TA BORT TEXT ------------------------- -Om du önskar att sätta in text är det bara att skriva in texten. -Vanliga tecken, som A, 7, *, etc., sätts in direkt när du skriver dem. +Om du önskar att sätta in text är det bara att skriva in texten. +Vanliga tecken, som A, 7, *, etc., sätts in direkt när du skriver dem. Tryck på för att sätta in en radbrytning. (Det är den tangent på tangentbordet som ibland är märkt med "Enter") -För att radera tecknet omedelbart före aktuell markörposition, -skriv . Det är tangenten på tangentbordet som vanligtvis är -markerad med "Backspace" -- det är samma tangent som du normal -använder för att radera det sist inmatade tecknet utanför Emacs. +För att radera tecknet omedelbart före aktuell markörposition, tryck +på . Det är tangenten på tangentbordet som vanligtvis är markerad +med "Backspace" -- det är samma tangent som du normal använder för att +radera det sist inmatade tecknet utanför Emacs. Det kan finnas en annan tangent på ditt tangentbordet som är märkt med "Delete", men det är inte den vi menar med . @@ -885,7 +885,7 @@ >> Flytta markören till den här raden och tryck C-l C-l. >> Skriv nu C-x 2, som leder till att skärmen delas i två - fönster. Bägge fönstren visar den här vägledningen. + fönster. Bägge fönstren visar den här vägledningen. Redigeringsmarkören stannar i det övre fönstret. >> Skriv C-M-v för att rulla det nedre fönstret. ------------------------------------------------------------ revno: 108588 committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-06-13 15:33:38 +0800 message: In the Package Menu, indicate packages that are newly-available. * lisp/emacs-lisp/package.el (list-packages): Compute a list of packages that are newly-available since the last list-packages invocation. (package-menu--new-package-list): New var. (package-menu--generate, package-menu--print-info) (package-menu--status-predicate, package-menu-mark-install): Handle new status label "new". diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-06-12 04:35:14 +0000 +++ etc/NEWS 2012-06-13 07:33:38 +0000 @@ -299,6 +299,11 @@ The function `notifications-get-capabilities' returns the supported server properties. +** Package Menu + +*** Newly-available packages are listed in the Package Menu as "new", +and sorted above the other "available" packages by default. + ** Tabulated List and packages derived from it *** New command `tabulated-list-sort', bound to `S', sorts the column === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-12 18:10:34 +0000 +++ lisp/ChangeLog 2012-06-13 07:33:38 +0000 @@ -1,3 +1,13 @@ +2012-06-13 Chong Yidong + + * emacs-lisp/package.el (list-packages): Compute a list of + packages that are newly-available since the last list-packages + invocation. + (package-menu--new-package-list): New var. + (package-menu--generate, package-menu--print-info) + (package-menu--status-predicate, package-menu-mark-install): + Handle new status label "new". + 2012-06-12 Stefan Monnier * emacs-lisp/cl-macs.el (cl-remf): Fix error in recent === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2012-05-09 03:06:08 +0000 +++ lisp/emacs-lisp/package.el 2012-06-13 07:33:38 +0000 @@ -1362,6 +1362,9 @@ map) "Local keymap for `package-menu-mode' buffers.") +(defvar package-menu--new-package-list nil + "List of newly-available packages since `list-packages' was last called.") + (define-derived-mode package-menu-mode tabulated-list-mode "Package Menu" "Major mode for browsing a list of packages. Letters do not insert themselves; instead, they are commands. @@ -1415,9 +1418,10 @@ (when (or (eq packages t) (memq name packages)) (let ((hold (assq name package-load-list))) (package--push name (cdr elt) - (if (and hold (null (cadr hold))) - "disabled" - "available") + (cond + ((and hold (null (cadr hold))) "disabled") + ((memq name package-menu--new-package-list) "new") + (t "available")) info-list)))) ;; Obsolete packages: @@ -1442,6 +1446,7 @@ (face (cond ((string= status "built-in") 'font-lock-builtin-face) ((string= status "available") 'default) + ((string= status "new") 'bold) ((string= status "held") 'font-lock-constant-face) ((string= status "disabled") 'font-lock-warning-face) ((string= status "installed") 'font-lock-comment-face) @@ -1487,7 +1492,7 @@ (defun package-menu-mark-install (&optional _num) "Mark a package for installation and move to the next line." (interactive "p") - (if (string-equal (package-menu-get-status) "available") + (if (member (package-menu-get-status) '("available" "new")) (tabulated-list-put-tag "I" t) (forward-line))) @@ -1536,7 +1541,7 @@ (status (aref (cadr entry) 2))) (cond ((equal status "installed") (push pkg installed)) - ((equal status "available") + ((member status '("available" "new")) (push pkg available))))) ;; Loop through list of installed packages, finding upgrades (dolist (pkg installed) @@ -1642,16 +1647,18 @@ (sB (aref (cadr B) 2))) (cond ((string= sA sB) (package-menu--name-predicate A B)) - ((string= sA "available") t) + ((string= sA "new") t) + ((string= sB "new") nil) + ((string= sA "available") t) ((string= sB "available") nil) - ((string= sA "installed") t) + ((string= sA "installed") t) ((string= sB "installed") nil) - ((string= sA "held") t) + ((string= sA "held") t) ((string= sB "held") nil) - ((string= sA "built-in") t) + ((string= sA "built-in") t) ((string= sB "built-in") nil) - ((string= sA "obsolete") t) - ((string= sB "obsolete") nil) + ((string= sA "obsolete") t) + ((string= sB "obsolete") nil) (t (string< sA sB))))) (defun package-menu--description-predicate (A B) @@ -1676,22 +1683,36 @@ ;; Initialize the package system if necessary. (unless package--initialized (package-initialize t)) - (unless no-fetch - (package-refresh-contents)) - (let ((buf (get-buffer-create "*Packages*"))) - (with-current-buffer buf - (package-menu-mode) - (package-menu--generate nil t)) - ;; The package menu buffer has keybindings. If the user types - ;; `M-x list-packages', that suggests it should become current. - (switch-to-buffer buf)) - (let ((upgrades (package-menu--find-upgrades))) - (if upgrades - (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." - (length upgrades) - (if (= (length upgrades) 1) "" "s") - (substitute-command-keys "\\[package-menu-mark-upgrades]") - (if (= (length upgrades) 1) "it" "them"))))) + (let (old-archives new-packages) + (unless no-fetch + ;; Read the locally-cached archive-contents. + (package-read-all-archive-contents) + (setq old-archives package-archive-contents) + ;; Fetch the remote list of packages. + (package-refresh-contents) + ;; Find which packages are new. + (dolist (elt package-archive-contents) + (unless (assq (car elt) old-archives) + (push (car elt) new-packages)))) + + ;; Generate the Package Menu. + (let ((buf (get-buffer-create "*Packages*"))) + (with-current-buffer buf + (package-menu-mode) + (set (make-local-variable 'package-menu--new-package-list) + new-packages) + (package-menu--generate nil t)) + ;; The package menu buffer has keybindings. If the user types + ;; `M-x list-packages', that suggests it should become current. + (switch-to-buffer buf)) + + (let ((upgrades (package-menu--find-upgrades))) + (if upgrades + (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." + (length upgrades) + (if (= (length upgrades) 1) "" "s") + (substitute-command-keys "\\[package-menu-mark-upgrades]") + (if (= (length upgrades) 1) "it" "them")))))) ;;;###autoload (defalias 'package-list-packages 'list-packages) ------------------------------------------------------------ revno: 108587 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-12 22:39:20 -0400 message: Remove HAVE_SYSV_SIGPAUSE unused remnants * src/s/usg5-4-common.h, src/s/unixware.h: Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04). * admin/CPP-DEFINES: Remove HAVE_SYSV_SIGPAUSE. diff: === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-05-28 00:46:33 +0000 +++ admin/CPP-DEFINES 2012-06-13 02:39:20 +0000 @@ -156,7 +156,6 @@ HAVE_STRFTIME HAVE_STRING_H HAVE_STRUCT_UTIMBUF -HAVE_SYSV_SIGPAUSE HAVE_SYS_SELECT_H HAVE_SYS_SYSTEMINFO_H HAVE_SYS_TIMEB_H === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-13 02:32:49 +0000 +++ src/ChangeLog 2012-06-13 02:39:20 +0000 @@ -1,5 +1,8 @@ 2012-06-13 Glenn Morris + * s/usg5-4-common.h, src/s/unixware.h: + Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04). + * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04). 2012-06-13 Paul Eggert === modified file 'src/s/unixware.h' --- src/s/unixware.h 2012-04-14 06:18:49 +0000 +++ src/s/unixware.h 2012-06-13 02:39:20 +0000 @@ -23,8 +23,6 @@ /* #define HAVE_GETWD (appears to be buggy on SVR4.2) */ #undef HAVE_GETWD -#undef HAVE_SYSV_SIGPAUSE - /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2012-06-12 17:43:09 +0000 +++ src/s/usg5-4-common.h 2012-06-13 02:39:20 +0000 @@ -31,9 +31,6 @@ #define _setjmp setjmp #define _longjmp longjmp -/* The docs for system V/386 suggest v.3 has sigpause, so let's try it. */ -#define HAVE_SYSV_SIGPAUSE - /* Get FIONREAD from . Get to get struct tchars. But get first to make sure ttold.h doesn't interfere. */ #include