Eli Zaretskii [Mon, 5 Oct 2015 07:22:08 +0000 (10:22 +0300)]
Remove redundant redisplay code
* src/xdisp.c (redisplay_internal, try_cursor_movement)
(try_window_reusing_current_matrix, try_window_id): Remove
redundant restrictions on redisplay optimizations based on the
frame's 'redisplay' flag. See
http://osdir.com/ml/general/2015-10/msg02110.html for the relevant
discussions.
Michael Albinus [Sun, 4 Oct 2015 11:00:33 +0000 (13:00 +0200)]
Improve XEmacs compatibility of Tramp
* lisp/net/tramp-compat.el (directory-listing-before-filename-regexp):
Declare if it doesn't exist.
(file-remote-p): Remove defalias, which was necessary for GNU Emacs 21.
(redisplay): Make it an alias if it doesn't exist.
* lisp/net/tramp.el (tramp-get-remote-tmpdir): Don't use
`file-remote-p' (due to XEmacs compatibility).
* lisp/net/trampver.el (locate-dominating-file)
(tramp-compat-replace-regexp-in-string): Autoload.
(tramp-repository-get-version): Do not dupe byte-compiler.
Eli Zaretskii [Thu, 9 Jul 2015 02:38:29 +0000 (05:38 +0300)]
shr: fix too long lines in rendered buffers (Bug#21012)
Co-authored-by: Michael Heerdegen <michael_heerdegen@web.de>
* lisp/net/shr.el (shr-insert-document, shr-fill-text):
Correct calculation of available width.
(shr-find-fill-point): Don't overflow window edge if shr-kinsoku-shorten
is nil.
Restore blank line before next section, erroneously erased in my previous commit
* etc/compilation.txt (symbol ant): add an additional trailing blank line to this section, so that there are two of them immediately before the next section
* lisp/json.el (json-object-type): Mention order handling in doc-string.
(json--plist-reverse): New utility function.
(json-read-object): Maintain ordering for alists and plists.
(json-pretty-print): Ensure that ordering is maintained.
* test/automated/json-tests.el (test-json-plist-reverse): New test for
`json--plist-reverse'.
(json-read-simple-alist): Update test to accommodate for changes in
`json-read-object'.
* etc/NEWS: Document the new behavior of the pretty printing functions.
Eli Zaretskii [Sat, 3 Oct 2015 11:49:16 +0000 (14:49 +0300)]
More validatation of coding system in 'write-region'
* src/coding.c (choose_write_coding_system): More validation of
coding-system from various sources. Suggested by Andreas Schwab
<schwab@linux-m68k.org>. (Bug#21602)
Eli Zaretskii [Sat, 3 Oct 2015 10:44:44 +0000 (13:44 +0300)]
Avoid crashes due to invalid coding-system
* src/fileio.c (choose_write_coding_system)
(Finsert_file_contents): Check validity of coding-system-for-write
and coding-system-for-read bound by the caller. (Bug#21602)
Paul Eggert [Fri, 2 Oct 2015 04:42:53 +0000 (21:42 -0700)]
Fix a few problems with directed quotes
This is in response to a problem report by Kaushal Modi in:
http://bugs.gnu.org/21588#25
* lisp/cedet/mode-local.el (describe-mode-local-overload):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header):
* lisp/info-xref.el (info-xref-check-all-custom):
* lisp/mail/emacsbug.el (report-emacs-bug-hook):
Prefer directed to undirected single quotes in diagnostics.
Eli Zaretskii [Thu, 1 Oct 2015 16:56:46 +0000 (19:56 +0300)]
Attempt to fix slow redisplay caused by last changes
* src/xdisp.c (try_window_id, try_window_reusing_current_matrix)
(try_cursor_movement): Relax requirements for redisplay
optimizations for the selected frame. (Bug#21597)
Eli Zaretskii [Thu, 1 Oct 2015 11:40:10 +0000 (14:40 +0300)]
Fix GUD display of GDB output with non-ASCII text
* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): New defcustom.
(gdb-mi-decode): New function.
(gud-gdbmi-marker-filter): If gdb-mi-decode-strings is non-nil,
decode octal escapes in GDB output. (Bug#21572)
Eli Zaretskii [Wed, 30 Sep 2015 19:32:14 +0000 (22:32 +0300)]
Disable some display optimizations when frames need redisplay
These optimizations were previously disabled by the
windows_or_buffers_changed flag, which now is not set
when only some frames need to be redrawn.
* src/xdisp.c (redisplay_internal): Redisplay any frame whose
'redisplay' flag is set.
(try_window_reusing_current_matrix, try_window_id)
(try_cursor_movement): Disable these optimizations when the
frame's 'redisplay' flag is set.
* lisp/progmodes/prog-mode.el (prettify-symbols--compose-symbol):
(prettify-symbols--post-command-hook, prettify-symbols-mode): Don't
modify buffer when setting/removing custom prettify-symbols-start/end
text properties. Add them to font-lock-extra-managed-props, too.
Stefan Monnier [Wed, 30 Sep 2015 14:00:13 +0000 (10:00 -0400)]
Try to avoid redisplaying all frames when creating a new one
* src/xfns.c (x_set_menu_bar_lines, x_change_tool_bar_height):
* src/xfaces.c (Finternal_make_lisp_face, Finternal_copy_lisp_face)
(Finternal_set_lisp_face_attribute, update_face_from_frame_parameter):
* src/frame.c (x_set_screen_gamma): Set the specific frame's
`redisplay' bit rather than windows_or_buffers_changed.
* src/window.c (apply_window_adjustment): Remove redundant setting of
windows_or_buffers_changed.
* src/xdisp.c (redisplay_internal): Set the specific frame's
`redisplay' bit rather than update_mode_lines in response to
cursor_type_changed.
(syms_of_xdisp): Use hash-tables for redisplay_*_cause tables.
(AINC): Adjust accordingly.
* lisp/progmodes/prog-mode.el: Implement feature for unprettifying the
symbol at point.
(prettify-symbols--current-symbol-bounds): New variable.
(prettify-symbols--post-command-hook): New function.
(prettify-symbols-unprettify-at-point): New defcustom.
(prettify-symbols-mode): Use it.
(prettify-symbols--compose-symbol): Use them.
Phil Sainty [Wed, 30 Sep 2015 07:39:21 +0000 (10:39 +0300)]
Avoid empty -path arguments in rgrep
* lisp/progmodes/grep.el (rgrep-default-command): Remove nil from
the list produced according to grep-find-ignored-directories,
before passing it to Find/Grep invocation. (Bug#21548)
Eli Zaretskii [Wed, 30 Sep 2015 07:19:41 +0000 (10:19 +0300)]
Clarify documentation of pos-visible-in-window-p
* src/window.c (Fpos_visible_in_window_p): Clarify the meaning of
t for POS. See
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg01040.html
for the original report.
* doc/lispref/windows.texi (Window Start and End): Clarify the
meaning of t for the POSITION argument of pos-visible-in-window-p.
Stefan Monnier [Wed, 30 Sep 2015 03:28:32 +0000 (23:28 -0400)]
* lisp/progmodes/prolog.el: Fix various indentation cases
(prolog-operator-chars): New const (add \\).
(prolog-smie-forward-token, prolog-smie-backward-token): Use it.
(prolog-smie-rules): Add rules according to bug#21526.
Stefan Monnier [Wed, 30 Sep 2015 01:43:07 +0000 (21:43 -0400)]
* lisp/progmodes/sh-script.el: Old "dumb" continued line indent
(sh-indent-after-continuation): Add new value `always' (bug#17620)
(sh-smie-sh-rules): Remove old handling of continued lines.
(sh-smie--indent-continuation): New function.
(sh-set-shell): Use it.
Stefan Monnier [Tue, 29 Sep 2015 19:13:44 +0000 (15:13 -0400)]
* lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun
Remove redundant :group keyword args.
(octave-begin-keywords, octave-else-keywords, octave-end-keywords):
Remove variables.
(octave-operator-table, octave-smie-bnf-table): Use let-when-compile to
turn them into compile-time variables.
Auto-generate the "foo ... end" rules from the "foo ... endfoo" rules.
Add rules for break, continue, return, global, and persistent.
Refine the rule for "until".
(octave-smie--funcall-p, octave-smie--end-index-p)
(octave-smie--in-parens-p): New functions.
(octave-smie-backward-token, octave-smie-forward-token): Use them to
distinguish the "enumeration" function and the "end" index from
their corresponding keywords.
(octave--block-offset-keywords): New constant.
(octave-smie-rules): Use it. Adjust rules for new global/persistent parsing.
(octave-reserved-words): Redefine using octave-smie-grammar.
(octave-font-lock-keywords): Use octave-smie--funcall-p and
octave-smie--end-index-p.
Nicolas Petton [Mon, 28 Sep 2015 20:18:26 +0000 (22:18 +0200)]
Add documentation for seq.el
* doc/lispref/sequences.texi: Add documentation regarding extending
seq.el, as well as missing documentation for seq-elt, seq-length, seq-p,
seq-do and seq-map.
Nicolas Petton [Mon, 28 Sep 2015 19:11:05 +0000 (21:11 +0200)]
Better documentation for seq-some
* doc/lispref/sequences.texi:
* lisp/emacs-lisp/seq.el: Update the documentation of seq-some to
guarantee that the returned value is the first non-nil value that
resulted from applying the predicate.
Eli Zaretskii [Mon, 28 Sep 2015 12:50:29 +0000 (15:50 +0300)]
Another attempt to fix crashes due to prematurely freed faces
* src/xdisp.c (redisplay_internal): Inhibit freeing of realized
faces for as long as we might have desired matrices that reference
those faces. (Bug#21428)