1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
Commit Graph

136575 Commits

Author SHA1 Message Date
Mattias Engdegård
6d5a8175b3 Comment out inexplicable condition in filenotify
* lisp/filenotify.el (file-notify-callback):
Comment out condition that does not seem to make any sense. All it
seems to do is allowing notifications for files on the form DIR/X/X
when we really just are watching DIR/X/Y.
2019-05-19 22:47:31 +02:00
Juri Linkov
613565494d * lisp/vc/vc-dispatcher.el (vc-do-command): Let-bind inhibit-message to t
in active minibuffer.  (Bug#34939)
2019-05-19 23:16:01 +03:00
Juri Linkov
82db17d0d1 Publicize behavior of log-view-diff at beginning/end of active region
* lisp/vc/log-view.el (log-view-diff, log-view-diff-changeset):
* doc/emacs/maintaining.texi (VC Change Log): Document behavior of
log-view-diff at the beginning and the end of the log buffer
when the region is active.  (Bug#35624)

* lisp/vc/vc-git.el (vc-git-print-log): Insert newline at the
beginning to enable the feature of diffing with the working revision.
2019-05-19 23:11:27 +03:00
Lars Ingebrigtsen
1b2b136a17 cus-edit.el: Remove XEmacs compat code
* lisp/cus-edit.el (custom-browse-insert-prefix): Remove XEmacs
compat code and make obsolete.
(custom-group-value-create): Use `insert' directly.

* lisp/emacs-lisp/elint.el (elint-check-conditional-form): Don't
refer to function that doesn't have an if any more.
2019-05-19 20:50:54 +02:00
Lars Ingebrigtsen
a9c1e18517 bs.el: Remove XEmacs compat code
* lisp/bs.el (bs-mode-font-lock-keywords): Remove XEmacs compat code.
(bs-mode-map): Ditto.
2019-05-19 20:40:43 +02:00
Lars Ingebrigtsen
24d30cd61a arc-mode.el: Remove XEmacs compat code
* lisp/arc-mode.el (archive-mode-map): Remove XEmacs compat code.
(archive-summarize-files): Ditto.
2019-05-19 20:37:54 +02:00
Lars Ingebrigtsen
d4af2f3001 rfc2104.el: Remove XEmacs compat code.
* lisp/net/rfc2104.el (rfc2104-string-make-unibyte): Remove XEmacs
  compat code.
2019-05-19 20:30:58 +02:00
Lars Ingebrigtsen
fac11d899b (mml-generate-mime-1): Remove XEmacs compat code
* lisp/gnus/mml.el (mml-generate-mime-1): Remove XEmacs compat code.
2019-05-19 20:27:20 +02:00
Michael Albinus
2b313d1739 ; Instrument autorevert-tests 2019-05-19 19:52:46 +02:00
Stephen Leake
2be537e643 Minor updates to project.el
* lisp/progmodes/project.el (project-find-file): Add optional 'filename' arg.
(project--completing-read-strict): Ignore 'default' set to empty string.
2019-05-19 10:28:46 -07:00
Eric Abrahamsen
e4eb8c8501 Fix Gnus group sorting to use gnus-group-list
* lisp/gnus/gnus-group.el (gnus-group-sort-flat): As
  gnus-newsrc-hashtb is now a real (unsorted) hash table, use
  gnus-group-list to maintain group sort order.
  (gnus-group-sort-selected-flat): Ditto.
* lisp/gnus/gnus-start.el (gnus-subscribe-alphabetically): Simplify
  function using seq-find.
  (gnus-subscribe-killed, gnus-subscribe-zombies): Use cl-pushnew to
  avoid adding duplicates (can happen when un/subscribing multiple
  times to one group).
2019-05-19 10:01:00 -07:00
Lars Ingebrigtsen
d86235fee5 Remove usage of string-to-multibyte from arc-mode.el
* lisp/arc-mode.el (arc-insert-unibyte): Rename from
insert-unibyte, make into a function, and remove the superfluous
string-to-multibyte.  Change callers throughout the file.
2019-05-19 18:35:44 +02:00
Paul Eggert
45fc6685b2 * doc/lispintro/emacs-lisp-intro.texi: Remove euphemism. 2019-05-19 08:29:32 -07:00
Noam Postavsky
d7c8196c96 Fix dired-omit-files regexp (Bug#35668)
* lisp/dired-x.el (dired-omit-files): Match beginning and end of
string, rather than beginning and end of line.
2019-05-19 10:35:51 -04:00
Stefan Monnier
d0e9113de9 * lisp/progmodes/hideshow.el: Simplify mouse binding; Use lexical-binding
(hs-set-up-overlay, hs-adjust-block-beginning): Use non-nil default for
function variables, so `add-function` can be used on them.
(hs-toggle-hiding): Make it work for mouse bindings as well.
(hs-minor-mode-map): Use it for the mouse binding.
(hs-grok-mode-type): Use bound-and-true-p.
(hs-life-goes-on): Use `declare` for the debug spec.
(hs-mouse-toggle-hiding): Make it an obsolete alias.
2019-05-19 09:36:42 -04:00
Basil L. Contovounesios
6cfd68d4d7 Fix Hideshow key binding typo in Emacs manual
* doc/emacs/programs.texi (Hideshow): Add missing function and key
index entries.  Fix hs-toggle-hiding binding typo. (bug#35798)
2019-05-19 13:52:26 +01:00
Michael Albinus
9199643ab2 * test/lisp/autorevert-tests.el (auto-revert--deftest-remote):
Do not handle errors.
2019-05-19 11:34:01 +00:00
Martin Rudalics
8783becbba New buffer display action function 'display-buffer-in-direction'
* lisp/window.el (windows-sharing-edge)
(window--try-to-split-window-in-direction)
(display-buffer-in-direction): New functions.
* doc/lispref/windows.texi (Buffer Display Action Functions):
Describe new action function 'display-buffer-in-direction'.
(Buffer Display Action Alists): Describe new entry 'direction'.
Amend description of 'window' entry.
* etc/NEWS: Mention 'display-buffer-in-direction' and 'direction'
and 'window' action alist entries.
2019-05-19 11:03:05 +02:00
YAMAMOTO Mitsuharu
b87e5eea1d Avoid triple buffering with Xdbe in cairo
* src/xterm.h (struct x_output): Remove member cr_surface.
Add members cr_surface_desired_width and cr_surface_desired_height.
(x_cr_destroy_frame_context) [USE_CAIRO]: Add extern.

* src/xterm.c (x_free_cr_resources): Remove function.
(FRAME_CR_SURFACE) [USE_CAIRO]: Remove macro.
(FRAME_CR_SURFACE_DESIRED_WIDTH, FRAME_CR_SURFACE_DESIRED_HEIGHT) [USE_CAIRO]:
New macros.
(x_cr_destroy_frame_context) [USE_CAIRO]: Rename from x_cr_destroy_surface.
All Uses changed.  Don't use FRAME_CR_SURFACE.  Make non-static.
(x_cr_update_surface_desired_size) [USE_CAIRO]: New function.
(x_begin_cr_clip) [USE_CAIRO]: Create Xlib surface if Xdbe is in use.
Use FRAME_CR_SURFACE_DESIRED_WIDTH and FRAME_CR_SURFACE_DESIRED_HEIGHT.
(x_end_cr_clip) [USE_CAIRO]: Call x_mark_frame_dirty if Xdbe is in use.
(x_cr_draw_frame, x_cr_export_frames) [USE_CAIRO]: Save and restore cairo
context instead of freeing and clearing it.
(x_update_begin) [USE_CAIRO]: Don't create cairo surface here.
(show_back_buffer) [USE_CAIRO]: Call cairo_surface_flush before swapping.
(x_update_end) [USE_CAIRO]: Don't copy image surface if Xdbe is in use.
Get image surface by cairo_get_target instead of FRAME_CR_SURFACE.
(x_scroll_run) [USE_CAIRO]: Use XCopyArea if Xdbe is in use.
(handle_one_xevent) [USE_CAIRO] <ConfigureNotify>: Call
x_cr_update_surface_desired_size instead of x_cr_destroy_surface.
(x_free_frame_resources) [USE_CAIRO]: Call x_cr_destroy_frame_context instead
of x_free_cr_resources.

* src/xfns.c (set_up_x_back_buffer, tear_down_x_back_buffer) [USE_CAIRO]:
Call x_cr_destroy_frame_context.
2019-05-19 08:35:40 +09:00
Stefan Monnier
5f9671e57e * lisp/emacs-lisp/package.el: Fix decoding of downloaded files
This is a different fix for bug#34909, which should also fix bug#35739.

Our downloading code used to automatically decode the result according
to the usual heuristics for files.  This caused problems when we later
needed to save the data in a file that needed to be byte-for-byte
equal to the original in order to pass the signature verification,
especially because we didn't keep track of which coding-system was
used to decode the data.

(package--unless-error): New macro extracted from
package--with-response-buffer-1, so that we can specify edebug and
indent specs.
(package--with-response-buffer-1): Use it.  More importantly, change
code so it runs `body` in a unibyte buffer with undecoded data.
(package--download-one-archive): Don't encode with utf-8 since the data
is not decoded yet.
(describe-package-1): Explicitly decode the readem.txt files here.

* lisp/url/url-handlers.el (url-insert-file-contents): Use it.
(url-insert): Don't decode if buffer is unibyte.

* lisp/url/url-http.el (url-http--insert-file-helper): New function,
extracted from url-insert-file-contents.
2019-05-18 18:32:47 -04:00
Stefan Monnier
2a5705761e * lisp/emacs-lisp/package.el: Reduce macrology in ...with-response-buffer
(package--with-response-buffer-1): New function, extracted from
package--with-response-buffer.
(package--with-response-buffer): Use it.
2019-05-18 17:40:21 -04:00
Mattias Engdegård
3dcacb09a9 Fix broken logic in file-notify
* lisp/filenotify.el (file-notify-callback):
Repair warped condition that didn't match rename-to/from events correctly.
2019-05-18 20:48:01 +02:00
Paul Eggert
028a23dc9d * lisp/textmodes/texinfmt.el: Chassell is no longer maintainer. 2019-05-18 11:05:38 -07:00
Jean-Christophe Helary
d6e7b18db1 Bob Chassell passed away
* doc/lispintro/emacs-lisp-intro.texi (About the Author): Update.
2019-05-18 11:05:38 -07:00
Paul Eggert
ae7056793c Fix recent Tramp typo that broke the build
‘make bootstrap’ without this patch should reproduce the problem.
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled):
Autoload zeroconf-init.
2019-05-18 10:51:02 -07:00
Basil L. Contovounesios
63ffb61396 Remove XEmacs audio checks from mm-decode.el
For discussion, see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg01087.html
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00584.html
* lisp/gnus/mm-decode.el (mm-inline-media-tests): Remove no-op media
tests for XEmacs features.
2019-05-18 18:12:04 +01:00
Paul Eggert
db9af10394 For SVG, 8192 is the new 256
Prefer librsvg for display of splash.svg
When both librsvg and Imagemagick are available, Emacs should
prefer librsvg to render SVG images.  However, Emacs was using
Imagemagick to render its own splash.svg file because
image-type-from-file-header returned nil for that file.
* lisp/image.el (image-type-from-buffer)
(image-type-from-file-header): Look at the first 8192 bytes of
the image, not just the first 256.  For Emacs’s own splash.svg
file, image-type-header-regexps needs to look at 939 bytes.
8192 bytes is a reasonable number nowadays given typical file
system design.
* test/lisp/image-tests.el (image-tests--emacs-images-directory):
New contant.
(image-type-from-file-header-test): New test.
2019-05-18 10:01:10 -07:00
Michael Albinus
5b8be5809e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2019-05-18 18:14:39 +02:00
Michael Albinus
16f14a4dbb Bug#35769
* lisp/net/tramp-sh.el: (tramp-maybe-open-connection):
Arrange `process-environment' that it doesn't work for local
processes.  (Bug#35769)
2019-05-18 18:14:17 +02:00
Alan Mackenzie
95fb826dc5 CC Mode: Handle several consecutive noise macros in declaration contexts.
In the bug scenario, the second and subsequent noise macros with parentheses
were getting font-lock-type-face.

* lisp/progmodes/cc-engine.el (c-end-of-token)
(c-forward-noise-clause-not-macro-decl): New functions.
(c-find-decl-prefix-search): Handle noise macros by skipping over them.
(c-forward-decl-or-cast-1): In the loop checking for types, skip over all
consecutive noise macros with parens, not just one.
2019-05-18 15:20:49 +00:00
Eli Zaretskii
67b6c1b295 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2019-05-18 17:46:29 +03:00
Bastien
9fcc991229 Fix missing declaration in gnus-sum.el
* lisp/gnus/gnus-sum.el (gnus-tmp-name): Declare var.
2019-05-18 16:45:00 +02:00
Eli Zaretskii
721c520f36 Fix display of images on MS-Windows broken by a recent commit
* src/image.c (initialize_image_type): Test if the type is in
Vlibrary_cache up front, and return true without calling the
'init' method if the type was already initialized.
2019-05-18 17:44:16 +03:00
Michael Albinus
b0a0705a4e Suppress compiler warnings for older Emacsen in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Add error name to test.
(tramp-test30-make-process, tramp-test45-unload):
Suppress compiler warnings from older Emacsen.
2019-05-18 16:04:58 +02:00
Michael Albinus
cac8884d89 Require less packages in Tramp
* lisp/net/tramp-compat.el (format-spec): Do not require advice, cl-lib,
custom, password-cache, timer and ucs-normalize.

* lisp/net/tramp-gvfs.el: Do not require zeroconf.  Declare
zeroconf-* functions.
(tramp-gvfs-enabled): Autoload `zeroconf-init'.

* lisp/net/tramp-sh.el: Do not require dired.

* lisp/net/tramp.el (tramp-get-debug-buffer): Do not require outline.
(tramp-file-name-for-operation): Extend docstring.
(tramp-parse-netrc): Do not require netrc.  Autoload `netrc-parse'.
2019-05-18 16:04:02 +02:00
Mattias Engdegård
1943220d1b Don't use file notification on non-file buffers
Allow non-file buffers to declare that notification on their
default-directory is sufficient to know when auto-revert updates are
required by setting the new variable `buffer-auto-revert-by-notification'
to non-nil.  If nil, the default, then auto-revert will poll
those buffers instead. (bug#35418).
Currently, only Dired sets that variable.

* lisp/autorevert.el (auto-revert-buffers):
Modify condition for using notification.
* lisp/files.el (buffer-auto-revert-by-notification): New variable.
* lisp/dired.el (dired-mode): Set buffer-auto-revert-by-notification.
* doc/emacs/arevert-xtra.texi (Non-File Buffers): Document new variable.
* etc/NEWS (Changes in Specialized Modes and Packages): Describe new variable.
2019-05-18 14:16:21 +02:00
Lars Ingebrigtsen
4bf447bb91 (epa-file-decode-and-insert): Byte compilation warning fix
* lisp/epa-file.el (epa-file-decode-and-insert): Remove
superfluous call to `string-to-multibyte string'.
2019-05-18 11:18:53 +02:00
Michael Albinus
168b8322c3 * lisp/net/tramp.el (tramp-interrupt-process): Return proper value. 2019-05-18 11:11:36 +02:00
Michael Albinus
b9303ac293 ; Add comment in tramp-archive.el 2019-05-18 11:11:23 +02:00
Eli Zaretskii
45ffe7329e Remove usage of string-as-unibyte in arc-mode
* lisp/arc-mode.el (archive-l-e): Encode with utf-8-emacs-unix
instead of using string-as-unibyte.
2019-05-18 10:12:57 +02:00
Eli Zaretskii
6c9a1deb41 Fix visiting and saving UTF-16 encoded XML files
* lisp/international/mule.el (sgml-xml-auto-coding-function):
When the 'enncoding' tag specifies a UTF-16 encoding, enforce
saving the buffer with BOM, per the XML spec.
(xml-find-file-coding-system): Recognize UTF-16 encodings with
BOM.  (Bug#35766)  (Bug#8282)
* lisp/international/mule-cmds.el (select-safe-coding-system):
Don't consider UTF-16 encodings with and without BOM as
"different", so as not to annoy users with redundant questions
about mismatch between the XML/SGML header and the selected
explicit encoding.
2019-05-18 10:15:19 +03:00
Lars Ingebrigtsen
d0b72dbba0 Mitigate byte-compile warning in arc-mode
* lisp/arc-mode.el (byte-after): Remove defsubst.
Replace all calls to byte-after with get-byte throughout the file,
because byte-after gave compilation warnings.
2019-05-18 07:47:32 +02:00
Eli Zaretskii
a7a730e32a (hexl-insert-multibyte-char): Avoid using `string-as-unibyte'
* lisp/hexl.el (hexl-insert-multibyte-char): Avoid using
`string-as-unibyte' in the fallback case.
2019-05-18 07:25:20 +02:00
Lars Ingebrigtsen
635d7a39bc (dirtrack-toggle, dirtrackp): Remove obsolete aliases
* lisp/dirtrack.el (dirtrack-toggle, dirtrackp): Remove
function/variable aliases declared obsolete in Emacs 23.1 (and
that issued a byte-compile warning).
2019-05-18 07:25:19 +02:00
Paul Eggert
41bf865329 Clean up and simplify image-type setup
This also fixes an unlikely hang involving a circular image
description.
* src/dispextern.h (struct image.type): Now pointer-to-const.
* src/image.c (struct image_type.init) [!WINDOWSNT]: Omit.
(IMAGE_TYPE_INIT): New macro.
(image_types): Now a small array-of-const, not a pointer.
(CACHE_IMAGE_TYPE): Remove; the code’s simpler without it.
(ADD_IMAGE_TYPE): Remove this macro, replacing with ...
(add_image_type): ... this equivalent function.  All uses changed.
(define_image_type): Remove.  All uses removed.
(valid_image_p): Use FOR_EACH_TAIL_SAFE to avoid Emacs hanging
if the user creates a circular description of an image.
(xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
(gif_type, imagemagick_type, svg_type, gs_type):
Remove; now done by image_types.
(init_imagemagick_functions): Remove decl of nonexistent function.
(gs_clear_image): Remove; all uses replaced by image_clear_image.
(initialize_image_type): New function, which captures a lot
of the previously-scattered WINDOWSNT ifdefs.
(lookup_image_type): Use it.
(reset_image_types): Remove.  All uses removed.
(syms_of_image): Don’t worry about ignoring image_types for
pdumper, since it’s a constant now.
2019-05-17 18:43:28 -07:00
Stefan Monnier
4fbcecfaef * lisp/gnus/gnus-sum.el (gnus-tmp-thread): New var
The recent change to use lexical-binding introduced a bug because
gnus-summary-line-format-alist refers to variable `thread` which is now
lexical and hence not available there any more.  Replace it with
a dynamically scoped var `gnus-tmp-thread` as was already done with
all other vars.

(gnus-summary-line-format-alist): Use it instead of `thread`.
(gnus-summary-prepare-threads): Bind it around call to (eval
gnus-summary-line-format-spec).
2019-05-17 14:42:36 -04:00
Eric Abrahamsen
7ce4b35ac4 Backport: Fix name of gnus-summary-sort-by-mark(s)
* lisp/gnus/gnus-sum.el (gnus-summary-sort-by-marks): Needs the
  "s", according to docs and keymap both. (bug#35765)

(cherry picked from commit 13248f7444)
2019-05-17 15:23:28 +01:00
Lars Ingebrigtsen
deb88392c6 Move Info-edit-* commands from info.el to obsolete/info-edit.el
* lisp/info.el: Move Info-edit-* commands to obsolete/info-edit.el.

* lisp/obsolete/info-edit.el: New file.
2019-05-17 13:55:43 +02:00
Lars Ingebrigtsen
81ce8d9d11 Use cl-assert instead of assert in ps-print.el
* lisp/ps-print.el (ps-begin-job): Use cl-assert instead of assert
and require cl-lib.
2019-05-17 12:27:26 +02:00
Lars Ingebrigtsen
004ef8a8e1 (ps-begin-job): Remove two unneeded string-as-unibyte calls
* lisp/ps-print.el (ps-begin-job): Remove two unneeded
string-as-unibyte calls to avoid byte compilation warnings.
2019-05-17 12:16:31 +02:00