Michael Albinus [Sat, 15 Jun 2019 09:08:05 +0000 (11:08 +0200)]
Tag remote autorevert tests as unstable
* test/lisp/autorevert-tests.el (auto-revert--timeout):
Derive value from `auto-revert-interval'.
(auto-revert--deftest-remote): Tag it as `:unstable'.
(auto-revert-test05-global-notify, auto-revert-test06-write-file):
Suppress final newline. Use `auto-revert--timeout'.
* src/xterm.c (x_scroll_run) [USE_CAIRO]: Use FRAME_CR_CONTEXT or surface type
for conditions to call XCopyArea rather than FRAME_X_DOUBLE_BUFFERED_P.
Set compositing operator to CAIRO_OPERATOR_SOURCE when copying image.
Michael Albinus [Fri, 14 Jun 2019 17:45:00 +0000 (19:45 +0200)]
Fix problem in remote file notification
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter): Do not kill the process.
Let `file-notify-rm-watch' do the job.
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir): Do not
special-case remote files.
* lisp/cedet/semantic/senator.el (senator-register): New class.
(register-val-jump-to, register-val-describe)
(register-val-insert): New methods.
(senator-copy-tag-to-register): Use this instead of the deprecated
registerv-make function.
* lisp/cedet/srecode/srt-mode.el (srecode/insert): Require to
avoid compilation warning about unknown slot. Remove function
declarations that point to that file.
* lisp/cedet/srecode/find.el (srecode/compile): Require to
avoid compilation warning about unknown slot. Remove function
declarations that point to that file.
* lisp/cedet/srecode/dictionary.el (srecode/fields): Require to
avoid compilation warning about unknown slot. Remove function
declarations that point to that file.
* lisp/cedet/srecode/ctxt.el (srecode/dictionary): Require to
avoid compilation warning about unknown slot. Remove function
declarations that point to that file.
Move functions from semantic.el to analyze.el to avoid warnings
* lisp/cedet/semantic.el (semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): Add
autoloads for the moved functions.
* lisp/cedet/semantic/analyze.el
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): Move
here from semantic.el to avoid getting compilation warnings about
unknown slot `bounds'.
Adjust erc functions after previous erc-pre-send-function change
* lisp/erc/erc-goodies.el (noncommands): Use
erc-pre-send-functions instead of the hook.
(erc-send-distinguish-noncommands): Adjust function to new interface.
* lisp/erc/erc.el (erc-send-this): Really make obsolete.
(erc-pre-send-functions): Change to a list of functions to allow
erc-goodies and erc-ring to work as before.
Obsolete erc-send-pre-hook and add new erc-pre-send-function
* lisp/erc/erc.el (erc-send-pre-hook): Make obsolete.
(erc-send-input): Ditto.
(erc-pre-send-function): New function.
(erc-send-input): Use the new function, and silence byte
compilation warning about the dynamic variable `str' used by the
now-obsolete hook.
* lisp/mail/rmailmm.el (rmail-mime-insert-bulk): Remove apparently
superfluous call to string-as-unibyte -- the buffer should be
unibyte already at this point.
* lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Remove
comment about issuing a byte compilation warning about accessing
slots via :initarg -- it was implemented a few months later.
* lisp/cedet/semantic/chart.el (semantic/db-typecache)
(semantic/scope): Require to avoid byte compilation warnings about
undefined slots. Remove declare-functions from these packages.
* lisp/cedet/ede/linux.el (semantic/db): Require to avoid warnings
about unknown slot lexical-table, and remove declare-functions
from the now-required semantic/db.
Alan Mackenzie [Thu, 13 Jun 2019 14:07:06 +0000 (14:07 +0000)]
Depessimize bits of CC Mode for long C macros.
* lisp/progmodes/cc-engine.el (c-end-of-macro): Check for being in a
degenerate zero length "macro", when setting the macro cache.
(c-determine-+ve-limit): Add in a missing goto-char form for when start-pos is
non-nil.
(c-back-over-member-initializers): Add a search limit parameter.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Add a search limit
to c-go-up-list-backward.
(c-font-lock-cut-off-declarators): Add a search limit to
c-back-over-member-initializers.
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't
set c-new-END to the end of logical line (which might be a long macro).
(c-after-change-mark-abnormal-strings): Calculate end-hwm in place of the
setting of c-new-END (above). Use this as a search limit rather than
c-new-END.
Fix erc-dcc server-close code and fix compilation warning
* lisp/erc/erc-dcc.el (erc-dcc-get-filter): We receive unibyte
data, so no need to convert to unibyte.
(erc-dcc-send-filter): Kill the process before killing the buffer
so that we're not queried about killing the process.
* lisp/emacs-lisp/disass.el (disassemble-1): Remove a
string-as-unibyte that probably doesn't do anything, because the
string in question should be unibyte anyway. If the assert fails,
revert the patch.
Alan Mackenzie [Thu, 13 Jun 2019 10:06:33 +0000 (10:06 +0000)]
CC Mode: replace an erroneous re-search-forward with search-forward
Move two declarations to a more suitable point in the cc-engine.el.
* lisp/progmodes/cc-engine.el (c-after-change-unmark-raw-strings): Change an
re-search-forward to search-forward.
(c-semi-lit-near-cache, c-semi-near-cache-limit): Move the declarations.
Eli Zaretskii [Thu, 13 Jun 2019 09:41:37 +0000 (12:41 +0300)]
Fix display of Hebrew text with precomposed characters
* lisp/language/hebrew.el (base): Include precomposed
Hebrew characters from the Alphabetic Presentation Forms in
the composition patterns. (Bug#36171)
Eli Zaretskii [Thu, 13 Jun 2019 08:49:30 +0000 (11:49 +0300)]
Fix text shaping of precomposed characters with HarfBuzz
* src/hbfont.c (hbfont_shape): Fix setting TO of lglyph for
the case when Lisp shape-gstring function performed some
compositions by itself. This happens with hebrew.el. See
https://lists.freedesktop.org/archives/harfbuzz/2019-June/007396.html
for the details of the problem this solves.
* lisp/progmodes/ps-mode.el (ps-mode-octal-region): Revert
previous change because the `string-make-unibyte' insertion was
the previous single change (in 2013) to this file, so it must have
some subtle meaning or other.
Add ps-mode-tests.el and remove a compilation warning
* lisp/progmodes/ps-mode.el (ps-mode-octal-region): Remove a
string-make-unibyte that apparently had no effect here.
* test/lisp/progmodes/ps-mode-tests.el: New file.
* lisp/textmodes/tildify.el (tildify--deprecated-ignore-evironments):
(tildify-tildify, tildify-mode): Suppress warnings about obsolete
internal function `tildify--pick-alist-entry'. Apparently these
semi-deprecated functions rely on each other.
Remove compat code for XEmacs and pre-Emacs 20 Emacs in pcomplete.el
* lisp/pcomplete.el (pcomplete-event-matches-key-specifier-p)
(pcomplete-read-event, pcomplete-show-completions): Remove XEmacs
support and mark now-trivial defaliases as obsolete.
Alan Mackenzie [Wed, 12 Jun 2019 19:17:22 +0000 (19:17 +0000)]
CC Mode: Add a workaround for syntax-ppss ignoring syntax-table prop changes
* lisp/progmodes/cc-engine.el (c-truncate-lit-pos-cache): Maintain the new
variable c-syntax-table-hwm after buffer changes.
* lisp/progmodes/cc-mode.el (c-syntax-table-hwm): New variable.
(c-before-change): Set c-syntax-table-hwm to "infinity".
(c-after-change): Call syntax-ppss-flush-cache, just before a font locking is
due to take place.
Restore image scaling support when there's no native image scaling
* lisp/net/shr.el (shr--image-type): New function.
(shr-rescale-image): Use it to allow image scaling on Emacsen with
ImageMagick support that does not have native image scaling support.
Rewrite the kmacro register function to avoid using obsolete functions
* lisp/kmacro.el (kmacro-register): New struct to replace the
general registerv struct.
(register-val-jump-to, register-val-describe)
(register-val-insert): New methods to implement the register
interface.
(kmacro-to-register): Use the kmacro-register struct.
(beginning-of-defun-raw): Suppress warning about syntax-begin-function
* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw):
font-lock-compile-keywords also suppresses warnings about the
obsolete syntax-begin-function variable, so suppress the only
other use not in syntax.el.
Suppress warning about obsolete function custom-show
* lisp/cus-edit.el (custom-variable-value-create): Suppress
warning about obsolete function custom-show. The widget this
supports has been obsolete since Emacs 24, but we should perhaps
be very conservative about removing widget types, so suppress the
warning instead of removing the widget type.
* lisp/epa.el (epa-verify-cleartext-in-region): Suppress warnings
about calling interactive-only functions, because these are
interactive-only thin wrappers around those functions.
* lisp/ehelp.el (electric-help-execute-extended): Suppress warning
about `execute-extended-command' only being interactive, because
we're still using it interactively, but via a wrapper.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro.
* doc/lispref/compile.texi (Compiler Errors): Document
with-suppressed-warnings and deemphasise with-no-warnings
slightly.
* lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings):
New internal variable.
(byte-compile-warning-enabled-p): Heed
byte-compile--suppressed-warnings, bound via with-suppressed-warnings.
(byte-compile-initial-macro-environment): Provide a macro
expansion of with-suppressed-warnings.
(byte-compile-file-form-with-suppressed-warnings): New byte hunk
handler for the suppressed symbol machinery.
(byte-compile-suppressed-warnings): Ditto for the byteop.
(byte-compile-file-form-defmumble): Ditto.
(byte-compile-form, byte-compile-normal-call)
(byte-compile-normal-call, byte-compile-variable-ref)
(byte-compile-set-default, byte-compile-variable-set)
(byte-compile-function-form, byte-compile-set-default)
(byte-compile-warn-obsolete, byte-compile--declare-var): Pass the
symbol being warned in to byte-compile-warning-enabled-p.
* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New
function.
(bytecomp-test--with-suppressed-warnings): Tests.