------------------------------------------------------------ revno: 117648 committer: martin rudalics branch nick: trunk timestamp: Tue 2014-08-05 10:25:28 +0200 message: Don't redeem scroll bars that have been turned off. * w32term.c (w32_redeem_scroll_bar): * xterm.c (XTredeem_scroll_bar): Revert part of last change by not redeeming scroll bars that have been turned off. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-05 05:43:35 +0000 +++ src/ChangeLog 2014-08-05 08:25:28 +0000 @@ -1,3 +1,9 @@ +2014-08-05 Martin Rudalics + + * w32term.c (w32_redeem_scroll_bar): + * xterm.c (XTredeem_scroll_bar): Revert part of last change by + not redeeming scroll bars that have been turned off. + 2014-08-05 Dmitry Antipov * keyboard.c (safe_run_hooks): Follow the convenient style to bind === modified file 'src/w32term.c' --- src/w32term.c 2014-08-04 16:47:27 +0000 +++ src/w32term.c 2014-08-05 08:25:28 +0000 @@ -4041,7 +4041,7 @@ if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar)) emacs_abort (); - if (!NILP (w->vertical_scroll_bar)) + if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) { bar = XSCROLL_BAR (w->vertical_scroll_bar); /* Unlink it from the condemned list. */ @@ -4076,7 +4076,7 @@ } horizontal: - if (!NILP (w->horizontal_scroll_bar)) + if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)) { bar = XSCROLL_BAR (w->horizontal_scroll_bar); /* Unlink it from the condemned list. */ === modified file 'src/xterm.c' --- src/xterm.c 2014-08-04 16:47:27 +0000 +++ src/xterm.c 2014-08-05 08:25:28 +0000 @@ -5948,7 +5948,7 @@ if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar)) emacs_abort (); - if (!NILP (w->vertical_scroll_bar)) + if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) { bar = XSCROLL_BAR (w->vertical_scroll_bar); /* Unlink it from the condemned list. */ @@ -5983,7 +5983,7 @@ } horizontal: - if (!NILP (w->horizontal_scroll_bar)) + if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)) { bar = XSCROLL_BAR (w->horizontal_scroll_bar); /* Unlink it from the condemned list. */ ------------------------------------------------------------ revno: 117647 committer: Michael Albinus branch nick: trunk timestamp: Tue 2014-08-05 10:24:47 +0200 message: Fix typo in last commit. diff: === modified file 'lisp/net/tramp-cache.el' --- lisp/net/tramp-cache.el 2014-08-05 08:13:28 +0000 +++ lisp/net/tramp-cache.el 2014-08-05 08:24:47 +0000 @@ -210,7 +210,7 @@ (unless (string-match (concat - "^" (regexp-opt '("*tramp/" "*debug tramp/" " *temp*") 'parent)) + "^" (regexp-opt '("*tramp/" "*debug tramp/" " *temp*") 'paren)) (or (buffer-name) "")) (let ((bfn (if (stringp (buffer-file-name)) ------------------------------------------------------------ revno: 117646 committer: Michael Albinus branch nick: trunk timestamp: Tue 2014-08-05 10:13:28 +0200 message: * net/tramp-cache.el (tramp-flush-file-function): Suppress function also for Tramp working buffers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-04 21:35:17 +0000 +++ lisp/ChangeLog 2014-08-05 08:13:28 +0000 @@ -1,3 +1,8 @@ +2014-08-05 Michael Albinus + + * net/tramp-cache.el (tramp-flush-file-function): Suppress function + also for Tramp working buffers. + 2014-08-04 Fabián Ezequiel Gallina * progmodes/python.el: Fix completions inside (i)pdb. === modified file 'lisp/net/tramp-cache.el' --- lisp/net/tramp-cache.el 2014-07-24 07:30:36 +0000 +++ lisp/net/tramp-cache.el 2014-08-05 08:13:28 +0000 @@ -207,7 +207,12 @@ "Flush all Tramp cache properties from `buffer-file-name'. This is suppressed for temporary buffers." (save-match-data - (unless (string-match "^ \\*temp\\*" (or (buffer-name) "")) + (unless + (string-match + (concat + "^" (regexp-opt '("*tramp/" "*debug tramp/" " *temp*") 'parent)) + (or (buffer-name) "")) + (let ((bfn (if (stringp (buffer-file-name)) (buffer-file-name) default-directory))) ------------------------------------------------------------ revno: 117645 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-08-05 09:43:35 +0400 message: * keyboard.c (safe_run_hooks): Follow the convenient style to bind inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See . (safe_run_hook_funcall): Adjust accordingly. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-04 16:47:27 +0000 +++ src/ChangeLog 2014-08-05 05:43:35 +0000 @@ -1,3 +1,10 @@ +2014-08-05 Dmitry Antipov + + * keyboard.c (safe_run_hooks): Follow the convenient style to bind + inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See + . + (safe_run_hook_funcall): Adjust accordingly. + 2014-08-04 Martin Rudalics * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition === modified file 'src/keyboard.c' --- src/keyboard.c 2014-08-04 04:03:31 +0000 +++ src/keyboard.c 2014-08-05 05:43:35 +0000 @@ -1910,18 +1910,14 @@ safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) { Lisp_Object iargs[2]; - struct gcpro gcpro1; - eassert (nargs == 1); - iargs[0] = Vinhibit_quit; + eassert (nargs == 2); + /* Yes, run_hook_with_args works this way. */ + iargs[0] = args[1]; iargs[1] = args[0]; - - GCPRO1 (*iargs); - gcpro1.nvars = 2; - internal_condition_case_n (safe_run_hooks_1, 2, iargs, Qt, safe_run_hooks_error); - RETURN_UNGCPRO (Qnil); + return Qnil; } /* If we get an error while running the hook, cause the hook variable @@ -1931,11 +1927,18 @@ void safe_run_hooks (Lisp_Object hook) { + Lisp_Object args[2]; + struct gcpro gcpro1; ptrdiff_t count = SPECPDL_INDEX (); - specbind (Qinhibit_quit, hook); - run_hook_with_args (1, &hook, safe_run_hook_funcall); + args[0] = hook; + args[1] = hook; + + GCPRO1 (hook); + specbind (Qinhibit_quit, Qt); + run_hook_with_args (2, args, safe_run_hook_funcall); unbind_to (count, Qnil); + UNGCPRO; } ------------------------------------------------------------ revno: 117644 committer: Fabi?n Ezequiel Gallina branch nick: trunk timestamp: Mon 2014-08-04 18:35:17 -0300 message: * lisp/progmodes/python.el: Fix completions inside (i)pdb. (python-shell-completion-pdb-string-code): Make obsolete. (python-shell-completion-get-completions): Use python-shell-completion-string-code resending setup code continuously for (i)pdb. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-04 06:27:14 +0000 +++ lisp/ChangeLog 2014-08-04 21:35:17 +0000 @@ -1,3 +1,11 @@ +2014-08-04 Fabián Ezequiel Gallina + + * progmodes/python.el: Fix completions inside (i)pdb. + (python-shell-completion-pdb-string-code): Make obsolete. + (python-shell-completion-get-completions): Use + python-shell-completion-string-code resending setup code + continuously for (i)pdb. + 2014-08-04 Paul Eggert * rect.el (rectangle--default-line-number-format): Rename === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2014-08-02 22:52:55 +0000 +++ lisp/progmodes/python.el 2014-08-04 21:35:17 +0000 @@ -2866,11 +2866,11 @@ "24.4" "Completion string code must also autocomplete modules.") -(defcustom python-shell-completion-pdb-string-code - "';'.join(globals().keys() + locals().keys())" - "Python code used to get completions separated by semicolons for [i]pdb." - :type 'string - :group 'python) +(define-obsolete-variable-alias + 'python-shell-completion-pdb-string-code + 'python-shell-completion-string-code + "24.5" + "Completion string code must work for (i)pdb.") (defun python-shell-completion-get-completions (process import input) "Do completion at point using PROCESS for IMPORT or INPUT. @@ -2885,10 +2885,14 @@ ;; Check whether a prompt matches a pdb string, an import ;; statement or just the standard prompt and use the ;; correct python-shell-completion-*-code string - (cond ((and (> (length python-shell-completion-pdb-string-code) 0) - (string-match + (cond ((and (string-match (concat "^" python-shell-prompt-pdb-regexp) prompt)) - python-shell-completion-pdb-string-code) + ;; Since there are no guarantees the user will remain + ;; in the same context where completion code was sent + ;; (e.g. user steps into a function), safeguard + ;; resending completion setup continuously. + (concat python-shell-completion-setup-code + "\nprint (" python-shell-completion-string-code ")")) ((string-match python-shell--prompt-calculated-input-regexp prompt) python-shell-completion-string-code) ------------------------------------------------------------ revno: 117643 committer: Paul Eggert branch nick: trunk timestamp: Mon 2014-08-04 11:44:49 -0700 message: Merge from gnulib, incorporating: 2014-08-04 extern-inline: port to FreeBSD, DragonFly * lib/gnulib.mk: Regenerate (comment change only). * m4/extern-inline.m4: Update from gnulib. diff: === modified file 'ChangeLog' --- ChangeLog 2014-08-02 21:50:13 +0000 +++ ChangeLog 2014-08-04 18:44:49 +0000 @@ -1,3 +1,10 @@ +2014-08-04 Paul Eggert + + Merge from gnulib, incorporating: + 2014-08-04 extern-inline: port to FreeBSD, DragonFly + * lib/gnulib.mk: Regenerate (comment change only). + * m4/extern-inline.m4: Update from gnulib. + 2014-08-02 Paul Eggert * configure.ac (HAVE_TIMERFD): Also check for TFD_NONBLOCK, === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2014-05-17 08:11:31 +0000 +++ lib/gnulib.mk 2014-08-04 18:44:49 +0000 @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens warnings MOSTLYCLEANFILES += core *.stackdump === modified file 'm4/extern-inline.m4' --- m4/extern-inline.m4 2014-01-01 07:43:34 +0000 +++ m4/extern-inline.m4 2014-08-04 18:44:49 +0000 @@ -19,13 +19,28 @@ 'reference to static identifier "f" in extern inline function'. This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - Suppress the use of extern inline on problematic Apple configurations. - OS X 10.8 and earlier mishandle it; see, e.g., - . + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and for clang but remains for g++; see . - Perhaps Apple will fix this some day. */ -#if (defined __APPLE__ \ + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ && (defined __header_inline \ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ && ! defined __clang__) \ @@ -33,19 +48,19 @@ && (defined __GNUC__ || defined __cplusplus)) \ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_APPLE_BUG +# define _GL_EXTERN_INLINE_STDHEADER_BUG #endif #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ : (199901L <= __STDC_VERSION__ \ && !defined __HP_cc \ && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline # define _GL_EXTERN_INLINE_IN_USE #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) ------------------------------------------------------------ revno: 117642 committer: martin rudalics branch nick: trunk timestamp: Mon 2014-08-04 18:47:27 +0200 message: Fix scroll bar handling for non-toolkit builds. * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition correctly according to toolkit used. * frame.c (make_initial_frame, make_terminal_frame) (x_set_horizontal_scroll_bars, x_set_scroll_bar_height) (Vdefault_frame_horizontal_scroll_bars): Correctly condition assignments according to presence of toolkit scrollbars. * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition correctly according to toolkit used. * window.c (set_window_scroll_bars): Set horizontal scroll bar only if toolkit supports it. * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if present. * xterm.c (x_scroll_bar_create): Initialize horizontal slot for non-toolkit builds. (XTredeem_scroll_bar): Always redeem scroll bar if present. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-08-04 04:03:31 +0000 +++ src/ChangeLog 2014-08-04 16:47:27 +0000 @@ -1,3 +1,21 @@ +2014-08-04 Martin Rudalics + + * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition + correctly according to toolkit used. + * frame.c (make_initial_frame, make_terminal_frame) + (x_set_horizontal_scroll_bars, x_set_scroll_bar_height) + (Vdefault_frame_horizontal_scroll_bars): Correctly condition + assignments according to presence of toolkit scrollbars. + * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition + correctly according to toolkit used. + * window.c (set_window_scroll_bars): Set horizontal scroll bar + only if toolkit supports it. + * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if + present. + * xterm.c (x_scroll_bar_create): Initialize horizontal slot for + non-toolkit builds. + (XTredeem_scroll_bar): Always redeem scroll bar if present. + 2014-08-04 Dmitry Antipov * keyboard.c (safe_run_hook_funcall): Avoid consing around === modified file 'src/frame.c' --- src/frame.c 2014-08-01 15:12:01 +0000 +++ src/frame.c 2014-08-04 16:47:27 +0000 @@ -860,7 +860,7 @@ #ifdef HAVE_WINDOW_SYSTEM f->vertical_scroll_bar_type = vertical_scroll_bar_none; - FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) = false; + f->horizontal_scroll_bars = false; #endif /* The default value of menu-bar-mode is t. */ @@ -913,7 +913,7 @@ #ifdef HAVE_WINDOW_SYSTEM f->vertical_scroll_bar_type = vertical_scroll_bar_none; - FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) = false; + f->horizontal_scroll_bars = false; #endif FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1; @@ -3793,12 +3793,13 @@ void x_set_horizontal_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if (defined (HAVE_WINDOW_SYSTEM) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + || defined (HAVE_NTGUI))) if ((NILP (arg) && FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)) || (!NILP (arg) && !FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))) { - FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) - = NILP (arg) ? false : true; + f->horizontal_scroll_bars = NILP (arg) ? false : true; /* We set this parameter before creating the X window for the frame, so we can get the geometry right from the start. @@ -3844,7 +3845,9 @@ void x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if (defined (HAVE_WINDOW_SYSTEM) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + || defined (HAVE_NTGUI))) int unit = FRAME_LINE_HEIGHT (f); if (NILP (arg)) @@ -4891,7 +4894,9 @@ DEFVAR_LISP ("default-frame-horizontal-scroll-bars", Vdefault_frame_horizontal_scroll_bars, doc: /* Default value for horizontal scroll bars on this window-system. */); -#ifdef HAVE_WINDOW_SYSTEM +#if (defined (HAVE_WINDOW_SYSTEM) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + || defined (HAVE_NTGUI))) Vdefault_frame_horizontal_scroll_bars = Qt; #else Vdefault_frame_horizontal_scroll_bars = Qnil; === modified file 'src/frame.h' --- src/frame.h 2014-08-01 15:12:01 +0000 +++ src/frame.h 2014-08-04 16:47:27 +0000 @@ -852,8 +852,6 @@ #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ ((f)->vertical_scroll_bar_type != vertical_scroll_bar_none) -#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ - ((f)->horizontal_scroll_bars) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) \ ((f)->vertical_scroll_bar_type == vertical_scroll_bar_left) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \ @@ -866,9 +864,18 @@ #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((void) f, 0) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) ((void) f, 0) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) f, 0) + +#endif /* HAVE_WINDOW_SYSTEM */ + +/* Whether horizontal scroll bars are currently enabled for frame F. */ +#if (defined (HAVE_WINDOW_SYSTEM) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + || defined (HAVE_NTGUI))) +#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \ + ((f)->horizontal_scroll_bars) +#else #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) ((void) f, 0) - -#endif /* HAVE_WINDOW_SYSTEM */ +#endif /* Width that a scroll bar in frame F should have, if there is one. Measured in pixels. === modified file 'src/w32term.c' --- src/w32term.c 2014-07-27 13:21:30 +0000 +++ src/w32term.c 2014-08-04 16:47:27 +0000 @@ -4041,7 +4041,7 @@ if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar)) emacs_abort (); - if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) + if (!NILP (w->vertical_scroll_bar)) { bar = XSCROLL_BAR (w->vertical_scroll_bar); /* Unlink it from the condemned list. */ @@ -4076,7 +4076,7 @@ } horizontal: - if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)) + if (!NILP (w->horizontal_scroll_bar)) { bar = XSCROLL_BAR (w->horizontal_scroll_bar); /* Unlink it from the condemned list. */ === modified file 'src/window.c' --- src/window.c 2014-07-28 09:39:09 +0000 +++ src/window.c 2014-08-04 16:47:27 +0000 @@ -7299,7 +7299,6 @@ Lisp_Object horizontal_type) { int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width))); - int iheight = (NILP (height) ? -1 : (CHECK_NATNUM (height), XINT (height))); bool changed = 0; if (iwidth == 0) @@ -7327,29 +7326,39 @@ } } - if (MINI_WINDOW_P (w) || iheight == 0) - horizontal_type = Qnil; - - if (!(NILP (horizontal_type) - || EQ (horizontal_type, Qbottom) - || EQ (horizontal_type, Qt))) - error ("Invalid type of horizontal scroll bar"); - - if (w->scroll_bar_height != iheight - || !EQ (w->horizontal_scroll_bar_type, horizontal_type)) - { - /* Don't change anything if new scroll bar won't fit. */ - if ((WINDOW_PIXEL_HEIGHT (w) - - WINDOW_HEADER_LINE_HEIGHT (w) - - WINDOW_MODE_LINE_HEIGHT (w) - - max (iheight, 0)) - >= MIN_SAFE_WINDOW_PIXEL_HEIGHT (w)) - { - w->scroll_bar_height = iheight; - wset_horizontal_scroll_bar_type (w, horizontal_type); - changed = 1; - } - } +#if (defined (HAVE_WINDOW_SYSTEM) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + || defined (HAVE_NTGUI))) + { + int iheight = (NILP (height) ? -1 : (CHECK_NATNUM (height), XINT (height))); + + if (MINI_WINDOW_P (w) || iheight == 0) + horizontal_type = Qnil; + + if (!(NILP (horizontal_type) + || EQ (horizontal_type, Qbottom) + || EQ (horizontal_type, Qt))) + error ("Invalid type of horizontal scroll bar"); + + if (w->scroll_bar_height != iheight + || !EQ (w->horizontal_scroll_bar_type, horizontal_type)) + { + /* Don't change anything if new scroll bar won't fit. */ + if ((WINDOW_PIXEL_HEIGHT (w) + - WINDOW_HEADER_LINE_HEIGHT (w) + - WINDOW_MODE_LINE_HEIGHT (w) + - max (iheight, 0)) + >= MIN_SAFE_WINDOW_PIXEL_HEIGHT (w)) + { + w->scroll_bar_height = iheight; + wset_horizontal_scroll_bar_type (w, horizontal_type); + changed = 1; + } + } + } +#else + wset_horizontal_scroll_bar_type (w, Qnil); +#endif return changed ? w : NULL; } === modified file 'src/window.h' --- src/window.h 2014-07-27 13:21:30 +0000 +++ src/window.h 2014-08-04 16:47:27 +0000 @@ -787,7 +787,9 @@ /* Say whether horizontal scroll bars are currently enabled for window W. Horizontal scrollbars exist for toolkit versions only. */ -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) +#if (defined (HAVE_WINDOW_SYSTEM) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + || defined (HAVE_NTGUI))) #define WINDOW_HAS_HORIZONTAL_SCROLL_BAR(W) \ ((WINDOW_PSEUDO_P (W) || MINI_NON_ONLY_WINDOW_P (W)) \ ? false \ === modified file 'src/xterm.c' --- src/xterm.c 2014-08-03 20:34:33 +0000 +++ src/xterm.c 2014-08-04 16:47:27 +0000 @@ -5474,6 +5474,7 @@ bar->start = 0; bar->end = 0; bar->dragging = -1; + bar->horizontal = horizontal; #if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID) bar->last_seen_part = scroll_bar_nowhere; #endif @@ -5947,7 +5948,7 @@ if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar)) emacs_abort (); - if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) + if (!NILP (w->vertical_scroll_bar)) { bar = XSCROLL_BAR (w->vertical_scroll_bar); /* Unlink it from the condemned list. */ @@ -5982,7 +5983,7 @@ } horizontal: - if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)) + if (!NILP (w->horizontal_scroll_bar)) { bar = XSCROLL_BAR (w->horizontal_scroll_bar); /* Unlink it from the condemned list. */ ------------------------------------------------------------ revno: 117641 committer: Paul Eggert branch nick: trunk timestamp: Sun 2014-08-03 23:27:14 -0700 message: * rect.el (rectangle--default-line-number-format): Rename from misspelled rectange--default-line-number-format (Bug#18045). All uses changed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-08-03 15:38:52 +0000 +++ lisp/ChangeLog 2014-08-04 06:27:14 +0000 @@ -1,3 +1,9 @@ +2014-08-04 Paul Eggert + + * rect.el (rectangle--default-line-number-format): Rename + from misspelled rectange--default-line-number-format (Bug#18045). + All uses changed. + 2014-08-03 Paul Eggert Don't mishandle year-9999 dates (Bug#18176). === modified file 'lisp/rect.el' --- lisp/rect.el 2014-07-19 01:43:29 +0000 +++ lisp/rect.el 2014-08-04 06:27:14 +0000 @@ -520,7 +520,7 @@ (setq rectangle-number-line-counter (1+ rectangle-number-line-counter))) -(defun rectange--default-line-number-format (start end start-at) +(defun rectangle--default-line-number-format (start end start-at) (concat "%" (int-to-string (length (int-to-string (+ (count-lines start end) start-at)))) @@ -541,11 +541,11 @@ (start-at (read-number "Number to count from: " 1))) (list start end start-at (read-string "Format string: " - (rectange--default-line-number-format + (rectangle--default-line-number-format start end start-at)))) (list (region-beginning) (region-end) 1 nil))) (unless format - (setq format (rectange--default-line-number-format start end start-at))) + (setq format (rectangle--default-line-number-format start end start-at))) (let ((rectangle-number-line-counter start-at)) (apply-on-rectangle 'rectangle-number-line-callback start end format)))