# HG changeset patch # User Katsumi Yamaoka # Date 1274269435 0 # Node ID f3352dc3107f9f5b4522ab3f5c7c5b368ab7e61b # Parent f779e6dd2626bfbb21f72506b1f0b3cace4c1e36# Parent ba70090bc7789c8dc0467feeb0ce555619fd1c06 Merge from mainline. diff -r f779e6dd2626 -r f3352dc3107f ChangeLog --- a/ChangeLog Tue May 18 11:35:42 2010 +0000 +++ b/ChangeLog Wed May 19 11:43:55 2010 +0000 @@ -1,3 +1,9 @@ +2010-05-19 Glenn Morris + + * configure.in (LINKER, YMF_PASS_LDFLAGS): New output variables. + (ORDINARY_LINK): New AC_DEFINE. + (LIB_GCC): No need to set if ORDINARY_LINK. + 2010-05-18 Glenn Morris * configure.in (POST_ALLOC_OBJ) [cygwin]: Omit vm-limit.o. diff -r f779e6dd2626 -r f3352dc3107f configure --- a/configure Tue May 18 11:35:42 2010 +0000 +++ b/configure Wed May 19 11:43:55 2010 +0000 @@ -818,6 +818,8 @@ POST_ALLOC_OBJ LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_SYSTEM_EXTRA +YMF_PASS_LDFLAGS +LINKER LIB_GCC MOUSE_SUPPORT TOOLTIP_SUPPORT @@ -26616,8 +26618,79 @@ +LINKER= +ORDINARY_LINK= +case "$opsys" in + ## gnu: GNU needs its own crt0. + aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; + + cygwin) LINKER="\$(CC)" ;; + + ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the + ## library search parth, i.e. it won't search /usr/lib for libc and + ## friends. Using -nostartfiles instead avoids this problem, and + ## will also work on earlier NetBSD releases. + netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; + + ## macpcc: NAKAJI Hiroyuki says + ## MkLinux/LinuxPPC needs this. + ## ibms390x only supports opsys = gnu-linux so it can be added here. + gnu-*) + case "$machine" in + macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; + esac + ;; +esac + +## A macro which other sections of Makefile can redefine to munge the +## flags before they are passed to LD. This is helpful if you have +## redefined LD to something odd, like "gcc". +## (The YMF prefix is a holdover from the old name "ymakefile".) +YMF_PASS_LDFLAGS=flags +if test "x$ORDINARY_LINK" = "xyes"; then + + LINKER="\$(CC)" + +cat >>confdefs.h <<\_ACEOF +#define ORDINARY_LINK 1 +_ACEOF + + +## The system files defining neither ORDINARY_LINK nor LINKER are: +## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*. +elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then + + ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure + ## places that are difficult to figure out at make time. Fortunately, + ## these same versions allow you to pass arbitrary flags on to the + ## linker, so there is no reason not to use it as a linker. + ## + ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from + ## searching for libraries in its internal directories, so we have to + ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). + LINKER="\$(CC) -nostdlib" + ## GCC passes any argument prefixed with -Xlinker directly to the linker. + ## See prefix-args.c for an explanation of why we do not do this with the + ## shell''s ``for'' construct. Note that sane people do not have '.' in + ## their paths, so we must use ./prefix-args. + ## TODO either make prefix-args check ORDINARY_LINK internally, + ## or remove it altogether (bug#6184), removing the need for this macro. + YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`' +fi + + +test "x$LINKER" = "x" && LINKER=ld +## FIXME? What setting of YMF_PASS_LDFLAGS should this have? +test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" + + + + +## FIXME? The logic here is not precisely the same as that above +## setting YMF_PASS_LDFLAGS. There is no check here for a pre-defined +## LINKER. Should we only be setting LIB_GCC if LD ~ -nostdlib? LIB_GCC= -if test "x$GCC" = "xyes"; then +if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then case "$opsys" in ## cygwin: don't link against static libgcc. diff -r f779e6dd2626 -r f3352dc3107f configure.in --- a/configure.in Tue May 18 11:35:42 2010 +0000 +++ b/configure.in Wed May 19 11:43:55 2010 +0000 @@ -3277,8 +3277,75 @@ AC_SUBST(LD_SWITCH_SYSTEM_EXTRA) +LINKER= +ORDINARY_LINK= +case "$opsys" in + ## gnu: GNU needs its own crt0. + aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; + + cygwin) LINKER="\$(CC)" ;; + + ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the + ## library search parth, i.e. it won't search /usr/lib for libc and + ## friends. Using -nostartfiles instead avoids this problem, and + ## will also work on earlier NetBSD releases. + netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; + + ## macpcc: NAKAJI Hiroyuki says + ## MkLinux/LinuxPPC needs this. + ## ibms390x only supports opsys = gnu-linux so it can be added here. + gnu-*) + case "$machine" in + macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; + esac + ;; +esac + +## A macro which other sections of Makefile can redefine to munge the +## flags before they are passed to LD. This is helpful if you have +## redefined LD to something odd, like "gcc". +## (The YMF prefix is a holdover from the old name "ymakefile".) +YMF_PASS_LDFLAGS=flags +if test "x$ORDINARY_LINK" = "xyes"; then + + LINKER="\$(CC)" + AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) + +## The system files defining neither ORDINARY_LINK nor LINKER are: +## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*. +elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then + + ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure + ## places that are difficult to figure out at make time. Fortunately, + ## these same versions allow you to pass arbitrary flags on to the + ## linker, so there is no reason not to use it as a linker. + ## + ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from + ## searching for libraries in its internal directories, so we have to + ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). + LINKER="\$(CC) -nostdlib" + ## GCC passes any argument prefixed with -Xlinker directly to the linker. + ## See prefix-args.c for an explanation of why we do not do this with the + ## shell''s ``for'' construct. Note that sane people do not have '.' in + ## their paths, so we must use ./prefix-args. + ## TODO either make prefix-args check ORDINARY_LINK internally, + ## or remove it altogether (bug#6184), removing the need for this macro. + YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`' +fi +AC_SUBST(YMF_PASS_LDFLAGS) + +test "x$LINKER" = "x" && LINKER=ld +## FIXME? What setting of YMF_PASS_LDFLAGS should this have? +test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" + +AC_SUBST(LINKER) + + +## FIXME? The logic here is not precisely the same as that above +## setting YMF_PASS_LDFLAGS. There is no check here for a pre-defined +## LINKER. Should we only be setting LIB_GCC if LD ~ -nostdlib? LIB_GCC= -if test "x$GCC" = "xyes"; then +if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then case "$opsys" in ## cygwin: don't link against static libgcc. diff -r f779e6dd2626 -r f3352dc3107f doc/emacs/ChangeLog --- a/doc/emacs/ChangeLog Tue May 18 11:35:42 2010 +0000 +++ b/doc/emacs/ChangeLog Wed May 19 11:43:55 2010 +0000 @@ -4,7 +4,7 @@ paragraphs. (Line Truncation): Fix wording for bidi display. - * basic.texi (Moving Point): Document bidi-aware behavior of he arrow + * basic.texi (Moving Point): Document bidi-aware behavior of the arrow keys. 2010-05-08 Chong Yidong @@ -136,7 +136,7 @@ * custom.texi (Init Examples): Add xref to Mail Header. - * emacs.texi (Top): Fix xrefs. + * emacs.texi (Top): Fix xrefs. 2010-03-30 Chong Yidong @@ -1704,7 +1704,7 @@ (Fortran Columns): Mention font-locking. (Fortran Abbrev): Word syntax not relevant with new-style abbrev. -2008-08-23 Johan Bockgard +2008-08-23 Johan Bockgård * basic.texi (Moving Point): Fix / confusion. diff -r f779e6dd2626 -r f3352dc3107f etc/NEWS --- a/etc/NEWS Tue May 18 11:35:42 2010 +0000 +++ b/etc/NEWS Wed May 19 11:43:55 2010 +0000 @@ -214,7 +214,9 @@ ** secrets.el is an implementation of the Secret Service API, an interface to password managers like GNOME Keyring or KDE Wallet. The -Secret Service API requires D-Bus for communication. +Secret Service API requires D-Bus for communication. The command +`secrets-show-secrets' offers a buffer with a visualization of the +secrets. * Incompatible Lisp Changes in Emacs 24.1 diff -r f779e6dd2626 -r f3352dc3107f etc/TODO --- a/etc/TODO Tue May 18 11:35:42 2010 +0000 +++ b/etc/TODO Wed May 19 11:43:55 2010 +0000 @@ -40,9 +40,9 @@ fix_submap_inheritance hack and to more cleanly express the relationship between minibuffer-local-*-map): I've had this locally for a long time, but the details of the semantics is somewhat ... delicate. -*** prog-mode (a parent-mode, like text-mode). Could/should provide - a better fill-paragraph default that uses syntax-tables to recognize - string/comment boundaries. +*** Derive from prog-mode in more places, close bug#5532. +*** prog-mode could/should provide a better fill-paragraph default + that uses syntax-tables to recognize string/comment boundaries. *** provide more completion-at-point-functions. Make existing in-buffer completion use completion-at-point. *** "functional" function-key-map that would make it easy to add (and diff -r f779e6dd2626 -r f3352dc3107f lisp/ChangeLog --- a/lisp/ChangeLog Tue May 18 11:35:42 2010 +0000 +++ b/lisp/ChangeLog Wed May 19 11:43:55 2010 +0000 @@ -1,3 +1,53 @@ +2010-05-19 Stefan Monnier + + * indent.el (indent-region): Deactivate region (bug#6200). + +2010-05-19 Glenn Morris + + * vc-dir.el (vc-dir): Don't pop-up-windows. (Bug#6204) + +2010-05-19 Kenichi Handa + + * composite.el: Register compose-gstring-for-graphic in + composition-function-table only for combining characters (Mn, Mc, Me). + +2010-05-18 Jay Belanger + + * calc/calc-trail.el (calc-trail-isearch-forward) + (calc-trail-isearch-backward): Ensure that the new window + point is set correctly. + +2010-05-18 Stefan Monnier + + * subr.el (read-quoted-char): Resolve modifiers after key + remapping (bug#6212). + +2010-05-18 Michael Albinus + + Add visualization code for secrets. + * net/secrets.el (secrets-mode): New major mode. + (secrets-show-secrets, secrets-show-collections) + (secrets-expand-collection, secrets-expand-item) + (secrets-tree-widget-after-toggle-function) + (secrets-tree-widget-show-password): New defuns. + +2010-05-18 Stefan Monnier + + * emacs-lisp/smie.el (smie-next-sexp): Break inf-loop at BOB. + (smie-backward-sexp, smie-forward-sexp): Remove boundary condition now + handled in smie-next-sexp. + (smie-indent-calculate): Provide a starting indentation (so the + recursion is well-founded ;-). + + Fix handling of non-associative equal levels. + * emacs-lisp/smie.el (smie-prec2-levels): Choose distinct levels even + when it's not needed. + (smie-op-left, smie-op-right): New functions. + (smie-next-sexp): New function, extracted from smie-backward-sexp. + Better handle equal levels to distinguish the associative case from + the "multi-keyword construct" case. + (smie-backward-sexp, smie-forward-sexp): Use it. + 2010-05-18 Juanma Barranquero * progmodes/prolog.el (smie-indent-basic): Declare for byte-compiler. @@ -129,7 +179,7 @@ 2010-05-13 Michael Albinus * net/tramp.el (with-progress-reporter): Create reporter object - only when the message would be displayed. Handled nested calls. + only when the message would be displayed. Handle nested calls. (tramp-handle-load, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-write-region) (tramp-maybe-send-script, tramp-find-shell): diff -r f779e6dd2626 -r f3352dc3107f lisp/calc/calc-trail.el --- a/lisp/calc/calc-trail.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/calc/calc-trail.el Wed May 19 11:43:55 2010 +0000 @@ -108,20 +108,28 @@ (defun calc-trail-isearch-forward () (interactive) (calc-with-trail-buffer - (save-window-excursion - (select-window (get-buffer-window (current-buffer))) - (let ((search-exit-char ?\r)) - (isearch-forward))) - (calc-trail-here))) + (let ((win (get-buffer-window (current-buffer))) + pos) + (save-window-excursion + (select-window win) + (isearch-forward) + (setq pos (point))) + (goto-char pos) + (set-window-point win pos) + (calc-trail-here)))) (defun calc-trail-isearch-backward () (interactive) (calc-with-trail-buffer - (save-window-excursion - (select-window (get-buffer-window (current-buffer))) - (let ((search-exit-char ?\r)) - (isearch-backward))) - (calc-trail-here))) + (let ((win (get-buffer-window (current-buffer))) + pos) + (save-window-excursion + (select-window win) + (isearch-backward) + (setq pos (point))) + (goto-char pos) + (set-window-point win pos) + (calc-trail-here)))) (defun calc-trail-yank (arg) (interactive "P") diff -r f779e6dd2626 -r f3352dc3107f lisp/composite.el --- a/lisp/composite.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/composite.el Wed May 19 11:43:55 2010 +0000 @@ -532,9 +532,9 @@ (defun compose-gstring-for-graphic (gstring) "Compose glyph-string GSTRING for graphic display. -Non-spacing characters are composed with the preceding base +Combining characters are composed with the preceding base character. If the preceding character is not a base character, -each non-spacing character is composed as a spacing character by +each combining character is composed as a spacing character by a padding space before and/or after the character. All non-spacing characters has this function in @@ -660,9 +660,9 @@ [nil 0 compose-gstring-for-graphic]))) (map-char-table #'(lambda (key val) - (if (= val 0) + (if (memq val '(Mn Mc Me)) (set-char-table-range composition-function-table key elt))) - char-width-table)) + unicode-category-table)) (defun compose-gstring-for-terminal (gstring) "Compose glyph string GSTRING for terminal display. diff -r f779e6dd2626 -r f3352dc3107f lisp/emacs-lisp/smie.el --- a/lisp/emacs-lisp/smie.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/emacs-lisp/smie.el Wed May 19 11:43:55 2010 +0000 @@ -252,11 +252,23 @@ (dolist (cst csts) (unless (memq (car cst) rhvs) (setq progress t) + ;; We could give each var in a given iteration the same value, + ;; but we can also give them arbitrarily different values. + ;; Basically, these are vars between which there is no + ;; constraint (neither equality nor inequality), so + ;; anything will do. + ;; We give them arbitrary values, which means that we + ;; replace the "no constraint" case with either > or < + ;; but not =. The reason we do that is so as to try and + ;; distinguish associative operators (which will have + ;; left = right). + (unless (caar cst) (setcar (car cst) i) + (incf i)) (setq csts (delq cst csts)))) (unless progress (error "Can't resolve the precedence table to precedence levels"))) - (incf i)) + (incf i 10)) ;; Propagate equalities back to their source. (dolist (eq (nreverse eqs)) (assert (null (caar eq))) @@ -278,6 +290,9 @@ Each element is of the form (TOKEN LEFT-LEVEL RIGHT-LEVEL). Parsing is done using an operator precedence parser.") +(defalias 'smie-op-left 'car) +(defalias 'smie-op-right 'cadr) + (defun smie-backward-token () ;; FIXME: This may be an OK default but probably needs a hook. (buffer-substring (point) @@ -292,6 +307,92 @@ (skip-syntax-forward "w_'")) (point)))) +(defun smie-associative-p (toklevels) + ;; in "a + b + c" we want to stop at each +, but in + ;; "if a then b else c" we don't want to stop at each keyword. + ;; To distinguish the two cases, we made smie-prec2-levels choose + ;; different levels for each part of "if a then b else c", so that + ;; by checking if the left-level is equal to the right level, we can + ;; figure out that it's an associative operator. + ;; This is not 100% foolproof, tho, since a grammar like + ;; (exp ("A" exp "C") ("A" exp "B" exp "C")) + ;; will cause "B" to have equal left and right levels, even though + ;; it is not an associative operator. + ;; A better check would be the check the actual previous operator + ;; against this one to see if it's the same, but we'd have to change + ;; `levels' to keep a stack of operators rather than only levels. + (eq (smie-op-left toklevels) (smie-op-right toklevels))) + +(defun smie-next-sexp (next-token next-sexp op-forw op-back halfsexp) + "Skip over one sexp. +NEXT-TOKEN is a function of no argument that moves forward by one +token (after skipping comments if needed) and returns it. +NEXT-SEXP is a lower-level function to skip one sexp. +OP-FORW is the accessor to the forward level of the level data. +OP-BACK is the accessor to the backward level of the level data. +HALFSEXP if non-nil, means skip over a partial sexp if needed. I.e. if the +first token we see is an operator, skip over its left-hand-side argument. +Possible return values: + (FORW-LEVEL POS TOKEN): we couldn't skip TOKEN because its back-level + is too high. FORW-LEVEL is the forw-level of TOKEN, + POS is its start position in the buffer. + (t POS TOKEN): same thing when we bump on the wrong side of a paren. + (nil POS TOKEN): we skipped over a paren-like pair. + nil: we skipped over an identifier, matched parentheses, ..." + (catch 'return + (let ((levels ())) + (while + (let* ((pos (point)) + (token (funcall next-token)) + (toklevels (cdr (assoc token smie-op-levels)))) + + (cond + ((null toklevels) + (when (equal token "") + (condition-case err + (progn (goto-char pos) (funcall next-sexp 1) nil) + (scan-error (throw 'return (list t (caddr err))))) + (if (eq pos (point)) + ;; We did not move, so let's abort the loop. + (throw 'return (list t (point)))))) + ((null (funcall op-back toklevels)) + ;; A token like a paren-close. + (assert (funcall op-forw toklevels)) ;Otherwise, why mention it? + (push (funcall op-forw toklevels) levels)) + (t + (while (and levels (< (funcall op-back toklevels) (car levels))) + (setq levels (cdr levels))) + (cond + ((null levels) + (if (and halfsexp (funcall op-forw toklevels)) + (push (funcall op-forw toklevels) levels) + (throw 'return + (prog1 (list (or (car toklevels) t) (point) token) + (goto-char pos))))) + (t + (if (and levels (= (funcall op-back toklevels) (car levels))) + (setq levels (cdr levels))) + (cond + ((null levels) + (cond + ((null (funcall op-forw toklevels)) + (throw 'return (list nil (point) token))) + ((smie-associative-p toklevels) + (throw 'return + (prog1 (list (or (car toklevels) t) (point) token) + (goto-char pos)))) + ;; We just found a match to the previously pending operator + ;; but this new operator is still part of a larger RHS. + ;; E.g. we're now looking at the "then" in + ;; "if a then b else c". So we have to keep parsing the + ;; rest of the construct. + (t (push (funcall op-forw toklevels) levels)))) + (t + (if (funcall op-forw toklevels) + (push (funcall op-forw toklevels) levels)))))))) + levels) + (setq halfsexp nil))))) + (defun smie-backward-sexp (&optional halfsexp) "Skip over one sexp. HALFSEXP if non-nil, means skip over a partial sexp if needed. I.e. if the @@ -303,55 +404,13 @@ (t POS TOKEN): same thing but for an open-paren or the beginning of buffer. (nil POS TOKEN): we skipped over a paren-like pair. nil: we skipped over an identifier, matched parentheses, ..." - (if (bobp) (list t (point)) - (catch 'return - (let ((levels ())) - (while - (let* ((pos (point)) - (token (progn (forward-comment (- (point-max))) - (smie-backward-token))) - (toklevels (cdr (assoc token smie-op-levels)))) + (smie-next-sexp + (lambda () (forward-comment (- (point-max))) (smie-backward-token)) + (indirect-function 'backward-sexp) + (indirect-function 'smie-op-left) + (indirect-function 'smie-op-right) + halfsexp)) - (cond - ((null toklevels) - (if (equal token "") - (condition-case err - (progn (goto-char pos) (backward-sexp 1) nil) - (scan-error (throw 'return (list t (caddr err))))))) - ((null (nth 1 toklevels)) - ;; A token like a paren-close. - (assert (nth 0 toklevels)) ;Otherwise, why mention it? - (push (nth 0 toklevels) levels)) - (t - (while (and levels (< (nth 1 toklevels) (car levels))) - (setq levels (cdr levels))) - (cond - ((null levels) - (if (and halfsexp (nth 0 toklevels)) - (push (nth 0 toklevels) levels) - (throw 'return - (prog1 (list (or (car toklevels) t) (point) token) - (goto-char pos))))) - (t - (while (and levels (= (nth 1 toklevels) (car levels))) - (setq levels (cdr levels))) - (cond - ((null levels) - (cond - ((null (nth 0 toklevels)) - (throw 'return (list nil (point) token))) - ((eq (nth 0 toklevels) (nth 1 toklevels)) - (throw 'return - (prog1 (list (or (car toklevels) t) (point) token) - (goto-char pos)))) - (t (debug)))) ;Not sure yet what to do here. - (t - (if (nth 0 toklevels) - (push (nth 0 toklevels) levels)))))))) - levels) - (setq halfsexp nil)))))) - -;; Mirror image, not used for indentation. (defun smie-forward-sexp (&optional halfsexp) "Skip over one sexp. HALFSEXP if non-nil, means skip over a partial sexp if needed. I.e. if the @@ -363,53 +422,12 @@ (t POS TOKEN): same thing but for an open-paren or the beginning of buffer. (nil POS TOKEN): we skipped over a paren-like pair. nil: we skipped over an identifier, matched parentheses, ..." - (if (eobp) (list t (point)) - (catch 'return - (let ((levels ())) - (while - (let* ((pos (point)) - (token (progn (forward-comment (point-max)) - (smie-forward-token))) - (toklevels (cdr (assoc token smie-op-levels)))) - - (cond - ((null toklevels) - (if (equal token "") - (condition-case err - (progn (goto-char pos) (forward-sexp 1) nil) - (scan-error (throw 'return (list t (caddr err))))))) - ((null (nth 0 toklevels)) - ;; A token like a paren-close. - (assert (nth 1 toklevels)) ;Otherwise, why mention it? - (push (nth 1 toklevels) levels)) - (t - (while (and levels (< (nth 0 toklevels) (car levels))) - (setq levels (cdr levels))) - (cond - ((null levels) - (if (and halfsexp (nth 1 toklevels)) - (push (nth 1 toklevels) levels) - (throw 'return - (prog1 (list (or (nth 1 toklevels) t) (point) token) - (goto-char pos))))) - (t - (while (and levels (= (nth 0 toklevels) (car levels))) - (setq levels (cdr levels))) - (cond - ((null levels) - (cond - ((null (nth 1 toklevels)) - (throw 'return (list nil (point) token))) - ((eq (nth 1 toklevels) (nth 0 toklevels)) - (throw 'return - (prog1 (list (or (nth 1 toklevels) t) (point) token) - (goto-char pos)))) - (t (debug)))) ;Not sure yet what to do here. - (t - (if (nth 1 toklevels) - (push (nth 1 toklevels) levels)))))))) - levels) - (setq halfsexp nil)))))) + (smie-next-sexp + (lambda () (forward-comment (point-max)) (smie-forward-token)) + (indirect-function 'forward-sexp) + (indirect-function 'smie-op-right) + (indirect-function 'smie-op-left) + halfsexp)) (defun smie-backward-sexp-command (&optional n) "Move backward through N logical elements." @@ -496,6 +514,10 @@ (and virtual (if (eq virtual :hanging) (not (smie-indent-hanging-p)) (smie-bolp)) (current-column)) + ;; Start the file at column 0. + (save-excursion + (forward-comment (- (point-max))) + (if (bobp) 0)) ;; Align close paren with opening paren. (save-excursion ;; (forward-comment (point-max)) diff -r f779e6dd2626 -r f3352dc3107f lisp/indent.el --- a/lisp/indent.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/indent.el Wed May 19 11:43:55 2010 +0000 @@ -431,7 +431,11 @@ (or (eolp) (indent-to column 0)) (forward-line 1)) - (move-marker end nil)))) + (move-marker end nil))) + ;; In most cases, reindenting modifies the buffer, but it may also + ;; leave it unmodified, in which case we have to deactivate the mark + ;; by hand. + (deactivate-mark)) (defun indent-relative-maybe () "Indent a new line like previous nonblank line. diff -r f779e6dd2626 -r f3352dc3107f lisp/net/secrets.el --- a/lisp/net/secrets.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/net/secrets.el Wed May 19 11:43:55 2010 +0000 @@ -129,6 +129,9 @@ ;; (secrets-search-items "session" :user "joe") ;; => ("my item" "another item") +;; Interactively, collections, items and their attributes could be +;; inspected by the command `secrets-show-secrets'. + ;;; Code: ;; It has been tested with GNOME Keyring 2.29.92. An implementation @@ -148,6 +151,13 @@ (require 'dbus) +(declare-function tree-widget-set-theme "tree-widget") +(declare-function widget-create-child-and-convert "wid-edit") +(declare-function widget-default-value-set "wid-edit") +(declare-function widget-field-end "wid-edit") +(declare-function widget-member "wid-edit") +(defvar tree-widget-after-toggle-functions) + (defvar secrets-enabled nil "Whether there is a daemon offering the Secret Service API.") @@ -665,6 +675,145 @@ :session secrets-service item-path secrets-interface-item "Delete"))))) +;;; Visualization. + +(define-derived-mode secrets-mode nil "Secrets" + "Major mode for presenting search results of a Xesam search. +In this mode, widgets represent the search results. + +\\{secrets-mode-map} +Turning on Xesam mode runs the normal hook `xesam-mode-hook'. It +can be used to set `xesam-notify-function', which must a search +engine specific, widget :notify function to visualize xesam:url." + ;; Keymap. + (setq secrets-mode-map (copy-keymap special-mode-map)) + (set-keymap-parent secrets-mode-map widget-keymap) + (define-key secrets-mode-map "z" 'kill-this-buffer) + + ;; When we toggle, we must set temporary widgets. + (set (make-local-variable 'tree-widget-after-toggle-functions) + '(secrets-tree-widget-after-toggle-function)) + + (when (not (called-interactively-p 'interactive)) + ;; Initialize buffer. + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (erase-buffer)))) + +;; It doesn't make sense to call it interactively. +(put 'secrets-mode 'disabled t) + +;; The very first buffer created with `secrets-mode' does not have the +;; keymap etc. So we create a dummy buffer. Stupid. +(with-temp-buffer (secrets-mode)) + +;;;###autoload +(defun secrets-show-secrets () + "Display a list of collections from the Secret Service API. +The collections are in tree view, that means they can be expanded +to the corresponding secret items, which could also be expanded +to their attributes." + (interactive) + ;; Create the search buffer. + (with-current-buffer (get-buffer-create "*Secrets*") + (switch-to-buffer-other-window (current-buffer)) + ;; Inialize buffer with `secrets-mode'. + (secrets-mode) + (secrets-show-collections))) + +(defun secrets-show-collections () + "Show all available collections." + (let ((inhibit-read-only t) + (alias (secrets-get-alias "default"))) + (erase-buffer) + (tree-widget-set-theme "folder") + (dolist (coll (secrets-list-collections)) + (widget-create + `(tree-widget + :tag ,coll + :collection ,coll + :open nil + :sample-face bold + :expander secrets-expand-collection))))) + +(defun secrets-expand-collection (widget) + "Expand items of collection shown as WIDGET." + (let ((coll (widget-get widget :collection))) + (mapcar + (lambda (item) + `(tree-widget + :tag ,item + :collection ,coll + :item ,item + :open nil + :sample-face bold + :expander secrets-expand-item)) + (secrets-list-items coll)))) + +(defun secrets-expand-item (widget) + "Expand password and attributes of item shown as WIDGET." + (let* ((coll (widget-get widget :collection)) + (item (widget-get widget :item)) + (attributes (secrets-get-attributes coll item)) + ;; padding is needed to format attribute names. + (padding + (1+ + (apply + 'max + (cons + (length "password") + (mapcar + (lambda (attribute) (length (symbol-name (car attribute)))) + attributes)))))) + (cons + ;; The password widget. + `(editable-field :tag "password" + :secret ?* + :value ,(secrets-get-secret coll item) + :sample-face widget-button-pressed + ;; We specify :size in order to limit the field. + :size 0 + :format ,(concat + "%{%t%}:" + (make-string (- padding (length "password")) ? ) + "%v\n")) + (mapcar + (lambda (attribute) + (let ((name (symbol-name (car attribute))) + (value (cdr attribute))) + ;; The attribute widget. + `(editable-field :tag ,name + :value ,value + :sample-face widget-documentation + ;; We specify :size in order to limit the field. + :size 0 + :format ,(concat + "%{%t%}:" + (make-string (- padding (length name)) ? ) + "%v\n")))) + attributes)))) + +(defun secrets-tree-widget-after-toggle-function (widget &rest ignore) + "Add a temporary widget to show the password." + (dolist (child (widget-get widget :children)) + (when (widget-member child :secret) + (goto-char (widget-field-end child)) + (widget-insert " ") + (widget-create-child-and-convert + child 'push-button + :notify 'secrets-tree-widget-show-password + "Show password"))) + (widget-setup)) + +(defun secrets-tree-widget-show-password (widget &rest ignore) + "Show password, and remove temporary widget." + (let ((parent (widget-get widget :parent))) + (widget-put parent :secret nil) + (widget-default-value-set parent (widget-get parent :value)) + (widget-setup))) + +;;; Initialization. + (when (dbus-ping :session secrets-service 100) ;; We must reset all variables, when there is a new instance of the diff -r f779e6dd2626 -r f3352dc3107f lisp/subr.el --- a/lisp/subr.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/subr.el Wed May 19 11:43:55 2010 +0000 @@ -1868,16 +1868,14 @@ (if inhibit-quit (setq quit-flag nil))) ;; Translate TAB key into control-I ASCII character, and so on. ;; Note: `read-char' does it using the `ascii-character' property. - ;; We could try and use read-key-sequence instead, but then C-q ESC - ;; or C-q C-x might not return immediately since ESC or C-x might be - ;; bound to some prefix in function-key-map or key-translation-map. + ;; We should try and use read-key instead. + (let ((translation (lookup-key local-function-key-map (vector char)))) + (if (arrayp translation) + (setq translated (aref translation 0)))) (setq translated (if (integerp char) (char-resolve-modifiers char) char)) - (let ((translation (lookup-key local-function-key-map (vector char)))) - (if (arrayp translation) - (setq translated (aref translation 0)))) (cond ((null translated)) ((not (integerp translated)) (setq unread-command-events (list char) diff -r f779e6dd2626 -r f3352dc3107f lisp/vc-dir.el --- a/lisp/vc-dir.el Tue May 18 11:35:42 2010 +0000 +++ b/lisp/vc-dir.el Wed May 19 11:43:55 2010 +0000 @@ -1169,7 +1169,8 @@ nil t nil nil))))) (unless backend (setq backend (vc-responsible-backend dir))) - (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)) + (let (pop-up-windows) ; based on cvs-examine; bug#6204 + (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend))) (if (derived-mode-p 'vc-dir-mode) (vc-dir-refresh) ;; FIXME: find a better way to pass the backend to `vc-dir-mode'. diff -r f779e6dd2626 -r f3352dc3107f msdos/ChangeLog --- a/msdos/ChangeLog Tue May 18 11:35:42 2010 +0000 +++ b/msdos/ChangeLog Wed May 19 11:43:55 2010 +0000 @@ -1,3 +1,10 @@ +2010-05-19 Glenn Morris + + * sed2v2.inp (ORDINARY_LINK): Set here rather than in s/msdos.h. + + * sed1v2.inp (LD): Edit to $(CC). + (YMF_PASS_LDFLAGS): Edit to `flags'. + 2010-05-18 Eli Zaretskii * sed1x.inp: Add copyright notice. diff -r f779e6dd2626 -r f3352dc3107f msdos/sed1v2.inp --- a/msdos/sed1v2.inp Tue May 18 11:35:42 2010 +0000 +++ b/msdos/sed1v2.inp Wed May 19 11:43:55 2010 +0000 @@ -55,6 +55,7 @@ /^TEMACS_LDFLAGS2 *=/s/@TEMACS_LDFLAGS2@/$(LDFLAGS)/ /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@// /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/ +/^LD *=/s/@LINKER@/$(CC)/ /^LIB_STANDARD *=/s/@LIB_STANDARD@// /^LIB_MATH *=/s/@LIB_MATH@/-lm/ /^LIBTIFF *=/s/@LIBTIFF@// @@ -143,6 +144,7 @@ /^ @: /d /^ -\{0,1\}ln -/s/ln -f/cp -pf/ /^[ ]touch /s/touch/djecho $@ >/ +s/@YMF_PASS_LDFLAGS@/flags/ s/bootstrap-emacs/b-emacs/ s/bootstrap-temacs/b-temacs/ s/bootstrap-doc/b-doc/ diff -r f779e6dd2626 -r f3352dc3107f msdos/sed2v2.inp --- a/msdos/sed2v2.inp Tue May 18 11:35:42 2010 +0000 +++ b/msdos/sed2v2.inp Wed May 19 11:43:55 2010 +0000 @@ -52,6 +52,7 @@ /^#undef HAVE_MKSTEMP *$/s/^.*$/#define HAVE_MKSTEMP 1/ /^#undef HAVE_STRUCT_TM_TM_ZONE *$/s/^.*$/#define HAVE_STRUCT_TM_TM_ZONE 1/ /^#undef HAVE_SYNC *$/s/^.*$/#define HAVE_SYNC 1/ +/^#undef ORDINARY_LINK/s/^.*$/#define ORDINARY_LINK 1/ /^#undef PACKAGE_BUGREPORT/s/^.*$/#define PACKAGE_BUGREPORT ""/ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ diff -r f779e6dd2626 -r f3352dc3107f src/ChangeLog --- a/src/ChangeLog Tue May 18 11:35:42 2010 +0000 +++ b/src/ChangeLog Wed May 19 11:43:55 2010 +0000 @@ -1,3 +1,34 @@ +2010-05-19 Eli Zaretskii + + * bidi.c (bidi_cache_shrink, bidi_cache_iterator_state): Fix + reallocation of the cache. (Bug#6210) + +2010-05-19 Glenn Morris + + * s/msdos.h (ORDINARY_LINK): Move to sed2v2.inp. + + * Makefile.in (LD, YMF_PASS_LDFLAGS): Set with configure, not cpp. + (GNULIB_VAR): Remove. + (LIBES): Use LIB_GCC instead of GNULIB_VAR. + + * m/ibms390x.h (LINKER): + * m/macppc.h (LINKER) [GNU_LINUX]: + * s/aix4-2.h (ORDINARY_LINK): + * s/cygwin.h (LINKER): + * s/darwin.h (ORDINARY_LINK): + * s/gnu.h (ORDINARY_LINK): + * s/netbsd.h (LINKER): + * s/usg5-4.h (ORDINARY_LINK): + Move to configure. + + * s/aix4-2.h (LINKER): Remove; this file sets ORDINARY_LINK. + +2010-05-18 Chong Yidong + + * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to + prevent stack overflow if number of arguments is too large + (Bug#6214). + 2010-05-18 Juanma Barranquero * charset.c (load_charset_map_from_file): Don't call close after fclose. diff -r f779e6dd2626 -r f3352dc3107f src/Makefile.in --- a/src/Makefile.in Tue May 18 11:35:42 2010 +0000 +++ b/src/Makefile.in Wed May 19 11:43:55 2010 +0000 @@ -124,6 +124,8 @@ ## Where to find libgcc.a, if using gcc and necessary. LIB_GCC=@LIB_GCC@ +LD=@LINKER@ + ## May use $CRT_DIR. LIB_STANDARD=@LIB_STANDARD@ @@ -329,52 +331,6 @@ $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< -/* A macro which other sections of Makefile can redefine to munge the - flags before they are passed to LD. This is helpful if you have - redefined LD to something odd, like "gcc". - (The YMF prefix is a holdover from the old name "ymakefile".) */ -#define YMF_PASS_LDFLAGS(flags) flags - - -#ifdef ORDINARY_LINK -LD = $(CC) - -#else /* not ORDINARY_LINK */ -GNULIB_VAR = $(LIB_GCC) - -/* Fix linking if compiled with GCC. */ -#if defined (__GNUC__) && ! defined (LINKER) -/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure - places that are difficult to figure out at make time. Fortunately, - these same versions allow you to pass arbitrary flags on to the - linker, so there is no reason not to use it as a linker. - - Well, it is not quite perfect. The "-nostdlib" keeps GCC from - searching for libraries in its internal directories, so we have to - ask GCC explicitly where to find libgcc.a. */ -#define LINKER $(CC) -nostdlib -/* GCC passes any argument prefixed with -Xlinker directly to the linker. - See prefix-args.c for an explanation of why we do not do this with the - shell''s ``for'' construct. Note that sane people do not have '.' in - their paths, so we must use ./prefix-args. */ -#undef YMF_PASS_LDFLAGS -#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` -#endif /* defined (__GNUC__) && ! defined (LINKER) */ - -#ifdef LINKER -LD=LINKER -#else /* not LINKER */ -LD=ld -#endif /* not LINKER */ - -#endif /* not ORDINARY_LINK */ - - -#ifdef NS_IMPL_GNUSTEP -LD=$(CC) -rdynamic -#endif - - /* lastfile must follow all files whose initialized data areas should be dumped as pure by dump-emacs. */ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ @@ -634,13 +590,13 @@ /* Construct full set of libraries to be linked. Note that SunOS needs -lm to come before -lc; otherwise, you get duplicated symbols. If the standard libraries were compiled - with GCC, we might need gnulib again after them. */ + with GCC, we might need LIB_GCC again after them. */ LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ - $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR) + $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC) all: emacs${EXEEXT} $(OTHER_FILES) @@ -682,6 +638,8 @@ buildobj.h: Makefile echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h +#define YMF_PASS_LDFLAGS(flags) @YMF_PASS_LDFLAGS@ + temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} $(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \ diff -r f779e6dd2626 -r f3352dc3107f src/bidi.c --- a/src/bidi.c Tue May 18 11:35:42 2010 +0000 +++ b/src/bidi.c Wed May 19 11:43:55 2010 +0000 @@ -543,6 +543,7 @@ #define BIDI_CACHE_CHUNK 200 static struct bidi_it *bidi_cache; static size_t bidi_cache_size = 0; +static size_t elsz = sizeof (struct bidi_it); static int bidi_cache_idx; /* next unused cache slot */ static int bidi_cache_last_idx; /* slot of last cache hit */ @@ -558,8 +559,9 @@ { if (bidi_cache_size > BIDI_CACHE_CHUNK) { - bidi_cache_size = BIDI_CACHE_CHUNK * sizeof (struct bidi_it); - bidi_cache = (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); + bidi_cache_size = BIDI_CACHE_CHUNK; + bidi_cache = + (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size * elsz); } bidi_cache_reset (); } @@ -688,9 +690,9 @@ /* Enlarge the cache as needed. */ if (idx >= bidi_cache_size) { - bidi_cache_size += BIDI_CACHE_CHUNK * sizeof (struct bidi_it); + bidi_cache_size += BIDI_CACHE_CHUNK; bidi_cache = - (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); + (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size * elsz); } /* Character positions should correspond to cache positions 1:1. If we are outside the range of cached positions, the cache is diff -r f779e6dd2626 -r f3352dc3107f src/character.c --- a/src/character.c Tue May 18 11:35:42 2010 +0000 +++ b/src/character.c Wed May 19 11:43:55 2010 +0000 @@ -961,10 +961,13 @@ int n; Lisp_Object *args; { - int i; - unsigned char *buf = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH * n); - unsigned char *p = buf; - int c; + int i, c; + unsigned char *buf, *p; + Lisp_Object str; + USE_SAFE_ALLOCA; + + SAFE_ALLOCA (buf, unsigned char *, MAX_MULTIBYTE_LENGTH * n); + p = buf; for (i = 0; i < n; i++) { @@ -973,7 +976,9 @@ p += CHAR_STRING (c, p); } - return make_string_from_bytes ((char *) buf, n, p - buf); + str = make_string_from_bytes ((char *) buf, n, p - buf); + SAFE_FREE (); + return str; } DEFUN ("unibyte-string", Funibyte_string, Sunibyte_string, 0, MANY, 0, @@ -983,10 +988,13 @@ int n; Lisp_Object *args; { - int i; - unsigned char *buf = (unsigned char *) alloca (n); - unsigned char *p = buf; - unsigned c; + int i, c; + unsigned char *buf, *p; + Lisp_Object str; + USE_SAFE_ALLOCA; + + SAFE_ALLOCA (buf, unsigned char *, n); + p = buf; for (i = 0; i < n; i++) { @@ -997,7 +1005,9 @@ *p++ = c; } - return make_string_from_bytes ((char *) buf, n, p - buf); + str = make_string_from_bytes ((char *) buf, n, p - buf); + SAFE_FREE (); + return str; } DEFUN ("char-resolve-modifiers", Fchar_resolve_modifiers, diff -r f779e6dd2626 -r f3352dc3107f src/config.in --- a/src/config.in Tue May 18 11:35:42 2010 +0000 +++ b/src/config.in Wed May 19 11:43:55 2010 +0000 @@ -841,6 +841,9 @@ /* Define to 1 if you are using NS windowing under GNUstep. */ #undef NS_IMPL_GNUSTEP +/* Define if the C compiler is the linker. */ +#undef ORDINARY_LINK + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT diff -r f779e6dd2626 -r f3352dc3107f src/m/ibms390x.h --- a/src/m/ibms390x.h Tue May 18 11:35:42 2010 +0000 +++ b/src/m/ibms390x.h Wed May 19 11:43:55 2010 +0000 @@ -62,8 +62,6 @@ /* On the 64 bit architecture, we can use 60 bits for addresses */ #define VALBITS 60 -#define LINKER $(CC) -nostdlib - /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ #define XPNTR(a) XUINT (a) diff -r f779e6dd2626 -r f3352dc3107f src/m/macppc.h --- a/src/m/macppc.h Tue May 18 11:35:42 2010 +0000 +++ b/src/m/macppc.h Wed May 19 11:43:55 2010 +0000 @@ -32,12 +32,6 @@ #define HAVE_TEXT_START #endif -/* NAKAJI Hiroyuki says this is needed - For MkLinux/LinuxPPC. */ -#ifdef GNU_LINUX -#define LINKER $(CC) -nostdlib -#endif - #ifdef _ARCH_PPC64 #ifndef _LP64 #define _LP64 diff -r f779e6dd2626 -r f3352dc3107f src/s/aix4-2.h --- a/src/s/aix4-2.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/aix4-2.h Wed May 19 11:43:55 2010 +0000 @@ -61,11 +61,7 @@ /* The kernel symbol where the load average is found is named avenrun. */ #define LDAV_SYMBOL "avenrun" -/* Special itemss needed to make Emacs run on this system. */ - -#ifndef __GNUC__ -#define LINKER cc -#endif +/* Special items needed to make Emacs run on this system. */ /* The following definition seems to be needed in AIX version 3.1.6.8. It may not have been needed in certain earlier versions. */ @@ -110,7 +106,5 @@ #define UNEXEC unexaix.o -#define ORDINARY_LINK - /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562 (do not change this comment) */ diff -r f779e6dd2626 -r f3352dc3107f src/s/cygwin.h --- a/src/s/cygwin.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/cygwin.h Wed May 19 11:43:55 2010 +0000 @@ -1,7 +1,7 @@ /* System description header file for Cygwin. Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ /* SYSTEM_TYPE should indicate the kind of system you are using. - It sets the Lisp variable system-type. */ + It sets the Lisp variable system-type. */ #define SYSTEM_TYPE "cygwin" /* Emacs can read input using SIGIO and buffering characters itself, @@ -94,7 +94,6 @@ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) #define SYSV_SYSTEM_DIR 1 #define UNEXEC unexcw.o -#define LINKER $(CC) #define HAVE_SOCKETS diff -r f779e6dd2626 -r f3352dc3107f src/s/darwin.h --- a/src/s/darwin.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/darwin.h Wed May 19 11:43:55 2010 +0000 @@ -147,9 +147,6 @@ #undef HAVE_POSIX_MEMALIGN #endif -/* Link this program just by running cc. */ -#define ORDINARY_LINK - /* Define the following so emacs symbols will not conflict with those in the System framework. Otherwise -prebind will not work. */ diff -r f779e6dd2626 -r f3352dc3107f src/s/gnu.h --- a/src/s/gnu.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/gnu.h Wed May 19 11:43:55 2010 +0000 @@ -29,8 +29,7 @@ #define SIGNALS_VIA_CHARACTERS -/* GNU needs its own crt0, and libc defines data_start. */ -#define ORDINARY_LINK +/* libc defines data_start. */ #define DATA_START ({ extern int data_start; (char *) &data_start; }) /* Some losing code fails to include this and then assumes diff -r f779e6dd2626 -r f3352dc3107f src/s/msdos.h --- a/src/s/msdos.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/msdos.h Wed May 19 11:43:55 2010 +0000 @@ -82,8 +82,6 @@ #define _NAIVE_DOS_REGS -#define ORDINARY_LINK - /* command.com does not understand `...` so we define this. */ #define SEPCHAR ';' diff -r f779e6dd2626 -r f3352dc3107f src/s/netbsd.h --- a/src/s/netbsd.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/netbsd.h Wed May 19 11:43:55 2010 +0000 @@ -26,12 +26,6 @@ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) -/* On post 1.3 releases of NetBSD, gcc -nostdlib also clears - the library search parth, i.e. it won't search /usr/lib - for libc and friends. Using -nostartfiles instead avoids - this problem, and will also work on earlier NetBSD releases. */ -#define LINKER $(CC) -nostartfiles - #define DEFAULT_SOUND_DEVICE "/dev/audio" /* Greg A. Woods says we must include signal.h diff -r f779e6dd2626 -r f3352dc3107f src/s/usg5-4.h --- a/src/s/usg5-4.h Tue May 18 11:35:42 2010 +0000 +++ b/src/s/usg5-4.h Wed May 19 11:43:55 2010 +0000 @@ -69,8 +69,6 @@ /* On USG systems signal handlers return void. */ #define SIGTYPE void -#define ORDINARY_LINK - /* Undump with ELF. */ #undef COFF