summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix automatic hscrolling when line numbers are displayedEli Zaretskii2021-08-061-4/+5
| | | | | | * src/xdisp.c (hscroll_window_tree): When line numbers are displayed, account for the the line-number space when calculating the desired X coordinate on the left. (Bug#49891)
* Improve wording of recently changed documentationEli Zaretskii2021-08-061-3/+4
| | | | | | | | | * src/minibuf.c (syms_of_minibuf): * lisp/minibuffer.el (minibuffer-restore-windows): * lisp/progmodes/etags.el (etags-xref-prefer-current-file): Improve wording of doc strings. * etc/NEWS: Improve wording and format of recently added entries.
* Add function minibuffer-restore-windows (bug#45072)Juri Linkov2021-08-061-2/+5
| | | | | | | * lisp/minibuffer.el (minibuffer-restore-windows): New function that removes the completions buffer. Add it to minibuffer-exit-hook. * src/minibuf.c (read-minibuffer-restore-windows): Mention minibuffer-restore-windows.
* Add new user option 'read-minibuffer-restore-windows'martin rudalics2021-08-041-3/+15
| | | | | | | | | | * doc/lispref/minibuf.texi (Text from Minibuffer): Document it (bug#45072). * lisp/cus-start.el (standard): Add. * src/minibuf.c (syms_of_minibuf): New variable 'read-minibuffer-restore-windows'.
* Adjust how `replace-match' runs modification hooksLars Ingebrigtsen2021-07-315-9/+18
| | | | | | | | | | | | * src/editfns.c (Fsubst_char_in_region) (Ftranslate_region_internal): * src/cmds.c (internal_self_insert): Update callers. * src/insdel.c (replace_range): Allow inhibiting signal_after_change/update_compositions. * src/lisp.h: Update. * src/search.c (Freplace_match): Run the modification hooks at the end instead of before adjusting point (bug#42424).
* Fix some macOS problemsAlan Third2021-07-312-13/+8
| | | | | | | * src/nsmenu.m (update_frame_tool_bar): Make sure the toolbar isn't displayed when it's not supposed to be. * src/nsterm.m ([EmacsView layoutSublayersOfLayer:]): Reinstate code intended to prevent a crash when running redisplay.
* Move parent frame setting code into EmacsWindowAlan Third2021-07-312-88/+99
| | | | | | | * src/nsterm.m (ns_make_frame_visible): (ns_set_parent_frame): ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Use new method. ([EmacsWindow setParentChildRelationships]): New method.
* Move NS port toolbar handling to the windowAlan Third2021-07-313-62/+42
| | | | | | | | | | | | | | | | | | | * src/nsmenu.m (free_frame_tool_bar): (update_frame_tool_bar): Remove wait_for_tool_bar and get the toolbar from the window. * src/nsterm.h (EmacsView): Remove toolbar and wait_for_tool_bar. * src/nsterm.m (ns_update_begin): ([EmacsView windowDidEnterFullScreen]): ([EmacsView windowDidExitFullScreen]): Get the toolbar from the window, not the view. ([EmacsView dealloc]): Remove toolbar from view. ([EmacsView createToolbar:]): Move method to EmacsWindow. ([EmacsView initFrameFromEmacs:]): Don't create toolbar here any more. ([EmacsView toolbar]): Remove method. ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Create toolbar here. ([EmacsWindow createToolbar:]): Moved from EmacsView. ([EmacsWindow dealloc]): Make sure we clean up the toolbar after closing the window.
* Fix macOS live resize drawingAlan Third2021-07-311-16/+25
| | | | | | * src/nsterm.m ([EmacsView layout]): ([EmacsView layoutSublayersOfLayer:]): Rename layout to layoutSublayersOfLayer.
* Change NS port resize detectionAlan Third2021-07-311-67/+15
| | | | | | | | | | * src/nsterm.m ([EmacsView windowDidResize:]): Remove function, it's not performing a useful function any more. ([EmacsView viewDidResize]): ([EmacsView resizeWithOldSuperviewSize:]): Replace viewDidResize with resizeWithOldSuperviewSize. ([EmacsView initFrameFromEmacs:]): Remove the view resize notification as we don't need it any more.
* Tidy up NS port OS window handlingAlan Third2021-07-313-190/+175
| | | | | | | | | | | | | | | | | * src/nsterm.h (EmacsWindow): Move above EmacsView definition and add new method definitions. (EmacsView): Remove redundant bwidth variable, and change NSWindow to EmacsWindow. (EmacsFSWindow): Delete definition. * src/nsterm.m (ns_set_undecorated): Rewrite to work in GNUstep using the new OS window creating methods. ([EmacsView initFrameFromEmacs:]): Move all NSWindow related code to new init method in EmacsWindow, and use said method. ([EmacsView toggleFullScreen:]): Use EmacsWindow instead of NSWindow. ([EmacsWindow initWithEmacsFrame:]): ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): ([EmacsWindow borderWidth]): New methods. (EmacsFSWindow): Remove implementation.
* Simplify macOS drawing codeAlan Third2021-07-312-326/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert EmacsSurface into a CALayer subclass so we can use the built-in relationships. Also simplify the macOS versioning code. This will result in more warnings on older versions of macOS but makes reading the code easier. * configure.ac: Add QuartzCore framework. * src/nsterm.h (NS_DRAW_TO_BUFFER): Remove define and all references. (EmacsSurface, EmacsLayer): Rename EmacsSurface to EmacsLayer and modify the definition to fit the new function. * src/nsterm.m (ns_update_begin): (ns_update_end): (ns_focus): (ns_unfocus): Use the new overridden lockFocus and unlockFocus and simplify the frame management. ([EmacsView dealloc]): ([EmacsView viewDidResize:]):Don't explicitly release surfaces. ([EmacsView initFrameFromEmacs:]): Move the layer code to after the NSWindow has been created as creating the layer now relies on some of it's properties. ([EmacsView makeBackingLayer]): New function. ([EmacsView lockFocus]): ([EmacsView focusOnDrawingBuffer]): Rename to lockFocus. ([EmacsView unlockFocus]): ([EmacsView unfocusDrawingBuffer]): Rename to unlockFocus. ([EmacsView windowDidChangeBackingProperties]): Don't explicitly release surfaces but reset EmacsLayer properties. ([EmacsView layout]): ([EmacsView viewWillDraw]): Rename to layout. ([EmacsView wantsUpdateLayer]): Remove function and change all callers to [EmacsView wantsLayer]. (EmacsSurface, EmacsLayer): Rename to EmacsLayer. ([EmacsSurface getSize]): ([EmacsSurface initWithSize:ColorSpace:Scale:]): Remove methods. ([EmacsSurface initWithColorSpace:]): ([EmacsLayer checkDimensions]): ([EmacsLayer releaseSurfaces]): ([EmacsLayer display]): New functions. * src/nsterm.m ([EmacsLayer dealloc]): Use releaseSurfaces. ([EmacsSurface getContext]): Automatically detect frame property changes and clear the cache if required. Use built-in CALayer properties where available. ([EmacsLayer copyContentsTo:]): Use [CALayer contents] as source.
* * src/fontset.c (check_fontset_name): A better fix for bug#49782.Eli Zaretskii2021-07-311-4/+5
|
* * src/fontset.c (check_fontset_name): Fix last change.Eli Zaretskii2021-07-301-1/+1
|
* Avoid segfault when set-fontset-font is called from non-GUI framesEli Zaretskii2021-07-301-0/+3
| | | | | * src/fontset.c (check_fontset_name): Avoid crashes if this is called from a non-GUI frame. (Bug#49782)
* Convert fringe bitmaps to vectors on NS portAlan Third2021-07-263-113/+58
| | | | | | | | | | | | | | | Unfortunately *step doesn't support masks for bitmap images so changing the colors of fringe bitmaps is awkward. We can work around this by converting the bitmap into an NSBezierPath and drawing it in the required color. * src/nsterm.m (ns_define_fringe_bitmap): (ns_destroy_fringe_bitmap): New functions (ns_draw_fringe_bitmap): Display the NSBezierPath. * src/nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Remove variable that's there to allow us to easily modify the XBM colors. ([EmacsImage setXBMColor:]): Remove method.
* Fix NS inset rectangle cornersAlan Third2021-07-261-24/+41
| | | | | * src/nsterm.m (ns_draw_relief): Use a path to draw the mitered corners instead of rectangles.
* Simplify NS sizing and positioning codeAlan Third2021-07-261-61/+38
| | | | | | | * src/nsterm.m (ns_set_offset): Unify the two branches into one, most of the code is the same. (ns_set_window_size): Use the provided tools to calculate the window size instead of doing it ourselves.
* * src/nsterm.m (ns_set_frame_alpha): Enable alpha on GNUstep.Alan Third2021-07-261-3/+1
|
* Fix image crash on macOS (bug#49688)Alan Third2021-07-261-6/+2
| | | | | * src/nsimage.m ([EmacsImage allocInitFromFile:]): Use isValid to check whether the image is valid instead of generating a tiff.
* Fix compilation of xftfont.c with old fontconfigEli Zaretskii2021-07-251-0/+6
| | | | | | * src/xftfont.c (FC_LCD_FILTER): Define if undefined, for older versions of fontconfig. This was mistakenly deleted 2 years ago. (Bug#49722)
* Rename directory-append to file-name-concatLars Ingebrigtsen2021-07-251-2/+2
| | | | | | | | * src/fileio.c (Ffile_name_concat): * lisp/files.el (move-file-to-trash): * lisp/emacs-lisp/shortdoc.el (file-name): * doc/lispref/files.texi (Directory Names): Rename `directory-append' to `file-name-concat'.
* Allow empty elements in directory-appendLars Ingebrigtsen2021-07-251-13/+33
| | | | | * doc/lispref/files.texi (Directory Names): Document it. * src/fileio.c (Fdirectory_append): Allow empty elements.
* ; * src/fileio.c (Fdirectory_append): Doc fix.Eli Zaretskii2021-07-241-3/+4
|
* Really convert to multibyte in Fdirectory_appendLars Ingebrigtsen2021-07-241-2/+1
| | | | | | * src/fileio.c (Fdirectory_append): Fix check for whether we need to convert to multibyte. (Fdirectory_append):
* Fix Fdirectory_append check for whether strings have to be convertedLars Ingebrigtsen2021-07-244-12/+3
| | | | | | | | | | | * src/coding.c (string_ascii_p): Make it non-static. * src/fileio.c (Fdirectory_append): Fix check for whether we need to convert to multibyte. * src/fns.c (string_ascii_p): Remove copy. * src/lisp.h: Declare string_ascii_p.
* Tweak Fdirectory_append slightlyLars Ingebrigtsen2021-07-241-2/+2
| | | | | * src/fileio.c (Fdirectory_append): Make the xfree condition more robust.
* Tweak Fdirectory_append for efficiencyLars Ingebrigtsen2021-07-241-1/+2
| | | | * src/fileio.c (Fdirectory_append): Make slightly more efficient.
* Extend directory-append to take an arbitrary number of componentsLars Ingebrigtsen2021-07-241-37/+79
| | | | | | | | * doc/lispref/files.texi (Directory Names): Document it. * lisp/emacs-lisp/shortdoc.el (file-name): Add new example. * src/fileio.c (Fdirectory_append): Change the function to take an arbitrary number of components.
* Add new function `directory-append'Lars Ingebrigtsen2021-07-241-0/+46
| | | | | | | | | * doc/lispref/files.texi (Directory Names): Document it, and remove the concat-based file concatenation description. * lisp/emacs-lisp/shortdoc.el (file-name): Add. And add more expand-file-name examples. * src/fileio.c (Fdirectory_append): New function.
* Make supersession warnings work againLars Ingebrigtsen2021-07-231-1/+1
| | | | | * src/filelock.c (lock_file): Fix thinko in lock_file in 2ad34bcea4e (bug#49701).
* Fix display of line/wrap-prefix when there's a display property at BOLEli Zaretskii2021-07-221-2/+18
| | | | | | | * src/xdisp.c (get_line_prefix_it_property): New function. (handle_line_prefix): Call 'get_line_prefix_it_property' instead of 'get_it_property', to examine also the property of the buffer text underlying the display or overlay string. (Bug#49695)
* Make input of multi-key inputs in different emacsclients more logicalLogan Perkins2021-07-211-10/+16
| | | | | * src/keyboard.c (read_key_sequence): Don't continue the input of multi-key commands in one emacsclient in another (bug#39687).
* * src/eval.c (signal_quit_p): Fix the usual int/Lisp_Object mixupStefan Monnier2021-07-211-2/+2
|
* Make `C-g' after `M-x' not give a backtrace unless requiredLars Ingebrigtsen2021-07-213-3/+16
| | | | | | | | * src/eval.c (signal_quit_p): New function. (maybe_call_debugger): React to all `quit' signals (bug#49675). * src/keyboard.c (cmd_error_internal, menu_item_eval_property_1): Ditto.
* Speed up by storing frame faces in hash tables instead of alistsJashank Jeremy2021-07-213-51/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.h (struct frame): Add face_hash_table, remove face_alist. (fset_face_hash_table): New function. (fset_face_alist): Remove. * src/frame.c (make_frame): Initialize f->face_hash_table. (Fmake_terminal_frame): Update to work with hash tables instead of alists. * src/xfaces.c (lface_from_face_name_no_resolve): (Finternal_make_lisp_face): (update_face_from_frame_parameter): Update to work with hash tables instead of alists. (Fframe_face_hash_table): New function. (Fframe_face_alist): Move to faces.el as frame-face-alist. (syms_of_xfaces): Add frame_face_hash_table. * lisp/progmodes/elisp-mode.el (elisp--eval-defun-1): * lisp/frame.el (frame-set-background-mode): Update to work with hash tables instead of alists. * lisp/faces.el (face-new-frame-defaults): Mark obsolete. (face-list): Update to use face--new-frame-defaults. (frame-face-alist): Moved here from src/xfaces.c. (x-create-frame-with-faces): Update to handle subtle semantic change to how frame faces propagate, which otherwise breaks frame creation with reverse video enabled (bug#41200). Reworked from a patch by Clément Pit-Claudel <clement.pitclaudel@live.com>.
* Factor out char_table_ref_simple for readabilityStefan Kangas2021-07-211-60/+44
| | | | | | * src/chartab.c (char_table_ref_simple): New function... (sub_char_table_ref_and_range, char_table_ref_and_range): ...factored out from here. (bug#45550).
* Fix final test for invalid base64url charsLars Ingebrigtsen2021-07-211-1/+1
| | | | | * src/fns.c (base64_decode_1): Fix test for invalid base64url (bug#45562). Noted by Andreas Schwab.
* Make `kill-all-local-variables' also remove lambda from hooksjakanakaevangeli2021-07-201-6/+6
| | | | | * src/buffer.c (reset_buffer_local_variables): Also remove non-symbol elements from hook variables (bug#46407).
* Signal an error in json.c function if not availableLars Ingebrigtsen2021-07-201-16/+9
| | | | | | * src/json.c (Fjson_serialize, Fjson_insert) (Fjson_parse_string, Fjson_parse_buffer, syms_of_json): Signal `json-unavailable' if jansson isn't available (bug#48228).
* Quit minibuffers without aborting kmacrosMiha Rihtaršič2021-07-205-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Quitting): Document `minibuffer-quit' (Recursive Editing): Document throwing of function values to `exit'. * doc/lispref/errors.texi (Standard Errors): Document `minibuffer-quit' * lisp/minibuffer.el (minibuffer-quit-recursive-edit): New function. * lisp/simple.el (minibuffer-error-function): Do not abort keyboard macro execution if is minibuffer-quit is signaled (bug#48603). * src/data.c (syms_of_data): New error symbol `minibuffer-quit' * src/keyboard.c (recursive_edit_1): Implement throwing of function values to `exit`. In that case, the function will be called without arguments before returning from the command loop. (cmd_error): (Fcommand_error_default_function): Do not abort keyboard macro execution if minibuffer-quit is signaled. (command_loop_2): New argument HANDLERS. * src/macros.c (Fexecute_kbd_macro): Use command_loop_2 instead of command_loop_1. * src/minibuf.c (Fabort_minibuffers): Use it.
* Fix problem with certain fonts in ftfont_shape_by_fltKenichi Handa2021-07-201-0/+21
| | | | | * src/ftfont.c (ftfont_shape_by_flt): Fix problem with unusual OTF tables in fonts (bug#49066).
* Mention `overlays-in' in the `overlays-at' doc stringLars Ingebrigtsen2021-07-201-1/+5
| | | | | * src/buffer.c (Foverlays_at): Mention `overlays-in' in the doc string (bug#459).
* Fix typos in a recent changeEli Zaretskii2021-07-191-1/+1
| | | | | | | * src/buffer.c (Fmake_indirect_buffer): Fix a typo in a recent change. * doc/lispref/buffers.texi (Indirect Buffers): Fix punctuation.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2021-07-191-3/+11
|\
| * Add inhibit-buffer-hooks to `make-indirect-buffer'Lars Ingebrigtsen2021-07-191-4/+11
| | | | | | | | | | | | | | * doc/lispref/buffers.texi (Indirect Buffers): Document it (bug#49160). * src/buffer.c (Fmake_indirect_buffer): Allow controlling whether to inhibit buffer hooks.
| * Make make-indirect-buffer inherit inhibit-buffer-hook from base bufferdickmao2021-07-191-0/+1
| | | | | | | | | | | | | | * src/buffer.c (Fmake_indirect_buffer): Match base buffer's inhibit-buffer-hooks. * test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks-indirect): Add a test (bug#49160).
* | ; Fix a typo in a recent changeEli Zaretskii2021-07-191-1/+1
|/ | | | | * src/callint.c (syms_of_callint) <mouse-leave-buffer-hook>: Fix a typo in the doc string.
* Fix documentation of mouse-leave-buffer-hookLars Ingebrigtsen2021-07-191-1/+4
| | | | | | | * doc/lispref/hooks.texi (Standard Hooks): Ditto. * src/callint.c (syms_of_callint): Document the actual usage of `mouse-leave-buffer-hook' (bug#2932).
* Clarify event-convert-list doc stringLars Ingebrigtsen2021-07-181-2/+5
| | | | | * src/keyboard.c (Fevent_convert_list): Clarify that the base type returned isn't always the same (bug#7631).