summaryrefslogtreecommitdiff
path: root/lisp/composite.el
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Fix deletion of composed textEli Zaretskii2022-06-27
| | | | | | | * lisp/composite.el (lgstring-glyph-boundary): New function. * lisp/simple.el (delete-forward-char): Call 'lgstring-glyph-boundary' to find where to end the deletion inside an automatic composition. (Bug#56237)
* Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
* | ; Revert parts of previous commitStefan Kangas2021-10-22
| | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/unidata-gen.el (unidata-gen-table) (unidata-gen-table-symbol, unidata-gen-table-integer) (unidata-gen-table-numeric, unidata-gen-table-word-list) (unidata-describe-decomposition): * lisp/composite.el (unicode-category-table): * lisp/files.el (recover-file): * lisp/frame.el (frames-on-display-list, frame-background-mode): * lisp/language/indian.el (script-regexp-alist): Revert parts of previous commit; it seemed innocent but caused issues.
* | Remove redundant #' before lambdaStefan Kangas2021-10-21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/unidata-gen.el (unidata-gen-table) (unidata-gen-table-symbol, unidata-gen-table-integer) (unidata-gen-table-numeric, unidata-gen-table-word-list) (unidata-describe-decomposition): * lisp/apropos.el (apropos-user-option): * lisp/bookmark.el (bookmark-bmenu-search): * lisp/composite.el (unicode-category-table): * lisp/elec-pair.el (electric-pair--balance-info): * lisp/electric.el (electric-quote-chars): * lisp/emulation/cua-base.el (cua-rectangle-mark-key): * lisp/epa-hook.el (epa-file-encrypt-to): * lisp/faces.el (face-font-selection-order) (face-font-family-alternatives, face-font-registry-alternatives) (face-valid-attribute-values, tty-run-terminal-initialization): * lisp/files.el (recover-file, file-expand-wildcards): * lisp/frame.el (frames-on-display-list): * lisp/help-at-pt.el (help-at-pt-display-when-idle): * lisp/help-fns.el (help-fns--face-attributes): * lisp/ido.el (ido-mode, ido-unc-hosts): * lisp/isearch.el (isearch-highlight-regexp) (isearch-highlight-lines-matching-regexp): * lisp/language/indian.el (script-regexp-alist): * lisp/language/lao.el: * lisp/leim/quail/ipa.el (ipa-x-sampa-prepend-to-keymap-entry): * lisp/mh-e/mh-folder.el (mh-process-commands): * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer): * lisp/ps-mule.el (ps-mule-end-job): * lisp/ps-print.el (ps-color-scale, ps-background-pages) (ps-background-text, ps-background-image, ps-background) (ps-begin-job, ps-print-translation-table): * lisp/recentf.el (recentf-sort-ascending) (recentf-sort-descending, recentf-sort-basenames-ascending) (recentf-sort-basenames-descending) (recentf-sort-directories-ascending) (recentf-sort-directories-descending): * lisp/replace.el (occur-engine-add-prefix): * lisp/select.el (xselect--encode-string): * lisp/server.el (server-use-tcp): * lisp/ses.el (ses-sort-column): * lisp/sort.el (sort-columns): * lisp/term/ns-win.el (window-system-initialization): * lisp/tree-widget.el (tree-widget-image-formats): * lisp/whitespace.el (whitespace-report-region): Remove redundant #' before lambda.
* Handle VS-16 correctly for non-emoji codepointsRobert Pluim2021-10-19
| | | | | | | | | | | | | | | | | * admin/unidata/blocks.awk: Remove emoji overrides for codepoints with Emoji_Presentation = No, they're no longer necessary. * lisp/composite.el: Remove #xFE0F (VS-16) from the range handled by `compose-gstring-for-variation-glyph' so it can be handled by `font_range'. * src/composite.c (syms_of_composite): New variable `auto-composition-emoji-eligible-codepoints'. * admin/unidata/emoji-zwj.awk: Generate value for `auto-composition-emoji-eligible-codepoints'. Add `composition-function-table' entries for 'codepoint + U+FE0F' for them. * src/font.c (codepoint_is_emoji_eligible): New function to check if we should try to use the emoji font for a codepoint. (font_range): Use it.
* Move compose-gstring-for-variation-glyphRobert Pluim2021-09-24
| | | | | | | | It logically belongs in composite.el, not japanese.el * lisp/language/japanese.el (compose-gstring-for-variation-glyph): Remove from here. * lisp/composite.el (compose-gstring-for-variation-glyph): And add here.
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-16
|
* Use lexical-binding in the remaining preloaded filesStefan Monnier2021-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/widget.el: * lisp/w32-fns.el: * lisp/textmodes/fill.el: * lisp/term/common-win.el: * lisp/scroll-bar.el: * lisp/rfn-eshadow.el: * lisp/menu-bar.el: * lisp/language/tibetan.el: * lisp/language/thai.el: * lisp/language/misc-lang.el: * lisp/language/lao.el: * lisp/language/korean.el: * lisp/language/japanese.el: * lisp/language/indian.el: * lisp/language/hebrew.el: * lisp/language/european.el: * lisp/language/ethiopic.el: * lisp/language/english.el: * lisp/language/cyrillic.el: * lisp/language/chinese.el: * lisp/jka-cmpr-hook.el: * lisp/international/ucs-normalize.el: * lisp/international/mule.el: * lisp/international/mule-conf.el: * lisp/international/iso-transl.el: * lisp/international/fontset.el: * lisp/international/characters.el: * lisp/format.el: * lisp/facemenu.el: * lisp/electric.el: * lisp/dos-w32.el: * lisp/dos-fns.el: * lisp/disp-table.el: * lisp/cus-face.el: * lisp/composite.el: * lisp/bindings.el: * admin/unidata/blocks.awk: * admin/charsets/eucjp-ms.awk: * admin/charsets/cp51932.awk: Use `lexical-binding`.
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Support prettified display of fractional numbersEli Zaretskii2020-10-31
| | | | | | * lisp/composite.el (composition-function-table): Define an entry for U+2044 FRACTION SLASH, for prettier display of fractional numbers.
* ; Fix typosStefan Kangas2020-09-21
|
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Allow Zs characters to be composedEli Zaretskii2019-09-07
| | | | | | | | * src/composite.c (char_composable_p): Allow SPC and other Zs characters to be composed. * lisp/composite.el (compose-gstring-for-graphic): Don't reject characters whose general category is Zs. (Bug#14461)
* Merge from origin/emacs-26Glenn Morris2019-08-20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0b810eb Fix a typo in char-width-table 3f00db7 Minor update in admin/notes/unicode bcd0115 Fix lisp indent infloop on unfinished strings (Bug#37045) 5f992d1 Improve commentary in composite.el 3a04be2 ; Improve commentary in xdisp.c 15de1d1 Fix markup in dired-x.texi bda7fc7 ; Fix typo in a doc string of speedbar.el 6f57ef9 * src/callproc.c (Fcall_process): Doc fix. # Conflicts: # doc/misc/dired-x.texi # lisp/international/characters.el # src/callproc.c
| * Improve commentary in composite.elEli Zaretskii2019-08-17
| | | | | | | | | | | | | | * lisp/composite.el (compose-gstring-for-graphic) (compose-gstring-for-terminal): Add comments that explain Unicode General Category mnemonics in human-readable terms. (Bug#14461)
* | Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"Stefan Monnier2019-06-26
| | | | | | | | This reverts commit 698ff554ac2699ec48fefc85a1307cbc4a183b0d.
* | * lisp/calc/calc-ext.el (math-scalarp): Fix typoStefan Monnier2019-06-26
| |
* | Merge branch 'master' into harfbuzzYAMAMOTO Mitsuharu2019-05-23
|\ \
| * | Fixes for "Maintainer:" and related linesPaul Eggert2019-05-19
| | | | | | | | | | | | | | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* | | Merge branch 'master' into harfbuzzYAMAMOTO Mitsuharu2019-04-27
|\| |
| * | Merge from origin/emacs-26Paul Eggert2018-12-31
| |\| | | | | | | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| | * Update copyright year to 2019Paul Eggert2019-01-01
| | | | | | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | | Provide text directionality and language to HarfBuzz shaperEli Zaretskii2018-12-29
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/language/tv-util.el (tai-viet-composition-function): * lisp/language/ethio-util.el (ethio-composition-function): * lisp/language/japanese.el (compose-gstring-for-variation-glyph): * lisp/language/thai-util.el (thai-composition-function): * lisp/language/misc-lang.el (arabic-shape-gstring): * lisp/language/lao-util.el (lao-composition-function): * lisp/language/hebrew.el (hebrew-shape-gstring): * lisp/composite.el (compose-gstring-for-graphic) (compose-gstring-for-dotted-circle, auto-compose-chars) (compose-gstring-for-terminal): Accept 2nd argument DIRECTION; all callers changed. * src/composite.c (composition_reseat_it): Call auto-composition-function with one more argument DIRECTION. (syms_of_composite) <auto-composition-function>: Update the doc string. * src/ftfont.c (ftfont_shape_by_hb): Compute language and direction, and set buffer properties accordingly. * src/composite.c (autocmp_chars): * src/w32uniscribe.c (uniscribe_shape): * src/xftfont.c (xftfont_shape): * src/ftfont.c (ftfont_shape, ftfont_shape_by_hb): * src/font.c (Ffont_shape_gstring): Accept an additional argument DIRECTION. * src/macfont.m (lgstring_direction): New enum. (mac_font_shape_1, mac_screen_font_shape, mac_font_shape): Accept an additional argument specifying text direction. All callers changed. * src/font.c (syms_of_font): New symbols QL2R and QR2L. * src/font.h (shape): Accept new argument DIRECTION. All implementations changed. (Bug#33729) (ftfont_shape): Update prototype.
* | Audit use of lsh and fix glitchesPaul Eggert2018-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I audited use of lsh in the Lisp source code, and fixed the glitches that I found. While I was at it, I replaced uses of lsh with ash when either will do. Replacement is OK when either argument is known to be nonnegative, or when only the low-order bits of the result matter, and is a (minor) win since ash is a bit more solid than lsh nowadays, and is a bit faster. * lisp/calc/calc-ext.el (math-check-fixnum): Prefer most-positive-fixnum to (lsh -1 -1). * lisp/vc/vc-hg.el (vc-hg-state-fast): When testing fixnum width, prefer (zerop (ash most-positive-fixnum -32)) to (zerop (lsh -1 32)) (Bug#32485#11). * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Tighten sanity-check for bytecode overflow, by checking that the result of (ash pc -8) is nonnegative. Formerly this check was not needed since lsh was used and the number overflowed differently. * lisp/net/dns.el (dns-write): Fix some obvious sign typos in shift counts. Evidently this part of the code has never been exercised. * lisp/progmodes/hideif.el (hif-shiftleft, hif-shiftright): * lisp/term/common-win.el (x-setup-function-keys): Simplify. * admin/unidata/unidata-gen.el, admin/unidata/uvs.el: * doc/lispref/keymaps.texi, doc/lispref/syntax.texi: * doc/misc/calc.texi, doc/misc/cl.texi, etc/NEWS.19: * lisp/arc-mode.el, lisp/calc/calc-bin.el, lisp/calc/calc-comb.el: * lisp/calc/calc-ext.el, lisp/calc/calc-math.el: * lisp/cedet/semantic/wisent/comp.el, lisp/composite.el: * lisp/disp-table.el, lisp/dos-fns.el, lisp/edmacro.el: * lisp/emacs-lisp/bindat.el, lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el, lisp/emacs-lisp/cl-extra.el: * lisp/erc/erc-dcc.el, lisp/facemenu.el, lisp/gnus/message.el: * lisp/gnus/nndoc.el, lisp/gnus/nnmaildir.el, lisp/image.el: * lisp/international/ccl.el, lisp/international/fontset.el: * lisp/international/mule-cmds.el, lisp/international/mule.el: * lisp/json.el, lisp/mail/binhex.el, lisp/mail/rmail.el: * lisp/mail/uudecode.el, lisp/md4.el, lisp/net/dns.el: * lisp/net/ntlm.el, lisp/net/sasl.el, lisp/net/socks.el: * lisp/net/tramp.el, lisp/obsolete/levents.el: * lisp/obsolete/pgg-parse.el, lisp/org/org.el: * lisp/org/ox-publish.el, lisp/progmodes/cc-defs.el: * lisp/progmodes/ebnf2ps.el, lisp/progmodes/hideif.el: * lisp/ps-bdf.el, lisp/ps-print.el, lisp/simple.el: * lisp/tar-mode.el, lisp/term/common-win.el: * lisp/term/tty-colors.el, lisp/term/xterm.el, lisp/vc/vc-git.el: * lisp/vc/vc-hg.el, lisp/x-dnd.el, test/src/data-tests.el: Prefer ash to lsh when either will do.
* | Optionally add argument description in minor mode DOC (bug#10754)John Shahid2018-07-01
|/ | | | | | | | | | | Add a paragraph to minor mode's docstring documenting the mode's ARG usage if the supplied docstring doesn't already contain the word "ARG". * easy-mmode.el (easy-mmode--arg-docstring): New const. (easy-mmode--arg-docstring): New function. (define-minor-mode): Use them. Remove argument documentation from all minor modes.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* * lisp/composite.el (find-composition): Fix a typo in the doc string.Eli Zaretskii2017-12-01
|
* ; * lisp/composite.el (find-composition): Fix a typo in last change.Eli Zaretskii2017-11-30
|
* Avoid assertions in find-compositionEli Zaretskii2017-11-30
| | | | | | | | * src/font.c (font_range): If called with STRING non-nil and FACE a NULL pointer, compute face by calling face_at_string_position. (Bug#29506) * lisp/composite.el (find-composition): Doc fix.
* New option for handling ZWNJ in Arabic text renderingK. Handa2017-10-08
| | | | | | | | | | | Provide a new option 'arabic-shaper-ZWNJ-handling' that controls how to display ZWNJ in Arabic text rendering (Bug#28339). * lisp/language/misc-lang.el: Register arabic-shape-gstring in composition-function-table. (arabic-shaper-ZWNJ-handling): New variable. (arabic-shape-log): New variable. (arabic-shape-gstring): New function. * lisp/composite.el (lgstring-remove-glyph): New function.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Merge from origin/emacs-25Paul Eggert2017-01-01
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31
| | | | | | | | Run admin/update-copyright.
* | Add missing 'provide's in preloaded packagesPhilippe Vaucher2016-11-25
|/ | | | | | * lisp/composite.el: * lisp/replace.el: * lisp/textmodes/text-mode.el: Add provide statement. (Bug#24985)
* Minor fixes in global-auto-composition-modeEli Zaretskii2016-02-15
| | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): Produce prettier names of globalized minor modes. * lisp/composite.el (global-auto-composition-mode): Make it a globalized mode. (Bug#22682)
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* Update copyright year to 2015Paul Eggert2015-01-01
| | | | Run admin/update-copyright.
* Spelling fixes.Paul Eggert2014-09-11
| | | | | | | * lisp/ses.el (ses-file-format-extend-parameter-list): Rename from ses-file-format-extend-paramter-list. All uses changed. * lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling of ":delete".
* Fix Bug#17739.Kenichi Handa2014-06-28
| | | | | | | | * composite.el: Setup composition-function-table for dotted circle. (compose-gstring-for-dotted-circle): New function. * international/characters.el: Add category "^" to all non-spacing characters.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-01
|
* Make bootstrap without generated uni-*.el files possible againGlenn Morris2013-11-27
| | | | | | | | | | * lisp/loadup.el: Update command-line-args checking for unidata-gen. Add vc to load-path to allow loading vc-bzr when writing uni-*.el. * lisp/composite.el, lisp/international/characters.el: Handle unicode tables being undefined. * lisp/composite.el: Add (rough) FSF copyright years.
* Spelling fixes.Paul Eggert2013-11-04
|
* composite.el (compose-gstring-for-graphic): Handle enclosing mark.Kenichi Handa2013-09-12
|
* lisp/*.el: Fix typos; use string-match-p, looking-at-p, setq-local, ↵Juanma Barranquero2013-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defvar-local. * lisp/allout-widgets.el (allout-widgets-mode-off) (allout-widgets-mode-on, allout-widgets-pre-command-business) (allout-widgets-post-command-business) (allout-widgets-after-copy-or-kill-function) (allout-widgets-after-undo-function, allout-test-range-overlaps) (allout-decorate-item-and-context) (allout-graphics-modification-handler): Fix typos in docstrings. (allout-get-or-create-parent-widget): Use `looking-at-p'. * lisp/cmuscheme.el (scheme-start-file): Doc fix. (inferior-scheme-mode, switch-to-scheme): Fix typos in docstrings. (scheme-input-filter): Use `string-match-p'. * lisp/composite.el (compose-gstring-for-terminal): Fix typo in docstring. * lisp/dired-x.el: Use Dired consistently in docstrings. * lisp/dired.el: Use Dired consistently in docstrings. (dired-readin, dired-mode): Use `setq-local'. (dired-switches-alist): Make defvar-local. (dired-buffers-for-dir): Use `zerop'. (dired-safe-switches-p, dired-switches-escape-p) (dired-insert-old-subdirs, dired-move-to-end-of-filename) (dired-glob-regexp, dired-in-this-tree, dired-goto-file-1) (dired-sort-set-mode-line, dired-sort-toggle, dired-sort-R-check): (dired-goto-next-nontrivial-file): Use `string-match-p'. (dired-align-file, dired-insert-directory, dired-mark-files-in-region) (dired-toggle-marks, dired-mark-files-containing-regexp) (dired-mark-symlinks, dired-mark-directories, dired-mark-executables) (dired-flag-auto-save-files, dired-flag-backup-files): Use `looking-at-p'. (dired-mark-files-regexp, dired-build-subdir-alist): Use `string-match-p', `looking-at-p'. * lisp/dos-w32.el (untranslated-canonical-name, untranslated-file-p) (direct-print-region-helper): Use `string-match-p'.
* Reduce use of (require 'cl).Stefan Monnier2012-07-10
| | | | | | | | | | | | | | | | | | | | | | | | * admin/bzrmerge.el: Use cl-lib. * leim/quail/hangul.el: Don't require CL. * leim/quail/ipa.el: Use cl-lib. * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el: * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el: * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el: * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el: * international/quail.el, info-xref.el, imenu.el, image-mode.el: * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el: * battery.el, avoid.el, abbrev.el: Use cl-lib. * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el: * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el: * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el: * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el: * calculator.el, autorevert.el, apropos.el: Don't require CL. * emacs-bytecomp.el (byte-recompile-directory, display-call-tree) (byte-compile-unfold-bcf, byte-compile-check-variable): * emacs-byte-opt.el (byte-compile-trueconstp) (byte-compile-nilconstp): * emacs-autoload.el (make-autoload): Use pcase. * face-remap.el (text-scale-adjust): Simplify pcase patterns.
* Fix previous change for Bug#6988.Kenichi Handa2012-02-02
|
* Inhibit null-string composition component (Bug#6988).Kenichi Handa2012-02-02
|
* Spelling fixes.Paul Eggert2011-11-26
|