1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00
Commit Graph

41810 Commits

Author SHA1 Message Date
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
Juanma Barranquero
6fa1558ca5 Silence compiler warning
* src/w32.c (acl_to_text): Add ATTRIBUTE_MALLOC.
2019-10-09 15:43:26 +02:00
Juanma Barranquero
76a9f03ca6 Implement offsets for absolute line numbers
* src/xdisp.c (syms_of_xdisp) <display-line-numbers-offset>:
New variable to add an offset to absolute line numbers.
(syms_of_xdisp) <display-line-numbers>: Mention it in docstring.
(maybe_produce_line_number): Use it.

* doc/emacs/display.texi (Display Custom): Document it.

* etc/NEWS (value): Announce it.

* lisp/frame.el: Add `display-line-numbers-offset' to list of
variables which should trigger redisplay of the current buffer.
2019-10-09 12:49:39 +02:00
Juanma Barranquero
4b06250ef1 Do not use tick faces beyond ZV (bug#37641)
* src/xdisp.c (maybe_produce_line_number): Check beyond_zv
before using a tick face for the line number.  Move all face
selection code outside the loop that draws the line number.
2019-10-09 12:37:30 +02:00
Lars Ingebrigtsen
967eed7596 Make add-face-text-property not be destructive on strings
* src/textprop.c (add_properties): Take a parameter to say whether
it's allowed to be destructive or not (bug#20153).
(add_text_properties_1): Ditto.
(Fadd_face_text_property): Use this to say that it shouldn't
modify face properties on strings destructively.  This avoids
altering the face properties of one string when altering them on a
copy of the string.
2019-10-09 05:08:32 +02:00
Eli Zaretskii
6469f9cd92 Fix crashes on TTY frames due to "C-x 6 f"
* src/xdisp.c (redisplay_internal): Revert the recent change
regarding TTY frames' garbaged flag.  It is not needed.

* src/dispnew.c (adjust_frame_glyphs_for_frame_redisplay):
When returning due to mismatch between the desired and actual
dimensions of the glyph matrix, set the frame's garbaged flag
for TTY frames.  This avoids crashes when we are later called
from redisplay.  Reported by Ergus <spacibba@aol.com>.
2019-10-08 16:57:23 +03:00
Eli Zaretskii
bdb04e9dd1 Fix aborts when opening a new font after face-cache reset
* src/font.c (font_open_for_lface): Make sure the default face
is realized before using its height for the font to be open.
(Bug#37637)
2019-10-08 16:13:21 +03:00
Eli Zaretskii
18251fb739 Fix a crash in TTY sessions caused by recent changes
* src/xdisp.c (redisplay_internal): Fix crashes in TTY
sessions when turning on tab-mode.
Reported by Ergus <spacibba@aol.com>.
2019-10-07 21:22:03 +03:00
Eli Zaretskii
00787a2abd Fix infloop in redisplay caused by a recent change
* src/xdisp.c (redisplay_internal): Avoid inflooping due to a
frame's garbaged flag being set after update_frame.  Reported
by Michael Heerdegen <michael_heerdegen@web.de>.
2019-10-07 19:03:04 +03:00
Lars Ingebrigtsen
0811177c96 Feval_buffer doc string lexical-binding clarification
* src/lread.c (Feval_buffer): Mention that the lexical-binding
variable is ignored in the doc string (bug#20139).
2019-10-07 17:25:07 +02:00
Paul Eggert
f2346b5788 Fix port of file-acl errno checking to non-GNU
I had misinterpreted the private email from Ashish Shukla.
* src/fileio.c (Ffile_acl): Fix typo in previous change
by negating the call to acl_errno_valid.
2019-10-06 23:08:56 -07:00
Lars Ingebrigtsen
78ac0551e7 Fix the colours on Motif horizontal scroll bars
* src/xterm.c (x_create_horizontal_toolkit_scroll_bar): Use the
same foreground/background colours as the vertical scroll bar
(bug#37359).
2019-10-07 06:53:17 +02:00
Juri Linkov
785dda9406 Allow using last_tab_bar_item on no-x builds.
* src/frame.h (struct frame): Remove HAVE_WINDOW_SYSTEM
around last_tab_bar_item.
2019-10-07 02:00:24 +03:00
Juanma Barranquero
8de2e69f02 Set alternate faces for some line numbers (bug#27734)
* lisp/faces.el (line-number-major-tick, line-number-minor-tick):
New faces.
* lisp/cus-start.el (display-line-numbers-major-tick)
(display-line-numbers-minor-tick): Add customization info.
* lisp/frame.el: Add `display-line-numbers-major-tick' and
`display-line-numbers-minor-tick' to list of variables which
should trigger redisplay of the current buffer.

* src/xdisp.c (syms_of_xdisp) <display-line-numbers-major-tick>
<display-line-numbers-major-tick>: Defvar new options.
(syms_of_xdisp) <line-number-major-tick, line-number-minor-tick>:
Defsym new faces.
(maybe_produce_line_number): Use new faces for line numbers
that are multiple of `display-line-numbers-major-tick' and
`display-line-numbers-minor-tick'.

* etc/NEWS (value): Announce new feature.
* doc/emacs/display.texi (Display Custom): Describe it.  Wording by
Robert Pluim <rpluim@gmail.com>
2019-10-06 20:53:18 +02:00
Eli Zaretskii
4638b5ce0a Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2019-10-06 19:54:58 +03:00
Paul Eggert
8ad41af3a1 Port file-acl errno checking to non-GNU
Problem reported privately for FreeBSD 12 by Ashish Shukla.
* src/fileio.c (Ffile_acl): Treat EINVAL etc. like ENOTSUP if
acl_get_file fails, to port to FreeBSD 12 and other non-GNU
platforms.
2019-10-06 09:54:25 -07:00
Eli Zaretskii
ad76020af8 Support mouse clicks on tab bar on TTY frames
This for now doesn't work on GPM.
* src/xdisp.c (display_tab_bar): Make the loop over tab-bar
items more efficient.
(tab_bar_item_info, tool_bar_item_info): Correct data type for
CHARPOS.
(tty_get_tab_bar_item, tty_handle_tab_bar_click): New functions.
(note_mouse_highlight): Handle help-echo of tab-bar tabs on
TTY frames.
* src/w32inevt.c (do_mouse_event): Call
tty_handle_tab_bar_click to process mouse clicks on the tab bar.
* src/termchar.h (tty_handle_tab_bar_click): Add prototype.
* src/w32console.c (w32con_set_terminal_modes): Disable Quick
Edit mode on entry, to make sure mouse events get reported to
us.
2019-10-06 19:53:18 +03:00
Paul Eggert
aadf721676 Improve documentation for year-zero issues
* doc/emacs/calendar.texi (Calendar Systems)
* doc/lispref/os.texi (Time Conversion):
Prefer "BC" to "B.C." since the documentation generally uses "BC".
* doc/misc/emacs-mime.texi (time-date):
* lisp/calendar/time-date.el (date-to-day, time-to-days):
In the doc string, state the day origin more clearly, and more
consistently with the rest of the documentation.
* src/timefns.c (Fdecode_time): State the year origin in
the doc string.
2019-10-05 21:24:09 -07:00
Eli Zaretskii
2fa9699fd7 Fix display of cursor in obscure use case on MS-Windows
* src/xdisp.c (redisplay_internal): Detect when the frame
becomes garbaged inside the call to update_frame, and redraw
the frame in that case.  (Bug#37579)
2019-10-05 15:02:46 +03:00
Philipp Stephani
66839a74bb * src/fns.c (Flocale_info): Avoid fixnum overflow under ASan. 2019-10-05 13:00:08 +02:00
Philipp Stephani
7d8548a011 * src/pdumper.c (dump_buffer): Update structure hash. 2019-10-05 12:36:50 +02:00
Paul Eggert
81c7f3afb3 Minor style tweaks for recent tab changes
* src/dispextern.h (MR_PARTIALLY_VISIBLE_AT_TOP):
* src/window.c (Fwindow_mode_line_height)
(Fwindow_header_line_height, Fwindow_tab_line_height)
(Fwindow_right_divider_width, Fwindow_bottom_divider_width)
(Fwindow_scroll_bar_width, Fwindow_scroll_bar_height):
(Fset_window_configuration, Fcurrent_window_configuration):
Omit unnecessary parens.
* src/dispextern.h (CURRENT_MODE_LINE_HEIGHT)
(CURRENT_HEADER_LINE_HEIGHT, CURRENT_TAB_LINE_HEIGHT):
Add parens needed to make these macros function-like.
* src/window.c (window_resize_check):
* src/window.h (WINDOW_TAB_BAR_P):
* src/xdisp.c (tab_bar_item_info): Reindent.
* src/window.c (window_wants_mode_line)
(window_wants_header_line, window_wants_tab_line):
Simplify (a && b ? 1 : 0) to (a && b).
2019-10-04 12:31:17 -07:00