Mercurial > emacs
changeset 109216:42fed2a860b2
Merge from mainline.
author | Katsumi Yamaoka <katsumi@flagship2> |
---|---|
date | Tue, 08 Jun 2010 13:59:22 +0000 |
parents | a357e3f2e91f (current diff) a7f706d2c627 (diff) |
children | 40e65e1697a4 |
files | |
diffstat | 39 files changed, 604 insertions(+), 411 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,12 @@ +2010-06-08 Dan Nicolaescu <dann@ics.uci.edu> + + * configure.in: Include <strings.h> and <string.h> instead of + "strings.h" and "string.h". + +2010-06-06 Dan Nicolaescu <dann@ics.uci.edu> + + * configure.in: Remove code dealing with BSTRING. + 2010-06-03 Dan Nicolaescu <dann@ics.uci.edu> * configure.in (AC_PREREQ): Require autoconf 2.65.
--- a/admin/CPP-DEFINES Sat Jun 05 11:10:33 2010 +0000 +++ b/admin/CPP-DEFINES Tue Jun 08 13:59:22 2010 +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
--- a/configure.in Sat Jun 05 11:10:33 2010 +0000 +++ b/configure.in Tue Jun 08 13:59:22 2010 +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. */ @@ -3618,11 +3610,11 @@ #endif /* __P */ #ifdef HAVE_STRING_H -#include "string.h" +#include <string.h> #endif #ifdef HAVE_STRINGS_H -#include "strings.h" /* May be needed for bcopy & al. */ +#include <strings.h> /* May be needed for bcopy & al. */ #endif #ifdef HAVE_STDLIB_H
--- a/doc/misc/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/doc/misc/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,7 @@ +2010-06-07 Teodor Zlatanov <tzz@lifelogs.com> + + * gnus.texi (Interactive): Explain effect of gnus-expert-user better. + 2010-05-26 Michael Albinus <michael.albinus@gmx.de> * eshell.texi (Built-ins): Describe, how to disable a built-in command
--- a/doc/misc/gnus.texi Sat Jun 05 11:10:33 2010 +0000 +++ b/doc/misc/gnus.texi Tue Jun 08 13:59:22 2010 +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
--- a/lib-src/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/lib-src/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu <dann@ics.uci.edu> + + * ntlib.h: Remove code dealing with BSTRING. + 2010-05-29 Chong Yidong <cyd@stupidchicken.com> * emacsclient.c (longopts, decode_options, print_help_and_exit):
--- a/lib-src/ntlib.h Sat Jun 05 11:10:33 2010 +0000 +++ b/lib-src/ntlib.h Tue Jun 08 13:59:22 2010 +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
--- a/lisp/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,40 @@ +2010-06-07 Martin Pohlack <mp26@os.inf.tu-dresden.de> + + * 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 <monnier@iro.umontreal.ca> + + * 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 <rudalics@gmx.at> + + * 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 <monnier@iro.umontreal.ca> + + * 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 <juri@jurta.org> + + * 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 <dann@ics.uci.edu> vc-log-incoming/vc-log-outgoing fixes for Git. @@ -4660,8 +4697,8 @@ 2009-12-10 Vinicius Jose Latorre <viniciusjl@ig.com.br> - * 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 <mp26@os.inf.tu-dresden.de>. New version 12.1.
--- a/lisp/ChangeLog.13 Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/ChangeLog.13 Tue Jun 08 13:59:22 2010 +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 <mp26@os.inf.tu-dresden.de> (tiny change) +2007-11-16 Martin Pohlack <mp26@os.inf.tu-dresden.de> * emulation/pc-select.el (pc-select-shifted-mark): New var. (ensure-mark): Set it.
--- a/lisp/emacs-lisp/smie.el Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/emacs-lisp/smie.el Tue Jun 08 13:59:22 2010 +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,17 +500,26 @@ ;; 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\". +\((: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. \(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. -A nil offset defaults to `smie-indent-basic'.") + +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. +\(: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 @@ -526,25 +540,83 @@ (cdr (assq t smie-indent-rules)) smie-indent-basic)) -(defun smie-indent-virtual (virtual) +(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 prev + offset) + (while (consp rules) + (let ((rule (pop rules))) + (cond + ((not (consp rule)) (setq offset rule)) + ((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 (smie-indent-forward-token)))) + (when (equal (car next) (cadr rule)) + (setq rules (cddr rule)))) + ((eq (car rule) :parent) + (unless parent + (save-excursion + (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 of %s" + rule (car tokinfo)))))) + offset)) + +(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))))) + +(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. - (when (save-excursion + (and (smie-bolp) + (save-excursion (comment-normalize-vars) (re-search-forward (concat comment-start-skip "fixindent" @@ -569,7 +641,7 @@ (condition-case nil (progn (backward-sexp 1) - (smie-indent-virtual :not-hanging)) + (smie-indent-virtual)) ;:not-hanging (scan-error nil))))) (defun smie-indent-keyword () @@ -577,36 +649,90 @@ ;; (e.g. "of" with "case", or "in" with "let"). (save-excursion (let* ((pos (point)) - (token (funcall smie-forward-token-function)) - (toklevels (cdr (assoc token smie-op-levels)))) - (when (car toklevels) + (toklevels (smie-indent-forward-token)) + (token (pop 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) - ;; 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)) + ((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)) + ((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 + ((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? + (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 +744,46 @@ (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 (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))) (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 (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 ;; 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) (current-column)) offset)))))) (defun smie-indent-exps () ;; Indentation of sequences of simple expressions without @@ -713,14 +832,14 @@ ;; 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))))))) (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
--- a/lisp/gnus/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/gnus/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,20 @@ +2010-06-08 Michael Albinus <michael.albinus@gmx.de> + + * auth-source.el (top): Autoload `secrets-list-collections', + `secrets-create-item', `secrets-delete-item'. + (auth-sources): Fix tag string. + (auth-get-source, auth-source-retrieve, auth-source-create) + (auth-source-delete): New defuns. + (auth-source-pick): Rewrite in order to avoid 2 passes. + (auth-source-forget-user-or-password): New parameter USERNAME. + (auth-source-user-or-password): New parameters CREATE-MISSING and + DELETE-EXISTING. Retrieve password interactively, if needed. + +2010-06-07 Teemu Likonen <tlikonen@iki.fi> (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 <yamaoka@jpl.org> * gnus-art.el (gnus-article-browse-delete-temp-files): Don't make query
--- a/lisp/gnus/auth-source.el Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/gnus/auth-source.el Tue Jun 08 13:59:22 2010 +0000 @@ -35,10 +35,13 @@ (eval-when-compile (require 'cl)) (autoload 'netrc-machine-user-or-password "netrc") -(autoload 'secrets-search-items "secrets") +(autoload 'secrets-create-item "secrets") +(autoload 'secrets-delete-item "secrets") (autoload 'secrets-get-alias "secrets") (autoload 'secrets-get-attribute "secrets") (autoload 'secrets-get-secret "secrets") +(autoload 'secrets-list-collections "secrets") +(autoload 'secrets-search-items "secrets") (defgroup auth-source nil "Authentication sources." @@ -122,7 +125,7 @@ (const :format "" :value :source) (choice :tag "Authentication backend choice" (string :tag "Authentication Source (file)") - (list :tag "secrets.el (Secret Service API/KWallet/GNOME KeyRing)" + (list :tag "secrets.el (Secret Service API/KWallet/GNOME Keyring)" (const :format "" :value :secrets) (choice :tag "Collection to use" (string :tag "Collection name") @@ -178,123 +181,182 @@ ;; (auth-source-pick nil :host "any" :protocol 'imap :user "joe") ;; (auth-source-pick t :host "any" :protocol 'imap :user "joe") -;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe") -;; (:source (:secrets "session") :host t :protocol t :user "joe") +;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe") +;; (:source (:secrets "session") :host t :protocol t :user "joe") ;; (:source (:secrets "login") :host t :protocol t) ;; (:source "~/.authinfo.gpg" :host t :protocol t))) -;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe") -;; (:source (:secrets "session") :host t :protocol t :user "joe") +;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe") +;; (:source (:secrets "session") :host t :protocol t :user "joe") ;; (:source (:secrets "login") :host t :protocol t) ;; )) ;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) +(defun auth-get-source (entry) + "Return the source string of ENTRY, which is one entry in `auth-sources'. +If it is a Secret Service API, return the collection name, otherwise +the file name." + (let ((source (plist-get entry :source))) + (if (stringp source) + source + ;; Secret Service API. + (setq source (plist-get source :secrets)) + (when (eq source 'default) + (setq source (or (secrets-get-alias "default") "login"))) + (or source "session")))) + (defun auth-source-pick (&rest spec) "Parse `auth-sources' for matches of the SPEC plist. Common keys are :host, :protocol, and :user. A value of t in SPEC means to always succeed in the match. A string value is -matched as a regex. +matched as a regex." + (let ((keys (loop for i below (length spec) by 2 collect (nth i spec))) + choices) + (dolist (choice (copy-tree auth-sources) choices) + (let ((source (plist-get choice :source)) + (match t)) + (when + (and + ;; Check existence of source. + (if (consp source) + ;; Secret Service API. + (member (auth-get-source choice) (secrets-list-collections)) + ;; authinfo file. + (file-exists-p source)) -The first pass skips fallback choices. If no choices are found -on the first pass, a second pass is made including the fallback -choices. + ;; Check keywords. + (dolist (k keys match) + (let* ((v (plist-get spec k)) + (choicev (plist-get choice k))) + (setq match + (and match + (or + ;; source always matches spec key + (eq t choicev) + ;; source key gives regex to match against spec + (and (stringp choicev) (string-match choicev v)) + ;; source key gives symbol to match against spec + (and (symbolp choicev) (eq choicev v)))))))) -For string (filename) sources, fallback choices are those where -PROTOCOL or HOST are nil. + (add-to-list 'choices choice 'append)))))) -For secrets.el collections, the :host and :protocol keys are not -checked for fallback choices." - (let (choices) - (dolist (fallback '(nil t)) - (let ((keys (loop for i below (length spec) by 2 - collect (nth i spec))) - (default-session-fallback "login")) - (dolist (choice auth-sources) - (let* ((s (plist-get choice :source)) - ;; this is only set for Secret Service API specs (see secrets.el) - (coll (and (consp s) (plist-get s :secrets))) - (score 0)) - (cond - (coll ; use secrets.el here - (when (eq coll 'default) - (setq coll (secrets-get-alias "default")) - (unless coll - (auth-source-do-debug - "No 'default' alias. Trying collection '%s'." - default-session-fallback) - (setq coll default-session-fallback))) - (let* ((coll-search (cond - ((stringp coll) coll) - - ;; when the collection is nil: - ;; in fallback mode, accept it as any - ;; otherwise, hope to fail - ((null coll) (if fallback - nil - " *fallback-fail*")))) - ;; assemble a search query for secrets-search-items - ;; in fallback mode, host and protocol are not checked - (other-search (loop for k - in (if fallback - (remove :host - (remove :protocol keys)) - keys) - append (list - k - ;; convert symbols to a string - (let ((v (plist-get spec k))) - (if (stringp v) - v - (prin1-to-string v)))))) - ;; the score is based on how exact the search was, - ;; plus base score = 1 for any match - (score (1+ (length other-search))) - (results (apply 'secrets-search-items - coll-search - other-search))) - (auth-source-do-debug - "auth-source-pick: got items %s in collection '%s' + %s" - results coll-search other-search) - ;; put the results in the choices variable - (dolist (result results) - (setq choices (cons (list score - `(:source secrets - :item ,result - :collection ,coll - :search ,coll-search - ,@other-search)) - choices))))) - ;; this is any non-secrets spec (currently means a string filename) - (t - (let ((match t)) - (dolist (k keys) - (let* ((v (plist-get spec k)) - (choicev (plist-get choice k))) - (setq match - (and match - (or (eq t choicev) ; source always matches spec key - ;; source key gives regex to match against spec - (and (stringp choicev) (string-match choicev v)) - ;; source key gives symbol to match against spec - (and (symbolp choicev) (eq choicev v)) - ;; in fallback mode, missing source key is OK - fallback))) - (when match (incf score)))) ; increment the score for each match +(defun auth-source-retrieve (mode entry &rest spec) + "Retrieve MODE credentials according to SPEC from ENTRY." + (catch 'no-password + (let ((host (plist-get spec :host)) + (user (plist-get spec :user)) + (prot (plist-get spec :protocol)) + (source (plist-get entry :source)) + result) + (cond + ;; Secret Service API. + ((consp source) + (let ((coll (auth-get-source entry)) + item) + ;; Loop over candidates with a matching host attribute. + (dolist (elt (secrets-search-items coll :host host) item) + (when (and (or (not user) + (string-equal + user (secrets-get-attribute coll elt :user))) + (or (not prot) + (string-equal + prot (secrets-get-attribute coll elt :protocol)))) + (setq item elt) + (return elt))) + ;; Compose result. + (when item + (setq result + (mapcar (lambda (m) + (if (string-equal "password" m) + (or (secrets-get-secret coll item) + ;; When we do not find a password, + ;; we return nil anyway. + (throw 'no-password nil)) + (or (secrets-get-attribute coll item :user) + user))) + (if (consp mode) mode (list mode))))) + (if (consp mode) result (car result)))) + ;; Anything else is netrc. + (t + (let ((search (list source (list host) (list (format "%s" prot)) + (auth-source-protocol-defaults prot)))) + (setq result + (mapcar (lambda (m) + (if (string-equal "password" m) + (or (apply + 'netrc-machine-user-or-password m search) + ;; When we do not find a password, we + ;; return nil anyway. + (throw 'no-password nil)) + (or (apply + 'netrc-machine-user-or-password m search) + user))) + (if (consp mode) mode (list mode))))) + (if (consp mode) result (car result))))))) - ;; now if the whole iteration resulted in a match: - (when match - (setq choices (cons (list score choice) choices)))))))) - ;; when there were matches, skip the second pass - (when choices (return choices)))) +(defun auth-source-create (mode entry &rest spec) + "Create interactively credentials according to SPEC in ENTRY. +Return structure as specified by MODE." + (let* ((host (plist-get spec :host)) + (user (plist-get spec :user)) + (prot (plist-get spec :protocol)) + (source (plist-get entry :source)) + (name (concat (if user (format "%s@" user)) + host + (if prot (format ":%s" prot)))) + result) + (setq result + (mapcar + (lambda (m) + (if (equal "password" m) + (let ((passwd (read-passwd "Password: "))) + (cond + ;; Secret Service API. + ((consp source) + (apply + 'secrets-create-item + (auth-get-source entry) name passwd spec)) + (t)) ;; netrc not implemented yes. + passwd) + (or + ;; the originally requested :user + user + "unknown-user"))) + (if (consp mode) mode (list mode)))) + (if (consp mode) result (car result)))) - ;; return the results sorted by score - (mapcar 'cadr (sort choices (lambda (x y) (> (car x) (car y))))))) +(defun auth-source-delete (entry &rest spec) + "Delete credentials according to SPEC in ENTRY." + (let ((host (plist-get spec :host)) + (user (plist-get spec :user)) + (prot (plist-get spec :protocol)) + (source (plist-get entry :source))) + (cond + ;; Secret Service API. + ((consp source) + (let ((coll (auth-get-source entry))) + ;; Loop over candidates with a matching host attribute. + (dolist (elt (secrets-search-items coll :host host)) + (when (and (or (not user) + (string-equal + user (secrets-get-attribute coll elt :user))) + (or (not prot) + (string-equal + prot (secrets-get-attribute coll elt :protocol)))) + (secrets-delete-item coll elt))))) + (t)))) ;; netrc not implemented yes. -(defun auth-source-forget-user-or-password (mode host protocol) +(defun auth-source-forget-user-or-password + (mode host protocol &optional username) + "Remove cached authentication token." (interactive "slogin/password: \nsHost: \nsProtocol: \n") ;for testing - (remhash (format "%s %s:%s" mode host protocol) auth-source-cache)) + (remhash + (if username + (format "%s %s:%s %s" mode host protocol username) + (format "%s %s:%s" mode host protocol)) + auth-source-cache)) (defun auth-source-forget-all-cached () "Forget all cached auth-source authentication tokens." @@ -308,7 +370,8 @@ ;; (auth-source-user-or-password '("login" "password") "imap.myhost.com" "other" "tzz") ;; (auth-source-user-or-password '("login" "password") "imap.myhost.com" "other" "joe"))) -(defun auth-source-user-or-password (mode host protocol &optional username) +(defun auth-source-user-or-password + (mode host protocol &optional username create-missing delete-existing) "Find MODE (string or list of strings) matching HOST and PROTOCOL. USERNAME is optional and will be used as \"login\" in a search @@ -317,17 +380,31 @@ username \"joe\" and it matches an item but the item doesn't have a :user attribute, the username \"joe\" will be returned. -MODE can be \"login\" or \"password\" for example." +A non nil DELETE-EXISTING means deleting any matching password +entry in the respective sources. This is useful only when +CREATE-MISSING is non nil as well; the intended use case is to +remove wrong password entries. + +If no matching entry is found, and CREATE-MISSING is non nil, +the password will be retrieved interactively, and it will be +stored in the password database which matches best (see +`auth-sources'). + +MODE can be \"login\" or \"password\"." (auth-source-do-debug "auth-source-user-or-password: get %s for %s (%s) + user=%s" mode host protocol username) (let* ((listy (listp mode)) (mode (if listy mode (list mode))) - (extras (when username `(:user ,username))) - (cname (format "%s %s:%s %s" mode host protocol extras)) + (cname (if username + (format "%s %s:%s %s" mode host protocol username) + (format "%s %s:%s" mode host protocol))) (search (list :host host :protocol protocol)) (search (if username (append search (list :user username)) search)) - (found (gethash cname auth-source-cache))) + (found (if (not delete-existing) + (gethash cname auth-source-cache) + (remhash cname auth-source-cache) + nil))) (if found (progn (auth-source-do-debug @@ -337,45 +414,35 @@ (if (and (member "password" mode) auth-source-hide-passwords) "SECRET" found) - host protocol extras) + host protocol username) found) ; return the found data ;; else, if not found - (dolist (choice (apply 'auth-source-pick search)) - (setq found (cond - ;; the secrets.el spec - ((eq (plist-get choice :source) 'secrets) - (let ((coll (plist-get choice :search)) - (item (plist-get choice :item))) - (mapcar (lambda (m) - (if (equal "password" m) - (secrets-get-secret coll item) - ;; the user name is either - (or - ;; the secret's attribute :user, or - (secrets-get-attribute coll item :user) - ;; the originally requested :user - username - "unknown-user"))) - mode))) - (t ; anything else is netrc - (netrc-machine-user-or-password - mode - (plist-get choice :source) - (list host) - (list (format "%s" protocol)) - (auth-source-protocol-defaults protocol))))) + (let ((choices (apply 'auth-source-pick search))) + (dolist (choice choices) + (if delete-existing + (apply 'auth-source-delete choice search) + (setq found (apply 'auth-source-retrieve mode choice search))) + (and found (return found))) + + ;; We haven't found something, so we will create it interactively. + (when (and (not found) choices create-missing) + (setq found (apply 'auth-source-create mode (car choices) search))) + + ;; Cache the result. (when found (auth-source-do-debug "auth-source-user-or-password: found %s=%s for %s (%s) + %s" mode ;; don't show the password - (if (and (member "password" mode) auth-source-hide-passwords) "SECRET" found) - host protocol extras) + (if (and (member "password" mode) auth-source-hide-passwords) + "SECRET" found) + host protocol username) (setq found (if listy found (car-safe found))) (when auth-source-do-cache (puthash cname found auth-source-cache))) - (return found))))) - + + found)))) + (defun auth-source-protocol-defaults (protocol) "Return a list of default ports and names for PROTOCOL." (cdr-safe (assoc protocol auth-source-protocols)))
--- a/lisp/gnus/gnus-agent.el Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/gnus/gnus-agent.el Tue Jun 08 13:59:22 2010 +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
--- a/lisp/iimage.el Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/iimage.el Tue Jun 08 13:59:22 2010 +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
--- a/lisp/isearch.el Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/isearch.el Tue Jun 08 13:59:22 2010 +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)))
--- a/lisp/window.el Sat Jun 05 11:10:33 2010 +0000 +++ b/lisp/window.el Tue Jun 08 13:59:22 2010 +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.
--- a/nt/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/nt/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu <dann@ics.uci.edu> + + * config.nt: Remove code depending on BSTRING. + 2010-06-03 Glenn Morris <rgm@gnu.org> * config.nt: Remove NOT_C_CODE tests, it is always true now.
--- a/nt/config.nt Sat Jun 05 11:10:33 2010 +0000 +++ b/nt/config.nt Tue Jun 08 13:59:22 2010 +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__
--- a/src/ChangeLog Sat Jun 05 11:10:33 2010 +0000 +++ b/src/ChangeLog Tue Jun 08 13:59:22 2010 +0000 @@ -1,3 +1,43 @@ +2010-06-08 Dan Nicolaescu <dann@ics.uci.edu> + + * lread.c (X_OK): Remove, unused. + + * dispnew.c: Remove obsolete comment. + + 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 <rudalics@gmx.at> + + * 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 <lekktu@gmail.com> + + * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings. + (Fforward_line, Fbeginning_of_line): Reflow docstrings. + +2010-06-06 Dan Nicolaescu <dann@ics.uci.edu> + + 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 <lekktu@gmail.com> Remove obsolete macro BASE_LEADING_CODE_P.
--- a/src/alloc.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/alloc.c Tue Jun 08 13:59:22 2010 +0000 @@ -70,7 +70,6 @@ #endif #ifdef HAVE_FCNTL_H -#define INCLUDED_FCNTL #include <fcntl.h> #endif #ifndef O_WRONLY
--- a/src/callproc.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/callproc.c Tue Jun 08 13:59:22 2010 +0000 @@ -39,7 +39,6 @@ #include <sys/file.h> #ifdef HAVE_FCNTL_H -#define INCLUDED_FCNTL #include <fcntl.h> #endif @@ -53,7 +52,6 @@ #endif #ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */ -#define INCLUDED_FCNTL #include <fcntl.h> #include <sys/stat.h> #include <sys/param.h>
--- a/src/cmds.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/cmds.c Tue Jun 08 13:59:22 2010 +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
--- a/src/config.in Sat Jun 05 11:10:33 2010 +0000 +++ b/src/config.in Tue Jun 08 13:59:22 2010 +0000 @@ -312,10 +312,10 @@ /* Define to 1 if you have the <kerberos/krb.h> 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 <krb5.h> 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 <utime.h>. */ @@ -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. */ @@ -1146,11 +1141,11 @@ #endif /* __P */ #ifdef HAVE_STRING_H -#include "string.h" +#include <string.h> #endif #ifdef HAVE_STRINGS_H -#include "strings.h" /* May be needed for bcopy & al. */ +#include <strings.h> /* May be needed for bcopy & al. */ #endif #ifdef HAVE_STDLIB_H
--- a/src/dispnew.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/dispnew.c Tue Jun 08 13:59:22 2010 +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
--- a/src/lread.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/lread.c Tue Jun 08 13:59:22 2010 +0000 @@ -48,10 +48,6 @@ #include <unistd.h> #endif -#ifndef X_OK -#define X_OK 01 -#endif - #include <math.h> #ifdef HAVE_SETLOCALE
--- a/src/s/aix4-2.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/aix4-2.h Tue Jun 08 13:59:22 2010 +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"
--- a/src/s/bsd-common.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/bsd-common.h Tue Jun 08 13:59:22 2010 +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. */
--- a/src/s/cygwin.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/cygwin.h Tue Jun 08 13:59:22 2010 +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. */
--- a/src/s/darwin.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/darwin.h Tue Jun 08 13:59:22 2010 +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. */
--- a/src/s/gnu-linux.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/gnu-linux.h Tue Jun 08 13:59:22 2010 +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
--- a/src/s/hpux10-20.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/hpux10-20.h Tue Jun 08 13:59:22 2010 +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. */
--- a/src/s/ms-w32.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/ms-w32.h Tue Jun 08 13:59:22 2010 +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)
--- a/src/s/msdos.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/msdos.h Tue Jun 08 13:59:22 2010 +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
--- a/src/s/template.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/template.h Tue Jun 08 13:59:22 2010 +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).
--- a/src/s/usg5-4.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/s/usg5-4.h Tue Jun 08 13:59:22 2010 +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
--- a/src/sysdep.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/sysdep.c Tue Jun 08 13:59:22 2010 +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)
--- a/src/systty.h Sat Jun 05 11:10:33 2010 +0000 +++ b/src/systty.h Tue Jun 08 13:59:22 2010 +0000 @@ -27,17 +27,13 @@ #ifndef NO_TERMIO #include <termio.h> #endif /* not NO_TERMIO */ -#ifndef INCLUDED_FCNTL -#define INCLUDED_FCNTL #include <fcntl.h> -#endif #else /* not HAVE_TERMIO */ #ifdef HAVE_TERMIOS #ifndef NO_TERMIO #include <termio.h> #endif #include <termios.h> -#define INCLUDED_FCNTL #include <fcntl.h> #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. */
--- a/src/window.c Sat Jun 05 11:10:33 2010 +0000 +++ b/src/window.c Tue Jun 08 13:59:22 2010 +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;