------------------------------------------------------------ revno: 117710 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2014-08-16 21:51:27 +0200 message: Handle missing space marker in unified diff during header fixup * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in context of unified diff. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-16 16:50:32 +0000 +++ lisp/ChangeLog 2014-08-16 19:51:27 +0000 @@ -1,3 +1,8 @@ +2014-08-16 Andreas Schwab + + * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in + context of unified diff. + 2014-08-16 Paul Eggert Add dependencies to fix loaddefs race during parallel builds. === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2014-06-18 08:48:49 +0000 +++ lisp/vc/diff-mode.el 2014-08-16 19:51:27 +0000 @@ -1220,6 +1220,9 @@ (?- (cl-incf minus)) (?! (cl-incf bang)) ((or ?\\ ?#) nil) + (?\n (if diff-valid-unified-empty-line + (cl-incf space) + (setq space 0 plus 0 minus 0 bang 0))) (_ (setq space 0 plus 0 minus 0 bang 0))) (cond ((looking-at diff-hunk-header-re-unified) ------------------------------------------------------------ revno: 117709 committer: Paul Eggert branch nick: trunk timestamp: Sat 2014-08-16 09:50:32 -0700 message: Add dependencies to fix loaddefs race during parallel builds. Without this, for example, 'make -j bootstrap' can fail and report "Opening input file: no such file or directory, .../lisp/calendar/diary-loaddefs.el ... recipe for target 'calendar/hol-loaddefs.el' failed", where the hol-loaddefs.el rule got confused because diary-loaddefs.el was being built in parallel. * Makefile.in ($(CAL_DIR)/diary-loaddefs.el): Depend on $(CAL_DIR)/cal-loaddefs.el. ($(CAL_DIR)/hol-loaddefs.el): Depend on $(CAL_DIR)/diary-loaddefs.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-16 15:47:38 +0000 +++ lisp/ChangeLog 2014-08-16 16:50:32 +0000 @@ -1,3 +1,15 @@ +2014-08-16 Paul Eggert + + Add dependencies to fix loaddefs race during parallel builds. + Without this, for example, 'make -j bootstrap' can fail and report + "Opening input file: no such file or directory, + .../lisp/calendar/diary-loaddefs.el ... recipe for target + 'calendar/hol-loaddefs.el' failed", where the hol-loaddefs.el rule + got confused because diary-loaddefs.el was being built in parallel. + * Makefile.in ($(CAL_DIR)/diary-loaddefs.el): + Depend on $(CAL_DIR)/cal-loaddefs.el. + ($(CAL_DIR)/hol-loaddefs.el): Depend on $(CAL_DIR)/diary-loaddefs.el. + 2014-08-16 Martin Rudalics * scroll-bar.el (scroll-bar-horizontal-drag-1): Use cdr of === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2014-06-30 18:26:34 +0000 +++ lisp/Makefile.in 2014-08-16 16:50:32 +0000 @@ -455,13 +455,13 @@ --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ -f batch-update-autoloads $(CAL_DIR) -$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) +$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/cal-loaddefs.el $(emacs) -l autoload \ --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ -f batch-update-autoloads $(CAL_DIR) -$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) +$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/diary-loaddefs.el $(emacs) -l autoload \ --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \ ------------------------------------------------------------ revno: 117708 committer: Paul Eggert branch nick: trunk timestamp: Sat 2014-08-16 09:10:50 -0700 message: * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-16 15:47:38 +0000 +++ src/ChangeLog 2014-08-16 16:10:50 +0000 @@ -1,3 +1,7 @@ +2014-08-16 Paul Eggert + + * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local. + 2014-08-16 Martin Rudalics * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part === modified file 'src/xdisp.c' --- src/xdisp.c 2014-08-16 15:47:38 +0000 +++ src/xdisp.c 2014-08-16 16:10:50 +0000 @@ -15830,7 +15830,7 @@ set_buffer_internal (old_buffer); } else - start = end = whole = 0; + start = end = whole = portion = 0; w->hscroll_whole = whole; ------------------------------------------------------------ revno: 117707 committer: martin rudalics branch nick: trunk timestamp: Sat 2014-08-16 17:47:38 +0200 message: Preliminary attempt to fix horizontal scroll bar dragging with bidi text. * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part of emacs_event return length from si.nPage to si.nMax. * xdisp.c (set_horizontal_scroll_bar): For right-to-left text interchange start and end of thumb. * scroll-bar.el (scroll-bar-horizontal-drag-1): Use cdr of portion-whole for scrolling right-to-left text. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-15 04:34:06 +0000 +++ lisp/ChangeLog 2014-08-16 15:47:38 +0000 @@ -1,3 +1,8 @@ +2014-08-16 Martin Rudalics + + * scroll-bar.el (scroll-bar-horizontal-drag-1): Use cdr of + portion-whole for scrolling right-to-left text. + 2014-08-15 Leo Liu * speedbar.el (speedbar-generic-list-tag-p): Allow special === modified file 'lisp/scroll-bar.el' --- lisp/scroll-bar.el 2014-07-27 18:05:37 +0000 +++ lisp/scroll-bar.el 2014-08-16 15:47:38 +0000 @@ -327,8 +327,11 @@ (window (nth 0 start-position)) (portion-whole (nth 2 start-position)) (unit (frame-char-width (window-frame window)))) - (set-window-hscroll - window (/ (1- (+ (car portion-whole) unit)) unit)))) + (if (eq (current-bidi-paragraph-direction) 'left-to-right) + (set-window-hscroll + window (/ (1- (+ (car portion-whole) unit)) unit)) + (set-window-hscroll + window (/ (1- (+ (cdr portion-whole) unit)) unit))))) (defun scroll-bar-horizontal-drag (event) "Scroll the window horizontally by dragging the scroll bar slider. === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-15 04:34:06 +0000 +++ src/ChangeLog 2014-08-16 15:47:38 +0000 @@ -1,3 +1,10 @@ +2014-08-16 Martin Rudalics + + * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part + of emacs_event return length from si.nPage to si.nMax. + * xdisp.c (set_horizontal_scroll_bar): For right-to-left text + interchange start and end of thumb. + 2014-08-15 Ken Brown * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use === modified file 'src/w32term.c' --- src/w32term.c 2014-08-05 08:25:28 +0000 +++ src/w32term.c 2014-08-16 15:47:38 +0000 @@ -4272,15 +4272,15 @@ { int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width); - int x; + int x, y; int dragging = bar->dragging; SCROLLINFO si; si.cbSize = sizeof (si); - si.fMask = SIF_POS; - + si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE; GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si); x = si.nPos; + y = si.nMax - si.nPos - si.nPage; bar->dragging = 0; FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam; @@ -4354,7 +4354,7 @@ } XSETINT (emacs_event->x, x); - XSETINT (emacs_event->y, left_range); + XSETINT (emacs_event->y, y); return TRUE; } === modified file 'src/xdisp.c' --- src/xdisp.c 2014-08-01 13:10:07 +0000 +++ src/xdisp.c 2014-08-16 15:47:38 +0000 @@ -15779,7 +15779,7 @@ void set_horizontal_scroll_bar (struct window *w) { - int start, end, whole, box_width; + int start, end, whole, portion; if (!MINI_WINDOW_P (w) || (w == XWINDOW (minibuf_window) @@ -15806,14 +15806,25 @@ MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); */ start = w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); - box_width = window_box_width (w, TEXT_AREA); - end = start + box_width; - - /* The following is needed to ensure that if after maximizing a - window we get hscroll > 0, we can still drag the thumb to the - left. */ - whole = max (whole, w->hscroll + box_width); - whole = max (whole, end - start); + end = start + window_box_width (w, TEXT_AREA); + portion = end - start; + /* After enlarging a horizontally scrolled window such that it + gets at least as wide as the text it contains, make sure that + the thumb doesn't fill the entire scroll bar so we can still + drag it back to see the entire text. */ + whole = max (whole, end); + + if (it.bidi_p) + { + Lisp_Object pdir; + + pdir = Fcurrent_bidi_paragraph_direction (Qnil); + if (EQ (pdir, Qright_to_left)) + { + start = whole - end; + end = start + portion; + } + } if (old_buffer) set_buffer_internal (old_buffer); @@ -15826,7 +15837,7 @@ /* Indicate what this scroll bar ought to be displaying now. */ if (FRAME_TERMINAL (XFRAME (w->frame))->set_horizontal_scroll_bar_hook) (*FRAME_TERMINAL (XFRAME (w->frame))->set_horizontal_scroll_bar_hook) - (w, end - start, whole, start); + (w, portion, whole, start); } ------------------------------------------------------------ revno: 117706 [merge] committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-08-14 21:34:06 -0700 message: Merge from emacs-24; up to r117445 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-13 19:17:21 +0000 +++ lisp/ChangeLog 2014-08-15 04:34:06 +0000 @@ -1,3 +1,12 @@ +2014-08-15 Leo Liu + + * speedbar.el (speedbar-generic-list-tag-p): Allow special + elements from imenu. + +2014-08-15 Glenn Morris + + * subr.el (with-output-to-temp-buffer): Doc fix; from elisp manual. + 2014-08-13 Jan Nieuwenhuizen * progmodes/compile.el (compilation-error-regexp-alist-alist): @@ -7,7 +16,7 @@ * progmodes/gud.el (guiler): New function. Starts the Guile REPL; add Guile debugger support for GUD. - + 2014-08-13 Stefan Monnier * obsolete/mouse-sel.el (mouse-sel-mode): Use add/remove-function. === modified file 'lisp/speedbar.el' --- lisp/speedbar.el 2014-04-22 21:32:51 +0000 +++ lisp/speedbar.el 2014-08-15 04:34:06 +0000 @@ -2111,9 +2111,10 @@ ;; in order to make it look nice. ;; ;; A generic list is of the form: -;; ( ("name" . marker-or-number) <-- one tag at this level -;; ("name" ("name" . mon) ("name" . mon) ) <-- one group of tags -;; ("name" mon ("name" . mon) ) <-- group w/ a position and tags +;; ( ("name" . marker-or-number) <-- one tag at this level +;; ("name" marker-or-number goto-fun . args) <-- one tag at this level +;; ("name" ("name" . mon) ("name" . mon) ) <-- one group of tags +;; ("name" mon ("name" . mon) ) <-- group w/ a position and tags (defun speedbar-generic-list-group-p (sublst) "Non-nil if SUBLST is a group. Groups may optionally contain a position." @@ -2144,6 +2145,8 @@ (and (stringp (car-safe sublst)) (or (and (number-or-marker-p (cdr-safe sublst)) (not (cdr-safe (cdr-safe sublst)))) + (ignore-errors (and (number-or-marker-p (nth 1 sublst)) + (functionp (nth 2 sublst)))) ;; For semantic/bovine items, this is needed (symbolp (car-safe (cdr-safe sublst)))) )) === modified file 'lisp/subr.el' --- lisp/subr.el 2014-07-11 09:09:54 +0000 +++ lisp/subr.el 2014-08-15 04:34:06 +0000 @@ -3102,6 +3102,11 @@ temporarily selected. But it doesn't run `temp-buffer-show-hook' if it uses `temp-buffer-show-function'. +By default, the setup hook puts the buffer into Help mode before running BODY. +If BODY does not change the major mode, the show hook makes the buffer +read-only, and scans it for function and variable names to make them into +clickable cross-references. + See the related form `with-temp-buffer-window'." (declare (debug t)) (let ((old-dir (make-symbol "old-dir")) === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-12 09:47:27 +0000 +++ src/ChangeLog 2014-08-15 04:34:06 +0000 @@ -1,3 +1,8 @@ +2014-08-15 Ken Brown + + * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use + ERRORCHECK mutexes. (Bug#18222) + 2014-08-12 Martin Rudalics * frame.c (set_menu_bar_lines_1): Remove. === modified file 'src/gmalloc.c' --- src/gmalloc.c 2014-05-22 16:40:35 +0000 +++ src/gmalloc.c 2014-08-15 04:34:06 +0000 @@ -490,8 +490,18 @@ } #ifdef USE_PTHREAD +/* On Cygwin prior to 1.7.31, pthread_mutexes were ERRORCHECK mutexes + by default. When the default changed to NORMAL in Cygwin-1.7.31, + deadlocks occurred (bug#18222). As a temporary workaround, we + explicitly set the mutexes to be of ERRORCHECK type, restoring the + previous behavior. */ +#ifdef CYGWIN +pthread_mutex_t _malloc_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; +pthread_mutex_t _aligned_blocks_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; +#else /* not CYGWIN */ pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif /* not CYGWIN */ int _malloc_thread_enabled_p; static void @@ -526,14 +536,23 @@ initialized mutexes when they are used first. To avoid such a situation, we initialize mutexes here while their use is disabled in malloc etc. */ +#ifdef CYGWIN + /* Use ERRORCHECK mutexes; see comment above. */ + pthread_mutexattr_t attr; + pthread_mutexattr_init (&attr); + pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ERRORCHECK); + pthread_mutex_init (&_malloc_mutex, &attr); + pthread_mutex_init (&_aligned_blocks_mutex, &attr); +#else /* not CYGWIN */ pthread_mutex_init (&_malloc_mutex, NULL); pthread_mutex_init (&_aligned_blocks_mutex, NULL); +#endif /* not CYGWIN */ pthread_atfork (malloc_atfork_handler_prepare, malloc_atfork_handler_parent, malloc_atfork_handler_child); _malloc_thread_enabled_p = 1; } -#endif +#endif /* USE_PTHREAD */ static void malloc_initialize_1 (void) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.