1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 22:20:52 -08:00
Commit graph

41831 commits

Author SHA1 Message Date
Lars Ingebrigtsen
305dbc7e2b Move description of value to syntax-ppss function.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Move the description of
the return value from...

* src/syntax.c (Fparse_partial_sexp): ... here because
`syntax-ppss' is what's called over the place, and jumping through
an indirection to get to the value description is inconvenient.
2019-10-30 13:16:44 +01:00
Jimmy Aguilar Mena
dafc87efd0 Optimize conditional recursive merge face.
* src/xfaces.c (merge_face_vectors) : Pass ATTR_FILTER to
merge_face_ref to stop recursion merging in advance when possible.
(merge_named_face) : add more conditions to potentially reduce calls to
merge_face_vectors in more unneeded situations.
2019-10-29 14:34:00 +01:00
Jimmy Aguilar Mena
e0bcc25f64 Fix extend face in gui interfaces.
* src/xdisp.c (extend_face_to_end_of_line) : Change call to
PRODUCE_GLYPHS with append_stretch_glyph to fill until the windows
border.
2019-10-29 14:34:00 +01:00
Jimmy Aguilar Mena
8ae2a3a46b Fix inherited :extend attribute in faces.
* src/xfaces.c (merge_face_vectors) : Add extra parameter ATTR_FILTER
with the same functionality than in merge_named_face.  Update all
occurrences.
(merge_named_face): Remove condition to avoid call
`merge_face_vectors`.
2019-10-29 14:34:00 +01:00
memeplex
e3cebbb839 Replay key if kboard is interrupted while initializing (Bug#37782)
The problem with the original fix for bug#5095 is that it drops
the current event, which is a valid character event and not -2.
Thus, the first ESC character sent by the terminal after turning
on focus tracking is lost and we get '[' and 'I' events separately
inserted into the buffer afterwards.

* src/keyboard.c (read_key_sequence): Add key as mock_input and replay
sequence using new keyboard, when the key is not -2.
2019-10-26 13:29:29 +03:00
memeplex
16372a5a04 Remove redundant initialization of fringe bitmap (Bug#37756)
* src/fringe.c (Fdefine-fringe-bitmap): Remove redundant zeroing
of fb.bits that only zeroed half of the array anyway.
2019-10-26 13:16:46 +03:00
Eli Zaretskii
b1be40c468 Fix recent changes in documentation
* doc/lispref/edebug.texi (Edebug Eval, Eval List): Reword
recently added text to follow conventions.

* src/textprop.c (Ftext_properties_at): Don't use passive tense
in doc string.
2019-10-22 19:28:58 +03:00
Lars Ingebrigtsen
38021e5559 Make text-properties-at mention describe-text-properties
* src/textprop.c (Ftext_properties_at): Mention
describe-text-properties in the doc string.
2019-10-22 16:54:50 +02:00
Eli Zaretskii
03921902b2 ; Add commentary to w32inevt.c
* src/w32inevt.c (do_mouse_event): Comment on mouse
coordinates in console mouse-wheel events.
2019-10-21 13:32:40 +03:00
Clément Pit-Claudel
435eb82e7b Add a way to disable substitution of command keys in help strings
* src/keyboard.c (help_echo_substitute_command_keys): New function.
(help_echo_echo, parse_menu_item): Use it.
(syms_of_keyboard): Define Qhelp_echo_inhibit_substitution.

* doc/lispref/text.texi (Special Properties), etc/NEWS: Document
the effect of 'help-echo-inhibit-substitution'.
2019-10-20 21:48:38 -04:00
Paul Eggert
9e15df208c Avoid fixnum round trip in prefix-numeric-value
* src/callint.c (Fprefix_numeric_value): Simplify.
2019-10-20 17:41:07 -07:00
Juanma Barranquero
41ba8231ef lisp/*.el: Fix typos and improve some docstrings
* lisp/auth-source.el (auth-source-backend-parse-parameters)
(auth-source-search-collection)
(auth-source-secrets-listify-pattern)
(auth-source--decode-octal-string, auth-source-plstore-search):
* lisp/registry.el (registry-lookup)
(registry-lookup-breaks-before-lexbind)
(registry-lookup-secondary, registry-lookup-secondary-value)
(registry-search, registry-delete, registry-size, registry-full)
(registry-insert, registry-reindex, registry-prune)
(registry-collect-prune-candidates):
* lisp/subr.el (nbutlast, process-live-p):
* lisp/tab-bar.el (tab-bar-list):
* lisp/cedet/ede/linux.el (ede-linux--get-archs)
(ede-linux--include-path, ede-linux-load):
* lisp/erc/erc-log.el (erc-log-all-but-server-buffers):
* lisp/erc/erc-pcomplete.el (pcomplete-erc-commands)
(pcomplete-erc-ops, pcomplete-erc-not-ops, pcomplete-erc-nicks)
(pcomplete-erc-all-nicks, pcomplete-erc-channels)
(pcomplete-erc-command-name, pcomplete-erc-parse-arguments):
* lisp/eshell/em-term.el (eshell-visual-command-p):
* lisp/gnus/gnus-cache.el (gnus-cache-fully-p):
* lisp/gnus/nnmail.el (nnmail-get-active)
(nnmail-fancy-expiry-target):
* lisp/mail/mail-utils.el (mail-string-delete):
* lisp/mail/supercite.el (sc-hdr, sc-valid-index-p):
* lisp/net/ange-ftp.el (ange-ftp-use-smart-gateway-p):
* lisp/net/nsm.el (nsm-save-fingerprint-maybe)
(nsm-network-same-subnet, nsm-should-check):
* lisp/net/rcirc.el (rcirc-looking-at-input):
* lisp/net/tramp-cache.el (tramp-get-hash-table):
* lisp/net/tramp-compat.el (tramp-compat-process-running-p):
* lisp/net/tramp-smb.el (tramp-smb-get-share)
(tramp-smb-get-localname, tramp-smb-read-file-entry)
(tramp-smb-get-cifs-capabilities, tramp-smb-get-stat-capability):
* lisp/net/zeroconf.el (zeroconf-list-service-names)
(zeroconf-list-service-types, zeroconf-list-services)
(zeroconf-get-host, zeroconf-get-domain)
(zeroconf-get-host-domain):
* lisp/nxml/rng-xsd.el (rng-xsd-compile)
(rng-xsd-make-date-time-regexp, rng-xsd-convert-date-time):
* lisp/obsolete/erc-hecomplete.el (erc-hecomplete)
(erc-command-list, erc-complete-at-prompt):
* lisp/org/ob-scheme.el (org-babel-scheme-get-buffer-impl):
* lisp/org/ob-shell.el (org-babel--variable-assignments:sh-generic)
(org-babel--variable-assignments:bash_array)
(org-babel--variable-assignments:bash_assoc)
(org-babel--variable-assignments:bash):
* lisp/org/org-clock.el (org-day-of-week):
* lisp/progmodes/cperl-mode.el (cperl-char-ends-sub-keyword-p):
* lisp/progmodes/gud.el (gud-find-c-expr, gud-innermost-expr)
(gud-prev-expr, gud-next-expr):
* lisp/textmodes/table.el (table--at-cell-p, table--probe-cell)
(table--get-cell-justify-property)
(table--get-cell-valign-property)
(table--put-cell-justify-property)
(table--put-cell-valign-property): Fix typos.

* lisp/so-long.el (fboundp): Doc fix.
(so-long-mode-line-info, so-long-mode)
(so-long--check-header-modes): Fix typos.

* lisp/emulation/viper-mous.el (viper-surrounding-word)
(viper-mouse-click-get-word): Fix typos.
(viper-mouse-click-search-word): Doc fix.

* lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p)
(erc-bounds-of-word-at-point): Fix typos.
(erc-decode-string-from-target, define-erc-response-handler):
Refill docstring.

* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC): Fix typo.
(erc-dcc-get-host, erc-dcc-auto-mask-p, erc-dcc-get-file):
Doc fixes.

* lisp/erc/erc-networks.el (erc-network-name): Fix typo.
(erc-determine-network): Refill docstring.

* lisp/net/dbus.el (dbus-list-hash-table)
(dbus-string-to-byte-array, dbus-byte-array-to-string)
(dbus-check-event): Fix typos.
(dbus-introspect-get-property): Doc fix.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler):
Rename ARGS to ARGUMENTS.  Doc fix.
(tramp-adb-sh-fix-ls-output, tramp-adb-execute-adb-command)
(tramp-adb-find-test-command): Fix typos.

* lisp/net/tramp.el (tramp-set-completion-function)
(tramp-get-completion-function)
(tramp-completion-dissect-file-name)
(tramp-completion-dissect-file-name1)
(tramp-get-completion-methods, tramp-get-completion-user-host)
(tramp-get-inode, tramp-get-device, tramp-mode-string-to-int)
(tramp-call-process, tramp-call-process-region)
(tramp-process-lines): Fix typos.
(tramp-interrupt-process): Doc fix.

* lisp/org/ob-core.el (org-babel-named-src-block-regexp-for-name)
(org-babel-named-data-regexp-for-name): Doc fix.
(org-babel-src-block-names, org-babel-result-names): Fix typos.

* lisp/progmodes/inf-lisp.el (lisp-input-filter): Doc fix.
(lisp-fn-called-at-pt): Fix typo.

* lisp/progmodes/xref.el (xref-backend-identifier-at-point):
Doc fix.
(xref-backend-identifier-completion-table): Fix typo.
2019-10-20 12:12:27 +02:00
Eli Zaretskii
2a3577ba11 A better fix for tab-line mouse highlight on TTY frames
* src/dispnew.c (mode_line_string):
* src/xdisp.c (note_mode_line_or_margin_highlight): Remove
recently-added workarounds for incorrect TTY mouse highlight:
they are no longer needed.
(mark_window_display_accurate_1): Set the header_line_p and
tab_line_p flags of the window's current_matrix if the window
displays these.
(display_mode_line): Set the header_line_p and tab_line_p
flags of the window's desired_matrix if the window displays
these.  (Bug#37807)
2019-10-19 10:42:14 +03:00
Paul Eggert
f9744a5f09 Pacify x86 GCC 9 in tab bar code
* src/xdisp.c (tty_get_tab_bar_item): Simplify a bit.  This
pacifies --enable-gcc-warnings with x86 GCC 9.2.1 20190827
(Red Hat 9.2.1-1) when combined with -fsanitize=undefined.
2019-10-18 15:35:15 -07:00
Paul Eggert
f3aa05b1aa Generalize list1i etc. to all signed integer types
* src/lisp.h (list1i, list2i, list3i, list4i):
Accept intmax_t instead of EMACS_INT, and use make_int instead
of make_fixnum.  This should help avoid integer-overflow
problems akin to the Time bug (Bug#37795).
2019-10-18 13:23:11 -07:00
Paul Eggert
b72ff3667a Fix integer-overflow bug in Time conversion
Problem reported by Stefan Monnier (Bug#37795).
* src/keyboard.c (make_lispy_position)
(make_scroll_bar_position, make_lispy_event):
* src/xterm.c (x_ewmh_activate_frame):
Use INT_TO_INTEGER to convert Time to a Lisp integer,
since the value might not be a fixnum.
2019-10-18 13:23:11 -07:00
Eli Zaretskii
2c9128ce13 Fix mouse highlight with tab-line on TTY frames
* src/xdisp.c (note_mode_line_or_margin_highlight):
* src/dispnew.c (mode_line_string): Fix mouse highlight on TTY
frames when both header line and tab-line are displayed.
(Bug#37807)
2019-10-18 18:48:31 +03:00
Eli Zaretskii
5fd1c086e7 Fix handling of mouse events on header line with tab-line
* src/window.c (coordinates_in_window): Fix conditions for
coordinates being on the window's header line when that
window also displays a tab-line.  (Bug#37807)
2019-10-18 17:55:21 +03:00
Juanma Barranquero
3ad407005b lisp/*.el, src/*.c: Doc fixes related to returning t vs non-nil
* lisp/progmodes/flymake-proc.el (flymake-proc--find-buffer-for-file):
Doc fix; return value is a buffer, not t.

* lisp/progmodes/ebrowse.el (ebrowse-member-display-p):
Doc fix; return value is the MEMBER argument, not nil.

* lisp/files.el (hack-one-local-variable-eval-safep):
* lisp/play/doctor.el (doctor-nounp, doctor-pronounp):
* lisp/progmodes/flymake-proc.el (flymake-proc--check-include):
* lisp/progmodes/js.el (js--broken-arrow-terminates-line-p):
Doc fix; a non-nil return value is not always t.

* lisp/image.el (image-type-available-p):
* lisp/simple.el (region-active-p):
* lisp/window.el (frame-root-window-p):
* src/buffer.c (Fbuffer_live_p):
* src/image.c (Finit_image_library):
* src/window.c (Fwindow_minibuffer_p):
Doc fix; a non-nil return value is always t.

* doc/lispref/minibuf.texi (Minibuffer Windows): Doc fix.
2019-10-17 02:45:06 +02:00
Juanma Barranquero
4d65821bf0 Add/fix documentation for widget-apply
* doc/misc/widget.texi (Widget Properties): Document `widget-apply'.

* src/fns.c (Fwidget_apply): Document return value (used in many
places).
2019-10-16 15:39:42 +02:00
Martin Rudalics
d68e8495e0 Handle top margin change in adjust_frame_size
* src/frame.c (adjust_frame_size): Handle case where only
pseudo windows changed height so the top margin has to be
adjusted.
* src/window.c (Fset_window_configuration): Call
adjust_frame_size with inhibit 4.
2019-10-16 11:02:56 +02:00
Juri Linkov
4509aaa5b0 New variable tab-bar-position
* lisp/cus-start.el: Add customization for tab-bar-position.
* src/dispnew.c (syms_of_display): New variable Vtab_bar_position.
(adjust_frame_glyphs_for_window_redisplay): Use it.
2019-10-15 22:41:40 +03:00
Robert Pluim
eda385266e Fix duplicated words in comments
* src/coding.c (encode_string_utf_8):
* src/keyboard.c (syms_of_keyboard):
* src/mini-gmp.c (gmp_lucas_mod, mpz_export):
* src/pdumper.c (dump_set_referrer, dump_queue_compute_score):
* src/timefns.c (Ftime_convert): Remove duplicated words.
2019-10-15 14:28:59 +02:00
Juri Linkov
561570475e Fix initial value of frame-inhibit-implied-resize
* src/frame.c (syms_of_frame): Update doc string and default value of
frame-inhibit-implied-resize in NS to include 'tab-bar-lines.
2019-10-14 22:14:15 +03:00
Jimmy Aguilar Mena
7a10082093 Fix issue calling face_at_pos.
*src/xdisp.c (extend_face_to_end_of_line): Add extra condition when
producing glyphs from a C string to not call face_at_pos.
2019-10-14 14:18:42 +02:00
Jimmy Aguilar Mena
501846c859 Modify face_at_pos to not modify change IT.
src/xdisp.c (face_at_pos): Removed code to that modified
it->start_of_box_run_p and it->face_box_p.  This function should not
modify it.
(handle_face_prop): Added code to update it->start_of_box_run_p and
it->face_box_p.
(underlying_face_id): Input IT made CONST.
2019-10-14 14:18:42 +02:00
Jimmy Aguilar Mena
cc47cd4202 ; extend_face_id and fill_column_indicator corrections
*etc/NEWS: Correction for extend face and add some comments in the
code.
2019-10-14 14:18:42 +02:00
Jimmy Aguilar Mena
424e6f54e5 Document new :extend face attribute in manuals.
Some stylistic corrections in src/xdisp.c and src/xfaces.c.
2019-10-14 14:18:42 +02:00
Jimmy Aguilar Mena
38ee12d5a2 Fixed merge_face_ref recursive calls.
* src/xfaces.c (merge_face_ref): Fixed recursive calls to consider
filter when CONSP (face_ref).
2019-10-14 14:18:41 +02:00
Jimmy Aguilar Mena
92445de0a4 Optimization in extend_face
* src/xdisp.c (extend_face_to_end_of_line): Optimization to void
calls to face_at_pos.
2019-10-14 14:18:41 +02:00
Jimmy Aguilar Mena
acc7209884 Extend_face simplify.
* src/dispextern.h (struct it): Removed extend_face unneeded members.
* src/xdisp.c (handle_face_prop_general): renamed to face_at_pos and
removed input parameter initial_face_id. Updated all occurrences.
2019-10-14 14:18:41 +02:00
Jimmy Aguilar Mena
2b80b4dc46 Added parameter attr_filter to face_at_string_position.
Update all the occurrences in src/xdisp.c and src/xfaces.c
2019-10-14 14:18:41 +02:00
Jimmy Aguilar Mena
ab22720651 Fix last change in append_space_for_newline.
* src/xdisp.c (append_space_for_newline): Code refactor and
 simplification.
2019-10-14 14:18:41 +02:00
Jimmy Aguilar Mena
95d1c3b23e Add space for cursor to work also in terminal.
* src/xdisp.c (append_space_for_newline): Modified to add the space
with the last face also in terminal interface.
(fill_column_indicator_column): Modified to group more conditions.
(extend_face_to_end_of_line): Simplified code in
fill_column_indicator to use the new function.
2019-10-14 14:18:40 +02:00
Jimmy Aguilar Mena
eb259473db Changed handle_face_prop_general prototype.
* src/xdisp.h (handle_face_prop_general): Changed function prototype
to receive different arguments.
2019-10-14 14:18:40 +02:00
Jimmy Aguilar Mena
b5cd6871c0 Fixed extend face filtered for prop.
* src/xfaces.c (face_at_buffer_position): Pass ATTR_FILTER to
merge_face_ref in when !NILP (prop).
2019-10-14 14:18:40 +02:00
Jimmy Aguilar Mena
faa9b06b48 Call handle_face_prop_general to extend face.
* src/xdisp.c (extend_face_to_end_of_line): Added a call to
handle_face_prop_general to extend face after EOL according to
parameter :extend in the faces.
2019-10-14 14:18:40 +02:00
Jimmy Aguilar Mena
42bbfd29e7 Update dfci code with new extend_face code.
* src/xdisp.c (extend_face_to_end_of_line): Updated the
column-indicator code to use the new version of the function
fill_column_indicator_column.
2019-10-14 14:18:40 +02:00
Jimmy Aguilar Mena
e02fe26c7f New parameter to control the face extension..
* src/xdisp.c (handle_face_prop_general): New function to specialize
handle_face_prop with ATTR_FILTER.
* src/dispextern.h (face_at_buffer_position): Added
LFACE_ATTRIBUTE_INDEX.
* src/xfaces.c (merge_face_ref): Added LFACE_ATTRIBUTE_INDEX to merge
conditionally.
2019-10-14 14:18:39 +02:00
Jimmy Aguilar Mena
bc8db39775 Added face parameter :extend.
This is an initial change to add a parameter :extend that will be used
in the display engine later.
2019-10-14 14:18:39 +02:00
Jimmy Aguilar Mena
f9206f34d6 Simplify struct face to use only underline.
* src/dispextern.h (enum face_underline_type): Add FACE_NO_UNDERLINE = 0.
(struct face): Merge `underline_type` and `underline_p` into `underline`.
Update all the occurrences in src/xdisp.c, src/xfaces.c, and src/xterm.c.
2019-10-14 14:18:39 +02:00
Lars Ingebrigtsen
eac531b760 Clarify message about newer source file
* src/lread.c (Fload): Mention which file was actually used
instead of just saying that the .el is newer than the .elc (bug#10637).
2019-10-14 05:19:37 +02:00
Lars Ingebrigtsen
d1963b312d Further changes to ensure that copy-keymap doesn't segfault
* src/keymap.c (copy_keymap_1, copy_keymap_set_char_table): Ensure
we don't recurse infinitely when using non-sparse keymaps, too.

This change makes this form not segfault:

(let ((map (make-keymap)))
  (define-key map " " map)
  (copy-keymap map))
2019-10-14 02:52:25 +02:00
Juri Linkov
21f2922b84 Fix initial value of frame-inhibit-implied-resize
* src/frame.c (syms_of_frame): Update doc string and default value of
frame-inhibit-implied-resize in NS to not include 'tab-bar-lines,
and non-toolkit X builds to include 'tab-bar-lines.
2019-10-13 23:47:33 +03:00
Paul Eggert
5c4195fd36 * src/xdisp.c (note_tab_bar_highlight): Simplify HAVE_NS ifdefs. 2019-10-13 12:55:30 -07:00
Philipp Stephani
07cbc3bb1c Avoid compiler warnings on macOS.
* src/xdisp.c (note_tab_bar_highlight): Define variables 'dpyinfo' and
'mouse_down_p' only if needed.
2019-10-13 17:46:07 +02:00
Lars Ingebrigtsen
db9ba7ca01 Protect against segfaults in copy-keymap
* src/keymap.c (copy_keymap_1): Factor out and refuse to recurse
infinitely (bug#7496).
(Fcopy_keymap): ... from here.
(copy_keymap_item): Pass on the depth parameter.
2019-10-13 03:12:11 +02:00
Lars Ingebrigtsen
4c9468884c Make Fadd_face_text_property even less destructive
* src/textprop.c (Fadd_face_text_property): We need to be
non-destructive in buffers, too, because face properties may have
been added with `put-text-property' as a list that's been reused.
2019-10-12 23:35:26 +02:00
Eli Zaretskii
d129c10302 Fix initial value of frame-inhibit-implied-resize
* src/frame.c (syms_of_frame): Update doc string and default
value of frame-inhibit-implied-resize in GTK builds to include
'tab-bar-lines.
2019-10-10 14:50:11 +03:00
Juanma Barranquero
b3314ac5c4 identity, ignore: Make arg names more consistent with docs
* lisp/subr.el (ignore): Rename argument IGNORE to ARGUMENTS.

* src/fns.c (Fidentity): Rename ARG to ARGUMENT.

* doc/lispref/functions.texi (Calling Functions): Fix references.
2019-10-10 06:00:20 +02:00