Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103813. ------------------------------------------------------------ revno: 103813 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-04-02 20:40:35 -0400 message: Fix missing NEWS subentry (Bug#8400). diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-04-02 23:41:03 +0000 +++ etc/NEWS 2011-04-03 00:40:35 +0000 @@ -349,6 +349,7 @@ *** To return to the previous behavior, do the following: +**** Change `select-active-regions' to nil. **** Change `mouse-drag-copy-region' to t. **** Change `x-select-enable-primary' to t (on X only). **** Change `x-select-enable-clipboard' to nil. ------------------------------------------------------------ revno: 103812 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2011-04-03 01:53:55 +0200 message: src/xdisp.c: Remove some unused parameters. * xdisp.c (display_count_lines): Remove parameter `start', unused since revno:20537 (1998-01-01). All callers changed. (get_char_face_and_encoding): Remove parameter `multibyte_p', unused since revno:87605 (2008-05-14). All callers changed. (fill_stretch_glyph_string): Remove parameters `row' and `area', unused at least since Kim's GUI unification at revno:50135 (2003-03-16) and thereabouts. All callers changed. (get_per_char_metric): Remove parameter `f', unused since revno:87605 (2008-05-14). All callers changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-02 13:52:34 +0000 +++ src/ChangeLog 2011-04-02 23:53:55 +0000 @@ -1,3 +1,15 @@ +2011-04-02 Juanma Barranquero + + * xdisp.c (display_count_lines): Remove parameter `start', + unused since revno:20537 (1998-01-01). All callers changed. + (get_char_face_and_encoding): Remove parameter `multibyte_p', + unused since revno:87605 (2008-05-14). All callers changed. + (fill_stretch_glyph_string): Remove parameters `row' and `area', + unused at least since Kim's GUI unification at revno:50135 (2003-03-16) + and thereabouts. All callers changed. + (get_per_char_metric): Remove parameter `f', unused since + revno:87605 (2008-05-14). All callers changed. + 2011-04-02 Jim Meyering do not dereference NULL upon failed strdup === modified file 'src/xdisp.c' --- src/xdisp.c 2011-03-31 19:42:38 +0000 +++ src/xdisp.c 2011-04-02 23:53:55 +0000 @@ -824,8 +824,7 @@ static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *); static void display_menu_bar (struct window *); -static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, - EMACS_INT *); +static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *); static int display_string (const char *, Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT, struct it *, int, int, int, int); static void compute_line_metrics (struct it *); @@ -19481,7 +19480,7 @@ } /* Count lines from base line to window start position. */ - nlines = display_count_lines (linepos, linepos_byte, + nlines = display_count_lines (linepos_byte, startpos_byte, startpos, &junk); @@ -19510,7 +19509,7 @@ limit_byte = CHAR_TO_BYTE (limit); } - nlines = display_count_lines (startpos, startpos_byte, + nlines = display_count_lines (startpos_byte, limit_byte, - (height * 2 + 30), &position); @@ -19529,7 +19528,7 @@ } /* Now count lines from the start pos to point. */ - nlines = display_count_lines (startpos, startpos_byte, + nlines = display_count_lines (startpos_byte, PT_BYTE, PT, &junk); /* Record that we did display the line number. */ @@ -19699,14 +19698,14 @@ } -/* Count up to COUNT lines starting from START / START_BYTE. +/* Count up to COUNT lines starting from START_BYTE. But don't go beyond LIMIT_BYTE. Return the number of lines thus found (always nonnegative). Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */ static int -display_count_lines (EMACS_INT start, EMACS_INT start_byte, +display_count_lines (EMACS_INT start_byte, EMACS_INT limit_byte, int count, EMACS_INT *byte_pos_ptr) { @@ -20470,16 +20469,15 @@ } -/* Get face and two-byte form of character C in face FACE_ID on frame - F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero - means we want to display multibyte text. DISPLAY_P non-zero means +/* Get face and two-byte form of character C in face FACE_ID on frame F. + The encoding of C is returned in *CHAR2B. DISPLAY_P non-zero means make sure that X resources for the face returned are allocated. Value is a pointer to a realized face that is ready for display if DISPLAY_P is non-zero. */ static INLINE struct face * get_char_face_and_encoding (struct frame *f, int c, int face_id, - XChar2b *char2b, int multibyte_p, int display_p) + XChar2b *char2b, int display_p) { struct face *face = FACE_FROM_ID (f, face_id); @@ -20599,7 +20597,7 @@ -1, Qnil); face = get_char_face_and_encoding (s->f, c, face_id, - s->char2b + i, 1, 1); + s->char2b + i, 1); if (face) { if (! s->face) @@ -20798,15 +20796,13 @@ /* Fill glyph string S from a sequence of stretch glyphs. - ROW is the glyph row in which the glyphs are found, AREA is the - area within the row. START is the index of the first glyph to - consider, END is the index of the last + 1. + START is the index of the first glyph to consider, + END is the index of the last + 1. Value is the index of the first glyph not in S. */ static int -fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row, - enum glyph_row_area area, int start, int end) +fill_stretch_glyph_string (struct glyph_string *s, int start, int end) { struct glyph *glyph, *last; int voffset, face_id; @@ -20840,7 +20836,7 @@ } static struct font_metrics * -get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b) +get_per_char_metric (struct font *font, XChar2b *char2b) { static struct font_metrics metrics; unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b); @@ -20868,7 +20864,7 @@ struct font_metrics *pcm; face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL); - if (face->font && (pcm = get_per_char_metric (f, face->font, &char2b))) + if (face->font && (pcm = get_per_char_metric (face->font, &char2b))) { if (pcm->rbearing > pcm->width) *right = pcm->rbearing - pcm->width; @@ -21102,7 +21098,7 @@ { \ s = (struct glyph_string *) alloca (sizeof *s); \ INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \ - START = fill_stretch_glyph_string (s, row, area, START, END); \ + START = fill_stretch_glyph_string (s, START, END); \ append_glyph_string (&HEAD, &TAIL, s); \ s->x = (X); \ } \ @@ -22475,7 +22471,7 @@ if (get_char_glyph_code (it->char_to_display, font, &char2b)) { - pcm = get_per_char_metric (it->f, font, &char2b); + pcm = get_per_char_metric (font, &char2b); if (pcm->width == 0 && pcm->rbearing == 0 && pcm->lbearing == 0) pcm = NULL; @@ -22777,8 +22773,8 @@ if (! font_not_found_p) { get_char_face_and_encoding (it->f, c, it->face_id, - &char2b, it->multibyte_p, 0); - pcm = get_per_char_metric (it->f, font, &char2b); + &char2b, 0); + pcm = get_per_char_metric (font, &char2b); } /* Initialize the bounding box. */ @@ -22838,8 +22834,8 @@ else { get_char_face_and_encoding (it->f, ch, face_id, - &char2b, it->multibyte_p, 0); - pcm = get_per_char_metric (it->f, font, &char2b); + &char2b, 0); + pcm = get_per_char_metric (font, &char2b); } if (! pcm) cmp->offsets[i * 2] = cmp->offsets[i * 2 + 1] = 0; ------------------------------------------------------------ revno: 103811 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-04-02 19:41:03 -0400 message: Merge open-protocol-stream into open-network-stream. * lisp/subr.el (open-network-stream): Move to net/network-stream.el. * lisp/gnus/proto-stream.el: Move to net/network-stream.el. * lisp/net/network-stream.el: Move from gnus/proto-stream.el. Change prefix to network-stream throughout. (open-protocol-stream): Merge into open-network-stream, leaving open-protocol-stream as an alias. Handle nil BUFFER args. * lisp/gnus/nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command parameter to open-protocol-stream. * lisp/emacs-lisp/package.el (package--with-work-buffer): Recognize https URLs. * lisp/url/url-gw.el (url-open-stream): Use new open-network-stream functionality to perform encryption. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-04-01 17:19:52 +0000 +++ etc/NEWS 2011-04-02 23:41:03 +0000 @@ -773,6 +773,12 @@ * Lisp changes in Emacs 24.1 +** `open-network-stream' can now be used to open an encrypted stream. +It now accepts an optional `:type' parameter for initiating a TLS +connection, directly or via STARTTLS. To do STARTTLS, additional +parameters (`:end-of-command', `:success', `:capabilities-command') +must also be supplied. + ** Code can now use lexical scoping by default instead of dynamic scoping. The `lexical-binding' variable lets code use lexical scoping for local variables. It is typically set via file-local variables, in which case it === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-02 20:36:47 +0000 +++ lisp/ChangeLog 2011-04-02 23:41:03 +0000 @@ -1,3 +1,15 @@ +2011-04-02 Chong Yidong + + * emacs-lisp/package.el (package--with-work-buffer): Recognize + https URLs. + + * net/network-stream.el: Move from gnus/proto-stream.el. Change + prefix to network-stream throughout. + (open-protocol-stream): Merge into open-network-stream, leaving + open-protocol-stream as an alias. Handle nil BUFFER args. + + * subr.el (open-network-stream): Move to net/network-stream.el. + 2011-04-02 Glenn Morris * find-dired.el (find-exec-terminator): New option. @@ -210,14 +222,14 @@ * textmodes/css.el: * startup.el: * uniquify.el: - * minibuffer.el: - * newcomment.el: - * reveal.el: - * server.el: - * mpc.el: - * emacs-lisp/smie.el: - * doc-view.el: - * dired.el: + * minibuffer.el: + * newcomment.el: + * reveal.el: + * server.el: + * mpc.el: + * emacs-lisp/smie.el: + * doc-view.el: + * dired.el: * abbrev.el: Use lexical binding. 2011-04-01 Eli Zaretskii === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-03-19 18:27:55 +0000 +++ lisp/emacs-lisp/package.el 2011-04-02 23:41:03 +0000 @@ -652,7 +652,7 @@ This macro retrieves FILE from LOCATION into a temporary buffer, and evaluates BODY while that buffer is current. This work buffer is killed afterwards. Return the last value in BODY." - `(let* ((http (string-match "\\`http:" ,location)) + `(let* ((http (string-match "\\`https?:" ,location)) (buffer (if http (url-retrieve-synchronously (concat ,location ,file)) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-01 14:24:22 +0000 +++ lisp/gnus/ChangeLog 2011-04-02 23:41:03 +0000 @@ -1,3 +1,10 @@ +2011-04-02 Chong Yidong + + * proto-stream.el: Move to Emacs core, at net/network-stream.el. + + * nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command + parameter to open-protocol-stream. + 2011-04-01 Julien Danjou * mm-view.el (mm-display-inline-fontify): Do not fontify with === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-03-30 14:59:42 +0000 +++ lisp/gnus/nnimap.el 2011-04-02 23:41:03 +0000 @@ -31,7 +31,11 @@ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-and-compile - (require 'nnheader)) + (require 'nnheader) + ;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for + ;; `make-network-stream'. + (unless (fboundp 'open-protocol-stream) + (require 'proto-stream))) (eval-when-compile (require 'cl)) @@ -45,7 +49,6 @@ (require 'tls) (require 'parse-time) (require 'nnmail) -(require 'proto-stream) (autoload 'auth-source-forget+ "auth-source") (autoload 'auth-source-search "auth-source") @@ -365,6 +368,7 @@ :return-list t :shell-command nnimap-shell-program :capability-command "1 CAPABILITY\r\n" + :end-of-command "\r\n" :success " OK " :starttls-function (lambda (capabilities) === modified file 'lisp/gnus/nntp.el' --- lisp/gnus/nntp.el 2011-03-30 02:21:28 +0000 +++ lisp/gnus/nntp.el 2011-04-02 23:41:03 +0000 @@ -27,13 +27,16 @@ ;; For Emacs <22.2 and XEmacs. (eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) + ;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for + ;; `make-network-stream'. + (unless (fboundp 'open-protocol-stream) + (require 'proto-stream))) (require 'nnheader) (require 'nnoo) (require 'gnus-util) (require 'gnus) -(require 'proto-stream) (require 'gnus-group) ;; gnus-group-name-charset (nnoo-declare nntp) === renamed file 'lisp/gnus/proto-stream.el' => 'lisp/net/network-stream.el' --- lisp/gnus/proto-stream.el 2011-03-30 02:21:28 +0000 +++ lisp/net/network-stream.el 2011-04-02 23:41:03 +0000 @@ -1,4 +1,4 @@ -;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections +;;; network-stream.el --- open network processes, possibly with encryption ;; Copyright (C) 2010-2011 Free Software Foundation, Inc. @@ -22,20 +22,14 @@ ;;; Commentary: -;; This library is meant to provide the glue between modules that want -;; to establish a network connection to a server for protocols such as -;; IMAP, NNTP, SMTP and POP3. - -;; The main problem is that there's more than a couple of interfaces -;; towards doing this. You have normal, plain connections, which are -;; no trouble at all, but you also have TLS/SSL connections, and you -;; have STARTTLS. Negotiating this for each protocol can be rather -;; tedious, so this library provides a single entry point, and hides -;; much of the ugliness. +;; This library provides the function `open-network-stream', which provides a +;; higher-level interface for opening TCP network processes than the built-in +;; function `make-network-process'. In addition to plain connections, it +;; supports TLS/SSL and STARTTLS connections. ;; Usage example: -;; (open-protocol-stream +;; (open-network-stream ;; "*nnimap*" buffer address port ;; :type 'network ;; :capability-command "1 CAPABILITY\r\n" @@ -55,14 +49,24 @@ (proc type &optional priority-string trustfiles keyfiles)) ;;;###autoload -(defun open-protocol-stream (name buffer host service &rest parameters) - "Open a network stream to HOST, possibly with encryption. +(defun open-network-stream (name buffer host service &rest parameters) + "Open a TCP connection to HOST, optionally with encryption. Normally, return a network process object; with a non-nil :return-list parameter, return a list instead (see below). - -The first four parameters, NAME, BUFFER, HOST, and SERVICE, have -the same meanings as in `open-network-stream'. The remaining -PARAMETERS should be a sequence of keywords and values: +Input and output work as for subprocesses; `delete-process' +closes it. + +NAME is the name for the process. It is modified if necessary to + make it unique. +BUFFER is a buffer or buffer name to associate with the process. + Process output goes at end of that buffer. BUFFER may be nil, + meaning that the process is not associated with any buffer. +HOST is the name or IP address of the host to connect to. +SERVICE is the name of the service desired, or an integer specifying + a port number to connect to. + +The remaining PARAMETERS should be a sequence of keywords and +values: :type specifies the connection type, one of the following: nil or `network' @@ -92,7 +96,6 @@ or `tls' (TLS-encrypted). :end-of-command specifies a regexp matching the end of a command. - If non-nil, it defaults to \"\\n\". :success specifies a regexp matching a message indicating a successful STARTTLS negotiation. For instance, the default @@ -106,6 +109,8 @@ This function should take one parameter, the response to the capability command, and should return the command to switch on STARTTLS if the server supports STARTTLS, and nil otherwise." + (unless (featurep 'make-network-process) + (error "Emacs was compiled without networking support")) (let ((type (plist-get parameters :type)) (return-list (plist-get parameters :return-list))) (if (and (not return-list) @@ -113,21 +118,24 @@ (and (memq type '(nil network)) (not (and (plist-get parameters :success) (plist-get parameters :capability-command)))))) - ;; The simplest case is equivalent to `open-network-stream'. - (open-network-stream name buffer host service) - ;; For everything else, refer to proto-stream-open-*. - (unless (plist-get parameters :end-of-command) - (setq parameters (append '(:end-of-command "\r\n") parameters))) - (let* ((connection-function - (cond - ((eq type 'plain) 'proto-stream-open-plain) - ((memq type '(nil network starttls)) - 'proto-stream-open-starttls) - ((memq type '(tls ssl)) 'proto-stream-open-tls) - ((eq type 'shell) 'proto-stream-open-shell) - (t (error "Invalid connection type %s" type)))) - (result (funcall connection-function - name buffer host service parameters))) + ;; The simplest case: wrapper around `make-network-process'. + (make-network-process :name name :buffer buffer + :host host :service service) + (let ((work-buffer (or buffer + (generate-new-buffer " *stream buffer*"))) + (fun (cond ((eq type 'plain) 'network-stream-open-plain) + ((memq type '(nil network starttls)) + 'network-stream-open-starttls) + ((memq type '(tls ssl)) 'network-stream-open-tls) + ((eq type 'shell) 'network-stream-open-shell) + (t (error "Invalid connection type %s" type)))) + result) + (unwind-protect + (setq result (funcall fun name work-buffer host service parameters)) + (unless buffer + (and (processp (car result)) + (set-process-buffer (car result) nil)) + (kill-buffer work-buffer))) (if return-list (list (car result) :greeting (nth 1 result) @@ -135,16 +143,20 @@ :type (nth 3 result)) (car result)))))) -(defun proto-stream-open-plain (name buffer host service parameters) +;;;###autoload +(defalias 'open-protocol-stream 'open-network-stream) + +(defun network-stream-open-plain (name buffer host service parameters) (let ((start (with-current-buffer buffer (point))) - (stream (open-network-stream name buffer host service))) + (stream (make-network-process :name name :buffer buffer + :host host :service service))) (list stream - (proto-stream-get-response stream start + (network-stream-get-response stream start (plist-get parameters :end-of-command)) nil 'plain))) -(defun proto-stream-open-starttls (name buffer host service parameters) +(defun network-stream-open-starttls (name buffer host service parameters) (let* ((start (with-current-buffer buffer (point))) (require-tls (eq (plist-get parameters :type) 'starttls)) (starttls-function (plist-get parameters :starttls-function)) @@ -152,11 +164,10 @@ (capability-command (plist-get parameters :capability-command)) (eoc (plist-get parameters :end-of-command)) ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE) - (stream (open-network-stream name buffer host service)) - (greeting (proto-stream-get-response stream start eoc)) - (capabilities (when capability-command - (proto-stream-command stream - capability-command eoc))) + (stream (make-network-process :name name :buffer buffer + :host host :service service)) + (greeting (network-stream-get-response stream start eoc)) + (capabilities (network-stream-command stream capability-command eoc)) (resulting-type 'plain) starttls-command) @@ -179,9 +190,9 @@ ;; care about the identity of the peer. (cons "--insecure" starttls-extra-arguments)))) (setq stream (starttls-open-stream name buffer host service))) - (proto-stream-get-response stream start eoc)) + (network-stream-get-response stream start eoc)) (when (string-match success-string - (proto-stream-command stream starttls-command eoc)) + (network-stream-command stream starttls-command eoc)) ;; The server said it was OK to begin STARTTLS negotiations. (if (fboundp 'open-gnutls-stream) (gnutls-negotiate stream nil) @@ -192,11 +203,13 @@ ;; We didn't successfully negotiate STARTTLS; if TLS ;; isn't demanded, reopen an unencrypted connection. (unless require-tls - (setq stream (open-network-stream name buffer host service)) - (proto-stream-get-response stream start eoc))) + (setq stream + (make-network-process :name name :buffer buffer + :host host :service service)) + (network-stream-get-response stream start eoc))) ;; Re-get the capabilities, which may have now changed. (setq capabilities - (proto-stream-command stream capability-command eoc)))) + (network-stream-command stream capability-command eoc)))) ;; If TLS is mandatory, close the connection if it's unencrypted. (and require-tls @@ -205,70 +218,69 @@ ;; Return value: (list stream greeting capabilities resulting-type))) -(defun proto-stream-command (stream command eoc) - (let ((start (with-current-buffer (process-buffer stream) (point-max)))) - (process-send-string stream command) - (proto-stream-get-response stream start eoc))) - -(defun proto-stream-get-response (stream start end-of-command) - (with-current-buffer (process-buffer stream) - (save-excursion - (goto-char start) - (while (and (memq (process-status stream) - '(open run)) - (not (re-search-forward end-of-command nil t))) - (accept-process-output stream 0 50) - (goto-char start)) - (if (= start (point)) - ;; The process died; return nil. - nil - ;; Return the data we got back. - (buffer-substring start (point)))))) - -(defun proto-stream-open-tls (name buffer host service parameters) +(defun network-stream-command (stream command eoc) + (when command + (let ((start (with-current-buffer (process-buffer stream) (point-max)))) + (process-send-string stream command) + (network-stream-get-response stream start eoc)))) + +(defun network-stream-get-response (stream start end-of-command) + (when end-of-command + (with-current-buffer (process-buffer stream) + (save-excursion + (goto-char start) + (while (and (memq (process-status stream) '(open run)) + (not (re-search-forward end-of-command nil t))) + (accept-process-output stream 0 50) + (goto-char start)) + ;; Return the data we got back, or nil if the process died. + (unless (= start (point)) + (buffer-substring start (point))))))) + +(defun network-stream-open-tls (name buffer host service parameters) (with-current-buffer buffer - (let ((start (point-max)) - (stream - (funcall (if (fboundp 'open-gnutls-stream) - 'open-gnutls-stream - 'open-tls-stream) - name buffer host service)) - (eoc (plist-get parameters :end-of-command))) + (let* ((start (point-max)) + (use-builtin-gnutls (fboundp 'open-gnutls-stream)) + (stream + (funcall (if use-builtin-gnutls + 'open-gnutls-stream + 'open-tls-stream) + name buffer host service)) + (eoc (plist-get parameters :end-of-command))) (if (null stream) (list nil nil nil 'plain) ;; If we're using tls.el, we have to delete the output from ;; openssl/gnutls-cli. - (unless (fboundp 'open-gnutls-stream) - (proto-stream-get-response stream start eoc) + (when (and (null use-builtin-gnutls) eoc) + (network-stream-get-response stream start eoc) (goto-char (point-min)) (when (re-search-forward eoc nil t) (goto-char (match-beginning 0)) (delete-region (point-min) (line-beginning-position)))) - (proto-stream-capability-open start stream parameters 'tls))))) + (let* ((capability-command (plist-get parameters :capability-command))) + (list stream + (network-stream-get-response stream start eoc) + (network-stream-command stream capability-command eoc) + 'tls)))))) -(defun proto-stream-open-shell (name buffer host service parameters) +(defun network-stream-open-shell (name buffer host service parameters) (require 'format-spec) - (proto-stream-capability-open - (with-current-buffer buffer (point)) - (let ((process-connection-type nil)) - (start-process name buffer shell-file-name - shell-command-switch - (format-spec - (plist-get parameters :shell-command) - (format-spec-make - ?s host - ?p service)))) - parameters 'plain)) - -(defun proto-stream-capability-open (start stream parameters stream-type) (let* ((capability-command (plist-get parameters :capability-command)) (eoc (plist-get parameters :end-of-command)) - (greeting (proto-stream-get-response stream start eoc))) - (list stream greeting - (and capability-command - (proto-stream-command stream capability-command eoc)) - stream-type))) - -(provide 'proto-stream) - -;;; proto-stream.el ends here + (start (with-current-buffer buffer (point))) + (stream (let ((process-connection-type nil)) + (start-process name buffer shell-file-name + shell-command-switch + (format-spec + (plist-get parameters :shell-command) + (format-spec-make + ?s host + ?p service)))))) + (list stream + (network-stream-get-response stream start eoc) + (network-stream-command stream capability-command eoc) + 'plain))) + +(provide 'network-stream) + +;;; network-stream.el ends here === modified file 'lisp/subr.el' --- lisp/subr.el 2011-03-31 04:24:03 +0000 +++ lisp/subr.el 2011-04-02 23:41:03 +0000 @@ -1792,28 +1792,6 @@ (forward-line 1)) (nreverse lines))))) -;; open-network-stream is a wrapper around make-network-process. - -(when (featurep 'make-network-process) - (defun open-network-stream (name buffer host service) - "Open a TCP connection for a service to a host. -Returns a subprocess-object to represent the connection. -Input and output work as for subprocesses; `delete-process' closes it. - -NAME is the name for the process. It is modified if necessary to make - it unique. -BUFFER is the buffer (or buffer name) to associate with the - process. Process output goes at end of that buffer. BUFFER may - be nil, meaning that this process is not associated with any buffer. -HOST is the name or IP address of the host to connect to. -SERVICE is the name of the service desired, or an integer specifying - a port number to connect to. - -This is a wrapper around `make-network-process', and only offers a -subset of its functionality." - (make-network-process :name name :buffer buffer - :host host :service service))) - ;; compatibility (make-obsolete === modified file 'lisp/url/url-gw.el' --- lisp/url/url-gw.el 2011-01-26 08:36:39 +0000 +++ lisp/url/url-gw.el 2011-04-02 23:41:03 +0000 @@ -28,8 +28,6 @@ ;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? (autoload 'socks-open-network-stream "socks") -(autoload 'open-ssl-stream "ssl") -(autoload 'open-tls-stream "tls") (defgroup url-gateway nil "URL gateway variables." @@ -219,13 +217,6 @@ host)) 'native url-gateway-method)) -;;; ;; This hack is for OS/2 Emacs so that it will not do bogus CRLF -;;; ;; conversions while trying to be 'helpful' -;;; (tcp-binary-process-output-services (if (stringp service) -;;; (list service) -;;; (list service -;;; (int-to-string service)))) - ;; An attempt to deal with denied connections, and attempt ;; to reconnect (cur-retries 0) @@ -243,19 +234,15 @@ (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) (setq conn (case gw-method - (tls - (funcall (if (fboundp 'open-gnutls-stream) - 'open-gnutls-stream - 'open-tls-stream) - name buffer host service)) - (ssl - (open-ssl-stream name buffer host service)) - ((native) - ;; Use non-blocking socket if we can. - (make-network-process :name name :buffer buffer - :host host :service service - :nowait - (featurep 'make-network-process '(:nowait t)))) + ((tls ssl native) + (if (eq gw-method 'native) + (setq gw-method 'plain)) + (open-network-stream + name buffer host service + :type gw-method + ;; Use non-blocking socket if we can. + :nowait (featurep 'make-network-process + '(:nowait t)))) (socks (socks-open-network-stream name buffer host service)) (telnet @@ -264,13 +251,7 @@ (url-open-rlogin name buffer host service)) (otherwise (error "Bad setting of url-gateway-method: %s" - url-gateway-method))))) - ;; Ignoring errors here seems wrong. E.g. it'll throw away the - ;; error signaled two lines above. It was also found inconvenient - ;; during debugging. - ;; (error - ;; (setq conn nil)) - ) + url-gateway-method)))))) conn))) (provide 'url-gw) ------------------------------------------------------------ revno: 103810 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-04-02 13:36:47 -0700 message: find-dired improvements for bug#4403. * lisp/find-dired.el (find-exec-terminator): New option. (find-ls-option): Test for -ls support. (find-ls-subdir-switches): Test for -b in find-ls-option. (find-dired, find-grep-dired): Doc fixes. (find-dired): Use find-exec-terminator. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-02 19:01:52 +0000 +++ lisp/ChangeLog 2011-04-02 20:36:47 +0000 @@ -1,5 +1,11 @@ 2011-04-02 Glenn Morris + * find-dired.el (find-exec-terminator): New option. + (find-ls-option): Test for -ls support. + (find-ls-subdir-switches): Test for -b in find-ls-option. + (find-dired, find-grep-dired): Doc fixes. + (find-dired): Use find-exec-terminator. + * find-dired.el (find-ls-option, find-ls-subdir-switches) (find-grep-options): Do not autoload these defcustoms, remove purecopy. (find-name-arg): Remove purecopy. === modified file 'lisp/find-dired.el' --- lisp/find-dired.el 2011-04-02 19:01:52 +0000 +++ lisp/find-dired.el 2011-04-02 20:36:47 +0000 @@ -33,27 +33,56 @@ :group 'dired :prefix "find-") +;; FIXME this option does not really belong in this file, it's more general. +;; Eg cf some tests in grep.el. +(defcustom find-exec-terminator + (if (eq 0 + (ignore-errors + (process-file find-program nil nil nil + null-device "-exec" "echo" "{}" "+"))) + "+" + (shell-quote-argument ";")) + "String that terminates \"find -exec COMMAND {} \". +The value should include any needed quoting for the shell. +Common values are \"+\" and \"\\\\;\", with the former more efficient +than the latter." + :version "24.1" + :group 'find-dired + :type 'string) + ;; find's -ls corresponds to these switches. ;; Note -b, at least GNU find quotes spaces etc. in filenames (defcustom find-ls-option - (if (eq system-type 'berkeley-unix) '("-ls" . "-gilsb") - '("-exec ls -ld {} \\;" . "-ld")) + (if (eq 0 + (ignore-errors + (process-file find-program nil nil nil null-device "-ls"))) + (cons "-ls" + (if (eq system-type 'berkeley-unix) + "-gilsb" + "-dilsb")) + (cons + (format "-exec ls -ld {} %s" find-exec-terminator) + "-ld")) "Description of the option to `find' to produce an `ls -l'-type listing. This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION gives the option (or options) to `find' that produce the desired output. LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output." + :version "24.1" ; add tests for -ls and -exec + support :type '(cons (string :tag "Find Option") (string :tag "Ls Switches")) :group 'find-dired) -(defcustom find-ls-subdir-switches "-al" +(defcustom find-ls-subdir-switches + (if (string-match "-[a-z]*b" (cdr find-ls-option)) + "-alb" + "-al") "`ls' switches for inserting subdirectories in `*Find*' buffers. This should contain the \"-l\" switch. Use the \"-F\" or \"-b\" switches if and only if you also use them for `find-ls-option'." + :version "24.1" ; add -b test :type 'string - :group 'find-dired - :version "22.1") + :group 'find-dired) (defcustom find-grep-options (if (or (eq system-type 'berkeley-unix) @@ -89,12 +118,12 @@ ;;;###autoload (defun find-dired (dir args) "Run `find' and go into Dired mode on a buffer of the output. -The command run (after changing into DIR) is +The command run (after changing into DIR) is essentially find . \\( ARGS \\) -ls -except that the variable `find-ls-option' specifies what to use -as the final argument." +except that the car of the variable `find-ls-option' specifies what to +use in place of \"-ls\" as the final argument." (interactive (list (read-directory-name "Run find in directory: " nil "" t) (read-string "Run find (with args): " find-args '(find-args-history . 1)))) @@ -135,11 +164,12 @@ " " args " " (shell-quote-argument ")") " ")) - (if (equal (car find-ls-option) "-exec ls -ld {} \\;") - (concat "-exec ls -ld " + (if (string-match "\\`\\(.*\\) {} \\(\\\\;\\|+\\)\\'" + (car find-ls-option)) + (format "%s %s %s" + (match-string 1 (car find-ls-option)) (shell-quote-argument "{}") - " " - (shell-quote-argument ";")) + find-exec-terminator) (car find-ls-option)))) ;; Start the find process. (shell-command (concat args "&") (current-buffer)) @@ -213,9 +243,14 @@ "Find files in DIR containing a regexp REGEXP and start Dired on output. The command run (after changing into DIR) is - find . -exec grep -s -e REGEXP {} \\\; -ls + find . \\( -type f -exec `grep-program' `find-grep-options' \\ + -e REGEXP {} \\; \\) -ls -Thus ARG can also contain additional grep options." +where the car of the variable `find-ls-option' specifies what to +use in place of \"-ls\" as the final argument." + ;; Doc used to say "Thus ARG can also contain additional grep options." + ;; i) Presumably ARG == REGEXP? + ;; ii) No it can't have options, since it gets shell-quoted. (interactive "DFind-grep (directory): \nsFind-grep (grep regexp): ") ;; find -exec doesn't allow shell i/o redirections in the command, ;; or we could use `grep -l >/dev/null' @@ -228,6 +263,7 @@ " " (shell-quote-argument "{}") " " + ;; Doesn't work with "+". (shell-quote-argument ";")))) (defun find-dired-filter (proc string) ------------------------------------------------------------ revno: 103809 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-04-02 12:01:52 -0700 message: Remove some unnecessary purecopy's from find-dired. * lisp/find-dired.el (find-ls-option, find-ls-subdir-switches) (find-grep-options, find-name-arg): Remove purecopy. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-02 18:56:29 +0000 +++ lisp/ChangeLog 2011-04-02 19:01:52 +0000 @@ -1,7 +1,8 @@ 2011-04-02 Glenn Morris * find-dired.el (find-ls-option, find-ls-subdir-switches) - (find-grep-options): Do not autoload these defcustoms. + (find-grep-options): Do not autoload these defcustoms, remove purecopy. + (find-name-arg): Remove purecopy. * progmodes/grep.el (grep-find-use-xargs): Doc fix. (grep-compute-defaults): Check for `-exec COMMAND +' support. === modified file 'lisp/find-dired.el' --- lisp/find-dired.el 2011-04-02 18:56:29 +0000 +++ lisp/find-dired.el 2011-04-02 19:01:52 +0000 @@ -36,8 +36,8 @@ ;; find's -ls corresponds to these switches. ;; Note -b, at least GNU find quotes spaces etc. in filenames (defcustom find-ls-option - (if (eq system-type 'berkeley-unix) (purecopy '("-ls" . "-gilsb")) - (purecopy '("-exec ls -ld {} \\;" . "-ld"))) + (if (eq system-type 'berkeley-unix) '("-ls" . "-gilsb") + '("-exec ls -ld {} \\;" . "-ld")) "Description of the option to `find' to produce an `ls -l'-type listing. This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION gives the option (or options) to `find' that produce the desired output. @@ -46,7 +46,7 @@ (string :tag "Ls Switches")) :group 'find-dired) -(defcustom find-ls-subdir-switches (purecopy "-al") +(defcustom find-ls-subdir-switches "-al" "`ls' switches for inserting subdirectories in `*Find*' buffers. This should contain the \"-l\" switch. Use the \"-F\" or \"-b\" switches if and only if you also use @@ -56,10 +56,10 @@ :version "22.1") (defcustom find-grep-options - (purecopy (if (or (eq system-type 'berkeley-unix) + (if (or (eq system-type 'berkeley-unix) (string-match "solaris2" system-configuration) (string-match "irix" system-configuration)) - "-s" "-q")) + "-s" "-q") "Option to grep to be as silent as possible. On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it. On other systems, the closest you can come is to use `-l'." @@ -68,9 +68,9 @@ ;; This used to be autoloaded (see bug#4387). (defcustom find-name-arg - (purecopy (if read-file-name-completion-ignore-case + (if read-file-name-completion-ignore-case "-iname" - "-name")) + "-name") "Argument used to specify file name pattern. If `read-file-name-completion-ignore-case' is non-nil, -iname is used so that find also ignores case. Otherwise, -name is used." ------------------------------------------------------------ revno: 103808 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-04-02 11:56:29 -0700 message: Remove some autoload cookies on defcustoms in find-dired. * lisp/find-dired.el (find-ls-option, find-ls-subdir-switches) (find-grep-options): Do not autoload these defcustoms. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-02 18:52:08 +0000 +++ lisp/ChangeLog 2011-04-02 18:56:29 +0000 @@ -1,5 +1,8 @@ 2011-04-02 Glenn Morris + * find-dired.el (find-ls-option, find-ls-subdir-switches) + (find-grep-options): Do not autoload these defcustoms. + * progmodes/grep.el (grep-find-use-xargs): Doc fix. (grep-compute-defaults): Check for `-exec COMMAND +' support. Set grep-find-use-xargs, grep-find-command, and grep-find-template === modified file 'lisp/find-dired.el' --- lisp/find-dired.el 2011-01-25 04:08:28 +0000 +++ lisp/find-dired.el 2011-04-02 18:56:29 +0000 @@ -35,7 +35,6 @@ ;; find's -ls corresponds to these switches. ;; Note -b, at least GNU find quotes spaces etc. in filenames -;;;###autoload (defcustom find-ls-option (if (eq system-type 'berkeley-unix) (purecopy '("-ls" . "-gilsb")) (purecopy '("-exec ls -ld {} \\;" . "-ld"))) @@ -47,7 +46,6 @@ (string :tag "Ls Switches")) :group 'find-dired) -;;;###autoload (defcustom find-ls-subdir-switches (purecopy "-al") "`ls' switches for inserting subdirectories in `*Find*' buffers. This should contain the \"-l\" switch. @@ -57,7 +55,6 @@ :group 'find-dired :version "22.1") -;;;###autoload (defcustom find-grep-options (purecopy (if (or (eq system-type 'berkeley-unix) (string-match "solaris2" system-configuration) ------------------------------------------------------------ revno: 103807 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-04-02 11:53:37 -0700 message: ChangeLog fix. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2011-04-01 23:24:21 +0000 +++ lisp/url/ChangeLog 2011-04-02 18:53:37 +0000 @@ -19,7 +19,7 @@ move point if the callback function has moved changed/killed the process buffer. -2010-12-16 Miles Bader > +2010-12-16 Miles Bader * url-cookie.el: Require 'cl when compiling -- it's necessary for defstruct. ------------------------------------------------------------ revno: 103806 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-04-02 11:52:08 -0700 message: Use find -exec with '+' for grep-find if supported. * lisp/progmodes/grep.el (grep-find-use-xargs): Doc fix. (grep-compute-defaults): Check for `-exec COMMAND +' support. Set grep-find-use-xargs, grep-find-command, and grep-find-template accordingly. Don't add the null-device if not needed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-02 18:12:21 +0000 +++ lisp/ChangeLog 2011-04-02 18:52:08 +0000 @@ -1,5 +1,10 @@ 2011-04-02 Glenn Morris + * progmodes/grep.el (grep-find-use-xargs): Doc fix. + (grep-compute-defaults): Check for `-exec COMMAND +' support. + Set grep-find-use-xargs, grep-find-command, and grep-find-template + accordingly. Don't add the null-device if not needed. + * files.el (save-some-buffers): Doc fix. 2011-04-02 Eli Zaretskii === modified file 'lisp/progmodes/grep.el' --- lisp/progmodes/grep.el 2011-03-03 06:39:11 +0000 +++ lisp/progmodes/grep.el 2011-04-02 18:52:08 +0000 @@ -440,10 +440,11 @@ ;;;###autoload (defvar grep-find-use-xargs nil - "Non-nil means that `grep-find' uses the `xargs' utility by default. -If `exec', use `find -exec'. + "How to invoke find and grep. +If `exec', use `find -exec {} ;'. +If `exec-plus' use `find -exec {} +'. If `gnu', use `find -print0' and `xargs -0'. -Any other non-nil value means to use `find -print' and `xargs'. +Any other value means to use `find -print' and `xargs'. This variable's value takes effect when `grep-compute-defaults' is called.") @@ -561,6 +562,10 @@ (unless grep-find-use-xargs (setq grep-find-use-xargs (cond + ((grep-probe find-program + `(nil nil nil ,null-device "-exec" "echo" + "{}" "+")) + 'exec-plus) ((and (grep-probe find-program `(nil nil nil ,null-device "-print0")) (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo"))) @@ -575,13 +580,17 @@ ;; forward slashes as directory separators. (format "%s . -type f -print0 | \"%s\" -0 -e %s" find-program xargs-program grep-command)) - ((eq grep-find-use-xargs 'exec) + ((memq grep-find-use-xargs '(exec exec-plus)) (let ((cmd0 (format "%s . -type f -exec %s" - find-program grep-command))) + find-program grep-command)) + (null (if grep-use-null-device + (format "%s " null-device) + ""))) (cons - (format "%s {} %s %s" - cmd0 null-device - (shell-quote-argument ";")) + (if (eq grep-find-use-xargs 'exec-plus) + (format "%s %s{} +" cmd0 null) + (format "%s {} %s%s" cmd0 null + (shell-quote-argument ";"))) (1+ (length cmd0))))) (t (format "%s . -type f -print | \"%s\" %s" @@ -589,14 +598,20 @@ (unless grep-find-template (setq grep-find-template (let ((gcmd (format "%s %s " - grep-program grep-options))) + grep-program grep-options)) + (null (if grep-use-null-device + (format "%s " null-device) + ""))) (cond ((eq grep-find-use-xargs 'gnu) (format "%s . -type f -print0 | \"%s\" -0 -e %s" find-program xargs-program gcmd)) ((eq grep-find-use-xargs 'exec) - (format "%s . -type f -exec %s {} %s %s" - find-program gcmd null-device + (format "%s . -type f -exec %s {} %s%s" + find-program gcmd null (shell-quote-argument ";"))) + ((eq grep-find-use-xargs 'exec-plus) + (format "%s . -type f -exec %s %s{} +" + find-program gcmd null)) (t (format "%s . -type f -print | \"%s\" %s" find-program xargs-program gcmd)))))))) ------------------------------------------------------------ revno: 103805 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-04-02 11:12:21 -0700 message: * lisp/files.el (save-some-buffers): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-02 08:55:47 +0000 +++ lisp/ChangeLog 2011-04-02 18:12:21 +0000 @@ -1,3 +1,7 @@ +2011-04-02 Glenn Morris + + * files.el (save-some-buffers): Doc fix. + 2011-04-02 Eli Zaretskii * makefile.w32-in (EMACS): Default to ../src/$(BLD)/emacs.exe. === modified file 'lisp/files.el' --- lisp/files.el 2011-03-21 16:42:16 +0000 +++ lisp/files.el 2011-04-02 18:12:21 +0000 @@ -4607,6 +4607,9 @@ buffer in question with `view-buffer' before deciding or `d' to view the differences using `diff-buffer-with-file'. +This command first saves any buffers where `buffer-save-without-query' is +non-nil, without asking. + Optional argument (the prefix) non-nil means save all with no questions. Optional second argument PRED determines which buffers are considered: If PRED is nil, all the file-visiting buffers are considered. ------------------------------------------------------------ revno: 103804 committer: Jim Meyering branch nick: trunk timestamp: Sat 2011-04-02 15:52:34 +0200 message: do not dereference NULL upon failed strdup * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup. (ns_get_family): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-02 13:11:16 +0000 +++ src/ChangeLog 2011-04-02 13:52:34 +0000 @@ -1,3 +1,9 @@ +2011-04-02 Jim Meyering + + do not dereference NULL upon failed strdup + * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup. + (ns_get_family): Likewise. + 2011-04-02 Juanma Barranquero * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment. === modified file 'src/nsfont.m' --- src/nsfont.m 2011-01-29 10:36:16 +0000 +++ src/nsfont.m 2011-04-02 13:52:34 +0000 @@ -100,7 +100,7 @@ return nil; else { - char *tmp = strdup (SDATA (SYMBOL_NAME (tem))); + char *tmp = xstrdup (SDATA (SYMBOL_NAME (tem))); NSString *family; ns_unescape_name (tmp); family = [NSString stringWithUTF8String: tmp]; @@ -176,7 +176,7 @@ if (family == nil) family = [[NSFont userFixedPitchFontOfSize: 0] familyName]; - escapedFamily = strdup ([family UTF8String]); + escapedFamily = xstrdup ([family UTF8String]); ns_escape_name (escapedFamily); ASET (font_entity, FONT_TYPE_INDEX, Qns); @@ -1526,4 +1526,3 @@ DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script, doc: /* Internal use: maps font registry to unicode script. */); } - ------------------------------------------------------------ revno: 103803 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2011-04-02 15:11:16 +0200 message: src/eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-02 07:11:00 +0000 +++ src/ChangeLog 2011-04-02 13:11:16 +0000 @@ -1,3 +1,7 @@ +2011-04-02 Juanma Barranquero + + * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment. + 2011-04-02 Jan Djärv * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or === modified file 'src/eval.c' --- src/eval.c 2011-04-01 17:19:52 +0000 +++ src/eval.c 2011-04-02 13:11:16 +0000 @@ -1297,7 +1297,7 @@ byte_stack_list = catch->byte_stack; gcprolist = catch->gcpro; #ifdef DEBUG_GCPRO - gcpro_level = gcprolist ? gcprolist->level + 1 : gcpro_level = 0; + gcpro_level = gcprolist ? gcprolist->level + 1 : 0; #endif backtrace_list = catch->backlist; lisp_eval_depth = catch->lisp_eval_depth; ------------------------------------------------------------ revno: 103802 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-04-02 11:55:47 +0300 message: A better default for $(EMACS) in lisp/makefile.w32-in. lisp/makefile.w32-in (EMACS): Default to ../src/$(BLD)/emacs.exe. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-01 22:33:37 +0000 +++ lisp/ChangeLog 2011-04-02 08:55:47 +0000 @@ -1,3 +1,7 @@ +2011-04-02 Eli Zaretskii + + * makefile.w32-in (EMACS): Default to ../src/$(BLD)/emacs.exe. + 2011-04-01 Juanma Barranquero * progmodes/idlwave.el (idlwave-one-key-select, idlwave-list-abbrevs): === modified file 'lisp/makefile.w32-in' --- lisp/makefile.w32-in 2011-03-30 14:01:28 +0000 +++ lisp/makefile.w32-in 2011-04-02 08:55:47 +0000 @@ -27,9 +27,9 @@ srcdir = $(CURDIR)/.. # You can specify a different executable on the make command line, -# e.g. "make EMACS=../src/emacs ...". +# e.g. "make EMACS=../bin/emacs ...". -EMACS = $(THISDIR)/../bin/emacs.exe +EMACS = ../src/$(BLD)/emacs.exe # Command line flags for Emacs. ------------------------------------------------------------ revno: 103801 committer: Jan D. branch nick: trunk timestamp: Sat 2011-04-02 09:11:00 +0200 message: * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or later. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-01 17:19:52 +0000 +++ src/ChangeLog 2011-04-02 07:11:00 +0000 @@ -1,3 +1,8 @@ +2011-04-02 Jan Djärv + + * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or + later (Bug#8403). + 2011-04-01 Stefan Monnier Add lexical binding. === modified file 'src/nsterm.m' --- src/nsterm.m 2011-03-27 10:55:07 +0000 +++ src/nsterm.m 2011-04-02 07:11:00 +0000 @@ -583,6 +583,8 @@ static void ns_update_auto_hide_menu_bar (void) { +#ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 BLOCK_INPUT; NSTRACE (ns_update_auto_hide_menu_bar); @@ -615,6 +617,8 @@ } UNBLOCK_INPUT; +#endif +#endif }