]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoRemove many items obsolete since Emacs 23.2 and 23.3
Stefan Kangas [Mon, 24 Aug 2020 01:28:48 +0000 (03:28 +0200)]
Remove many items obsolete since Emacs 23.2 and 23.3

* lisp/allout.el (allout-init):
* lisp/emacs-lisp/shadow.el (shadows-compare-text-p):
* lisp/ffap.el (ffap-version):
* lisp/filecache.el (file-cache-choose-completion):
* lisp/help.el (print-help-return-message):
* lisp/image-mode.el (image-mode-maybe):
* lisp/imenu.el (imenu-example--name-and-position):
* lisp/international/mule-cmds.el (princ-list):
* lisp/mail/rmail.el (rmail-highlight-face):
* lisp/minibuffer.el (read-file-name-predicate):
* lisp/mouse.el (mouse-choose-completion):
* lisp/progmodes/cc-cmds.el (c-forward-into-nomenclature):
* lisp/progmodes/xscheme.el
(advertised-xscheme-send-previous-expression):
* lisp/simple.el (completion-base-size)
(choose-completion-delete-max-match, exchange-dot-and-mark):
* lisp/subr.el (eval-next-after-load):
* lisp/term.el (term-dynamic-simple-complete):
Remove items, obsolete since Emacs 23.2 and 23.3.
* doc/misc/cc-mode.texi (Movement Commands): Doc fix.
* doc/lispref/help.texi (Accessing Documentation):
* lisp/emacs-lisp/edebug.el (edebug-wrap-def-body):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/progmodes/idlwave.el (idlwave-make-modified-completion-map-xemacs)
(idlwave-make-modified-completion-map-emacs)
(idlwave-choose-completion):
* lisp/progmodes/vhdl-mode.el:
* lisp/term.el (term-dynamic-list-completions):
Remove references to 'mouse-choose-completion'.
* lisp/image-mode.el (image-mode-to-text):
Remove reference to 'image-mode-maybe'.
* lisp/mail/rmail.el (rmail-highlight-headers):
Use 'rmail-highlight' face instead of 'rmail-highlight-face'.
* lisp/progmodes/antlr-mode.el (antlr-mode-map, antlr-mode-menu):
Remove reference to 'c-forward-into-nomenclature'.
* lisp/simple.el (choose-completion, choose-completion-string)
(completion-list-mode, completion-setup-function): Don't use
'completion-base-size'.
; * etc/NEWS: List removed items.

This was discussed in
https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00400.html

4 years agoQuote other suspicious characters in mml-insert-tag.
Asher Gordon [Mon, 24 Aug 2020 01:37:10 +0000 (03:37 +0200)]
Quote other suspicious characters in mml-insert-tag.

* lisp/gnus/mml.el (mml-insert-tag): Ensure that the characters
"[]<>=" are quoted correctly (bug#43009).
Copyright-paperwork-exempt: yes

4 years agoSimplify by using Gnulib sigdescr_np module
Paul Eggert [Sun, 23 Aug 2020 21:59:15 +0000 (14:59 -0700)]
Simplify by using Gnulib sigdescr_np module

Inspired by a straightforward patch by Bruno Haible.
* admin/merge-gnulib (GNULIB_MODULES): Add sigdescr_np.
* configure.ac: Do not check for sys_siglist or __sys_siglist.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/sigdescr_np.c, m4/sigdescr_np.m4: New files, copied from Gnulib.
* src/sysdep.c (sys_siglist, sys_siglist_entries): Remove.
(init_signals): Do not initialize sys_siglist.
(safe_strsignal): Use sigdescr_np instead of sys_siglist.

4 years agoUpdate from Gnulib
Paul Eggert [Sun, 23 Aug 2020 21:09:48 +0000 (14:09 -0700)]
Update from Gnulib

This incorporates:
2020-08-23 intprops: be consistent about +X vs X+0
2020-08-23 intprops: fix INT_MULTIPLY_WRAPV bit-field bug
2020-08-23 verify: Make assume work on bit field expressions
2020-08-23 libc-config: Improve comments
2020-08-22 verify: Do use __builtin_assume on clang
2020-08-22 sig2str: Add more signals
2020-08-21 sigdescr_np: New module
* lib/cdefs.h, lib/intprops.h, lib/sig2str.c, lib/string.in.h:
* lib/verify.h, m4/string_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

4 years agoFix more compilation warnings in xdisp.c
Eli Zaretskii [Sun, 23 Aug 2020 19:09:39 +0000 (22:09 +0300)]
Fix more compilation warnings in xdisp.c

* src/xdisp.c (display_mode_element, decode_mode_spec_coding):
Avoid compilation warnings.

4 years agoFix a compilation warning in xdisp.c
Eli Zaretskii [Sun, 23 Aug 2020 18:52:06 +0000 (21:52 +0300)]
Fix a compilation warning in xdisp.c

* src/xdisp.c (gui_consider_frame_title): Fix compilation warning.
Reported by Lars Ingebrigtsen <larsi@gnus.org>.

4 years agoImprove handling of coding-system mnemonic indicators
Eli Zaretskii [Sun, 23 Aug 2020 18:23:45 +0000 (21:23 +0300)]
Improve handling of coding-system mnemonic indicators

This fixes assertion violations when the mnemonic is
given as a string, and allows non-ASCII characters be
used as mode-line mnemonic of a coding-system.
* src/xdisp.c (decode_mode_spec_coding): Handle multibyte
characters as coding-system's mnemonic.
(display_mode_element): If decode_mode_spec returns a multibyte
string, display it as multibyte.
* src/coding.c (Fdefine_coding_system_internal)
(Fcoding_system_put): If :mnemonic is a string, use its first
character.  This avoids assertion violations if someone uses a
string as the mnemonic of a coding-system.

4 years agoAlways make a multibyte string for the frame title (bug#42904)
Mattias Engdegård [Fri, 21 Aug 2020 14:09:04 +0000 (16:09 +0200)]
Always make a multibyte string for the frame title (bug#42904)

* src/xdisp.c (gui_consider_frame_title): Multibyte-encode any raw
bytes in the title, and then pass a multibyte string to the back-end
for use as a frame title.  This cuts down a little on the rubbish
shown when raw bytes sneak in by mistake (as part of the buffer name,
for instance).

4 years agoFix image display on w32 as followup to recent changes
Eli Zaretskii [Sun, 23 Aug 2020 16:25:58 +0000 (19:25 +0300)]
Fix image display on w32 as followup to recent changes

The new code calls 'malloc' and 'free', so we can no longer
* src/image.c (struct image_type): Rename 'load' to 'load_img' and
'free' to 'free_img'.  All callers changed.
(free_image) [WINDOWSNT]: Don't #undef 'free'.

4 years agoSilence compiler warning (bug#40845)
Alan Third [Sun, 23 Aug 2020 16:06:02 +0000 (17:06 +0100)]
Silence compiler warning (bug#40845)

* src/image.c (lookup_image): Don't allow face to be NULL.

4 years agoSet basic SVG attributes (bug#40845)
Alan Third [Sun, 23 Aug 2020 15:28:17 +0000 (16:28 +0100)]
Set basic SVG attributes (bug#40845)

* test/manual/image-transforms-tests.el: Replace hard-coded colors
with defaults.
* src/dispextern.h (struct image):
* src/image.c (search_image_cache):
(xbm_load_image):
(xbm_load):
(pbm_load): Rename from frame to face where relevant.
(svg_load_image): Parse the image to find out the size, then wrap it
in another SVG to set a new size and colors, etc.
(lookup_image): Use the face colors instead of the frame colors.
(search_image_cache): Add ability to ignore the face colors.
(uncache_image): Uncache all copies of the image that share the spec,
even if the face colors don't match.
* etc/NEWS: Describe the changes.

4 years agoRework direct async processes in Tramp
Michael Albinus [Sun, 23 Aug 2020 11:30:43 +0000 (13:30 +0200)]
Rework direct async processes in Tramp

* doc/misc/tramp.texi (Remote processes): Precise restrictions for direct
async processes.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-direct-async-process-p): Make it more precise.
(tramp-handle-make-process): Rewrite, based on `make-process'.

* test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
Add `tramp-direct-async-args` for mock method.
(tramp-test29-start-file-process, tramp-test30-make-process):
Use weaker regexp checking "foo".
(tramp-test30-make-process): Do not check stderr for direct async processes.
(tramp--test--deftest-direct-async-process): New defmacro.
(tramp-test29-start-file-process-direct-async)
(tramp-test30-make-process-direct-async): New tests.

4 years ago; * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Instrument test.
Michael Albinus [Sun, 23 Aug 2020 11:19:02 +0000 (13:19 +0200)]
; * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Instrument test.

4 years agoMinor fixes for last change
Eli Zaretskii [Sun, 23 Aug 2020 07:10:47 +0000 (10:10 +0300)]
Minor fixes for last change

* lisp/international/kinsoku.el (kinsoku): Provide 'kinsoku'.
* lisp/cus-start.el (standard): Use 'require' instead of 'load.

* etc/NEWS:
* doc/emacs/display.texi (Visual Line Mode): Improve wording and
markup of last change.

4 years agoImprove word wrapping for CJK characters
Yuan Fu [Wed, 27 May 2020 02:47:27 +0000 (22:47 -0400)]
Improve word wrapping for CJK characters

Note about the change around line 9257 and 23372:

Before, the test for whitespace checks for can_wrap_before and
can_wrap_after simutaniously.  Now we separate these two checks, and
the logic needs to change a little bit.  However, when we don't enable
the new wrapping feature, 'can_wrap_after' is equivalent to
'IT_DISPLAYING_WHITESPACE' and 'can_wrap_before' is equivalent to
'!IT_DISPLAYING_WHITESPACE'.  And the new logic is equivalent with the
old one in that case.

Old logic:

    if (whitespace) /* Which means can wrap after && can't wrap
                       before.  */
      may_wrap = true;

    else if (may_wrap) /* aka (!whitespace && may_wrap)
      (set wrap point)  * aka (can't wrap after && can wrap before
      may_wrap = false  *      && may_wrap)
                        */

New logic:

    if (can_wrap_after)
      next_may_wrap = true
    else
      next_may_wrap = false;

    if (may_wrap && can_wrap_before)
      (set wrap point)

    /* Update may_wrap.  */
    may_wrap = next_may_wrap;

* src/xdisp.c (it_char_has_category, char_can_wrap_before)
(char_can_wrap_after): New functions.
(move_it_in_display_line_to, display_line): Replace calls to
'IT_DISPLAYING_WHITESPACE' with either 'char_can_wrap_before' or
'char_can_wrap_after'.
(word-wrap-by-category): New variable.

* lisp/cus-start.el (minibuffer-prompt-properties--setter): Add
'word-wrap-by-category' as a customizable variable.

* doc/emacs/display.texi (Visual Line Mode): Add a paragraph about the
new 'word-wrap-by-category' feature.
* etc/NEWS: Announce the change.

4 years agoBind the time zone so that the tests work everywhere
Lars Ingebrigtsen [Sat, 22 Aug 2020 21:34:54 +0000 (14:34 -0700)]
Bind the time zone so that the tests work everywhere

4 years agoUse lexical-binding and remove compat code
Lars Ingebrigtsen [Sat, 22 Aug 2020 20:47:31 +0000 (22:47 +0200)]
Use lexical-binding and remove compat code

4 years agoFix documentation of a recent change in Dired
Eli Zaretskii [Sat, 22 Aug 2020 16:14:35 +0000 (19:14 +0300)]
Fix documentation of a recent change in Dired

* etc/NEWS:
* doc/emacs/dired.texi (Dired Enter): Fix the text describing
'dired-maybe-use-globstar'.

* lisp/dired.el (dired-maybe-use-globstar): Add :version.

4 years ago; Copyright fix
Glenn Morris [Sat, 22 Aug 2020 15:58:27 +0000 (16:58 +0100)]
; Copyright fix

Author has assignment

4 years ago; * lisp/progmodes/grep.el (grep-find-command): Fix typos.
Eli Zaretskii [Sat, 22 Aug 2020 15:57:57 +0000 (18:57 +0300)]
; * lisp/progmodes/grep.el (grep-find-command): Fix typos.

4 years agoClarify inline-letevals in the manual
Lars Ingebrigtsen [Sat, 22 Aug 2020 15:57:35 +0000 (17:57 +0200)]
Clarify inline-letevals in the manual

* doc/lispref/functions.texi (Inline Functions): Try to clarify
what inline-letevals really does, and how it differs from `let'
(bug#31052).

4 years agoHandle globstar in dired
Tino Calancha [Sat, 22 Aug 2020 15:39:16 +0000 (17:39 +0200)]
Handle globstar in dired

Allow user to enable globstar when the shell support
it and disable it by default (e.g. bash).
* lisp/dired.el (dired-maybe-use-globstar): New user option.
(dired-enable-globstar-in-shell): New variable.
(dired-insert-directory): if `dired-maybe-use-globstar' is
non-nil and the shell supports globstar, then enable it.

* doc/emacs/dired.texi: Document feature.
; * etc/NEWS: Add entry.

4 years agoFix NS build failure
Alan Third [Sat, 22 Aug 2020 15:31:02 +0000 (16:31 +0100)]
Fix NS build failure

* src/thread.c: xgselect isn't used with NS, even when HAVE_GLIB is
defined.

4 years agoExtend NSString further and use the new methods
Alan Third [Thu, 20 Aug 2020 22:45:38 +0000 (23:45 +0100)]
Extend NSString further and use the new methods

* src/nsfns.m (ns_set_icon_name):
(ns_set_name):
(ns_set_represented_filename):
(ns_implicitly_set_icon_type):
(ns_set_icon_type):
(ns_appkit_version_str):
(Fx_create_frame):
(Fns_read_file_name):
(Fns_get_resource):
(Fns_set_resource):
(Fns_list_colors):
(Fns_perform_service):
(ns_do_applescript): Use the new NSString methods.
([NSString stringWithLispString:]): Fix the surrogate algorithm.
([NSString lispString]): New method.
* src/nsterm.h (NSString): Add new method.
* src/nsterm.m ([EmacsApp openFile:]):
([EmacsApp requestService:userData:error:]):
([EmacsApp fulfillService:withArg:]):
([EmacsView changeFont:]):
([EmacsView setMarkedText:selectedRange:]):
([EmacsView initFrameFromEmacs:]):
([EmacsView performDragOperation:]):
([EmacsView performDragOperation:]):
([EmacsView performDragOperation:]):
([EmacsWindow accessibilityAttributeValue:]): Use the new NSString
methods.

4 years agoDoc string (and defcustom type) fix for grep-find-command
Lars Ingebrigtsen [Sat, 22 Aug 2020 14:27:17 +0000 (16:27 +0200)]
Doc string (and defcustom type) fix for grep-find-command

* lisp/progmodes/grep.el (grep-find-command): Add the cons type to
the defcustom, and document it (bug#36113).  (It has always been a
valid value for the variable.)

4 years agonndoc minor clean-up
Lars Ingebrigtsen [Sat, 22 Aug 2020 13:42:17 +0000 (15:42 +0200)]
nndoc minor clean-up

* lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): Erase the
buffer before changing multibyteness.

4 years agognus-icalendar does not understand multiple repeating days
Jan Tatarik [Sat, 22 Aug 2020 13:39:17 +0000 (15:39 +0200)]
gnus-icalendar does not understand multiple repeating days

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-days): New function (bug#39782).
(gnus-icalendar-event:org-timestamp): New function.
(gnus-icalendar--find-day): Use them.
(gnus-icalendar-event--org-timestamp): Ditto.

4 years agoMake ruby-parse-partial more stable
Dmitry Gutov [Sat, 22 Aug 2020 13:21:50 +0000 (16:21 +0300)]
Make ruby-parse-partial more stable

* lisp/progmodes/ruby-mode.el (ruby-parse-partial):
Don't call ruby-deep-indent-paren-p (bug#42841).

4 years agoRestrict the range of image formats to be converted
Lars Ingebrigtsen [Sat, 22 Aug 2020 13:18:15 +0000 (15:18 +0200)]
Restrict the range of image formats to be converted

* lisp/image/image-converter.el (image-converter--filter-formats):
New function.
(image-converter): Mention this in the doc string.

4 years agoBind mwheel-scroll on more parts of frame's display
Stefan Kangas [Sat, 22 Aug 2020 11:21:13 +0000 (13:21 +0200)]
Bind mwheel-scroll on more parts of frame's display

* lisp/mwheel.el (mouse-wheel-mode): Bind unmodified 'mwheel-scroll'
on scroll bars, fringes, margins, header and mode line.  (Bug#5557)
(mouse-wheel--create-scroll-keys): New helper function for
'mouse-wheel-mode'.
* test/lisp/mwheel-tests.el: New file.

4 years agoFix several todo-mode.el editing bugs (bug#42976)
Stephen Berman [Fri, 21 Aug 2020 20:41:48 +0000 (22:41 +0200)]
Fix several todo-mode.el editing bugs (bug#42976)

* lisp/calendar/todo-mode.el (todo-insert-item--basic): Ensure the
target todo file is in todo-mode.
(todo-edit-item--text): When editing a done item comment, prevent
clobbering match data on finishing the edit.
(todo-edit-item--header): Ensure that decrementing the month of
the date header works for intervals greater than a year, and when
incrementing or decrementing the month crosses one or more years,
adjust the year as needed.
(todo-read-category): If we're outside of todo-mode and there is a
current todo file, use it; otherwise, use the default todo file.

* test/lisp/calendar/todo-mode-tests.el
(todo-test-edit-item-date-month): New test.

* test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Modify
to accommodate new test.

4 years agoUpdate from Gnulib
Paul Eggert [Fri, 21 Aug 2020 19:19:18 +0000 (12:19 -0700)]
Update from Gnulib

This incorporates:
2020-08-20 sigabbrev_np: New module
2020-08-20 stdalign: Fix 32-bit test failures clang versions < 8
2020-08-17 careadlinkat: speedup for GCC 10 with GCC_LINT
2020-08-17 Assume autoconf >= 2.64
* build-aux/config.guess, build-aux/config.sub, lib/careadlinkat.c:
* lib/stdalign.in.h, lib/string.in.h, m4/std-gnu11.m4, m4/string_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

4 years agoMinor mode doc string clarification
Lars Ingebrigtsen [Fri, 21 Aug 2020 15:15:22 +0000 (17:15 +0200)]
Minor mode doc string clarification

* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Clarify that the minor mode hook is called both when enabling and
disabling the mode (bug#34073).

4 years agoFread_variable doc string clarification
Lars Ingebrigtsen [Fri, 21 Aug 2020 14:55:55 +0000 (16:55 +0200)]
Fread_variable doc string clarification

* src/minibuf.c (Fread_variable): Doc string clarification (bug#38886).

4 years agohelp-at-pt-display-when-idle doc string clarification
Lars Ingebrigtsen [Fri, 21 Aug 2020 14:33:33 +0000 (16:33 +0200)]
help-at-pt-display-when-idle doc string clarification

* lisp/help-at-pt.el (help-at-pt-display-when-idle): Clarify when
kbd-help is useful (bug#39295).

4 years agoMention `exec-path' in some process related doc strings
Lars Ingebrigtsen [Fri, 21 Aug 2020 14:15:18 +0000 (16:15 +0200)]
Mention `exec-path' in some process related doc strings

* src/callproc.c (Fcall_process_region):
(Fcall_process):
* src/process.c (Fmake_process): Mention `exec-path' in the doc
strings (bug#42704).

4 years agoHighlight error messages from diff in diff-mode
Lars Ingebrigtsen [Fri, 21 Aug 2020 13:58:32 +0000 (15:58 +0200)]
Highlight error messages from diff in diff-mode

* lisp/vc/diff-mode.el (diff-error): New face (bug#2739).
(diff-font-lock-keywords): Use it to highlight lines like "diff: "
which are error messages from diff (for instance, when a file
doesn't exist).

4 years agoFix problem with 8bit content-transfer-encoding in nndoc mbox files
Lars Ingebrigtsen [Fri, 21 Aug 2020 13:36:45 +0000 (15:36 +0200)]
Fix problem with 8bit content-transfer-encoding in nndoc mbox files

* lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): If we're
reading an mbox file, it may contain messages that use
content-transfer-encoding 8bit, which means that we have to treat
the file as a sequence of byte (bug#42951).  This avoids
double-decoding -- once by Emacs when inserting the mbox into the
buffer, and once by Gnus when displaying the articles.

4 years ago; * etc/NEWS: Fix a recently added entry.
Eli Zaretskii [Fri, 21 Aug 2020 13:35:58 +0000 (16:35 +0300)]
; * etc/NEWS: Fix a recently added entry.

4 years agoClarify docs about line movement
Noam Postavsky [Fri, 21 Aug 2020 13:08:27 +0000 (15:08 +0200)]
Clarify docs about line movement

* doc/lispref/positions.texi (Text Lines, Screen Lines): Add index
entries.
* lisp/simple.el (move-beginning-of-line): Remove incorrect mention of
images, and reference beginning-of-visual-line.
* src/editfns.c (Fline_beginning_position): Reference
`vertical-motion' (bug#35899).

4 years agoFix lock failures in xg_select
Pip Cet [Fri, 21 Aug 2020 12:56:06 +0000 (14:56 +0200)]
Fix lock failures in xg_select

* src/xgselect.c (release_select_lock, acquire_select_lock):
Introduce.
(xg_select): Use `acquire_select_lock', `release_select_lock'.
* src/thread.c (release_select_lock): Introduce for non-GLib builds.
(really_call_select): Call `release_select_lock'.  Simplify by
ensuring acquisition of the lock always succeeds (bug#36609).

4 years agoFix return value for CCL opcode lookup-integer
Pip Cet [Fri, 21 Aug 2020 12:47:45 +0000 (14:47 +0200)]
Fix return value for CCL opcode lookup-integer

* src/ccl.c (ccl_driver): Fix LookupIntConstTbl return value.
* test/lisp/international/ccl-tests.el (ccl-hash-table): Add test.
* lisp/international/ccl.el (ccl-embed-data): Don't pass non-numbers
to `ccl-fixnum' (bug#36740).

4 years agoMake hs-special-modes-alist also work for modes derived from those modes
Tobias Zawada [Fri, 21 Aug 2020 12:42:20 +0000 (14:42 +0200)]
Make hs-special-modes-alist also work for modes derived from those modes

* lisp/progmodes/hideshow.el (hs-grok-mode-type): Also set up
hideshow variables based on hs-special-modes-alist in derived
modes (bug#39354).

4 years agoHave ispell add new LocalWords lines after any such existing lines
Kevin Ryde [Fri, 21 Aug 2020 12:17:56 +0000 (14:17 +0200)]
Have ispell add new LocalWords lines after any such existing lines

* textmodes/ispell.el (ispell-add-per-file-word-list): Add new
LocalWords line just after existing such lines.  Good to keep words
together or if deliberately placed somewhere special (bug#20486).

4 years agoFix displaying inline ical attachments with no charset
Christophe Troestler [Fri, 21 Aug 2020 11:31:38 +0000 (13:31 +0200)]
Fix displaying inline ical attachments with no charset

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-with-decoded-handle): Check whether there is a
charset before using it (bug#40290).

Copyright-paperwork-exempt: yes

4 years agoTweak completion of Makefile targets
Gregory Heytings [Fri, 21 Aug 2020 10:44:52 +0000 (12:44 +0200)]
Tweak completion of Makefile targets

* lisp/pcmpl-gnu.el (pcmpl-gnu-make-targets): Require that target
names not be preceded by a TAG character (bug#42411).

Copyright-paperwork-exempt: yes

4 years agoRemove some compat code from cperl-mode
Stefan Kangas [Sun, 16 Aug 2020 11:11:16 +0000 (13:11 +0200)]
Remove some compat code from cperl-mode

* lisp/progmodes/cperl-mode.el (cperl-use-syntax-table-text-property)
(cperl-syntaxify-by-font-lock, cperl-mode-map, cperl-mode)
(cperl-windowed-init, cperl-init-faces, cperl-write-tags): Remove
some XEmacs and <21 compat code.

4 years agoMake image cache lookups work again after previous patch
Lars Ingebrigtsen [Thu, 20 Aug 2020 23:29:26 +0000 (01:29 +0200)]
Make image cache lookups work again after previous patch

* src/image.c (search_image_cache): Fix reversed logic in previous
patch.

4 years ago* lisp/simple.el (previous-line-or-history-element): Handle logical lines.
Juri Linkov [Thu, 20 Aug 2020 23:21:26 +0000 (02:21 +0300)]
* lisp/simple.el (previous-line-or-history-element): Handle logical lines.

When 'line-move-visual' is nil, use 'end-of-line' to move point to the end
of the first logical line (bug#42862)

Thanks to Michael Welsh Duggan <mwd@md5i.com>.

4 years agoFix off-by-one error in decoded-time-add (with months)
Lars Ingebrigtsen [Thu, 20 Aug 2020 22:38:23 +0000 (00:38 +0200)]
Fix off-by-one error in decoded-time-add (with months)

* lisp/calendar/time-date.el (decoded-time-add): Fix month
addition, which was off-by-one.

4 years agoFix problem with non-ASCII characters in ediff error messages
Lars Ingebrigtsen [Thu, 20 Aug 2020 20:23:35 +0000 (22:23 +0200)]
Fix problem with non-ASCII characters in ediff error messages

* lisp/vc/ediff-diff.el (ediff-prepare-error-list): Decode the
data from diff before displaying (bug#5050).  This fixes a problem
with displaying raw bytes in the error messages in non-ASCII locales.

4 years agoMake image-mode give better feedback when the buffer is empty
Lars Ingebrigtsen [Thu, 20 Aug 2020 18:09:51 +0000 (20:09 +0200)]
Make image-mode give better feedback when the buffer is empty

* lisp/image-mode.el (image-mode): Give a less confusing message
if we don't have any image data (bug#16062).  Also leave the
buffer in fundamental mode.

4 years agoFix NS crash on invalid frame title string (bug#42904)
Mattias Engdegård [Tue, 18 Aug 2020 10:58:12 +0000 (12:58 +0200)]
Fix NS crash on invalid frame title string (bug#42904)

Instead of blindly assuming that all Emacs strings are valid UTF-8,
which they are not, use a more careful conversion going via UTF-16
which is what NSString uses internally.  Unpaired surrogates will
still go through to the NSString objects, but the NS libs handle them
gracefully.

* src/nsterm.h (EmacsString): New category.
* src/nsfns.m (all_nonzero_ascii): New helper function.
([NSString stringWithLispString:]): New method.
(ns_set_name_internal): Use new conversion method.

4 years agoFix compilation warning in vc-cvs from previous change
Lars Ingebrigtsen [Thu, 20 Aug 2020 15:18:46 +0000 (17:18 +0200)]
Fix compilation warning in vc-cvs from previous change

* lisp/vc/vc-cvs.el (log-edit-extract-headers): Fix compilation
warning.

4 years agoFix message.el compilation warning
Lars Ingebrigtsen [Thu, 20 Aug 2020 15:17:48 +0000 (17:17 +0200)]
Fix message.el compilation warning

* lisp/gnus/message.el (smtpmail-stream-type): Fix compilation
warning from last change.

4 years agoAllow specifying the TLS port in X-Message-SMTP-Method
Lars Ingebrigtsen [Thu, 20 Aug 2020 15:03:04 +0000 (17:03 +0200)]
Allow specifying the TLS port in X-Message-SMTP-Method

* lisp/gnus/message.el (message-multi-smtp-send-mail): If the user
has specified the TLS SMTP port, then force a TLS connection
(bug#38066).

4 years agoDon't message the hunk status when just going to it
Lars Ingebrigtsen [Thu, 20 Aug 2020 14:52:57 +0000 (16:52 +0200)]
Don't message the hunk status when just going to it

* lisp/vc/diff-mode.el (diff-goto-source): Don't output a status
about the hunk just when jumping to it (bug#38370).  This would
output "Hunk already applied" when browsing diffs.

4 years agoAdd a new way to encode unprintable characters in Message: url-encode
Lars Ingebrigtsen [Thu, 20 Aug 2020 14:42:06 +0000 (16:42 +0200)]
Add a new way to encode unprintable characters in Message: url-encode

* lisp/gnus/message.el (message-fix-before-sending): Add a new
conversion method for invalid characters -- URL-encoding (bug#38955).

4 years agoFix problem with unprintable characters in Message headers
Lars Ingebrigtsen [Thu, 20 Aug 2020 14:33:29 +0000 (16:33 +0200)]
Fix problem with unprintable characters in Message headers

* lisp/gnus/message.el (message-fix-before-sending): Remove
unprintable characters from the entire buffer, not just the body
(bug#38955).

4 years agoFix interactive spec of message-beginning-of-line
Lars Ingebrigtsen [Thu, 20 Aug 2020 14:12:07 +0000 (16:12 +0200)]
Fix interactive spec of message-beginning-of-line

* lisp/gnus/message.el (message-beginning-of-line): Fix problem
with C-S-a getting translated to C-a in message-mode (bug#39545).

4 years agoRemove the "Summary: " but from cvs checkins
Lars Ingebrigtsen [Thu, 20 Aug 2020 13:54:38 +0000 (15:54 +0200)]
Remove the "Summary: " but from cvs checkins

* lisp/vc/vc-cvs.el (vc-cvs-checkin): Remove the "Summary:" bit
from the comment (bug#40506).

4 years agomessage-sendmail-f-is-evil doc string fix
Lars Ingebrigtsen [Thu, 20 Aug 2020 13:27:07 +0000 (15:27 +0200)]
message-sendmail-f-is-evil doc string fix

* lisp/gnus/message.el (message-sendmail-f-is-evil): Make doc
string less confusing by removing a joke (bug#41096).

4 years agoAdd global-goto-address-mode
Noah Swainland [Thu, 20 Aug 2020 13:17:19 +0000 (15:17 +0200)]
Add global-goto-address-mode

* doc/emacs/misc.texi (Goto Address mode): Document it.

* lisp/net/goto-addr.el (global-goto-address-mode)
(goto-addr-mode--turn-on): New functions (bug#42937).

4 years ago; NEWS fix
Glenn Morris [Wed, 19 Aug 2020 19:53:29 +0000 (20:53 +0100)]
; NEWS fix

4 years agoFix minor issues after recent world-clock rename
Stefan Kangas [Wed, 19 Aug 2020 18:31:29 +0000 (20:31 +0200)]
Fix minor issues after recent world-clock rename

* lisp/time.el (world-clock-mode): Set 'revert-buffer-function'
buffer-locally rather than globally.
(display-time-world): Unobsolete alias for 'world-clock'.  Some users
might be used to the old name.

4 years ago; * etc/NEWS: Fix a recently added entry.
Eli Zaretskii [Wed, 19 Aug 2020 17:47:21 +0000 (20:47 +0300)]
; * etc/NEWS: Fix a recently added entry.

4 years ago; Minor simplification of two recent changes
Basil L. Contovounesios [Wed, 19 Aug 2020 13:43:11 +0000 (14:43 +0100)]
; Minor simplification of two recent changes

4 years agoMake shell-resync-dirs handle whitespace in directory names
Noah Friedman [Wed, 19 Aug 2020 13:59:59 +0000 (15:59 +0200)]
Make shell-resync-dirs handle whitespace in directory names

* lisp/shell.el (shell-resync-dirs): Correctly handle
whitespace in directory names (bug#23324).

4 years agoAllow searching interactively over completions in `M-x'
Juri Linkov [Wed, 19 Aug 2020 13:52:08 +0000 (15:52 +0200)]
Allow searching interactively over completions in `M-x'

* lisp/simple.el (read-extended-command): Allow doing interactive
searches over the completions (bug#12490).  This restores the
behaviour from Emacs 23 that was lost in Emacs 24.

4 years agoEnsure `bibtex-set-dialect' is executed in bibtex buffers
Grégoire Jadi [Wed, 19 Aug 2020 13:36:08 +0000 (15:36 +0200)]
Ensure `bibtex-set-dialect' is executed in bibtex buffers

* lisp/textmodes/bibtex.el (bibtex-mode): Call `bibtex-set-dialect'.
* test/automated/bibtex-tests.el: Add regression tests (bug#21764).

4 years agoMake etags-list-tags work with Exuberant ctags
Robert Weiner [Wed, 19 Aug 2020 13:28:32 +0000 (15:28 +0200)]
Make etags-list-tags work with Exuberant ctags

* lisp/progmodes/etags.el (etags-list-tags): Make the function
work with Exuberant ctags (bug#23400).

4 years agoFix #'(lambda ...) font locking
Anders Lindgren [Wed, 19 Aug 2020 12:19:12 +0000 (14:19 +0200)]
Fix #'(lambda ...) font locking

* lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p):
Fontize #'(lambda ...) better (bug#23465).

4 years agoFix a segfault in daemon mode Emacs when detaching an X session
Doug Gilmore [Wed, 19 Aug 2020 12:04:46 +0000 (14:04 +0200)]
Fix a segfault in daemon mode Emacs when detaching an X session

* src/xterm.c (x_uncatch_errors): Add a sanity check for
x_error_message (bug#23939).

4 years agoDistinguish errors in bytecomp-tests
Mattias Engdegård [Wed, 19 Aug 2020 11:42:31 +0000 (13:42 +0200)]
Distinguish errors in bytecomp-tests

* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-check-1)
(test-byte-opt-arithmetic, bytecomp-lexbind-check-1)
(bytecomp-lexbind-explain-1):
When comparing interpreted with compiled results, don't consider all
errors to be equal; take the error type into account.  (The error
arguments may differ, but there may be good reasons for that.)

4 years agoMake bytecomp-tests re-runnable
Mattias Engdegård [Wed, 19 Aug 2020 11:39:18 +0000 (13:39 +0200)]
Make bytecomp-tests re-runnable

* test/lisp/emacs-lisp/bytecomp-tests.el
(test-byte-comp-macro-expand-lexical-override): Remove functions
before testing so that the test can be run twice without failing.

4 years agoMake thingatpt recognise files names with @ in them
Tino Calancha [Wed, 19 Aug 2020 11:52:21 +0000 (13:52 +0200)]
Make thingatpt recognise files names with @ in them

* lisp/thingatpt.el (thing-at-point-file-name-chars): Add @
(Bug#24606).

4 years ago; Fix last change to comint.el
Basil L. Contovounesios [Wed, 19 Aug 2020 11:37:03 +0000 (12:37 +0100)]
; Fix last change to comint.el

* lisp/comint.el (comint-highlight-input): Add :version tag.
(comint-send-input): Fix indentation.

4 years agoAdd a variable to control VC completion over branch names
Tom Tromey [Wed, 19 Aug 2020 11:38:44 +0000 (13:38 +0200)]
Add a variable to control VC completion over branch names

* lisp/vc/vc-git.el (vc-git-revision-complete-only-branches): New
variable (bug#25710).
(vc-git-revision-table): Use it.

4 years agoBetter check for multi-hops when calling direct async processes
Michael Albinus [Wed, 19 Aug 2020 11:19:19 +0000 (13:19 +0200)]
Better check for multi-hops when calling direct async processes

* lisp/net/tramp-sh.el (tramp-multi-hop-p, tramp-compute-multi-hops):
Move them from here ...

* lisp/net/tramp.el (tramp-multi-hop-p, tramp-compute-multi-hops): ... here.
(tramp-direct-async-process-p): Use `tramp-compute-multi-hops'.

4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Wed, 19 Aug 2020 11:18:08 +0000 (13:18 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

4 years agoDon't override python font locking in comint
Carlos Pita [Wed, 19 Aug 2020 11:13:46 +0000 (13:13 +0200)]
Don't override python font locking in comint

* lisp/comint.el (comint-highlight-input): New variable (bug#32344).
(comint-send-input): Use it.

* lisp/progmodes/python.el (inferior-python-mode): Set it.

4 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 19 Aug 2020 11:12:14 +0000 (13:12 +0200)]
; * etc/NEWS: Fix typos.

4 years agoSignal an end-of-file error upon errors when reading from stdin
Lars Ingebrigtsen [Wed, 19 Aug 2020 10:55:46 +0000 (12:55 +0200)]
Signal an end-of-file error upon errors when reading from stdin

* src/minibuf.c (read_minibuf_noninteractive): Signal an
`end-of-file' error when reading from stdin instead of a general
error (bug#34123).  This makes it easier to write code that
recovers from this situation.

Suggested by Noam Postavsky <npostavs@gmail.com>.

4 years agoLet ido-everywhere turn on ido-mode
Noam Postavsky [Wed, 19 Aug 2020 10:49:11 +0000 (12:49 +0200)]
Let ido-everywhere turn on ido-mode

* lisp/ido.el (ido-everywhere): Turn on ido-mode, if it's not already
on.  Otherwise, having ido-everywhere enabled messes all file and
buffer reading interactive commands (bug#34292).

4 years agoFix the [ command in speedbar mode
Lars Ingebrigtsen [Wed, 19 Aug 2020 10:45:05 +0000 (12:45 +0200)]
Fix the [ command in speedbar mode

* lisp/speedbar.el (speedbar-expand-line-descendants): Expand only
the current line -- not all subsequent lines in the speedbar
buffer (bug#35014).

4 years agoFix a page-break in the middle of a keystroke in basic.texi
Sebastian Urban [Wed, 19 Aug 2020 10:15:07 +0000 (12:15 +0200)]
Fix a page-break in the middle of a keystroke in basic.texi

* doc/emacs/basic.texi (Inserting Text): Avoid having the C-x 8 ]
keystroke broken over two pages in the PDF version (bug#35885).

4 years agoRemove some compat code from viper-cmd.el
Lars Ingebrigtsen [Wed, 19 Aug 2020 09:37:26 +0000 (11:37 +0200)]
Remove some compat code from viper-cmd.el

4 years agoRemove some compat code from ispell.el
Lars Ingebrigtsen [Wed, 19 Aug 2020 09:34:54 +0000 (11:34 +0200)]
Remove some compat code from ispell.el

* lisp/textmodes/ispell.el (ispell): transient-mark-mode and
mark-active are always bound, so remove the check.

4 years agoRemove some compat code from erc
Lars Ingebrigtsen [Wed, 19 Aug 2020 09:32:56 +0000 (11:32 +0200)]
Remove some compat code from erc

* lisp/erc/erc.el (erc-mode): next-line-add-newlines is always
defined, so remove the check.

4 years agoGet rid of build-time checks around NS tabbar code (bug#33118)
Alan Third [Mon, 17 Aug 2020 19:58:47 +0000 (20:58 +0100)]
Get rid of build-time checks around NS tabbar code (bug#33118)

* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Get rid of version
checks.

4 years agoRemove some compat code from viper-*.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:33:58 +0000 (23:33 +0200)]
Remove some compat code from viper-*.el

* lisp/emulation/viper-util.el (viper-check-minibuffer-overlay):
* lisp/emulation/viper-cmd.el (viper-minibuffer-standard-hook)
(viper-minibuffer-real-start, viper-submit-report): No need to
check whether minibuffer-prompt-end is defined.

4 years agoRemove some compat code from descr-text.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:23:42 +0000 (23:23 +0200)]
Remove some compat code from descr-text.el

* lisp/descr-text.el (describe-text-properties-1): button.el is
pre-loaded, so remove check for it.

4 years agoRemove some compat code from viper-cmd.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:22:36 +0000 (23:22 +0200)]
Remove some compat code from viper-cmd.el

* lisp/emulation/viper-cmd.el (viper-next-line-at-bol): No need to
check for button-at.

4 years agoRemove some compat code from ps-print.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:18:50 +0000 (23:18 +0200)]
Remove some compat code from ps-print.el

* lisp/ps-print.el: Don't make a face-list alias.

4 years agoRemove some compat code from forms.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:17:47 +0000 (23:17 +0200)]
Remove some compat code from forms.el

* lisp/forms.el (forms-mode): make-face always exists.

4 years agoRemove some compat code from smiley.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:15:09 +0000 (23:15 +0200)]
Remove some compat code from smiley.el

* lisp/gnus/smiley.el (smiley-style): face-attribute is always defined.

4 years agoRemove some compat code from chart.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:12:39 +0000 (23:12 +0200)]
Remove some compat code from chart.el

* lisp/emacs-lisp/chart.el (chart-face-list):
set-face-background-pixmap is always defined.

4 years agoRemove some compat code from htmlfontify.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:11:02 +0000 (23:11 +0200)]
Remove some compat code from htmlfontify.el

* lisp/htmlfontify.el (hfy-color-vals): color-values is always
defined.

4 years agoRemove some compat code from ps files
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:09:53 +0000 (23:09 +0200)]
Remove some compat code from ps files

* lisp/ps-def.el (ps-color-device): Ditto.

* lisp/ps-print.el (ps-color-scale): Make into an obsolete alias.
(ps-begin-job): Adjust caller.

* lisp/progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate): Ditto.

4 years agoRemove some compat code from woman.el
Lars Ingebrigtsen [Tue, 18 Aug 2020 21:05:22 +0000 (23:05 +0200)]
Remove some compat code from woman.el

* lisp/woman.el (woman-fontify): Don't check for functions always
defined.