diff options
| author | Paul Eggert | 2016-05-26 12:55:06 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-26 12:55:06 -0700 |
| commit | 0bf5739b77c75f13d46fc49d5e3c098fe49a5070 (patch) | |
| tree | d342da7bc9065197736a8184e55c9925a40f04f0 | |
| parent | 764f04871d67a5aad8943136d5142ed59bfa9a51 (diff) | |
| parent | c3489d050405ccb026cd44a280ead3a5f6b456d9 (diff) | |
| download | emacs-0bf5739b77c75f13d46fc49d5e3c098fe49a5070.tar.gz emacs-0bf5739b77c75f13d46fc49d5e3c098fe49a5070.zip | |
Merge from origin/emacs-25
c3489d0 * lisp/w32-fns.el (set-message-beep, w32-get-locale-info) (w3...
a4d882c Correct old cell name unbinding when renaming cell.
6c12c53 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into...
0be6725 Document problem: slow screen refresh on missing font.
853b9b9 * admin/admin.el (add-release-logs): Basic check of existing ...
5fa80cf * build-aux/gitlog-to-emacslog: Handle empty generated Change...
3c79e51 * admin/admin.el (add-release-logs): Generate ChangeLog if ne...
42275df * doc/misc/texinfo.tex: Revert previous change (Bug#23611).
3f4a9d9 * admin/authors.el (authors): First update the ChangeLog.
897fb6f ; 'Changes from the pre-25.1 API' copyedits
825ca25 Rename vc-stay-local back to vc-cvs-stay-local
4efb3e8 * doc/emacs/files.texi (Comparing Files): * doc/emacs/trouble...
b995d1e * doc/misc/eww.texi (Advanced): Fix xref.
2e589c0 Fix cross-references between manuals
f3d2ded * doc/misc/vhdl-mode.texi (Sample Init File): Rename node to ...
906c810 ; * admin/release-process: Move etc/HISTORY from here... ; * ...
bea1b65 * admin/admin.el (add-release-logs): Also update etc/HISTORY.
503e752 ; * CONTRIBUTE: Fix a typo.
fbfd478 Avoid aborting due to errors in arguments of 'set-face-attrib...
bdfbe6d ; * admin/release-process: Copyedits.
44a6aed ; * test/automated/data-tests.el: Standardize license notice.
c33ed39 ; * test/automated/viper-tests.el: Standardize license notice.
df4a14b Add automated test for viper-tests.el
c0139e3 Fix viper undo breakage from undo-boundary changes
920d76c Fix reference to obsolete fn ps-eval-switch
18a9bc1 Do not trash symlinks to init file
2671179 Don't print the "decomposition" line for control chars in wha...
869092c Bring back xterm pasting with middle mouse
5ab0830 Provide workaround for xftfont rendering problem
c9f7ec7 * lisp/desktop.el: Disable restore frameset if in non-graphic...
30989a0 Mention GTK+ problems in etc/PROBLEMS
421e3c4 * lisp/emacs-lisp/package.el (package-refresh-contents):
dadfc30 Revert "epg: Add a way to detect gpg1 executable for tests"
e41a5cb Avoid errors with Czech and Slovak input methods
d4ae6d7 epg: Add a way to detect gpg1 executable for tests
ebc3a94 * lisp/emacs-lisp/package.el: Fix free variable warnings.
6e71295 * lisp/emacs-lisp/package.el (package--with-response-buffer):
c45d9f6 Improve documentation of 'server-name'
3b5e38c Modernize ASLR advice in etc/PROBLEMS
1fe1e0a * lisp/char-fold.el: Rename from character-fold.el.
44 files changed, 794 insertions, 635 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index e39c665f216..9d5d775a5e0 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE | |||
| @@ -183,7 +183,7 @@ intended for more-conservative changes such as bug fixes. Typically, | |||
| 183 | collective development is active on the master branch and possibly on | 183 | collective development is active on the master branch and possibly on |
| 184 | the current release branch. Periodically, the current release branch | 184 | the current release branch. Periodically, the current release branch |
| 185 | is merged into the master, using the gitmerge function described in | 185 | is merged into the master, using the gitmerge function described in |
| 186 | admin/notes-git-workflow. | 186 | admin/notes/git-workflow. |
| 187 | 187 | ||
| 188 | If you are fixing a bug that exists in the current release, be sure to | 188 | If you are fixing a bug that exists in the current release, be sure to |
| 189 | commit it to the release branch; it will be merged to the master | 189 | commit it to the release branch; it will be merged to the master |
diff --git a/admin/admin.el b/admin/admin.el index fe807ff96fe..4af1ff9003a 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | (defun add-release-logs (root version &optional date) | 31 | (defun add-release-logs (root version &optional date) |
| 32 | "Add \"Version VERSION released.\" change log entries in ROOT. | 32 | "Add \"Version VERSION released.\" change log entries in ROOT. |
| 33 | Also update the etc/HISTORY file. | ||
| 33 | Root must be the root of an Emacs source tree. | 34 | Root must be the root of an Emacs source tree. |
| 34 | Optional argument DATE is the release date, default today." | 35 | Optional argument DATE is the release date, default today." |
| 35 | (interactive (list (read-directory-name "Emacs root directory: ") | 36 | (interactive (list (read-directory-name "Emacs root directory: ") |
| @@ -42,6 +43,19 @@ Optional argument DATE is the release date, default today." | |||
| 42 | (setq root (expand-file-name root)) | 43 | (setq root (expand-file-name root)) |
| 43 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 44 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
| 44 | (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) | 45 | (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) |
| 46 | (let ((clog (expand-file-name "ChangeLog" root))) | ||
| 47 | (if (file-exists-p clog) | ||
| 48 | ;; Basic check that a ChangeLog that exists is not your personal one. | ||
| 49 | ;; TODO Perhaps we should move any existing file and unconditionally | ||
| 50 | ;; call make ChangeLog? Or make ChangeLog CHANGELOG=temp and compare | ||
| 51 | ;; with the existing? | ||
| 52 | (with-temp-buffer | ||
| 53 | (insert-file-contents clog) | ||
| 54 | (or (re-search-forward "^[ \t]*Copyright.*Free Software" nil t) | ||
| 55 | (user-error "ChangeLog looks like a personal one - remove it?"))) | ||
| 56 | (or | ||
| 57 | (zerop (call-process "make" nil nil nil "-C" root "ChangeLog")) | ||
| 58 | (error "Problem generating ChangeLog")))) | ||
| 45 | (require 'add-log) | 59 | (require 'add-log) |
| 46 | (or date (setq date (funcall add-log-time-format nil t))) | 60 | (or date (setq date (funcall add-log-time-format nil t))) |
| 47 | (let* ((logs (process-lines "find" root "-name" "ChangeLog")) | 61 | (let* ((logs (process-lines "find" root "-name" "ChangeLog")) |
| @@ -53,7 +67,14 @@ Optional argument DATE is the release date, default today." | |||
| 53 | (dolist (log logs) | 67 | (dolist (log logs) |
| 54 | (find-file log) | 68 | (find-file log) |
| 55 | (goto-char (point-min)) | 69 | (goto-char (point-min)) |
| 56 | (insert entry)))) | 70 | (insert entry))) |
| 71 | (let ((histfile (expand-file-name "etc/HISTORY" root))) | ||
| 72 | (unless (file-exists-p histfile) | ||
| 73 | (error "%s not present" histfile)) | ||
| 74 | (find-file histfile) | ||
| 75 | (goto-char (point-max)) | ||
| 76 | (search-backward "") | ||
| 77 | (insert (format "GNU Emacs %s (%s) emacs-%s\n\n" version date version)))) | ||
| 57 | 78 | ||
| 58 | (defun set-version-in-file (root file version rx) | 79 | (defun set-version-in-file (root file version rx) |
| 59 | "Subroutine of `set-version' and `set-copyright'." | 80 | "Subroutine of `set-version' and `set-copyright'." |
diff --git a/admin/authors.el b/admin/authors.el index f1aa2fa4428..b93c9b251ca 100644 --- a/admin/authors.el +++ b/admin/authors.el | |||
| @@ -1361,24 +1361,36 @@ and changed by AUTHOR." | |||
| 1361 | (cons (list author wrote-list cowrote-list changed-list) | 1361 | (cons (list author wrote-list cowrote-list changed-list) |
| 1362 | authors-author-list))))) | 1362 | authors-author-list))))) |
| 1363 | 1363 | ||
| 1364 | (defun authors (root) | 1364 | (defun authors (root &optional nologupdate) |
| 1365 | "Extract author information from change logs and Lisp source files. | 1365 | "Extract author information from change logs and Lisp source files. |
| 1366 | ROOT is the root directory under which to find the files. If called | 1366 | ROOT is the root directory under which to find the files. |
| 1367 | interactively, ROOT is read from the minibuffer. | 1367 | Interactively, read ROOT from the minibuffer. |
| 1368 | Result is a buffer *Authors* containing authorship information, and a | 1368 | Accurate author information requires up-to-date change logs, so this |
| 1369 | buffer *Authors Errors* containing references to unknown files." | 1369 | first updates them, unless optional prefix argument NOLOGUPDATE is non-nil. |
| 1370 | (interactive "DEmacs source directory: ") | 1370 | The result is a buffer *Authors* containing authorship information, |
| 1371 | and a buffer *Authors Errors* containing references to unknown files." | ||
| 1372 | (interactive "DEmacs source directory: \nP") | ||
| 1371 | (setq root (expand-file-name root)) | 1373 | (setq root (expand-file-name root)) |
| 1374 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | ||
| 1375 | (unless (y-or-n-p | ||
| 1376 | (format "Not the root directory of Emacs: %s, continue? " root)) | ||
| 1377 | (user-error "Not the root directory"))) | ||
| 1378 | ;; May contain your personal entries. | ||
| 1379 | (or (not (file-exists-p (expand-file-name "ChangeLog" root))) | ||
| 1380 | (y-or-n-p "Unversioned ChangeLog present, continue?") | ||
| 1381 | (user-error "Unversioned ChangeLog may have irrelevant entries")) | ||
| 1382 | (or nologupdate | ||
| 1383 | ;; There are likely to be things that need fixing, so we update | ||
| 1384 | ;; the versioned ChangeLog.N rather than the unversioned ChangeLog. | ||
| 1385 | (zerop (call-process "make" nil nil nil | ||
| 1386 | "-C" root "change-history-nocommit")) | ||
| 1387 | (error "Problem updating ChangeLog")) | ||
| 1372 | (let ((logs (process-lines find-program root "-name" "ChangeLog*")) | 1388 | (let ((logs (process-lines find-program root "-name" "ChangeLog*")) |
| 1373 | (table (make-hash-table :test 'equal)) | 1389 | (table (make-hash-table :test 'equal)) |
| 1374 | (buffer-name "*Authors*") | 1390 | (buffer-name "*Authors*") |
| 1375 | authors-checked-files-alist | 1391 | authors-checked-files-alist |
| 1376 | authors-invalid-file-names) | 1392 | authors-invalid-file-names) |
| 1377 | (authors-add-fixed-entries table) | 1393 | (authors-add-fixed-entries table) |
| 1378 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | ||
| 1379 | (unless (y-or-n-p | ||
| 1380 | (format "Not the root directory of Emacs: %s, continue? " root)) | ||
| 1381 | (error "Not the root directory"))) | ||
| 1382 | (dolist (log logs) | 1394 | (dolist (log logs) |
| 1383 | (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log) | 1395 | (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log) |
| 1384 | (message "Scanning %s..." log) | 1396 | (message "Scanning %s..." log) |
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 030ad4cee68..77486cc6399 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt | |||
| @@ -37,38 +37,38 @@ General steps (for each step, check for possible errors): | |||
| 37 | M-: (require 'authors) RET | 37 | M-: (require 'authors) RET |
| 38 | M-x authors RET | 38 | M-x authors RET |
| 39 | 39 | ||
| 40 | (This first updates the current versioned ChangeLog.N) | ||
| 41 | |||
| 40 | If there is an "*Authors Errors*" buffer, address the issues. | 42 | If there is an "*Authors Errors*" buffer, address the issues. |
| 41 | If there was a ChangeLog typo, run "make change-history" and then | 43 | If there was a ChangeLog typo, fix the relevant entry. |
| 42 | fix the newest ChangeLog history file. If a file was deleted or | 44 | If a file was deleted or renamed, consider adding an appropriate |
| 43 | renamed, consider adding an appropriate entry to | 45 | entry to authors-ignored-files, authors-valid-file-names, or |
| 44 | authors-ignored-files, authors-valid-file-names, or | ||
| 45 | authors-renamed-files-alist. | 46 | authors-renamed-files-alist. |
| 46 | 47 | ||
| 47 | If necessary, repeat M-x authors after making those changes. | 48 | If necessary, repeat 'C-u M-x authors' after making those changes. |
| 48 | Save the "*Authors*" buffer as etc/AUTHORS. | 49 | Save the "*Authors*" buffer as etc/AUTHORS. |
| 49 | Check the diff looks reasonable. Maybe add entries to | 50 | Check the diff looks reasonable. Maybe add entries to |
| 50 | authors-ambiguous-files or authors-aliases, and repeat. | 51 | authors-ambiguous-files or authors-aliases, and repeat. |
| 51 | Commit any fixes to authors.el. | 52 | Commit any fixes to authors.el. |
| 52 | 53 | ||
| 53 | 3. Set the version number (M-x load-file RET admin/admin.el RET, then | 54 | 3. Set the version number (M-x load-file RET admin/admin.el RET, then |
| 54 | M-x set-version RET). For a release, add released ChangeLog | 55 | M-x set-version RET). For a pretest, start at version .90. After |
| 55 | entries (create a ChangeLog symlink a la vc-dwim, then run M-x | 56 | .99, use .990 (so that it sorts). |
| 56 | add-release-logs RET, then run the shell command 'vc-dwim --commit'). | ||
| 57 | |||
| 58 | For a pretest, start at version .90. After .99, use .990 (so that | ||
| 59 | it sorts). | ||
| 60 | 57 | ||
| 61 | The final pretest should be a release candidate. Set the version | 58 | The final pretest should be a release candidate. Set the version |
| 62 | number to that of the actual release. Pick a date about a week | 59 | number to that of the actual release. Pick a date about a week |
| 63 | from now when you intend to make the release. Use vc-dwim and | 60 | from now when you intend to make the release. Use M-x |
| 64 | M-x add-release-logs as described above to add commit messages | 61 | add-release-logs to add entries to etc/HISTORY and the ChangeLog |
| 65 | that will appear in the tarball's automatically-generated ChangeLog | 62 | file. It's best not to commit these files until the release is |
| 66 | file as entries for that date. | 63 | actually made. Merge the entries from (unversioned) ChangeLog |
| 64 | into the top of the current versioned ChangeLog.N and commit that | ||
| 65 | along with etc/HISTORY. Then you can tag that commit as the | ||
| 66 | release. | ||
| 67 | 67 | ||
| 68 | Name the tar file as emacs-XX.Y-rc1.tar. If all goes well in the | 68 | Name the tar file as emacs-XX.Y-rc1.tar. If all goes well in the |
| 69 | following week, you can simply rename the file and use it for the | 69 | following week, you can simply rename the file and use it for the |
| 70 | actual release. If you need another release candidate, remember | 70 | actual release. If you need another release candidate, remember |
| 71 | to adjust the ChangeLog entries. | 71 | to adjust the ChangeLog and etc/HISTORY entries. |
| 72 | 72 | ||
| 73 | If you need to change only a file(s) that cannot possibly affect | 73 | If you need to change only a file(s) that cannot possibly affect |
| 74 | the build (README, ChangeLog, NEWS, etc.) then rather than doing | 74 | the build (README, ChangeLog, NEWS, etc.) then rather than doing |
| @@ -86,8 +86,8 @@ General steps (for each step, check for possible errors): | |||
| 86 | 86 | ||
| 87 | 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. | 87 | 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. |
| 88 | 88 | ||
| 89 | Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed | 89 | Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the |
| 90 | by M-x set-version. | 90 | files changed by M-x set-version. |
| 91 | 91 | ||
| 92 | If someone else made a commit between step 1 and now, | 92 | If someone else made a commit between step 1 and now, |
| 93 | you need to repeat from step 4 onwards. (You can commit the files | 93 | you need to repeat from step 4 onwards. (You can commit the files |
diff --git a/admin/release-process b/admin/release-process index 2668ea3b445..28f2307846d 100644 --- a/admin/release-process +++ b/admin/release-process | |||
| @@ -7,7 +7,7 @@ Each release cycle will be split into two periods. | |||
| 7 | ** Phase one: development | 7 | ** Phase one: development |
| 8 | 8 | ||
| 9 | The first phase of the release schedule is the "heads-down" working | 9 | The first phase of the release schedule is the "heads-down" working |
| 10 | period for new features, on the 'master' branch and several feature | 10 | period for new features, on the 'master' branch and any needed feature |
| 11 | branches. | 11 | branches. |
| 12 | 12 | ||
| 13 | ** Phase two: fixing and stabilizing the release branch | 13 | ** Phase two: fixing and stabilizing the release branch |
| @@ -29,47 +29,60 @@ command to do that, then commit the changes it made and push to | |||
| 29 | 'master'. For major releases, also update the value of | 29 | 'master'. For major releases, also update the value of |
| 30 | 'customize-changed-options-previous-release'. | 30 | 'customize-changed-options-previous-release'. |
| 31 | 31 | ||
| 32 | The 2 main manuals, the User Manual and the Emacs Lisp Manual, need to | 32 | Each chapter of the two main manuals, the User Manual and the Emacs |
| 33 | be proofread, preferably by at least 2 different persons, and any | 33 | Lisp Manual, should be proofread, preferably by at least two people. |
| 34 | uncovered problems fixed. This is a lot of work, so it is advisable | 34 | This job is so big that it should be considered a collective |
| 35 | to divide the job between several people (see the checklist near the | 35 | responsibility, not fobbed off on just a few people. After each |
| 36 | end of this file). | 36 | chapter is checked, mark off the name(s) of those who checked it in |
| 37 | the checklist near the end of this file. | ||
| 37 | 38 | ||
| 38 | In parallel to this phase, 'master' can receive new features, to be | 39 | In parallel to this phase, 'master' can receive new features, to be |
| 39 | released in the next release cycle. From time to time, the master | 40 | released in the next release cycle. From time to time, the master |
| 40 | branches merges bugfix commits from the "emacs-NN" branch. | 41 | branches merges bugfix commits from the "emacs-NN" branch. |
| 42 | See admin/gitmerge.el. | ||
| 41 | 43 | ||
| 42 | * RELEASE-CRITICAL BUGS | 44 | * RELEASE-CRITICAL BUGS |
| 43 | 45 | ||
| 44 | Emacs uses the "blocking bug(s)" feature of Debbugs for bugs need to | 46 | Emacs uses the "blocking" feature of Debbugs for bugs that need to be |
| 45 | be addressed in the next release. | 47 | addressed in the next release. |
| 46 | 48 | ||
| 47 | Currently, bug#19759 is the tracking bug for release of 25.1 and | 49 | Currently, bug#19759 is the tracking bug for release of 25.1 and |
| 48 | bug#21966 is the tracking bug for release of 25.2. Say bug#123 needs | 50 | bug#21966 is the tracking bug for release of 25.2. Say bug#123 needs |
| 51 | bug#21966 is the tracking bug for the next release. Say bug#123 needs | ||
| 49 | to be fixed for Emacs 25.1. Send a message to control@debbugs.gnu.org | 52 | to be fixed for Emacs 25.1. Send a message to control@debbugs.gnu.org |
| 50 | that says: | 53 | that says: |
| 51 | 54 | ||
| 52 | block 19759 by 123 | 55 | block 19759 by 123 |
| 53 | 56 | ||
| 54 | Change "block" to "unblock" to unblock the bug. | 57 | Change "block" to "unblock" to remove a bug from the list. Closed |
| 58 | bugs are not listed as blockers, so you do not need to explicitly | ||
| 59 | unblock one that has been closed. You may need to force an update of | ||
| 60 | the tracking bug with ctrl-f5/shift-reload to see the latest version. | ||
| 61 | |||
| 55 | 62 | ||
| 56 | * TO BE DONE SHORTLY BEFORE RELEASE | 63 | * TO BE DONE SHORTLY BEFORE RELEASE |
| 57 | 64 | ||
| 58 | ** Make sure the Copyright date reflects the current year in the source | 65 | See 'admin/make-tarball.txt' for the details of making a release or pretest. |
| 59 | files. See 'admin/notes/years' for information about maintaining | 66 | |
| 60 | copyright years for GNU Emacs. | 67 | ** Make sure the Copyright date reflects the current year in all source files. |
| 68 | (This should be done each January anyway, regardless of releases.) | ||
| 69 | See admin/update-copyright and admin.el's set-copyright. | ||
| 70 | For more details, see 'admin/notes/years'. | ||
| 61 | 71 | ||
| 62 | ** Make sure the necessary sources and scripts for any generated files | 72 | ** Make sure the necessary sources and scripts for any generated files |
| 63 | are included in the source tarball. (They don't need to be installed, | 73 | are included in the source tarball. (They don't need to be installed, |
| 64 | so e.g. admin/ is fine.) | 74 | so e.g. admin/ is fine.) This is important for legal compliance. |
| 65 | |||
| 66 | ** Regenerate AUTHORS by using admin/authors.el | ||
| 67 | (The instructions are at the beginning of that file.) | ||
| 68 | 75 | ||
| 69 | ** Remove temporary +++/--- lines in NEWS. | 76 | ** Remove temporary +++/--- lines in NEWS. |
| 70 | But first make sure there are no unmarked entries, and update the | 77 | But first make sure there are no unmarked entries, and update the |
| 71 | documentation (or decide no updates are necessary) for those that | 78 | documentation (or decide no updates are necessary) for those that aren't. |
| 72 | aren't. | 79 | |
| 80 | ** Try to reorder NEWS: most important things first, related items together. | ||
| 81 | |||
| 82 | ** For a major release, add a "New in Emacs XX" section to faq.texi. | ||
| 83 | |||
| 84 | ** cusver-check from admin.el can help find new defcustoms missing | ||
| 85 | :version tags. | ||
| 73 | 86 | ||
| 74 | ** Manuals | 87 | ** Manuals |
| 75 | Check for node names using problematic characters: | 88 | Check for node names using problematic characters: |
| @@ -85,8 +98,7 @@ For major releases, rewrite the "Antinews" appendix of the User Manual | |||
| 85 | previous version. The way to do that is read NEWS, pick up the more | 98 | previous version. The way to do that is read NEWS, pick up the more |
| 86 | significant changes and new features in the upcoming release, then | 99 | significant changes and new features in the upcoming release, then |
| 87 | describe the "benefits" from losing those features. Be funny, use | 100 | describe the "benefits" from losing those features. Be funny, use |
| 88 | humor. The text written for the previous major release can serve as | 101 | humor. The text written for the previous releases can serve as an example. |
| 89 | good example. | ||
| 90 | 102 | ||
| 91 | Check cross-references between the manuals (e.g. from emacs to elisp) | 103 | Check cross-references between the manuals (e.g. from emacs to elisp) |
| 92 | are correct. You can use something like the following in the info | 104 | are correct. You can use something like the following in the info |
| @@ -147,10 +159,6 @@ size that the GNU Press are going to use when they print the manuals. | |||
| 147 | I think this is different to what you get if you just use e.g. 'make | 159 | I think this is different to what you get if you just use e.g. 'make |
| 148 | emacs.pdf' (e.g., enable "smallbook"). | 160 | emacs.pdf' (e.g., enable "smallbook"). |
| 149 | 161 | ||
| 150 | ** Try to reorder NEWS: most important things first, related items together. | ||
| 151 | |||
| 152 | ** For a major release, add a "New in Emacs XX" section to faq.texi. | ||
| 153 | |||
| 154 | ** Check the keybindings in the refcards are correct, and add any new ones. | 162 | ** Check the keybindings in the refcards are correct, and add any new ones. |
| 155 | What paper size are the English versions supposed to be on? | 163 | What paper size are the English versions supposed to be on? |
| 156 | On Debian testing, the packages texlive-lang-czechslovak and | 164 | On Debian testing, the packages texlive-lang-czechslovak and |
| @@ -172,11 +180,6 @@ pt-br Rodrigo Real | |||
| 172 | ru Alex Ott | 180 | ru Alex Ott |
| 173 | sk Miroslav Vaško | 181 | sk Miroslav Vaško |
| 174 | 182 | ||
| 175 | ** cusver-check from admin.el can help find new defcustoms missing | ||
| 176 | :version tags. | ||
| 177 | |||
| 178 | ** Add a line to etc/HISTORY for the release version number and date. | ||
| 179 | |||
| 180 | * BUGS | 183 | * BUGS |
| 181 | 184 | ||
| 182 | ** Check for modes which bind M-s that conflicts with a new global binding M-s | 185 | ** Check for modes which bind M-s that conflicts with a new global binding M-s |
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index 6b9cfc145bc..085d2c2512d 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog | |||
| @@ -81,7 +81,7 @@ test -e .git || { | |||
| 81 | --ignore-line='^; ' --format='%B' \ | 81 | --ignore-line='^; ' --format='%B' \ |
| 82 | "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit | 82 | "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit |
| 83 | 83 | ||
| 84 | if test -s "ChangeLog.tmp"; then | 84 | if test -e "ChangeLog.tmp"; then |
| 85 | 85 | ||
| 86 | # Fix up bug references. | 86 | # Fix up bug references. |
| 87 | # This would be better as eg a --transform option to gitlog-to-changelog, | 87 | # This would be better as eg a --transform option to gitlog-to-changelog, |
| @@ -99,7 +99,7 @@ if test -s "ChangeLog.tmp"; then | |||
| 99 | ` | 99 | ` |
| 100 | start_year= | 100 | start_year= |
| 101 | end_year= | 101 | end_year= |
| 102 | for year in $years; do | 102 | for year in ${years:-`date +%Y`}; do |
| 103 | : ${start_year:=$year} | 103 | : ${start_year:=$year} |
| 104 | end_year=$year | 104 | end_year=$year |
| 105 | done | 105 | done |
| @@ -110,13 +110,19 @@ if test -s "ChangeLog.tmp"; then | |||
| 110 | year_range=$start_year-$end_year | 110 | year_range=$start_year-$end_year |
| 111 | fi | 111 | fi |
| 112 | 112 | ||
| 113 | # Update gen_origin and append a proper copyright notice. | 113 | # Update gen_origin |
| 114 | sed -n ' | 114 | if test "$gen_origin" != "$new_origin"; then |
| 115 | 1i\ | 115 | sed -n ' |
| 116 | 1i\ | ||
| 117 | |||
| 118 | /^This file records repository revisions/p | ||
| 119 | s/^commit [0-9a-f]* (exclusive)/commit '"$gen_origin"' (exclusive)/p | ||
| 120 | s/^commit [0-9a-f]* (inclusive)/commit '"$new_origin"' (inclusive)/p | ||
| 121 | ' <ChangeLog.$nmax >>"ChangeLog.tmp" || exit | ||
| 122 | fi | ||
| 116 | 123 | ||
| 117 | /^This file records repository revisions/p | 124 | # Append a proper copyright notice. |
| 118 | s/^commit [0-9a-f]* (exclusive)/commit '"$gen_origin"' (exclusive)/p | 125 | sed -n ' |
| 119 | s/^commit [0-9a-f]* (inclusive)/commit '"$new_origin"' (inclusive)/p | ||
| 120 | /^See ChangeLog.[0-9]* for earlier/,${ | 126 | /^See ChangeLog.[0-9]* for earlier/,${ |
| 121 | s/ChangeLog\.[0-9]*/ChangeLog.'$nmax'/ | 127 | s/ChangeLog\.[0-9]*/ChangeLog.'$nmax'/ |
| 122 | s/\(Copyright[ (C)]*\)[0-9]*-[0-9]*/\1'"$year_range"'/ | 128 | s/\(Copyright[ (C)]*\)[0-9]*-[0-9]*/\1'"$year_range"'/ |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index af9d4d50306..ec227e9c2c9 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1281,7 +1281,7 @@ The value of @code{diff-switches} should be a string; the default is | |||
| 1281 | @c Note that the actual name of the info file is diffutils.info, | 1281 | @c Note that the actual name of the info file is diffutils.info, |
| 1282 | @c but it adds a dir entry for diff too. | 1282 | @c but it adds a dir entry for diff too. |
| 1283 | @c On older systems, only "info diff" works, not "info diffutils". | 1283 | @c On older systems, only "info diff" works, not "info diffutils". |
| 1284 | @xref{Top,, Diff, diff, Comparing and Merging Files}, for more | 1284 | @xref{Top,, Diff, diffutils, Comparing and Merging Files}, for more |
| 1285 | information about the @command{diff} program. | 1285 | information about the @command{diff} program. |
| 1286 | 1286 | ||
| 1287 | The output of the @code{diff} command is shown using a major mode | 1287 | The output of the @code{diff} command is shown using a major mode |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 5786bc40709..b614ed221a0 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -1634,10 +1634,17 @@ variable to @samp{emacsclient +%d %s}.} | |||
| 1634 | You can run multiple Emacs servers on the same machine by giving | 1634 | You can run multiple Emacs servers on the same machine by giving |
| 1635 | each one a unique @dfn{server name}, using the variable | 1635 | each one a unique @dfn{server name}, using the variable |
| 1636 | @code{server-name}. For example, @kbd{M-x set-variable @key{RET} | 1636 | @code{server-name}. For example, @kbd{M-x set-variable @key{RET} |
| 1637 | server-name @key{RET} foo @key{RET}} sets the server name to | 1637 | server-name @key{RET} "foo" @key{RET}} sets the server name to |
| 1638 | @samp{foo}. The @code{emacsclient} program can specify a server by | 1638 | @samp{foo}. The @code{emacsclient} program can specify a server by |
| 1639 | name, using the @samp{-s} option (@pxref{emacsclient Options}). | 1639 | name, using the @samp{-s} option (@pxref{emacsclient Options}). |
| 1640 | 1640 | ||
| 1641 | If you want to run multiple Emacs daemons (@pxref{Initial Options}), | ||
| 1642 | you can give each daemon its own server name like this: | ||
| 1643 | |||
| 1644 | @example | ||
| 1645 | emacs --eval "(setq server-name \"foo\")" --daemon | ||
| 1646 | @end example | ||
| 1647 | |||
| 1641 | @findex server-eval-at | 1648 | @findex server-eval-at |
| 1642 | If you have defined a server by a unique server name, it is possible | 1649 | If you have defined a server by a unique server name, it is possible |
| 1643 | to connect to the server from another Emacs instance and evaluate Lisp | 1650 | to connect to the server from another Emacs instance and evaluate Lisp |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 7958a4a2bfa..d841934c855 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -1264,13 +1264,13 @@ but match under character folding are known as @dfn{equivalent | |||
| 1264 | character sequences}. | 1264 | character sequences}. |
| 1265 | 1265 | ||
| 1266 | @kindex M-s ' @r{(Incremental Search)} | 1266 | @kindex M-s ' @r{(Incremental Search)} |
| 1267 | @findex isearch-toggle-character-fold | 1267 | @findex isearch-toggle-char-fold |
| 1268 | Generally, search commands in Emacs do not by default perform | 1268 | Generally, search commands in Emacs do not by default perform |
| 1269 | character folding in order to match equivalent character sequences. | 1269 | character folding in order to match equivalent character sequences. |
| 1270 | You can enable this behavior by customizing the variable | 1270 | You can enable this behavior by customizing the variable |
| 1271 | @code{search-default-mode} to @code{character-fold-to-regexp}. | 1271 | @code{search-default-mode} to @code{char-fold-to-regexp}. |
| 1272 | @xref{Search Customizations}. Within an incremental search, typing | 1272 | @xref{Search Customizations}. Within an incremental search, typing |
| 1273 | @kbd{M-s '} (@code{isearch-toggle-character-fold}) toggles character | 1273 | @kbd{M-s '} (@code{isearch-toggle-char-fold}) toggles character |
| 1274 | folding, but only for that search. (Replace commands have a different | 1274 | folding, but only for that search. (Replace commands have a different |
| 1275 | default, controlled by a separate option; see @ref{Replacement and Lax | 1275 | default, controlled by a separate option; see @ref{Replacement and Lax |
| 1276 | Matches}.) | 1276 | Matches}.) |
| @@ -1481,7 +1481,7 @@ replacement is done without case conversion. | |||
| 1481 | (@pxref{Lax Search, character folding}) when looking for the text to | 1481 | (@pxref{Lax Search, character folding}) when looking for the text to |
| 1482 | replace. To enable character folding for matching in | 1482 | replace. To enable character folding for matching in |
| 1483 | @code{query-replace} and @code{replace-string}, set the variable | 1483 | @code{query-replace} and @code{replace-string}, set the variable |
| 1484 | @code{replace-character-fold} to a non-@code{nil} value. (This | 1484 | @code{replace-char-fold} to a non-@code{nil} value. (This |
| 1485 | setting does not affect the replacement text, only how Emacs finds the | 1485 | setting does not affect the replacement text, only how Emacs finds the |
| 1486 | text to replace. It also doesn't affect @code{replace-regexp}.) | 1486 | text to replace. It also doesn't affect @code{replace-regexp}.) |
| 1487 | 1487 | ||
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index f4e3393ea9d..25f296e52c3 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -1178,7 +1178,7 @@ see | |||
| 1178 | @url{http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html}, | 1178 | @url{http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html}, |
| 1179 | @end ifset | 1179 | @end ifset |
| 1180 | @xref{Change Log Concepts, Change Log Concepts, | 1180 | @xref{Change Log Concepts, Change Log Concepts, |
| 1181 | Change Log Concepts, gnu-coding-standards, GNU Coding Standards}. | 1181 | Change Log Concepts, standards, GNU Coding Standards}. |
| 1182 | 1182 | ||
| 1183 | @item | 1183 | @item |
| 1184 | When you write the fix, keep in mind that we can't install a change that | 1184 | When you write the fix, keep in mind that we can't install a change that |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index eea46af6b19..10162b35467 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -584,7 +584,6 @@ Regular Expression Searches | |||
| 584 | * re-search-forward:: Very similar to @code{search-forward}. | 584 | * re-search-forward:: Very similar to @code{search-forward}. |
| 585 | * forward-sentence:: A straightforward example of regexp search. | 585 | * forward-sentence:: A straightforward example of regexp search. |
| 586 | * forward-paragraph:: A somewhat complex example. | 586 | * forward-paragraph:: A somewhat complex example. |
| 587 | * etags:: How to create your own @file{TAGS} table. | ||
| 588 | * Regexp Review:: | 587 | * Regexp Review:: |
| 589 | * re-search Exercises:: | 588 | * re-search Exercises:: |
| 590 | 589 | ||
| @@ -4583,54 +4582,21 @@ definition. | |||
| 4583 | @end ignore | 4582 | @end ignore |
| 4584 | 4583 | ||
| 4585 | More generally, if you want to see a function in its original source | 4584 | More generally, if you want to see a function in its original source |
| 4586 | file, you can use the @code{find-tag} function to jump to it. | 4585 | file, you can use the @code{xref-find-definitions} function to jump to |
| 4587 | @code{find-tag} works with a wide variety of languages, not just | 4586 | it. @code{xref-find-definitions} works with a wide variety of |
| 4588 | Lisp, and C, and it works with non-programming text as well. For | 4587 | languages, not just Lisp, and C, and it works with non-programming |
| 4589 | example, @code{find-tag} will jump to the various nodes in the | 4588 | text as well. For example, @code{xref-find-definitions} will jump to |
| 4590 | Texinfo source file of this document. | 4589 | the various nodes in the Texinfo source file of this document. |
| 4591 | The @code{find-tag} function depends on @dfn{tags tables} that record | 4590 | |
| 4592 | the locations of the functions, variables, and other items to which | 4591 | To use the @code{xref-find-definitions} command, type @kbd{M-.} |
| 4593 | @code{find-tag} jumps. | 4592 | (i.e., press the period key while holding down the @key{META} key, or |
| 4594 | 4593 | else type the @key{ESC} key and then type the period key), and then, | |
| 4595 | To use the @code{find-tag} command, type @kbd{M-.} (i.e., press the | 4594 | at the prompt, type in the name of the function whose source code you |
| 4596 | period key while holding down the @key{META} key, or else type the | 4595 | want to see, such as @code{mark-whole-buffer}, and then type |
| 4597 | @key{ESC} key and then type the period key), and then, at the prompt, | 4596 | @key{RET}. Emacs will switch buffers and display the source code for |
| 4598 | type in the name of the function whose source code you want to see, | 4597 | the function on your screen. To switch back to your current buffer, |
| 4599 | such as @code{mark-whole-buffer}, and then type @key{RET}. Emacs will | 4598 | type @kbd{C-x b @key{RET}}. (On some keyboards, the @key{META} key is |
| 4600 | switch buffers and display the source code for the function on your | 4599 | labeled @key{ALT}.) |
| 4601 | screen. To switch back to your current buffer, type @kbd{C-x b | ||
| 4602 | @key{RET}}. (On some keyboards, the @key{META} key is labeled | ||
| 4603 | @key{ALT}.) | ||
| 4604 | |||
| 4605 | @c !!! 22.1.1 tags table location in this paragraph | ||
| 4606 | @cindex TAGS table, specifying | ||
| 4607 | @findex find-tag | ||
| 4608 | Depending on how the initial default values of your copy of Emacs are | ||
| 4609 | set, you may also need to specify the location of your tags table, | ||
| 4610 | which is a file called @file{TAGS}. For example, if you are | ||
| 4611 | interested in Emacs sources, the tags table you will most likely want, | ||
| 4612 | if it has already been created for you, will be in a subdirectory of | ||
| 4613 | the @file{/usr/local/share/emacs/} directory; thus you would use the | ||
| 4614 | @code{M-x visit-tags-table} command and specify a pathname such as | ||
| 4615 | @file{/usr/local/share/emacs/22.1.1/lisp/TAGS}. If the tags table | ||
| 4616 | has not already been created, you will have to create it yourself. It | ||
| 4617 | will be in a file such as @file{/usr/local/src/emacs/src/TAGS}. | ||
| 4618 | |||
| 4619 | @need 1250 | ||
| 4620 | To create a @file{TAGS} file in a specific directory, switch to that | ||
| 4621 | directory in Emacs using @kbd{M-x cd} command, or list the directory | ||
| 4622 | with @kbd{C-x d} (@code{dired}). Then run the compile command, with | ||
| 4623 | @w{@code{etags *.el}} as the command to execute: | ||
| 4624 | |||
| 4625 | @smallexample | ||
| 4626 | M-x compile RET etags *.el RET | ||
| 4627 | @end smallexample | ||
| 4628 | |||
| 4629 | For more information, see @ref{etags, , Create Your Own @file{TAGS} File}. | ||
| 4630 | |||
| 4631 | After you become more familiar with Emacs Lisp, you will find that you will | ||
| 4632 | frequently use @code{find-tag} to navigate your way around source code; | ||
| 4633 | and you will create your own @file{TAGS} tables. | ||
| 4634 | 4600 | ||
| 4635 | @cindex Library, as term for ``file'' | 4601 | @cindex Library, as term for ``file'' |
| 4636 | Incidentally, the files that contain Lisp code are conventionally | 4602 | Incidentally, the files that contain Lisp code are conventionally |
| @@ -12142,7 +12108,6 @@ introduces several new features. | |||
| 12142 | * re-search-forward:: Very similar to @code{search-forward}. | 12108 | * re-search-forward:: Very similar to @code{search-forward}. |
| 12143 | * forward-sentence:: A straightforward example of regexp search. | 12109 | * forward-sentence:: A straightforward example of regexp search. |
| 12144 | * forward-paragraph:: A somewhat complex example. | 12110 | * forward-paragraph:: A somewhat complex example. |
| 12145 | * etags:: How to create your own @file{TAGS} table. | ||
| 12146 | * Regexp Review:: | 12111 | * Regexp Review:: |
| 12147 | * re-search Exercises:: | 12112 | * re-search Exercises:: |
| 12148 | @end menu | 12113 | @end menu |
| @@ -13294,130 +13259,6 @@ key; you will be taken directly to the source. (Be sure to install | |||
| 13294 | your sources! Without them, you are like a person who tries to drive | 13259 | your sources! Without them, you are like a person who tries to drive |
| 13295 | a car with his eyes shut!) | 13260 | a car with his eyes shut!) |
| 13296 | 13261 | ||
| 13297 | @node etags | ||
| 13298 | @section Create Your Own @file{TAGS} File | ||
| 13299 | @findex etags | ||
| 13300 | @cindex @file{TAGS} file, create own | ||
| 13301 | |||
| 13302 | Besides @kbd{C-h f} (@code{describe-function}), another way to see the | ||
| 13303 | source of a function is to type @kbd{M-.} (@code{find-tag}) and the | ||
| 13304 | name of the function when prompted for it. This is a good habit to | ||
| 13305 | get into. The @kbd{M-.} (@code{find-tag}) command takes you directly | ||
| 13306 | to the source for a function, variable, or node. The function depends | ||
| 13307 | on tags tables to tell it where to go. | ||
| 13308 | |||
| 13309 | If the @code{find-tag} function first asks you for the name of a | ||
| 13310 | @file{TAGS} table, give it the name of a @file{TAGS} file such as | ||
| 13311 | @file{/usr/local/src/emacs/src/TAGS}. (The exact path to your | ||
| 13312 | @file{TAGS} file depends on how your copy of Emacs was installed. I | ||
| 13313 | just told you the location that provides both my C and my Emacs Lisp | ||
| 13314 | sources.) | ||
| 13315 | |||
| 13316 | You can also create your own @file{TAGS} file for directories that | ||
| 13317 | lack one. | ||
| 13318 | |||
| 13319 | You often need to build and install tags tables yourself. They are | ||
| 13320 | not built automatically. A tags table is called a @file{TAGS} file; | ||
| 13321 | the name is in upper case letters. | ||
| 13322 | |||
| 13323 | You can create a @file{TAGS} file by calling the @code{etags} program | ||
| 13324 | that comes as a part of the Emacs distribution. Usually, @code{etags} | ||
| 13325 | is compiled and installed when Emacs is built. (@code{etags} is not | ||
| 13326 | an Emacs Lisp function or a part of Emacs; it is a C program.) | ||
| 13327 | |||
| 13328 | @need 1250 | ||
| 13329 | To create a @file{TAGS} file, first switch to the directory in which | ||
| 13330 | you want to create the file. In Emacs you can do this with the | ||
| 13331 | @kbd{M-x cd} command, or by visiting a file in the directory, or by | ||
| 13332 | listing the directory with @kbd{C-x d} (@code{dired}). Then run the | ||
| 13333 | compile command, with @w{@code{etags *.el}} as the command to execute | ||
| 13334 | |||
| 13335 | @smallexample | ||
| 13336 | M-x compile RET etags *.el RET | ||
| 13337 | @end smallexample | ||
| 13338 | |||
| 13339 | @noindent | ||
| 13340 | to create a @file{TAGS} file for Emacs Lisp. | ||
| 13341 | |||
| 13342 | For example, if you have a large number of files in your | ||
| 13343 | @file{~/emacs} directory, as I do---I have 137 @file{.el} files in it, | ||
| 13344 | of which I load 12---you can create a @file{TAGS} file for the Emacs | ||
| 13345 | Lisp files in that directory. | ||
| 13346 | |||
| 13347 | @need 1250 | ||
| 13348 | The @code{etags} program takes all the usual shell wildcards. For | ||
| 13349 | example, if you have two directories for which you want a single | ||
| 13350 | @file{TAGS} file, type @w{@code{etags *.el ../elisp/*.el}}, where | ||
| 13351 | @file{../elisp/} is the second directory: | ||
| 13352 | |||
| 13353 | @smallexample | ||
| 13354 | M-x compile RET etags *.el ../elisp/*.el RET | ||
| 13355 | @end smallexample | ||
| 13356 | |||
| 13357 | @need 1250 | ||
| 13358 | Type | ||
| 13359 | |||
| 13360 | @smallexample | ||
| 13361 | M-x compile RET etags --help RET | ||
| 13362 | @end smallexample | ||
| 13363 | |||
| 13364 | @noindent | ||
| 13365 | to see a list of the options accepted by @code{etags} as well as a | ||
| 13366 | list of supported languages. | ||
| 13367 | |||
| 13368 | The @code{etags} program handles more than 20 languages, including | ||
| 13369 | Emacs Lisp, Common Lisp, Scheme, C, C++, Ada, Fortran, HTML, Java, | ||
| 13370 | LaTeX, Pascal, Perl, PostScript, Python, TeX, Texinfo, makefiles, and | ||
| 13371 | most assemblers. The program has no switches for specifying the | ||
| 13372 | language; it recognizes the language in an input file according to its | ||
| 13373 | file name and contents. | ||
| 13374 | |||
| 13375 | @file{etags} is very helpful when you are writing code yourself and | ||
| 13376 | want to refer back to functions you have already written. Just run | ||
| 13377 | @code{etags} again at intervals as you write new functions, so they | ||
| 13378 | become part of the @file{TAGS} file. | ||
| 13379 | |||
| 13380 | If you think an appropriate @file{TAGS} file already exists for what | ||
| 13381 | you want, but do not know where it is, you can use the @code{locate} | ||
| 13382 | program to attempt to find it. | ||
| 13383 | |||
| 13384 | Type @w{@kbd{M-x locate @key{RET} TAGS @key{RET}}} and Emacs will list | ||
| 13385 | for you the full path names of all your @file{TAGS} files. On my | ||
| 13386 | system, this command lists 34 @file{TAGS} files. On the other hand, a | ||
| 13387 | plain vanilla system I recently installed did not contain any | ||
| 13388 | @file{TAGS} files. | ||
| 13389 | |||
| 13390 | If the tags table you want has been created, you can use the @code{M-x | ||
| 13391 | visit-tags-table} command to specify it. Otherwise, you will need to | ||
| 13392 | create the tag table yourself and then use @code{M-x | ||
| 13393 | visit-tags-table}. | ||
| 13394 | |||
| 13395 | @subsubheading Building Tags in the Emacs sources | ||
| 13396 | @cindex Building Tags in the Emacs sources | ||
| 13397 | @cindex Tags in the Emacs sources | ||
| 13398 | @findex make tags | ||
| 13399 | |||
| 13400 | The GNU Emacs sources come with a @file{Makefile} that contains a | ||
| 13401 | sophisticated @code{etags} command that creates, collects, and merges | ||
| 13402 | tags tables from all over the Emacs sources and puts the information | ||
| 13403 | into one @file{TAGS} file in the @file{src/} directory. (The | ||
| 13404 | @file{src/} directory is below the top level of your Emacs directory.) | ||
| 13405 | |||
| 13406 | @need 1250 | ||
| 13407 | To build this @file{TAGS} file, go to the top level of your Emacs | ||
| 13408 | source directory and run the compile command @code{make tags}: | ||
| 13409 | |||
| 13410 | @smallexample | ||
| 13411 | M-x compile RET make tags RET | ||
| 13412 | @end smallexample | ||
| 13413 | |||
| 13414 | @noindent | ||
| 13415 | (The @code{make tags} command works well with the GNU Emacs sources, | ||
| 13416 | as well as with some other source packages.) | ||
| 13417 | |||
| 13418 | For more information, see @ref{Tags, , Tag Tables, emacs, The GNU Emacs | ||
| 13419 | Manual}. | ||
| 13420 | |||
| 13421 | @node Regexp Review | 13262 | @node Regexp Review |
| 13422 | @section Review | 13263 | @section Review |
| 13423 | 13264 | ||
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index fd4fd4f3798..8eee9e1d869 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi | |||
| @@ -2290,7 +2290,7 @@ is actually typical for regexp syntax.) | |||
| 2290 | @cindex Recursive search/replace operations | 2290 | @cindex Recursive search/replace operations |
| 2291 | 2291 | ||
| 2292 | Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) supports the | 2292 | Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) supports the |
| 2293 | command @code{dired-do-query-replace-regexp} (@kbd{Q}), which allows | 2293 | command @code{dired-do-find-regexp-and-replace} (@kbd{Q}), which allows |
| 2294 | users to replace regular expressions in multiple files. | 2294 | users to replace regular expressions in multiple files. |
| 2295 | 2295 | ||
| 2296 | You can use this command to perform search/replace operations on | 2296 | You can use this command to perform search/replace operations on |
| @@ -2315,7 +2315,7 @@ To accept all replacements in each file, hit @kbd{!}. | |||
| 2315 | Another way to do the same thing is to use the ``tags'' feature of | 2315 | Another way to do the same thing is to use the ``tags'' feature of |
| 2316 | Emacs: it includes the command @code{tags-query-replace} which performs | 2316 | Emacs: it includes the command @code{tags-query-replace} which performs |
| 2317 | a query-replace across all the files mentioned in the @file{TAGS} file. | 2317 | a query-replace across all the files mentioned in the @file{TAGS} file. |
| 2318 | @xref{Tags Search,,, emacs, The GNU Emacs Manual}. | 2318 | @xref{Identifier Search,,, emacs, The GNU Emacs Manual}. |
| 2319 | 2319 | ||
| 2320 | @node Documentation for etags | 2320 | @node Documentation for etags |
| 2321 | @section Where is the documentation for @code{etags}? | 2321 | @section Where is the documentation for @code{etags}? |
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index f15e2f2518e..81f97a9db85 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi | |||
| @@ -261,7 +261,7 @@ variables @code{shr-color-visible-distance-min} and | |||
| 261 | In addition to maintaining the history at run-time, EWW will also | 261 | In addition to maintaining the history at run-time, EWW will also |
| 262 | save the partial state of its buffers (the URIs and the titles of the | 262 | save the partial state of its buffers (the URIs and the titles of the |
| 263 | pages visited) in the desktop file if one is used. @xref{Saving Emacs | 263 | pages visited) in the desktop file if one is used. @xref{Saving Emacs |
| 264 | Sessions, , emacs, The GNU Emacs Manual}. | 264 | Sessions,,, emacs, The GNU Emacs Manual}. |
| 265 | 265 | ||
| 266 | @vindex eww-desktop-remove-duplicates | 266 | @vindex eww-desktop-remove-duplicates |
| 267 | EWW history may sensibly contain multiple entries for the same page | 267 | EWW history may sensibly contain multiple entries for the same page |
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi index a8684a40b3a..fd88c88c7eb 100644 --- a/doc/misc/sem-user.texi +++ b/doc/misc/sem-user.texi | |||
| @@ -874,9 +874,9 @@ command, like this: | |||
| 874 | @end example | 874 | @end example |
| 875 | @end defun | 875 | @end defun |
| 876 | 876 | ||
| 877 | These commands are often more accurate than the @code{find-tag} | 877 | These commands are often more accurate than the @code{xref-find-definitions} |
| 878 | command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic | 878 | command (@pxref{Looking Up Identifiers,,,emacs,Emacs manual}), because |
| 879 | Analyzer is context-sensitive. | 879 | the Semantic Analyzer is context-sensitive. |
| 880 | 880 | ||
| 881 | You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local}) | 881 | You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local}) |
| 882 | and @kbd{C-c , J} (@code{semantic-complete-jump}) to navigate tags. | 882 | and @kbd{C-c , J} (@code{semantic-complete-jump}) to navigate tags. |
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 314063cafe1..37e2de896ec 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
| 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
| 5 | % | 5 | % |
| 6 | \def\texinfoversion{2016-05-07.20} | 6 | \def\texinfoversion{2016-04-14.07} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
| 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| @@ -67,10 +67,6 @@ | |||
| 67 | \everyjob{\message{[Texinfo version \texinfoversion]}% | 67 | \everyjob{\message{[Texinfo version \texinfoversion]}% |
| 68 | \catcode`+=\active \catcode`\_=\active} | 68 | \catcode`+=\active \catcode`\_=\active} |
| 69 | 69 | ||
| 70 | % LaTeX's \typeout. This ensures that the messages it is used for | ||
| 71 | % are identical in format to the corresponding ones from latex/pdflatex. | ||
| 72 | \def\typeout{\immediate\write17}% | ||
| 73 | |||
| 74 | \chardef\other=12 | 70 | \chardef\other=12 |
| 75 | 71 | ||
| 76 | % We never want plain's \outer definition of \+ in Texinfo. | 72 | % We never want plain's \outer definition of \+ in Texinfo. |
| @@ -1538,6 +1534,7 @@ output) for that.)} | |||
| 1538 | % | 1534 | % |
| 1539 | % PDF outline support | 1535 | % PDF outline support |
| 1540 | % | 1536 | % |
| 1537 | \pdfmakepagedesttrue \relax | ||
| 1541 | % Emulate the primitive of pdfTeX | 1538 | % Emulate the primitive of pdfTeX |
| 1542 | \def\pdfdest name#1 xyz{% | 1539 | \def\pdfdest name#1 xyz{% |
| 1543 | \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}% | 1540 | \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}% |
| @@ -3273,8 +3270,8 @@ end | |||
| 3273 | % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. | 3270 | % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. |
| 3274 | % Unless we're in typewriter, use \ecfont because the CM text fonts do | 3271 | % Unless we're in typewriter, use \ecfont because the CM text fonts do |
| 3275 | % not have braces, and we don't want to switch into math. | 3272 | % not have braces, and we don't want to switch into math. |
| 3276 | \def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}} | 3273 | \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} |
| 3277 | \def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}} | 3274 | \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} |
| 3278 | \let\{=\mylbrace \let\lbracechar=\{ | 3275 | \let\{=\mylbrace \let\lbracechar=\{ |
| 3279 | \let\}=\myrbrace \let\rbracechar=\} | 3276 | \let\}=\myrbrace \let\rbracechar=\} |
| 3280 | \begingroup | 3277 | \begingroup |
| @@ -4756,7 +4753,7 @@ end | |||
| 4756 | \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} | 4753 | \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} |
| 4757 | \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} | 4754 | \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} |
| 4758 | 4755 | ||
| 4759 | % Used when writing an index entry out to an index file to prevent | 4756 | % Used when writing an index entry out to an index file, to prevent |
| 4760 | % expansion of Texinfo commands that can appear in an index entry. | 4757 | % expansion of Texinfo commands that can appear in an index entry. |
| 4761 | % | 4758 | % |
| 4762 | \def\indexdummies{% | 4759 | \def\indexdummies{% |
| @@ -4892,9 +4889,12 @@ end | |||
| 4892 | % | 4889 | % |
| 4893 | % We want to disable all macros so that they are not expanded by \write. | 4890 | % We want to disable all macros so that they are not expanded by \write. |
| 4894 | \macrolist | 4891 | \macrolist |
| 4895 | \definedummyword\value | ||
| 4896 | % | 4892 | % |
| 4897 | \normalturnoffactive | 4893 | \normalturnoffactive |
| 4894 | % | ||
| 4895 | % Handle some cases of @value -- where it does not contain any | ||
| 4896 | % (non-fully-expandable) commands. | ||
| 4897 | \makevalueexpandable | ||
| 4898 | } | 4898 | } |
| 4899 | 4899 | ||
| 4900 | % \commondummiesnofonts: common to \commondummies and \indexnofonts. | 4900 | % \commondummiesnofonts: common to \commondummies and \indexnofonts. |
| @@ -5159,10 +5159,9 @@ end | |||
| 5159 | \ifx\suffix\indexisfl\def\suffix{f1}\fi | 5159 | \ifx\suffix\indexisfl\def\suffix{f1}\fi |
| 5160 | % Open the file | 5160 | % Open the file |
| 5161 | \immediate\openout\csname#1indfile\endcsname \jobname.\suffix | 5161 | \immediate\openout\csname#1indfile\endcsname \jobname.\suffix |
| 5162 | % Using \immediate above here prevents an object entering into the current | 5162 | % Using \immediate here prevents an object entering into the current box, |
| 5163 | % box, which could confound checks such as those in \safewhatsit for | 5163 | % which could confound checks such as those in \safewhatsit for preceding |
| 5164 | % preceding skips. | 5164 | % skips. |
| 5165 | \typeout{Writing index file \jobname.\suffix}% | ||
| 5166 | \fi} | 5165 | \fi} |
| 5167 | \def\indexisfl{fl} | 5166 | \def\indexisfl{fl} |
| 5168 | 5167 | ||
| @@ -5370,7 +5369,6 @@ end | |||
| 5370 | % index. The easiest way to prevent this problem is to make sure | 5369 | % index. The easiest way to prevent this problem is to make sure |
| 5371 | % there is some text. | 5370 | % there is some text. |
| 5372 | \putwordIndexNonexistent | 5371 | \putwordIndexNonexistent |
| 5373 | \typeout{No file \jobname.\indexname s.}% | ||
| 5374 | \else | 5372 | \else |
| 5375 | \catcode`\\ = 0 | 5373 | \catcode`\\ = 0 |
| 5376 | % | 5374 | % |
| @@ -6684,14 +6682,7 @@ end | |||
| 6684 | % 1 and 2 (the page numbers aren't printed), and so are the first | 6682 | % 1 and 2 (the page numbers aren't printed), and so are the first |
| 6685 | % two pages of the document. Thus, we'd have two destinations named | 6683 | % two pages of the document. Thus, we'd have two destinations named |
| 6686 | % `1', and two named `2'. | 6684 | % `1', and two named `2'. |
| 6687 | \ifpdf | 6685 | \ifpdf \global\pdfmakepagedesttrue \fi |
| 6688 | \global\pdfmakepagedesttrue | ||
| 6689 | \else | ||
| 6690 | \ifx\XeTeXrevision\thisisundefined | ||
| 6691 | \else | ||
| 6692 | \global\pdfmakepagedesttrue | ||
| 6693 | \fi | ||
| 6694 | \fi | ||
| 6695 | } | 6686 | } |
| 6696 | 6687 | ||
| 6697 | 6688 | ||
| @@ -8871,7 +8862,6 @@ end | |||
| 8871 | % include an _ in the xref name, etc. | 8862 | % include an _ in the xref name, etc. |
| 8872 | \indexnofonts | 8863 | \indexnofonts |
| 8873 | \turnoffactive | 8864 | \turnoffactive |
| 8874 | \def\value##1{##1}% | ||
| 8875 | \expandafter\global\expandafter\let\expandafter\Xthisreftitle | 8865 | \expandafter\global\expandafter\let\expandafter\Xthisreftitle |
| 8876 | \csname XR#1-title\endcsname | 8866 | \csname XR#1-title\endcsname |
| 8877 | }% | 8867 | }% |
| @@ -9012,14 +9002,14 @@ end | |||
| 9012 | \fi\fi\fi | 9002 | \fi\fi\fi |
| 9013 | } | 9003 | } |
| 9014 | 9004 | ||
| 9015 | % \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX | 9005 | % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. |
| 9016 | % is output afterwards if non-empty. | 9006 | % If its value is nonempty, SUFFIX is output afterward. |
| 9007 | % | ||
| 9017 | \def\refx#1#2{% | 9008 | \def\refx#1#2{% |
| 9018 | \requireauxfile | 9009 | \requireauxfile |
| 9019 | {% | 9010 | {% |
| 9020 | \indexnofonts | 9011 | \indexnofonts |
| 9021 | \otherbackslash | 9012 | \otherbackslash |
| 9022 | \def\value##1{##1}% | ||
| 9023 | \expandafter\global\expandafter\let\expandafter\thisrefX | 9013 | \expandafter\global\expandafter\let\expandafter\thisrefX |
| 9024 | \csname XR#1\endcsname | 9014 | \csname XR#1\endcsname |
| 9025 | }% | 9015 | }% |
| @@ -9044,18 +9034,16 @@ end | |||
| 9044 | #2% Output the suffix in any case. | 9034 | #2% Output the suffix in any case. |
| 9045 | } | 9035 | } |
| 9046 | 9036 | ||
| 9047 | % This is the macro invoked by entries in the aux file. Define a control | 9037 | % This is the macro invoked by entries in the aux file. Usually it's |
| 9048 | % sequence for a cross-reference target (we prepend XR to the control sequence | 9038 | % just a \def (we prepend XR to the control sequence name to avoid |
| 9049 | % name to avoid collisions). The value is the page number. If this is a float | 9039 | % collisions). But if this is a float type, we have more work to do. |
| 9050 | % type, we have more work to do. | ||
| 9051 | % | 9040 | % |
| 9052 | \def\xrdef#1#2{% | 9041 | \def\xrdef#1#2{% |
| 9053 | {% Expand the node or anchor name to remove control sequences. | 9042 | {% The node name might contain 8-bit characters, which in our current |
| 9054 | % \turnoffactive stops 8-bit characters being changed to commands | 9043 | % implementation are changed to commands like @'e. Don't let these |
| 9055 | % like @'e. \refx does the same to retrieve the value in the definition. | 9044 | % mess up the control sequence name. |
| 9056 | \indexnofonts | 9045 | \indexnofonts |
| 9057 | \turnoffactive | 9046 | \turnoffactive |
| 9058 | \def\value##1{##1}% | ||
| 9059 | \xdef\safexrefname{#1}% | 9047 | \xdef\safexrefname{#1}% |
| 9060 | }% | 9048 | }% |
| 9061 | % | 9049 | % |
diff --git a/doc/misc/url.texi b/doc/misc/url.texi index 097f626e718..06d2e559c38 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi | |||
| @@ -828,12 +828,12 @@ The file transfer protocol. @xref{file/ftp}. | |||
| 828 | 828 | ||
| 829 | @item ssh | 829 | @item ssh |
| 830 | @cindex ssh | 830 | @cindex ssh |
| 831 | The secure shell protocol. @xref{Inline Methods,,, tramp, The Tramp | 831 | The secure shell protocol. @xref{Inline methods,,, tramp, The Tramp |
| 832 | Manual}. | 832 | Manual}. |
| 833 | 833 | ||
| 834 | @item scp | 834 | @item scp |
| 835 | @cindex scp | 835 | @cindex scp |
| 836 | The secure file copy protocol. @xref{External Methods,,, tramp, The | 836 | The secure file copy protocol. @xref{External methods,,, tramp, The |
| 837 | Tramp Manual}. | 837 | Tramp Manual}. |
| 838 | 838 | ||
| 839 | @item rsync | 839 | @item rsync |
diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index ec83b7e62ee..e26ec5277c0 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi | |||
| @@ -65,7 +65,7 @@ modify this GNU manual.'' | |||
| 65 | * Syntactic Symbols:: | 65 | * Syntactic Symbols:: |
| 66 | * Frequently Asked Questions:: | 66 | * Frequently Asked Questions:: |
| 67 | * Getting the latest VHDL Mode release:: | 67 | * Getting the latest VHDL Mode release:: |
| 68 | * Sample .emacs File:: | 68 | * Sample Init File:: |
| 69 | * Limitations and Known Bugs:: | 69 | * Limitations and Known Bugs:: |
| 70 | * Mailing Lists and Submitting Bug Reports:: | 70 | * Mailing Lists and Submitting Bug Reports:: |
| 71 | * GNU Free Documentation License:: The license for this documentation. | 71 | * GNU Free Documentation License:: The license for this documentation. |
| @@ -484,7 +484,7 @@ Here's a simplified example of what you can add to your @file{.emacs} | |||
| 484 | file to make the changes described in the previous section | 484 | file to make the changes described in the previous section |
| 485 | (@ref{Interactive Customization}) more permanent. See the Emacs | 485 | (@ref{Interactive Customization}) more permanent. See the Emacs |
| 486 | manuals for more information on customizing Emacs via hooks. | 486 | manuals for more information on customizing Emacs via hooks. |
| 487 | @xref{Sample .emacs File}, for a more complete sample @file{.emacs} file. | 487 | @xref{Sample Init File}, for a more complete sample @file{.emacs} file. |
| 488 | 488 | ||
| 489 | @example | 489 | @example |
| 490 | @group | 490 | @group |
| @@ -600,7 +600,7 @@ optional third argument, which if non-@code{nil}, automatically | |||
| 600 | institutes the new style in the current buffer. | 600 | institutes the new style in the current buffer. |
| 601 | 601 | ||
| 602 | The sample @file{.emacs} file provides a concrete example of how a new | 602 | The sample @file{.emacs} file provides a concrete example of how a new |
| 603 | style can be added and automatically set. @xref{Sample .emacs File}. | 603 | style can be added and automatically set. @xref{Sample Init File}. |
| 604 | 604 | ||
| 605 | @node File Styles | 605 | @node File Styles |
| 606 | @subsection File Styles | 606 | @subsection File Styles |
| @@ -874,7 +874,7 @@ simply add the following to the top of your @file{.emacs} file: | |||
| 874 | 874 | ||
| 875 | @end example | 875 | @end example |
| 876 | 876 | ||
| 877 | See the sample @file{.emacs} file @ref{Sample .emacs File} for | 877 | See the sample @file{.emacs} file @ref{Sample Init File} for |
| 878 | details. | 878 | details. |
| 879 | 879 | ||
| 880 | @end quotation | 880 | @end quotation |
| @@ -894,9 +894,9 @@ either of these lists. | |||
| 894 | The official Emacs VHDL Mode Home Page can be found at | 894 | The official Emacs VHDL Mode Home Page can be found at |
| 895 | @uref{http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html}. | 895 | @uref{http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html}. |
| 896 | 896 | ||
| 897 | @node Sample .emacs File | 897 | @node Sample Init File |
| 898 | @chapter Sample @file{.emacs} file | 898 | @chapter Sample Init File |
| 899 | @cindex Sample @file{.emacs} file | 899 | @cindex Sample init file |
| 900 | 900 | ||
| 901 | Most customizations can be done using the ``Customize'' entry in the | 901 | Most customizations can be done using the ``Customize'' entry in the |
| 902 | VHDL Mode menu, which requires no editing of the .emacs file. | 902 | VHDL Mode menu, which requires no editing of the .emacs file. |
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 6b169f3c8e6..6b82653c629 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi | |||
| @@ -2568,7 +2568,7 @@ above block should be commented out. | |||
| 2568 | 2568 | ||
| 2569 | Even though these commands are sometimes useful, they are no substitute for | 2569 | Even though these commands are sometimes useful, they are no substitute for |
| 2570 | the powerful @emph{tag table} facility of Emacs. Viper's @kbd{:tag} command | 2570 | the powerful @emph{tag table} facility of Emacs. Viper's @kbd{:tag} command |
| 2571 | in a primitive interface to Emacs tags. @xref{Tags,Tags,Tags,emacs, | 2571 | in a primitive interface to Emacs tags. @xref{Tags Tables,,,emacs, |
| 2572 | The GNU Emacs Manual}, for more information on tags. | 2572 | The GNU Emacs Manual}, for more information on tags. |
| 2573 | 2573 | ||
| 2574 | The following two commands are normally bound to a mouse click and are part | 2574 | The following two commands are normally bound to a mouse click and are part |
| @@ -1110,11 +1110,11 @@ as many other symbols like U+249C (PARENTHESIZED LATIN SMALL LETTER | |||
| 1110 | A). | 1110 | A). |
| 1111 | 1111 | ||
| 1112 | Character folding is enabled by customizing 'search-default-mode' to | 1112 | Character folding is enabled by customizing 'search-default-mode' to |
| 1113 | the value 'character-fold-to-regexp'. You can also toggle character | 1113 | the value 'char-fold-to-regexp'. You can also toggle character |
| 1114 | folding in the middle of a search by typing 'M-s ''. | 1114 | folding in the middle of a search by typing 'M-s ''. |
| 1115 | 1115 | ||
| 1116 | 'query-replace' honors character folding if the new variable | 1116 | 'query-replace' honors character folding if the new variable |
| 1117 | 'replace-character-fold' is customized to a non-nil value. | 1117 | 'replace-char-fold' is customized to a non-nil value. |
| 1118 | 1118 | ||
| 1119 | +++ | 1119 | +++ |
| 1120 | *** New user option 'search-default-mode'. | 1120 | *** New user option 'search-default-mode'. |
| @@ -1124,9 +1124,9 @@ value, nil specifies that Isearch does literal searches (however, | |||
| 1124 | as in previous Emacs versions). | 1124 | as in previous Emacs versions). |
| 1125 | 1125 | ||
| 1126 | +++ | 1126 | +++ |
| 1127 | *** New function 'character-fold-to-regexp' can be used | 1127 | *** New function 'char-fold-to-regexp' can be used |
| 1128 | by searching commands to produce a regexp matching anything that | 1128 | by searching commands to produce a regexp matching anything that |
| 1129 | character-folds into STRING. | 1129 | char-folds into STRING. |
| 1130 | 1130 | ||
| 1131 | +++ | 1131 | +++ |
| 1132 | *** The new 'M-s M-w' key binding uses eww to search the web for the | 1132 | *** The new 'M-s M-w' key binding uses eww to search the web for the |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 49dada970bb..bc814169b79 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -718,6 +718,20 @@ the following variables: tex-font-script-display (how much to | |||
| 718 | lower/raise); tex-suscript-height-ratio (how much smaller than | 718 | lower/raise); tex-suscript-height-ratio (how much smaller than |
| 719 | normal); tex-suscript-height-minimum (minimum height). | 719 | normal); tex-suscript-height-minimum (minimum height). |
| 720 | 720 | ||
| 721 | ** Screen refresh is slow when there are special characters for which no suitable font is available | ||
| 722 | |||
| 723 | If the display is too slow in refreshing when you scroll to a new | ||
| 724 | region, or when you edit the buffer, it might be due to the fact that | ||
| 725 | some characters cannot be displayed in the default font, and Emacs is | ||
| 726 | spending too much time in looking for a suitable font to display them. | ||
| 727 | |||
| 728 | You can suspect this if you have several characters that are displayed | ||
| 729 | as small rectangles containing a hexadecimal code inside. | ||
| 730 | |||
| 731 | The solution is to install the appropriate fonts on your machine. For | ||
| 732 | instance if you are editing a text with a lot of math symbols, then | ||
| 733 | installing a font like 'Symbola' should solve this problem. | ||
| 734 | |||
| 721 | * Internationalization problems | 735 | * Internationalization problems |
| 722 | 736 | ||
| 723 | ** M-{ does not work on a Spanish PC keyboard. | 737 | ** M-{ does not work on a Spanish PC keyboard. |
| @@ -909,6 +923,21 @@ into Meta. This is because of the great importance of Meta in Emacs. | |||
| 909 | 923 | ||
| 910 | ** Window-manager and toolkit-related problems | 924 | ** Window-manager and toolkit-related problems |
| 911 | 925 | ||
| 926 | *** Emacs built with GTK+ toolkit produces corrupted display on HiDPI screen | ||
| 927 | |||
| 928 | This can happen if you set GDK_SCALE=2 in the environment or in your | ||
| 929 | '.xinitrc' file. (This setting is usually accompanied by | ||
| 930 | GDK_DPI_SCALE=0.5.) Emacs can not support these settings correctly, | ||
| 931 | as it doesn't use GTK+ exclusively. The result is that sometimes | ||
| 932 | widgets like the scroll bar are displayed incorrectly, and frames | ||
| 933 | could be displayed "cropped" to only part of the stuff that should be | ||
| 934 | displayed. | ||
| 935 | |||
| 936 | The workaround is to explicitly disable these settings when invoking | ||
| 937 | Emacs, for example (from a Posix shell prompt): | ||
| 938 | |||
| 939 | $ GDK_SCALE=1 GDK_DPI_SCALE=1 emacs | ||
| 940 | |||
| 912 | *** Metacity: Resizing Emacs or ALT-Tab causes X to be unresponsive. | 941 | *** Metacity: Resizing Emacs or ALT-Tab causes X to be unresponsive. |
| 913 | 942 | ||
| 914 | This happens sometimes when using Metacity. Resizing Emacs or ALT-Tab:bing | 943 | This happens sometimes when using Metacity. Resizing Emacs or ALT-Tab:bing |
| @@ -2561,51 +2590,70 @@ See <URL:http://debbugs.gnu.org/327>, <URL:http://debbugs.gnu.org/821>. | |||
| 2561 | 2590 | ||
| 2562 | ** Dumping | 2591 | ** Dumping |
| 2563 | 2592 | ||
| 2564 | *** Segfault during 'make bootstrap' under the Linux kernel. | 2593 | *** Segfault during 'make' |
| 2565 | 2594 | ||
| 2566 | In Red Hat Linux kernels, "Exec-shield" functionality is enabled by | 2595 | If Emacs segfaults when 'make' executes one of these commands: |
| 2567 | default, which creates a different memory layout that can break the | ||
| 2568 | emacs dumper. Emacs tries to handle this at build time, but if this | ||
| 2569 | fails, the following instructions may be useful. | ||
| 2570 | 2596 | ||
| 2571 | Exec-shield is enabled on your system if | 2597 | LC_ALL=C ./temacs -batch -l loadup bootstrap |
| 2598 | LC_ALL=C ./temacs -batch -l loadup dump | ||
| 2572 | 2599 | ||
| 2573 | cat /proc/sys/kernel/exec-shield | 2600 | the problem may be due to inadequate workarounds for address space |
| 2601 | layout randomization (ASLR), an operating system feature that | ||
| 2602 | randomizes the virtual address space of a process. ASLR is commonly | ||
| 2603 | enabled in Linux and NetBSD kernels, and is intended to deter exploits | ||
| 2604 | of pointer-related bugs in applications. If ASLR is enabled, the | ||
| 2605 | command: | ||
| 2574 | 2606 | ||
| 2575 | prints a value other than 0. (Please read your system documentation | 2607 | cat /proc/sys/kernel/randomize_va_space # GNU/Linux |
| 2576 | for more details on Exec-shield and associated commands.) | 2608 | sysctl security.pax.aslr.global # NetBSD |
| 2577 | 2609 | ||
| 2578 | Additionally, Linux kernel versions since 2.6.12 randomize the virtual | 2610 | outputs a nonzero value. |
| 2579 | address space of a process by default. If this feature is enabled on | ||
| 2580 | your system, then | ||
| 2581 | 2611 | ||
| 2582 | cat /proc/sys/kernel/randomize_va_space | 2612 | These segfaults should not occur on most modern systems, because the |
| 2613 | Emacs build procedure uses the command 'setfattr' or 'paxctl' to mark | ||
| 2614 | the Emacs executable as requiring non-randomized address space, and | ||
| 2615 | Emacs uses the 'personality' system call to disable address space | ||
| 2616 | randomization when dumping. However, older kernels may not support | ||
| 2617 | 'setfattr', 'paxctl', or 'personality', and newer Linux kernels have a | ||
| 2618 | secure computing mode (seccomp) that can be configured to disable the | ||
| 2619 | 'personality' call. | ||
| 2583 | 2620 | ||
| 2584 | prints a value other than 0. | 2621 | It may be possible to work around the 'personality' problem in a newer |
| 2622 | Linux kernel by configuring seccomp to allow the 'personality' call. | ||
| 2623 | For example, if you are building Emacs under Docker, you can run the | ||
| 2624 | Docker container with a security profile that allows 'personality' by | ||
| 2625 | using Docker's --security-opt option with an appropriate profile; see | ||
| 2626 | <https://docs.docker.com/engine/security/seccomp/>. | ||
| 2585 | 2627 | ||
| 2586 | When these features are enabled, building Emacs may segfault during | 2628 | To work around the ASLR problem in either an older or a newer kernel, |
| 2587 | the execution of this command: | 2629 | you can temporarily disable the feature while building Emacs. On |
| 2630 | GNU/Linux you can do so using the following command (as root). | ||
| 2588 | 2631 | ||
| 2589 | ./temacs --batch --load loadup [dump|bootstrap] | 2632 | echo 0 > /proc/sys/kernel/randomize_va_space |
| 2590 | 2633 | ||
| 2591 | To work around this problem, you can temporarily disable these | 2634 | You can re-enable the feature when you are done, by echoing the |
| 2592 | features while building Emacs. You can do so using the following | 2635 | original value back to the file. NetBSD uses a different command, |
| 2593 | commands (as root). Remember to re-enable them when you are done, | 2636 | e.g., 'sysctl -w security.pax.aslr.global=0'. |
| 2594 | by echoing the original values back to the files. | ||
| 2595 | 2637 | ||
| 2596 | echo 0 > /proc/sys/kernel/exec-shield | 2638 | Alternatively, you can try using the 'setarch' command when building |
| 2597 | echo 0 > /proc/sys/kernel/randomize_va_space | 2639 | temacs like this, where -R disables address space randomization: |
| 2598 | 2640 | ||
| 2599 | Or, on x86, you can try using the 'setarch' command when running | 2641 | setarch $(uname -m) -R make |
| 2600 | temacs, like this: | ||
| 2601 | 2642 | ||
| 2602 | setarch i386 -R ./temacs --batch --load loadup [dump|bootstrap] | 2643 | ASLR is not the only problem that can break Emacs dumping. Another |
| 2644 | issue is that in Red Hat Linux kernels, Exec-shield is enabled by | ||
| 2645 | default, and this creates a different memory layout. Emacs should | ||
| 2646 | handle this at build time, but if this fails the following | ||
| 2647 | instructions may be useful. Exec-shield is enabled on your system if | ||
| 2603 | 2648 | ||
| 2604 | or | 2649 | cat /proc/sys/kernel/exec-shield |
| 2650 | |||
| 2651 | prints a nonzero value. You can temporarily disable it as follows: | ||
| 2605 | 2652 | ||
| 2606 | setarch i386 -R make | 2653 | echo 0 > /proc/sys/kernel/exec-shield |
| 2607 | 2654 | ||
| 2608 | (The -R option disables address space randomization.) | 2655 | As with randomize_va_space, you can re-enable Exec-shield when you are |
| 2656 | done, by echoing the original value back to the file. | ||
| 2609 | 2657 | ||
| 2610 | *** temacs prints "Pure Lisp storage exhausted". | 2658 | *** temacs prints "Pure Lisp storage exhausted". |
| 2611 | 2659 | ||
diff --git a/lisp/character-fold.el b/lisp/char-fold.el index 2d3a8c67fa5..68bea29ea45 100644 --- a/lisp/character-fold.el +++ b/lisp/char-fold.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; character-fold.el --- match unicode to similar ASCII -*- lexical-binding: t; -*- | 1 | ;;; char-fold.el --- match unicode to similar ASCII -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2015-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2015-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -22,12 +22,12 @@ | |||
| 22 | 22 | ||
| 23 | ;;; Code: | 23 | ;;; Code: |
| 24 | 24 | ||
| 25 | (eval-and-compile (put 'character-fold-table 'char-table-extra-slots 1)) | 25 | (eval-and-compile (put 'char-fold-table 'char-table-extra-slots 1)) |
| 26 | 26 | ||
| 27 | (defconst character-fold-table | 27 | (defconst char-fold-table |
| 28 | (eval-when-compile | 28 | (eval-when-compile |
| 29 | (let ((equiv (make-char-table 'character-fold-table)) | 29 | (let ((equiv (make-char-table 'char-fold-table)) |
| 30 | (equiv-multi (make-char-table 'character-fold-table)) | 30 | (equiv-multi (make-char-table 'char-fold-table)) |
| 31 | (table (unicode-property-table-internal 'decomposition))) | 31 | (table (unicode-property-table-internal 'decomposition))) |
| 32 | (set-char-table-extra-slot equiv 0 equiv-multi) | 32 | (set-char-table-extra-slot equiv 0 equiv-multi) |
| 33 | 33 | ||
| @@ -115,7 +115,7 @@ | |||
| 115 | equiv) | 115 | equiv) |
| 116 | equiv)) | 116 | equiv)) |
| 117 | "Used for folding characters of the same group during search. | 117 | "Used for folding characters of the same group during search. |
| 118 | This is a char-table with the `character-fold-table' subtype. | 118 | This is a char-table with the `char-fold-table' subtype. |
| 119 | 119 | ||
| 120 | Let us refer to the character in question by char-x. | 120 | Let us refer to the character in question by char-x. |
| 121 | Each entry is either nil (meaning char-x only matches literally) | 121 | Each entry is either nil (meaning char-x only matches literally) |
| @@ -136,18 +136,18 @@ For instance, the default alist for ?f includes: | |||
| 136 | 136 | ||
| 137 | Exceptionally for the space character (32), ALIST is ignored.") | 137 | Exceptionally for the space character (32), ALIST is ignored.") |
| 138 | 138 | ||
| 139 | (defun character-fold--make-space-string (n) | 139 | (defun char-fold--make-space-string (n) |
| 140 | "Return a string that matches N spaces." | 140 | "Return a string that matches N spaces." |
| 141 | (format "\\(?:%s\\|%s\\)" | 141 | (format "\\(?:%s\\|%s\\)" |
| 142 | (make-string n ?\s) | 142 | (make-string n ?\s) |
| 143 | (apply #'concat | 143 | (apply #'concat |
| 144 | (make-list n (or (aref character-fold-table ?\s) " "))))) | 144 | (make-list n (or (aref char-fold-table ?\s) " "))))) |
| 145 | 145 | ||
| 146 | ;;;###autoload | 146 | ;;;###autoload |
| 147 | (defun character-fold-to-regexp (string &optional _lax from) | 147 | (defun char-fold-to-regexp (string &optional _lax from) |
| 148 | "Return a regexp matching anything that character-folds into STRING. | 148 | "Return a regexp matching anything that char-folds into STRING. |
| 149 | Any character in STRING that has an entry in | 149 | Any character in STRING that has an entry in |
| 150 | `character-fold-table' is replaced with that entry (which is a | 150 | `char-fold-table' is replaced with that entry (which is a |
| 151 | regexp) and other characters are `regexp-quote'd. | 151 | regexp) and other characters are `regexp-quote'd. |
| 152 | 152 | ||
| 153 | If the resulting regexp would be too long for Emacs to handle, | 153 | If the resulting regexp would be too long for Emacs to handle, |
| @@ -156,7 +156,7 @@ just return the result of calling `regexp-quote' on STRING. | |||
| 156 | FROM is for internal use. It specifies an index in the STRING | 156 | FROM is for internal use. It specifies an index in the STRING |
| 157 | from which to start." | 157 | from which to start." |
| 158 | (let* ((spaces 0) | 158 | (let* ((spaces 0) |
| 159 | (multi-char-table (char-table-extra-slot character-fold-table 0)) | 159 | (multi-char-table (char-table-extra-slot char-fold-table 0)) |
| 160 | (i (or from 0)) | 160 | (i (or from 0)) |
| 161 | (end (length string)) | 161 | (end (length string)) |
| 162 | (out nil)) | 162 | (out nil)) |
| @@ -172,9 +172,9 @@ from which to start." | |||
| 172 | (pcase (aref string i) | 172 | (pcase (aref string i) |
| 173 | (`?\s (setq spaces (1+ spaces))) | 173 | (`?\s (setq spaces (1+ spaces))) |
| 174 | (c (when (> spaces 0) | 174 | (c (when (> spaces 0) |
| 175 | (push (character-fold--make-space-string spaces) out) | 175 | (push (char-fold--make-space-string spaces) out) |
| 176 | (setq spaces 0)) | 176 | (setq spaces 0)) |
| 177 | (let ((regexp (or (aref character-fold-table c) | 177 | (let ((regexp (or (aref char-fold-table c) |
| 178 | (regexp-quote (string c)))) | 178 | (regexp-quote (string c)))) |
| 179 | ;; Long string. The regexp would probably be too long. | 179 | ;; Long string. The regexp would probably be too long. |
| 180 | (alist (unless (> end 50) | 180 | (alist (unless (> end 50) |
| @@ -206,13 +206,13 @@ from which to start." | |||
| 206 | (let ((length (car entry)) | 206 | (let ((length (car entry)) |
| 207 | (suffix-regexp (cdr entry))) | 207 | (suffix-regexp (cdr entry))) |
| 208 | (concat suffix-regexp | 208 | (concat suffix-regexp |
| 209 | (character-fold-to-regexp subs nil length)))) | 209 | (char-fold-to-regexp subs nil length)))) |
| 210 | `((0 . ,regexp) . ,matched-entries) "\\|") | 210 | `((0 . ,regexp) . ,matched-entries) "\\|") |
| 211 | "\\)")))) | 211 | "\\)")))) |
| 212 | out)))) | 212 | out)))) |
| 213 | (setq i (1+ i))) | 213 | (setq i (1+ i))) |
| 214 | (when (> spaces 0) | 214 | (when (> spaces 0) |
| 215 | (push (character-fold--make-space-string spaces) out)) | 215 | (push (char-fold--make-space-string spaces) out)) |
| 216 | (let ((regexp (apply #'concat (nreverse out)))) | 216 | (let ((regexp (apply #'concat (nreverse out)))) |
| 217 | ;; Limited by `MAX_BUF_SIZE' in `regex.c'. | 217 | ;; Limited by `MAX_BUF_SIZE' in `regex.c'. |
| 218 | (if (> (length regexp) 5000) | 218 | (if (> (length regexp) 5000) |
| @@ -221,22 +221,22 @@ from which to start." | |||
| 221 | 221 | ||
| 222 | 222 | ||
| 223 | ;;; Commands provided for completeness. | 223 | ;;; Commands provided for completeness. |
| 224 | (defun character-fold-search-forward (string &optional bound noerror count) | 224 | (defun char-fold-search-forward (string &optional bound noerror count) |
| 225 | "Search forward for a character-folded version of STRING. | 225 | "Search forward for a char-folded version of STRING. |
| 226 | STRING is converted to a regexp with `character-fold-to-regexp', | 226 | STRING is converted to a regexp with `char-fold-to-regexp', |
| 227 | which is searched for with `re-search-forward'. | 227 | which is searched for with `re-search-forward'. |
| 228 | BOUND NOERROR COUNT are passed to `re-search-forward'." | 228 | BOUND NOERROR COUNT are passed to `re-search-forward'." |
| 229 | (interactive "sSearch: ") | 229 | (interactive "sSearch: ") |
| 230 | (re-search-forward (character-fold-to-regexp string) bound noerror count)) | 230 | (re-search-forward (char-fold-to-regexp string) bound noerror count)) |
| 231 | 231 | ||
| 232 | (defun character-fold-search-backward (string &optional bound noerror count) | 232 | (defun char-fold-search-backward (string &optional bound noerror count) |
| 233 | "Search backward for a character-folded version of STRING. | 233 | "Search backward for a char-folded version of STRING. |
| 234 | STRING is converted to a regexp with `character-fold-to-regexp', | 234 | STRING is converted to a regexp with `char-fold-to-regexp', |
| 235 | which is searched for with `re-search-backward'. | 235 | which is searched for with `re-search-backward'. |
| 236 | BOUND NOERROR COUNT are passed to `re-search-backward'." | 236 | BOUND NOERROR COUNT are passed to `re-search-backward'." |
| 237 | (interactive "sSearch: ") | 237 | (interactive "sSearch: ") |
| 238 | (re-search-backward (character-fold-to-regexp string) bound noerror count)) | 238 | (re-search-backward (char-fold-to-regexp string) bound noerror count)) |
| 239 | 239 | ||
| 240 | (provide 'character-fold) | 240 | (provide 'char-fold) |
| 241 | 241 | ||
| 242 | ;;; character-fold.el ends here | 242 | ;;; char-fold.el ends here |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 5f1a4304342..528820876ec 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -806,9 +806,16 @@ relevant to POS." | |||
| 806 | 'describe-char-unidata-list)) | 806 | 'describe-char-unidata-list)) |
| 807 | 'follow-link t) | 807 | 'follow-link t) |
| 808 | (insert "\n") | 808 | (insert "\n") |
| 809 | (dolist (elt (if (eq describe-char-unidata-list t) | 809 | (dolist (elt |
| 810 | (nreverse (mapcar 'car char-code-property-alist)) | 810 | (cond ((eq describe-char-unidata-list t) |
| 811 | describe-char-unidata-list)) | 811 | (nreverse (mapcar 'car char-code-property-alist))) |
| 812 | ((< char 32) | ||
| 813 | ;; Temporary fix (2016-05-22): The | ||
| 814 | ;; decomposition item for \n corrupts the | ||
| 815 | ;; display on a Linux virtual terminal. | ||
| 816 | ;; (Bug #23594). | ||
| 817 | (remq 'decomposition describe-char-unidata-list)) | ||
| 818 | (t describe-char-unidata-list))) | ||
| 812 | (let ((val (get-char-code-property char elt)) | 819 | (let ((val (get-char-code-property char elt)) |
| 813 | description) | 820 | description) |
| 814 | (when val | 821 | (when val |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 822db050e1f..dba3277c091 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -1163,7 +1163,7 @@ This function also sets `desktop-dirname' to nil." | |||
| 1163 | "Restore the state of a set of frames. | 1163 | "Restore the state of a set of frames. |
| 1164 | This function depends on the value of `desktop-saved-frameset' | 1164 | This function depends on the value of `desktop-saved-frameset' |
| 1165 | being set (usually, by reading it from the desktop)." | 1165 | being set (usually, by reading it from the desktop)." |
| 1166 | (when (desktop-restoring-frameset-p) | 1166 | (when (and (display-graphic-p) (desktop-restoring-frameset-p)) |
| 1167 | (frameset-restore desktop-saved-frameset | 1167 | (frameset-restore desktop-saved-frameset |
| 1168 | :reuse-frames (eq desktop-restore-reuses-frames t) | 1168 | :reuse-frames (eq desktop-restore-reuses-frames t) |
| 1169 | :cleanup-frames (not (eq desktop-restore-reuses-frames 'keep)) | 1169 | :cleanup-frames (not (eq desktop-restore-reuses-frames 'keep)) |
| @@ -1634,15 +1634,8 @@ If there are no buffers left to create, kill the timer." | |||
| 1634 | (setq command-line-args (delete key command-line-args)) | 1634 | (setq command-line-args (delete key command-line-args)) |
| 1635 | (desktop-save-mode 0))) | 1635 | (desktop-save-mode 0))) |
| 1636 | (when desktop-save-mode | 1636 | (when desktop-save-mode |
| 1637 | ;; People don't expect emacs -nw, or --daemon, | 1637 | (desktop-read) |
| 1638 | ;; to create graphical frames (bug#17693). | 1638 | (setq inhibit-startup-screen t)))) |
| 1639 | ;; TODO perhaps there should be a separate value | ||
| 1640 | ;; for desktop-restore-frames to control this startup behavior? | ||
| 1641 | (let ((desktop-restore-frames (and desktop-restore-frames | ||
| 1642 | initial-window-system | ||
| 1643 | (not (daemonp))))) | ||
| 1644 | (desktop-read) | ||
| 1645 | (setq inhibit-startup-screen t))))) | ||
| 1646 | 1639 | ||
| 1647 | (provide 'desktop) | 1640 | (provide 'desktop) |
| 1648 | 1641 | ||
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 8afe18f8d94..4e3dab4bb38 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -302,10 +302,12 @@ contrast, `package-user-dir' contains packages for personal use." | |||
| 302 | :risky t | 302 | :risky t |
| 303 | :version "24.1") | 303 | :version "24.1") |
| 304 | 304 | ||
| 305 | (defvar epg-gpg-program) | 305 | (declare-function epg-find-configuration "epg-config" |
| 306 | (protocol &optional force)) | ||
| 306 | 307 | ||
| 307 | (defcustom package-check-signature | 308 | (defcustom package-check-signature |
| 308 | (if (progn (require 'epg-config) (executable-find epg-gpg-program)) | 309 | (if (and (require 'epg-config) |
| 310 | (epg-find-configuration 'OpenPGP)) | ||
| 309 | 'allow-unsigned) | 311 | 'allow-unsigned) |
| 310 | "Non-nil means to check package signatures when installing. | 312 | "Non-nil means to check package signatures when installing. |
| 311 | The value `allow-unsigned' means to still install a package even if | 313 | The value `allow-unsigned' means to still install a package even if |
| @@ -1159,38 +1161,43 @@ errors signaled by ERROR-FORM or by BODY). | |||
| 1159 | (setq body (cdr (cdr body)))) | 1161 | (setq body (cdr (cdr body)))) |
| 1160 | (macroexp-let2* nil ((url-1 url) | 1162 | (macroexp-let2* nil ((url-1 url) |
| 1161 | (noerror-1 noerror)) | 1163 | (noerror-1 noerror)) |
| 1162 | `(cl-macrolet ((unless-error (body-2 &rest before-body) | 1164 | (let ((url-sym (make-symbol "url")) |
| 1163 | (let ((err (make-symbol "err"))) | 1165 | (b-sym (make-symbol "b-sym"))) |
| 1164 | `(with-temp-buffer | 1166 | `(cl-macrolet ((unless-error (body-2 &rest before-body) |
| 1165 | (when (condition-case ,err | 1167 | (let ((err (make-symbol "err"))) |
| 1166 | (progn ,@before-body t) | 1168 | `(with-temp-buffer |
| 1167 | ,(list 'error ',error-form | 1169 | (when (condition-case ,err |
| 1168 | (list 'unless ',noerror-1 | 1170 | (progn ,@before-body t) |
| 1169 | `(signal (car ,err) (cdr ,err))))) | 1171 | ,(list 'error ',error-form |
| 1170 | ,@body-2))))) | 1172 | (list 'unless ',noerror-1 |
| 1171 | (if (string-match-p "\\`https?:" ,url-1) | 1173 | `(signal (car ,err) (cdr ,err))))) |
| 1172 | (let* ((url (concat ,url-1 ,file)) | 1174 | ,@body-2))))) |
| 1173 | (callback (lambda (status) | 1175 | (if (string-match-p "\\`https?:" ,url-1) |
| 1174 | (let ((b (current-buffer))) | 1176 | (let ((,url-sym (concat ,url-1 ,file))) |
| 1175 | (require 'url-handlers) | 1177 | (if ,async |
| 1176 | (unless-error ,body | 1178 | (unless-error nil |
| 1177 | (when-let ((er (plist-get status :error))) | 1179 | (url-retrieve ,url-sym |
| 1178 | (error "Error retrieving: %s %S" url er)) | 1180 | (lambda (status) |
| 1179 | (with-current-buffer b | 1181 | (let ((,b-sym (current-buffer))) |
| 1180 | (goto-char (point-min)) | 1182 | (require 'url-handlers) |
| 1181 | (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror) | 1183 | (unless-error ,body |
| 1182 | (error "Error retrieving: %s %S" url "incomprehensible buffer"))) | 1184 | (when-let ((er (plist-get status :error))) |
| 1183 | (url-insert-buffer-contents b url) | 1185 | (error "Error retrieving: %s %S" ,url-sym er)) |
| 1184 | (kill-buffer b) | 1186 | (with-current-buffer ,b-sym |
| 1185 | (goto-char (point-min))))))) | 1187 | (goto-char (point-min)) |
| 1186 | (if ,async | 1188 | (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror) |
| 1187 | (unless-error nil (url-retrieve url callback nil 'silent)) | 1189 | (error "Error retrieving: %s %S" ,url-sym "incomprehensible buffer"))) |
| 1188 | (unless-error ,body (url-insert-file-contents url)))) | 1190 | (url-insert-buffer-contents ,b-sym ,url-sym) |
| 1189 | (unless-error ,body | 1191 | (kill-buffer ,b-sym) |
| 1190 | (let ((url (expand-file-name ,file ,url-1))) | 1192 | (goto-char (point-min))))) |
| 1191 | (unless (file-name-absolute-p url) | 1193 | nil |
| 1192 | (error "Location %s is not a url nor an absolute file name" url)) | 1194 | 'silent)) |
| 1193 | (insert-file-contents url))))))) | 1195 | (unless-error ,body (url-insert-file-contents ,url-sym)))) |
| 1196 | (unless-error ,body | ||
| 1197 | (let ((url (expand-file-name ,file ,url-1))) | ||
| 1198 | (unless (file-name-absolute-p url) | ||
| 1199 | (error "Location %s is not a url nor an absolute file name" url)) | ||
| 1200 | (insert-file-contents url)))))))) | ||
| 1194 | 1201 | ||
| 1195 | (define-error 'bad-signature "Failed to verify signature") | 1202 | (define-error 'bad-signature "Failed to verify signature") |
| 1196 | 1203 | ||
| @@ -1460,8 +1467,6 @@ taken care of by `package-initialize'." | |||
| 1460 | (defvar package--downloads-in-progress nil | 1467 | (defvar package--downloads-in-progress nil |
| 1461 | "List of in-progress asynchronous downloads.") | 1468 | "List of in-progress asynchronous downloads.") |
| 1462 | 1469 | ||
| 1463 | (declare-function epg-find-configuration "epg-config" | ||
| 1464 | (protocol &optional force)) | ||
| 1465 | (declare-function epg-import-keys-from-file "epg" (context keys)) | 1470 | (declare-function epg-import-keys-from-file "epg" (context keys)) |
| 1466 | 1471 | ||
| 1467 | ;;;###autoload | 1472 | ;;;###autoload |
| @@ -1561,12 +1566,6 @@ downloads in the background." | |||
| 1561 | (let ((default-keyring (expand-file-name "package-keyring.gpg" | 1566 | (let ((default-keyring (expand-file-name "package-keyring.gpg" |
| 1562 | data-directory)) | 1567 | data-directory)) |
| 1563 | (inhibit-message async)) | 1568 | (inhibit-message async)) |
| 1564 | (if (get 'package-check-signature 'saved-value) | ||
| 1565 | (when package-check-signature | ||
| 1566 | (epg-find-configuration 'OpenPGP)) | ||
| 1567 | (setq package-check-signature | ||
| 1568 | (if (epg-find-configuration 'OpenPGP) | ||
| 1569 | 'allow-unsigned))) | ||
| 1570 | (when (and package-check-signature (file-exists-p default-keyring)) | 1569 | (when (and package-check-signature (file-exists-p default-keyring)) |
| 1571 | (condition-case-unless-debug error | 1570 | (condition-case-unless-debug error |
| 1572 | (package-import-keyring default-keyring) | 1571 | (package-import-keyring default-keyring) |
| @@ -1874,6 +1873,7 @@ add a call to it along with some explanatory comments." | |||
| 1874 | (file-readable-p user-init-file) | 1873 | (file-readable-p user-init-file) |
| 1875 | (file-writable-p user-init-file)) | 1874 | (file-writable-p user-init-file)) |
| 1876 | (let* ((buffer (find-buffer-visiting user-init-file)) | 1875 | (let* ((buffer (find-buffer-visiting user-init-file)) |
| 1876 | buffer-name | ||
| 1877 | (contains-init | 1877 | (contains-init |
| 1878 | (if buffer | 1878 | (if buffer |
| 1879 | (with-current-buffer buffer | 1879 | (with-current-buffer buffer |
| @@ -1889,8 +1889,12 @@ add a call to it along with some explanatory comments." | |||
| 1889 | (re-search-forward "(package-initialize\\_>" nil 'noerror))))) | 1889 | (re-search-forward "(package-initialize\\_>" nil 'noerror))))) |
| 1890 | (unless contains-init | 1890 | (unless contains-init |
| 1891 | (with-current-buffer (or buffer | 1891 | (with-current-buffer (or buffer |
| 1892 | (let ((delay-mode-hooks t)) | 1892 | (let ((delay-mode-hooks t) |
| 1893 | (find-file-visit-truename t)) | ||
| 1893 | (find-file-noselect user-init-file))) | 1894 | (find-file-noselect user-init-file))) |
| 1895 | (when buffer | ||
| 1896 | (setq buffer-name (buffer-file-name)) | ||
| 1897 | (set-visited-file-name (file-chase-links user-init-file))) | ||
| 1894 | (save-excursion | 1898 | (save-excursion |
| 1895 | (save-restriction | 1899 | (save-restriction |
| 1896 | (widen) | 1900 | (widen) |
| @@ -1909,7 +1913,10 @@ add a call to it along with some explanatory comments." | |||
| 1909 | (insert "\n")) | 1913 | (insert "\n")) |
| 1910 | (let ((file-precious-flag t)) | 1914 | (let ((file-precious-flag t)) |
| 1911 | (save-buffer)) | 1915 | (save-buffer)) |
| 1912 | (unless buffer | 1916 | (if buffer |
| 1917 | (progn | ||
| 1918 | (set-visited-file-name buffer-name) | ||
| 1919 | (set-buffer-modified-p nil)) | ||
| 1913 | (kill-buffer (current-buffer))))))))) | 1920 | (kill-buffer (current-buffer))))))))) |
| 1914 | (setq package--init-file-ensured t)) | 1921 | (setq package--init-file-ensured t)) |
| 1915 | 1922 | ||
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 6951dbb708b..72fc89817a1 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -631,7 +631,7 @@ | |||
| 631 | (viper-over-whitespace-line)) | 631 | (viper-over-whitespace-line)) |
| 632 | (indent-to-left-margin)) | 632 | (indent-to-left-margin)) |
| 633 | (viper-add-newline-at-eob-if-necessary) | 633 | (viper-add-newline-at-eob-if-necessary) |
| 634 | (viper-adjust-undo) | 634 | (viper-complete-complex-command-for-undo) |
| 635 | 635 | ||
| 636 | (if (eq viper-current-state 'emacs-state) | 636 | (if (eq viper-current-state 'emacs-state) |
| 637 | (viper-restore-cursor-color 'after-emacs-mode) | 637 | (viper-restore-cursor-color 'after-emacs-mode) |
| @@ -1570,7 +1570,7 @@ If the prefix argument ARG is non-nil, it is used instead of `val'." | |||
| 1570 | (if (and (eolp) (not (bolp))) | 1570 | (if (and (eolp) (not (bolp))) |
| 1571 | (backward-char 1)) | 1571 | (backward-char 1)) |
| 1572 | )) | 1572 | )) |
| 1573 | (viper-adjust-undo) ; take care of undo | 1573 | (viper-complete-complex-command-for-undo) ; take care of undo |
| 1574 | ;; If the prev cmd was rotating the command ring, this means that `.' has | 1574 | ;; If the prev cmd was rotating the command ring, this means that `.' has |
| 1575 | ;; just executed a command from that ring. So, push it on the ring again. | 1575 | ;; just executed a command from that ring. So, push it on the ring again. |
| 1576 | ;; If we are just executing previous command , then don't push viper-d-com | 1576 | ;; If we are just executing previous command , then don't push viper-d-com |
| @@ -1670,6 +1670,7 @@ invokes the command before that, etc." | |||
| 1670 | 1670 | ||
| 1671 | (undo-start) | 1671 | (undo-start) |
| 1672 | (undo-more 2) | 1672 | (undo-more 2) |
| 1673 | (viper-complete-complex-command-for-undo) | ||
| 1673 | ;;(setq undo-beg-posn (or undo-beg-posn (point)) | 1674 | ;;(setq undo-beg-posn (or undo-beg-posn (point)) |
| 1674 | ;; undo-end-posn (or undo-end-posn (point))) | 1675 | ;; undo-end-posn (or undo-end-posn (point))) |
| 1675 | ;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt) | 1676 | ;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt) |
| @@ -1709,37 +1710,17 @@ invokes the command before that, etc." | |||
| 1709 | ;; The following two functions are used to set up undo properly. | 1710 | ;; The following two functions are used to set up undo properly. |
| 1710 | ;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines, | 1711 | ;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines, |
| 1711 | ;; they are undone all at once. | 1712 | ;; they are undone all at once. |
| 1712 | (defun viper-adjust-undo () | 1713 | (defun viper-complete-complex-command-for-undo () |
| 1713 | (if viper-undo-needs-adjustment | 1714 | (setq undo-auto-disable-boundaries nil) |
| 1714 | (let ((inhibit-quit t) | 1715 | (setq viper-undo-in-complex-command nil) |
| 1715 | tmp tmp2) | 1716 | (undo-boundary)) |
| 1716 | (setq viper-undo-needs-adjustment nil) | ||
| 1717 | (if (listp buffer-undo-list) | ||
| 1718 | (if (setq tmp (memq viper-buffer-undo-list-mark buffer-undo-list)) | ||
| 1719 | (progn | ||
| 1720 | (setq tmp2 (cdr tmp)) ; the part after mark | ||
| 1721 | |||
| 1722 | ;; cut tail from buffer-undo-list temporarily by direct | ||
| 1723 | ;; manipulation with pointers in buffer-undo-list | ||
| 1724 | (setcdr tmp nil) | ||
| 1725 | |||
| 1726 | (setq buffer-undo-list (delq nil buffer-undo-list)) | ||
| 1727 | (setq buffer-undo-list | ||
| 1728 | (delq viper-buffer-undo-list-mark buffer-undo-list)) | ||
| 1729 | ;; restore tail of buffer-undo-list | ||
| 1730 | (setq buffer-undo-list (nconc buffer-undo-list tmp2))) | ||
| 1731 | (setq buffer-undo-list (delq nil buffer-undo-list))))) | ||
| 1732 | )) | ||
| 1733 | 1717 | ||
| 1734 | 1718 | ||
| 1735 | (defun viper-set-complex-command-for-undo () | 1719 | (defun viper-set-complex-command-for-undo () |
| 1736 | (if (listp buffer-undo-list) | 1720 | (when (not viper-undo-in-complex-command) |
| 1737 | (if (not viper-undo-needs-adjustment) | 1721 | (setq undo-auto-disable-boundaries t) |
| 1738 | (let ((inhibit-quit t)) | 1722 | (setq viper-undo-in-complex-command t) |
| 1739 | (setq buffer-undo-list | 1723 | (undo-boundary))) |
| 1740 | (cons viper-buffer-undo-list-mark buffer-undo-list)) | ||
| 1741 | (setq viper-undo-needs-adjustment t))))) | ||
| 1742 | |||
| 1743 | 1724 | ||
| 1744 | ;;; Viper's destructive Command ring utilities | 1725 | ;;; Viper's destructive Command ring utilities |
| 1745 | 1726 | ||
| @@ -2607,7 +2588,7 @@ These keys are ESC, RET, and LineFeed." | |||
| 2607 | (delete-char 1 t) | 2588 | (delete-char 1 t) |
| 2608 | (insert char)) | 2589 | (insert char)) |
| 2609 | 2590 | ||
| 2610 | (viper-adjust-undo) | 2591 | (viper-complete-complex-command-for-undo) |
| 2611 | (backward-char arg) | 2592 | (backward-char arg) |
| 2612 | )) | 2593 | )) |
| 2613 | 2594 | ||
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 104245b7571..c1e76629477 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -370,13 +370,8 @@ Use `\\[viper-set-expert-level]' to change this.") | |||
| 370 | ;; VI-style Undo | 370 | ;; VI-style Undo |
| 371 | 371 | ||
| 372 | ;; Used to 'undo' complex commands, such as replace and insert commands. | 372 | ;; Used to 'undo' complex commands, such as replace and insert commands. |
| 373 | (viper-deflocalvar viper-undo-needs-adjustment nil) | 373 | (viper-deflocalvar viper-undo-in-complex-command nil) |
| 374 | (put 'viper-undo-needs-adjustment 'permanent-local t) | 374 | (put 'viper-undo-in-complex-command 'permanent-local t) |
| 375 | |||
| 376 | ;; A mark that Viper puts on buffer-undo-list. Marks the beginning of a | ||
| 377 | ;; complex command that must be undone atomically. If inserted, it is | ||
| 378 | ;; erased by viper-change-state-to-vi and viper-repeat. | ||
| 379 | (defconst viper-buffer-undo-list-mark 'viper) | ||
| 380 | 375 | ||
| 381 | (defcustom viper-keep-point-on-undo nil | 376 | (defcustom viper-keep-point-on-undo nil |
| 382 | "Non-nil means not to move point while undoing commands. | 377 | "Non-nil means not to move point while undoing commands. |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 418d9ea273a..7360a0b3742 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -222,7 +222,7 @@ It is nil if none yet.") | |||
| 222 | Default value, nil, means edit the string instead." | 222 | Default value, nil, means edit the string instead." |
| 223 | :type 'boolean) | 223 | :type 'boolean) |
| 224 | 224 | ||
| 225 | (autoload 'character-fold-to-regexp "character-fold") | 225 | (autoload 'char-fold-to-regexp "char-fold") |
| 226 | 226 | ||
| 227 | (defcustom search-default-mode nil | 227 | (defcustom search-default-mode nil |
| 228 | "Default mode to use when starting isearch. | 228 | "Default mode to use when starting isearch. |
| @@ -236,7 +236,7 @@ isearch). | |||
| 236 | If a function, use that function as an `isearch-regexp-function'. | 236 | If a function, use that function as an `isearch-regexp-function'. |
| 237 | Example functions (and the keys to toggle them during isearch) | 237 | Example functions (and the keys to toggle them during isearch) |
| 238 | are `word-search-regexp' \(`\\[isearch-toggle-word]'), `isearch-symbol-regexp' | 238 | are `word-search-regexp' \(`\\[isearch-toggle-word]'), `isearch-symbol-regexp' |
| 239 | \(`\\[isearch-toggle-symbol]'), and `character-fold-to-regexp' \(`\\[isearch-toggle-character-fold]')." | 239 | \(`\\[isearch-toggle-symbol]'), and `char-fold-to-regexp' \(`\\[isearch-toggle-char-fold]')." |
| 240 | ;; :type is set below by `isearch-define-mode-toggle'. | 240 | ;; :type is set below by `isearch-define-mode-toggle'. |
| 241 | :type '(choice (const :tag "Literal search" nil) | 241 | :type '(choice (const :tag "Literal search" nil) |
| 242 | (const :tag "Regexp search" t) | 242 | (const :tag "Regexp search" t) |
| @@ -510,6 +510,7 @@ This is like `describe-bindings', but displays only Isearch keys." | |||
| 510 | ;; People expect to be able to paste with the mouse. | 510 | ;; People expect to be able to paste with the mouse. |
| 511 | (define-key map [mouse-2] #'isearch-mouse-2) | 511 | (define-key map [mouse-2] #'isearch-mouse-2) |
| 512 | (define-key map [down-mouse-2] nil) | 512 | (define-key map [down-mouse-2] nil) |
| 513 | (define-key map [xterm-paste] #'isearch-xterm-paste) | ||
| 513 | 514 | ||
| 514 | ;; Some bindings you may want to put in your isearch-mode-hook. | 515 | ;; Some bindings you may want to put in your isearch-mode-hook. |
| 515 | ;; Suggest some alternates... | 516 | ;; Suggest some alternates... |
| @@ -718,7 +719,7 @@ Type \\[isearch-toggle-invisible] to toggle search in invisible text. | |||
| 718 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. | 719 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. |
| 719 | Type \\[isearch-toggle-word] to toggle word mode. | 720 | Type \\[isearch-toggle-word] to toggle word mode. |
| 720 | Type \\[isearch-toggle-symbol] to toggle symbol mode. | 721 | Type \\[isearch-toggle-symbol] to toggle symbol mode. |
| 721 | Type \\[isearch-toggle-character-fold] to toggle character folding. | 722 | Type \\[isearch-toggle-char-fold] to toggle character folding. |
| 722 | 723 | ||
| 723 | Type \\[isearch-toggle-lax-whitespace] to toggle whitespace matching. | 724 | Type \\[isearch-toggle-lax-whitespace] to toggle whitespace matching. |
| 724 | In incremental searches, a space or spaces normally matches any whitespace | 725 | In incremental searches, a space or spaces normally matches any whitespace |
| @@ -1546,9 +1547,9 @@ The command then executes BODY and updates the isearch prompt." | |||
| 1546 | Turning on word search turns off regexp mode.") | 1547 | Turning on word search turns off regexp mode.") |
| 1547 | (isearch-define-mode-toggle symbol "_" isearch-symbol-regexp "\ | 1548 | (isearch-define-mode-toggle symbol "_" isearch-symbol-regexp "\ |
| 1548 | Turning on symbol search turns off regexp mode.") | 1549 | Turning on symbol search turns off regexp mode.") |
| 1549 | (isearch-define-mode-toggle character-fold "'" character-fold-to-regexp "\ | 1550 | (isearch-define-mode-toggle char-fold "'" char-fold-to-regexp "\ |
| 1550 | Turning on character-folding turns off regexp mode.") | 1551 | Turning on character-folding turns off regexp mode.") |
| 1551 | (put 'character-fold-to-regexp 'isearch-message-prefix "char-fold ") | 1552 | (put 'char-fold-to-regexp 'isearch-message-prefix "char-fold ") |
| 1552 | 1553 | ||
| 1553 | (isearch-define-mode-toggle regexp "r" nil nil | 1554 | (isearch-define-mode-toggle regexp "r" nil nil |
| 1554 | (setq isearch-regexp (not isearch-regexp)) | 1555 | (setq isearch-regexp (not isearch-regexp)) |
| @@ -2001,6 +2002,13 @@ is bound to outside of Isearch." | |||
| 2001 | (when (functionp binding) | 2002 | (when (functionp binding) |
| 2002 | (call-interactively binding))))) | 2003 | (call-interactively binding))))) |
| 2003 | 2004 | ||
| 2005 | (declare-function xterm--pasted-text "term/xterm" ()) | ||
| 2006 | |||
| 2007 | (defun isearch-xterm-paste () | ||
| 2008 | "Pull terminal paste into search string." | ||
| 2009 | (interactive) | ||
| 2010 | (isearch-yank-string (xterm--pasted-text))) | ||
| 2011 | |||
| 2004 | (defun isearch-yank-internal (jumpform) | 2012 | (defun isearch-yank-internal (jumpform) |
| 2005 | "Pull the text from point to the point reached by JUMPFORM. | 2013 | "Pull the text from point to the point reached by JUMPFORM. |
| 2006 | JUMPFORM is a lambda expression that takes no arguments and returns | 2014 | JUMPFORM is a lambda expression that takes no arguments and returns |
diff --git a/lisp/leim/quail/czech.el b/lisp/leim/quail/czech.el index 365c3c51059..ddb4af53db3 100644 --- a/lisp/leim/quail/czech.el +++ b/lisp/leim/quail/czech.el | |||
| @@ -142,18 +142,7 @@ | |||
| 142 | ("=[" ?\[) | 142 | ("=[" ?\[) |
| 143 | ("=]" ?\]) | 143 | ("=]" ?\]) |
| 144 | ("={" ?{) | 144 | ("={" ?{) |
| 145 | ("=}" ?}) | 145 | ("=}" ?})) |
| 146 | ([kp-1] ?1) | ||
| 147 | ([kp-2] ?2) | ||
| 148 | ([kp-3] ?3) | ||
| 149 | ([kp-4] ?4) | ||
| 150 | ([kp-5] ?5) | ||
| 151 | ([kp-6] ?6) | ||
| 152 | ([kp-7] ?7) | ||
| 153 | ([kp-8] ?8) | ||
| 154 | ([kp-9] ?9) | ||
| 155 | ([kp-0] ?0) | ||
| 156 | ([kp-add] ?+)) | ||
| 157 | 146 | ||
| 158 | (quail-define-package | 147 | (quail-define-package |
| 159 | "czech-qwerty" "Czech" "CZ" t | 148 | "czech-qwerty" "Czech" "CZ" t |
| @@ -260,18 +249,7 @@ | |||
| 260 | ("=[" ?\[) | 249 | ("=[" ?\[) |
| 261 | ("=]" ?\]) | 250 | ("=]" ?\]) |
| 262 | ("={" ?{) | 251 | ("={" ?{) |
| 263 | ("=}" ?}) | 252 | ("=}" ?})) |
| 264 | ([kp-1] ?1) | ||
| 265 | ([kp-2] ?2) | ||
| 266 | ([kp-3] ?3) | ||
| 267 | ([kp-4] ?4) | ||
| 268 | ([kp-5] ?5) | ||
| 269 | ([kp-6] ?6) | ||
| 270 | ([kp-7] ?7) | ||
| 271 | ([kp-8] ?8) | ||
| 272 | ([kp-9] ?9) | ||
| 273 | ([kp-0] ?0) | ||
| 274 | ([kp-add] ?+)) | ||
| 275 | 253 | ||
| 276 | (quail-define-package | 254 | (quail-define-package |
| 277 | "czech-prog-1" "Czech" "CZ" t | 255 | "czech-prog-1" "Czech" "CZ" t |
| @@ -350,18 +328,7 @@ All other keys are the same as on standard US keyboard." | |||
| 350 | ("++U" ?Ů) | 328 | ("++U" ?Ů) |
| 351 | ("+++U" ?Ü) | 329 | ("+++U" ?Ü) |
| 352 | ("+Y" ?Ý) | 330 | ("+Y" ?Ý) |
| 353 | ("+Z" ?Ž) | 331 | ("+Z" ?Ž)) |
| 354 | ([kp-1] ?1) | ||
| 355 | ([kp-2] ?2) | ||
| 356 | ([kp-3] ?3) | ||
| 357 | ([kp-4] ?4) | ||
| 358 | ([kp-5] ?5) | ||
| 359 | ([kp-6] ?6) | ||
| 360 | ([kp-7] ?7) | ||
| 361 | ([kp-8] ?8) | ||
| 362 | ([kp-9] ?9) | ||
| 363 | ([kp-0] ?0) | ||
| 364 | ([kp-add] ?+)) | ||
| 365 | 332 | ||
| 366 | (quail-define-package | 333 | (quail-define-package |
| 367 | "czech-prog-2" "Czech" "CZ" t | 334 | "czech-prog-2" "Czech" "CZ" t |
| @@ -440,18 +407,7 @@ All other keys are the same as on standard US keyboard." | |||
| 440 | ("++U" ?Ů) | 407 | ("++U" ?Ů) |
| 441 | ("+++U" ?Ü) | 408 | ("+++U" ?Ü) |
| 442 | ("+Y" ?Ý) | 409 | ("+Y" ?Ý) |
| 443 | ("+Z" ?Ž) | 410 | ("+Z" ?Ž)) |
| 444 | ([kp-1] ?1) | ||
| 445 | ([kp-2] ?2) | ||
| 446 | ([kp-3] ?3) | ||
| 447 | ([kp-4] ?4) | ||
| 448 | ([kp-5] ?5) | ||
| 449 | ([kp-6] ?6) | ||
| 450 | ([kp-7] ?7) | ||
| 451 | ([kp-8] ?8) | ||
| 452 | ([kp-9] ?9) | ||
| 453 | ([kp-0] ?0) | ||
| 454 | ([kp-add] ?+)) | ||
| 455 | 411 | ||
| 456 | (quail-define-package | 412 | (quail-define-package |
| 457 | "czech-prog-3" "Czech" "CZ" t | 413 | "czech-prog-3" "Czech" "CZ" t |
| @@ -552,17 +508,6 @@ All other keys are the same as on standard US keyboard." | |||
| 552 | ("+u" ?ů) | 508 | ("+u" ?ů) |
| 553 | ("+=u" ?ü) | 509 | ("+=u" ?ü) |
| 554 | ("=y" ?ý) | 510 | ("=y" ?ý) |
| 555 | ("+z" ?ž) | 511 | ("+z" ?ž)) |
| 556 | ([kp-1] ?1) | ||
| 557 | ([kp-2] ?2) | ||
| 558 | ([kp-3] ?3) | ||
| 559 | ([kp-4] ?4) | ||
| 560 | ([kp-5] ?5) | ||
| 561 | ([kp-6] ?6) | ||
| 562 | ([kp-7] ?7) | ||
| 563 | ([kp-8] ?8) | ||
| 564 | ([kp-9] ?9) | ||
| 565 | ([kp-0] ?0) | ||
| 566 | ([kp-add] ?+)) | ||
| 567 | 512 | ||
| 568 | ;;; czech.el ends here | 513 | ;;; czech.el ends here |
diff --git a/lisp/leim/quail/slovak.el b/lisp/leim/quail/slovak.el index 4294fd7613b..e00f03fa1f6 100644 --- a/lisp/leim/quail/slovak.el +++ b/lisp/leim/quail/slovak.el | |||
| @@ -151,18 +151,7 @@ | |||
| 151 | ("+7" ?&) | 151 | ("+7" ?&) |
| 152 | ("+8" ?*) | 152 | ("+8" ?*) |
| 153 | ("+9" ?\() | 153 | ("+9" ?\() |
| 154 | ("+0" ?\)) | 154 | ("+0" ?\))) |
| 155 | ([kp-1] ?1) | ||
| 156 | ([kp-2] ?2) | ||
| 157 | ([kp-3] ?3) | ||
| 158 | ([kp-4] ?4) | ||
| 159 | ([kp-5] ?5) | ||
| 160 | ([kp-6] ?6) | ||
| 161 | ([kp-7] ?7) | ||
| 162 | ([kp-8] ?8) | ||
| 163 | ([kp-9] ?9) | ||
| 164 | ([kp-0] ?0) | ||
| 165 | ([kp-add] ?+)) | ||
| 166 | 155 | ||
| 167 | 156 | ||
| 168 | (quail-define-package | 157 | (quail-define-package |
| @@ -245,18 +234,7 @@ All other keys are the same as on standard US keyboard." | |||
| 245 | ("[[[U" ?Ü) | 234 | ("[[[U" ?Ü) |
| 246 | ("[Y" ?Ý) | 235 | ("[Y" ?Ý) |
| 247 | ("[Z" ?Ž) | 236 | ("[Z" ?Ž) |
| 248 | ("[[Z" ?Ž) | 237 | ("[[Z" ?Ž)) |
| 249 | ([kp-1] ?1) | ||
| 250 | ([kp-2] ?2) | ||
| 251 | ([kp-3] ?3) | ||
| 252 | ([kp-4] ?4) | ||
| 253 | ([kp-5] ?5) | ||
| 254 | ([kp-6] ?6) | ||
| 255 | ([kp-7] ?7) | ||
| 256 | ([kp-8] ?8) | ||
| 257 | ([kp-9] ?9) | ||
| 258 | ([kp-0] ?0) | ||
| 259 | ([kp-add] ?+)) | ||
| 260 | 238 | ||
| 261 | 239 | ||
| 262 | (quail-define-package | 240 | (quail-define-package |
| @@ -347,18 +325,7 @@ All other keys are the same as on standard US keyboard." | |||
| 347 | ("+U" ?Ů) | 325 | ("+U" ?Ů) |
| 348 | ("+=U" ?Ü) | 326 | ("+=U" ?Ü) |
| 349 | ("=Y" ?Ý) | 327 | ("=Y" ?Ý) |
| 350 | ("+Z" ?Ž) | 328 | ("+Z" ?Ž)) |
| 351 | ([kp-1] ?1) | ||
| 352 | ([kp-2] ?2) | ||
| 353 | ([kp-3] ?3) | ||
| 354 | ([kp-4] ?4) | ||
| 355 | ([kp-5] ?5) | ||
| 356 | ([kp-6] ?6) | ||
| 357 | ([kp-7] ?7) | ||
| 358 | ([kp-8] ?8) | ||
| 359 | ([kp-9] ?9) | ||
| 360 | ([kp-0] ?0) | ||
| 361 | ([kp-add] ?+)) | ||
| 362 | 329 | ||
| 363 | 330 | ||
| 364 | (quail-define-package | 331 | (quail-define-package |
| @@ -463,17 +430,6 @@ All other keys are the same as on standard US keyboard." | |||
| 463 | ("[Y" ?Ý) | 430 | ("[Y" ?Ý) |
| 464 | ("[Z" ?Ž) | 431 | ("[Z" ?Ž) |
| 465 | ("[[Z" ?Ž) | 432 | ("[[Z" ?Ž) |
| 466 | ("]Z" ?Ž) | 433 | ("]Z" ?Ž)) |
| 467 | ([kp-1] ?1) | ||
| 468 | ([kp-2] ?2) | ||
| 469 | ([kp-3] ?3) | ||
| 470 | ([kp-4] ?4) | ||
| 471 | ([kp-5] ?5) | ||
| 472 | ([kp-6] ?6) | ||
| 473 | ([kp-7] ?7) | ||
| 474 | ([kp-8] ?8) | ||
| 475 | ([kp-9] ?9) | ||
| 476 | ([kp-0] ?0) | ||
| 477 | ([kp-add] ?+)) | ||
| 478 | 434 | ||
| 479 | ;;; slovak.el ends here | 435 | ;;; slovak.el ends here |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 933e2d22f67..a6541182e24 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1263,7 +1263,7 @@ mail status in mode line")) | |||
| 1263 | (defvar menu-bar-search-options-menu | 1263 | (defvar menu-bar-search-options-menu |
| 1264 | (let ((menu (make-sparse-keymap "Search Options"))) | 1264 | (let ((menu (make-sparse-keymap "Search Options"))) |
| 1265 | 1265 | ||
| 1266 | (dolist (x '((character-fold-to-regexp "Fold Characters" "Character folding") | 1266 | (dolist (x '((char-fold-to-regexp "Fold Characters" "Character folding") |
| 1267 | (isearch-symbol-regexp "Whole Symbols" "Whole symbol") | 1267 | (isearch-symbol-regexp "Whole Symbols" "Whole symbol") |
| 1268 | (word-search-regexp "Whole Words" "Whole word"))) | 1268 | (word-search-regexp "Whole Words" "Whole word"))) |
| 1269 | (bindings--define-key menu (vector (nth 0 x)) | 1269 | (bindings--define-key menu (vector (nth 0 x)) |
diff --git a/lisp/printing.el b/lisp/printing.el index 3bd5a67298d..d9cc2a3614a 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -5673,7 +5673,7 @@ If menu binding was not done, calls `pr-menu-bind'." | |||
| 5673 | (or (listp switches) | 5673 | (or (listp switches) |
| 5674 | (error "%S should have a list of strings" mess)) | 5674 | (error "%S should have a list of strings" mess)) |
| 5675 | (lpr-flatten-list ; dynamic evaluation | 5675 | (lpr-flatten-list ; dynamic evaluation |
| 5676 | (mapcar 'ps-eval-switch switches))) | 5676 | (mapcar #'lpr-eval-switch switches))) |
| 5677 | 5677 | ||
| 5678 | 5678 | ||
| 5679 | (defun pr-ps-preview (kind n-up filename mess) | 5679 | (defun pr-ps-preview (kind n-up filename mess) |
diff --git a/lisp/replace.el b/lisp/replace.el index 0b25200be57..9e2d521baf0 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | :type 'boolean | 33 | :type 'boolean |
| 34 | :group 'matching) | 34 | :group 'matching) |
| 35 | 35 | ||
| 36 | (defcustom replace-character-fold nil | 36 | (defcustom replace-char-fold nil |
| 37 | "Non-nil means replacement commands should do character folding in matches. | 37 | "Non-nil means replacement commands should do character folding in matches. |
| 38 | This means, for instance, that \\=' will match a large variety of | 38 | This means, for instance, that \\=' will match a large variety of |
| 39 | unicode quotes. | 39 | unicode quotes. |
| @@ -324,7 +324,7 @@ If `replace-lax-whitespace' is non-nil, a space or spaces in the string | |||
| 324 | to be replaced will match a sequence of whitespace chars defined by the | 324 | to be replaced will match a sequence of whitespace chars defined by the |
| 325 | regexp in `search-whitespace-regexp'. | 325 | regexp in `search-whitespace-regexp'. |
| 326 | 326 | ||
| 327 | If `replace-character-fold' is non-nil, matching uses character folding, | 327 | If `replace-char-fold' is non-nil, matching uses character folding, |
| 328 | i.e. it ignores diacritics and other differences between equivalent | 328 | i.e. it ignores diacritics and other differences between equivalent |
| 329 | character strings. | 329 | character strings. |
| 330 | 330 | ||
| @@ -383,7 +383,7 @@ If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp | |||
| 383 | to be replaced will match a sequence of whitespace chars defined by the | 383 | to be replaced will match a sequence of whitespace chars defined by the |
| 384 | regexp in `search-whitespace-regexp'. | 384 | regexp in `search-whitespace-regexp'. |
| 385 | 385 | ||
| 386 | This function is not affected by `replace-character-fold'. | 386 | This function is not affected by `replace-char-fold'. |
| 387 | 387 | ||
| 388 | Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace | 388 | Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace |
| 389 | only matches surrounded by word boundaries. A negative prefix arg means | 389 | only matches surrounded by word boundaries. A negative prefix arg means |
| @@ -474,7 +474,7 @@ If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp | |||
| 474 | to be replaced will match a sequence of whitespace chars defined by the | 474 | to be replaced will match a sequence of whitespace chars defined by the |
| 475 | regexp in `search-whitespace-regexp'. | 475 | regexp in `search-whitespace-regexp'. |
| 476 | 476 | ||
| 477 | This function is not affected by `replace-character-fold'. | 477 | This function is not affected by `replace-char-fold'. |
| 478 | 478 | ||
| 479 | Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace | 479 | Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace |
| 480 | only matches that are surrounded by word boundaries. | 480 | only matches that are surrounded by word boundaries. |
| @@ -568,7 +568,7 @@ If `replace-lax-whitespace' is non-nil, a space or spaces in the string | |||
| 568 | to be replaced will match a sequence of whitespace chars defined by the | 568 | to be replaced will match a sequence of whitespace chars defined by the |
| 569 | regexp in `search-whitespace-regexp'. | 569 | regexp in `search-whitespace-regexp'. |
| 570 | 570 | ||
| 571 | If `replace-character-fold' is non-nil, matching uses character folding, | 571 | If `replace-char-fold' is non-nil, matching uses character folding, |
| 572 | i.e. it ignores diacritics and other differences between equivalent | 572 | i.e. it ignores diacritics and other differences between equivalent |
| 573 | character strings. | 573 | character strings. |
| 574 | 574 | ||
| @@ -623,7 +623,7 @@ If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp | |||
| 623 | to be replaced will match a sequence of whitespace chars defined by the | 623 | to be replaced will match a sequence of whitespace chars defined by the |
| 624 | regexp in `search-whitespace-regexp'. | 624 | regexp in `search-whitespace-regexp'. |
| 625 | 625 | ||
| 626 | This function is not affected by `replace-character-fold' | 626 | This function is not affected by `replace-char-fold' |
| 627 | 627 | ||
| 628 | In Transient Mark mode, if the mark is active, operate on the contents | 628 | In Transient Mark mode, if the mark is active, operate on the contents |
| 629 | of the region. Otherwise, operate from point to the end of the buffer's | 629 | of the region. Otherwise, operate from point to the end of the buffer's |
| @@ -2055,9 +2055,9 @@ It is called with three arguments, as if it were | |||
| 2055 | ;; used after `recursive-edit' might override them. | 2055 | ;; used after `recursive-edit' might override them. |
| 2056 | (let* ((isearch-regexp regexp-flag) | 2056 | (let* ((isearch-regexp regexp-flag) |
| 2057 | (isearch-regexp-function (or delimited-flag | 2057 | (isearch-regexp-function (or delimited-flag |
| 2058 | (and replace-character-fold | 2058 | (and replace-char-fold |
| 2059 | (not regexp-flag) | 2059 | (not regexp-flag) |
| 2060 | #'character-fold-to-regexp))) | 2060 | #'char-fold-to-regexp))) |
| 2061 | (isearch-lax-whitespace | 2061 | (isearch-lax-whitespace |
| 2062 | replace-lax-whitespace) | 2062 | replace-lax-whitespace) |
| 2063 | (isearch-regexp-lax-whitespace | 2063 | (isearch-regexp-lax-whitespace |
diff --git a/lisp/ses.el b/lisp/ses.el index a87386e1730..b2fd2bbe9a5 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -3455,9 +3455,18 @@ highlighted range in the spreadsheet." | |||
| 3455 | (setq cell (or cell (ses-get-cell row col)) | 3455 | (setq cell (or cell (ses-get-cell row col)) |
| 3456 | old-name (ses-cell-symbol cell) | 3456 | old-name (ses-cell-symbol cell) |
| 3457 | new-rowcol (ses-decode-cell-symbol (symbol-name new-name))) | 3457 | new-rowcol (ses-decode-cell-symbol (symbol-name new-name))) |
| 3458 | ;; when ses-rename-cell is called interactively, then 'sym' is the | ||
| 3459 | ;; 'cursor-intangible' property of text at cursor position, while | ||
| 3460 | ;; 'old-name' is the symbol stored in array cell at coordinate | ||
| 3461 | ;; 'rowcol' corresponding to 'ses-cell' property of symbol | ||
| 3462 | ;; 'sym'. Both must be the same. | ||
| 3463 | (unless (eq sym old-name) | ||
| 3464 | (error "Spreadsheet is broken, both symbols %S and %S refering to cell (%d,%d)" sym old-name row col)) | ||
| 3458 | (if new-rowcol | 3465 | (if new-rowcol |
| 3466 | ;; the new name is of A1 type, so we test that the coordinate | ||
| 3467 | ;; inferred from new name | ||
| 3459 | (if (equal new-rowcol rowcol) | 3468 | (if (equal new-rowcol rowcol) |
| 3460 | (put new-name 'ses-cell rowcol) | 3469 | (put new-name 'ses-cell rowcol) |
| 3461 | (error "Not a valid name for this cell location")) | 3470 | (error "Not a valid name for this cell location")) |
| 3462 | (setq ses--named-cell-hashmap | 3471 | (setq ses--named-cell-hashmap |
| 3463 | (or ses--named-cell-hashmap (make-hash-table :test 'eq))) | 3472 | (or ses--named-cell-hashmap (make-hash-table :test 'eq))) |
| @@ -3471,7 +3480,7 @@ highlighted range in the spreadsheet." | |||
| 3471 | (setf (ses-cell-formula xcell) | 3480 | (setf (ses-cell-formula xcell) |
| 3472 | (ses-replace-name-in-formula | 3481 | (ses-replace-name-in-formula |
| 3473 | (ses-cell-formula xcell) | 3482 | (ses-cell-formula xcell) |
| 3474 | sym | 3483 | old-name |
| 3475 | new-name)))) | 3484 | new-name)))) |
| 3476 | ;; Replace name by new name in reference list of cells to which renamed | 3485 | ;; Replace name by new name in reference list of cells to which renamed |
| 3477 | ;; cell refers to. | 3486 | ;; cell refers to. |
| @@ -3479,11 +3488,14 @@ highlighted range in the spreadsheet." | |||
| 3479 | (let* ((x (ses-sym-rowcol ref)) | 3488 | (let* ((x (ses-sym-rowcol ref)) |
| 3480 | (xcell (ses-get-cell (car x) (cdr x)))) | 3489 | (xcell (ses-get-cell (car x) (cdr x)))) |
| 3481 | (setf (ses-cell-references xcell) | 3490 | (setf (ses-cell-references xcell) |
| 3482 | (cons new-name (delq sym | 3491 | (cons new-name (delq old-name |
| 3483 | (ses-cell-references xcell)))))) | 3492 | (ses-cell-references xcell)))))) |
| 3484 | (set (make-local-variable new-name) (symbol-value sym)) | 3493 | (set (make-local-variable new-name) (symbol-value sym)) |
| 3485 | (setf (ses-cell--symbol cell) new-name) | 3494 | (setf (ses-cell--symbol cell) new-name) |
| 3486 | (makunbound sym) | 3495 | ;; Unbind old name |
| 3496 | (if (eq (get old-name 'ses-cell) :ses-named) | ||
| 3497 | (ses--unbind-cell-name old-name) | ||
| 3498 | (kill-local-variable old-name)) | ||
| 3487 | (and curcell (setq ses--curcell new-name)) | 3499 | (and curcell (setq ses--curcell new-name)) |
| 3488 | (save-excursion | 3500 | (save-excursion |
| 3489 | (or curcell (ses-goto-print row col)) | 3501 | (or curcell (ses-goto-print row col)) |
diff --git a/lisp/simple.el b/lisp/simple.el index 65664c93666..affc403dcdc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2848,6 +2848,18 @@ buffers that were changed during the last command.") | |||
| 2848 | 2848 | ||
| 2849 | If set to non-nil, this will effectively disable the timer.") | 2849 | If set to non-nil, this will effectively disable the timer.") |
| 2850 | 2850 | ||
| 2851 | (defvar-local undo-auto-disable-boundaries nil | ||
| 2852 | "Disable the automatic addition of boundaries. | ||
| 2853 | |||
| 2854 | If set to non-nil, `undo-boundary' will not be called | ||
| 2855 | automatically in a buffer either at the end of a command, or as a | ||
| 2856 | result of `undo-auto-current-boundary-timer'. | ||
| 2857 | |||
| 2858 | When this is set to non-nil, it is important to ensure that | ||
| 2859 | `undo-boundary' is called frequently enough. Failure to do so | ||
| 2860 | will result in user-visible warnings that the situation is | ||
| 2861 | probably a bug.") | ||
| 2862 | |||
| 2851 | (defvar undo-auto--this-command-amalgamating nil | 2863 | (defvar undo-auto--this-command-amalgamating nil |
| 2852 | "Non-nil if `this-command' should be amalgamated. | 2864 | "Non-nil if `this-command' should be amalgamated. |
| 2853 | This variable is set to nil by `undo-auto--boundaries' and is set | 2865 | This variable is set to nil by `undo-auto--boundaries' and is set |
| @@ -2887,7 +2899,8 @@ REASON describes the reason that the boundary is being added; see | |||
| 2887 | (dolist (b undo-auto--undoably-changed-buffers) | 2899 | (dolist (b undo-auto--undoably-changed-buffers) |
| 2888 | (when (buffer-live-p b) | 2900 | (when (buffer-live-p b) |
| 2889 | (with-current-buffer b | 2901 | (with-current-buffer b |
| 2890 | (undo-auto--ensure-boundary cause)))) | 2902 | (unless undo-auto-disable-boundaries |
| 2903 | (undo-auto--ensure-boundary cause))))) | ||
| 2891 | (setq undo-auto--undoably-changed-buffers nil)) | 2904 | (setq undo-auto--undoably-changed-buffers nil)) |
| 2892 | 2905 | ||
| 2893 | (defun undo-auto--boundary-timer () | 2906 | (defun undo-auto--boundary-timer () |
| @@ -2914,10 +2927,10 @@ See also `undo-auto--buffer-undoably-changed'.") | |||
| 2914 | "Add an `undo-boundary' in appropriate buffers." | 2927 | "Add an `undo-boundary' in appropriate buffers." |
| 2915 | (undo-auto--boundaries | 2928 | (undo-auto--boundaries |
| 2916 | (let ((amal undo-auto--this-command-amalgamating)) | 2929 | (let ((amal undo-auto--this-command-amalgamating)) |
| 2917 | (setq undo-auto--this-command-amalgamating nil) | 2930 | (setq undo-auto--this-command-amalgamating nil) |
| 2918 | (if amal | 2931 | (if amal |
| 2919 | 'amalgamate | 2932 | 'amalgamate |
| 2920 | 'command)))) | 2933 | 'command)))) |
| 2921 | 2934 | ||
| 2922 | (defun undo-auto-amalgamate () | 2935 | (defun undo-auto-amalgamate () |
| 2923 | "Amalgamate undo if necessary. | 2936 | "Amalgamate undo if necessary. |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 5a38ebe8e45..01c01130e7c 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -71,28 +71,29 @@ string bytes that can be copied is 3/4 of this value." | |||
| 71 | (defconst xterm-paste-ending-sequence "\e[201~" | 71 | (defconst xterm-paste-ending-sequence "\e[201~" |
| 72 | "Characters send by the terminal to end a bracketed paste.") | 72 | "Characters send by the terminal to end a bracketed paste.") |
| 73 | 73 | ||
| 74 | (defun xterm--pasted-text () | ||
| 75 | "Handle the rest of a terminal paste operation. | ||
| 76 | Return the pasted text as a string." | ||
| 77 | (let ((end-marker-length (length xterm-paste-ending-sequence))) | ||
| 78 | (with-temp-buffer | ||
| 79 | (set-buffer-multibyte nil) | ||
| 80 | (while (not (search-backward xterm-paste-ending-sequence | ||
| 81 | (- (point) end-marker-length) t)) | ||
| 82 | (let ((event (read-event nil nil | ||
| 83 | ;; Use finite timeout to avoid glomming the | ||
| 84 | ;; event onto this-command-keys. | ||
| 85 | most-positive-fixnum))) | ||
| 86 | (when (eql event ?\r) | ||
| 87 | (setf event ?\n)) | ||
| 88 | (insert event))) | ||
| 89 | (let ((last-coding-system-used)) | ||
| 90 | (decode-coding-region (point-min) (point) (keyboard-coding-system) | ||
| 91 | t))))) | ||
| 92 | |||
| 74 | (defun xterm-paste () | 93 | (defun xterm-paste () |
| 75 | "Handle the start of a terminal paste operation." | 94 | "Handle the start of a terminal paste operation." |
| 76 | (interactive) | 95 | (interactive) |
| 77 | (let* ((end-marker-length (length xterm-paste-ending-sequence)) | 96 | (let* ((pasted-text (xterm--pasted-text)) |
| 78 | (pasted-text (with-temp-buffer | ||
| 79 | (set-buffer-multibyte nil) | ||
| 80 | (while (not (search-backward | ||
| 81 | xterm-paste-ending-sequence | ||
| 82 | (- (point) end-marker-length) t)) | ||
| 83 | (let ((event (read-event | ||
| 84 | nil nil | ||
| 85 | ;; Use finite timeout to avoid | ||
| 86 | ;; glomming the event onto | ||
| 87 | ;; this-command-keys. | ||
| 88 | most-positive-fixnum))) | ||
| 89 | (when (eql event ?\r) | ||
| 90 | (setf event ?\n)) | ||
| 91 | (insert event))) | ||
| 92 | (let ((last-coding-system-used)) | ||
| 93 | (decode-coding-region | ||
| 94 | (point-min) (point) | ||
| 95 | (keyboard-coding-system) t)))) | ||
| 96 | (interprogram-paste-function (lambda () pasted-text))) | 97 | (interprogram-paste-function (lambda () pasted-text))) |
| 97 | (yank))) | 98 | (yank))) |
| 98 | 99 | ||
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index dfe6b293e94..50198713b41 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -127,7 +127,7 @@ This is only meaningful if you don't use the implicit checkout model | |||
| 127 | :version "21.1" | 127 | :version "21.1" |
| 128 | :group 'vc-cvs) | 128 | :group 'vc-cvs) |
| 129 | 129 | ||
| 130 | (defcustom vc-stay-local 'only-file | 130 | (defcustom vc-cvs-stay-local 'only-file |
| 131 | "Non-nil means use local operations when possible for remote repositories. | 131 | "Non-nil means use local operations when possible for remote repositories. |
| 132 | This avoids slow queries over the network and instead uses heuristics | 132 | This avoids slow queries over the network and instead uses heuristics |
| 133 | and past information to determine the current status of a file. | 133 | and past information to determine the current status of a file. |
| @@ -137,11 +137,11 @@ server, but heuristics will be used to determine the status for | |||
| 137 | all other VC operations. | 137 | all other VC operations. |
| 138 | 138 | ||
| 139 | The value can also be a regular expression or list of regular | 139 | The value can also be a regular expression or list of regular |
| 140 | expressions to match against the host name of a repository; then VC | 140 | expressions to match against the host name of a repository; then |
| 141 | only stays local for hosts that match it. Alternatively, the value | 141 | vc-cvs only stays local for hosts that match it. Alternatively, |
| 142 | can be a list of regular expressions where the first element is the | 142 | the value can be a list of regular expressions where the first |
| 143 | symbol `except'; then VC always stays local except for hosts matched | 143 | element is the symbol `except'; then vc-cvs always stays local |
| 144 | by these regular expressions." | 144 | except for hosts matched by these regular expressions." |
| 145 | :type '(choice (const :tag "Always stay local" t) | 145 | :type '(choice (const :tag "Always stay local" t) |
| 146 | (const :tag "Only for file operations" only-file) | 146 | (const :tag "Only for file operations" only-file) |
| 147 | (const :tag "Don't stay local" nil) | 147 | (const :tag "Don't stay local" nil) |
| @@ -795,8 +795,7 @@ If FILE is a list of files, return non-nil if any of them | |||
| 795 | individually should stay local." | 795 | individually should stay local." |
| 796 | (if (listp file) | 796 | (if (listp file) |
| 797 | (delq nil (mapcar (lambda (arg) (vc-cvs-stay-local-p arg)) file)) | 797 | (delq nil (mapcar (lambda (arg) (vc-cvs-stay-local-p arg)) file)) |
| 798 | (let* ((sym (vc-make-backend-sym 'CVS 'stay-local)) | 798 | (let ((stay-local vc-cvs-stay-local)) |
| 799 | (stay-local (if (boundp sym) (symbol-value sym) vc-stay-local))) | ||
| 800 | (if (symbolp stay-local) stay-local | 799 | (if (symbolp stay-local) stay-local |
| 801 | (let ((dirname (if (file-directory-p file) | 800 | (let ((dirname (if (file-directory-p file) |
| 802 | (directory-file-name file) | 801 | (directory-file-name file) |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 25b41e34e64..af875e89907 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -552,7 +552,7 @@ | |||
| 552 | ;; argument, since on no system since RCS has setting the initial | 552 | ;; argument, since on no system since RCS has setting the initial |
| 553 | ;; revision been even possible, let alone sane. | 553 | ;; revision been even possible, let alone sane. |
| 554 | ;; | 554 | ;; |
| 555 | ;; INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did | 555 | ;; - INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did |
| 556 | ;; not take an async-mode flag as a fourth optional argument. (This | 556 | ;; not take an async-mode flag as a fourth optional argument. (This |
| 557 | ;; change eliminated a particularly ugly global.) | 557 | ;; change eliminated a particularly ugly global.) |
| 558 | ;; | 558 | ;; |
| @@ -563,12 +563,12 @@ | |||
| 563 | ;; SVN.) | 563 | ;; SVN.) |
| 564 | ;; | 564 | ;; |
| 565 | ;; - INCOMPATIBLE CHANGE: The old fourth 'default-state' argument of | 565 | ;; - INCOMPATIBLE CHANGE: The old fourth 'default-state' argument of |
| 566 | ;; vc-dir-status-files is gone; none of the back ends actually used it. | 566 | ;; dir-status-files is gone; none of the back ends actually used it. |
| 567 | ;; | 567 | ;; |
| 568 | ;; - vc-dir-status is no longer a public method; it has been replaced | 568 | ;; - dir-status is no longer a public method; it has been replaced by |
| 569 | ;; by vc-dir-status-files. | 569 | ;; dir-status-files. |
| 570 | ;; | 570 | ;; |
| 571 | ;; - vc-state-heuristic is no longer a public method (the CVS backend | 571 | ;; - state-heuristic is no longer a public method (the CVS backend |
| 572 | ;; retains it as a private one). | 572 | ;; retains it as a private one). |
| 573 | ;; | 573 | ;; |
| 574 | ;; - the vc-mistrust-permissions configuration variable is gone; the | 574 | ;; - the vc-mistrust-permissions configuration variable is gone; the |
| @@ -577,8 +577,8 @@ | |||
| 577 | ;; only affected back ends were SCCS and RCS. | 577 | ;; only affected back ends were SCCS and RCS. |
| 578 | ;; | 578 | ;; |
| 579 | ;; - vc-stay-local-p and repository-hostname are no longer part | 579 | ;; - vc-stay-local-p and repository-hostname are no longer part |
| 580 | ;; of the public API. The vc-stay-local configuration variable | 580 | ;; of the public API. The vc-cvs-stay-local configuration variable |
| 581 | ;; remains but only affects the CVS back end. | 581 | ;; remains and only affects the CVS back end. |
| 582 | ;; | 582 | ;; |
| 583 | ;; - The init-revision function and the default-initial-revision | 583 | ;; - The init-revision function and the default-initial-revision |
| 584 | ;; variable are gone. These have't made sense on anything shipped | 584 | ;; variable are gone. These have't made sense on anything shipped |
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 4815f4b8c21..91c02530427 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el | |||
| @@ -31,9 +31,9 @@ | |||
| 31 | 31 | ||
| 32 | ;;;; Function keys | 32 | ;;;; Function keys |
| 33 | 33 | ||
| 34 | (declare-function set-message-beep "w32fns.c") | 34 | (declare-function set-message-beep "w32fns.c" (sound)) |
| 35 | (declare-function w32-get-locale-info "w32proc.c") | 35 | (declare-function w32-get-locale-info "w32proc.c" (lcid &optional longform)) |
| 36 | (declare-function w32-get-valid-locale-ids "w32proc.c") | 36 | (declare-function w32-get-valid-locale-ids "w32proc.c" ()) |
| 37 | 37 | ||
| 38 | ;; Map all versions of a filename (8.3, longname, mixed case) to the | 38 | ;; Map all versions of a filename (8.3, longname, mixed case) to the |
| 39 | ;; same buffer. | 39 | ;; same buffer. |
diff --git a/src/xfaces.c b/src/xfaces.c index 93d1c471407..3ced1d483c3 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -2677,9 +2677,10 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2677 | { | 2677 | { |
| 2678 | if (NILP (frame)) | 2678 | if (NILP (frame)) |
| 2679 | frame = selected_frame; | 2679 | frame = selected_frame; |
| 2680 | f = XFRAME (frame); | ||
| 2681 | 2680 | ||
| 2682 | CHECK_LIVE_FRAME (frame); | 2681 | CHECK_LIVE_FRAME (frame); |
| 2682 | f = XFRAME (frame); | ||
| 2683 | |||
| 2683 | lface = lface_from_face_name (f, face, false); | 2684 | lface = lface_from_face_name (f, face, false); |
| 2684 | 2685 | ||
| 2685 | /* If a frame-local face doesn't exist yet, create one. */ | 2686 | /* If a frame-local face doesn't exist yet, create one. */ |
diff --git a/src/xftfont.c b/src/xftfont.c index 7926325419c..34c6f7d3e42 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -395,6 +395,24 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) | |||
| 395 | 395 | ||
| 396 | font->ascent = xftfont->ascent; | 396 | font->ascent = xftfont->ascent; |
| 397 | font->descent = xftfont->descent; | 397 | font->descent = xftfont->descent; |
| 398 | /* The following workaround is unnecessary on most systems, and | ||
| 399 | causes annoying differences in glyph height between regular and | ||
| 400 | bold fonts (see bug#22383). However, with some fonts, such as | ||
| 401 | monaco, removing the workaround results in overlapping vertical | ||
| 402 | space of a line, see bug#23360. As long as the way to reconcile | ||
| 403 | these opposites is not known, we provide a user option to work | ||
| 404 | around the problem. */ | ||
| 405 | if (pixel_size >= 5 | ||
| 406 | && xft_font_ascent_descent_override) | ||
| 407 | { | ||
| 408 | /* The above condition is a dirty workaround because | ||
| 409 | XftTextExtents8 behaves strangely for some fonts | ||
| 410 | (e.g. "Dejavu Sans Mono") when pixel_size is less than 5. */ | ||
| 411 | if (font->ascent < extents.y) | ||
| 412 | font->ascent = extents.y; | ||
| 413 | if (font->descent < extents.height - extents.y) | ||
| 414 | font->descent = extents.height - extents.y; | ||
| 415 | } | ||
| 398 | font->height = font->ascent + font->descent; | 416 | font->height = font->ascent + font->descent; |
| 399 | 417 | ||
| 400 | if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0) | 418 | if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0) |
| @@ -733,6 +751,12 @@ syms_of_xftfont (void) | |||
| 733 | DEFSYM (QCembolden, ":embolden"); | 751 | DEFSYM (QCembolden, ":embolden"); |
| 734 | DEFSYM (QClcdfilter, ":lcdfilter"); | 752 | DEFSYM (QClcdfilter, ":lcdfilter"); |
| 735 | 753 | ||
| 754 | DEFVAR_BOOL ("xft-font-ascent-descent-override", | ||
| 755 | xft_font_ascent_descent_override, | ||
| 756 | doc: /* Non-nil means override the ascent and descent values for Xft font driver. | ||
| 757 | This is needed with some fonts to correct vertical overlap of glyphs. */); | ||
| 758 | xft_font_ascent_descent_override = 0; | ||
| 759 | |||
| 736 | ascii_printable[0] = 0; | 760 | ascii_printable[0] = 0; |
| 737 | 761 | ||
| 738 | xftfont_driver = ftfont_driver; | 762 | xftfont_driver = ftfont_driver; |
diff --git a/test/automated/viper-tests.el b/test/automated/viper-tests.el new file mode 100644 index 00000000000..8b30f050935 --- /dev/null +++ b/test/automated/viper-tests.el | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | ;;; viper-tests.el --- tests for viper. | ||
| 2 | |||
| 3 | ;; Copyright (C) 2016 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | |||
| 22 | ;;; Code: | ||
| 23 | |||
| 24 | |||
| 25 | (require 'viper) | ||
| 26 | |||
| 27 | (defun viper-test-undo-kmacro (kmacro) | ||
| 28 | "In a clean viper buffer, run KMACRO and return `buffer-string'. | ||
| 29 | |||
| 30 | This function makes as many attempts as possible to clean up | ||
| 31 | after itself, although it will leave a buffer called | ||
| 32 | *viper-test-buffer* if it fails (this is deliberate!)." | ||
| 33 | (let ( | ||
| 34 | ;; Viper just turns itself off during batch use. | ||
| 35 | (noninteractive nil) | ||
| 36 | ;; Switch off start up message or it will chew the key presses | ||
| 37 | (viper-inhibit-startup-message 't) | ||
| 38 | ;; Select an expert-level for the same reason. | ||
| 39 | (viper-expert-level 5) | ||
| 40 | ;; viper loads this even with -q so make sure it's empty! | ||
| 41 | (viper-custom-file-name (make-temp-file "viper-tests")) | ||
| 42 | (before-buffer (current-buffer))) | ||
| 43 | (unwind-protect | ||
| 44 | (progn | ||
| 45 | ;; viper-mode is essentially global, so set it here | ||
| 46 | (viper-mode) | ||
| 47 | ;; We must switch to buffer because we are using a keyboard macro | ||
| 48 | ;; which appears to not go to the current-buffer but what ever is | ||
| 49 | ;; currently taking keyboard events. We use a named buffer because | ||
| 50 | ;; then we can see what it in it if it all goes wrong. | ||
| 51 | (switch-to-buffer | ||
| 52 | (get-buffer-create | ||
| 53 | "*viper-test-buffer*")) | ||
| 54 | (erase-buffer) | ||
| 55 | ;; The new buffer fails to enter vi state so set it. | ||
| 56 | (viper-change-state-to-vi) | ||
| 57 | ;; Run the macro | ||
| 58 | (execute-kbd-macro kmacro) | ||
| 59 | (let ((rtn | ||
| 60 | (buffer-substring-no-properties | ||
| 61 | (point-min) | ||
| 62 | (point-max)))) | ||
| 63 | ;; Kill the buffer iff the macro succeeds | ||
| 64 | (kill-buffer) | ||
| 65 | rtn)) | ||
| 66 | ;; switch everthing off and restore the buffer | ||
| 67 | (toggle-viper-mode) | ||
| 68 | (switch-to-buffer before-buffer)))) | ||
| 69 | |||
| 70 | (ert-deftest viper-test-go () | ||
| 71 | "Test that this file is running." | ||
| 72 | (should t)) | ||
| 73 | |||
| 74 | (ert-deftest viper-test-fix () | ||
| 75 | "Test that the viper kmacro fixture is working." | ||
| 76 | (should | ||
| 77 | (viper-test-undo-kmacro []))) | ||
| 78 | |||
| 79 | (ert-deftest viper-test-undo-1 () | ||
| 80 | "Test for VI like undo behaviour. | ||
| 81 | |||
| 82 | Insert 1, then 2 on consecutive lines, followed by undo. This | ||
| 83 | should leave just 1 in the buffer. | ||
| 84 | |||
| 85 | Test for Bug #22295" | ||
| 86 | (should | ||
| 87 | (equal | ||
| 88 | "1\n" | ||
| 89 | (viper-test-undo-kmacro | ||
| 90 | [ | ||
| 91 | ?a | ||
| 92 | ?1 | ||
| 93 | escape | ||
| 94 | ?o | ||
| 95 | ?2 | ||
| 96 | escape | ||
| 97 | ?u | ||
| 98 | ] | ||
| 99 | )))) | ||
| 100 | |||
| 101 | (ert-deftest viper-test-undo-2 () | ||
| 102 | "Test for VI like undo behaviour. | ||
| 103 | |||
| 104 | Insert \"1 2 3 4 5\" then delete the 2, then the 4, and undo. | ||
| 105 | Should restore the 4, but leave the 2 deleted. | ||
| 106 | |||
| 107 | Test for Bug #22295" | ||
| 108 | (should | ||
| 109 | (equal | ||
| 110 | "1 3 4 5\n" | ||
| 111 | (viper-test-undo-kmacro | ||
| 112 | [ | ||
| 113 | ?i | ||
| 114 | ?1 ? ?2 ? ?3 ? ?4 ? ?5 | ||
| 115 | escape | ||
| 116 | ?F ?2 ?d ?w | ||
| 117 | ?w ?d ?w | ||
| 118 | ?u | ||
| 119 | ])))) | ||
| 120 | |||
| 121 | (ert-deftest viper-test-undo-3 () | ||
| 122 | "Test for VI like undo behaviour. | ||
| 123 | |||
| 124 | Insert \"1 2 3 4 5 6\", delete the 2, then the 3 4 and 5. | ||
| 125 | Should restore the 3 4 and 5 but not the 2. | ||
| 126 | |||
| 127 | Test for Bug #22295" | ||
| 128 | (should | ||
| 129 | (equal | ||
| 130 | "1 3 4 5 6\n" | ||
| 131 | (viper-test-undo-kmacro | ||
| 132 | [ | ||
| 133 | ;; Insert this lot. | ||
| 134 | ?i ?1 ? ?2 ? ?3 ? ?4 ? ?5 ? ?6 | ||
| 135 | escape | ||
| 136 | ;; Start of line. | ||
| 137 | ?0 | ||
| 138 | ;; Move to 2, delete | ||
| 139 | ?w ?d ?w | ||
| 140 | ;; Delete 3 4 5 | ||
| 141 | ?. ?. ?. | ||
| 142 | ;; Undo del 5, then | ||
| 143 | ?u ?. ?. | ||
| 144 | ])))) | ||
| 145 | |||
| 146 | |||
| 147 | (ert-deftest viper-test-undo-4() | ||
| 148 | (should | ||
| 149 | (equal | ||
| 150 | "" | ||
| 151 | (viper-test-undo-kmacro | ||
| 152 | [ | ||
| 153 | ?i ?1 escape | ||
| 154 | ?o ?2 escape | ||
| 155 | ?o ?3 escape | ||
| 156 | ?u ?. ?. | ||
| 157 | ]) | ||
| 158 | ))) | ||
| 159 | |||
| 160 | ;;; viper-tests.el ends here | ||
diff --git a/test/lisp/char-fold-tests.el b/test/lisp/char-fold-tests.el new file mode 100644 index 00000000000..485254aa6cf --- /dev/null +++ b/test/lisp/char-fold-tests.el | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | ;;; char-fold-tests.el --- Tests for char-fold.el -*- lexical-binding: t; -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2013-2016 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Artur Malabarba <bruce.connor.am@gmail.com> | ||
| 6 | |||
| 7 | ;; This program is free software; you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; This program is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Code: | ||
| 21 | |||
| 22 | (require 'ert) | ||
| 23 | (require 'char-fold) | ||
| 24 | |||
| 25 | (defun char-fold--random-word (n) | ||
| 26 | (mapconcat (lambda (_) (string (+ 9 (random 117)))) | ||
| 27 | (make-list n nil) "")) | ||
| 28 | |||
| 29 | (defun char-fold--test-search-with-contents (contents string) | ||
| 30 | (with-temp-buffer | ||
| 31 | (insert contents) | ||
| 32 | (goto-char (point-min)) | ||
| 33 | (should (search-forward-regexp (char-fold-to-regexp string) nil 'noerror)) | ||
| 34 | (goto-char (point-min)) | ||
| 35 | (should (char-fold-search-forward string nil 'noerror)) | ||
| 36 | (should (char-fold-search-backward string nil 'noerror)))) | ||
| 37 | |||
| 38 | |||
| 39 | (ert-deftest char-fold--test-consistency () | ||
| 40 | (dotimes (n 30) | ||
| 41 | (let ((w (char-fold--random-word n))) | ||
| 42 | ;; A folded string should always match the original string. | ||
| 43 | (char-fold--test-search-with-contents w w)))) | ||
| 44 | |||
| 45 | (ert-deftest char-fold--test-lax-whitespace () | ||
| 46 | (dotimes (n 40) | ||
| 47 | (let ((w1 (char-fold--random-word n)) | ||
| 48 | (w2 (char-fold--random-word n)) | ||
| 49 | (search-spaces-regexp "\\s-+")) | ||
| 50 | (char-fold--test-search-with-contents | ||
| 51 | (concat w1 "\s\n\s\t\f\t\n\r\t" w2) | ||
| 52 | (concat w1 " " w2)) | ||
| 53 | (char-fold--test-search-with-contents | ||
| 54 | (concat w1 "\s\n\s\t\f\t\n\r\t" w2) | ||
| 55 | (concat w1 (make-string 10 ?\s) w2))))) | ||
| 56 | |||
| 57 | (defun char-fold--test-match-exactly (string &rest strings-to-match) | ||
| 58 | (let ((re (concat "\\`" (char-fold-to-regexp string) "\\'"))) | ||
| 59 | (dolist (it strings-to-match) | ||
| 60 | (should (string-match re it))) | ||
| 61 | ;; Case folding | ||
| 62 | (let ((case-fold-search t)) | ||
| 63 | (dolist (it strings-to-match) | ||
| 64 | (should (string-match (upcase re) (downcase it))) | ||
| 65 | (should (string-match (downcase re) (upcase it))))))) | ||
| 66 | |||
| 67 | (ert-deftest char-fold--test-some-defaults () | ||
| 68 | (dolist (it '(("ffl" . "ffl") ("ffi" . "ffi") | ||
| 69 | ("fi" . "fi") ("ff" . "ff") | ||
| 70 | ("ä" . "ä"))) | ||
| 71 | (char-fold--test-search-with-contents (cdr it) (car it)) | ||
| 72 | (let ((multi (char-table-extra-slot char-fold-table 0)) | ||
| 73 | (char-fold-table (make-char-table 'char-fold-table))) | ||
| 74 | (set-char-table-extra-slot char-fold-table 0 multi) | ||
| 75 | (char-fold--test-match-exactly (car it) (cdr it))))) | ||
| 76 | |||
| 77 | (ert-deftest char-fold--test-fold-to-regexp () | ||
| 78 | (let ((char-fold-table (make-char-table 'char-fold-table)) | ||
| 79 | (multi (make-char-table 'char-fold-table))) | ||
| 80 | (set-char-table-extra-slot char-fold-table 0 multi) | ||
| 81 | (aset char-fold-table ?a "xx") | ||
| 82 | (aset char-fold-table ?1 "44") | ||
| 83 | (aset char-fold-table ?\s "-!-") | ||
| 84 | (char-fold--test-match-exactly "a1a1" "xx44xx44") | ||
| 85 | (char-fold--test-match-exactly "a1 a 1" "xx44-!--!-xx-!-44") | ||
| 86 | (aset multi ?a '(("1" . "99") | ||
| 87 | ("2" . "88") | ||
| 88 | ("12" . "77"))) | ||
| 89 | (char-fold--test-match-exactly "a" "xx") | ||
| 90 | (char-fold--test-match-exactly "a1" "xx44" "99") | ||
| 91 | (char-fold--test-match-exactly "a12" "77" "xx442" "992") | ||
| 92 | (char-fold--test-match-exactly "a2" "88") | ||
| 93 | (aset multi ?1 '(("2" . "yy"))) | ||
| 94 | (char-fold--test-match-exactly "a1" "xx44" "99") | ||
| 95 | (char-fold--test-match-exactly "a12" "77" "xx442" "992") | ||
| 96 | ;; Support for this case is disabled. See function definition or: | ||
| 97 | ;; https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02562.html | ||
| 98 | ;; (char-fold--test-match-exactly "a12" "xxyy") | ||
| 99 | )) | ||
| 100 | |||
| 101 | (ert-deftest char-fold--speed-test () | ||
| 102 | (dolist (string (append '("tty-set-up-initial-frame-face" | ||
| 103 | "tty-set-up-initial-frame-face-frame-faceframe-faceframe-faceframe-face") | ||
| 104 | (mapcar #'char-fold--random-word '(10 50 100 | ||
| 105 | 50 100)))) | ||
| 106 | (message "Testing %s" string) | ||
| 107 | ;; Make sure we didn't just fallback on the trivial search. | ||
| 108 | (should-not (string= (regexp-quote string) | ||
| 109 | (char-fold-to-regexp string))) | ||
| 110 | (with-temp-buffer | ||
| 111 | (save-excursion (insert string)) | ||
| 112 | (let ((time (time-to-seconds (current-time)))) | ||
| 113 | ;; Our initial implementation of case-folding in char-folding | ||
| 114 | ;; created a lot of redundant paths in the regexp. Because of | ||
| 115 | ;; that, if a really long string "almost" matches, the regexp | ||
| 116 | ;; engine took a long time to realize that it doesn't match. | ||
| 117 | (should-not (char-fold-search-forward (concat string "c") nil 'noerror)) | ||
| 118 | ;; Ensure it took less than a second. | ||
| 119 | (should (< (- (time-to-seconds (current-time)) | ||
| 120 | time) | ||
| 121 | 1)))))) | ||
| 122 | |||
| 123 | (provide 'char-fold-tests) | ||
| 124 | ;;; char-fold-tests.el ends here | ||
diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 70e129cc4f5..c7a5cc7af22 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el | |||
| @@ -475,8 +475,15 @@ Must called from within a `tar-mode' buffer." | |||
| 475 | (package-initialize) | 475 | (package-initialize) |
| 476 | (package-import-keyring keyring) | 476 | (package-import-keyring keyring) |
| 477 | (package-refresh-contents) | 477 | (package-refresh-contents) |
| 478 | (should (package-install 'signed-good)) | 478 | (let ((package-check-signature 'allow-unsigned)) |
| 479 | (should-error (package-install 'signed-bad)) | 479 | (should (package-install 'signed-good)) |
| 480 | (should-error (package-install 'signed-bad))) | ||
| 481 | (let ((package-check-signature t)) | ||
| 482 | (should (package-install 'signed-good)) | ||
| 483 | (should-error (package-install 'signed-bad))) | ||
| 484 | (let ((package-check-signature nil)) | ||
| 485 | (should (package-install 'signed-good)) | ||
| 486 | (should (package-install 'signed-bad))) | ||
| 480 | ;; Check if the installed package status is updated. | 487 | ;; Check if the installed package status is updated. |
| 481 | (let ((buf (package-list-packages))) | 488 | (let ((buf (package-list-packages))) |
| 482 | (package-menu-refresh) | 489 | (package-menu-refresh) |
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 9ca5ac53333..0a292336f35 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -4,18 +4,18 @@ | |||
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| 7 | ;; This program is free software: you can redistribute it and/or | 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| 8 | ;; modify it under the terms of the GNU General Public License as | 8 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; published by the Free Software Foundation, either version 3 of the | 9 | ;; the Free Software Foundation, either version 3 of the License, or |
| 10 | ;; License, or (at your option) any later version. | 10 | ;; (at your option) any later version. |
| 11 | ;; | 11 | |
| 12 | ;; This program is distributed in the hope that it will be useful, but | 12 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 13 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | ;; General Public License for more details. | 15 | ;; GNU General Public License for more details. |
| 16 | ;; | 16 | |
| 17 | ;; You should have received a copy of the GNU General Public License | 17 | ;; You should have received a copy of the GNU General Public License |
| 18 | ;; along with this program. If not, see `http://www.gnu.org/licenses/'. | 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 19 | 19 | ||
| 20 | ;;; Commentary: | 20 | ;;; Commentary: |
| 21 | 21 | ||