Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100545. ------------------------------------------------------------ revno: 100545 committer: Dan Nicolaescu branch nick: trunk timestamp: Mon 2010-06-07 20:12:21 -0700 message: * src/lread.c (X_OK): Remove, unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-08 03:06:47 +0000 +++ src/ChangeLog 2010-06-08 03:12:21 +0000 @@ -1,5 +1,7 @@ 2010-06-08 Dan Nicolaescu + * lread.c (X_OK): Remove, unused. + * dispnew.c: Remove obsolete comment. Remove INCLUDED_FCNTL. === modified file 'src/lread.c' --- src/lread.c 2010-04-20 01:50:52 +0000 +++ src/lread.c 2010-06-08 03:12:21 +0000 @@ -48,10 +48,6 @@ #include #endif -#ifndef X_OK -#define X_OK 01 -#endif - #include #ifdef HAVE_SETLOCALE ------------------------------------------------------------ revno: 100544 committer: Dan Nicolaescu branch nick: trunk timestamp: Mon 2010-06-07 20:06:47 -0700 message: * src/dispnew.c: Remove obsolete comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-08 03:02:41 +0000 +++ src/ChangeLog 2010-06-08 03:06:47 +0000 @@ -1,5 +1,7 @@ 2010-06-08 Dan Nicolaescu + * dispnew.c: Remove obsolete comment. + Remove INCLUDED_FCNTL. * xterm.c (INCLUDED_FCNTL): * callproc.c (INCLUDED_FCNTL): === modified file 'src/dispnew.c' --- src/dispnew.c 2010-05-18 15:22:15 +0000 +++ src/dispnew.c 2010-06-08 03:06:47 +0000 @@ -47,9 +47,6 @@ #include "blockinput.h" #include "process.h" -/* I don't know why DEC Alpha OSF1 fail to compile this file if we - include the following file. */ -/* #include "systty.h" */ #include "syssignal.h" #ifdef HAVE_X_WINDOWS ------------------------------------------------------------ revno: 100543 committer: Dan Nicolaescu branch nick: trunk timestamp: Mon 2010-06-07 20:02:41 -0700 message: Remove INCLUDED_FCNTL. * xterm.c (INCLUDED_FCNTL): * callproc.c (INCLUDED_FCNTL): * alloc.c (INCLUDED_FCNTL): * systty.h (INCLUDED_FCNTL): Remove all uses, not needed anymore. (emacs_get_tty, emacs_set_tty): Declare unconditionally. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-07 18:28:02 +0000 +++ src/ChangeLog 2010-06-08 03:02:41 +0000 @@ -1,3 +1,12 @@ +2010-06-08 Dan Nicolaescu + + Remove INCLUDED_FCNTL. + * xterm.c (INCLUDED_FCNTL): + * callproc.c (INCLUDED_FCNTL): + * alloc.c (INCLUDED_FCNTL): + * systty.h (INCLUDED_FCNTL): Remove all uses, not needed anymore. + (emacs_get_tty, emacs_set_tty): Declare unconditionally. + 2010-06-07 Martin Rudalics * window.c (Fselect_window): Move `record_buffer' up to the === modified file 'src/alloc.c' --- src/alloc.c 2010-04-20 01:50:52 +0000 +++ src/alloc.c 2010-06-08 03:02:41 +0000 @@ -70,7 +70,6 @@ #endif #ifdef HAVE_FCNTL_H -#define INCLUDED_FCNTL #include #endif #ifndef O_WRONLY === modified file 'src/callproc.c' --- src/callproc.c 2010-05-27 23:30:11 +0000 +++ src/callproc.c 2010-06-08 03:02:41 +0000 @@ -39,7 +39,6 @@ #include #ifdef HAVE_FCNTL_H -#define INCLUDED_FCNTL #include #endif @@ -53,7 +52,6 @@ #endif #ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */ -#define INCLUDED_FCNTL #include #include #include === modified file 'src/systty.h' --- src/systty.h 2010-05-06 19:46:47 +0000 +++ src/systty.h 2010-06-08 03:02:41 +0000 @@ -27,17 +27,13 @@ #ifndef NO_TERMIO #include #endif /* not NO_TERMIO */ -#ifndef INCLUDED_FCNTL -#define INCLUDED_FCNTL #include -#endif #else /* not HAVE_TERMIO */ #ifdef HAVE_TERMIOS #ifndef NO_TERMIO #include #endif #include -#define INCLUDED_FCNTL #include #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ #ifndef DOS_NT @@ -247,10 +243,8 @@ expression, so we moved them out to their own functions in sysdep.c. */ #define EMACS_GET_TTY(fd, p) (emacs_get_tty ((fd), (p))) #define EMACS_SET_TTY(fd, p, waitp) (emacs_set_tty ((fd), (p), (waitp))) -#ifdef P_ /* Unfortunately this file is sometimes included before lisp.h */ -extern int emacs_get_tty P_ ((int, struct emacs_tty *)); -extern int emacs_set_tty P_ ((int, struct emacs_tty *, int)); -#endif +extern int emacs_get_tty (int, struct emacs_tty *); +extern int emacs_set_tty (int, struct emacs_tty *, int); /* Define EMACS_TTY_TABS_OK. */ === modified file 'src/xterm.c' --- src/xterm.c 2010-05-06 09:34:56 +0000 +++ src/xterm.c 2010-06-08 03:02:41 +0000 @@ -56,9 +56,7 @@ #include "systime.h" -#ifndef INCLUDED_FCNTL #include -#endif #include #include #include ------------------------------------------------------------ revno: 100542 committer: Dan Nicolaescu branch nick: trunk timestamp: Mon 2010-06-07 19:29:12 -0700 message: Include and instead of "strings.h" and "string.h". diff: === modified file 'ChangeLog' --- ChangeLog 2010-06-06 08:57:39 +0000 +++ ChangeLog 2010-06-08 02:29:12 +0000 @@ -1,3 +1,8 @@ +2010-06-08 Dan Nicolaescu + + * configure.in: Include and instead of + "strings.h" and "string.h". + 2010-06-06 Dan Nicolaescu * configure.in: Remove code dealing with BSTRING. === modified file 'configure.in' --- configure.in 2010-06-06 08:57:39 +0000 +++ configure.in 2010-06-08 02:29:12 +0000 @@ -3610,11 +3610,11 @@ #endif /* __P */ #ifdef HAVE_STRING_H -#include "string.h" +#include #endif #ifdef HAVE_STRINGS_H -#include "strings.h" /* May be needed for bcopy & al. */ +#include /* May be needed for bcopy & al. */ #endif #ifdef HAVE_STDLIB_H === modified file 'src/config.in' --- src/config.in 2010-06-06 08:57:39 +0000 +++ src/config.in 2010-06-08 02:29:12 +0000 @@ -1141,11 +1141,11 @@ #endif /* __P */ #ifdef HAVE_STRING_H -#include "string.h" +#include #endif #ifdef HAVE_STRINGS_H -#include "strings.h" /* May be needed for bcopy & al. */ +#include /* May be needed for bcopy & al. */ #endif #ifdef HAVE_STDLIB_H ------------------------------------------------------------ revno: 100541 [merge] committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-06-07 23:01:34 +0000 message: Synch with Gnus trunk. 2010-06-07 Teodor Zlatanov * gnus.texi (Interactive): Explain effect of gnus-expert-user better. 2010-06-07 Teemu Likonen (tiny change) * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Don't ask about deleting unused directories when gnus-expert-user is t. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-05-26 10:13:45 +0000 +++ doc/misc/ChangeLog 2010-06-07 23:00:42 +0000 @@ -1,3 +1,7 @@ +2010-06-07 Teodor Zlatanov + + * gnus.texi (Interactive): Explain effect of gnus-expert-user better. + 2010-05-26 Michael Albinus * eshell.texi (Built-ins): Describe, how to disable a built-in command === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-04-19 15:07:52 +0000 +++ doc/misc/gnus.texi 2010-06-07 23:00:42 +0000 @@ -22906,8 +22906,11 @@ @item gnus-expert-user @vindex gnus-expert-user If this variable is non-@code{nil}, you will seldom be asked any -questions by Gnus. It will simply assume you know what you're doing, no -matter how strange. +questions by Gnus. It will simply assume you know what you're doing, +no matter how strange. For example, quitting Gnus, exiting a group +without an update, catching up with a group, deleting expired +articles, and replying by mail to a news message will not require +confirmation. @item gnus-interactive-catchup @vindex gnus-interactive-catchup === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-06-02 00:10:42 +0000 +++ lisp/gnus/ChangeLog 2010-06-07 23:00:42 +0000 @@ -1,3 +1,8 @@ +2010-06-07 Teemu Likonen (tiny change) + + * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Don't ask about + deleting unused directories when gnus-expert-user is t. + 2010-06-02 Katsumi Yamaoka * gnus-art.el (gnus-article-browse-delete-temp-files): Don't make query === modified file 'lisp/gnus/gnus-agent.el' --- lisp/gnus/gnus-agent.el 2010-03-23 07:37:09 +0000 +++ lisp/gnus/gnus-agent.el 2010-06-07 23:00:42 +0000 @@ -3634,7 +3634,8 @@ deleting them?"))) (while to-remove (let ((dir (pop to-remove))) - (if (gnus-y-or-n-p (format "Delete %s? " dir)) + (if (or gnus-expert-user + (gnus-y-or-n-p (format "Delete %s? " dir))) (let* (delete-recursive files f (delete-recursive ------------------------------------------------------------ revno: 100540 author: Martin Pohlack committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-06-07 17:01:23 -0400 message: * lisp/iimage.el: Remove images as soon as the underlying text is modified. (iimage-modification-hook): New function. (iimage-mode-buffer): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-07 19:37:50 +0000 +++ lisp/ChangeLog 2010-06-07 21:01:23 +0000 @@ -1,3 +1,9 @@ +2010-06-07 Martin Pohlack + + * iimage.el: Remove images as soon as the underlying text is modified. + (iimage-modification-hook): New function. + (iimage-mode-buffer): Use it. + 2010-06-07 Stefan Monnier * emacs-lisp/smie.el (smie-indent-offset-rule): Rename from @@ -4691,8 +4697,8 @@ 2009-12-10 Vinicius Jose Latorre - * whitespace.el (whitespace-display-char-on): Ensure - `buffer-display-table' is unique when two or more windows are + * whitespace.el (whitespace-display-char-on): + Ensure `buffer-display-table' is unique when two or more windows are visible. Reported by Martin Pohlack . New version 12.1. === modified file 'lisp/ChangeLog.13' --- lisp/ChangeLog.13 2010-05-11 02:04:13 +0000 +++ lisp/ChangeLog.13 2010-06-07 21:01:23 +0000 @@ -7161,7 +7161,7 @@ * doc-view.el (doc-view-search-backward, doc-view-search): Fix assignment to free variable bug. -2007-11-16 Martin Pohlack (tiny change) +2007-11-16 Martin Pohlack * emulation/pc-select.el (pc-select-shifted-mark): New var. (ensure-mark): Set it. === modified file 'lisp/iimage.el' --- lisp/iimage.el 2010-05-11 18:51:27 +0000 +++ lisp/iimage.el 2010-06-07 21:01:23 +0000 @@ -101,6 +101,19 @@ (interactive) (iimage-mode 0)) +(defun iimage-modification-hook (beg end) + "Remove display property if a display region is modified." + ;;(debug-print "ii1 begin %d, end %d\n" beg end) + (let ((inhibit-modification-hooks t) + (beg (previous-single-property-change end 'display + nil (line-beginning-position))) + (end (next-single-property-change beg 'display + nil (line-end-position)))) + (when (and beg end (plist-get (text-properties-at beg) 'display)) + ;;(debug-print "ii2 begin %d, end %d\n" beg end) + (remove-text-properties beg end + '(display nil modification-hooks nil))))) + (defun iimage-mode-buffer (arg) "Display images if ARG is non-nil, undisplay them otherwise." (let ((image-path (cons default-directory iimage-mode-image-search-path)) @@ -110,16 +123,18 @@ (goto-char (point-min)) (dolist (pair iimage-mode-image-regex-alist) (while (re-search-forward (car pair) nil t) - (if (and (setq file (match-string (cdr pair))) - (setq file (locate-file file image-path))) - ;; FIXME: we don't mark our images, so we can't reliably - ;; remove them either (we may leave some of ours, and we - ;; may remove other packages's display properties). - (if arg - (add-text-properties (match-beginning 0) (match-end 0) - (list 'display (create-image file))) - (remove-text-properties (match-beginning 0) (match-end 0) - '(display)))))))))) + (when (and (setq file (match-string (cdr pair))) + (setq file (locate-file file image-path))) + ;; FIXME: we don't mark our images, so we can't reliably + ;; remove them either (we may leave some of ours, and we + ;; may remove other packages's display properties). + (if arg + (add-text-properties (match-beginning 0) (match-end 0) + `(display ,(create-image file) + modification-hooks + (iimage-modification-hook))) + (remove-text-properties (match-beginning 0) (match-end 0) + '(display modification-hooks)))))))))) ;;;###autoload (define-minor-mode iimage-mode ------------------------------------------------------------ revno: 100539 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-06-07 15:37:50 -0400 message: * lisp/emacs-lisp/smie.el (smie-indent-offset-rule): Rename from smie-indent-offset-after. Add :prev case. Make a bit more generic. (smie-indent-virtual): Remove `virtual' arg. Update callers. (smie-indent-keyword): Add handling of open-paren keywords. (smie-indent-comment-continue): Don't assume comment-continue. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-07 18:28:02 +0000 +++ lisp/ChangeLog 2010-06-07 19:37:50 +0000 @@ -1,3 +1,11 @@ +2010-06-07 Stefan Monnier + + * emacs-lisp/smie.el (smie-indent-offset-rule): Rename from + smie-indent-offset-after. Add :prev case. Make a bit more generic. + (smie-indent-virtual): Remove `virtual' arg. Update callers. + (smie-indent-keyword): Add handling of open-paren keywords. + (smie-indent-comment-continue): Don't assume comment-continue. + 2010-06-07 Martin Rudalics * window.el (pop-to-buffer): Remove the conditional that === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2010-06-07 02:10:19 +0000 +++ lisp/emacs-lisp/smie.el 2010-06-07 19:37:50 +0000 @@ -500,6 +500,7 @@ ;; I.e. the indentation after "=" depends on the parent ("structure") ;; as well as on the following token ("struct"). "Rules of the following form. +\((:before . TOK) . OFFSET-RULES) how to indent TOK itself. \(TOK . OFFSET-RULES) how to indent right after TOK. \((T1 . T2) . OFFSET) how to indent token T2 w.r.t T1. \((t . TOK) . OFFSET) how to indent TOK with respect to its parent. @@ -508,12 +509,17 @@ \(t . OFFSET) basic indentation step. \(args . OFFSET) indentation of arguments. -OFFSET-RULES is list of elements which can either be an integer (the offset to -use), or a cons of the form +OFFSET-RULES is a list of elements which can each either be: + \(:hanging . OFFSET-RULES) if TOK is hanging, use OFFSET-RULES. \(:parent PARENT . OFFSET-RULES) if TOK's parent is PARENT, use OFFSET-RULES. \(:next TOKEN . OFFSET-RULES) if TOK is followed by TOKEN, use OFFSET-RULES. -A nil offset defaults to `smie-indent-basic'.") +\(:prev TOKEN . OFFSET-RULES) if TOK is preceded by TOKEN, use OFFSET-RULES. +a number the offset to use. +`point' align with the token. +`parent' align with the parent. + +A nil offset for indentation after a token defaults to `smie-indent-basic'.") (defun smie-indent-hanging-p () ;; A hanging keyword is one that's at the end of a line except it's not at @@ -534,45 +540,46 @@ (cdr (assq t smie-indent-rules)) smie-indent-basic)) -(defun smie-indent-offset-after (tokinfo after) - ;; Presumes we're right before the token corresponding to `tokinfo' - ;; and `after' is the position that we're trying to indent. +(defun smie-indent-offset-rule (tokinfo &optional after) + "Apply the OFFSET-RULES in TOKINFO. +Point is expected to be right in front of the token corresponding to TOKINFO. +If computing the indentation after the token, then AFTER is the position +after the token." (let ((rules (cdr tokinfo)) - parent next offset) + parent next prev + offset) (while (consp rules) (let ((rule (pop rules))) (cond ((not (consp rule)) (setq offset rule)) - ;; Using this `:hanging' is often "wrong", in that the hangingness - ;; of a keyword should usually not affect the indentation of the - ;; immediately following expression, but rather should affect the - ;; virtual indentation of that keyword (which in turn will affect not - ;; only indentation of the immediately following expression, but also - ;; other dependent expressions). - ;; But there are cases where it's useful: you may want to use it to - ;; make the indentation inside parentheses different depending on the - ;; hangingness of the open-paren, but without affecting the - ;; indentation of the paren-close. ((eq (car rule) :hanging) (when (smie-indent-hanging-p) (setq rules (cdr rule)))) + ((eq (car rule) :prev) + (unless prev + (save-excursion + (setq prev (smie-indent-backward-token)))) + (when (equal (car prev) (cadr rule)) + (setq rules (cddr rule)))) ((eq (car rule) :next) (unless next + (unless after + (error "Can't use :next in :before indentation rules")) (save-excursion (goto-char after) - (setq next (funcall smie-forward-token-function)))) - (when (equal next (cadr rule)) + (setq next (smie-indent-forward-token)))) + (when (equal (car next) (cadr rule)) (setq rules (cddr rule)))) ((eq (car rule) :parent) (unless parent (save-excursion - (goto-char after) + (if after (goto-char after)) (setq parent (smie-backward-sexp 'halfsexp)))) (when (equal (nth 2 parent) (cadr rule)) (setq rules (cddr rule)))) - (t (error "Unknown rule %s for indentation after %s" + (t (error "Unknown rule %s for indentation of %s" rule (car tokinfo)))))) - (or offset (smie-indent-offset t)))) + offset)) (defun smie-indent-forward-token () "Skip token forward and return it, along with its levels." @@ -593,24 +600,18 @@ (forward-char -1) (list (buffer-substring (point) (1+ (point))) nil 0))))) -;; FIXME: The `virtual' arg is fundamentally wrong: the virtual indent -;; of a position should not depend on the caller, since it leads to situations -;; where two dependent indentations get indented differently. -(defun smie-indent-virtual (virtual) +(defun smie-indent-virtual () + ;; We used to take an optional arg (with value :not-hanging) to specify that + ;; we should only use (smie-indent-calculate) if we're looking at a hanging + ;; keyword. This was a bad idea, because the virtual indent of a position + ;; should not depend on the caller, since it leads to situations where two + ;; dependent indentations get indented differently. "Compute the virtual indentation to use for point. This is used when we're not trying to indent point but just need to compute the column at which point should be indented -in order to figure out the indentation of some other (further down) point. -VIRTUAL can take two different values: -- :bolp: means that the current indentation of point can be trusted - to be good only if it follows a line break. -- :not-hanging: means that the current indentation of point can be - trusted to be good except if the following token is hanging." +in order to figure out the indentation of some other (further down) point." ;; Trust pre-existing indentation on other lines. - (assert virtual) - (if (if (eq virtual :not-hanging) (not (smie-indent-hanging-p)) (smie-bolp)) - (current-column) - (smie-indent-calculate))) + (if (smie-bolp) (current-column) (smie-indent-calculate))) (defun smie-indent-fixindent () ;; Obey the `fixindent' special comment. @@ -640,20 +641,49 @@ (condition-case nil (progn (backward-sexp 1) - (smie-indent-virtual :not-hanging)) + (smie-indent-virtual)) ;:not-hanging (scan-error nil))))) (defun smie-indent-keyword () ;; Align closing token with the corresponding opening one. ;; (e.g. "of" with "case", or "in" with "let"). - ;; FIXME: This still looks too much like black magic!! - ;; FIXME: Rather than a bunch of rules like (PARENT . TOKEN), we - ;; want a single rule for TOKEN with different cases for each PARENT. (save-excursion (let* ((pos (point)) (toklevels (smie-indent-forward-token)) (token (pop toklevels))) - (when (car toklevels) + (if (null (car toklevels)) + ;; Different case: + ;; - smie-bolp: "indent according to others". + ;; - common hanging: "indent according to others". + ;; - SML-let hanging: "indent like parent". + ;; - if-after-else: "indent-like parent". + ;; - middle-of-line: "trust current position". + (cond + ((null (cdr toklevels)) nil) ;Not a keyword. + ((smie-bolp) + ;; For an open-paren-like thingy at BOL, always indent only + ;; based on other rules (typically smie-indent-after-keyword). + nil) + (t + (let* ((tokinfo (or (assoc (cons :before token) smie-indent-rules) + ;; By default use point unless we're hanging. + (cons (cons :before token) + '((:hanging nil) point)))) + (after (prog1 (point) (goto-char pos))) + (offset (smie-indent-offset-rule tokinfo))) + (cond + ((eq offset 'point) (current-column)) + ((eq offset 'parent) + (let ((parent (smie-backward-sexp 'halfsexp))) + (if parent (goto-char (cadr parent)))) + (smie-indent-virtual)) + ((eq offset nil) nil) + (t (error "Unhandled offset %s in %s" + offset (cons :before token))))))) + + ;; FIXME: This still looks too much like black magic!! + ;; FIXME: Rather than a bunch of rules like (PARENT . TOKEN), we + ;; want a single rule for TOKEN with different cases for each PARENT. (let ((res (smie-backward-sexp 'halfsexp)) tmp) (cond ((not (or (< (point) pos) @@ -669,17 +699,17 @@ ;; a -> b -> c ;; -> d ;; So as to align with the earliest appropriate place. - (smie-indent-virtual :bolp)) + (smie-indent-virtual)) ((equal token (save-excursion (funcall smie-backward-token-function))) ;; in cases such as "fn x => fn y => fn z =>", ;; jump back to the very first fn. ;; FIXME: should we only do that for special tokens like "=>"? - (smie-indent-virtual :bolp)) + (smie-indent-virtual)) ((setq tmp (assoc (cons (caddr res) token) smie-indent-rules)) (goto-char (cadr res)) - (+ (cdr tmp) (smie-indent-virtual :not-hanging))) + (+ (cdr tmp) (smie-indent-virtual))) ;:not-hanging ;; FIXME: The rules ((t . TOK) . OFFSET) either indent ;; relative to "before the parent" or "after the parent", ;; depending on details of the grammar. @@ -687,8 +717,15 @@ (assert (eq (point) (cadr res))) (goto-char (cadr res)) (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) - (smie-indent-virtual :not-hanging))) - ((smie-bolp) + (smie-indent-virtual))) ;:not-hanging + ((and (= (point) pos) (smie-bolp)) + ;; Since we started at BOL, we're not computing a virtual + ;; indentation, and we're still at the starting point, so the + ;; next (default) rule can't be used since it uses `current-column' + ;; which would cause. indentation to depend on itself. + ;; We could just return nil, but OTOH that's not good enough in + ;; some cases. Instead, we want to combine the offset-rules for + ;; the current token with the offset-rules of the previous one. (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) ;; FIXME: This is odd. Can't we make it use ;; smie-indent-(calculate|virtual) somehow? @@ -707,7 +744,8 @@ (defun smie-indent-comment-continue () ;; indentation of comment-continue lines. - (let ((continue (comment-string-strip comment-continue t t))) + (let ((continue (and comment-continue + (comment-string-strip comment-continue t t)))) (and (< 0 (length continue)) (looking-at (regexp-quote continue)) (nth 4 (syntax-ppss)) (let ((ppss (syntax-ppss))) @@ -733,7 +771,8 @@ (when toklevel (let ((offset (cond - (tokinfo (smie-indent-offset-after tokinfo pos)) + (tokinfo (or (smie-indent-offset-rule tokinfo pos) + (smie-indent-offset t))) ;; The default indentation after a keyword/operator ;; is 0 for infix and t for prefix. ;; Using the BNF syntax, we could come up with @@ -744,7 +783,7 @@ ;; For indentation after "(let" in SML-mode, we end up accumulating ;; the offset of "(" and the offset of "let", so we use `min' to try ;; and get it right either way. - (+ (min (smie-indent-virtual :bolp) (current-column)) offset)))))) + (+ (min (smie-indent-virtual) (current-column)) offset)))))) (defun smie-indent-exps () ;; Indentation of sequences of simple expressions without @@ -793,7 +832,7 @@ ;; We're the first arg. (goto-char (car positions)) (+ (smie-indent-offset 'args) - ;; We used to use (smie-indent-virtual :bolp), but that + ;; We used to use (smie-indent-virtual), but that ;; doesn't seem right since it might then indent args less than ;; the function itself. (current-column))))))) ------------------------------------------------------------ revno: 100538 author: Martin Rudalics committer: Juri Linkov branch nick: trunk timestamp: Mon 2010-06-07 21:28:02 +0300 message: * window.el (pop-to-buffer): Remove the conditional that compares new-window and old-window, so it will reselect the selected window unconditionally. http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html * window.c (Fselect_window): Move `record_buffer' up to the beginning of this function, so the buffer gets recorded even if the selected window does not change. http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-07 02:10:19 +0000 +++ lisp/ChangeLog 2010-06-07 18:28:02 +0000 @@ -1,3 +1,10 @@ +2010-06-07 Martin Rudalics + + * window.el (pop-to-buffer): Remove the conditional that + compares new-window and old-window, so it will reselect + the selected window unconditionally. + http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html + 2010-06-07 Stefan Monnier * emacs-lisp/smie.el (smie-indent-offset-after) === modified file 'lisp/window.el' --- lisp/window.el 2010-04-16 01:41:58 +0000 +++ lisp/window.el 2010-06-07 18:28:02 +0000 @@ -1220,19 +1220,16 @@ (let ((buf (get-buffer-create buffer-or-name))) (set-buffer-major-mode buf) buf)))) - (old-window (selected-window)) (old-frame (selected-frame)) new-window new-frame) (set-buffer buffer) (setq new-window (display-buffer buffer other-window)) - (unless (eq new-window old-window) - ;; `display-buffer' has chosen another window, select it. - (select-window new-window norecord) - (setq new-frame (window-frame new-window)) - (unless (eq new-frame old-frame) - ;; `display-buffer' has chosen another frame, make sure it gets - ;; input focus and is risen. - (select-frame-set-input-focus new-frame))) + (select-window new-window norecord) + (setq new-frame (window-frame new-window)) + (unless (eq new-frame old-frame) + ;; `display-buffer' has chosen another frame, make sure it gets + ;; input focus and is risen. + (select-frame-set-input-focus new-frame)) buffer)) ;; I think this should be the default; I think people will prefer it--rms. === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-07 10:35:57 +0000 +++ src/ChangeLog 2010-06-07 18:28:02 +0000 @@ -1,3 +1,10 @@ +2010-06-07 Martin Rudalics + + * window.c (Fselect_window): Move `record_buffer' up to the + beginning of this function, so the buffer gets recorded + even if the selected window does not change. + http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html + 2010-06-07 Juanma Barranquero * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings. === modified file 'src/window.c' --- src/window.c 2010-04-15 23:51:12 +0000 +++ src/window.c 2010-06-07 18:28:02 +0000 @@ -3611,6 +3611,7 @@ { ++window_select_count; XSETFASTINT (w->use_time, window_select_count); + record_buffer (w->buffer); } if (EQ (window, selected_window)) @@ -3646,8 +3647,6 @@ selected_window = window; - if (NILP (norecord)) - record_buffer (w->buffer); Fset_buffer (w->buffer); XBUFFER (w->buffer)->last_selected_window = window; ------------------------------------------------------------ revno: 100537 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-06-07 12:35:57 +0200 message: * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings. (Fforward_line, Fbeginning_of_line): Reflow docstrings. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-06 08:57:39 +0000 +++ src/ChangeLog 2010-06-07 10:35:57 +0000 @@ -1,3 +1,8 @@ +2010-06-07 Juanma Barranquero + + * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings. + (Fforward_line, Fbeginning_of_line): Reflow docstrings. + 2010-06-06 Dan Nicolaescu Remove BSTRING related code, all platforms define it. === modified file 'src/cmds.c' --- src/cmds.c 2010-05-25 00:54:13 +0000 +++ src/cmds.c 2010-06-07 10:35:57 +0000 @@ -62,7 +62,7 @@ Depending on the bidirectional context, the movement may be to the right or to the left on the screen. This is in contrast with -\\[right-arrow-command], which see. */) +\\[right-char], which see. */) (n) Lisp_Object n; { @@ -102,7 +102,7 @@ Depending on the bidirectional context, the movement may be to the right or to the left on the screen. This is in contrast with -\\[left-arrow-command], which see. */) +\\[left-char], which see. */) (n) Lisp_Object n; { @@ -122,7 +122,7 @@ Returns the count of lines left to move. If moving forward, that is N - number of lines moved; if backward, N + number moved. With positive N, a non-empty line at the end counts as one line - successfully moved (for the return value). */) +successfully moved (for the return value). */) (n) Lisp_Object n; { @@ -167,8 +167,8 @@ If point reaches the beginning or end of buffer, it stops there. This function constrains point to the current field unless this moves -point to a different line than the original, unconstrained result. If -N is nil or 1, and a front-sticky field starts at point, the point +point to a different line than the original, unconstrained result. +If N is nil or 1, and a front-sticky field starts at point, the point does not move. To ignore field boundaries bind `inhibit-field-text-motion' to t, or use the `forward-line' function instead. For instance, `(forward-line 0)' does the same thing as ------------------------------------------------------------ revno: 100536 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2010-06-06 22:10:19 -0400 message: Make (after keyword) indent-rules more flexible. * lisp/emacs-lisp/smie.el (smie-indent-offset-after) (smie-indent-forward-token, smie-indent-backward-token): New functions. (smie-indent-after-keyword): Use them. (smie-indent-fixindent): Only applies to the indentation of the BOL. (smie-indent-keyword): Tweak the black magic. (smie-indent-comment-continue): Strip comment-continue before use. (smie-indent-functions): Indent comments before keywords. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-06 09:52:13 +0000 +++ lisp/ChangeLog 2010-06-07 02:10:19 +0000 @@ -1,3 +1,13 @@ +2010-06-07 Stefan Monnier + + * emacs-lisp/smie.el (smie-indent-offset-after) + (smie-indent-forward-token, smie-indent-backward-token): New functions. + (smie-indent-after-keyword): Use them. + (smie-indent-fixindent): Only applies to the indentation of the BOL. + (smie-indent-keyword): Tweak the black magic. + (smie-indent-comment-continue): Strip comment-continue before use. + (smie-indent-functions): Indent comments before keywords. + 2010-06-06 Juri Linkov * isearch.el (isearch-lazy-highlight-search): Fix looping === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2010-06-03 16:59:29 +0000 +++ lisp/emacs-lisp/smie.el 2010-06-07 02:10:19 +0000 @@ -294,7 +294,12 @@ (defvar smie-op-levels 'unset "List of token parsing info. Each element is of the form (TOKEN LEFT-LEVEL RIGHT-LEVEL). -Parsing is done using an operator precedence parser.") +Parsing is done using an operator precedence parser. +LEFT-LEVEL and RIGHT-LEVEL can be either numbers or nil, where nil +means that this operator does not bind on the corresponding side, +i.e. a LEFT-LEVEL of nil means this is a token that behaves somewhat like +an open-paren, whereas a RIGHT-LEVEL of nil would correspond to something +like a close-paren.") (defvar smie-forward-token-function 'smie-default-forward-token "Function to scan forward for the next token. @@ -495,16 +500,19 @@ ;; I.e. the indentation after "=" depends on the parent ("structure") ;; as well as on the following token ("struct"). "Rules of the following form. -\(TOK OFFSET) how to indent right after TOK. -\(TOK O1 O2) how to indent right after TOK: - O1 is the default; - O2 is used if TOK is \"hanging\". +\(TOK . OFFSET-RULES) how to indent right after TOK. \((T1 . T2) . OFFSET) how to indent token T2 w.r.t T1. \((t . TOK) . OFFSET) how to indent TOK with respect to its parent. \(list-intro . TOKENS) declare TOKENS as being followed by what may look like a funcall but is just a sequence of expressions. \(t . OFFSET) basic indentation step. \(args . OFFSET) indentation of arguments. + +OFFSET-RULES is list of elements which can either be an integer (the offset to +use), or a cons of the form +\(:hanging . OFFSET-RULES) if TOK is hanging, use OFFSET-RULES. +\(:parent PARENT . OFFSET-RULES) if TOK's parent is PARENT, use OFFSET-RULES. +\(:next TOKEN . OFFSET-RULES) if TOK is followed by TOKEN, use OFFSET-RULES. A nil offset defaults to `smie-indent-basic'.") (defun smie-indent-hanging-p () @@ -526,6 +534,68 @@ (cdr (assq t smie-indent-rules)) smie-indent-basic)) +(defun smie-indent-offset-after (tokinfo after) + ;; Presumes we're right before the token corresponding to `tokinfo' + ;; and `after' is the position that we're trying to indent. + (let ((rules (cdr tokinfo)) + parent next offset) + (while (consp rules) + (let ((rule (pop rules))) + (cond + ((not (consp rule)) (setq offset rule)) + ;; Using this `:hanging' is often "wrong", in that the hangingness + ;; of a keyword should usually not affect the indentation of the + ;; immediately following expression, but rather should affect the + ;; virtual indentation of that keyword (which in turn will affect not + ;; only indentation of the immediately following expression, but also + ;; other dependent expressions). + ;; But there are cases where it's useful: you may want to use it to + ;; make the indentation inside parentheses different depending on the + ;; hangingness of the open-paren, but without affecting the + ;; indentation of the paren-close. + ((eq (car rule) :hanging) + (when (smie-indent-hanging-p) + (setq rules (cdr rule)))) + ((eq (car rule) :next) + (unless next + (save-excursion + (goto-char after) + (setq next (funcall smie-forward-token-function)))) + (when (equal next (cadr rule)) + (setq rules (cddr rule)))) + ((eq (car rule) :parent) + (unless parent + (save-excursion + (goto-char after) + (setq parent (smie-backward-sexp 'halfsexp)))) + (when (equal (nth 2 parent) (cadr rule)) + (setq rules (cddr rule)))) + (t (error "Unknown rule %s for indentation after %s" + rule (car tokinfo)))))) + (or offset (smie-indent-offset t)))) + +(defun smie-indent-forward-token () + "Skip token forward and return it, along with its levels." + (let ((tok (funcall smie-forward-token-function))) + (cond + ((< 0 (length tok)) (assoc tok smie-op-levels)) + ((looking-at "\\s(") + (forward-char 1) + (list (buffer-substring (1- (point)) (point)) nil 0))))) + +(defun smie-indent-backward-token () + "Skip token backward and return it, along with its levels." + (let ((tok (funcall smie-backward-token-function))) + (cond + ((< 0 (length tok)) (assoc tok smie-op-levels)) + ;; 4 == Open paren syntax. + ((eq 4 (syntax-class (syntax-after (1- (point))))) + (forward-char -1) + (list (buffer-substring (point) (1+ (point))) nil 0))))) + +;; FIXME: The `virtual' arg is fundamentally wrong: the virtual indent +;; of a position should not depend on the caller, since it leads to situations +;; where two dependent indentations get indented differently. (defun smie-indent-virtual (virtual) "Compute the virtual indentation to use for point. This is used when we're not trying to indent point but just @@ -544,7 +614,8 @@ (defun smie-indent-fixindent () ;; Obey the `fixindent' special comment. - (when (save-excursion + (and (smie-bolp) + (save-excursion (comment-normalize-vars) (re-search-forward (concat comment-start-skip "fixindent" @@ -575,38 +646,56 @@ (defun smie-indent-keyword () ;; Align closing token with the corresponding opening one. ;; (e.g. "of" with "case", or "in" with "let"). + ;; FIXME: This still looks too much like black magic!! + ;; FIXME: Rather than a bunch of rules like (PARENT . TOKEN), we + ;; want a single rule for TOKEN with different cases for each PARENT. (save-excursion (let* ((pos (point)) - (token (funcall smie-forward-token-function)) - (toklevels (cdr (assoc token smie-op-levels)))) + (toklevels (smie-indent-forward-token)) + (token (pop toklevels))) (when (car toklevels) (let ((res (smie-backward-sexp 'halfsexp)) tmp) - ;; If we didn't move at all, that means we didn't really skip - ;; what we wanted. - (when (< (point) pos) - (cond - ((eq (car res) (car toklevels)) - ;; We bumped into a same-level operator. align with it. - (goto-char (cadr res)) - ;; Don't use (smie-indent-virtual :not-hanging) here, because we - ;; want to jump back over a sequence of same-level ops such as - ;; a -> b -> c - ;; -> d - ;; So as to align with the earliest appropriate place. - (smie-indent-virtual :bolp)) - ((equal token (save-excursion - (funcall smie-backward-token-function))) - ;; in cases such as "fn x => fn y => fn z =>", - ;; jump back to the very first fn. - ;; FIXME: should we only do that for special tokens like "=>"? - (smie-indent-virtual :bolp)) - ((setq tmp (assoc (cons (caddr res) token) - smie-indent-rules)) - (goto-char (cadr res)) - (+ (cdr tmp) (smie-indent-virtual :not-hanging))) - (t - (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) - (current-column)))))))))) + (cond + ((not (or (< (point) pos) + (and (cadr res) (< (cadr res) pos)))) + ;; If we didn't move at all, that means we didn't really skip + ;; what we wanted. + nil) + ((eq (car res) (car toklevels)) + ;; We bumped into a same-level operator. align with it. + (goto-char (cadr res)) + ;; Don't use (smie-indent-virtual :not-hanging) here, because we + ;; want to jump back over a sequence of same-level ops such as + ;; a -> b -> c + ;; -> d + ;; So as to align with the earliest appropriate place. + (smie-indent-virtual :bolp)) + ((equal token (save-excursion + (funcall smie-backward-token-function))) + ;; in cases such as "fn x => fn y => fn z =>", + ;; jump back to the very first fn. + ;; FIXME: should we only do that for special tokens like "=>"? + (smie-indent-virtual :bolp)) + ((setq tmp (assoc (cons (caddr res) token) + smie-indent-rules)) + (goto-char (cadr res)) + (+ (cdr tmp) (smie-indent-virtual :not-hanging))) + ;; FIXME: The rules ((t . TOK) . OFFSET) either indent + ;; relative to "before the parent" or "after the parent", + ;; depending on details of the grammar. + ((null (car res)) + (assert (eq (point) (cadr res))) + (goto-char (cadr res)) + (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) + (smie-indent-virtual :not-hanging))) + ((smie-bolp) + (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) + ;; FIXME: This is odd. Can't we make it use + ;; smie-indent-(calculate|virtual) somehow? + (smie-indent-after-keyword))) + (t + (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) + (current-column))))))))) (defun smie-indent-comment () ;; Indentation of a comment. @@ -618,53 +707,44 @@ (defun smie-indent-comment-continue () ;; indentation of comment-continue lines. - (and (< 0 (length comment-continue)) - (looking-at (regexp-quote comment-continue)) (nth 4 (syntax-ppss)) + (let ((continue (comment-string-strip comment-continue t t))) + (and (< 0 (length continue)) + (looking-at (regexp-quote continue)) (nth 4 (syntax-ppss)) (let ((ppss (syntax-ppss))) (save-excursion (forward-line -1) (if (<= (point) (nth 8 ppss)) (progn (goto-char (1+ (nth 8 ppss))) (current-column)) (skip-chars-forward " \t") - (if (looking-at (regexp-quote comment-continue)) - (current-column))))))) + (if (looking-at (regexp-quote continue)) + (current-column)))))))) (defun smie-indent-after-keyword () ;; Indentation right after a special keyword. (save-excursion - (let* ((tok (funcall smie-backward-token-function)) - (tokinfo (assoc tok smie-indent-rules)) - (toklevel (if (and (zerop (length tok)) - ;; 4 == Open paren syntax. - (eq (syntax-class (syntax-after (1- (point)))) - 4)) - (progn (forward-char -1) - (setq tok (buffer-substring - (point) (1+ (point)))) - (setq tokinfo (assoc tok smie-indent-rules)) - (list tok nil 0)) - (assoc tok smie-op-levels)))) + (let* ((pos (point)) + (toklevel (smie-indent-backward-token)) + (tok (car toklevel)) + (tokinfo (assoc tok smie-indent-rules))) (if (and toklevel (null (cadr toklevel)) (null tokinfo)) - (setq tokinfo (list (car toklevel) nil nil))) - (if (and tokinfo (null toklevel)) - (error "Token %S has indent rule but has no parsing info" tok)) + (setq tokinfo (list (car toklevel)))) + ;; (if (and tokinfo (null toklevel)) + ;; (error "Token %S has indent rule but has no parsing info" tok)) (when toklevel - (let ((default-offset + (let ((offset + (cond + (tokinfo (smie-indent-offset-after tokinfo pos)) ;; The default indentation after a keyword/operator ;; is 0 for infix and t for prefix. ;; Using the BNF syntax, we could come up with ;; better defaults, but we only have the ;; precedence levels here. - (if (or tokinfo (null (cadr toklevel))) - (smie-indent-offset t) 0))) - ;; For indentation after "(let", we end up accumulating the - ;; offset of "(" and the offset of "let", so we use `min' - ;; to try and get it right either way. - (min - (+ (smie-indent-virtual :bolp) - (or (caddr tokinfo) (cadr tokinfo) default-offset)) - (+ (current-column) - (or (cadr tokinfo) default-offset)))))))) + ((null (cadr toklevel)) (smie-indent-offset t)) + (t 0)))) + ;; For indentation after "(let" in SML-mode, we end up accumulating + ;; the offset of "(" and the offset of "let", so we use `min' to try + ;; and get it right either way. + (+ (min (smie-indent-virtual :bolp) (current-column)) offset)))))) (defun smie-indent-exps () ;; Indentation of sequences of simple expressions without @@ -719,8 +799,8 @@ (current-column))))))) (defvar smie-indent-functions - '(smie-indent-fixindent smie-indent-bob smie-indent-close smie-indent-keyword - smie-indent-comment smie-indent-comment-continue smie-indent-after-keyword + '(smie-indent-fixindent smie-indent-bob smie-indent-close smie-indent-comment + smie-indent-comment-continue smie-indent-keyword smie-indent-after-keyword smie-indent-exps) "Functions to compute the indentation. Each function is called with no argument, shouldn't move point, and should ------------------------------------------------------------ revno: 100535 committer: Juri Linkov branch nick: trunk timestamp: Sun 2010-06-06 12:52:13 +0300 message: * lisp/isearch.el (isearch-lazy-highlight-search): Fix looping by checking for empty match. This syncs this loop with the similar loop in `isearch-search'. (Bug#6362) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-05 09:56:22 +0000 +++ lisp/ChangeLog 2010-06-06 09:52:13 +0000 @@ -1,3 +1,9 @@ +2010-06-06 Juri Linkov + + * isearch.el (isearch-lazy-highlight-search): Fix looping + by checking for empty match. This syncs this loop with the + similar loop in `isearch-search'. (Bug#6362) + 2010-06-05 Dan Nicolaescu vc-log-incoming/vc-log-outgoing fixes for Git. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2010-05-20 22:33:09 +0000 +++ lisp/isearch.el 2010-06-06 09:52:13 +0000 @@ -2667,6 +2667,8 @@ ;; Clear RETRY unless the search predicate says ;; to skip this search hit. (if (or (not success) + (= (point) bound) ; like (bobp) (eobp) in `isearch-search'. + (= (match-beginning 0) (match-end 0)) (funcall isearch-filter-predicate (match-beginning 0) (match-end 0))) (setq retry nil))) ------------------------------------------------------------ revno: 100534 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-06-06 01:57:39 -0700 message: Remove BSTRING related code, all platforms define it. * src/s/usg5-4.h (BSTRING): Remove definition. * src/s/template.h (BSTRING): * src/s/msdos.h (BSTRING): * src/s/ms-w32.h (BSTRING): * src/s/hpux10-20.h (BSTRING): * src/s/gnu-linux.h (BSTRING): * src/s/darwin.h (BSTRING): * src/s/cygwin.h (BSTRING): * src/s/bsd-common.h (BSTRING): * src/s/aix4-2.h (BSTRING): Likewise. * src/sysdep.c: Remove code depending on BSTRING not being defined. * configure.in: Remove code dealing with BSTRING. * lib-src/ntlib.h: Remove code dealing with BSTRING. * nt/config.nt: Remove code depending on BSTRING. diff: === modified file 'ChangeLog' --- ChangeLog 2010-06-03 22:28:51 +0000 +++ ChangeLog 2010-06-06 08:57:39 +0000 @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu + + * configure.in: Remove code dealing with BSTRING. + 2010-06-03 Dan Nicolaescu * configure.in (AC_PREREQ): Require autoconf 2.65. === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2010-06-03 22:16:02 +0000 +++ admin/CPP-DEFINES 2010-06-06 08:57:39 +0000 @@ -49,7 +49,6 @@ USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int. ** System specific macros, decribed in detail in src/s/template.h -BSTRING CLASH_DETECTION COFF FIRST_PTY_LETTER === modified file 'configure.in' --- configure.in 2010-06-03 22:28:51 +0000 +++ configure.in 2010-06-06 08:57:39 +0000 @@ -3565,14 +3565,6 @@ #define my_strftime nstrftime /* for strftime.c */ -/* The rest of the code currently tests the CPP symbol BSTRING. - Override any claims made by the system-description files. - Note that on some SCO version it is possible to have bcopy and not bcmp. */ -#undef BSTRING -#if defined (HAVE_BCOPY) && defined (HAVE_BCMP) -#define BSTRING -#endif - /* 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 the type of getenv. */ === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-05-29 23:50:47 +0000 +++ lib-src/ChangeLog 2010-06-06 08:57:39 +0000 @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu + + * ntlib.h: Remove code dealing with BSTRING. + 2010-05-29 Chong Yidong * emacsclient.c (longopts, decode_options, print_help_and_exit): === modified file 'lib-src/ntlib.h' --- lib-src/ntlib.h 2010-04-19 15:07:52 +0000 +++ lib-src/ntlib.h 2010-06-06 08:57:39 +0000 @@ -43,12 +43,6 @@ char * getpass (const char * prompt); int fchown (int fd, unsigned uid, unsigned gid); -#ifndef BSTRING -#define bzero(b, l) memset(b, 0, l) -#define bcopy(s, d, l) memcpy(d, s, l) -#define bcmp(a, b, l) memcmp(a, b, l) -#endif - /* redirect or undo interceptions created by config.h */ #undef access #define access _access === modified file 'nt/ChangeLog' --- nt/ChangeLog 2010-06-03 05:29:02 +0000 +++ nt/ChangeLog 2010-06-06 08:57:39 +0000 @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu + + * config.nt: Remove code depending on BSTRING. + 2010-06-03 Glenn Morris * config.nt: Remove NOT_C_CODE tests, it is always true now. === modified file 'nt/config.nt' --- nt/config.nt 2010-06-03 05:29:02 +0000 +++ nt/config.nt 2010-06-06 08:57:39 +0000 @@ -347,14 +347,6 @@ #define my_strftime nstrftime /* for strftime.c */ -/* The rest of the code currently tests the CPP symbol BSTRING. - Override any claims made by the system-description files. - Note that on some SCO version it is possible to have bcopy and not bcmp. */ -#undef BSTRING -#if defined (HAVE_BCOPY) && defined (HAVE_BCMP) -#define BSTRING -#endif - /* Non-ANSI C compilers usually don't have volatile. */ #ifndef HAVE_VOLATILE #ifndef __STDC__ === modified file 'src/ChangeLog' --- src/ChangeLog 2010-06-05 00:41:32 +0000 +++ src/ChangeLog 2010-06-06 08:57:39 +0000 @@ -1,3 +1,18 @@ +2010-06-06 Dan Nicolaescu + + Remove BSTRING related code, all platforms define it. + * s/usg5-4.h (BSTRING): Remove definition. + * s/template.h (BSTRING): + * s/msdos.h (BSTRING): + * s/ms-w32.h (BSTRING): + * s/hpux10-20.h (BSTRING): + * s/gnu-linux.h (BSTRING): + * s/darwin.h (BSTRING): + * s/cygwin.h (BSTRING): + * s/bsd-common.h (BSTRING): + * s/aix4-2.h (BSTRING): Likewise. + * sysdep.c: Remove code depending on BSTRING not being defined. + 2010-06-05 Juanma Barranquero Remove obsolete macro BASE_LEADING_CODE_P. === modified file 'src/config.in' --- src/config.in 2010-06-03 05:47:09 +0000 +++ src/config.in 2010-06-06 08:57:39 +0000 @@ -312,10 +312,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_KERBEROS_KRB_H -/* Define to 1 if `e_text' is member of `krb5_error'. */ +/* Define to 1 if `e_text' is a member of `krb5_error'. */ #undef HAVE_KRB5_ERROR_E_TEXT -/* Define to 1 if `text' is member of `krb5_error'. */ +/* Define to 1 if `text' is a member of `krb5_error'. */ #undef HAVE_KRB5_ERROR_TEXT /* Define to 1 if you have the header file. */ @@ -606,25 +606,25 @@ /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL -/* Define to 1 if `ifr_addr' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_addr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_ADDR -/* Define to 1 if `ifr_broadaddr' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_broadaddr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_BROADADDR -/* Define to 1 if `ifr_flags' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_flags' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_FLAGS -/* Define to 1 if `ifr_hwaddr' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_HWADDR -/* Define to 1 if `ifr_netmask' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_netmask' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_NETMASK -/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */ +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_UN_N_NAME -/* Define to 1 if `tm_zone' is member of `struct tm'. */ +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if `struct utimbuf' is declared by . */ @@ -853,6 +853,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -912,6 +915,28 @@ /* Define to 1 if using the Motif X toolkit. */ #undef USE_MOTIF +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Define to 1 if we should use toolkit scroll bars. */ #undef USE_TOOLKIT_SCROLL_BARS @@ -947,28 +972,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX @@ -1093,14 +1096,6 @@ #define my_strftime nstrftime /* for strftime.c */ -/* The rest of the code currently tests the CPP symbol BSTRING. - Override any claims made by the system-description files. - Note that on some SCO version it is possible to have bcopy and not bcmp. */ -#undef BSTRING -#if defined (HAVE_BCOPY) && defined (HAVE_BCMP) -#define BSTRING -#endif - /* 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 the type of getenv. */ === modified file 'src/s/aix4-2.h' --- src/s/aix4-2.h 2010-06-03 22:16:02 +0000 +++ src/s/aix4-2.h 2010-06-06 08:57:39 +0000 @@ -52,9 +52,6 @@ functions. Almost, but not quite the same as the 4.2 functions. */ #define SYSV_SYSTEM_DIR -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* The file containing the kernel's symbol table is called /unix. */ #define KERNEL_FILE "/unix" === modified file 'src/s/bsd-common.h' --- src/s/bsd-common.h 2010-06-03 22:16:02 +0000 +++ src/s/bsd-common.h 2010-06-06 08:57:39 +0000 @@ -71,9 +71,6 @@ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ === modified file 'src/s/cygwin.h' --- src/s/cygwin.h 2010-06-03 22:16:02 +0000 +++ src/s/cygwin.h 2010-06-06 08:57:39 +0000 @@ -73,9 +73,6 @@ } \ while (0) -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ === modified file 'src/s/darwin.h' --- src/s/darwin.h 2010-06-03 22:16:02 +0000 +++ src/s/darwin.h 2010-06-06 08:57:39 +0000 @@ -99,9 +99,6 @@ for process-connection-type dependent on the kernel version. */ #define MIN_PTY_KERNEL_VERSION '7' -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2010-06-03 22:16:02 +0000 +++ src/s/gnu-linux.h 2010-06-06 08:57:39 +0000 @@ -89,9 +89,6 @@ #define HAVE_SOCKETS -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* This is used in list_system_processes. */ #define HAVE_PROCFS 1 === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2010-06-03 22:16:02 +0000 +++ src/s/hpux10-20.h 2010-06-06 08:57:39 +0000 @@ -45,12 +45,6 @@ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS -/* Define this symbol if your system has the functions bcopy, etc. - s800 and later versions of s300 (s200) kernels have equivalents - of the BSTRING functions of BSD. If your s200 kernel doesn't have - em comment out this section. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2010-06-04 14:13:35 +0000 +++ src/s/ms-w32.h 2010-06-06 08:57:39 +0000 @@ -63,8 +63,6 @@ for received packets, so datagrams are broken too. */ #define BROKEN_DATAGRAM_SOCKETS 1 -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING #define bzero(b, l) memset(b, 0, l) #define bcopy(s, d, l) memmove(d, s, l) #define bcmp(a, b, l) memcmp(a, b, l) === modified file 'src/s/msdos.h' --- src/s/msdos.h 2010-05-19 02:51:51 +0000 +++ src/s/msdos.h 2010-06-06 08:57:39 +0000 @@ -42,9 +42,6 @@ #define SYSV_SYSTEM_DIR -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define this is the compiler understands `volatile'. */ #define HAVE_VOLATILE === modified file 'src/s/template.h' --- src/s/template.h 2010-05-18 02:59:15 +0000 +++ src/s/template.h 2010-06-06 08:57:39 +0000 @@ -78,9 +78,6 @@ /* Define HAVE_PTYS if the system supports pty devices. */ #define HAVE_PTYS -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* subprocesses should be undefined if you do NOT want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). === modified file 'src/s/usg5-4.h' --- src/s/usg5-4.h 2010-06-03 22:16:02 +0000 +++ src/s/usg5-4.h 2010-06-06 08:57:39 +0000 @@ -63,8 +63,6 @@ /* If we're using the System V X port, BSD bstring functions will be handy. */ #ifdef HAVE_X_WINDOWS -#define BSTRING -#endif /* HAVE_X_WINDOWS */ /* On USG systems signal handlers return void. */ #define SIGTYPE void === modified file 'src/sysdep.c' --- src/sysdep.c 2010-06-02 02:40:59 +0000 +++ src/sysdep.c 2010-06-06 08:57:39 +0000 @@ -2752,54 +2752,6 @@ #endif /* !HAVE_RMDIR */ -#ifndef BSTRING - -#ifndef bzero - -void -bzero (b, length) - register char *b; - register int length; -{ - while (length-- > 0) - *b++ = 0; -} - -#endif /* no bzero */ -#endif /* BSTRING */ - -#if (!defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) -#undef bcopy - -/* Saying `void' requires a declaration, above, where bcopy is used - and that declaration causes pain for systems where bcopy is a macro. */ -bcopy (b1, b2, length) - register char *b1; - register char *b2; - register int length; -{ - while (length-- > 0) - *b2++ = *b1++; -} -#endif /* (!defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */ - -#ifndef BSTRING -#ifndef bcmp -int -bcmp (b1, b2, length) /* This could be a macro! */ - register char *b1; - register char *b2; - register int length; -{ - while (length-- > 0) - if (*b1++ != *b2++) - return 1; - - return 0; -} -#endif /* no bcmp */ -#endif /* not BSTRING */ - #ifndef HAVE_STRSIGNAL char * strsignal (code) ------------------------------------------------------------ revno: 100533 committer: Dan Nicolaescu branch nick: trunk timestamp: Sat 2010-06-05 02:56:22 -0700 message: vc-log-incoming/vc-log-outgoing fixes for Git. * lisp/vc-git.el (vc-git-log-view-mode): Fix font lock for incoming/outgoing logs. (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream} instead of vc-git-compute-remote. (vc-git-compute-remote): Remove. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-06-03 23:26:39 +0000 +++ etc/NEWS 2010-06-05 09:56:22 +0000 @@ -167,6 +167,8 @@ **** vc-log-incoming for Git runs "git fetch" so that the necessary data is available locally. +**** vc-log-incoming and vc-log-outgoing for Git require version 1.7 (or newer). + *** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and vc-log-outgoing, respectively. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-06-04 18:38:11 +0000 +++ lisp/ChangeLog 2010-06-05 09:56:22 +0000 @@ -1,3 +1,12 @@ +2010-06-05 Dan Nicolaescu + + vc-log-incoming/vc-log-outgoing fixes for Git. + * vc-git.el (vc-git-log-view-mode): Fix font lock for + incoming/outgoing logs. + (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream} + instead of vc-git-compute-remote. + (vc-git-compute-remote): Remove. + 2010-06-04 Juri Linkov * simple.el (kill-new): Fix logic of kill-do-not-save-duplicates. === modified file 'lisp/vc-git.el' --- lisp/vc-git.el 2010-06-03 23:26:39 +0000 +++ lisp/vc-git.el 2010-06-05 09:56:22 +0000 @@ -606,31 +606,15 @@ (when start-revision (list start-revision)) '("--"))))))) -(defun vc-git-compute-remote () - (let ((str (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "symbolic-ref" "HEAD")))) - branch remote) - (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) - (progn - (setq branch (match-string 2 str)) - (setq remote - (with-output-to-string - (with-current-buffer standard-output - (vc-git--out-ok "config" - (concat "branch." branch ".remote"))))) - (when (string-match "\\([^\n]+\\)" remote) - (setq remote (match-string 1 remote))))))) - (defun vc-git-log-outgoing (buffer remote-location) (interactive) (vc-git-command buffer 0 nil "log" "--no-color" "--graph" "--decorate" "--date=short" - "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" + "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" (concat (if (string= remote-location "") - (vc-git-compute-remote) + "@{upstream}" remote-location) "..HEAD"))) @@ -641,9 +625,9 @@ buffer 0 nil "log" "--no-color" "--graph" "--decorate" "--date=short" - "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" + "--pretty=tformat:%d%h %ad %s" "--abbrev-commit" (concat "HEAD.." (if (string= remote-location "") - (vc-git-compute-remote) + "@{upstream}" remote-location)))) (defvar log-view-message-re) @@ -657,11 +641,11 @@ (set (make-local-variable 'log-view-file-re) "\\`a\\`") (set (make-local-variable 'log-view-per-file-logs) nil) (set (make-local-variable 'log-view-message-re) - (if (eq vc-log-view-type 'short) + (if (not (eq vc-log-view-type 'long)) "^\\(?:[*/\\| ]+ \\)?\\(?: ([^)]+)\\)?\\([0-9a-z]+\\) \\([-a-z0-9]+\\) \\(.*\\)" "^commit *\\([0-9a-z]+\\)")) (set (make-local-variable 'log-view-font-lock-keywords) - (if (eq vc-log-view-type 'short) + (if (not (eq vc-log-view-type 'long)) '( ;; Same as log-view-message-re, except that we don't ;; want the shy group for the tag name. ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.