1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

142311 Commits

Author SHA1 Message Date
Eli Zaretskii
4e97019a77 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.
2020-08-23 10:10:47 +03:00
Yuan Fu
0d1ca2ac38 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.
2020-08-23 09:50:26 +03:00
Lars Ingebrigtsen
065ab1ba44 Bind the time zone so that the tests work everywhere 2020-08-22 14:34:54 -07:00
Lars Ingebrigtsen
04b62489ca Use lexical-binding and remove compat code 2020-08-22 22:47:31 +02:00
Eli Zaretskii
1002852f1a 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.
2020-08-22 19:14:35 +03:00
Glenn Morris
2e5198781c ; Copyright fix
Author has assignment
2020-08-22 16:58:46 +01:00
Eli Zaretskii
83ade9e4e2 ; * lisp/progmodes/grep.el (grep-find-command): Fix typos. 2020-08-22 18:57:57 +03:00
Lars Ingebrigtsen
4102fe1e91 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).
2020-08-22 17:57:39 +02:00
Tino Calancha
29bb72f043 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.
2020-08-22 17:57:39 +02:00
Alan Third
e63a0c466c Fix NS build failure
* src/thread.c: xgselect isn't used with NS, even when HAVE_GLIB is
defined.
2020-08-22 16:31:02 +01:00
Alan Third
96e5d8ce0d 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.
2020-08-22 16:19:37 +01:00
Lars Ingebrigtsen
811f5890f3 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.)
2020-08-22 16:27:17 +02:00
Lars Ingebrigtsen
3183259481 nndoc minor clean-up
* lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): Erase the
buffer before changing multibyteness.
2020-08-22 15:42:17 +02:00
Jan Tatarik
5c715113ef 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.
2020-08-22 15:39:26 +02:00
Dmitry Gutov
2725254ab5 Make ruby-parse-partial more stable
* lisp/progmodes/ruby-mode.el (ruby-parse-partial):
Don't call ruby-deep-indent-paren-p (bug#42841).
2020-08-22 16:26:47 +03:00
Lars Ingebrigtsen
0aa4647f9c 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.
2020-08-22 15:18:15 +02:00
Stefan Kangas
61fc4bf286 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.
2020-08-22 13:25:15 +02:00
Stephen Berman
36bf4fa0b3 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.
2020-08-21 22:41:48 +02:00
Paul Eggert
3e10174fb6 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.
2020-08-21 12:22:04 -07:00
Lars Ingebrigtsen
348686b3f3 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).
2020-08-21 17:15:22 +02:00
Lars Ingebrigtsen
ac1270de40 Fread_variable doc string clarification
* src/minibuf.c (Fread_variable): Doc string clarification (bug#38886).
2020-08-21 16:55:55 +02:00
Lars Ingebrigtsen
fff5c3c061 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).
2020-08-21 16:33:33 +02:00
Lars Ingebrigtsen
70964b9c6b 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).
2020-08-21 16:15:18 +02:00
Lars Ingebrigtsen
4a8d3d81cf 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).
2020-08-21 15:58:32 +02:00
Lars Ingebrigtsen
9d0385d7c7 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.
2020-08-21 15:36:51 +02:00
Eli Zaretskii
d3c73fbfdd ; * etc/NEWS: Fix a recently added entry. 2020-08-21 16:35:58 +03:00
Noam Postavsky
9d4b11132b 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).
2020-08-21 15:08:27 +02:00
Pip Cet
9c62ffb082 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).
2020-08-21 14:56:06 +02:00
Pip Cet
19ee08f1e8 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).
2020-08-21 14:47:45 +02:00
Tobias Zawada
a415179b56 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).
2020-08-21 14:42:20 +02:00
Kevin Ryde
47b3adf8bb 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).
2020-08-21 14:17:56 +02:00
Christophe Troestler
3feef0428d 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
2020-08-21 13:31:38 +02:00
Gregory Heytings
44f6a2bba2 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
2020-08-21 12:44:52 +02:00
Stefan Kangas
178feeec46 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.
2020-08-21 10:32:51 +02:00
Lars Ingebrigtsen
165fd028d8 Make image cache lookups work again after previous patch
* src/image.c (search_image_cache): Fix reversed logic in previous
patch.
2020-08-21 01:29:32 +02:00
Juri Linkov
4c5043c50b * 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>.
2020-08-21 02:21:26 +03:00
Lars Ingebrigtsen
cb9fc5e773 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.
2020-08-21 00:38:23 +02:00
Lars Ingebrigtsen
9b277a2f8e 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.
2020-08-20 22:23:35 +02:00
Lars Ingebrigtsen
ec99055918 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.
2020-08-20 20:09:57 +02:00
Mattias Engdegård
bf60338d6d 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.
2020-08-20 19:39:14 +02:00
Lars Ingebrigtsen
3b8a6ef185 Fix compilation warning in vc-cvs from previous change
* lisp/vc/vc-cvs.el (log-edit-extract-headers): Fix compilation
warning.
2020-08-20 17:18:46 +02:00
Lars Ingebrigtsen
ea8ead6a8b Fix message.el compilation warning
* lisp/gnus/message.el (smtpmail-stream-type): Fix compilation
warning from last change.
2020-08-20 17:17:48 +02:00
Lars Ingebrigtsen
44f75f0d9d 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).
2020-08-20 17:03:04 +02:00
Lars Ingebrigtsen
bd0523901b 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.
2020-08-20 16:52:57 +02:00
Lars Ingebrigtsen
b19b942f72 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).
2020-08-20 16:42:06 +02:00
Lars Ingebrigtsen
ac79d73760 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).
2020-08-20 16:33:29 +02:00
Lars Ingebrigtsen
63ac91a2ec 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).
2020-08-20 16:12:07 +02:00
Lars Ingebrigtsen
0faa2c9590 Remove the "Summary: " but from cvs checkins
* lisp/vc/vc-cvs.el (vc-cvs-checkin): Remove the "Summary:" bit
from the comment (bug#40506).
2020-08-20 15:54:38 +02:00
Lars Ingebrigtsen
219e80f0a3 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).
2020-08-20 15:27:07 +02:00
Noah Swainland
80628df778 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).
2020-08-20 15:17:19 +02:00