summaryrefslogtreecommitdiff
path: root/lisp/international/mule-util.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Improve documentation of string truncation APIsEli Zaretskii2021-10-301-4/+9
| | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): * lisp/international/mule-util.el (truncate-string-to-width): Document caveats of using 'truncate-string-to-width' when character composition is involved. * lisp/emacs-lisp/subr-x.el (string-limit): * doc/lispref/strings.texi (Creating Strings): Improve the documentation of 'string-limit'.
* Unknown line endings in filepos-to-bufferpos/bufferpos-to-lineposLars Ingebrigtsen2021-08-131-4/+21
| | | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos): Give better errors on `exact' with unknown line endings, and guess at Unix if `approximate' (bug#36573). (bufferpos-to-filepos): Ditto.
* Prefer `declare` over a `put` of `list-indent-function`.Stefan Monnier2021-02-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While at it, I enabled lexical-binding in the affected files. * lisp/cedet/semantic/sb.el: Enable lexical-binding. (semantic-sb-with-tag-buffer): Use `declare`. * lisp/cedet/semantic/bovine/el.el: Enable lexical-binding. (semantic-elisp-setup-form-parser): Use `declare`. * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/ert-x.el: Remove redundant `put`. * lisp/emulation/cua-rect.el: Enable lexical-binding. (cua--rectangle-operation, cua--rectangle-aux-replace): Use `declare`. * lisp/mh-e/mh-acros.el: Enable lexical-binding. (mh-do-in-gnu-emacs, mh-do-in-xemacs, mh-funcall-if-exists, defun-mh) (defmacro-mh, with-mh-folder-updating, mh-in-show-buffer) (mh-do-at-event-location, mh-iterate-on-messages-in-region) (mh-iterate-on-range): Use `declare`. * lisp/mh-e/mh-compat.el: Enable lexical-binding. (mh-flet): Use `declare`. * lisp/mh-e/mh-e.el: Enable lexical-binding. (defgroup-mh, defcustom-mh, defface-mh): Use `declare`. * lisp/net/sieve.el: Enable lexical-binding. Remove redundant :group args. (sieve-activate, sieve-remove, sieve-edit-script): Remove unused arg from the interactive spec. (sieve-deactivate-all): Remove unused var `name`. (sieve-change-region): Use `declare`. * lisp/obsolete/fast-lock.el: Enable lexical-binding. Remove redundant :group args. Remove XEmacs compat code. (save-buffer-state): Remove macro. (fast-lock-add-properties): Use `with-silent-modifications` instead. * lisp/obsolete/lazy-lock.el: Enable lexical-binding. Remove redundant :group args. (do-while): Use `declare`. (save-buffer-state): Remove macro. (lazy-lock-fontify-rest-after-change, lazy-lock-defer-line-after-change) (lazy-lock-defer-rest-after-change, lazy-lock-after-fontify-buffer) (lazy-lock-after-unfontify-buffer, lazy-lock-fontify-region): Use `with-silent-modifications` instead. * lisp/obsolete/pgg.el: Enable lexical-binding. Remove XEmacs compat code. (pgg-save-coding-system, pgg-as-lbt, pgg-process-when-success): Use `declare`. (pgg-add-passphrase-to-cache): Remove unused var `new-timer`. (pgg-decrypt-region): Remove unused var `buf`. * lisp/org/org-agenda.el (org-let, org-let2): Move from org-macs and use `declare`. * lisp/org/org-macs.el (org-let, org-let2): Move these functions that are inherently harmful to your karma to the only package that uses them. (org-scroll): Use `pcase` to avoid `eval` and use more readable syntax for those integers standing for events. * lisp/progmodes/antlr-mode.el: Enable lexical-binding. (save-buffer-state-x): Use `declare` and `with-silent-modifications`. * lisp/international/mule-util.el (with-coding-priority): * lisp/cedet/ede/proj-comp.el (proj-comp-insert-variable-once): * lisp/org/org-element.el (org-element-map): * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load): * test/lisp/emacs-lisp/generator-tests.el (cps-testcase): Use `declare`.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* * lisp/international/mule-util.el: Revert bug#41250 workaroundStefan Monnier2020-10-061-4/+1
| | | | | (truncate-string-ellipsis): Use the '…' character itself since it should work now and is more readable.
* ; * lisp/international/mule-util.el (truncate-string-ellipsis): Fix comment.Eli Zaretskii2020-10-061-2/+3
|
* Fix last changeMattias Engdegård2020-10-061-2/+2
| | | | | | * lisp/international/mule-util.el (truncate-string-ellipsis): Use Unicode hex escapes instead of named escapes here, because \N{...} is not available during bootstrapping. (Bug#41250)
* Fix last changeEli Zaretskii2020-10-061-4/+6
| | | | | * lisp/international/mule-util.el (truncate-string-ellipsis): Add a FIXME comment that explains the last change. (Bug#41250)
* Don't use the character '…' literally in mule-util.el (bug#41250)Juri Linkov2020-10-061-5/+5
| | | | | * lisp/international/mule-util.el (truncate-string-ellipsis): Replace the character '…' with its Unicode name.
* Fix the documentation parts of a recent commitEli Zaretskii2020-10-051-1/+1
| | | | | | | | | | | | | * lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix. * doc/lispref/display.texi (Size of Displayed Text): Improve wording and accuracy of the documentation of 'truncate-string-to-width'. Document the function 'truncate-string-ellipsis'. * etc/NEWS: Improve the wording of the entry for 'truncate-string-to-width'.
* Use '…' for ellipsis in truncate-string-to-width by default (bug#41250)Juri Linkov2020-10-041-4/+17
| | | | | | | | | | | | | | | | * lisp/international/mule-util.el (truncate-string-ellipsis): Change the default value to nil. (truncate-string-ellipsis): New function. (truncate-string-to-width): Use the value returned from the function 'truncate-string-ellipsis'. * lisp/tab-bar.el (tab-bar-tab-name-truncated): * lisp/tab-line.el (tab-line-tab-name-ellipsis): Take advantage of the improvement of the ellipsis default value in truncate-string-to-width and truncate-string-ellipsis. * doc/lispref/display.texi (Size of Displayed Text): Improve description of truncate-string-ellipsis.
* Remove many items obsolete since Emacs 23.1Stefan Kangas2020-08-141-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emacs 23.1 was five major releases and over a decade ago. This list can be reviewed before to the next release, but for now hopefully this motivates any needed external updates. Ref: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02198.html * lisp/abbrev.el (pre-abbrev-expand-hook): * lisp/bookmark.el (bookmark-read-annotation-text-func) (bookmark-jump-noselect): * lisp/buff-menu.el (buffer-menu-mode-hook): * lisp/cus-edit.el (custom-mode-hook, custom-mode): * lisp/dirtrack.el (dirtrack-debug-toggle, dirtrack-debug): * lisp/emacs-lisp/crm.el (crm-minibuffer-complete) (crm-minibuffer-completion-help) (crm-minibuffer-complete-and-exit): * lisp/emacs-lisp/easymenu.el (easy-menu-precalculate-equivalent-keybindings): * lisp/emacs-lisp/lisp-mode.el (lisp-mode-auto-fill): * lisp/epa.el (epa-display-verify-result): * lisp/epg.el (epg-passphrase-callback-function): * lisp/eshell/eshell.el (eshell-report-bug): * lisp/ffap.el (ffap-bug, ffap-submit-bug): * lisp/files.el (locate-file-completion): * lisp/hi-lock.el (hi-lock-face-history, hi-lock-regexp-history): * lisp/hilit-chg.el (highlight-changes-initial-state) (highlight-changes-active-string) (highlight-changes-passive-string, global-highlight-changes): * lisp/international/mule-cmds.el (nonascii-insert-offset) (nonascii-translation-table): * lisp/international/mule-diag.el (non-iso-charset-alist): * lisp/international/mule-util.el (detect-coding-with-priority): * lisp/international/mule.el (charset-id, charset-bytes) (charset-list, char-valid-p, generic-char-p) (char-coding-system-table, make-coding-system) (set-coding-priority) * lisp/mail/rmail.el (rmail-message-filter): * lisp/minibuffer.el (complete-in-turn, dynamic-completion-table) (completion-common-substring) (minibuffer-local-must-match-filename-map): * lisp/mouse.el (mouse-major-mode-menu, mouse-popup-menubar) (mouse-popup-menubar-stuff): * lisp/net/newst-treeview.el (newsticker-groups-filename): * lisp/obsolete/tpu-edt.el (tpu-have-ispell, GOLD-map): * lisp/password-cache.el (password-read-and-add): * lisp/shell.el (shell-dirtrack-toggle): * lisp/subr.el (forward-point, redisplay-end-trigger-functions) (process-filter-multibyte-p, set-process-filter-multibyte): * lisp/t-mouse.el (t-mouse-mode): * lisp/term/w32-win.el (w32-focus-frame, w32-select-font): * lisp/textmodes/ispell.el (ispell-aspell-supports-utf8): * lisp/textmodes/remember.el (remember-buffer): * lisp/tooltip.el (tooltip-hook): * lisp/url/url-util.el (url-generate-unique-filename): * lisp/url/url-vars.el (url-temporary-directory): * lisp/vc/vc-hooks.el (vc-workfile-version) (vc-default-working-revision): * lisp/vc/vc-mtn.el (vc-mtn-command): * lisp/vc/vc.el (vc-revert-buffer): * lisp/vcursor.el (vcursor-toggle-vcursor-map): Remove items, obsolete since Emacs 23.1. * lisp/abbrev.el (expand-abbrev): * lisp/epg.el (epg-context): Change 'epg-passphrase-callback-function' call to 'epa-' alternative. * lisp/eshell/em-rebind.el (eshell-cannot-leave-input-list): Don't refer to removed function 'forward-point'. * test/manual/etags/c-src/abbrev.c (Fexpand_abbrev): (syms_of_abbrev): Don't run removed hook 'pre-abbrev-expand-hook'. * lisp/international/mule.el (transform-make-coding-system-args): Declare obsolete. * lisp/progmodes/idlwave.el: Update reference to removed function 'char-valid-p'. * lisp/gnus/mml2015.el (epg-encrypt-string): * lisp/gnus/mml1991.el (epg-make-context): * lisp/gnus/mml-smime.el (autoload): Remove autoload of removed 'epg-passphrase-callback-function'. * lisp/minibuffer.el (completion-extra-properties): Remove support for `completion-common-substring'. * lisp/obsolete/tpu-edt.el (tpu-toggle-overwrite-mode) Remove support for removed `spell' package. * src/coding.c (syms_of_coding): * doc/misc/efaq.texi: * doc/emacs/frames.texi (Menu Mouse Clicks): * doc/misc/url.texi (Customization): Doc fixes. ; * etc/NEWS: List removed items.
* ; Fix some typos and doc issues (bug#40695)Štěpán Němec2020-04-181-1/+1
|
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Use text properties instead of truncating stringsLars Ingebrigtsen2019-10-071-4/+17
| | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag): Use this to allow using commands like `C-s' to search for even truncated bits. * lisp/international/mule-util.el (truncate-string-to-width): Allow using text properties to truncate strings instead of actually truncating strings (bug#17782).
* Avoid loading mule-util at startupEli Zaretskii2019-07-131-56/+0
| | | | | | | | | * lisp/international/mule-util.el (char-displayable-p): Move from here... * lisp/international/mule.el (char-displayable-p): ...to here. This avoids always loading mule-util at startup due to a call to 'char-displayable-p' in 'startup--setup-quote-display'.
* * lisp/international/mule-util.el: Avoid setq; clarify meaning of -1.Stefan Monnier2019-04-291-13/+11
|
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 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-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Replace insignificant backquotesMichael Heerdegen2018-11-251-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace most insignificant occurrences of '`' with a straight quote, sharp quote or nothing. This includes backquotes in 'pcase' patterns. * admin/admin.el: * lisp/apropos.el: * lisp/arc-mode.el: * lisp/auth-source.el: * lisp/avoid.el: * lisp/bindings.el: * lisp/bs.el: * lisp/calculator.el: * lisp/calendar/todo-mode.el: * lisp/cedet/semantic.el: * lisp/cedet/semantic/analyze/debug.el: * lisp/cedet/semantic/bovine.el: * lisp/cedet/semantic/dep.el: * lisp/cedet/semantic/grammar.el: * lisp/cedet/semantic/wisent/comp.el: * lisp/cedet/semantic/wisent/grammar.el: * lisp/cedet/srecode/mode.el: * lisp/cus-edit.el: * lisp/doc-view.el: * lisp/elec-pair.el: * lisp/electric.el: * lisp/emacs-lisp/autoload.el: * lisp/emacs-lisp/benchmark.el: * lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/cl-extra.el: * lisp/emacs-lisp/cl-generic.el: * lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/copyright.el: * lisp/emacs-lisp/debug.el: * lisp/emacs-lisp/eieio-compat.el: * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/generator.el: * lisp/emacs-lisp/inline.el: * lisp/emacs-lisp/macroexp.el: * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/package.el: * lisp/emacs-lisp/radix-tree.el: * lisp/emacs-lisp/smie.el: * lisp/epa.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-track.el: * lisp/erc/erc.el: * lisp/eshell/em-ls.el: * lisp/eshell/esh-cmd.el: * lisp/files.el: * lisp/filesets.el: * lisp/font-lock.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/gnus-art.el: * lisp/gnus/gnus-cite.el: * lisp/gnus/gnus-group.el: * lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-sum.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el: * lisp/gnus/gnus.el: * lisp/gnus/message.el: * lisp/gnus/mm-util.el: * lisp/gnus/mml.el: * lisp/gnus/nnheader.el: * lisp/gnus/nnimap.el: * lisp/gnus/nnmairix.el: * lisp/gnus/spam.el: * lisp/hexl.el: * lisp/hi-lock.el: * lisp/ibuf-ext.el: * lisp/ibuffer.el: * lisp/ido.el: * lisp/info.el: * lisp/international/mule-cmds.el: * lisp/international/mule-util.el: * lisp/json.el: * lisp/jsonrpc.el: * lisp/language/cyrillic.el: * lisp/language/european.el: * lisp/language/georgian.el: * lisp/language/tibetan.el: * lisp/language/utf-8-lang.el: * lisp/language/vietnamese.el: * lisp/ldefs-boot.el: * lisp/mail/mail-extr.el: * lisp/man.el: * lisp/menu-bar.el: * lisp/mh-e/mh-acros.el: * lisp/mh-e/mh-folder.el: * lisp/mh-e/mh-mime.el: * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-speed.el: * lisp/minibuffer.el: * lisp/mpc.el: * lisp/net/ange-ftp.el: * lisp/net/hmac-def.el: * lisp/net/newst-backend.el: * lisp/net/quickurl.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-compat.el: * lisp/notifications.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/xesam.el: * lisp/org/ob-C.el: * lisp/org/ob-core.el: * lisp/org/ob-exp.el: * lisp/org/ob-groovy.el: * lisp/org/ob-haskell.el: * lisp/org/ob-io.el: * lisp/org/ob-lisp.el: * lisp/org/ob-lob.el: * lisp/org/ob-lua.el: * lisp/org/ob-octave.el: * lisp/org/ob-perl.el: * lisp/org/ob-python.el: * lisp/org/ob-ref.el: * lisp/org/ob-ruby.el: * lisp/org/ob-sql.el: * lisp/org/org-agenda.el: * lisp/org/org-capture.el: * lisp/org/org-clock.el: * lisp/org/org-colview.el: * lisp/org/org-duration.el: * lisp/org/org-element.el: * lisp/org/org-entities.el: * lisp/org/org-gnus.el: * lisp/org/org-indent.el: * lisp/org/org-info.el: * lisp/org/org-inlinetask.el: * lisp/org/org-lint.el: * lisp/org/org-list.el: * lisp/org/org-mouse.el: * lisp/org/org-plot.el: * lisp/org/org-src.el: * lisp/org/org-table.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-html.el: * lisp/org/ox-latex.el: * lisp/org/ox-man.el: * lisp/org/ox-md.el: * lisp/org/ox-org.el: * lisp/org/ox-publish.el: * lisp/org/ox-texinfo.el: * lisp/org/ox.el: * lisp/play/bubbles.el: * lisp/play/gamegrid.el: * lisp/progmodes/autoconf.el: * lisp/progmodes/cc-defs.el: * lisp/progmodes/cc-engine.el: * lisp/progmodes/cc-fonts.el: * lisp/progmodes/cc-langs.el: * lisp/progmodes/cperl-mode.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/elisp-mode.el: * lisp/progmodes/flymake-cc.el: * lisp/progmodes/flymake.el: * lisp/progmodes/fortran.el: * lisp/progmodes/grep.el: * lisp/progmodes/gud.el: * lisp/progmodes/idlwave.el: * lisp/progmodes/js.el: * lisp/progmodes/m4-mode.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/octave.el: * lisp/progmodes/opascal.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/sql.el: * lisp/progmodes/verilog-mode.el: * lisp/ps-mule.el: * lisp/rtree.el: * lisp/ruler-mode.el: * lisp/ses.el: * lisp/simple.el: * lisp/startup.el: * lisp/subr.el: * lisp/term/ns-win.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/conf-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/refill.el: * lisp/textmodes/sgml-mode.el: * lisp/textmodes/tex-mode.el: * lisp/tutorial.el: * lisp/url/url-dav.el: * lisp/url/url-gw.el: * lisp/url/url-http.el: * lisp/url/url-methods.el: * lisp/url/url-privacy.el: * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-ptch.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/pcvs-info.el: * lisp/vc/pcvs.el: * lisp/vc/smerge-mode.el: * lisp/vc/vc-git.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-rcs.el: * lisp/whitespace.el: * lisp/window.el: * test/lisp/electric-tests.el: * test/lisp/emacs-lisp/cl-lib-tests.el: * test/lisp/emacs-lisp/ert-tests.el: * test/lisp/epg-tests.el: * test/lisp/jsonrpc-tests.el: * test/src/data-tests.el: * test/src/json-tests.el: Replace most insignificant backquotes.
* | Prune most-positive-fixnum from Lisp sourcePaul Eggert2018-08-221-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I looked through all instances of most-negative-fixnum and most-positive-fixnum in the Lisp source code, and when it was easy I removed assumptions that integers fit in fixnums. The remaining instances are either nontrivial to fix, or are inherent to the algorithm. * lisp/arc-mode.el (archive-l-e): Do not convert to float, since we have bignums now. All uses changed. * lisp/calc/calc.el (math-bignum): Don’t special-case most-negative-fixnum. * lisp/calendar/parse-time.el (parse-time-string): * lisp/emacs-lisp/edebug.el (edebug-read-special): * lisp/emacs-lisp/package.el (package--remove-hidden): * lisp/gnus/nnfolder.el (nnfolder-read-folder): * lisp/international/mule-util.el (filepos-to-bufferpos--dos): * lisp/menu-bar.el (menu-bar-update-buffers): * lisp/net/rcirc.el (rcirc-handler-317): * lisp/org/org-agenda.el (org-cmp-ts): * lisp/window.el (window--resize-child-windows): Avoid arbitrary limit to most-positive-fixnum or to most-negative-fixnum. * lisp/calendar/time-date.el (days-to-time): * lisp/erc/erc-dcc.el (erc-unpack-int): Don’t worry about integer overflow. * lisp/cedet/semantic/wisent/comp.el (wisent-BITS-PER-WORD): * lisp/gnus/message.el (message-unique-id): * lisp/org/org-footnote.el (org-footnote-new): Simplify. * lisp/erc/erc-dcc.el (erc-most-positive-int-bytes) (erc-most-positive-int-msb): Remove; no longer needed. * lisp/net/imap.el (imap-string-to-integer): Remove; unused. * lisp/org/org-element.el (org-element--cache-generate-key): Document fixnum limitation.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | 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.
* Optimize skkdic conversion (Bug#28043)Noam Postavsky2017-08-211-23/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | The primary speedup comes from the optimizing lookup-nested-alist and set-nested-alist for the case where the key is a string. This brings the time down to less than half the original. * lisp/international/mule-util.el (lookup-nested-alist) (set-nested-alist): Use `assq' instead of `assoc' when KEYSEQ is a string. * lisp/international/ja-dic-cnv.el (skkdic-collect-okuri-nasi) (skkdic-convert-okuri-nasi): Use progress-reporter functions instead of calculating ratio of work done inline. (skkdic-reduced-candidates): Call `char-category-set' on the first character of the string directly, instead of using a regexp for the character category. (skkdic--japanese-category-set): New constant. (skkdic-collect-okuri-nasi): Just set `skkdic-okuri-nasi-entries-count' at once at the end rather than updating it throughout the loop. (skkdic-convert-postfix skkdic-convert-prefix) skkdic-get-candidate-list, skkdic-collect-okuri-nasi) (skkdic-extract-conversion-data): Use `match-string-no-properties' instead of `match-string'.
* Merge from origin/emacs-25Paul Eggert2017-03-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ec4226d * lisp/woman.el (woman): Fix docstring prefix arg description. 2b774fa Mention "editor" in Emacs man page header ae60d0c Document problems with nerd-fonts 2fdb5a9 ; Details about pinning Emacs to w32 task bar 5c3105e * doc/lispref/modes.texi (Derived Modes): Make example more i... 4c51ef4 Clarify what is the "cursor" 8303c32 ; * etc/NEWS: Copyedits. 3f7493e ; Fix a typo in comment c54cf8d Improve commentary in lisp.h 8b92f86 ; * admin/make-tarball.txt: Cross-reference admin/release-pro... 0ba9932 Disable native completion for ipython (Bug#25067) 38fc456 Fix a typo in ada-mode manual 00e75ba ; * src/coding.c (Fencode_coding_region): Fix a typo in the d... a541c21 Clarify documentation of 'bufferpos-to-filepos' and 'filepos-... # Conflicts: # etc/NEWS # etc/PROBLEMS
| * Clarify documentation of 'bufferpos-to-filepos' and 'filepos-to-bufferpos'Eli Zaretskii2017-02-051-2/+2
| | | | | | | | | | | | | | | | | | * doc/lispref/nonascii.texi (Text Representations): Clarify that 'exact' value of QUALITY argument to 'bufferpos-to-filepos' and 'filepos-to-bufferpos' can lead to expensive and slow processing. * lisp/international/mule-util.el (filepos-to-bufferpos) (bufferpos-to-filepos): Doc fix. (Bug#25626)
* | Fix recent bootstrap issue by moving string-to-listGlenn Morris2017-02-121-10/+0
|/ | | | | | | | * lisp/international/mule-util.el (string-to-list, string-to-vector): Move from here... * lisp/subr.el (string-to-list, string-to-vector): ...to here. The implementation is trivial and at least string-to-list has ended up being needed early during bootstrap.
* Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | Run admin/update-copyright.
* Fix some declarations.Glenn Morris2016-01-121-1/+1
| | | | | | | | | * lisp/descr-text.el (internal-char-font): * lisp/cedet/mode-local.el (xref-item-location): * lisp/gnus/mml-smime.el (epg-key-sub-key-list) (epg-sub-key-capability, epg-sub-key-validity): * lisp/international/mule-util.el (internal-char-font): Fix declarations.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Document truncate-string-ellipsisEli Zaretskii2015-11-291-1/+2
| | | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): Document 'truncate-string-ellipsis'. * lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix. (truncate-string-to-width): Mention in the doc string that the default for ELLIPSIS comes from 'truncate-string-ellipsis'. * etc/NEWS: Move the 'truncate-string-ellipsis' entry to the "Lisp Changes" section.
* ; Spelling fixPaul Eggert2015-09-101-1/+1
|
* Improvements for curved quotes on Linux consulePaul Eggert2015-09-091-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should help Emacs work better out-of-the-box on Linux consoles, which have only limited support for displaying Unicode characters. Also, undo the recent change that caused text-quoting-style to affect quote display on terminals, so that the two features are independent. See Alan Mackenzie in: http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00244.html Finally, add a style parameter to startup--setup-quote-display, so that this function can also be invoked after startup, with different styles depending on user preference at the time. * configure.ac: Check for linux/kd.h header. * doc/emacs/display.texi (Text Display): Document quote display. * doc/lispref/display.texi (Active Display Table): * etc/NEWS: * lisp/startup.el (startup--setup-quote-display, command-line): text-quoting-style no longer affects quote display. * doc/lispref/frames.texi (Terminal Parameters): Fix typo. * lisp/international/mule-util.el (char-displayable-p): * lisp/startup.el (startup--setup-quote-display): On a text terminal supporting glyph codes, use the reported glyph codes instead of the terminal coding system, as this is more accurate on the Linux console. * lisp/startup.el (startup--setup-quote-display): New optional arg STYLE. * src/fontset.c (Finternal_char_font): Report glyph codes for a text terminal, if they are available. Currently this is supported only for the Linux console. * src/termhooks.h (struct terminal): New member glyph-code-table. * src/terminal.c [HAVE_LINUX_KD_H]: Include <errno.h>, <linux/kd.h>. (calculate_glyph_code_table) [HAVE_LINUX_KD_H]: New function. (terminal_glyph_code): New function.
* Fix following Info cross-references to anchorsEli Zaretskii2015-07-181-0/+73
| | | | | | | | | | | | | * lisp/info.el (Info-read-subfile): Add to the returned value the length of subfile preamble, after converting it to file's byte offset, as expected by the caller. Use bufferpos-to-filepos. (Info-find-node-2): If searching for a node with a 1000-character slop fails, try again with a 10000-character slop, to account for known bugs in Texinfo 5.0 and 5.1. (Bug#21055) * lisp/international/mule-util.el (bufferpos-to-filepos): New function. * etc/NEWS: Mention bufferpos-to-filepos.
* (filepos-to-bufferpos): Further tweaks to the utf-16 codeStefan Monnier2015-06-191-13/+11
| | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos): Fix typo. Move non-exact check to the utf-16 branch (the only one affected). Don't use byte-to-position for the utf-16 case.
* Minor fixes in filepos-to-bufferposEli Zaretskii2015-06-191-7/+9
| | | | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos): Remove test for utf-8-emacs. Exempt single-byte encodings from the 'use-exact' path when QUALITY is 'exact'. Test UTF-16 encodings for BOM before subtracting 2 bytes. Use 'identity' when adjusting UTF-16 encoded files for CR-LF EOLs.
* Improve and extend filepos-to-bufferposEli Zaretskii2015-06-181-2/+34
| | | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos--dos): Don't barf if F returns nil for some argument. (filepos-to-bufferpos): Expand to support UTF-16 and not assume that every encoding of type 'charset' is single-byte.
* (filepos-to-bufferpos): Add missing cases. Make sure it terminates.Stefan Monnier2015-06-161-16/+48
| | | | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos--dos): New auxiliary function, extracted from filepos-to-bufferpos. Make sure it terminates. (filepos-to-bufferpos): Use it to fix the latin-1-dos case. Add support for the `exact' quality.
* Fix infloop in filepos-to-bufferposEli Zaretskii2015-06-161-3/+5
| | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos): Fix EOL offset calculation, and make it conditional on the eol-type of the file's encoding. (Bug#20825)
* * lisp/info.el: Cleanup bytepos/charpos issuesStefan Monnier2015-06-151-7/+40
| | | | | | | | * lisp/international/mule-util.el: Use lexical-binding. (filepos-to-bufferpos): New function. * lisp/info.el (Info-find-in-tag-table-1): Use 0-based file positions. (Info-find-node-2): Use filepos-to-bufferpos (bug#20704). (Info-read-subfile, Info-search): Use 0-based file positions.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* * lisp/international/mule-util.el (truncate-string-ellipsis): New var.Stefan Monnier2014-06-191-2/+5
| | | | (truncate-string-to-width): Use it.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Extract truncate-string-to-width tests to a separate fileGlenn Morris2013-08-041-53/+0
| | | | | | | | | | * test/automated/mule-util.el: New file, with tests extracted from lisp/international/mule-util.el. Copyright years based on when the original test-suite comment was added to lisp/international/mule-util.el (in 2002). * lisp/international/mule-util.el: Extract comment test-suite out to separate file.
* Use UTF-8 for most files with non-ASCII characters.Paul Eggert2013-04-011-25/+25
| | | | | | | | | | | | | | | | | | | | | | | * admin/notes/unicode (etc/tutorials/TUTORIAL.ko, leim/quail/hanja.el) (leim/quail/hanja3.el, leim/quail/symbol-ksc.el): Now utf-8, not iso-2022-7bit. Also, files that contain non-UTF-8 characters are now encoded in utf-8-emacs, not iso-2022-7bit. * etc/tutorials/TUTORIAL.ko, tutorials/TUTORIAL.th: Switch from iso-2022-7bit to utf-8. * leim/quail/cyrillic.el, leim/quail/czech.el, leim/quail/ethiopic.el: * leim/quail/greek.el, leim/quail/hanja.el, leim/quail/hanja3.el: * leim/quail/hebrew.el, leim/quail/lao.el, leim/quail/lrt.el: * leim/quail/slovak.el, leim/quail/symbol-ksc.el, leim/quail/thai.el: * leim/quail/tibetan.el, leim/quail/viqr.el, leim/quail/vntelex.el: * leim/quail/vnvni.el, leim/quail/welsh.el: * lisp/international/latin1-disp.el, lisp/international/mule-util.el: * lisp/language/cyril-util.el, lisp/language/european.el: * lisp/language/ind-util.el, lisp/language/lao-util.el, lisp/language/thai.el: * lisp/language/tibet-util.el, lisp/language/tibetan.el: * lisp/language/viet-util.el: Switch from iso-2022-7bit to utf-8 or (if needed) utf-8-emacs. Fixes: debbugs:13936
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Use declare forms, where possible, to mark obsolete functions.Chong Yidong2012-09-251-35/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-passphrase-hint-string): Likewise. (allout-init): Use a declare form to mark obsolete. * lisp/calendar/calendar.el (calendar-version): * lisp/calendar/icalendar.el (icalendar-extract-ical-from-buffer) (icalendar-convert-diary-to-ical): * lisp/cus-edit.el (custom-mode): * lisp/ansi-color.el (ansi-color-unfontify-region): * lisp/international/latin1-disp.el (latin1-char-displayable-p): * lisp/progmodes/cwarn.el (turn-on-cwarn-mode): * lisp/progmodes/which-func.el (which-func-update-1): Use define-obsolete-function-alias. * lisp/bookmark.el (bookmark-jump-noselect): Use a declare form to mark this function obsolete. * lisp/calendar/cal-x.el (calendar-two-frame-setup) (calendar-only-one-frame-setup, calendar-one-frame-setup): * lisp/calendar/calendar.el (american-calendar, european-calendar) (calendar-for-loop): * lisp/comint.el (comint-dynamic-simple-complete) (comint-dynamic-complete-as-filename, comint-unquote-filename): * lisp/desktop.el (desktop-load-default): * lisp/dired-x.el (dired-omit-here-always) (dired-hack-local-variables, dired-default-directory): * lisp/emacs-lisp/derived.el (derived-mode-class): * lisp/emacs-lisp/timer.el (timer-set-time-with-usecs): * lisp/emacs-lock.el (toggle-emacs-lock): * lisp/epa.el (epa-display-verify-result): * lisp/epg.el (epg-sign-keys, epg-start-sign-keys) (epg-passphrase-callback-function): * lisp/eshell/esh-util.el (eshell-for): * lisp/eshell/eshell.el (eshell-remove-from-window-buffer-names) (eshell-add-to-window-buffer-names): * lisp/files.el (locate-file-completion): * lisp/imenu.el (imenu-example--create-c-index) (imenu-example--create-lisp-index) (imenu-example--lisp-extract-index-name) (imenu-example--name-and-position): * lisp/international/mule-cmds.el (princ-list): * lisp/international/mule-diag.el (decode-codepage-char): * lisp/international/mule-util.el (detect-coding-with-priority): * lisp/iswitchb.el (iswitchb-read-buffer): * lisp/mail/mailalias.el (mail-complete): * lisp/mail/sendmail.el (mail-sent-via): * lisp/mouse.el (mouse-popup-menubar-stuff, mouse-popup-menubar) (mouse-major-mode-menu): * lisp/password-cache.el (password-read-and-add): * lisp/pcomplete.el (pcomplete-parse-comint-arguments): * lisp/progmodes/sh-script.el (sh-maybe-here-document): * lisp/replace.el (query-replace-regexp-eval): * lisp/savehist.el (savehist-load): * lisp/simple.el (choose-completion-delete-max-match): * lisp/term.el (term-dynamic-simple-complete): * lisp/vc/ediff-init.el (ediff-check-version): * lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically): * lisp/vc/vc.el (vc-diff-switches-list): * lisp/view.el (view-return-to-alist-update): Likewise. * lisp/iswitchb.el (iswitchb-read-buffer): Move code of iswitchb-define-mode-map here, and delete that obsolete function. * lisp/subr.el (eval-next-after-load, makehash, insert-string) (assoc-ignore-representation, assoc-ignore-case): Use declare to mark obsolete. (mode-line-inverse-video): Variable deleted. * lisp/emacs-lisp/byte-run.el (make-obsolete): Doc fix; emphasize that this applies to functions. * lisp/erc/erc.el (erc-send-command): Use define-obsolete-function-alias. * lisp/international/mule-util.el (string-to-sequence): Remove. * lisp/net/newst-backend.el (newsticker-cache-filename): * lisp/net/newst-treeview.el (newsticker-groups-filename): Fix incorrect obsolescence declaration. * lisp/net/snmp-mode.el (snmp-font-lock-keywords-3): Don't use obsolete font-lock-reference-face. * lisp/url/url-parse.el (url-recreate-url-attributes): * lisp/url/url-util.el (url-generate-unique-filename): Use declare to mark obsolete. * src/xdisp.c (mode_line_inverse_video): Delete obsolete variable.