Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103435. ------------------------------------------------------------ revno: 103435 [merge] committer: Paul Eggert branch nick: trunk timestamp: Sat 2011-02-26 23:57:49 -0800 message: Merge: Minor cleanups uncovered by gcc warnings diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-26 12:55:10 +0000 +++ src/ChangeLog 2011-02-27 07:50:33 +0000 @@ -1,3 +1,36 @@ +2011-02-27 Paul Eggert + + * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG. + This avoids a gcc warning in some configurations. + + * frame.c (x_set_screen_gamma): Rename local to avoid shadowing. + + * frame.h: Avoid gcc -Wmissing-prototypes diagnostics. + (set_menu_bar_lines, x_get_resource_string): New decls. + * msdos.c (set_menu_bar_lines): Omit decl. + + * dispextern.h (struct glyph): Make u.img_id int, not unsigned. + It's always given int values and used as an int. This suppresses + a gcc "comparison of unsigned expression >= 0" warning in some + configurations. + + * dispnew.c: Rename locals to avoid shadowing. + (update_text_area, scrolling_window, update_frame_1): Rename locals. + +2011-02-26 Paul Eggert + + * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes. + (copy_glyph_row_contents): Remove; not used. + (frame_row_to_window, check_current_matrix_flags): + (window_change_signal): Now static, since they're not used elsewhere. + (check_current_matrix_flags): Surround with "#if 0", since its + only use is in a comment. Maybe both the comment and the "#if 0" + stuff should be removed? + + * dispnew.c: Fix problem uncovered by gcc -Wunused-variable. + (adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the + contexts that actually need it. + 2011-02-26 Eli Zaretskii * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04. === modified file 'src/dispextern.h' --- src/dispextern.h 2011-02-16 15:02:50 +0000 +++ src/dispextern.h 2011-02-27 02:41:48 +0000 @@ -431,7 +431,7 @@ } cmp; /* Image ID for image glyphs (type == IMAGE_GLYPH). */ - unsigned img_id; + int img_id; /* Sub-structure for type == STRETCH_GLYPH. */ struct === modified file 'src/dispnew.c' --- src/dispnew.c 2011-02-16 15:02:50 +0000 +++ src/dispnew.c 2011-02-27 00:48:14 +0000 @@ -1129,32 +1129,6 @@ } -/* Copy contents of glyph row FROM to glyph row TO. Glyph pointers in - TO and FROM are left unchanged. Glyph contents are copied from the - glyph memory of FROM to the glyph memory of TO. Increment buffer - positions in row TO by DELTA/ DELTA_BYTES. */ - -void -copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from, - EMACS_INT delta, EMACS_INT delta_bytes) -{ - int area; - - /* This is like a structure assignment TO = FROM, except that - glyph pointers in the rows are left unchanged. */ - copy_row_except_pointers (to, from); - - /* Copy glyphs from FROM to TO. */ - for (area = 0; area < LAST_AREA; ++area) - if (from->used[area]) - memcpy (to->glyphs[area], from->glyphs[area], - from->used[area] * sizeof (struct glyph)); - - /* Increment buffer positions in TO by DELTA. */ - increment_row_positions (to, delta, delta_bytes); -} - - /* Assign glyph row FROM to glyph row TO. This works like a structure assignment TO = FROM, except that glyph pointers are not copied but exchanged between TO and FROM. Pointers must be exchanged to avoid @@ -2223,8 +2197,6 @@ static void adjust_frame_glyphs_for_window_redisplay (struct frame *f) { - struct window *w; - xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); /* Allocate/reallocate window matrices. */ @@ -2236,6 +2208,7 @@ #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) { /* Allocate a dummy window if not already done. */ + struct window *w; if (NILP (f->menu_bar_window)) { f->menu_bar_window = make_window (); @@ -2258,23 +2231,26 @@ #endif /* HAVE_X_WINDOWS */ #ifndef USE_GTK - /* Allocate/ reallocate matrices of the tool bar window. If we - don't have a tool bar window yet, make one. */ - if (NILP (f->tool_bar_window)) - { - f->tool_bar_window = make_window (); + { + /* Allocate/ reallocate matrices of the tool bar window. If we + don't have a tool bar window yet, make one. */ + struct window *w; + if (NILP (f->tool_bar_window)) + { + f->tool_bar_window = make_window (); + w = XWINDOW (f->tool_bar_window); + XSETFRAME (w->frame, f); + w->pseudo_window_p = 1; + } + else w = XWINDOW (f->tool_bar_window); - XSETFRAME (w->frame, f); - w->pseudo_window_p = 1; - } - else - w = XWINDOW (f->tool_bar_window); - XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); - XSETFASTINT (w->left_col, 0); - XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); - XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); - allocate_matrices_for_window_redisplay (w); + XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); + XSETFASTINT (w->left_col, 0); + XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); + XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); + allocate_matrices_for_window_redisplay (w); + } #endif } @@ -2924,7 +2900,7 @@ /* Return the window in the window tree rooted in W containing frame row ROW. Value is null if none is found. */ -struct window * +static struct window * frame_row_to_window (struct window *w, int row) { struct window *found = NULL; @@ -3562,12 +3538,12 @@ #endif /* HAVE_WINDOW_SYSTEM */ -#ifdef GLYPH_DEBUG +#if defined GLYPH_DEBUG && 0 /* Check that no row in the current matrix of window W is enabled which is below what's displayed in the window. */ -void +static void check_current_matrix_flags (struct window *w) { int last_seen_p = 0; @@ -4014,7 +3990,7 @@ { /* Otherwise clear to the end of the old row. Everything after that position should be clear already. */ - int x; + int xlim; if (i >= desired_row->used[TEXT_AREA]) rif->cursor_to (vpos, i, desired_row->y, @@ -4031,11 +4007,11 @@ : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA]))) { w->phys_cursor_on_p = 0; - x = -1; + xlim = -1; } else - x = current_row->pixel_width; - rif->clear_end_of_line (x); + xlim = current_row->pixel_width; + rif->clear_end_of_line (xlim); changed_p = 1; } } @@ -4491,7 +4467,7 @@ && old_lines[i]->old_uses == 1 && old_lines[i]->new_uses == 1) { - int j, k; + int p, q; int new_line = old_lines[i]->new_line_number; struct run *run = run_pool + run_idx++; @@ -4504,33 +4480,33 @@ run->height = MATRIX_ROW (current_matrix, i)->height; /* Extend backward. */ - j = i - 1; - k = new_line - 1; - while (j > first_old - && k > first_new - && old_lines[j] == new_lines[k]) + p = i - 1; + q = new_line - 1; + while (p > first_old + && q > first_new + && old_lines[p] == new_lines[q]) { - int h = MATRIX_ROW (current_matrix, j)->height; + int h = MATRIX_ROW (current_matrix, p)->height; --run->current_vpos; --run->desired_vpos; ++run->nrows; run->height += h; run->desired_y -= h; run->current_y -= h; - --j, --k; + --p, --q; } /* Extend forward. */ - j = i + 1; - k = new_line + 1; - while (j < last_old - && k < last_new - && old_lines[j] == new_lines[k]) + p = i + 1; + q = new_line + 1; + while (p < last_old + && q < last_new + && old_lines[p] == new_lines[q]) { - int h = MATRIX_ROW (current_matrix, j)->height; + int h = MATRIX_ROW (current_matrix, p)->height; ++run->nrows; run->height += h; - ++j, ++k; + ++p, ++q; } /* Insert run into list of all runs. Order runs by copied @@ -4538,11 +4514,11 @@ be copied because they are already in place. This is done because we can avoid calling update_window_line in this case. */ - for (j = 0; j < nruns && runs[j]->height > run->height; ++j) + for (p = 0; p < nruns && runs[p]->height > run->height; ++p) ; - for (k = nruns; k > j; --k) - runs[k] = runs[k - 1]; - runs[j] = run; + for (q = nruns; q > p; --q) + runs[q] = runs[q - 1]; + runs[p] = run; ++nruns; i += run->nrows; @@ -4639,7 +4615,7 @@ struct glyph_matrix *current_matrix = f->current_matrix; struct glyph_matrix *desired_matrix = f->desired_matrix; int i; - int pause; + int pause_p; int preempt_count = baud_rate / 2400 + 1; xassert (current_matrix && desired_matrix); @@ -4653,7 +4629,7 @@ #if !PERIODIC_PREEMPTION_CHECKING if (!force_p && detect_input_pending_ignore_squeezables ()) { - pause = 1; + pause_p = 1; goto do_pause; } #endif @@ -4733,10 +4709,10 @@ } } - pause = (i < FRAME_LINES (f) - 1) ? i : 0; + pause_p = (i < FRAME_LINES (f) - 1) ? i : 0; /* Now just clean up termcap drivers and set cursor, etc. */ - if (!pause) + if (!pause_p) { if ((cursor_in_echo_area /* If we are showing a message instead of the mini-buffer, @@ -4837,7 +4813,7 @@ #endif clear_desired_matrices (f); - return pause; + return pause_p; } @@ -5594,7 +5570,7 @@ #ifdef SIGWINCH -SIGTYPE +static SIGTYPE window_change_signal (int signalnum) /* If we don't have an argument, */ /* some compilers complain in signal calls. */ { === modified file 'src/frame.c' --- src/frame.c 2011-02-16 16:35:16 +0000 +++ src/frame.c 2011-02-27 07:47:34 +0000 @@ -3275,12 +3275,12 @@ bgcolor = Fassq (Qbackground_color, f->param_alist); if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) { - Lisp_Object index = Fget (Qbackground_color, Qx_frame_parameter); - if (NATNUMP (index) - && (XFASTINT (index) + Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter); + if (NATNUMP (parm_index) + && (XFASTINT (parm_index) < sizeof (frame_parms)/sizeof (frame_parms[0])) - && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)]) - (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)]) + && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)]) + (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)]) (f, bgcolor, Qnil); } === modified file 'src/frame.h' --- src/frame.h 2011-01-25 04:08:28 +0000 +++ src/frame.h 2011-02-27 07:30:02 +0000 @@ -841,6 +841,7 @@ extern struct frame *last_nonminibuf_frame; +extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern struct frame *make_initial_frame (void); extern struct frame *make_terminal_frame (struct terminal *); extern struct frame *make_frame (int); @@ -1131,17 +1132,20 @@ extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); extern void validate_x_resource_name (void); - + extern Lisp_Object display_x_get_resource (Display_Info *, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass); +#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT +extern char *x_get_resource_string (const char *, const char *); +#endif + /* In xmenu.c */ extern void set_frame_menubar (FRAME_PTR, int, int); #endif /* HAVE_WINDOW_SYSTEM */ #endif /* not EMACS_FRAME_H */ - === modified file 'src/msdos.c' --- src/msdos.c 2011-02-16 19:09:20 +0000 +++ src/msdos.c 2011-02-27 07:30:02 +0000 @@ -1389,8 +1389,6 @@ void x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { - extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); - set_menu_bar_lines (f, value, oldval); } @@ -4236,4 +4234,3 @@ } #endif /* MSDOS */ - === modified file 'src/scroll.c' --- src/scroll.c 2011-01-26 08:36:39 +0000 +++ src/scroll.c 2011-02-27 07:50:33 +0000 @@ -262,7 +262,8 @@ for (k = 0; k < window_size; ++k) copy_from[k] = -1; -#define CHECK_BOUNDS \ +#if GLYPH_DEBUG +# define CHECK_BOUNDS \ do \ { \ int k; \ @@ -271,6 +272,7 @@ || (copy_from[k] >= 0 && copy_from[k] < window_size)); \ } \ while (0); +#endif /* When j is advanced, this corresponds to deleted lines. When i is advanced, this corresponds to inserted lines. */ @@ -1035,4 +1037,3 @@ FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame), coefficient); } - ------------------------------------------------------------ revno: 103434 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2011-02-26 21:50:38 -0500 message: * lisp/emacs-lisp/pcase.el (pcase--if): Try to invert test to reduce depth. (pcase-mutually-exclusive-predicates): New var. (pcase--split-consp, pcase--split-pred): Use it. (pcase--split-equal, pcase--split-member): When splitting against a pure predicate, run it to know the outcome. (pcase--u1): Mark vars that are actually used. (pcase--q1): Avoid introducing unused vars. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-27 01:33:37 +0000 +++ lisp/ChangeLog 2011-02-27 02:50:38 +0000 @@ -1,3 +1,13 @@ +2011-02-27 Stefan Monnier + + * emacs-lisp/pcase.el (pcase--if): Try to invert test to reduce depth. + (pcase-mutually-exclusive-predicates): New var. + (pcase--split-consp, pcase--split-pred): Use it. + (pcase--split-equal, pcase--split-member): When splitting against + a pure predicate, run it to know the outcome. + (pcase--u1): Mark vars that are actually used. + (pcase--q1): Avoid introducing unused vars. + 2011-02-27 Jay Belanger * calc/calc-ext.el (calc-init-extensions): === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2011-02-18 04:58:21 +0000 +++ lisp/emacs-lisp/pcase.el 2011-02-27 02:50:38 +0000 @@ -32,6 +32,14 @@ ;; could be defined this way, as a shorthand for (pred (lambda (_) BOOLEXP)). ;; But better would be if we could define new ways to match by having the ;; extension provide its own `pcase--split-' thingy. +;; - provide something like (setq VAR) so a var can be set rather than +;; let-bound. +;; - provide a way to fallthrough to other cases. +;; - try and be more clever to reduce the size of the decision tree, and +;; to reduce the number of leafs that need to be turned into function: +;; - first, do the tests shared by all remaining branches (it will have +;; to be performed anyway, so better so it first so it's shared). +;; - then choose the test that discriminates more (?). ;; - ideally we'd want (pcase s ((re RE1) E1) ((re RE2) E2)) to be able to ;; generate a lex-style DFA to decide whether to run E1 or E2. @@ -209,6 +217,7 @@ (defun pcase--if (test then else) (cond ((eq else :pcase--dontcare) then) + ((eq then :pcase--dontcare) (debug) else) ;Can/should this ever happen? ((eq (car-safe else) 'if) (if (equal test (nth 1 else)) ;; Doing a test a second time: get rid of the redundancy. @@ -223,6 +232,8 @@ `(cond (,test ,then) ;; Doing a test a second time: get rid of the redundancy, as above. ,@(remove (assoc test else) (cdr else)))) + ;; Invert the test if that lets us reduce the depth of the tree. + ((memq (car-safe then) '(if cond)) (pcase--if `(not ,test) else then)) (t `(if ,test ,then ,else)))) (defun pcase--upat (qpattern) @@ -264,6 +275,22 @@ (defun pcase--and (match matches) (if matches `(and ,match ,@matches) match)) +(defconst pcase-mutually-exclusive-predicates + '((symbolp . integerp) + (symbolp . numberp) + (symbolp . consp) + (symbolp . arrayp) + (symbolp . stringp) + (integerp . consp) + (integerp . arrayp) + (integerp . stringp) + (numberp . consp) + (numberp . arrayp) + (numberp . stringp) + (consp . arrayp) + (consp . stringp) + (arrayp . stringp))) + (defun pcase--split-match (sym splitter match) (case (car match) ((match) @@ -324,8 +351,14 @@ (cons `(and (match ,syma . ,(pcase--upat (car qpat))) (match ,symd . ,(pcase--upat (cdr qpat)))) :pcase--fail))) - ;; A QPattern but not for a cons, can only go the `else' side. - ((eq (car-safe pat) '\`) (cons :pcase--fail nil)))) + ;; A QPattern but not for a cons, can only go to the `else' side. + ((eq (car-safe pat) '\`) (cons :pcase--fail nil)) + ((and (eq (car-safe pat) 'pred) + (or (member (cons 'consp (cadr pat)) + pcase-mutually-exclusive-predicates) + (member (cons (cadr pat) 'consp) + pcase-mutually-exclusive-predicates))) + (cons :pcase--fail nil)))) (defun pcase--split-equal (elem pat) (cond @@ -337,7 +370,12 @@ ;; (or (integerp (cadr pat)) (symbolp (cadr pat)) ;; (consp (cadr pat))) ) - (cons :pcase--fail nil)))) + (cons :pcase--fail nil)) + ((and (eq (car-safe pat) 'pred) + (symbolp (cadr pat)) + (get (cadr pat) 'side-effect-free) + (funcall (cadr pat) elem)) + (cons :pcase--succeed nil)))) (defun pcase--split-member (elems pat) ;; Based on pcase--split-equal. @@ -354,13 +392,39 @@ ;; (or (integerp (cadr pat)) (symbolp (cadr pat)) ;; (consp (cadr pat))) ) - (cons :pcase--fail nil)))) + (cons :pcase--fail nil)) + ((and (eq (car-safe pat) 'pred) + (symbolp (cadr pat)) + (get (cadr pat) 'side-effect-free) + (let ((p (cadr pat)) (all t)) + (dolist (elem elems) + (unless (funcall p elem) (setq all nil))) + all)) + (cons :pcase--succeed nil)))) (defun pcase--split-pred (upat pat) ;; FIXME: For predicates like (pred (> a)), two such predicates may ;; actually refer to different variables `a'. - (if (equal upat pat) - (cons :pcase--succeed :pcase--fail))) + (cond + ((equal upat pat) (cons :pcase--succeed :pcase--fail)) + ((and (eq 'pred (car upat)) + (eq 'pred (car-safe pat)) + (or (member (cons (cadr upat) (cadr pat)) + pcase-mutually-exclusive-predicates) + (member (cons (cadr pat) (cadr upat)) + pcase-mutually-exclusive-predicates))) + (cons :pcase--fail nil)) + ;; ((and (eq 'pred (car upat)) + ;; (eq '\` (car-safe pat)) + ;; (symbolp (cadr upat)) + ;; (or (symbolp (cadr pat)) (stringp (cadr pat)) (numberp (cadr pat))) + ;; (get (cadr upat) 'side-effect-free) + ;; (progn (message "Trying predicate %S" (cadr upat)) + ;; (ignore-errors + ;; (funcall (cadr upat) (cadr pat))))) + ;; (message "Simplify pred %S against %S" upat pat) + ;; (cons nil :pcase--fail)) + )) (defun pcase--fgrep (vars sexp) "Check which of the symbols VARS appear in SEXP." @@ -433,6 +497,7 @@ ((eq upat 'dontcare) :pcase--dontcare) ((functionp upat) (error "Feature removed, use (pred %s)" upat)) ((memq (car-safe upat) '(guard pred)) + (if (eq (car upat) 'pred) (put sym 'pcase-used t)) (destructuring-bind (then-rest &rest else-rest) (pcase--split-rest sym (apply-partially #'pcase--split-pred upat) rest) @@ -459,6 +524,7 @@ (pcase--u1 matches code vars then-rest) (pcase--u else-rest)))) ((symbolp upat) + (put sym 'pcase-used t) (if (not (assq upat vars)) (pcase--u1 matches code (cons (cons upat sym) vars) rest) ;; Non-linear pattern. Turn it into an `eq' test. @@ -466,6 +532,7 @@ matches) code vars rest))) ((eq (car-safe upat) '\`) + (put sym 'pcase-used t) (pcase--q1 sym (cadr upat) matches code vars rest)) ((eq (car-safe upat) 'or) (let ((all (> (length (cdr upat)) 1)) @@ -539,14 +606,20 @@ (pcase--split-rest sym (apply-partially #'pcase--split-consp syma symd) rest) - (pcase--if `(consp ,sym) - `(let ((,syma (car ,sym)) - (,symd (cdr ,sym))) - ,(pcase--u1 `((match ,syma . ,(pcase--upat (car qpat))) - (match ,symd . ,(pcase--upat (cdr qpat))) - ,@matches) - code vars then-rest)) - (pcase--u else-rest))))) + (let ((then-body (pcase--u1 `((match ,syma . ,(pcase--upat (car qpat))) + (match ,symd . ,(pcase--upat (cdr qpat))) + ,@matches) + code vars then-rest))) + (pcase--if + `(consp ,sym) + ;; We want to be careful to only add bindings that are used. + ;; The byte-compiler could do that for us, but it would have to pay + ;; attention to the `consp' test in order to figure out that car/cdr + ;; can't signal errors and our byte-compiler is not that clever. + `(let (,@(if (get syma 'pcase-used) `((,syma (car ,sym)))) + ,@(if (get symd 'pcase-used) `((,symd (cdr ,sym))))) + ,then-body) + (pcase--u else-rest)))))) ((or (integerp qpat) (symbolp qpat) (stringp qpat)) (destructuring-bind (then-rest &rest else-rest) (pcase--split-rest sym (apply-partially 'pcase--split-equal qpat) rest) ------------------------------------------------------------ revno: 103433 committer: Jay Belanger branch nick: trunk timestamp: Sat 2011-02-26 19:55:29 -0600 message: Adjust previous change to behave as intended. diff: === modified file 'lisp/calc/calc-vec.el' --- lisp/calc/calc-vec.el 2011-02-27 01:33:37 +0000 +++ lisp/calc/calc-vec.el 2011-02-27 01:55:29 +0000 @@ -759,13 +759,13 @@ (math-reject-arg n "*Index out of range"))))) (defun calcFunc-subscr (mat n &optional m) - (if (eq (car-safe mat) 'var) nil) - (setq mat (calcFunc-mrow mat n)) - (if m - (if (math-num-integerp n) - (calcFunc-mrow mat m) - (calcFunc-mcol mat m)) - mat)) + (if (eq (car-safe mat) 'var) nil + (setq mat (calcFunc-mrow mat n)) + (if m + (if (math-num-integerp n) + (calcFunc-mrow mat m) + (calcFunc-mcol mat m)) + mat))) ;;; Get the Nth column of a matrix. (defun math-mat-col (mat n) ------------------------------------------------------------ revno: 103432 committer: Jay Belanger branch nick: trunk timestamp: Sat 2011-02-26 19:33:37 -0600 message: * calc/calc-ext.el (calc-init-extensions): Autoload `calc-l-prefix-help' instead of `calc-ul-prefix-help'. * calc/calc-math.el (calcFunc-log10): Don't signal an error in symbolic mode. * calc/calc-vec.el (calcFunc-subscr): Don't do anything if the first argument is a variable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-26 21:09:03 +0000 +++ lisp/ChangeLog 2011-02-27 01:33:37 +0000 @@ -1,3 +1,14 @@ +2011-02-27 Jay Belanger + + * calc/calc-ext.el (calc-init-extensions): + Autoload `calc-l-prefix-help' instead of `calc-ul-prefix-help'. + + * calc/calc-math.el (calcFunc-log10): Don't signal an error in + symbolic mode. + + * calc/calc-vec.el (calcFunc-subscr): Return nil if the first + argument is a variable. + 2011-02-26 Stefan Monnier * emacs-lisp/assoc.el: Remove misleading `sort' (bug#8126). === modified file 'lisp/calc/calc-ext.el' --- lisp/calc/calc-ext.el 2011-02-07 00:54:23 +0000 +++ lisp/calc/calc-ext.el 2011-02-27 01:33:37 +0000 @@ -1061,7 +1061,7 @@ calc-hyperbolic-prefix-help calc-inv-hyp-prefix-help calc-option-prefix-help calc-inverse-prefix-help calc-j-prefix-help calc-k-prefix-help calc-m-prefix-help calc-r-prefix-help calc-s-prefix-help -calc-t-prefix-help calc-u-prefix-help calc-ul-prefix-help +calc-t-prefix-help calc-u-prefix-help calc-l-prefix-help calc-v-prefix-help) ("calc-incom" calc-begin-complex calc-begin-vector calc-comma === modified file 'lisp/calc/calc-math.el' --- lisp/calc/calc-math.el 2011-01-25 04:08:28 +0000 +++ lisp/calc/calc-math.el 2011-02-27 01:33:37 +0000 @@ -1574,7 +1574,7 @@ (if calc-infinite-mode '(neg (var inf var-inf)) (math-reject-arg x "*Logarithm of zero"))) - (calc-symbolic-mode (signal 'inexact-result nil)) + ;;(calc-symbolic-mode (signal 'inexact-result nil)) ((Math-numberp x) (math-with-extra-prec 2 (let ((xf (math-float x))) === modified file 'lisp/calc/calc-vec.el' --- lisp/calc/calc-vec.el 2011-01-25 04:08:28 +0000 +++ lisp/calc/calc-vec.el 2011-02-27 01:33:37 +0000 @@ -759,6 +759,7 @@ (math-reject-arg n "*Index out of range"))))) (defun calcFunc-subscr (mat n &optional m) + (if (eq (car-safe mat) 'var) nil) (setq mat (calcFunc-mrow mat n)) (if m (if (math-num-integerp n) ------------------------------------------------------------ revno: 103431 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2011-02-26 16:09:03 -0500 message: * lisp/emacs-lisp/assoc.el: Remove misleading `sort'. (aput, adelete, amake): Replace `eval' -> `symbol-value'. Suggested by Michael Heerdegen . diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-25 23:52:19 +0000 +++ lisp/ChangeLog 2011-02-26 21:09:03 +0000 @@ -1,3 +1,9 @@ +2011-02-26 Stefan Monnier + + * emacs-lisp/assoc.el: Remove misleading `sort' (bug#8126). + (aput, adelete, amake): Replace `eval' -> `symbol-value'. + Suggested by Michael Heerdegen . + 2011-02-25 Teodor Zlatanov * password-cache.el (password-in-cache-p): Convenience function to === modified file 'lisp/emacs-lisp/assoc.el' --- lisp/emacs-lisp/assoc.el 2011-01-25 04:08:28 +0000 +++ lisp/emacs-lisp/assoc.el 2011-02-26 21:09:03 +0000 @@ -1,4 +1,4 @@ -;;; assoc.el --- insert/delete/sort functions on association lists +;;; assoc.el --- insert/delete functions on association lists ;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. @@ -35,7 +35,7 @@ the order of any other key-value pair. Side effect sets alist to new sorted list." (set alist-symbol - (sort (copy-alist (eval alist-symbol)) + (sort (copy-alist (symbol-value alist-symbol)) (function (lambda (a b) (equal (car a) key)))))) @@ -75,7 +75,7 @@ (lexical-let ((elem (aelement key value)) alist) (asort alist-symbol key) - (setq alist (eval alist-symbol)) + (setq alist (symbol-value alist-symbol)) (cond ((null alist) (set alist-symbol elem)) ((anot-head-p alist key) (set alist-symbol (nconc elem alist))) (value (setcar alist (car elem))) @@ -87,7 +87,7 @@ Alist is referenced by ALIST-SYMBOL and the key-value pair to remove is pair matching KEY. Returns the altered alist." (asort alist-symbol key) - (lexical-let ((alist (eval alist-symbol))) + (lexical-let ((alist (symbol-value alist-symbol))) (cond ((null alist) nil) ((anot-head-p alist key) alist) (t (set alist-symbol (cdr alist)))))) @@ -133,7 +133,7 @@ (t (amake alist-symbol keycdr valcdr) (aput alist-symbol keycar valcar)))) - (eval alist-symbol)) + (symbol-value alist-symbol)) (provide 'assoc) ------------------------------------------------------------ revno: 103430 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-02-26 16:02:45 +0200 message: Define nlink_t for w32. nt/config.nt (nlink_t): Define. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-02-21 20:16:43 +0000 +++ nt/ChangeLog 2011-02-26 14:02:45 +0000 @@ -1,3 +1,7 @@ +2011-02-26 Eli Zaretskii + + * config.nt (nlink_t): Define. + 2011-02-21 Christoph Scholtes * inc/stdint.h: New file, to support compilation with tool chains === modified file 'nt/config.nt' --- nt/config.nt 2011-02-04 09:17:36 +0000 +++ nt/config.nt 2011-02-26 14:02:45 +0000 @@ -411,6 +411,9 @@ #define my_strftime nstrftime /* for strftime.c */ +/* Define to the type of st_nlink in struct stat, or a supertype. */ +#define nlink_t short + #ifndef WINDOWSNT /* Some of the files of Emacs which are intended for use with other programs assume that if you have a config.h file, you must declare ------------------------------------------------------------ revno: 103429 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-02-26 15:48:14 +0200 message: Adapt the MS-DOS build to gnulib import of md5 and filemode. msdos/sedlibmk.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) (BITSIZEOF_SIZE_T, BITSIZEOF_WCHAR_T) (BITSIZEOF_WINT_TGNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_FUTIMENS) (GNULIB_LCHMOD, GNULIB_LSTAT, GNULIB_MBTOWC, GNULIB_MKDIRAT) (GNULIB_MKFIFO, GNULIB_MKFIFOAT, GNULIB_MKNOD, GNULIB_MKNODAT) (GNULIB_STAT, GNULIB_UTIMENSAT, GNULIB_WCTOMB, HAVE_FCHMODAT) (HAVE_FSTATAT, HAVE_FUTIMENS, HAVE_INTTYPES_H, HAVE_LCHMOD) (HAVE_LONG_LONG_INT, HAVE_LSTAT, HAVE_MKDIRAT, HAVE_MKFIFO) (HAVE_MKFIFOAT, HAVE_MKNOD, HAVE_MKNODAT) (HAVE_SIGNED_SIG_ATOMIC_T, HAVE_SIGNED_WCHAR_T) (HAVE_SIGNED_WINT_T, HAVE_STDINT_H, HAVE_SYS_BITYPES_H) (HAVE_SYS_INTTYPES_H, HAVE_SYS_TYPES_H) (HAVE_UNSIGNED_LONG_LONG_INT, HAVE_UTIMENSAT, HAVE_WCHAR_H) (MKDIR_P, NEXT_AS_FIRST_DIRECTIVE_STDINT_H) (NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H, NEXT_STDINT_H) (NEXT_SYS_STAT_H, REPLACE_LSTAT, REPLACE_MBTOWC, REPLACE_MKDIR) (REPLACE_MKFIFO, REPLACE_MKNOD, REPLACE_STAT, REPLACE_UTIMENSAT) (REPLACE_WCTOMB, SIG_ATOMIC_T_SUFFIX, SIZE_T_SUFFIX, STDINT_H) (WCHAR_T_SUFFIX, WINT_T_SUFFIX, APPLE_UNIVERSAL_BUILD): New edits. ($(MKDIR_P)): Replace with equivalent DOS command. (gl_LIBOBJS): Add md5.o and filemode.o. msdos/sed2v2.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) (BITSIZEOF_SIZE_T, BITSIZEOF_WCHAR_T, BITSIZEOF_WINT_T) (HAVE_LONG_LONG_INT, HAVE_SIGNED_SIG_ATOMIC_T, HAVE_SIGNED_WINT_T) (HAVE_UNSIGNED_LONG_LONG_INT, HAVE_WCHAR_H, HAVE_INTTYPES_H): New edits. msdos/depfiles.bat: Create a dummy .Po file only if a file by the same name does not already exist in the deps/ subdirectory. .bzrignore: Ignore new lib/*.in-h files. config.bat: Rename stdint.in.h and sys_stat.in.h. Call depfiles.bat even if lib/deps already exist. src/s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04. (lstat): Define for DJGPP < 2.04. diff: === modified file '.bzrignore' --- .bzrignore 2011-02-20 10:51:50 +0000 +++ .bzrignore 2011-02-26 09:35:07 +0000 @@ -49,7 +49,9 @@ lib/getopt.in-h lib/stdbool.in-h lib/stddef.in-h +lib/stdint.in-h lib/stdlib.in-h +lib/sys_stat.in-h lib/time.in-h lib/unistd.in-h lib/cxxdefs.h === modified file 'ChangeLog' --- ChangeLog 2011-02-25 10:03:28 +0000 +++ ChangeLog 2011-02-26 09:35:07 +0000 @@ -1,3 +1,10 @@ +2011-02-26 Eli Zaretskii + + * .bzrignore: Ignore new lib/*.in-h files. + + * config.bat: Rename stdint.in.h and sys_stat.in.h. Call + depfiles.bat even if lib/deps already exist. + 2011-02-25 Paul Eggert * configure, lib/Makefile.in, lib/getopt_int.h, lib/gnulib.mk: === modified file 'config.bat' --- config.bat 2011-02-19 16:53:10 +0000 +++ config.bat 2011-02-26 09:27:05 +0000 @@ -280,17 +280,20 @@ Rem Rename files like djtar on plain DOS filesystem would. If Exist c++defs.h update c++defs.h cxxdefs.h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h -If Exist stdbool.in.h update stdbool.in.h stdbool.in-h +If Exist stdint.in.h update stdint.in.h stdint.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h +If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist time.in.h update time.in.h time.in-h If Exist unistd.in.h update unistd.in.h unistd.in-h sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile rm -f makefile.tmp +Rem Create .Po files for new files in lib/ If Not Exist deps\stamp mkdir deps -If Not Exist deps\stamp for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f -If Not Exist deps\stamp echo deps-stamp > deps\stamp +for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f +echo deps-stamp > deps\stamp cd .. rem ---------------------------------------------------------------------- Echo Configuring the lisp directory... === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2011-02-19 19:56:29 +0000 +++ msdos/ChangeLog 2011-02-26 13:38:25 +0000 @@ -1,3 +1,36 @@ +2011-02-26 Eli Zaretskii + + * sedlibmk.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) + (BITSIZEOF_SIZE_T, BITSIZEOF_WCHAR_T) + (BITSIZEOF_WINT_TGNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_FUTIMENS) + (GNULIB_LCHMOD, GNULIB_LSTAT, GNULIB_MBTOWC, GNULIB_MKDIRAT) + (GNULIB_MKFIFO, GNULIB_MKFIFOAT, GNULIB_MKNOD, GNULIB_MKNODAT) + (GNULIB_STAT, GNULIB_UTIMENSAT, GNULIB_WCTOMB, HAVE_FCHMODAT) + (HAVE_FSTATAT, HAVE_FUTIMENS, HAVE_INTTYPES_H, HAVE_LCHMOD) + (HAVE_LONG_LONG_INT, HAVE_LSTAT, HAVE_MKDIRAT, HAVE_MKFIFO) + (HAVE_MKFIFOAT, HAVE_MKNOD, HAVE_MKNODAT) + (HAVE_SIGNED_SIG_ATOMIC_T, HAVE_SIGNED_WCHAR_T) + (HAVE_SIGNED_WINT_T, HAVE_STDINT_H, HAVE_SYS_BITYPES_H) + (HAVE_SYS_INTTYPES_H, HAVE_SYS_TYPES_H) + (HAVE_UNSIGNED_LONG_LONG_INT, HAVE_UTIMENSAT, HAVE_WCHAR_H) + (MKDIR_P, NEXT_AS_FIRST_DIRECTIVE_STDINT_H) + (NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H, NEXT_STDINT_H) + (NEXT_SYS_STAT_H, REPLACE_LSTAT, REPLACE_MBTOWC, REPLACE_MKDIR) + (REPLACE_MKFIFO, REPLACE_MKNOD, REPLACE_STAT, REPLACE_UTIMENSAT) + (REPLACE_WCTOMB, SIG_ATOMIC_T_SUFFIX, SIZE_T_SUFFIX, STDINT_H) + (WCHAR_T_SUFFIX, WINT_T_SUFFIX, APPLE_UNIVERSAL_BUILD): New edits. + ($(MKDIR_P)): Replace with equivalent DOS command. + (gl_LIBOBJS): Add md5.o and filemode.o. + + * sed2v2.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) + (BITSIZEOF_SIZE_T, BITSIZEOF_WCHAR_T, BITSIZEOF_WINT_T) + (HAVE_LONG_LONG_INT, HAVE_SIGNED_SIG_ATOMIC_T, HAVE_SIGNED_WINT_T) + (HAVE_UNSIGNED_LONG_LONG_INT, HAVE_WCHAR_H, HAVE_INTTYPES_H): New + edits. + + * depfiles.bat: Create a dummy .Po file only if a file by the same + name does not already exist in the deps/ subdirectory. + 2011-02-19 Eli Zaretskii * depfiles.bat: New file. === modified file 'msdos/depfiles.bat' --- msdos/depfiles.bat 2011-02-19 16:53:10 +0000 +++ msdos/depfiles.bat 2011-02-26 09:27:05 +0000 @@ -20,6 +20,6 @@ rem ---------------------------------------------------------------------- -echo %1 | sed -e "s,^,@echo # dummy > deps\\," -e "s,\.c,.Po," > tdepfile.bat +echo %1 | sed -e "s,\(.*\)\.c,@if not exist deps\\\1.Po echo # dummy > deps\\\1.Po," > tdepfile.bat call tdepfile del tdepfile.bat === modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2011-02-19 19:41:00 +0000 +++ msdos/sed2v2.inp 2011-02-26 12:55:10 +0000 @@ -62,7 +62,18 @@ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ /^#undef HAVE_DIRENT_H/s/^.*$/#define HAVE_DIRENT_H 1/ + +/^#undef BITSIZEOF_PTRDIFF_T *$/s/^.*$/#define BITSIZEOF_PTRDIFF_T 32/ +/^#undef BITSIZEOF_SIG_ATOMIC_T *$/s/^.*$/#define BITSIZEOF_SIG_ATOMIC_T 32/ +/^#undef BITSIZEOF_SIZE_T *$/s/^.*$/#define BITSIZEOF_SIZE_T 32/ +/^#undef BITSIZEOF_WCHAR_T *$/s/^.*$/#define BITSIZEOF_WCHAR_T 16/ +/^#undef BITSIZEOF_WINT_T *$/s/^.*$/#define BITSIZEOF_WINT_T 32/ /^#undef HAVE__BOOL/s/^.*$/#define HAVE__BOOL 1/ +/^#undef HAVE_LONG_LONG_INT *$/s/^.*$/#define HAVE_LONG_LONG_INT 1/ +/^#undef HAVE_SIGNED_SIG_ATOMIC_T *$/s/^.*$/#define HAVE_SIGNED_SIG_ATOMIC_T 1/ +/^#undef HAVE_SIGNED_WINT_T *$/s/^.*$/#define HAVE_SIGNED_WINT_T 1/ +/^#undef HAVE_UNSIGNED_LONG_LONG_INT *$/s/^.*$/#define HAVE_UNSIGNED_LONG_LONG_INT 1/ +/^#under HAVE_WCHAR_H *$/s/^.*$/#define HAVE_WCHAR_H 1/ /^#undef inline/s/^.*$/#define inline __inline__/ /^#undef my_strftime/s/^.*$/#define my_strftime nstrftime/ /^#undef restrict/s/^.*$/#define restrict __restrict/ @@ -77,6 +88,12 @@ s!^#undef config_machfile *$!#define config_machfile "m/intel386.h"! s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ +/^#undef HAVE_INTTYPES_H/c\ +#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3\ +#define HAVE_INTTYPES_H 1\ +#else\ +#undef HAVE_INTTYPES_H\ +#endif /^#undef HAVE_STDINT_H/c\ #if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3\ #define HAVE_STDINT_H 1\ === modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2011-02-19 19:41:00 +0000 +++ msdos/sedlibmk.inp 2011-02-26 13:38:25 +0000 @@ -47,6 +47,14 @@ /^EXEEXT *=/s/@[^@\n]*@/.exe/ /^GETOPT_H *=/s/@[^@\n]*@/getopt.h/ # +# Gnulib stuff +/^BITSIZEOF_PTRDIFF_T *=/s/@BITSIZEOF_PTRDIFF_T@/32/ +/^BITSIZEOF_SIG_ATOMIC_T *=/s/@BITSIZEOF_SIG_ATOMIC_T@/32/ +/^BITSIZEOF_SIZE_T *=/s/@BITSIZEOF_SIZE_T@/32/ +/^BITSIZEOF_WCHAR_T *=/s/@BITSIZEOF_WCHAR_T@/16/ +/^BITSIZEOF_WINT_T *=/s/@BITSIZEOF_WINT_T@/32/ +/^APPLE_UNIVERSAL_BUILD *=/s/@APPLE_UNIVERSAL_BUILD@/0/ +# # Some GNULIB_* are replaced with zero even though DJGPP does not have # these features. That's because the gnulib replacements cannot # possibly work for DJGPP, so we prefer to fail the link than have a @@ -63,8 +71,11 @@ /^GNULIB_FACCESSAT *=/s/@GNULIB_FACCESSAT@/0/ /^GNULIB_FCHDIR *=/s/@GNULIB_FCHDIR@/0/ /^GNULIB_FCHOWNAT *=/s/@GNULIB_FCHOWNAT@/0/ +/^GNULIB_FCHMODAT *=/s/@GNULIB_FCHMODAT@/0/ +/^GNULIB_FSTATAT *=/s/@GNULIB_FSTATAT@/0/ /^GNULIB_FSYNC *=/s/@GNULIB_FSYNC@/0/ /^GNULIB_FTRUNCATE *=/s/@GNULIB_FTRUNCATE@/0/ +/^GNULIB_FUTIMENS *=/s/@GNULIB_FUTIMENS@/0/ /^GNULIB_GETCWD *=/s/@GNULIB_GETCWD@/0/ /^GNULIB_GETDOMAINNAME *=/s/@GNULIB_GETDOMAINNAME@/0/ /^GNULIB_GETDTABLESIZE *=/s/@GNULIB_GETDTABLESIZE@/0/ @@ -77,12 +88,20 @@ /^GNULIB_GETSUBOPT *=/s/@GNULIB_GETSUBOPT@/0/ /^GNULIB_GETUSERSHELL *=/s/@GNULIB_GETUSERSHELL@/0/ /^GNULIB_GRANTPT *=/s/@GNULIB_GRANTPT@/0/ +/^GNULIB_LCHMOD *=/s/@GNULIB_LCHMOD@/0/ /^GNULIB_LCHOWN *=/s/@GNULIB_LCHOWN@/0/ /^GNULIB_LINK *=/s/@GNULIB_LINK@/0/ /^GNULIB_LINKAT *=/s/@GNULIB_LINKAT@/0/ /^GNULIB_LSEEK *=/s/@GNULIB_LSEEK@/0/ +/^GNULIB_LSTAT *=/s/@GNULIB_LSTAT@/0/ /^GNULIB_MALLOC_POSIX *=/s/@GNULIB_MALLOC_POSIX@/0/ +/^GNULIB_MBTOWC *=/s/@GNULIB_MBTOWC@/0/ +/^GNULIB_MKDIRAT *=/s/@GNULIB_MKDIRAT@/0/ /^GNULIB_MKDTEMP *=/s/@GNULIB_MKDTEMP@/0/ +/^GNULIB_MKFIFO *=/s/@GNULIB_MKFIFO@/0/ +/^GNULIB_MKFIFOAT *=/s/@GNULIB_MKFIFOAT@/0/ +/^GNULIB_MKNOD *=/s/@GNULIB_MKNOD@/0/ +/^GNULIB_MKNODAT *=/s/@GNULIB_MKNODAT@/0/ /^GNULIB_MKOSTEMP *=/s/@GNULIB_MKOSTEMP@/0/ /^GNULIB_MKOSTEMPS *=/s/@GNULIB_MKOSTEMPS@/0/ /^GNULIB_MKSTEMP *=/s/@GNULIB_MKSTEMP@/0/ @@ -104,6 +123,7 @@ /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ /^GNULIB_SLEEP *=/s/@GNULIB_SLEEP@/0/ +/^GNULIB_STAT *=/s/@GNULIB_STAT@/0/ /^GNULIB_STRPTIME *=/s/@GNULIB_STRPTIME@/0/ /^GNULIB_STRTOD *=/s/@GNULIB_STRTOD@/0/ /^GNULIB_STRTOLL *=/s/@GNULIB_STRTOLL@/0/ @@ -121,6 +141,8 @@ /^GNULIB_UNLOCKPT *=/s/@GNULIB_UNLOCKPT@/0/ /^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ /^GNULIB_USLEEP *=/s/@GNULIB_USLEEP@/0/ +/^GNULIB_UTIMENSAT *=/s/@GNULIB_UTIMENSAT@/0/ +/^GNULIB_WCTOMB *=/s/@GNULIB_WCTOMB@/0/ /^GNULIB_WRITE *=/s/@GNULIB_WRITE@/0/ /^GNULIB__EXIT *=/s/@GNULIB__EXIT@/0/ /^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/ @@ -142,9 +164,12 @@ /^HAVE_EUIDACCESS *=/s/@HAVE_EUIDACCESS@/0/ /^HAVE_FACCESSAT *=/s/@HAVE_FACCESSAT@/0/ /^HAVE_FCHDIR *=/s/@HAVE_FCHDIR@/0/ +/^HAVE_FCHMODAT *=/s/@HAVE_FCHMODAT@/0/ /^HAVE_FCHOWNAT *=/s/@HAVE_FCHOWNAT@/0/ +/^HAVE_FSTATAT *=/s/@HAVE_FSTATAT@/0/ /^HAVE_FSYNC *=/s/@HAVE_FSYNC@/1/ /^HAVE_FTRUNCATE *=/s/@HAVE_FTRUNCATE@/1/ +/^HAVE_FUTIMENS *=/s/@HAVE_FUTIMENS@/0/ /^HAVE_GETDTABLESIZE *=/s/@HAVE_GETDTABLESIZE@/0/ /^HAVE_GETGROUPS *=/s/@HAVE_GETGROUPS@/0/ /^HAVE_GETHOSTNAME *=/s/@HAVE_GETHOSTNAME@/1/ @@ -154,10 +179,19 @@ /^HAVE_GETSUBOPT *=/s/@HAVE_GETSUBOPT@/0/ /^HAVE_GRANTPT *=/s/@HAVE_GRANTPT@/0/ /^HAVE_LCHOWN *=/s/@HAVE_LCHOWN@/0/ +/^HAVE_INTTYPES_H *=/s/@HAVE_INTTYPES_H@/HAVE_INTTYPES_H/ +/^HAVE_LCHMOD *=/s/@HAVE_LCHMOD@/0/ /^HAVE_LINK *=/s/@HAVE_LINK@/1/ /^HAVE_LINKAT *=/s/@HAVE_LINKAT@/0/ +/^HAVE_LONG_LONG_INT *=/s/@HAVE_LONG_LONG_INT@/1/ +/^HAVE_LSTAT *=/s/@HAVE_LSTAT@/HAVE_LSTAT/ /^HAVE_MAKEINFO *=/s/@HAVE_MAKEINFO@/yes/ +/^HAVE_MKDIRAT *=/s/@HAVE_MKDIRAT@/0/ /^HAVE_MKDTEMP *=/s/@HAVE_MKDTEMP@/0/ +/^HAVE_MKFIFO *=/s/@HAVE_MKFIFO@/1/ +/^HAVE_MKFIFOAT *=/s/@HAVE_MKFIFOAT@/0/ +/^HAVE_MKNOD *=/s/@HAVE_MKNOD@/1/ +/^HAVE_MKNODAT *=/s/@HAVE_MKNODAT@/0/ /^HAVE_MKOSTEMP *=/s/@HAVE_MKOSTEMP@/0/ /^HAVE_MKOSTEMPS *=/s/@HAVE_MKOSTEMPS@/0/ /^HAVE_MKSTEMP *=/s/@HAVE_MKSTEMP@/1/ @@ -176,7 +210,11 @@ /^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ +/^HAVE_SIGNED_SIG_ATOMIC_T *=/s/@HAVE_SIGNED_SIG_ATOMIC_T@/1/ +/^HAVE_SIGNED_WCHAR_T *=/s/@HAVE_SIGNED_WCHAR_T@/0/ +/^HAVE_SIGNED_WINT_T *=/s/@HAVE_SIGNED_WINT_T@/1/ /^HAVE_SLEEP *=/s/@HAVE_SLEEP@/1/ +/^HAVE_STDINT_H *=/s/@HAVE_STDINT_H@/HAVE_STDINT_H/ /^HAVE_STRPTIME *=/s/@HAVE_STRPTIME@/0/ /^HAVE_STRTOD *=/s/@HAVE_STRTOD@/1/ /^HAVE_STRTOLL *=/s/@HAVE_STRTOLL@/1/ @@ -184,13 +222,19 @@ /^HAVE_STRUCT_RANDOM_DATA *=/s/@HAVE_STRUCT_RANDOM_DATA@/0/ /^HAVE_SYMLINK *=/s/@HAVE_SYMLINK@/1/ /^HAVE_SYMLINKAT *=/s/@HAVE_SYMLINKAT@/0/ +/^HAVE_SYS_BITYPES_H *=/s/@HAVE_SYS_BITYPES_H@/0/ +/^HAVE_SYS_INTTYPES_H *=/s/@HAVE_SYS_INTTYPES_H@/0/ /^HAVE_SYS_LOADAVG_H *=/s/@HAVE_SYS_LOADAVG_H@/0/ /^HAVE_SYS_PARAM_H *=/s/@HAVE_SYS_PARAM_H@/1/ +/^HAVE_SYS_TYPES_H *=/s/@HAVE_SYS_TYPES_H@/1/ /^HAVE_TIMEGM *=/s/@HAVE_TIMEGM@/0/ /^HAVE_UNISTD_H *=/s/@HAVE_UNISTD_H@/1/ /^HAVE_UNLINKAT *=/s/@HAVE_UNLINKAT@/0/ /^HAVE_UNLOCKPT *=/s/@HAVE_UNLOCKPT@/0/ +/^HAVE_UNSIGNED_LONG_LONG_INT *=/s/@HAVE_UNSIGNED_LONG_LONG_INT@/1/ /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ +/^HAVE_UTIMENSAT *=/s/@HAVE_UTIMENSAT@/0/ +/^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ /^HAVE_XSERVER *=/s/@HAVE_XSERVER@/0/ /^HAVE__BOOL *=/s/@HAVE__BOOL@/1/ @@ -201,14 +245,20 @@ /^LD_FIRSTFLAG *=/s/@[^@\n]*@// /^LIBS *=/s/@[^@\n]*@// /^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ +# MKDIR_P lines are edited further below +/^MKDIR_P *=/s/@MKDIR_P@// /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!! /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// /^NEXT_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_STDINT_H *=/s/@[^@\n]*@// /^NEXT_STDLIB_H *=/s/@[^@\n]*@// +/^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!! /^NEXT_TIME_H *=/s/@[^@\n]*@// /^NEXT_UNISTD_H *=/s/@[^@\n]*@// /^OBJEXT *=/s/@[^@\n]*@/o/ @@ -223,6 +273,7 @@ /^REPLACE_DUP *=/s/@REPLACE_DUP@/0/ /^REPLACE_DUP2 *=/s/@REPLACE_DUP2@/0/ /^REPLACE_FCHOWNAT *=/s/@REPLACE_FCHOWNAT@/0/ +/^REPLACE_FSTAT *=/s/@REPLACE_FSTAT@/0/ /^REPLACE_GETCWD *=/s/@REPLACE_GETCWD@/0/ /^REPLACE_GETDOMAINNAME *=/s/@REPLACE_GETDOMAINNAME@/0/ /^REPLACE_GETGROUPS *=/s/@REPLACE_GETGROUPS@/0/ @@ -233,7 +284,12 @@ /^REPLACE_LINKAT *=/s/@REPLACE_LINKAT@/0/ /^REPLACE_LOCALTIME_R *=/s/@REPLACE_LOCALTIME_R@/0/ /^REPLACE_LSEEK *=/s/@REPLACE_LSEEK@/0/ +/^REPLACE_LSTAT *=/s/@REPLACE_LSTAT@/0/ /^REPLACE_MALLOC *=/s/@REPLACE_MALLOC@/0/ +/^REPLACE_MBTOWC *=/s/@REPLACE_MBTOWC@/0/ +/^REPLACE_MKDIR *=/s/@REPLACE_MKDIR@/0/ +/^REPLACE_MKFIFO *=/s/@REPLACE_MKFIFO@/0/ +/^REPLACE_MKNOD *=/s/@REPLACE_MKNOD@/0/ /^REPLACE_MKSTEMP *=/s/@REPLACE_MKSTEMP@/0/ /^REPLACE_MKTIME *=/s/@REPLACE_MKTIME@/0/ /^REPLACE_NANOSLEEP *=/s/@REPLACE_NANOSLEEP@/0/ @@ -247,6 +303,7 @@ /^REPLACE_RMDIR *=/s/@REPLACE_RMDIR@/0/ /^REPLACE_SETENV *=/s/@REPLACE_SETENV@/0/ /^REPLACE_SLEEP *=/s/@REPLACE_SLEEP@/0/ +/^REPLACE_STAT *=/s/@REPLACE_STAT@/0/ /^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ /^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ /^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ @@ -255,14 +312,21 @@ /^REPLACE_UNLINKAT *=/s/@REPLACE_UNLINKAT@/0/ /^REPLACE_UNSETENV *=/s/@REPLACE_UNSETENV@/0/ /^REPLACE_USLEEP *=/s/@REPLACE_USLEEP@/0/ +/^REPLACE_UTIMENSAT *=/s/@REPLACE_UTIMENSAT@/0/ +/^REPLACE_WCTOMB *=/s/@REPLACE_WCTOMB@/0/ /^REPLACE_WRITE *=/s/@REPLACE_WRITE@/0/ +/^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// +/^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^STDBOOL_H *=/s/@[^@\n]*@// /^STDDEF_H *=/s/@[^@\n]*@// +/^STDINT_H *=/s/@[^@\n]*@/stdint.h/ /^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ -/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o/ +/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ +/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o md5.o filemode.o/ /^srcdir *=/s/@[^@\n]*@/./ /^top_srcdir *=/s/@[^@\n]*@/../ /^top_builddir *=/s/@[^@\n]*@/../ @@ -310,3 +374,4 @@ /^unistd\.h:/,/^ [ ]*mv /{ s/'\; \\ *$/' >> $@-t/ } +s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\stat.h md sys"! === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-25 06:30:50 +0000 +++ src/ChangeLog 2011-02-26 12:55:10 +0000 @@ -1,3 +1,8 @@ +2011-02-26 Eli Zaretskii + + * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04. + (lstat): Define for DJGPP < 2.04. + 2011-02-25 Paul Eggert * dired.c (Ffile_attributes): Increase size of modes from 10 to 12 === modified file 'src/s/msdos.h' --- src/s/msdos.h 2011-02-19 15:57:35 +0000 +++ src/s/msdos.h 2011-02-26 12:55:10 +0000 @@ -80,6 +80,12 @@ strtold, so use _strtold in all versions. */ #define strtold _strtold +#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3 +# define HAVE_LSTAT 1 +#else +# define lstat stat +#endif + /* End of gnulib-related stuff. */ /* When $TERM is "internal" then this is substituted: */ ------------------------------------------------------------ revno: 103428 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2011-02-26 10:48:22 +0100 message: Regenerate ja-dic.el diff: === modified file 'leim/ja-dic/ja-dic.el' --- leim/ja-dic/ja-dic.el 2010-02-16 07:39:44 +0000 +++ leim/ja-dic/ja-dic.el 2011-02-26 09:48:22 +0000 @@ -1,6 +1,6 @@ -;;; ja-dic.el --- dictionary for Japanese input method -*-coding: euc-japan; byte-compile-disable-print-circle:t; -*- +;;; ja-dic.el --- dictionary for Japanese input method -*-coding: euc-japan; -*- ;; Generated by the command `skkdic-convert' -;; Date: Tue Feb 16 15:59:19 2010 +;; Date: Sat Feb 26 10:26:11 2011 ;; Original SKK dictionary file: ../SKK-DIC/SKK-JISYO.L ;; This file is part of GNU Emacs. @@ -16984,7 +16984,6 @@ ;; Setting okuri-nasi entries. (skkdic-set-okuri-nasi -"¤ò¤ó¤Ê ½÷" "¡¼ ¡Á" "¤¢ ÓË ÌÀ °Â ë¨ Ò÷ °£ Ûó г °¢ áÞ Õ´ °¤ Èà ¸ã °¡" "¤¢¡¼¤¯¤È¤¦ ¥¢¡¼¥¯Åô" ------------------------------------------------------------ revno: 103427 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2011-02-26 10:48:22 +0100 message: Regenerate autoloads diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2011-02-23 03:44:13 +0000 +++ lisp/dired.el 2011-02-26 09:48:22 +0000 @@ -4073,7 +4073,7 @@ ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "515e1dbc42acebd9a0175c4209b6673c") +;;;;;; "c24f202ea049990539accfd4c2c73fe9") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-02-23 04:19:28 +0000 +++ lisp/mail/rmail.el 2011-02-26 09:48:22 +0000 @@ -4316,7 +4316,7 @@ ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "04902da045706fb7f2b0915529ed161b") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "c530622b53038152ca84f2ec9313bd7a") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ ------------------------------------------------------------ revno: 103426 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-02-26 10:36:56 +0200 message: Fix dependencies following revision 103424. lib-src/Makefile.in (fakemail${EXEEXT}): Depend on lib/ignore-value.h. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2011-02-26 07:44:38 +0000 +++ lib-src/ChangeLog 2011-02-26 08:36:56 +0000 @@ -1,5 +1,7 @@ 2011-02-26 Eli Zaretskii + * Makefile.in (fakemail${EXEEXT}): Depend on lib/ignore-value.h. + * emacsclient.c (xstrdup) [WINDOWSNT]: Function added back. (w32_getenv): Use xstrdup to return all values in malloc'ed storage. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2011-02-22 00:08:53 +0000 +++ lib-src/Makefile.in 2011-02-26 08:36:56 +0000 @@ -353,7 +353,7 @@ pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h ../src/config.h $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c -fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h +fakemail${EXEEXT}: ${srcdir}/fakemail.c ${srcdir}/../lib/ignore-value.h ../src/config.h $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h ------------------------------------------------------------ revno: 103425 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-02-26 09:44:38 +0200 message: Fix the MS-Windows build after revision 103424. emacsclient.c (xstrdup) [WINDOWSNT]: Function added back. (w32_getenv): Use xstrdup to return all values in malloc'ed storage. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2011-02-26 05:43:51 +0000 +++ lib-src/ChangeLog 2011-02-26 07:44:38 +0000 @@ -1,3 +1,9 @@ +2011-02-26 Eli Zaretskii + + * emacsclient.c (xstrdup) [WINDOWSNT]: Function added back. + (w32_getenv): Use xstrdup to return all values in malloc'ed + storage. + 2011-02-26 Paul Eggert * ebrowse.c (parse_qualified_param_ident_or_type): Make it clear === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2011-02-26 00:17:02 +0000 +++ lib-src/emacsclient.c 2011-02-26 07:44:38 +0000 @@ -293,6 +293,20 @@ #ifdef WINDOWSNT +/* Like strdup but get a fatal error if memory is exhausted. */ + +char * +xstrdup (const char *s) +{ + char *result = strdup (s); + if (result == NULL) + { + perror ("strdup"); + exit (EXIT_FAILURE); + } + return result; +} + #define REG_ROOT "SOFTWARE\\GNU\\Emacs" /* Retrieve an environment variable from the Emacs subkeys of the registry. @@ -328,9 +342,11 @@ /* getenv wrapper for Windows - This is needed to duplicate Emacs's behavior, which is to look for environment - variables in the registry if they don't appear in the environment. -*/ + Value is allocated on the heap, and can be free'd. + + This is needed to duplicate Emacs's behavior, which is to look for + environment variables in the registry if they don't appear in the + environment. */ char * w32_getenv (char *envvar) { @@ -338,15 +354,16 @@ DWORD dwType; if (value = getenv (envvar)) - /* Found in the environment. */ - return value; + /* Found in the environment. strdup it, because values returned + by getenv cannot be free'd. */ + return xstrdup (value); if (! (value = w32_get_resource (HKEY_CURRENT_USER, envvar, &dwType)) && ! (value = w32_get_resource (HKEY_LOCAL_MACHINE, envvar, &dwType))) { /* "w32console" is what Emacs on Windows uses for tty-type under -nw. */ if (strcmp (envvar, "TERM") == 0) - return "w32console"; + return xstrdup ("w32console"); /* Found neither in the environment nor in the registry. */ return NULL; } ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.