aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Simplify macOS drawing codescratch/ns/surface-stuffAlan Third2021-05-313-323/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make the NS buffer copy happen before we need itAlan Third2021-05-311-2/+4
| | | | | | | * src/nsterm.m ([EmacsView viewWillDraw]): Move releaseContext to updateLayer. ([EmacsView updateLayer]): Send a request for getContext, which will copy the buffer and create the context if it doesn't already exist, to the NS run loop.
* Add a maximum cache size to NS port's EmacsSurfaceAlan Third2021-05-311-11/+16
| | | | | | | | | | | | | | * src/nsterm.m (CACHE_MAX_SIZE): The maximum size. ([EmacsSurface initWithSize:ColorSpace:Scale:]): Initialise the cache array to the maximum size. ([EmacsSurface dealloc]): No longer need to release lastSurface separately. ([EmacsSurface getContext]): Don't create more surfaces than we have spaces for in the cache. ([EmacsSurface releaseContext]): Put currentSurface back on the cache instead of lastSurface. ([EmacsSurface copyContentsTo:]): Don't try to copy if the source and destination are actually the same surface.
* Make NS port swap buffers less oftenAlan Third2021-05-312-42/+55
| | | | | | | | | | | | * src/nsterm.h: Update EmacsSurface definition. * src/nsterm.m ([EmacsView focusOnDrawingBuffer]): Don't change the CGContext's settings directly. ([EmacsView unfocusDrawingBuffer]): Don't release the context here. ([EmacsView viewWillDraw]): Release the context here. ([EmacsSurface initWithSize:ColorSpace:Scale:]): Add the scale factor and if there's already a CGContext available, reuse it.. ([EmacsSurface releaseContext]): If there's no context don't try to release it.
* * src/keyboard.c (make_lispy_event): Fix previous.Glenn Morris2021-05-311-1/+1
|
* Merge from origin/emacs-27Glenn Morris2021-05-311-1/+8
|\ | | | | | | 5dfa5e26dd (origin/emacs-27) Improve documentation of regexp ranges
| * Improve documentation of regexp rangesEli Zaretskii2021-05-301-1/+8
| | | | | | | | | | * doc/lispref/searching.texi (Regexp Special): Document the effect of using octal escapes in regexp ranges. (Bug#17758)
* | Correct mouse handling when window origin changes between down and up eventsAlan Mackenzie2021-05-311-13/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do this by using frame relative positions rather than window relative ones, which gave rise to spurious drag events when the origin of the window changed between the mouse down and up events. This fixes bug #48409. * keyboard.c (frame_relative_event_pos): New static variable. (make_lispy_event): Record frame relative position of down event. When the up event is in the same position, "move" this event into the window of the down event when this window (typically a mini-window) is no longer under the mouse. Call make_lispy_position a second time to generate this changed event. (syms_of_keyboard): Declare Qwindow_edges. static_pro frame_relative_event_pos.
* | Remove spurious @example from the elisp manualColin Woodbury2021-05-311-2/+0
| | | | | | | | | | | | | | * doc/lispref/macros.texi (Defining Macros): Remove spurious extra pair of @example/@end example. Copyright-paperwork-exempt: yes
* | Remove messaging in ediff-make-diff2-bufferLars Ingebrigtsen2021-05-311-4/+1
| | | | | | | | | | | | * lisp/vc/ediff-diff.el (ediff-make-diff2-buffer): Remove message that's often misleading when diffing buffers (that may be unsaved) (bug#13091).
* | Put ELP results in a special-mode bufferLars Ingebrigtsen2021-05-311-8/+10
| | | | | | | | | | | | * lisp/emacs-lisp/elp.el (elp-results): Make `q' work in ELP results buffer (bug#14104). (elp-results-mode): Define as an empty special mode derivation.
* | Make `menu-bar-select-buffer' obsoleteLars Ingebrigtsen2021-05-312-3/+7
| | | | | | | | | | | | | | * lisp/menu-bar.el (menu-bar-select-buffer): Make obsolete (bug#15651). * lisp/msb.el (msb--select-buffer): Move function here and rename. (msb--make-keymap-menu): Use it.
* | Revert "Move menu-bar-select-buffer to msb.el"Lars Ingebrigtsen2021-05-312-4/+4
| | | | | | | | | | | | This reverts commit 253e52478c355dc29052c0d21013b8d06b473880. This is to be fixed in a different way in the next patch.
* | Use buffer-local-boundp in describe-variableLars Ingebrigtsen2021-05-311-4/+1
| | | | | | | | * lisp/help-fns.el (describe-variable): Use `buffer-local-boundp'.
* | Add new convenience function `buffer-local-boundp'Lars Ingebrigtsen2021-05-315-1/+31
| | | | | | | | | | | | | | * doc/lispref/variables.texi (Creating Buffer-Local): Document it. * lisp/subr.el (buffer-local-boundp): New function. * src/data.c (Flocal_variable_p): Mention it.
* | Speed up `describe-variable' completion predicateDaniel Mendler2021-05-311-6/+9
| | | | | | | | | | * lisp/help-fns.el (describe-variable): Do not switch to the original buffer in the predicate (bug#48738).
* | Fix error in xdg-mime-apps-files when XDG_CURRENT_DESKTOP is definedLars Ingebrigtsen2021-05-311-1/+1
| | | | | | | | | | * lisp/xdg.el (xdg-mime-apps-files): Don't bug out when XDG_CURRENT_DESKTOP is bound (bug#48748).
* | Document that the 'syntax-propertize-function' may move point.Philipp Stephani2021-05-301-6/+8
| | | | | | | | | | | | | | | | | | The functions generated by 'syntax-propertize-rules' don't use 'save-excursion', but 'syntax-propertize' does, so we might as well document that the 'syntax-propertize-function' may move point. * doc/lispref/syntax.texi (Syntax Properties): Document that the 'syntax-propertize-function' may move point.
* | Give 'syntax-propertize-wholelines' a docstring.Philipp Stephani2021-05-301-0/+4
| | | | | | | | | | | | | | This function is generally useful. * lisp/emacs-lisp/syntax.el (syntax-propertize-wholelines): Add docstring.
* | time-stamp: fix minor bug when parsing option combosStephen Gildea2021-05-302-2/+5
| | | | | | | | | | | | | | | | * lisp/time-stamp.el (time-stamp-string-preprocess): Handle digit options correctly to avoid overcounting colon options. * test/lisp/time-stamp-tests.el (time-stamp-format-time-zone-offset): Add a new test case that would have caught the option-parsing error.
* | time-stamp: refactor time-stamp-string-preprocessStephen Gildea2021-05-301-184/+190
| | | | | | | | | | * lisp/time-stamp.el (time-stamp-string-preprocess): Reduce lifetime of some loop-local variables to be less error-prone.
* | Do not reset settings when disabling a themeMauro Aranda2021-05-301-1/+1
| | | | | | | | | | | | | | | | * lisp/custom.el (disable-theme): Don't call custom-push-theme, since that resets the theme settings and it isn't useful: we only need to remove the theme setting from the themed variable or face. This fixes a regression when "toggling" themes, introduced while fixing Bug#34027. (Bug#48736)
* | Don't account for character compositions in 'format' and friendsEli Zaretskii2021-05-303-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'lisp_string_width' is called from 'format' and 'format-message', which can be called both very early into Emacs initialization and in other contexts where using the font backend is impossible or undesirable. So this commit changes 'lisp_string_width' to try accounting for automatic compositions only when explicitly requested, and only 'string-width' does that; 'format' and 'format-message' don't. * src/character.c (lisp_string_width): Accept an additional argument AUTO_COMP; attempt accounting for auto-compositions only if that argument is non-zero. (Bug#48732) * src/editfns.c (styled_format): * src/character.c (Fstring_width): Callers of 'lisp_string_width' adjusted.
* | Clarify that `symbol-file' only works for symbols in Lisp filesLars Ingebrigtsen2021-05-301-1/+5
| | | | | | | | | | * lisp/subr.el (symbol-file): Mention help-C-file-name in the doc string (bug#14932).
* | Allow help-C-file-name to work on symbols designating subrsLars Ingebrigtsen2021-05-301-1/+3
| | | | | | | | | | * lisp/help-fns.el (help-C-file-name): Allow working on symbols designating subrs (bug#14932).
* | Fix kmacro-view-ring-2nd doc stringLars Ingebrigtsen2021-05-301-1/+1
| | | | | | | | * lisp/kmacro.el (kmacro-view-ring-2nd): Fix doc string (bug#15020).
* | Move menu-bar-select-buffer to msb.elLars Ingebrigtsen2021-05-302-4/+4
| | | | | | | | | | | | | | * lisp/menu-bar.el (menu-bar-select-buffer): Move from here... (bug#15651). * lisp/msb.el (menu-bar-select-buffer): ... to here (which is the only usage in-tree in Emacs).
* | time-stamp: improve unit-test coverageStephen Gildea2021-05-291-1/+34
| | | | | | | | | | | | * test/lisp/time-stamp-tests.el (time-stamp-format-year-4digit, time-stamp-format-ignored-modifiers): Improve coverage with more cases. (time-stamp-format-multiple-conversions): New test.
* | `minibuffer-exit-hook' doc string clarificationLars Ingebrigtsen2021-05-301-1/+1
| | | | | | | | | | | | * src/minibuf.c (syms_of_minibuf): `minibuffer-exit-hook' is run in the minubuffer usually, so don't claim that it's run after (bug#16524).
* | Add a new documentation group for overlaysDaniel Martín2021-05-301-0/+46
| | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (overlay): Add documentation group for buffer overlays(bug#48730).
* | Improve the documentation of documentation groupsDaniel Martín2021-05-302-4/+16
| | | | | | | | | | | | | | * doc/lispref/help.texi (Documentation Groups): Fix typos and add an example. * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Add :no-eval* and :result-string keywords to the docstring. (Bug#48730)
* | Tweak octave continuation indentationLars Ingebrigtsen2021-05-302-1/+50
| | | | | | | | | | * lisp/progmodes/octave.el (octave-smie-rules): Further tweak continuation indentation (bug#17955).
* | Clarify indent-line-function doc stringEli Zaretskii2021-05-301-2/+2
| | | | | | | | | | * lisp/indent.el (indent-line-function): Clarify by avoiding specifics (bug#20846).
* | * lisp/mpc.el (mpc-format): Fix inf-loop in constructed predicateStefan Monnier2021-05-291-7/+15
| |
* | * lisp/wdired.el (wdired-normalize-filename): Sync withAndreas Schwab2021-05-291-7/+26
| | | | | | | | dired-get-filename. (Bug#48659)
* | * lisp/electric.el: Do auto-indent inside strings and comments by defaultStefan Monnier2021-05-292-4/+8
| | | | | | | | | | | | | | This fixes bug#20846 where it transpired that there is no good reason to shy away from auto-indenting inside comments and strings. (electric-indent-post-self-insert-function): Don't check syntax-ppss.
* | Improve tex fontification of quoted stringsKeith David Bershatsky2021-05-291-5/+7
| | | | | | | | | | * lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): Fontify ``text like this'' that has an apostrophe correctly (bug#16881).
* | Fix last changeEli Zaretskii2021-05-291-7/+10
| | | | | | | | | | | | * lisp/international/quail.el (quail-add-unread-command-events): Fix wording of the doc string. Move the rationale for the function out of the doc string and into a comment.
* | Fix key recording bug when an input method is activatedGregory Heytings2021-05-294-56/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/international/quail.el (quail-add-unread-command-events): New function. (quail-start-translation, quail-start-conversion) (quail-update-translation, quail-next-translation) (quail-prev-translation, quail-next-translation-block) (quail-prev-translation-block, quail-minibuffer-message): Use 'quail-add-unread-command-events' (and partly revert commit 03e3440dbb). (Bug#48042) * lisp/subr.el (inhibit--record-char): Now obsolete. * lisp/term/xterm.el (xterm--init): New function, with most of the code of former 'terminal-init-xterm'. (terminal-init-xterm): Clear the lossage after terminal initialization (see Bug#44908). (xterm--read-event-for-query): Do not use 'inhibit--record-char' anymore (revert commit 3e6525d69f). * src/keyboard.c (syms_of_keyboard): Remove 'inhibit--record-char' (partly revert 03e3440dbb). (record_char, syms_of_keyboard_for_pdumper): Do not use 'inhibit_record_char anymore'.
* | ; * etc/NEWS: Slight improvement of last entryMattias Engdegård2021-05-291-5/+6
| |
* | ; * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): slight rephraseMattias Engdegård2021-05-291-4/+3
| |
* | ; * lisp/mail/rmail.el (rmail-simplified-subject): Dodge relint nagMattias Engdegård2021-05-291-1/+1
| |
* | Fix shortdoc examplesMattias Engdegård2021-05-292-4/+49
| | | | | | | | | | | | | | | | | | | | Make sure that each example in shortdoc actually contains the function it illustrates, and add a test for it. * lisp/emacs-lisp/shortdoc.el (string, list, buffer, number): Use the right functions in examples for string-version-lessp, lax-plist-put, point-min and ffloor. * test/lisp/emacs-lisp/shortdoc-tests.el: New test file.
* | Add lambda to the pretty Ruby symbols listLars Ingebrigtsen2021-05-291-1/+2
| | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby--prettify-symbols-alist): Add lambda (bug#48681).
* | Add pretty symbols to ruby-modeWilliam Denton2021-05-291-0/+9
| | | | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby--prettify-symbols-alist): Add pretty symbols (bug#48681). (ruby-mode): Use them.
* | Mention the recent floating point reader changes in NEWSLars Ingebrigtsen2021-05-291-0/+7
| | | | | | | | * etc/NEWS: Mention the floating point reader changes (bug#48678).
* | Improve the dired-guess-shell-alist-user doc stringLars Ingebrigtsen2021-05-291-1/+6
| | | | | | | | | | * lisp/dired-x.el (dired-guess-shell-alist-user): Document how REGEXP is used (bug#17251).
* | Fix folding of non-ASCII lines when printing to PostscriptLars Ingebrigtsen2021-05-291-1/+3
| | | | | | | | | | * lisp/ps-mule.el (ps-mule-plot-string): Fix folding of non-ASCII Latin-1 lines (bug#17758).
* | Improve Octave indentation after continuation linesLars Ingebrigtsen2021-05-291-1/+2
| | | | | | | | | | * lisp/progmodes/octave.el (octave-smie-rules): Indent continuation lines better (bug#17955).
* | Improve the file-accessible-directory-p doc strinLars Ingebrigtsen2021-05-291-6/+10
| | | | | | | | | | * src/fileio.c (Ffile_accessible_directory_p): Don't use the phrase "directory name spec", which isn't defined (bug#18201).