Now on revision 113409. ------------------------------------------------------------ revno: 113409 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-07-13 12:44:19 +0800 message: * ido.el (ido-read-file-name): Guard against non-symbol value. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-13 01:55:58 +0000 +++ lisp/ChangeLog 2013-07-13 04:44:19 +0000 @@ -1,3 +1,7 @@ +2013-07-13 Leo Liu + + * ido.el (ido-read-file-name): Guard against non-symbol value. + 2013-07-13 Fabián Ezequiel Gallina * progmodes/python.el (python-imenu--build-tree): Fix corner case === modified file 'lisp/ido.el' --- lisp/ido.el 2013-07-13 00:57:47 +0000 +++ lisp/ido.el 2013-07-13 04:44:19 +0000 @@ -4760,16 +4760,20 @@ (let (filename) (cond ((or (eq predicate 'file-directory-p) - (eq (get this-command 'ido) 'dir) + (eq (and (symbolp this-command) + (get this-command 'ido)) 'dir) (memq this-command ido-read-file-name-as-directory-commands)) (setq filename (ido-read-directory-name prompt dir default-filename mustmatch initial))) - ((and (not (eq (get this-command 'ido) 'ignore)) + ((and (not (eq (and (symbolp this-command) + (get this-command 'ido)) 'ignore)) (not (memq this-command ido-read-file-name-non-ido)) (or (null predicate) (eq predicate 'file-exists-p))) (let* (ido-saved-vc-hb (ido-context-switch-command - (if (eq (get this-command 'ido) 'find-file) nil 'ignore)) + (if (eq (and (symbolp this-command) + (get this-command 'ido)) 'find-file) + nil 'ignore)) (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) (minibuffer-completing-file-name t) (ido-current-directory (ido-expand-directory dir)) ------------------------------------------------------------ revno: 113408 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Fri 2013-07-12 22:55:58 -0300 message: * lisp/progmodes/python.el (python-imenu--build-tree): Fix corner case in nested defuns. * test/automated/python-tests.el (python-imenu-create-index-2) (python-imenu-create-index-3): New tests. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-13 00:57:47 +0000 +++ lisp/ChangeLog 2013-07-13 01:55:58 +0000 @@ -1,3 +1,8 @@ +2013-07-13 Fabián Ezequiel Gallina + + * progmodes/python.el (python-imenu--build-tree): Fix corner case + in nested defuns. + 2013-07-13 Leo Liu * ido.el (ido-exhibit): Handle ido-enter-matching-directory before === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-06-18 07:17:58 +0000 +++ lisp/progmodes/python.el 2013-07-13 01:55:58 +0000 @@ -3091,7 +3091,12 @@ ;; Stop collecting nodes after moving to a position with ;; indentation equaling min-indent. This is specially ;; useful for navigating nested definitions recursively. - tree) + (if (> num-children 0) + tree + ;; When there are no children, the collected tree is a + ;; single node intended to be added in the list of defuns + ;; of its parent. + (car tree))) (t (python-imenu--build-tree min-indent @@ -3131,7 +3136,7 @@ (cons (prog1 (python-imenu--build-tree - prev-indent indent 1 (list (cons label pos))) + prev-indent indent 0 (list (cons label pos))) ;; Adjustment: after scanning backwards ;; for all deeper children, we need to ;; continue our scan for a parent from === modified file 'test/ChangeLog' --- test/ChangeLog 2013-07-11 17:18:48 +0000 +++ test/ChangeLog 2013-07-13 01:55:58 +0000 @@ -1,3 +1,8 @@ +2013-07-13 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-imenu-create-index-2) + (python-imenu-create-index-3): New tests. + 2013-07-11 Glenn Morris * automated/ert-tests.el: Require cl-lib at runtime too. === modified file 'test/automated/python-tests.el' --- test/automated/python-tests.el 2013-07-09 07:35:26 +0000 +++ test/automated/python-tests.el 2013-07-13 01:55:58 +0000 @@ -1745,6 +1745,53 @@ (cons "c (def)" (copy-marker 626))))) (python-imenu-create-index))))) +(ert-deftest python-imenu-create-index-2 () + (python-tests-with-temp-buffer + " +class Foo(object): + def foo(self): + def foo1(): + pass + + def foobar(self): + pass +" + (goto-char (point-max)) + (should (equal + (list + (list + "Foo (class)" + (cons "*class definition*" (copy-marker 2)) + (list + "foo (def)" + (cons "*function definition*" (copy-marker 21)) + (cons "foo1 (def)" (copy-marker 40))) + (cons "foobar (def)" (copy-marker 78)))) + (python-imenu-create-index))))) + +(ert-deftest python-imenu-create-index-3 () + (python-tests-with-temp-buffer + " +class Foo(object): + def foo(self): + def foo1(): + pass + def foo2(): + pass +" + (goto-char (point-max)) + (should (equal + (list + (list + "Foo (class)" + (cons "*class definition*" (copy-marker 2)) + (list + "foo (def)" + (cons "*function definition*" (copy-marker 21)) + (cons "foo1 (def)" (copy-marker 40)) + (cons "foo2 (def)" (copy-marker 77))))) + (python-imenu-create-index))))) + (ert-deftest python-imenu-create-flat-index-1 () (python-tests-with-temp-buffer " ------------------------------------------------------------ revno: 113407 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-07-13 09:30:36 +0800 message: * NEWS: Mention new value for ido-use-virtual-buffers. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-07-11 17:27:27 +0000 +++ etc/ChangeLog 2013-07-13 01:30:36 +0000 @@ -1,3 +1,7 @@ +2013-07-13 Leo Liu + + * NEWS: Mention new value for ido-use-virtual-buffers. + 2013-07-10 Paul Eggert Timestamp fixes for undo (Bug#14824). === modified file 'etc/NEWS' --- etc/NEWS 2013-07-12 17:36:42 +0000 +++ etc/NEWS 2013-07-13 01:30:36 +0000 @@ -174,6 +174,8 @@ See `remember-data-directory' and `remember-directory-file-name-format' for new options related to this function. + +** `ido-use-virtual-buffers' takes a new value 'auto. ** `ido-decorations' has been slightly extended to give a bit more control. ** More packages look for ~/.emacs.d/ additionally to ~/.. ------------------------------------------------------------ revno: 113406 fixes bug: http://debbugs.gnu.org/6852 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-07-13 08:57:47 +0800 message: * ido.el (ido-exhibit): Handle ido-enter-matching-directory before ido-set-matches call. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 23:55:01 +0000 +++ lisp/ChangeLog 2013-07-13 00:57:47 +0000 @@ -1,3 +1,8 @@ +2013-07-13 Leo Liu + + * ido.el (ido-exhibit): Handle ido-enter-matching-directory before + ido-set-matches call. (Bug#6852) + 2013-07-12 Dmitry Gutov * progmodes/ruby-mode.el (ruby-percent-literals-beg-re): === modified file 'lisp/ido.el' --- lisp/ido.el 2013-07-12 01:01:53 +0000 +++ lisp/ido.el 2013-07-13 00:57:47 +0000 @@ -4482,11 +4482,6 @@ (setq ido-exit 'refresh) (exit-minibuffer)) - ;; Update the list of matches - (setq ido-text contents) - (ido-set-matches) - (ido-trace "new " ido-matches) - (when (and ido-enter-matching-directory ido-matches (or (eq ido-enter-matching-directory 'first) @@ -4500,6 +4495,11 @@ (setq ido-exit 'refresh) (exit-minibuffer)) + ;; Update the list of matches + (setq ido-text contents) + (ido-set-matches) + (ido-trace "new " ido-matches) + (when (and (boundp 'ido-enable-virtual-buffers) (not (eq ido-enable-virtual-buffers 'always)) (eq ido-cur-item 'buffer) ------------------------------------------------------------ revno: 113405 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-07-12 17:24:38 -0700 message: Don't lose top specpdl entry when memory is exhausted. * eval.c (grow_specpdl): Increment specpdl top by 1 and check for specpdl overflow here, to simplify callers; all callers changed. Always reserve an unused entry at the stack top; this avoids losing the top entry's information when memory is exhausted. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-12 17:30:48 +0000 +++ src/ChangeLog 2013-07-13 00:24:38 +0000 @@ -1,3 +1,11 @@ +2013-07-13 Paul Eggert + + Don't lose top specpdl entry when memory is exhausted. + * eval.c (grow_specpdl): Increment specpdl top by 1 and check for + specpdl overflow here, to simplify callers; all callers changed. + Always reserve an unused entry at the stack top; this avoids + losing the top entry's information when memory is exhausted. + 2013-07-12 Paul Eggert Clean up errno reporting and fix some errno-reporting bugs. === modified file 'src/eval.c' --- src/eval.c 2013-07-11 07:17:23 +0000 +++ src/eval.c 2013-07-13 00:24:38 +0000 @@ -1996,38 +1996,52 @@ return unbind_to (count, eval_sub (form)); } +/* Grow the specpdl stack by one entry. + The caller should have already initialized the entry. + Signal an error on stack overflow. + + Make sure that there is always one unused entry past the top of the + stack, so that the just-initialized entry is safely unwound if + memory exhausted and an error is signaled here. Also, allocate a + never-used entry just before the bottom of the stack; sometimes its + address is taken. */ + static void grow_specpdl (void) { - ptrdiff_t count = SPECPDL_INDEX (); - ptrdiff_t max_size = min (max_specpdl_size, PTRDIFF_MAX - 1000); - union specbinding *pdlvec = specpdl - 1; - ptrdiff_t pdlvecsize = specpdl_size + 1; - if (max_size <= specpdl_size) + specpdl_ptr++; + + if (specpdl_ptr == specpdl + specpdl_size) { - if (max_specpdl_size < 400) - max_size = max_specpdl_size = 400; + ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t max_size = min (max_specpdl_size, PTRDIFF_MAX - 1000); + union specbinding *pdlvec = specpdl - 1; + ptrdiff_t pdlvecsize = specpdl_size + 1; if (max_size <= specpdl_size) - signal_error ("Variable binding depth exceeds max-specpdl-size", Qnil); + { + if (max_specpdl_size < 400) + max_size = max_specpdl_size = 400; + if (max_size <= specpdl_size) + signal_error ("Variable binding depth exceeds max-specpdl-size", + Qnil); + } + pdlvec = xpalloc (pdlvec, &pdlvecsize, 1, max_size + 1, sizeof *specpdl); + specpdl = pdlvec + 1; + specpdl_size = pdlvecsize - 1; + specpdl_ptr = specpdl + count; } - pdlvec = xpalloc (pdlvec, &pdlvecsize, 1, max_size + 1, sizeof *specpdl); - specpdl = pdlvec + 1; - specpdl_size = pdlvecsize - 1; - specpdl_ptr = specpdl + count; } void record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) { eassert (nargs >= UNEVALLED); - if (specpdl_ptr == specpdl + specpdl_size) - grow_specpdl (); specpdl_ptr->bt.kind = SPECPDL_BACKTRACE; specpdl_ptr->bt.debug_on_exit = false; specpdl_ptr->bt.function = function; specpdl_ptr->bt.args = args; specpdl_ptr->bt.nargs = nargs; - specpdl_ptr++; + grow_specpdl (); } /* Eval a sub-expression of the current expression (i.e. in the same @@ -3113,8 +3127,6 @@ CHECK_SYMBOL (symbol); sym = XSYMBOL (symbol); - if (specpdl_ptr == specpdl + specpdl_size) - grow_specpdl (); start: switch (sym->redirect) @@ -3127,7 +3139,7 @@ specpdl_ptr->let.kind = SPECPDL_LET; specpdl_ptr->let.symbol = symbol; specpdl_ptr->let.old_value = SYMBOL_VAL (sym); - ++specpdl_ptr; + grow_specpdl (); if (!sym->constant) SET_SYMBOL_VAL (sym, value); else @@ -3162,7 +3174,7 @@ if (NILP (Flocal_variable_p (symbol, Qnil))) { specpdl_ptr->let.kind = SPECPDL_LET_DEFAULT; - ++specpdl_ptr; + grow_specpdl (); Fset_default (symbol, value); return; } @@ -3170,7 +3182,7 @@ else specpdl_ptr->let.kind = SPECPDL_LET; - specpdl_ptr++; + grow_specpdl (); set_internal (symbol, value, Qnil, 1); break; } @@ -3181,12 +3193,10 @@ void record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) { - if (specpdl_ptr == specpdl + specpdl_size) - grow_specpdl (); specpdl_ptr->unwind.kind = SPECPDL_UNWIND; specpdl_ptr->unwind.func = function; specpdl_ptr->unwind.arg = arg; - specpdl_ptr++; + grow_specpdl (); } Lisp_Object ------------------------------------------------------------ revno: 113404 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-07-12 17:01:43 -0700 message: * configure.ac: Simplify --with-file-notification handling. diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-12 17:36:42 +0000 +++ ChangeLog 2013-07-13 00:01:43 +0000 @@ -1,3 +1,7 @@ +2013-07-13 Paul Eggert + + * configure.ac: Simplify --with-file-notification handling. + 2013-07-12 Glenn Morris * configure.ac: If with-file-notification=yes, if gfile not found, === modified file 'configure.ac' --- configure.ac 2013-07-12 23:15:20 +0000 +++ configure.ac 2013-07-13 00:01:43 +0000 @@ -2319,63 +2319,50 @@ with_file_notification=no fi -if test "${with_file_notification}" != "no"; then - - dnl MS Windows native file monitor is available for mingw32 only. - if test "${with_file_notification}" = "w32" || \ - ( test "${opsys}" = "mingw32" && \ - test "${with_file_notification}" = "yes" ); then - AC_CHECK_HEADER(windows.h) - if test "$ac_cv_header_windows_h" = yes ; then - AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.]) - NOTIFY_OBJ=w32notify.o - NOTIFY_SUMMARY="yes (w32)" - with_file_notification=w32 - elif test "${with_file_notification}" = "w32"; then - AC_MSG_ERROR([File notification `w32' requested but requirements not found.]) - elif test "${opsys}" = "mingw32"; then - dnl Do not try any further. - with_file_notification=no - fi - fi - - dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED - dnl has been added in glib 2.24. It has been tested under - dnl GNU/Linux only. We take precedence over inotify, but this makes - dnl only sense when glib has been compiled with inotify support. How - dnl to check? - if test "${with_file_notification}" = "gfile" || \ - test "${with_file_notification}" = "yes"; then - PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no) - if test "$HAVE_GFILENOTIFY" = "yes"; then - AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) - NOTIFY_OBJ=gfilenotify.o - NOTIFY_SUMMARY="yes -lgio (gfile)" - with_file_notification=gfile - elif test "${with_file_notification}" = "gfile"; then - AC_MSG_ERROR([File notification `gfile' requested but requirements not found.]) - fi - fi - - dnl inotify is only available on GNU/Linux. - if test "${with_file_notification}" = "inotify" || \ - test "${with_file_notification}" = "yes"; then - AC_CHECK_HEADER(sys/inotify.h) - if test "$ac_cv_header_sys_inotify_h" = yes ; then - AC_CHECK_FUNC(inotify_init1) - if test "$ac_cv_func_inotify_init1" = yes; then - AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.]) - NOTIFY_OBJ=inotify.o - NOTIFY_SUMMARY="yes -lglibc (inotify)" - with_file_notification=inotify - fi - fi - if test "${with_file_notification}" = "inotify" && \ - test -z "${NOTIFY_OBJ}"; then - AC_MSG_ERROR([File notification `inotify' requested but requirements not found.]) - fi - fi -fi dnl ${with_file_notification} != no +dnl MS Windows native file monitor is available for mingw32 only. +case $with_file_notification,$opsys in + w32,* | yes,mingw32) + AC_CHECK_HEADER(windows.h) + if test "$ac_cv_header_windows_h" = yes ; then + AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.]) + NOTIFY_OBJ=w32notify.o + NOTIFY_SUMMARY="yes (w32)" + fi ;; +esac + +dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED +dnl has been added in glib 2.24. It has been tested under +dnl GNU/Linux only. We take precedence over inotify, but this makes +dnl only sense when glib has been compiled with inotify support. How +dnl to check? +case $with_file_notification,$NOTIFY_OBJ in + gfile, | yes,) + PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no) + if test "$HAVE_GFILENOTIFY" = "yes"; then + AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) + NOTIFY_OBJ=gfilenotify.o + NOTIFY_SUMMARY="yes -lgio (gfile)" + fi ;; +esac + +dnl inotify is only available on GNU/Linux. +case $with_file_notification,$NOTIFY_OBJ in + inotify, | yes,) + AC_CHECK_HEADER(sys/inotify.h) + if test "$ac_cv_header_sys_inotify_h" = yes ; then + AC_CHECK_FUNC(inotify_init1) + if test "$ac_cv_func_inotify_init1" = yes; then + AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.]) + NOTIFY_OBJ=inotify.o + NOTIFY_SUMMARY="yes -lglibc (inotify)" + fi + fi ;; +esac + +case $with_file_notification,$NOTIFY_OBJ in + yes,* | no,* | *,?*) ;; + *) AC_MSG_ERROR([File notification `$with_file_notification' requested but requirements not found.]) ;; +esac if test -n "$NOTIFY_OBJ"; then AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.]) ------------------------------------------------------------ revno: 113403 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-12 19:55:01 -0400 message: ChangeLog fix diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 20:28:53 +0000 +++ lisp/ChangeLog 2013-07-12 23:55:01 +0000 @@ -12,9 +12,6 @@ * progmodes/gdb-mi.el (gdb-strip-string-backslash): New function. (gdb-send): Handle continued commands. (Bug#14847) - * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. - (Bug#14842) - 2013-07-12 Juanma Barranquero * desktop.el (desktop--v2s): Remove unused local variable. @@ -26,6 +23,11 @@ * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. +2013-07-12 Eli Zaretskii + + * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. + (Bug#14842) + 2013-07-12 Glenn Morris * doc-view.el: Require cl-lib at runtime too. ------------------------------------------------------------ revno: 113402 committer: Dmitry Gutov branch nick: trunk timestamp: Sat 2013-07-13 03:36:14 +0400 message: * progmodes/ruby-mode.el (ruby-font-lock-keywords): Simplify the last change. diff: === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-07-12 20:28:53 +0000 +++ lisp/progmodes/ruby-mode.el 2013-07-12 23:36:14 +0000 @@ -1848,11 +1848,8 @@ '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; constants - '("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)\\(?:\\_>[^\(]\\|::\\|\\'\\)" - 1 (progn - (when (eq ?: (char-before)) - (forward-char -2)) - font-lock-type-face)) + '("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" + 1 (unless (eq ?\( (char-after)) font-lock-type-face)) '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion '(ruby-match-expression-expansion ------------------------------------------------------------ revno: 113401 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-12 19:15:20 -0400 message: * configure.ac: Further fix. diff: === modified file 'configure.ac' --- configure.ac 2013-07-12 23:14:20 +0000 +++ configure.ac 2013-07-12 23:15:20 +0000 @@ -2330,6 +2330,7 @@ AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.]) NOTIFY_OBJ=w32notify.o NOTIFY_SUMMARY="yes (w32)" + with_file_notification=w32 elif test "${with_file_notification}" = "w32"; then AC_MSG_ERROR([File notification `w32' requested but requirements not found.]) elif test "${opsys}" = "mingw32"; then ------------------------------------------------------------ revno: 113400 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-12 19:14:20 -0400 message: * configure.ac: Fix goofs in previous. diff: === modified file 'configure.ac' --- configure.ac 2013-07-12 17:36:42 +0000 +++ configure.ac 2013-07-12 23:14:20 +0000 @@ -2350,6 +2350,7 @@ AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) NOTIFY_OBJ=gfilenotify.o NOTIFY_SUMMARY="yes -lgio (gfile)" + with_file_notification=gfile elif test "${with_file_notification}" = "gfile"; then AC_MSG_ERROR([File notification `gfile' requested but requirements not found.]) fi @@ -2365,10 +2366,13 @@ AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.]) NOTIFY_OBJ=inotify.o NOTIFY_SUMMARY="yes -lglibc (inotify)" - fi - elif test "${with_file_notification}" = "inotify"; then + with_file_notification=inotify + fi + fi + if test "${with_file_notification}" = "inotify" && \ + test -z "${NOTIFY_OBJ}"; then AC_MSG_ERROR([File notification `inotify' requested but requirements not found.]) - fi + fi fi fi dnl ${with_file_notification} != no ------------------------------------------------------------ revno: 113399 committer: Dmitry Gutov branch nick: trunk timestamp: Sat 2013-07-13 00:28:53 +0400 message: * lisp/progmodes/ruby-mode.el (ruby-percent-literals-beg-re): (ruby-syntax-expansion-allowed-p): Support array of symbols, for Ruby 2.0. (ruby-font-lock-keywords): Distinguish calls to functions with module-like names from module references. Highlight character literals. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 18:19:10 +0000 +++ lisp/ChangeLog 2013-07-12 20:28:53 +0000 @@ -1,3 +1,12 @@ +2013-07-12 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-percent-literals-beg-re): + (ruby-syntax-expansion-allowed-p): Support array of symbols, for + Ruby 2.0. + (ruby-font-lock-keywords): Distinguish calls to functions with + module-like names from module references. Highlight character + literals. + 2013-07-12 Sergio Durigan Junior (tiny change) * progmodes/gdb-mi.el (gdb-strip-string-backslash): New function. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-07-09 01:17:48 +0000 +++ lisp/progmodes/ruby-mode.el 2013-07-12 20:28:53 +0000 @@ -1351,7 +1351,7 @@ (progn (eval-and-compile (defconst ruby-percent-literal-beg-re - "\\(%\\)[qQrswWx]?\\([[:punct:]]\\)" + "\\(%\\)[qQrswWxIi]?\\([[:punct:]]\\)" "Regexp to match the beginning of percent literal.") (defconst ruby-syntax-methods-before-regexp @@ -1387,7 +1387,7 @@ (funcall (syntax-propertize-rules ;; $' $" $` .... are variables. - ;; ?' ?" ?` are ascii codes. + ;; ?' ?" ?` are character literals (one-char strings in 1.9+). ("\\([?$]\\)[#\"'`]" (1 (unless (save-excursion ;; Not within a string. @@ -1518,7 +1518,7 @@ (save-match-data (save-excursion (goto-char (nth 8 parse-state)) - (looking-at "%\\(?:[QWrx]\\|\\W\\)"))))))) + (looking-at "%\\(?:[QWrxI]\\|\\W\\)"))))))) (defun ruby-syntax-propertize-expansions (start end) (save-excursion @@ -1848,8 +1848,11 @@ '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; constants - '("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" - 1 font-lock-type-face) + '("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)\\(?:\\_>[^\(]\\|::\\|\\'\\)" + 1 (progn + (when (eq ?: (char-before)) + (forward-char -2)) + font-lock-type-face)) '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion '(ruby-match-expression-expansion @@ -1857,6 +1860,9 @@ ;; negation char '("[^[:alnum:]_]\\(!\\)[^=]" 1 font-lock-negation-char-face) + ;; character literals + ;; FIXME: Support longer escape sequences. + '("\\?\\\\?\\S " 0 font-lock-string-face) ) "Additional expressions to highlight in Ruby mode.") ------------------------------------------------------------ revno: 113398 fixes bug: http://debbugs.gnu.org/14847 author: Sergio Durigan Junior committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-12 21:19:10 +0300 message: Fix last lisp/ChangeLog entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 18:17:17 +0000 +++ lisp/ChangeLog 2013-07-12 18:19:10 +0000 @@ -1,7 +1,7 @@ 2013-07-12 Sergio Durigan Junior (tiny change) * progmodes/gdb-mi.el (gdb-strip-string-backslash): New function. - (gdb-send): Handle continued commands. + (gdb-send): Handle continued commands. (Bug#14847) * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. (Bug#14842) ------------------------------------------------------------ revno: 113397 fixes bug: http://debbugs.gnu.org/14847 author: Sergio Durigan Junior committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-12 21:17:17 +0300 message: Fix bug #14847 with continued GDB command lines in gdb-mi.el. lisp/progmodes/gdb-mi.el (gdb-strip-string-backslash): New function. (gdb-send): Handle continued commands. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 11:21:01 +0000 +++ lisp/ChangeLog 2013-07-12 18:17:17 +0000 @@ -1,3 +1,11 @@ +2013-07-12 Sergio Durigan Junior (tiny change) + + * progmodes/gdb-mi.el (gdb-strip-string-backslash): New function. + (gdb-send): Handle continued commands. + + * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. + (Bug#14842) + 2013-07-12 Juanma Barranquero * desktop.el (desktop--v2s): Remove unused local variable. @@ -9,11 +17,6 @@ * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. -2013-07-12 Eli Zaretskii - - * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. - (Bug#14842) - 2013-07-12 Glenn Morris * doc-view.el: Require cl-lib at runtime too. === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2013-06-22 00:35:51 +0000 +++ lisp/progmodes/gdb-mi.el 2013-07-12 18:17:17 +0000 @@ -1759,6 +1759,9 @@ As long as GDB is in the recursive reading loop, it does not expect commands to be prefixed by \"-interpreter-exec console\".") +(defun gdb-strip-string-backslash (string) + (replace-regexp-in-string "\\\\$" "" string)) + (defun gdb-send (proc string) "A comint send filter for gdb." (with-current-buffer gud-comint-buffer @@ -1766,10 +1769,15 @@ (remove-text-properties (point-min) (point-max) '(face)))) ;; mimic key to repeat previous command in GDB (if (not (string= "" string)) - (setq gdb-last-command string) - (if gdb-last-command (setq string gdb-last-command))) - (if (or (string-match "^-" string) - (> gdb-control-level 0)) + (if gdb-continuation + (setq gdb-last-command (concat gdb-continuation + (gdb-strip-string-backslash string) + " ")) + (setq gdb-last-command (gdb-strip-string-backslash string))) + (if gdb-last-command (setq string gdb-last-command)) + (setq gdb-continuation nil)) + (if (and (not gdb-continuation) (or (string-match "^-" string) + (> gdb-control-level 0))) ;; Either MI command or we are feeding GDB's recursive reading loop. (progn (setq gdb-first-done-or-error t) @@ -1779,10 +1787,13 @@ (setq gdb-control-level (1- gdb-control-level)))) ;; CLI command (if (string-match "\\\\$" string) - (setq gdb-continuation (concat gdb-continuation string "\n")) + (setq gdb-continuation + (concat gdb-continuation (gdb-strip-string-backslash + string) + " ")) (setq gdb-first-done-or-error t) (let ((to-send (concat "-interpreter-exec console " - (gdb-mi-quote string) + (gdb-mi-quote (concat gdb-continuation string " ")) "\n"))) (if gdb-enable-debug (push (cons 'mi-send to-send) gdb-debug-log)) ------------------------------------------------------------ revno: 113396 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-12 13:36:42 -0400 message: * configure.ac: If with-file-notification=yes, if gfile not found, go on to try inotify (not on MS Windows or Nextstep). * etc/NEWS: Copyedits. diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-12 02:03:47 +0000 +++ ChangeLog 2013-07-12 17:36:42 +0000 @@ -1,3 +1,8 @@ +2013-07-12 Glenn Morris + + * configure.ac: If with-file-notification=yes, if gfile not found, + go on to try inotify (not on MS Windows or Nextstep). + 2013-07-12 Paul Eggert Fix races with threads and file descriptors. === modified file 'configure.ac' --- configure.ac 2013-07-12 02:03:47 +0000 +++ configure.ac 2013-07-12 17:36:42 +0000 @@ -211,7 +211,8 @@ w | w3 | w32 ) val=w32 ;; * ) AC_MSG_ERROR([`--with-file-notification=$withval' is invalid; this option's value should be `yes', `no', `gfile', `inotify' or `w32'. -`yes' is a synonym for `w32' on MS-Windows, and for `gfile' otherwise.]) +`yes' is a synonym for `w32' on MS-Windows, for `no' on Nextstep, +otherwise for the first of `gfile' or `inotify' that is usable.]) ;; esac with_file_notification=$val @@ -2312,51 +2313,65 @@ NOTIFY_OBJ= NOTIFY_SUMMARY=no -dnl Set defaults of $with_file_notification. -if test "${with_file_notification}" = "yes"; then - if test "${opsys}" = "mingw32"; then - with_file_notification=w32 - else - if test "${with_ns}" != yes; then - with_file_notification=gfile - fi - fi -fi - -dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED -dnl has been added in glib 2.24. It has been tested under -dnl GNU/Linux only. We take precedence over inotify, but this makes -dnl only sense when glib has been compiled with inotify support. How -dnl to check? -if test "${with_file_notification}" = "gfile"; then - PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no) - if test "$HAVE_GFILENOTIFY" = "yes"; then - AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) - NOTIFY_OBJ=gfilenotify.o - NOTIFY_SUMMARY="yes -lgio (gfile)" - fi -fi -dnl inotify is only available on GNU/Linux. -if test "${with_file_notification}" = "inotify"; then - AC_CHECK_HEADER(sys/inotify.h) - if test "$ac_cv_header_sys_inotify_h" = yes ; then - AC_CHECK_FUNC(inotify_init1) - if test "$ac_cv_func_inotify_init1" = yes; then - AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.]) - NOTIFY_OBJ=inotify.o - NOTIFY_SUMMARY="yes -lglibc (inotify)" - fi - fi -fi -dnl MS Windows native file monitor is available for mingw32 only. -if test "${with_file_notification}" = "w32"; then - AC_CHECK_HEADER(windows.h) - if test "$ac_cv_header_windows_h" = yes ; then - AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.]) - NOTIFY_OBJ=w32notify.o - NOTIFY_SUMMARY="yes (w32)" - fi -fi +dnl FIXME? Don't auto-detect on NS, but do allow someone to specify +dnl a particular library. This doesn't make much sense? +if test "${with_ns}" = yes && test ${with_file_notification} = yes; then + with_file_notification=no +fi + +if test "${with_file_notification}" != "no"; then + + dnl MS Windows native file monitor is available for mingw32 only. + if test "${with_file_notification}" = "w32" || \ + ( test "${opsys}" = "mingw32" && \ + test "${with_file_notification}" = "yes" ); then + AC_CHECK_HEADER(windows.h) + if test "$ac_cv_header_windows_h" = yes ; then + AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.]) + NOTIFY_OBJ=w32notify.o + NOTIFY_SUMMARY="yes (w32)" + elif test "${with_file_notification}" = "w32"; then + AC_MSG_ERROR([File notification `w32' requested but requirements not found.]) + elif test "${opsys}" = "mingw32"; then + dnl Do not try any further. + with_file_notification=no + fi + fi + + dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED + dnl has been added in glib 2.24. It has been tested under + dnl GNU/Linux only. We take precedence over inotify, but this makes + dnl only sense when glib has been compiled with inotify support. How + dnl to check? + if test "${with_file_notification}" = "gfile" || \ + test "${with_file_notification}" = "yes"; then + PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no) + if test "$HAVE_GFILENOTIFY" = "yes"; then + AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) + NOTIFY_OBJ=gfilenotify.o + NOTIFY_SUMMARY="yes -lgio (gfile)" + elif test "${with_file_notification}" = "gfile"; then + AC_MSG_ERROR([File notification `gfile' requested but requirements not found.]) + fi + fi + + dnl inotify is only available on GNU/Linux. + if test "${with_file_notification}" = "inotify" || \ + test "${with_file_notification}" = "yes"; then + AC_CHECK_HEADER(sys/inotify.h) + if test "$ac_cv_header_sys_inotify_h" = yes ; then + AC_CHECK_FUNC(inotify_init1) + if test "$ac_cv_func_inotify_init1" = yes; then + AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.]) + NOTIFY_OBJ=inotify.o + NOTIFY_SUMMARY="yes -lglibc (inotify)" + fi + elif test "${with_file_notification}" = "inotify"; then + AC_MSG_ERROR([File notification `inotify' requested but requirements not found.]) + fi + fi +fi dnl ${with_file_notification} != no + if test -n "$NOTIFY_OBJ"; then AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.]) fi === modified file 'etc/NEWS' --- etc/NEWS 2013-07-10 06:26:23 +0000 +++ etc/NEWS 2013-07-12 17:36:42 +0000 @@ -29,34 +29,15 @@ configure option `--disable-acl'. ** Emacs can be compiled with file notification support. -The configure option `--with-file-notification=LIB' enables file -notification support in Emacs. This option's value should be `yes', -`no', `gfile', `inotify' or `w32'. `yes' is a synonym for `w32' on -MS-Windows, and for `gfile' otherwise. The default value is `yes'. +This happens by default if a suitable system library is found at +build time. To prevent this, use the configure option +`--with-file-notification-no'. See below for file-notify features. +FIXME? This feature is not available for the Nextstep port. (?) ** The configure option --with-crt-dir has been removed. It is no longer needed, as the crt*.o files are no longer linked specially. -** Emacs for MS-Windows can now be built by running the configure script -using the MSYS environment and MinGW development tools. -This is from now on the preferred method of building Emacs on -MS-Windows. The Windows-specific configure.bat and makefile.w32-in -files are deprecated. See the file nt/INSTALL.MSYS for detailed -instructions. - -Using the Posix configure script and Makefile's also means a change in -the directory structure of the Emacs installation on Windows. It is -now the same as on GNU and Unix systems. In particular, the auxiliary -programs, such as cmdproxy.exe and hexl.exe, are in -libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs -version), version-independent site-lisp is in share/emacs/site-lisp, -version-specific Lisp files are in share/emacs/VERSION/lisp and in -share/emacs/VERSION/site-lisp, Info docs are in share/info, and data -files are in share/emacs/VERSION/etc. (Emacs knows about all these -directories and will find the files in there automatically; there's no -need to set any variables due to this change.) - ** Directories passed to configure option `--enable-locallisppath' are no longer created during installation. @@ -662,6 +643,25 @@ * Changes in Emacs 24.4 on Non-Free Operating Systems +** Emacs for MS-Windows can now be built by running the configure script +using the MSYS environment and MinGW development tools. +This is from now on the preferred method of building Emacs on +MS-Windows. The Windows-specific configure.bat and makefile.w32-in +files are deprecated. See the file nt/INSTALL.MSYS for detailed +instructions. + +Using the Posix configure script and Makefile's also means a change in +the directory structure of the Emacs installation on Windows. It is +now the same as on GNU and Unix systems. In particular, the auxiliary +programs, such as cmdproxy.exe and hexl.exe, are in +libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs +version), version-independent site-lisp is in share/emacs/site-lisp, +version-specific Lisp files are in share/emacs/VERSION/lisp and in +share/emacs/VERSION/site-lisp, Info docs are in share/info, and data +files are in share/emacs/VERSION/etc. (Emacs knows about all these +directories and will find the files in there automatically; there's no +need to set any variables due to this change.) + +++ ** The "generate a backtrace on fatal error" feature now works on MS Windows. The backtrace is written to the 'emacs_backtrace.txt' file in the ------------------------------------------------------------ revno: 113395 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-07-12 10:30:48 -0700 message: Clean up errno reporting and fix some errno-reporting bugs. * callproc.c (Fcall_process): * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region): * process.c (create_process, Fmake_network_process): * unexaix.c (report_error): * unexcoff.c (report_error): Be more careful about reporting the errno of failed operations. The code previously reported the wrong errno sometimes. Also, prefer report_file_errno to setting errno + report_file_error. (Fcall_process): Look at openp return value rather than at path, as that's a bit faster and clearer when there's a numeric predicate. * fileio.c (report_file_errno): New function, with most of the old contents of report_file_error. (report_file_error): Use it. (Ffile_exists_p, Ffile_accessible_directory_p): Set errno to 0 when it is junk. * fileio.c (Faccess_file): * image.c (x_create_bitmap_from_file): Use faccessat rather than opening the file, to avoid the hassle of having a file descriptor open. * lisp.h (report_file_errno): New decl. * lread.c (Flocate_file_internal): File descriptor 0 is valid, too. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-12 14:31:42 +0000 +++ src/ChangeLog 2013-07-12 17:30:48 +0000 @@ -1,5 +1,28 @@ 2013-07-12 Paul Eggert + Clean up errno reporting and fix some errno-reporting bugs. + * callproc.c (Fcall_process): + * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region): + * process.c (create_process, Fmake_network_process): + * unexaix.c (report_error): + * unexcoff.c (report_error): + Be more careful about reporting the errno of failed operations. + The code previously reported the wrong errno sometimes. + Also, prefer report_file_errno to setting errno + report_file_error. + (Fcall_process): Look at openp return value rather than at path, + as that's a bit faster and clearer when there's a numeric predicate. + * fileio.c (report_file_errno): New function, with most of the + old contents of report_file_error. + (report_file_error): Use it. + (Ffile_exists_p, Ffile_accessible_directory_p): + Set errno to 0 when it is junk. + * fileio.c (Faccess_file): + * image.c (x_create_bitmap_from_file): + Use faccessat rather than opening the file, to avoid the hassle of + having a file descriptor open. + * lisp.h (report_file_errno): New decl. + * lread.c (Flocate_file_internal): File descriptor 0 is valid, too. + Minor EBADF fixes. * process.c (create_process, wait_reading_process_output) [AIX]: Remove obsolete SIGHUP-related code, as Emacs no longer disables === modified file 'src/callproc.c' --- src/callproc.c 2013-07-12 02:03:47 +0000 +++ src/callproc.c 2013-07-12 17:30:48 +0000 @@ -419,9 +419,10 @@ default_output_mode); if (fd_output < 0) { + int open_errno = errno; output_file = DECODE_FILE (output_file); - report_file_error ("Opening process output file", - Fcons (output_file, Qnil)); + report_file_errno ("Opening process output file", + Fcons (output_file, Qnil), open_errno); } if (STRINGP (error_file) || NILP (error_file)) output_to_buffer = 0; @@ -430,18 +431,19 @@ /* Search for program; barf if not found. */ { struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; + int ok; GCPRO4 (infile, buffer, current_dir, error_file); - openp (Vexec_path, args[0], Vexec_suffixes, &path, make_number (X_OK)); + ok = openp (Vexec_path, args[0], Vexec_suffixes, &path, make_number (X_OK)); UNGCPRO; + if (ok < 0) + { + int openp_errno = errno; + emacs_close (filefd); + report_file_errno ("Searching for program", + Fcons (args[0], Qnil), openp_errno); + } } - if (NILP (path)) - { - int openp_errno = errno; - emacs_close (filefd); - errno = openp_errno; - report_file_error ("Searching for program", Fcons (args[0], Qnil)); - } /* If program file name starts with /: for quoting a magic name, discard that. */ @@ -499,11 +501,13 @@ mktemp (tempfile); outfilefd = emacs_open (tempfile, O_WRONLY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE); - if (outfilefd < 0) { - emacs_close (filefd); - report_file_error ("Opening process output file", - Fcons (build_string (tempfile), Qnil)); - } + if (outfilefd < 0) + { + int open_errno = errno; + emacs_close (filefd); + report_file_errno ("Opening process output file", + Fcons (build_string (tempfile), Qnil), open_errno); + } } else outfilefd = fd_output; @@ -524,8 +528,7 @@ { int pipe_errno = errno; emacs_close (filefd); - errno = pipe_errno; - report_file_error ("Creating process pipe", Qnil); + report_file_errno ("Creating process pipe", Qnil, pipe_errno); } fd0 = fd[0]; fd1 = fd[1]; @@ -547,6 +550,7 @@ if (fd_error < 0) { + int open_errno = errno; emacs_close (filefd); if (fd0 != filefd) emacs_close (fd0); @@ -559,7 +563,8 @@ error_file = build_string (NULL_DEVICE); else if (STRINGP (error_file)) error_file = DECODE_FILE (error_file); - report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil)); + report_file_errno ("Cannot redirect stderr", + Fcons (error_file, Qnil), open_errno); } #ifdef MSDOS /* MW, July 1993 */ @@ -587,10 +592,12 @@ fd0 = emacs_open (tempfile, O_RDONLY | O_BINARY, 0); if (fd0 < 0) { + int open_errno = errno; unlink (tempfile); emacs_close (filefd); - report_file_error ("Cannot re-open temporary file", - Fcons (build_string (tempfile), Qnil)); + report_file_errno ("Cannot re-open temporary file", + Fcons (build_string (tempfile), Qnil), + open_errno); } } else @@ -708,10 +715,7 @@ } if (pid < 0) - { - errno = child_errno; - report_file_error ("Doing vfork", Qnil); - } + report_file_errno ("Doing vfork", Qnil, child_errno); if (INTEGERP (buffer)) return unbind_to (count, Qnil); @@ -1039,7 +1043,7 @@ #if defined HAVE_MKOSTEMP || defined HAVE_MKSTEMP { - int fd; + int fd, open_errno; block_input (); # ifdef HAVE_MKOSTEMP @@ -1047,23 +1051,19 @@ # else fd = mkstemp (tempfile); # endif + open_errno = errno; unblock_input (); - if (fd == -1) - report_file_error ("Failed to open temporary file", - Fcons (build_string (tempfile), Qnil)); - else - emacs_close (fd); + if (fd < 0) + report_file_errno ("Failed to open temporary file", + Fcons (build_string (tempfile), Qnil), open_errno); + emacs_close (fd); } #else - errno = 0; + errno = EEXIST; mktemp (tempfile); if (!*tempfile) - { - if (!errno) - errno = EEXIST; - report_file_error ("Failed to open temporary file using pattern", - Fcons (pattern, Qnil)); - } + report_file_error ("Failed to open temporary file using pattern", + Fcons (pattern, Qnil)); #endif filename_string = build_string (tempfile); === modified file 'src/fileio.c' --- src/fileio.c 2013-07-10 06:26:23 +0000 +++ src/fileio.c 2013-07-12 17:30:48 +0000 @@ -159,11 +159,13 @@ struct coding_system *); +/* Signal a file-access failure. STRING describes the failure, + DATA the file that was involved, and ERRORNO the errno value. */ + void -report_file_error (const char *string, Lisp_Object data) +report_file_errno (char const *string, Lisp_Object data, int errorno) { Lisp_Object errstring; - int errorno = errno; char *str; synchronize_system_messages_locale (); @@ -196,6 +198,12 @@ } } +void +report_file_error (char const *string, Lisp_Object data) +{ + report_file_errno (string, data, errno); +} + Lisp_Object close_file_unwind (Lisp_Object fd) { @@ -2019,11 +2027,8 @@ { /* CopyFile doesn't set errno when it fails. By far the most "popular" reason is that the target is read-only. */ - if (GetLastError () == 5) - errno = EACCES; - else - errno = EPERM; - report_file_error ("Copying file", Fcons (file, Fcons (newname, Qnil))); + report_file_errno ("Copying file", Fcons (file, Fcons (newname, Qnil)), + GetLastError () == 5 ? EACCES : EPERM); } /* CopyFile retains the timestamp by default. */ else if (NILP (keep_time)) @@ -2084,36 +2089,25 @@ if (out_st.st_mode != 0 && st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino) - { - errno = 0; - report_file_error ("Input and output files are the same", - Fcons (file, Fcons (newname, Qnil))); - } + report_file_errno ("Input and output files are the same", + Fcons (file, Fcons (newname, Qnil)), 0); /* We can copy only regular files. */ if (!S_ISREG (st.st_mode)) - { - /* Get a better looking error message. */ - errno = S_ISDIR (st.st_mode) ? EISDIR : EINVAL; - report_file_error ("Non-regular file", Fcons (file, Qnil)); - } + report_file_errno ("Non-regular file", Fcons (file, Qnil), + S_ISDIR (st.st_mode) ? EISDIR : EINVAL); -#ifdef MSDOS - /* System's default file type was set to binary by _fmode in emacs.c. */ - ofd = emacs_open (SDATA (encoded_newname), - O_WRONLY | O_TRUNC | O_CREAT - | (NILP (ok_if_already_exists) ? O_EXCL : 0), - S_IREAD | S_IWRITE); -#else /* not MSDOS */ { - mode_t new_mask = !NILP (preserve_uid_gid) ? 0600 : 0666; - new_mask &= st.st_mode; +#ifndef MSDOS + int new_mask = st.st_mode & (!NILP (preserve_uid_gid) ? 0600 : 0666); +#else + int new_mask = S_IREAD | S_IWRITE; +#endif ofd = emacs_open (SSDATA (encoded_newname), (O_WRONLY | O_TRUNC | O_CREAT | (NILP (ok_if_already_exists) ? O_EXCL : 0)), new_mask); } -#endif /* not MSDOS */ if (ofd < 0) report_file_error ("Opening output file", Fcons (newname, Qnil)); @@ -2609,7 +2603,11 @@ call the corresponding file handler. */ handler = Ffind_file_name_handler (absname, Qfile_exists_p); if (!NILP (handler)) - return call2 (handler, Qfile_exists_p, absname); + { + Lisp_Object result = call2 (handler, Qfile_exists_p, absname); + errno = 0; + return result; + } absname = ENCODE_FILE (absname); @@ -2706,7 +2704,6 @@ (Lisp_Object filename, Lisp_Object string) { Lisp_Object handler, encoded_filename, absname; - int fd; CHECK_STRING (filename); absname = Fexpand_file_name (filename, Qnil); @@ -2721,10 +2718,8 @@ encoded_filename = ENCODE_FILE (absname); - fd = emacs_open (SSDATA (encoded_filename), O_RDONLY, 0); - if (fd < 0) + if (faccessat (AT_FDCWD, SSDATA (encoded_filename), R_OK, AT_EACCESS) != 0) report_file_error (SSDATA (string), Fcons (filename, Qnil)); - emacs_close (fd); return Qnil; } @@ -2833,7 +2828,11 @@ call the corresponding file handler. */ handler = Ffind_file_name_handler (absname, Qfile_accessible_directory_p); if (!NILP (handler)) - return call2 (handler, Qfile_accessible_directory_p, absname); + { + Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname); + errno = 0; + return r; + } absname = ENCODE_FILE (absname); return file_accessible_directory_p (SSDATA (absname)) ? Qt : Qnil; @@ -4575,8 +4574,8 @@ && EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS) { /* If visiting nonexistent file, return nil. */ - errno = save_errno; - report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); + report_file_errno ("Opening input file", Fcons (orig_filename, Qnil), + save_errno); } if (read_quit) @@ -4897,13 +4896,13 @@ if (desc < 0) { + int open_errno = errno; #ifdef CLASH_DETECTION - save_errno = errno; if (!auto_saving) unlock_file (lockname); - errno = save_errno; #endif /* CLASH_DETECTION */ UNGCPRO; - report_file_error ("Opening output file", Fcons (filename, Qnil)); + report_file_errno ("Opening output file", Fcons (filename, Qnil), + open_errno); } record_unwind_protect (close_file_unwind, make_number (desc)); @@ -4913,13 +4912,13 @@ off_t ret = lseek (desc, offset, SEEK_SET); if (ret < 0) { + int lseek_errno = errno; #ifdef CLASH_DETECTION - save_errno = errno; if (!auto_saving) unlock_file (lockname); - errno = save_errno; #endif /* CLASH_DETECTION */ UNGCPRO; - report_file_error ("Lseek error", Fcons (filename, Qnil)); + report_file_errno ("Lseek error", Fcons (filename, Qnil), + lseek_errno); } } === modified file 'src/image.c' --- src/image.c 2013-07-12 09:02:30 +0000 +++ src/image.c 2013-07-12 17:30:48 +0000 @@ -316,7 +316,6 @@ int xhot, yhot, result; ptrdiff_t id; Lisp_Object found; - int fd; char *filename; /* Look for an existing bitmap with the same name. */ @@ -332,10 +331,8 @@ } /* Search bitmap-file-path for the file, if appropriate. */ - fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil); - if (fd < 0) + if (openp (Vx_bitmap_file_path, file, Qnil, &found, make_number (R_OK)) < 0) return -1; - emacs_close (fd); filename = SSDATA (found); === modified file 'src/lisp.h' --- src/lisp.h 2013-07-10 23:23:57 +0000 +++ src/lisp.h 2013-07-12 17:30:48 +0000 @@ -3822,6 +3822,7 @@ EXFUN (Fread_file_name, 6); /* Not a normal DEFUN. */ extern Lisp_Object close_file_unwind (Lisp_Object); extern Lisp_Object restore_point_unwind (Lisp_Object); +extern _Noreturn void report_file_errno (const char *, Lisp_Object, int); extern _Noreturn void report_file_error (const char *, Lisp_Object); extern bool internal_delete_file (Lisp_Object); extern Lisp_Object emacs_readlinkat (int, const char *); === modified file 'src/lread.c' --- src/lread.c 2013-07-12 02:03:47 +0000 +++ src/lread.c 2013-07-12 17:30:48 +0000 @@ -1412,7 +1412,7 @@ { Lisp_Object file; int fd = openp (path, filename, suffixes, &file, predicate); - if (NILP (predicate) && fd > 0) + if (NILP (predicate) && fd >= 0) emacs_close (fd); return file; } === modified file 'src/process.c' --- src/process.c 2013-07-12 14:31:42 +0000 +++ src/process.c 2013-07-12 17:30:48 +0000 @@ -1616,6 +1616,7 @@ { int inchannel, outchannel; pid_t pid; + int vfork_errno; int sv[2]; #ifndef WINDOWSNT int wait_child_setup[2]; @@ -1656,9 +1657,10 @@ forkout = sv[1]; if (pipe2 (sv, O_CLOEXEC) != 0) { + int pipe_errno = errno; emacs_close (inchannel); emacs_close (forkout); - report_file_error ("Creating pipe", Qnil); + report_file_errno ("Creating pipe", Qnil, pipe_errno); } outchannel = sv[1]; forkin = sv[0]; @@ -1837,6 +1839,7 @@ /* Back in the parent process. */ + vfork_errno = errno; XPROCESS (process)->pid = pid; if (pid >= 0) XPROCESS (process)->alive = 1; @@ -1851,6 +1854,7 @@ emacs_close (forkin); if (forkin != forkout && forkout >= 0) emacs_close (forkout); + report_file_errno ("Doing vfork", Qnil, vfork_errno); } else { @@ -1896,10 +1900,6 @@ } #endif } - - /* Now generate the error if vfork failed. */ - if (pid < 0) - report_file_error ("Doing vfork", Qnil); } void @@ -3265,12 +3265,11 @@ len = sizeof xerrno; eassert (FD_ISSET (s, &fdset)); - if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) == -1) + if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) < 0) report_file_error ("getsockopt failed", Qnil); if (xerrno) - errno = xerrno, report_file_error ("error during connect", Qnil); - else - break; + report_file_errno ("error during connect", Qnil, xerrno); + break; } #endif /* !WINDOWSNT */ @@ -3354,11 +3353,10 @@ if (is_non_blocking_client) return Qnil; - errno = xerrno; - if (is_server) - report_file_error ("make server process failed", contact); - else - report_file_error ("make client process failed", contact); + report_file_errno ((is_server + ? "make server process failed" + : "make client process failed"), + contact, xerrno); } inch = s; === modified file 'src/unexaix.c' --- src/unexaix.c 2013-07-12 02:03:47 +0000 +++ src/unexaix.c 2013-07-12 17:30:48 +0000 @@ -94,13 +94,10 @@ static _Noreturn void report_error (const char *file, int fd) { + int err = errno; if (fd) - { - int failed_errno = errno; - emacs_close (fd); - errno = failed_errno; - } - report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); + emacs_close (fd); + report_file_errno ("Cannot unexec", Fcons (build_string (file), Qnil), err); } #define ERROR0(msg) report_error_1 (new, msg) === modified file 'src/unexcoff.c' --- src/unexcoff.c 2013-07-12 02:03:47 +0000 +++ src/unexcoff.c 2013-07-12 17:30:48 +0000 @@ -127,9 +127,10 @@ static void report_error (const char *file, int fd) { + int err = errno; if (fd) emacs_close (fd); - report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); + report_file_errno ("Cannot unexec", Fcons (build_string (file), Qnil), err); } #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 ------------------------------------------------------------ revno: 113394 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-07-12 07:31:42 -0700 message: Minor EBADF fixes. * process.c (create_process, wait_reading_process_output) [AIX]: Remove obsolete SIGHUP-related code, as Emacs no longer disables SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in a multithreaded environment anyway). * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-12 09:02:30 +0000 +++ src/ChangeLog 2013-07-12 14:31:42 +0000 @@ -1,3 +1,12 @@ +2013-07-12 Paul Eggert + + Minor EBADF fixes. + * process.c (create_process, wait_reading_process_output) [AIX]: + Remove obsolete SIGHUP-related code, as Emacs no longer disables + SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in + a multithreaded environment anyway). + * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1). + 2013-07-12 Andreas Schwab * image.c (x_find_image_file): Don't close a remote file handle. === modified file 'src/keyboard.c' --- src/keyboard.c 2013-07-06 02:40:50 +0000 +++ src/keyboard.c 2013-07-12 14:31:42 +0000 @@ -7008,7 +7008,7 @@ { nread = emacs_read (fileno (tty->input), (char *) cbuf, n_to_read); /* POSIX infers that processes which are not in the session leader's - process group won't get SIGHUP's at logout time. BSDI adheres to + process group won't get SIGHUPs at logout time. BSDI adheres to this part standard and returns -1 from read (0) with errno==EIO when the control tty is taken away. Jeffrey Honig says this is generally safe. */ === modified file 'src/process.c' --- src/process.c 2013-07-12 02:03:47 +0000 +++ src/process.c 2013-07-12 14:31:42 +0000 @@ -1812,12 +1812,6 @@ SETUP_SLAVE_PTY; } #endif /* SETUP_SLAVE_PTY */ -#ifdef AIX - /* On AIX, we've disabled SIGHUP above once we start a child on a pty. - Now reenable it in the child, so it will die when we want it to. */ - if (pty_flag) - signal (SIGHUP, SIG_DFL); -#endif #endif /* HAVE_PTYS */ signal (SIGINT, SIG_DFL); @@ -4632,20 +4626,7 @@ if (xerrno == EINTR) no_avail = 1; else if (xerrno == EBADF) - { -#ifdef AIX - /* AIX doesn't handle PTY closure the same way BSD does. On AIX, - the child's closure of the pts gives the parent a SIGHUP, and - the ptc file descriptor is automatically closed, - yielding EBADF here or at select() call above. - So, SIGHUP is ignored (see def of PTY_TTY_NAME_SPRINTF - in m/ibmrt-aix.h), and here we just ignore the select error. - Cleanup occurs c/o status_notify after SIGCHLD. */ - no_avail = 1; /* Cannot depend on values returned */ -#else - emacs_abort (); -#endif - } + emacs_abort (); else error ("select error: %s", emacs_strerror (xerrno)); } === modified file 'src/sysdep.c' --- src/sysdep.c 2013-07-12 02:03:47 +0000 +++ src/sysdep.c 2013-07-12 14:31:42 +0000 @@ -2237,8 +2237,8 @@ arriving. FD is always closed when this function returns, even when it returns -1. - Do not call this function if FD might already be closed, as that - might close an innocent victim opened by some other thread. */ + Do not call this function if FD is nonnegative and might already be closed, + as that might close an innocent victim opened by some other thread. */ int emacs_close (int fd) @@ -2250,7 +2250,7 @@ return r; if (!POSIX_CLOSE_RESTART || errno != EINTR) { - eassert (errno != EBADF); + eassert (errno != EBADF || fd < 0); return errno == EINPROGRESS ? 0 : r; } } ------------------------------------------------------------ revno: 113393 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2013-07-12 13:21:01 +0200 message: lisp/desktop.el: Minor fixes. (desktop--v2s): Remove unused local variable. (desktop-save-buffer): Make defvar-local; adjust docstring. (desktop-auto-save-timeout, desktop-owner): Use ignore-errors. (desktop-clear, desktop-save-buffer-p): Use string-match-p. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 09:33:09 +0000 +++ lisp/ChangeLog 2013-07-12 11:21:01 +0000 @@ -1,3 +1,10 @@ +2013-07-12 Juanma Barranquero + + * desktop.el (desktop--v2s): Remove unused local variable. + (desktop-save-buffer): Make defvar-local; adjust docstring. + (desktop-auto-save-timeout, desktop-owner): Use ignore-errors. + (desktop-clear, desktop-save-buffer-p): Use string-match-p. + 2013-07-12 Andreas Schwab * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-01 03:29:46 +0000 +++ lisp/desktop.el 2013-07-12 11:21:01 +0000 @@ -196,9 +196,7 @@ (integer :tag "Seconds")) :set (lambda (symbol value) (set-default symbol value) - (condition-case nil - (desktop-auto-save-set-timer) - (error nil))) + (ignore-errors (desktop-auto-save-set-timer))) :group 'desktop :version "24.4") @@ -416,9 +414,8 @@ :version "22.1") ;;;###autoload -(defvar desktop-save-buffer nil +(defvar-local desktop-save-buffer nil "When non-nil, save buffer status in desktop file. -This variable becomes buffer local when set. If the value is a function, it is called by `desktop-save' with argument DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop @@ -430,7 +427,6 @@ Later, when `desktop-read' evaluates the desktop file, auxiliary information is passed as the argument DESKTOP-BUFFER-MISC to functions in `desktop-buffer-mode-handlers'.") -(make-variable-buffer-local 'desktop-save-buffer) (make-obsolete-variable 'desktop-buffer-modes-to-save 'desktop-save-buffer "22.1") (make-obsolete-variable 'desktop-buffer-misc-functions @@ -582,15 +578,15 @@ "Return the PID of the Emacs process that owns the desktop file in DIRNAME. Return nil if no desktop file found or no Emacs process is using it. DIRNAME omitted or nil means use `desktop-dirname'." - (let (owner) - (and (file-exists-p (desktop-full-lock-name dirname)) - (condition-case nil - (with-temp-buffer - (insert-file-contents-literally (desktop-full-lock-name dirname)) - (goto-char (point-min)) - (setq owner (read (current-buffer))) - (integerp owner)) - (error nil)) + (let (owner + (file (desktop-full-lock-name dirname))) + (and (file-exists-p file) + (ignore-errors + (with-temp-buffer + (insert-file-contents-literally file) + (goto-char (point-min)) + (setq owner (read (current-buffer))) + (integerp owner))) owner))) (defun desktop-claim-lock (&optional dirname) @@ -636,7 +632,7 @@ (let ((bufname (buffer-name (car buffers)))) (or (null bufname) - (string-match preserve-regexp bufname) + (string-match-p preserve-regexp bufname) ;; Don't kill buffers made for internal purposes. (and (not (equal bufname "")) (eq (aref bufname 0) ?\s)) (kill-buffer (car buffers)))) @@ -758,8 +754,7 @@ ((consp value) (let ((p value) newlist - use-list* - anynil) + use-list*) (while (consp p) (let ((q.sexp (desktop--v2s (car p)))) (push q.sexp newlist)) @@ -841,17 +836,17 @@ dired-skip) (and (not (and (stringp desktop-buffers-not-to-save) (not filename) - (string-match desktop-buffers-not-to-save bufname))) + (string-match-p desktop-buffers-not-to-save bufname))) (not (memq mode desktop-modes-not-to-save)) ;; FIXME this is broken if desktop-files-not-to-save is nil. (or (and filename (stringp desktop-files-not-to-save) - (not (string-match desktop-files-not-to-save filename))) + (not (string-match-p desktop-files-not-to-save filename))) (and (memq mode '(dired-mode vc-dir-mode)) (with-current-buffer bufname (not (setq dired-skip - (string-match desktop-files-not-to-save - default-directory))))) + (string-match-p desktop-files-not-to-save + default-directory))))) (and (null filename) (null dired-skip) ; bug#5755 (with-current-buffer bufname desktop-save-buffer)))))) ------------------------------------------------------------ revno: 113392 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-12 06:17:37 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-07-10 10:17:38 +0000 +++ autogen/configure 2013-07-12 10:17:37 +0000 @@ -16436,7 +16436,7 @@ $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h if test "x$ac_cv_func_posix_openpt" = xyes; then $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)" >>confdefs.h ------------------------------------------------------------ revno: 113391 committer: Andreas Schwab branch nick: emacs timestamp: Fri 2013-07-12 11:33:10 +0200 message: Remove lisp/emacs-lisp/.gitignore diff: === removed file 'lisp/emacs-lisp/.gitignore' --- lisp/emacs-lisp/.gitignore 2011-01-15 23:16:57 +0000 +++ lisp/emacs-lisp/.gitignore 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -!*-loaddefs.el - ------------------------------------------------------------ revno: 113390 committer: Andreas Schwab branch nick: emacs timestamp: Fri 2013-07-12 11:33:09 +0200 message: * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 08:35:42 +0000 +++ lisp/ChangeLog 2013-07-12 09:33:09 +0000 @@ -1,3 +1,7 @@ +2013-07-12 Andreas Schwab + + * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. + 2013-07-12 Eli Zaretskii * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. === modified file 'lisp/emacs-lisp/map-ynp.el' --- lisp/emacs-lisp/map-ynp.el 2013-06-14 02:31:28 +0000 +++ lisp/emacs-lisp/map-ynp.el 2013-07-12 09:33:09 +0000 @@ -131,8 +131,9 @@ (unwind-protect (progn (if (stringp prompter) - (setq prompter (lambda (object) - (format prompter object)))) + (setq prompter (let ((prompter prompter)) + (lambda (object) + (format prompter object))))) (while (funcall next) (setq prompt (funcall prompter elt)) (cond ((stringp prompt) ------------------------------------------------------------ revno: 113389 committer: Andreas Schwab branch nick: emacs timestamp: Fri 2013-07-12 11:02:30 +0200 message: * image.c (x_find_image_file): Don't close a remote file handle. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-12 02:03:47 +0000 +++ src/ChangeLog 2013-07-12 09:02:30 +0000 @@ -1,3 +1,7 @@ +2013-07-12 Andreas Schwab + + * image.c (x_find_image_file): Don't close a remote file handle. + 2013-07-12 Paul Eggert Fix races with threads and file descriptors. === modified file 'src/image.c' --- src/image.c 2013-07-12 02:03:47 +0000 +++ src/image.c 2013-07-12 09:02:30 +0000 @@ -2260,7 +2260,8 @@ else { file_found = ENCODE_FILE (file_found); - emacs_close (fd); + if (fd != -2) + emacs_close (fd); } return file_found; ------------------------------------------------------------ revno: 113388 fixes bug: http://debbugs.gnu.org/14842 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-12 11:35:42 +0300 message: Minor followup to previous commit. lisp/simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 08:33:14 +0000 +++ lisp/ChangeLog 2013-07-12 08:35:42 +0000 @@ -1,6 +1,6 @@ 2013-07-12 Eli Zaretskii - * simple.el (next-line, previous-line): Document TRY-VSCROLL. + * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. (Bug#14842) 2013-07-12 Glenn Morris === modified file 'lisp/simple.el' --- lisp/simple.el 2013-07-12 08:33:14 +0000 +++ lisp/simple.el 2013-07-12 08:35:42 +0000 @@ -4606,6 +4606,8 @@ lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this function will not vscroll. +ARG defaults to 1. + If there is no character in the target line exactly under the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. @@ -4654,6 +4656,8 @@ lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this function will not vscroll. +ARG defaults to 1. + If there is no character in the target line exactly over the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. ------------------------------------------------------------ revno: 113387 fixes bug: http://debbugs.gnu.org/14842 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-12 11:33:14 +0300 message: Fix bug #14842 with doc strings of next-line and previous-line. lisp/simple.el (next-line, previous-line): Document TRY-VSCROLL. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-12 03:54:57 +0000 +++ lisp/ChangeLog 2013-07-12 08:33:14 +0000 @@ -1,3 +1,8 @@ +2013-07-12 Eli Zaretskii + + * simple.el (next-line, previous-line): Document TRY-VSCROLL. + (Bug#14842) + 2013-07-12 Glenn Morris * doc-view.el: Require cl-lib at runtime too. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-07-10 16:18:17 +0000 +++ lisp/simple.el 2013-07-12 08:33:14 +0000 @@ -4602,6 +4602,10 @@ (defun next-line (&optional arg try-vscroll) "Move cursor vertically down ARG lines. Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. +Non-interactively, use TRY-VSCROLL to control whether to vscroll tall +lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this +function will not vscroll. + If there is no character in the target line exactly under the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. @@ -4646,6 +4650,10 @@ (defun previous-line (&optional arg try-vscroll) "Move cursor vertically up ARG lines. Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. +Non-interactively, use TRY-VSCROLL to control whether to vscroll tall +lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this +function will not vscroll. + If there is no character in the target line exactly over the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. ------------------------------------------------------------ revno: 113386 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-07-11 23:45:04 -0700 message: * admin/admin.el (manual-style-string): Use non-abbreviated url. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-07-09 17:16:21 +0000 +++ admin/ChangeLog 2013-07-12 06:45:04 +0000 @@ -1,3 +1,7 @@ +2013-07-12 Glenn Morris + + * admin.el (manual-style-string): Use non-abbreviated url. + 2013-07-09 Paul Eggert Port recent close-on-exec changes to Cygwin (Bug#14821). === modified file 'admin/admin.el' --- admin/admin.el 2013-07-06 18:28:54 +0000 +++ admin/admin.el 2013-07-12 06:45:04 +0000 @@ -283,7 +283,7 @@ \n\n") (defconst manual-style-string "\n") +@import url('/software/emacs/manual.css');\n\n") (defun manual-misc-html (name root html-node-dir html-mono-dir) ;; Hack to deal with the cases where .texi creates a different .info.