Now on revision 112898. ------------------------------------------------------------ revno: 112898 committer: Aidan Gauland branch nick: trunk timestamp: Sun 2013-06-09 18:44:47 +1200 message: Fix Eshell bug * eshell/em-term.el (eshell-visual-command-p): Fix bug that causedoutput redirection to be ignored with visual commands. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-09 06:39:40 +0000 +++ lisp/ChangeLog 2013-06-09 06:44:47 +0000 @@ -1,5 +1,10 @@ 2013-06-09 Aidan Gauland + * eshell/em-term.el (eshell-visual-command-p): Fix bug that caused + output redirection to be ignored with visual commands. + +2013-06-09 Aidan Gauland + * eshell/em-term.el (eshell-visual-command-p): New function. (eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p. * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda. === modified file 'lisp/eshell/em-term.el' --- lisp/eshell/em-term.el 2013-06-09 06:39:40 +0000 +++ lisp/eshell/em-term.el 2013-06-09 06:44:47 +0000 @@ -141,12 +141,13 @@ If either COMMAND or a subcommand in ARGS (e.g. git log) is a visual command, returns non-nil." (let ((command (file-name-nondirectory command))) - (or (member command eshell-visual-commands) - (member (car args) - (cdr (assoc command eshell-visual-subcommands))) - (cl-intersection args - (cdr (assoc command eshell-visual-options)) - :test 'string=)))) + (and (eshell-interactive-output-p) + (or (member command eshell-visual-commands) + (member (car args) + (cdr (assoc command eshell-visual-subcommands))) + (cl-intersection args + (cdr (assoc command eshell-visual-options)) + :test 'string=))))) (defun eshell-exec-visual (&rest args) "Run the specified PROGRAM in a terminal emulation buffer. ------------------------------------------------------------ revno: 112897 committer: Aidan Gauland branch nick: trunk timestamp: Sun 2013-06-09 18:39:40 +1200 message: Tidy module initialisation functions * eshell/em-term.el (eshell-visual-command-p): New function. (eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p. * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda. * eshell/em-script.el (eshell-script-initialize): Add missing #' to lambda. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-08 13:35:55 +0000 +++ lisp/ChangeLog 2013-06-09 06:39:40 +0000 @@ -1,3 +1,10 @@ +2013-06-09 Aidan Gauland + + * eshell/em-term.el (eshell-visual-command-p): New function. + (eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p. + * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda. + * eshell/em-script.el (eshell-script-initialize): Add missing #' to lambda. + 2013-06-08 Leo Liu * progmodes/octave.el (octave-add-log-current-defun): New function. === modified file 'lisp/eshell/em-dirs.el' --- lisp/eshell/em-dirs.el 2013-06-02 09:19:09 +0000 +++ lisp/eshell/em-dirs.el 2013-06-09 06:39:40 +0000 @@ -207,8 +207,8 @@ (when eshell-cd-on-directory (make-local-variable 'eshell-interpreter-alist) (setq eshell-interpreter-alist - (cons (cons (lambda (file args) - (eshell-lone-directory-p file)) + (cons (cons #'(lambda (file args) + (eshell-lone-directory-p file)) 'eshell-dirs-substitute-cd) eshell-interpreter-alist))) === modified file 'lisp/eshell/em-script.el' --- lisp/eshell/em-script.el 2013-06-02 09:19:09 +0000 +++ lisp/eshell/em-script.el 2013-06-09 06:39:40 +0000 @@ -61,9 +61,10 @@ "Initialize the script parsing code." (make-local-variable 'eshell-interpreter-alist) (setq eshell-interpreter-alist - (cons '((lambda (file args) - (string= (file-name-nondirectory file) - "eshell")) . eshell/source) + (cons (cons #'(lambda (file args) + (string= (file-name-nondirectory file) + "eshell")) + 'eshell/source) eshell-interpreter-alist)) (make-local-variable 'eshell-complex-commands) (setq eshell-complex-commands === modified file 'lisp/eshell/em-term.el' --- lisp/eshell/em-term.el 2013-06-03 18:12:51 +0000 +++ lisp/eshell/em-term.el 2013-06-09 06:39:40 +0000 @@ -132,18 +132,22 @@ "Initialize the `term' interface code." (make-local-variable 'eshell-interpreter-alist) (setq eshell-interpreter-alist - (cons (cons (function - (lambda (command args) - (let ((command (file-name-nondirectory command))) - (or (member command eshell-visual-commands) - (member (car args) - (cdr (assoc command eshell-visual-subcommands))) - (cl-intersection args - (cdr (assoc command eshell-visual-options)) - :test 'string=))))) + (cons (cons #'eshell-visual-command-p 'eshell-exec-visual) eshell-interpreter-alist))) +(defun eshell-visual-command-p (command args) + "Returns non-nil when given a visual command. +If either COMMAND or a subcommand in ARGS (e.g. git log) is a +visual command, returns non-nil." + (let ((command (file-name-nondirectory command))) + (or (member command eshell-visual-commands) + (member (car args) + (cdr (assoc command eshell-visual-subcommands))) + (cl-intersection args + (cdr (assoc command eshell-visual-options)) + :test 'string=)))) + (defun eshell-exec-visual (&rest args) "Run the specified PROGRAM in a terminal emulation buffer. ARGS are passed to the program. At the moment, no piping of input is ------------------------------------------------------------ revno: 112896 fixes bug: http://debbugs.gnu.org/14575 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-06-08 21:28:36 +0300 message: Fix bug #14575 with window-specific overlays with display props. src/bidi.c (bidi_fetch_char): Accept additional argument, the window being displayed, and pass it to compute_display_string_pos. (bidi_level_of_next_char, bidi_resolve_explicit_1) (bidi_paragraph_init): All callers changed. src/xdisp.c (init_from_display_pos, init_iterator) (handle_single_display_spec, next_overlay_string) (get_overlay_strings_1, reseat_1, reseat_to_string) (push_prefix_prop, Fcurrent_bidi_paragraph_direction): Set bidi_it.w member from it->w. (compute_display_string_pos): Accept additional argument, the window being displayed, and pass it to Fget_char_property. src/dispextern.h (struct bidi_it): New member w, the window being displayed. (compute_display_string_pos): Adjust prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-08 18:13:24 +0000 +++ src/ChangeLog 2013-06-08 18:28:36 +0000 @@ -1,3 +1,23 @@ +2013-06-08 Eli Zaretskii + + * bidi.c (bidi_fetch_char): Accept additional argument, the window + being displayed, and pass it to compute_display_string_pos. + (bidi_level_of_next_char, bidi_resolve_explicit_1) + (bidi_paragraph_init): All callers changed. + + * xdisp.c (init_from_display_pos, init_iterator) + (handle_single_display_spec, next_overlay_string) + (get_overlay_strings_1, reseat_1, reseat_to_string) + (push_prefix_prop, Fcurrent_bidi_paragraph_direction): Set + bidi_it.w member from it->w. + (compute_display_string_pos): Accept additional argument, the + window being displayed, and pass it to Fget_char_property. + (Bug#14575) + + * dispextern.h (struct bidi_it): New member w, the window being + displayed. + (compute_display_string_pos): Adjust prototype. + 2013-06-08 Jan Djärv * xgselect.c: Remove unneeded include xterm.h === modified file 'src/bidi.c' --- src/bidi.c 2013-03-08 09:34:35 +0000 +++ src/bidi.c 2013-06-08 18:28:36 +0000 @@ -927,6 +927,7 @@ static int bidi_fetch_char (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t *disp_pos, int *disp_prop, struct bidi_string_data *string, + struct window *w, bool frame_window_p, ptrdiff_t *ch_len, ptrdiff_t *nchars) { int ch; @@ -940,7 +941,7 @@ if (charpos < endpos && charpos > *disp_pos) { SET_TEXT_POS (pos, charpos, bytepos); - *disp_pos = compute_display_string_pos (&pos, string, frame_window_p, + *disp_pos = compute_display_string_pos (&pos, string, w, frame_window_p, disp_prop); } @@ -1045,7 +1046,7 @@ && *disp_prop) { SET_TEXT_POS (pos, charpos + *nchars, bytepos + *ch_len); - *disp_pos = compute_display_string_pos (&pos, string, frame_window_p, + *disp_pos = compute_display_string_pos (&pos, string, w, frame_window_p, disp_prop); } @@ -1224,7 +1225,7 @@ if (!string_p) pos = BYTE_TO_CHAR (bytepos); ch = bidi_fetch_char (pos, bytepos, &disp_pos, &disp_prop, - &bidi_it->string, + &bidi_it->string, bidi_it->w, bidi_it->frame_window_p, &ch_len, &nchars); type = bidi_get_type (ch, NEUTRAL_DIR); @@ -1252,7 +1253,7 @@ break; /* Fetch next character and advance to get past it. */ ch = bidi_fetch_char (pos, bytepos, &disp_pos, - &disp_prop, &bidi_it->string, + &disp_prop, &bidi_it->string, bidi_it->w, bidi_it->frame_window_p, &ch_len, &nchars); pos += nchars; bytepos += ch_len; @@ -1402,7 +1403,8 @@ a single character u+FFFC. */ curchar = bidi_fetch_char (bidi_it->charpos, bidi_it->bytepos, &bidi_it->disp_pos, &bidi_it->disp_prop, - &bidi_it->string, bidi_it->frame_window_p, + &bidi_it->string, bidi_it->w, + bidi_it->frame_window_p, &bidi_it->ch_len, &bidi_it->nchars); } bidi_it->ch = curchar; @@ -2194,7 +2196,7 @@ emacs_abort (); do { ch = bidi_fetch_char (cpos += nc, bpos += clen, &disp_pos, &dpp, &bs, - fwp, &clen, &nc); + bidi_it->w, fwp, &clen, &nc); if (ch == '\n' || ch == BIDI_EOB) chtype = NEUTRAL_B; else === modified file 'src/dispextern.h' --- src/dispextern.h 2013-05-04 10:19:13 +0000 +++ src/dispextern.h 2013-06-08 18:28:36 +0000 @@ -1881,6 +1881,7 @@ stuff that is not part of the bidi iterator's state! */ struct bidi_stack level_stack[BIDI_MAXLEVEL]; /* stack of embedding levels */ struct bidi_string_data string; /* string to reorder */ + struct window *w; /* the window being displayed */ bidi_dir_t paragraph_dir; /* current paragraph direction */ ptrdiff_t separator_limit; /* where paragraph separator should end */ unsigned prev_was_pdf : 1; /* if non-zero, previous char was PDF */ @@ -3077,7 +3078,7 @@ extern Lisp_Object lookup_glyphless_char_display (int, struct it *); extern ptrdiff_t compute_display_string_pos (struct text_pos *, struct bidi_string_data *, - int, int *); + struct window *, int, int *); extern ptrdiff_t compute_display_string_end (ptrdiff_t, struct bidi_string_data *); extern void produce_stretch_glyph (struct it *); === modified file 'src/xdisp.c' --- src/xdisp.c 2013-06-06 16:35:31 +0000 +++ src/xdisp.c 2013-06-08 18:28:36 +0000 @@ -2650,6 +2650,7 @@ it->bidi_it.string.lstring = Qnil; it->bidi_it.string.s = NULL; it->bidi_it.string.bufpos = 0; + it->bidi_it.w = w; /* The window in which we iterate over current_buffer: */ XSETWINDOW (it->window, w); @@ -3124,6 +3125,7 @@ it->bidi_it.string.bufpos = it->overlay_strings_charpos; it->bidi_it.string.from_disp_str = it->string_from_display_prop_p; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (IT_STRING_CHARPOS (*it), IT_STRING_BYTEPOS (*it), FRAME_WINDOW_P (it->f), &it->bidi_it); @@ -3490,11 +3492,11 @@ ptrdiff_t compute_display_string_pos (struct text_pos *position, struct bidi_string_data *string, + struct window *w, int frame_window_p, int *disp_prop) { /* OBJECT = nil means current buffer. */ - Lisp_Object object = - (string && STRINGP (string->lstring)) ? string->lstring : Qnil; + Lisp_Object object, object1; Lisp_Object pos, spec, limpos; int string_p = (string && (STRINGP (string->lstring) || string->s)); ptrdiff_t eob = string_p ? string->schars : ZV; @@ -3505,6 +3507,17 @@ struct text_pos tpos; int rv = 0; + if (string && STRINGP (string->lstring)) + object1 = object = string->lstring; + else if (!string_p) + { + eassert (w != NULL); + XSETWINDOW (object, w); + object1 = Qnil; + } + else + object1 = object = Qnil; + *disp_prop = 1; if (charpos >= eob @@ -3543,7 +3556,7 @@ that will replace the underlying text when displayed. */ limpos = make_number (lim); do { - pos = Fnext_single_char_property_change (pos, Qdisplay, object, limpos); + pos = Fnext_single_char_property_change (pos, Qdisplay, object1, limpos); CHARPOS (tpos) = XFASTINT (pos); if (CHARPOS (tpos) >= lim) { @@ -5031,6 +5044,7 @@ it->bidi_it.string.bufpos = bufpos; it->bidi_it.string.from_disp_str = 1; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (0, 0, FRAME_WINDOW_P (it->f), &it->bidi_it); } } @@ -5409,6 +5423,7 @@ it->bidi_it.string.bufpos = it->overlay_strings_charpos; it->bidi_it.string.from_disp_str = it->string_from_display_prop_p; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (0, 0, FRAME_WINDOW_P (it->f), &it->bidi_it); } } @@ -5712,6 +5727,7 @@ it->bidi_it.string.bufpos = pos; it->bidi_it.string.from_disp_str = it->string_from_display_prop_p; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (0, 0, FRAME_WINDOW_P (it->f), &it->bidi_it); } return 1; @@ -6344,6 +6360,7 @@ it->bidi_it.string.lstring = Qnil; it->bidi_it.string.bufpos = 0; it->bidi_it.string.unibyte = 0; + it->bidi_it.w = it->w; } if (set_stop_p) @@ -6421,6 +6438,7 @@ it->bidi_it.string.bufpos = 0; it->bidi_it.string.from_disp_str = 0; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (charpos, IT_STRING_BYTEPOS (*it), FRAME_WINDOW_P (it->f), &it->bidi_it); } @@ -6452,6 +6470,7 @@ it->bidi_it.string.bufpos = 0; it->bidi_it.string.from_disp_str = 0; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (charpos, IT_BYTEPOS (*it), FRAME_WINDOW_P (it->f), &it->bidi_it); } @@ -18921,6 +18940,7 @@ it->bidi_it.string.bufpos = IT_CHARPOS (*it); it->bidi_it.string.from_disp_str = it->string_from_display_prop_p; it->bidi_it.string.unibyte = !it->multibyte_p; + it->bidi_it.w = it->w; bidi_init_it (0, 0, FRAME_WINDOW_P (it->f), &it->bidi_it); } } @@ -19990,6 +20010,7 @@ itb.string.lstring = Qnil; itb.string.bufpos = 0; itb.string.unibyte = 0; + itb.w = XWINDOW (selected_window); bidi_paragraph_init (NEUTRAL_DIR, &itb, 1); bidi_unshelve_cache (itb_data, 0); set_buffer_temp (old); ------------------------------------------------------------ revno: 112895 committer: Jan D. branch nick: trunk timestamp: Sat 2013-06-08 20:13:24 +0200 message: Fix compilation issues for GNUStep and GLIB conflicts. * configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no. (with_file_notification): Don't set to gfile if with_ns = yes. * src/process.c (wait_reading_process_output): Check for NS before GLIB. GLIB may be linked in due to rsvg, but ns_select must be called. * src/xgselect.c (xg_select): Remove call to window_system_available and g_main_context_pending at the top, so Gdk events (i.e. file notify) are processed when Emacs is started with -nw. * src/xgselect.c: Remove unneeded include xterm.h diff: === modified file 'ChangeLog' --- ChangeLog 2013-06-07 08:10:44 +0000 +++ ChangeLog 2013-06-08 18:13:24 +0000 @@ -1,3 +1,8 @@ +2013-06-08 Jan Djärv + + * configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no. + (with_file_notification): Don't set to gfile if with_ns = yes. + 2013-06-07 Richard Copley (tiny change) * Makefile.in (msys_to_w32): Modify to support d:\foo file names. === modified file 'configure.ac' --- configure.ac 2013-06-03 19:38:06 +0000 +++ configure.ac 2013-06-08 18:13:24 +0000 @@ -2317,7 +2317,9 @@ if test "${opsys}" = "mingw32"; then with_file_notification=w32 else - with_file_notification=gfile + if test "${with_ns}" != yes; then + with_file_notification=gfile + fi fi fi @@ -3627,7 +3629,9 @@ AC_MSG_RESULT([$links_glib]) if test "${links_glib}" = "yes"; then AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if GLib is linked in.]) - XGSELOBJ=xgselect.o + if test "$HAVE_NS" = no;then + XGSELOBJ=xgselect.o + fi fi AC_SUBST(XGSELOBJ) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-08 08:48:52 +0000 +++ src/ChangeLog 2013-06-08 18:13:24 +0000 @@ -1,5 +1,10 @@ 2013-06-08 Jan Djärv + * xgselect.c: Remove unneeded include xterm.h + + * process.c (wait_reading_process_output): Check for NS before GLIB. + GLIB may be linked in due to rsvg, but ns_select must be called. + * xgselect.c (xg_select): Remove call to window_system_available and g_main_context_pending at the top, so Gdk events (i.e. file notify) are processed when Emacs is started with -nw. === modified file 'src/process.c' --- src/process.c 2013-06-05 17:04:13 +0000 +++ src/process.c 2013-06-08 18:13:24 +0000 @@ -4528,10 +4528,10 @@ } #endif -#if defined (HAVE_GLIB) - nfds = xg_select -#elif defined (HAVE_NS) - nfds = ns_select +#if defined (HAVE_NS) + nfds = ns_select +#elif defined (HAVE_GLIB) + nfds = xg_select #else nfds = pselect #endif === modified file 'src/xgselect.c' --- src/xgselect.c 2013-06-08 08:48:52 +0000 +++ src/xgselect.c 2013-06-08 18:13:24 +0000 @@ -25,7 +25,6 @@ #include #include -#include "xterm.h" #include "frame.h" int ------------------------------------------------------------ revno: 112894 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-06-08 18:01:45 +0300 message: Don't advertise unsupported features in nt/INSTALL.MSYS. diff: === modified file 'nt/INSTALL.MSYS' --- nt/INSTALL.MSYS 2013-06-08 03:38:46 +0000 +++ nt/INSTALL.MSYS 2013-06-08 15:01:45 +0000 @@ -373,14 +373,10 @@ installation, and you want Emacs to continue using it, specify it via the --enable-locallisppath switch to msysconfig.sh, like this: - ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="%emacs_dir%/share/emacs/VERSION/site-lisp;/d/wherever/site-lisp" + ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp" - The %emacs_dir% part is the root of the Emacs installation tree, it - will get expanded by Emacs when it starts up. Using %emacs_dir%, - you can add directories relative to your Emacs installation, which - will continue to be valid if you move the entire Emacs tree into - another place on your disk. Use the normal MSYS /d/foo/bar style to - specify directories by their absolute file names. + Use the normal MSYS /d/foo/bar style to specify directories by their + absolute file names. A few frequently used options are needed when you want to produce an unoptimized binary with runtime checks enabled: ------------------------------------------------------------ revno: 112893 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-06-08 21:35:55 +0800 message: * progmodes/octave.el (octave-add-log-current-defun): New function. (octave-mode): Set add-log-current-defun-function. (octave-goto-function-definition): Do not move point if not found. (octave-find-definition): Enhance to try subfunctions first. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-08 01:35:47 +0000 +++ lisp/ChangeLog 2013-06-08 13:35:55 +0000 @@ -1,3 +1,10 @@ +2013-06-08 Leo Liu + + * progmodes/octave.el (octave-add-log-current-defun): New function. + (octave-mode): Set add-log-current-defun-function. + (octave-goto-function-definition): Do not move point if not found. + (octave-find-definition): Enhance to try subfunctions first. + 2013-06-08 Glenn Morris * emacs-lisp/bytecomp.el (byte-compile-char-before) === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-06-07 13:00:47 +0000 +++ lisp/progmodes/octave.el 2013-06-08 13:35:55 +0000 @@ -564,6 +564,8 @@ (setq-local imenu-generic-expression octave-mode-imenu-generic-expression) (setq-local imenu-case-fold-search nil) + (setq-local add-log-current-defun-function #'octave-add-log-current-defun) + (add-hook 'completion-at-point-functions 'octave-completion-at-point nil t) (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) (setq-local beginning-of-defun-function 'octave-beginning-of-defun) @@ -977,15 +979,16 @@ (defun octave-goto-function-definition (fn) "Go to the function definition of FN in current buffer." - (goto-char (point-min)) (let ((search (lambda (re sub) - (let (done) - (while (and (not done) (re-search-forward re nil t)) + (let ((orig (point)) found) + (goto-char (point-min)) + (while (and (not found) (re-search-forward re nil t)) (when (and (equal (match-string sub) fn) (not (nth 8 (syntax-ppss)))) - (setq done t))) - (or done (goto-char (point-min))))))) + (setq found t))) + (unless found (goto-char orig)) + found)))) (pcase (file-name-extension (buffer-file-name)) (`"cc" (funcall search "\\_ str \n _ \n "endfunction" > \n) - + ;;; Communication with the inferior Octave process (defun octave-kill-process () "Kill inferior Octave process and its buffer." @@ -1703,26 +1714,29 @@ Functions implemented in C++ can be found if `octave-source-directories' is set correctly." (interactive (list (octave-completing-read))) - (inferior-octave-send-list-and-digest - ;; help NAME is more verbose - (list (format "\ + (require 'etags) + (let ((orig (point))) + (if (octave-goto-function-definition fn) + (ring-insert find-tag-marker-ring (copy-marker orig)) + (inferior-octave-send-list-and-digest + ;; help NAME is more verbose + (list (format "\ if iskeyword(\"%s\") disp(\"`%s' is a keyword\") else which(\"%s\") endif\n" - fn fn fn))) - (let (line file) - ;; Skip garbage lines such as - ;; warning: fmincg.m: possible Matlab-style .... - (while (and (not file) (consp inferior-octave-output-list)) - (setq line (pop inferior-octave-output-list)) - (when (string-match "from the file \\(.*\\)$" line) - (setq file (match-string 1 line)))) - (if (not file) - (user-error "%s" (or line (format "`%s' not found" fn))) - (require 'etags) - (ring-insert find-tag-marker-ring (point-marker)) - (setq file (funcall octave-find-definition-filename-function file)) - (when file - (find-file file) - (octave-goto-function-definition fn))))) + fn fn fn))) + (let (line file) + ;; Skip garbage lines such as + ;; warning: fmincg.m: possible Matlab-style .... + (while (and (not file) (consp inferior-octave-output-list)) + (setq line (pop inferior-octave-output-list)) + (when (string-match "from the file \\(.*\\)$" line) + (setq file (match-string 1 line)))) + (if (not file) + (user-error "%s" (or line (format "`%s' not found" fn))) + (ring-insert find-tag-marker-ring (point-marker)) + (setq file (funcall octave-find-definition-filename-function file)) + (when file + (find-file file) + (octave-goto-function-definition fn))))))) (provide 'octave) ------------------------------------------------------------ revno: 112892 committer: Jan D. branch nick: trunk timestamp: Sat 2013-06-08 10:48:52 +0200 message: * xgselect.c (xg_select): Remove call to window_system_available and g_main_context_pending at the top, so Gdk events (i.e. file notify) are processed when Emacs is started with -nw. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-06-07 09:26:02 +0000 +++ src/ChangeLog 2013-06-08 08:48:52 +0000 @@ -1,3 +1,9 @@ +2013-06-08 Jan Djärv + + * xgselect.c (xg_select): Remove call to window_system_available + and g_main_context_pending at the top, so Gdk events (i.e. file + notify) are processed when Emacs is started with -nw. + 2013-06-07 Eli Zaretskii * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files. === modified file 'src/xgselect.c' --- src/xgselect.c 2013-06-03 18:47:35 +0000 +++ src/xgselect.c 2013-06-08 08:48:52 +0000 @@ -44,9 +44,13 @@ int i, nfds, tmo_in_millisec; USE_SAFE_ALLOCA; - if (! (window_system_available (NULL) - && g_main_context_pending (context = g_main_context_default ()))) - return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask); + /* Do not try to optimize with an initial check with g_main_context_pending + and a call to pselect if it returns false. If Gdk has a timeout for 0.01 + second, and Emacs has a timeout for 1 second, g_main_context_pending will + return false, but the timeout will be 1 second, thus missing the gdk + timeout with a lot. */ + + context = g_main_context_default (); if (rfds) all_rfds = *rfds; else FD_ZERO (&all_rfds); ------------------------------------------------------------ revno: 112891 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-06-08 06:38:46 +0300 message: Minor tweak of nt/INSTALL.MSYS. diff: === modified file 'nt/INSTALL.MSYS' --- nt/INSTALL.MSYS 2013-06-07 08:31:53 +0000 +++ nt/INSTALL.MSYS 2013-06-08 03:38:46 +0000 @@ -118,11 +118,6 @@ MSYS Texinfo, after installing it as part of msys-base, invoke the command "mingw-get remove msys-texinfo".) - As the above packages don't include automake, you will need to - install it, e.g. from here: - - http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download - At this point, you should be ready to configure and build Emacs in its basic configuration. Skip to the "Generating the configure script" section for the build instructions. If you want to build it