diff --git a/admin/authors.el b/admin/authors.el index cb8706bbf18..1682788f2e8 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -92,6 +92,7 @@ files.") ("Joseph Arceneaux" "Joe Arceneaux") ("Joseph M. Kelsey" "Joe Kelsey") ; FIXME ? ("Juan León Lahoz García" "Juan-Leon Lahoz Garcia") + ("Jürgen Hötzel" "Juergen Hoetzel") ("K. Shane Hartman" "Shane Hartman") ("Kai Großjohann" "Kai Grossjohann") ("Karl Berry" "K. Berry") diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 3719b223b35..783be72e830 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2014-08-28 Eli Zaretskii + + * display.texi (Bidirectional Display): Update the Emacs's class + of bidirectional conformance. + 2014-08-27 Dmitry Antipov * eval.texi (Eval): Mention possible recovery from stack overflow. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index e0349e4ca0c..e88eadb5ca7 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6551,8 +6551,10 @@ positions do not increase monotonically with string or buffer position. In performing this @dfn{bidirectional reordering}, Emacs follows the Unicode Bidirectional Algorithm (a.k.a.@: @acronym{UBA}), which is described in Annex #9 of the Unicode standard -(@url{http://www.unicode.org/reports/tr9/}). Emacs provides a ``Full -Bidirectionality'' class implementation of the @acronym{UBA}. +(@url{http://www.unicode.org/reports/tr9/}). Emacs currently provides +a ``Non-isolate Bidirectionality'' class implementation of the +@acronym{UBA}: it does not yet support the isolate directional +formatting characters introduced with Unicode Standard v6.3.0. @defvar bidi-display-reordering If the value of this buffer-local variable is non-@code{nil} (the diff --git a/etc/ChangeLog b/etc/ChangeLog index 72c8334d3df..4a79ec47a4b 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2014-08-28 Glenn Morris + + * emacs.appdata.xml: New file; description from Emacs's homepage. + 2014-08-25 Eli Zaretskii * NEWS: Mention that string-collate-* functions are supported on diff --git a/etc/emacs.appdata.xml b/etc/emacs.appdata.xml new file mode 100644 index 00000000000..d662bcba550 --- /dev/null +++ b/etc/emacs.appdata.xml @@ -0,0 +1,33 @@ + + + + emacs.desktop + GFDL-1.3 + + GPL-3.0+ and GFDL-1.3 + GNU Emacs + An extensible text editor + +

+ GNU Emacs is an extensible, customizable text editor - and more. + At its core is an interpreter for Emacs Lisp, a dialect of the Lisp + programming language with extensions to support text editing. +

+

The features of GNU Emacs include:

+
    +
  • Content-sensitive editing modes, including syntax coloring, for + a wide-range of file types
  • +
  • Complete built-in documentation, including a tutorial for new users
  • +
  • Full Unicode support for nearly all human languages and their scripts
  • +
  • Highly customizable, using Emacs Lisp code or a graphical interface
  • +
  • Includes a project planner, mail and news reader, debugger + interface, calendar, and more
  • +
+
+ + http://www.gnu.org/software/emacs/images/appdata.png + + http://www.gnu.org/software/emacs + emacs-devel_at_gnu.org + GNU +
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2674b3b6af..73f3287ed40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2014-08-28 Michael Albinus + + * emacs-lisp/authors.el (authors-aliases): Addition. + + * net/tramp-adb.el: Spell author name correctly. + +2014-08-28 João Távora + + * net/shr.el (shr-expand-url): Plain expand-file-name is not enough; + use url-expand-file-name. (Bug#18310) + +2014-08-28 Glenn Morris + + * emulation/cua-rect.el (cua--highlight-rectangle): + Avoid error at point-min. (Bug#18309) + +2014-08-28 Stefan Monnier + + * progmodes/python.el (python-shell-prompt-detect): Remove redundant + executable-find (bug#18244). + + * simple.el (self-insert-uses-region-functions): Defvar. + 2014-08-28 Glenn Morris * subr.el (remq): Revert 2014-08-25 doc change (not always true). diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 31dd137a6b9..4620b0e8c0f 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -794,7 +794,7 @@ If command is repeated at same position, delete the rectangle." (make-string (- l cl0 (if (and (= le pl) (/= le lb)) 1 0)) (if cua--virtual-edges-debug ?. ?\s)) - 'face (or (get-text-property (1- s) 'face) 'default))) + 'face (or (get-text-property (max (1- s) (point-min)) 'face) 'default))) (if (/= pl le) (setq s (1- s)))) (cond diff --git a/lisp/net/shr.el b/lisp/net/shr.el index ef9485f6618..0138640e9af 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -589,6 +589,10 @@ size, and full-buffer size." (url-type parsed) url))) +(autoload 'url-expand-file-name "url-expand") + +;; FIXME This needs some tests writing. +;; Does it even need to exist, given that url-expand-file-name does? (defun shr-expand-url (url &optional base) (setq base (if base @@ -614,7 +618,7 @@ size, and full-buffer size." (concat (nth 3 base) url)) (t ;; Totally relative. - (concat (car base) (expand-file-name url (cadr base)))))) + (url-expand-file-name url (concat (car base) (cadr base)))))) (defun shr-ensure-newline () (unless (zerop (current-column)) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 16017eebba3..88e52fe0199 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2011-2014 Free Software Foundation, Inc. -;; Author: Juergen Hoetzel +;; Author: Jürgen Hötzel ;; Keywords: comm, processes ;; Package: tramp diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4f645ad64c8..f12486d0acb 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1905,7 +1905,7 @@ detection and just returns nil." (let ((code-file (python-shell--save-temp-file code))) ;; Use `process-file' as it is remote-host friendly. (process-file - (executable-find python-shell-interpreter) + python-shell-interpreter code-file '(t nil) nil @@ -2061,11 +2061,14 @@ uniqueness for different types of configurations." (or python-shell-virtualenv-path "") (mapconcat #'identity python-shell-exec-path ""))))) -(defun python-shell-parse-command () +(defun python-shell-parse-command () ;FIXME: why name it "parse"? "Calculate the string used to execute the inferior Python process." + ;; FIXME: process-environment doesn't seem to be used anywhere within + ;; this let. (let ((process-environment (python-shell-calculate-process-environment)) (exec-path (python-shell-calculate-exec-path))) (format "%s %s" + ;; FIXME: Why executable-find? (executable-find python-shell-interpreter) python-shell-interpreter-args))) @@ -2101,11 +2104,10 @@ uniqueness for different types of configurations." (defun python-shell-calculate-exec-path () "Calculate exec path given `python-shell-virtualenv-path'." (let ((path (append python-shell-exec-path - exec-path nil))) + exec-path nil))) ;FIXME: Why nil? (if (not python-shell-virtualenv-path) path - (cons (format "%s/bin" - (directory-file-name python-shell-virtualenv-path)) + (cons (expand-file-name "bin" python-shell-virtualenv-path) path)))) (defvar python-shell--package-depth 10) diff --git a/lisp/simple.el b/lisp/simple.el index cdff8d7fc3a..76f307fec8c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -374,6 +374,13 @@ Other major modes are defined by comparison with this one." ;; Making and deleting lines. +(defvar self-insert-uses-region-functions nil + "Special hook to tell if `self-insert-command' will use the region. +It must be called via `run-hook-with-args-until-success' with no arguments. +Any `post-self-insert-command' which consumes the region should +register a function on this hook so that things like `delete-selection-mode' +can refrain from consuming the region.") + (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) "Propertized string representing a hard newline character.") diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 150ef22c444..da0d7098d1a 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,13 @@ +2014-08-28 Eli Zaretskii + + * sedlibmk.inp (gl_LIBOBJS): Add execinfo.o. Reported by Juan + Manuel Guerrero . + + * sed2v2.inp [DJGPP <= 2.03]: Add a prototype for snprintf, to + avoid compilation warning from newer GCC versions that have + snprintf as a built-in. Reported by Juan Manuel Guerrero + . + 2014-08-09 Eli Zaretskii * INSTALL: Fix last change. diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 94cd997125f..976b74f1d4a 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -127,6 +127,8 @@ s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/ #define HAVE_SNPRINTF 1\ #else\ #undef HAVE_SNPRINTF\ +#include \ +extern int snprintf (char *__restrict, size_t, const char *__restrict, ...);\ #endif s/^#undef PENDING_OUTPUT_N_BYTES *$/#define PENDING_OUTPUT_N_BYTES fp->_ptr - fp->_base/ diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index badb30b0b65..b896eadc22d 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -315,6 +315,7 @@ am__cd = cd /^BYTESWAP_H *=/s/@[^@\n]*@/byteswap.h/ /^DIRENT_H *=/s/@[^@\n]*@// /^ERRNO_H *=/s/@[^@\n]*@// +/^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/ /^STDBOOL_H *=/s/@[^@\n]*@// /^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=/s/@[^@\n]*@// @@ -333,7 +334,7 @@ am__cd = cd /am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/ /am__append_2 *=.*verify\.h/s/@[^@\n]*@// /^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@// -/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o/ +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o execinfo.o/ /^am__append_[1-9][0-9]* *=/,/^[^ ]/{ s/ *inttypes\.h// s| *sys/select\.h|| diff --git a/src/ChangeLog b/src/ChangeLog index e79cef6a8a4..d08b3780242 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2014-08-28 Eli Zaretskii + + * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define. + + * indent.c (Fvertical_motion): Fix vertical motion up through a + display property after a newline. (Bug#18276) + + * xdisp.c (display_line): Don't assume that the call to + reseat_at_next_visible_line_start ends up at a character + immediately following the newline on the previous line. Avoids + setting the ends_at_zv_p flag on screen lines that are not at or + beyond ZV, which causes infloop in redisplay. For the details, see + http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html. + + * dispnew.c (buffer_posn_from_coords): Fix mirroring of X + coordinate for hscrolled R2L screen lines. (Bug#18277) + 2014-08-28 Paul Eggert * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults diff --git a/src/conf_post.h b/src/conf_post.h index a995acfd915..c8e3672b228 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -123,13 +123,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ so we could reuse it in readlinkat; see msdos.c. */ #define opendir sys_opendir -/* The "portable" definition of _GL_INLINE on config.h does not work - with DJGPP GCC 3.4.4: it causes unresolved externals in sysdep.c, - although lib/execinfo.h is included and the inline functions there - are visible. */ -#if __GNUC__ < 4 -# define _GL_EXECINFO_INLINE inline -#endif /* End of gnulib-related stuff. */ #define emacs_raise(sig) msdos_fatal_signal (sig) diff --git a/src/dispnew.c b/src/dispnew.c index b587852fc6e..43ffca7c181 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5143,9 +5143,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p move_it_to (&it, -1, 0, *y, -1, MOVE_TO_X | MOVE_TO_Y); /* TO_X is the pixel position that the iterator will compute for the - glyph at *X. We add it.first_visible_x because iterator - positions include the hscroll. */ - to_x = x0 + it.first_visible_x; + glyph at *X. */ + to_x = x0; if (it.bidi_it.paragraph_dir == R2L) /* For lines in an R2L paragraph, we need to mirror TO_X wrt the text area. This is because the iterator, even in R2L @@ -5159,6 +5158,10 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p it should be mirrored into zero pixel position.) */ to_x = window_box_width (w, TEXT_AREA) - to_x - 1; + /* We need to add it.first_visible_x because iterator positions + include the hscroll. */ + to_x += it.first_visible_x; + /* Now move horizontally in the row to the glyph under *X. Second argument is ZV to prevent move_it_in_display_line from matching based on buffer positions. */ diff --git a/src/indent.c b/src/indent.c index 79af42c5f7e..e6b267a3891 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2004,6 +2004,8 @@ whether or not it is currently displayed in some window. */) int first_x; bool overshoot_handled = 0; bool disp_string_at_start_p = 0; + ptrdiff_t nlines = XINT (lines); + int vpos_init = 0; itdata = bidi_shelve_cache (); SET_TEXT_POS (pt, PT, PT_BYTE); @@ -2093,18 +2095,31 @@ whether or not it is currently displayed in some window. */) overshoot_handled = 1; } - if (XINT (lines) <= 0) + else if (IT_CHARPOS (it) == PT - 1 + && FETCH_BYTE (PT - 1) == '\n' + && nlines < 0) { - it.vpos = 0; + /* The position we started from was covered by a display + property, so we moved to position before the string, and + backed up one line, because the character at PT - 1 is a + newline. So we need one less line to go up. */ + nlines++; + /* But we still need to record that one line, in order to + return the correct value to the caller. */ + vpos_init = -1; + } + if (nlines <= 0) + { + it.vpos = vpos_init; /* Do this even if LINES is 0, so that we move back to the beginning of the current line as we ought. */ - if (XINT (lines) == 0 || IT_CHARPOS (it) > 0) - move_it_by_lines (&it, max (PTRDIFF_MIN, XINT (lines))); + if (nlines == 0 || IT_CHARPOS (it) > 0) + move_it_by_lines (&it, max (PTRDIFF_MIN, nlines)); } else if (overshoot_handled) { it.vpos = 0; - move_it_by_lines (&it, min (PTRDIFF_MAX, XINT (lines))); + move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); } else { @@ -2119,13 +2134,13 @@ whether or not it is currently displayed in some window. */) it.vpos = 0; move_it_by_lines (&it, 1); } - if (XINT (lines) > 1) - move_it_by_lines (&it, min (PTRDIFF_MAX, XINT (lines) - 1)); + if (nlines > 1) + move_it_by_lines (&it, min (PTRDIFF_MAX, nlines - 1)); } else { it.vpos = 0; - move_it_by_lines (&it, min (PTRDIFF_MAX, XINT (lines))); + move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); } } diff --git a/src/xdisp.c b/src/xdisp.c index 39e70717143..1f2c5a02d6c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3413,6 +3413,48 @@ handle_stop (struct it *it) if (it->selective_display_ellipsis_p) it->saved_face_id = it->face_id; + /* Here's the description of the semantics of, and the logic behind, + the various HANDLED_* statuses: + + HANDLED_NORMALLY means the handler did its job, and the loop + should proceed to calling the next handler in order. + + HANDLED_RECOMPUTE_PROPS means the handler caused a significant + change in the properties and overlays at current position, so the + loop should be restarted, to re-invoke the handlers that were + already called. This happens when fontification-functions were + called by handle_fontified_prop, and actually fontified + something. Another case where HANDLED_RECOMPUTE_PROPS is + returned is when we discover overlay strings that need to be + displayed right away. The loop below will continue for as long + as the status is HANDLED_RECOMPUTE_PROPS. + + HANDLED_RETURN means return immediately to the caller, to + continue iteration without calling any further handlers. This is + used when we need to act on some property right away, for example + when we need to display the ellipsis or a replacing display + property, such as display string or image. + + HANDLED_OVERLAY_STRING_CONSUMED means an overlay string was just + consumed, and the handler switched to the next overlay string. + This signals the loop below to refrain from looking for more + overlays before all the overlay strings of the current overlay + are processed. + + Some of the handlers called by the loop push the iterator state + onto the stack (see 'push_it'), and arrange for the iteration to + continue with another object, such as an image, a display string, + or an overlay string. In most such cases, it->stop_charpos is + set to the first character of the string, so that when the + iteration resumes, this function will immediately be called + again, to examine the properties at the beginning of the string. + + When a display or overlay string is exhausted, the iterator state + is popped (see 'pop_it'), and iteration continues with the + previous object. Again, in many such cases this function is + called again to find the next position where properties might + change. */ + do { handled = HANDLED_NORMALLY; @@ -20621,10 +20663,15 @@ display_line (struct it *it) row->truncated_on_right_p = 1; it->continuation_lines_width = 0; reseat_at_next_visible_line_start (it, 0); - if (IT_BYTEPOS (*it) <= BEG_BYTE) - row->ends_at_zv_p = true; + /* We insist below that IT's position be at ZV because in + bidi-reordered lines the character at visible line start + might not be the character that follows the newline in + the logical order. */ + if (IT_BYTEPOS (*it) > BEG_BYTE) + row->ends_at_zv_p = + IT_BYTEPOS (*it) >= ZV_BYTE && FETCH_BYTE (ZV_BYTE - 1) != '\n'; else - row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; + row->ends_at_zv_p = false; break; } } diff --git a/test/ChangeLog b/test/ChangeLog index dd49d6e782b..7546dd1fb46 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2014-08-28 Glenn Morris + + * automated/python-tests.el (python-shell-calculate-exec-path-2): + Update test for today's python.el changes. + 2014-08-13 Jan Nieuwenhuizen * automated/compile-tests.el (compile--test-error-line): Grok FILE diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index e1eaeea2c38..47dfa4b64ed 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -1753,7 +1753,7 @@ Using `python-shell-interpreter' and "Test `python-shell-exec-path' modification." (let* ((original-exec-path exec-path) (python-shell-virtualenv-path - (directory-file-name user-emacs-directory)) + (directory-file-name (expand-file-name user-emacs-directory))) (exec-path (python-shell-calculate-exec-path))) (should (equal exec-path