diff options
| author | Daniel Colascione | 2014-04-07 13:54:16 -0700 |
|---|---|---|
| committer | Daniel Colascione | 2014-04-07 13:54:16 -0700 |
| commit | 7e31acf6b81fdce7258077645bc239767c484841 (patch) | |
| tree | 1f0d7b063a19b54982550797df063e0a9f87eaed | |
| parent | 608a4502b9fa8f5681368657fba5d5fd0fa46817 (diff) | |
| parent | e3b838807bf9fbbbec9826de6c1e4efdf72acb78 (diff) | |
| download | emacs-7e31acf6b81fdce7258077645bc239767c484841.tar.gz emacs-7e31acf6b81fdce7258077645bc239767c484841.zip | |
Merge from emacs-24; up to 2014-04-01T20:18:12Z!eggert@cs.ucla.edu
37 files changed, 807 insertions, 223 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-04-03 Ken Brown <kbrown@cornell.edu> | ||
| 2 | |||
| 3 | * configure.ac (EMACS_MANIFEST, UPDATE_MANIFEST): Leave these | ||
| 4 | variables empty on Cygwin. (Bug#17176) | ||
| 5 | |||
| 1 | 2014-04-03 Glenn Morris <rgm@gnu.org> | 6 | 2014-04-03 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * make-dist: Further update AC_INIT regexp. | 8 | * make-dist: Further update AC_INIT regexp. |
diff --git a/configure.ac b/configure.ac index 9ad24630784..be2221d62fd 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1835,11 +1835,6 @@ if test "${HAVE_W32}" = "yes"; then | |||
| 1835 | W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" | 1835 | W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" |
| 1836 | W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o" | 1836 | W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o" |
| 1837 | EMACSRES="emacs.res" | 1837 | EMACSRES="emacs.res" |
| 1838 | case "$canonical" in | ||
| 1839 | x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;; | ||
| 1840 | *) EMACS_MANIFEST="emacs-x86.manifest" ;; | ||
| 1841 | esac | ||
| 1842 | UPDATE_MANIFEST=update-game-score.exe.manifest | ||
| 1843 | if test "${opsys}" = "cygwin"; then | 1838 | if test "${opsys}" = "cygwin"; then |
| 1844 | W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" | 1839 | W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" |
| 1845 | W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" | 1840 | W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" |
| @@ -1847,6 +1842,11 @@ if test "${HAVE_W32}" = "yes"; then | |||
| 1847 | # the rc file), not a linker script. | 1842 | # the rc file), not a linker script. |
| 1848 | W32_RES_LINK="-Wl,emacs.res" | 1843 | W32_RES_LINK="-Wl,emacs.res" |
| 1849 | else | 1844 | else |
| 1845 | case "$canonical" in | ||
| 1846 | x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;; | ||
| 1847 | *) EMACS_MANIFEST="emacs-x86.manifest" ;; | ||
| 1848 | esac | ||
| 1849 | UPDATE_MANIFEST=update-game-score.exe.manifest | ||
| 1850 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" | 1850 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" |
| 1851 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" | 1851 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" |
| 1852 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" | 1852 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 507d9cb427a..f8cb233bb19 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2014-04-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * trouble.texi (Checklist): Dribble files may contain passwords. | ||
| 4 | |||
| 5 | 2014-04-04 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * files.texi (Backup Names): | ||
| 8 | * arevert-xtra.texi (Supporting additional buffers): | ||
| 9 | Update for default values of some -function vars no longer being nil. | ||
| 10 | (Supporting additional buffers): | ||
| 11 | Update for buffer-stale-function also applying to file-buffers. | ||
| 12 | |||
| 1 | 2014-03-28 Glenn Morris <rgm@gnu.org> | 13 | 2014-03-28 Glenn Morris <rgm@gnu.org> |
| 2 | 14 | ||
| 3 | * custom.texi (Terminal Init): Mention term-file-aliases. | 15 | * custom.texi (Terminal Init): Mention term-file-aliases. |
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi index a13f59b69bd..dcb73bc96de 100644 --- a/doc/emacs/arevert-xtra.texi +++ b/doc/emacs/arevert-xtra.texi | |||
| @@ -103,15 +103,15 @@ arguments to list only some of the files. @file{*Find*} and | |||
| 103 | This section is intended for Elisp programmers who would like to add | 103 | This section is intended for Elisp programmers who would like to add |
| 104 | support for auto-reverting new types of buffers. | 104 | support for auto-reverting new types of buffers. |
| 105 | 105 | ||
| 106 | To support auto-reverting the buffer must first of all have a | 106 | To support auto-reverting the buffer must first of all have a suitable |
| 107 | @code{revert-buffer-function}. @xref{Definition of | 107 | @code{revert-buffer-function}. @xref{Definition of |
| 108 | revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}. | 108 | revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}. |
| 109 | 109 | ||
| 110 | In addition, it @emph{must} have a @code{buffer-stale-function}. | 110 | In addition, it must have a suitable @code{buffer-stale-function}. |
| 111 | 111 | ||
| 112 | @c FIXME only defvar in all of doc/emacs! | 112 | @c FIXME only defvar in all of doc/emacs! |
| 113 | @defvar buffer-stale-function | 113 | @defvar buffer-stale-function |
| 114 | The value of this variable is a function to check whether a non-file | 114 | The value of this variable is a function to check whether a |
| 115 | buffer needs reverting. This should be a function with one optional | 115 | buffer needs reverting. This should be a function with one optional |
| 116 | argument @var{noconfirm}. The function should return non-@code{nil} | 116 | argument @var{noconfirm}. The function should return non-@code{nil} |
| 117 | if the buffer should be reverted. The buffer is current when this | 117 | if the buffer should be reverted. The buffer is current when this |
| @@ -132,7 +132,7 @@ If you just want to automatically auto-revert every | |||
| 132 | @code{auto-revert-interval} seconds (like the Buffer Menu), use: | 132 | @code{auto-revert-interval} seconds (like the Buffer Menu), use: |
| 133 | 133 | ||
| 134 | @example | 134 | @example |
| 135 | (set (make-local-variable 'buffer-stale-function) | 135 | (setq-local buffer-stale-function |
| 136 | #'(lambda (&optional noconfirm) 'fast)) | 136 | #'(lambda (&optional noconfirm) 'fast)) |
| 137 | @end example | 137 | @end example |
| 138 | 138 | ||
| @@ -149,7 +149,7 @@ also be useful if the function is consulted for purposes other than | |||
| 149 | auto-reverting. | 149 | auto-reverting. |
| 150 | @end defvar | 150 | @end defvar |
| 151 | 151 | ||
| 152 | Once the buffer has a @code{revert-buffer-function} and a | 152 | Once the buffer has a suitable @code{revert-buffer-function} and |
| 153 | @code{buffer-stale-function}, several problems usually remain. | 153 | @code{buffer-stale-function}, several problems usually remain. |
| 154 | 154 | ||
| 155 | The buffer will only auto-revert if it is marked unmodified. Hence, | 155 | The buffer will only auto-revert if it is marked unmodified. Hence, |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 3b9aefa332b..9310c44f1e6 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -594,8 +594,8 @@ directory. Emacs creates the directory, if necessary, to make the | |||
| 594 | backup. | 594 | backup. |
| 595 | 595 | ||
| 596 | @vindex make-backup-file-name-function | 596 | @vindex make-backup-file-name-function |
| 597 | If you define the variable @code{make-backup-file-name-function} to | 597 | If you set the variable @code{make-backup-file-name-function} to |
| 598 | a suitable Lisp function, that overrides the usual way Emacs | 598 | a suitable Lisp function, you can override the usual way Emacs |
| 599 | constructs backup file names. | 599 | constructs backup file names. |
| 600 | 600 | ||
| 601 | @node Backup Deletion | 601 | @node Backup Deletion |
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index e7bff6c28a4..52e5b9c4045 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -759,7 +759,9 @@ customizations. | |||
| 759 | One way to record the input to Emacs precisely is to write a dribble | 759 | One way to record the input to Emacs precisely is to write a dribble |
| 760 | file. To start the file, use the @kbd{M-x open-dribble-file | 760 | file. To start the file, use the @kbd{M-x open-dribble-file |
| 761 | @key{RET}} command. From then on, Emacs copies all your input to the | 761 | @key{RET}} command. From then on, Emacs copies all your input to the |
| 762 | specified dribble file until the Emacs process is killed. | 762 | specified dribble file until the Emacs process is killed. Be aware |
| 763 | that sensitive information (such as passwords) may end up recorded in | ||
| 764 | the dribble file. | ||
| 763 | 765 | ||
| 764 | @item | 766 | @item |
| 765 | @findex open-termscript | 767 | @findex open-termscript |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 933078e9229..cb274474973 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2014-04-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * os.texi (Recording Input): Dribble files may contain passwords. | ||
| 4 | |||
| 5 | 2014-04-04 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * backups.texi (Making Backups, Reverting): | ||
| 8 | Update for default values of some -function vars no longer being nil. | ||
| 9 | (Reverting): Update for buffer-stale-function | ||
| 10 | also applying to file-buffers. | ||
| 11 | |||
| 1 | 2014-03-31 Daniel Colascione <dancol@dancol.org> | 12 | 2014-03-31 Daniel Colascione <dancol@dancol.org> |
| 2 | 13 | ||
| 3 | * minibuf.texi (Completion in Buffers): Discuss using lazy | 14 | * minibuf.texi (Completion in Buffers): Discuss using lazy |
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 83ffb2f95e4..63f8f227c84 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi | |||
| @@ -90,8 +90,7 @@ save disk space. (You would put this code in your init file.) | |||
| 90 | @smallexample | 90 | @smallexample |
| 91 | @group | 91 | @group |
| 92 | (add-hook 'rmail-mode-hook | 92 | (add-hook 'rmail-mode-hook |
| 93 | (lambda () | 93 | (lambda () (setq-local make-backup-files nil))) |
| 94 | (set (make-local-variable 'make-backup-files) nil))) | ||
| 95 | @end group | 94 | @end group |
| 96 | @end smallexample | 95 | @end smallexample |
| 97 | @end defopt | 96 | @end defopt |
| @@ -150,13 +149,12 @@ ignored. | |||
| 150 | @end defopt | 149 | @end defopt |
| 151 | 150 | ||
| 152 | @defopt make-backup-file-name-function | 151 | @defopt make-backup-file-name-function |
| 153 | This variable's value is a function to use for making backups instead | 152 | This variable's value is a function to use for making backup file names. |
| 154 | of the default @code{make-backup-file-name}. A value of @code{nil} | 153 | The function @code{make-backup-file-name} calls it. |
| 155 | gives the default @code{make-backup-file-name} behavior. | ||
| 156 | @xref{Backup Names,, Naming Backup Files}. | 154 | @xref{Backup Names,, Naming Backup Files}. |
| 157 | 155 | ||
| 158 | This could be buffer-local to do something special for specific | 156 | This could be buffer-local to do something special for specific |
| 159 | files. If you define it, you may need to change | 157 | files. If you change it, you may need to change |
| 160 | @code{backup-file-name-p} and @code{file-name-sans-versions} too. | 158 | @code{backup-file-name-p} and @code{file-name-sans-versions} too. |
| 161 | @end defopt | 159 | @end defopt |
| 162 | 160 | ||
| @@ -727,25 +725,24 @@ buffer-local bindings for these variables: | |||
| 727 | @defvar revert-buffer-function | 725 | @defvar revert-buffer-function |
| 728 | @anchor{Definition of revert-buffer-function} | 726 | @anchor{Definition of revert-buffer-function} |
| 729 | The value of this variable is the function to use to revert this | 727 | The value of this variable is the function to use to revert this |
| 730 | buffer. If non-@code{nil}, it should be a function with two optional | 728 | buffer. It should be a function with two optional |
| 731 | arguments to do the work of reverting. The two optional arguments, | 729 | arguments to do the work of reverting. The two optional arguments, |
| 732 | @var{ignore-auto} and @var{noconfirm}, are the arguments that | 730 | @var{ignore-auto} and @var{noconfirm}, are the arguments that |
| 733 | @code{revert-buffer} received. If the value is @code{nil}, reverting | 731 | @code{revert-buffer} received. |
| 734 | works the usual way. | ||
| 735 | 732 | ||
| 736 | Modes such as Dired mode, in which the text being edited does not | 733 | Modes such as Dired mode, in which the text being edited does not |
| 737 | consist of a file's contents but can be regenerated in some other | 734 | consist of a file's contents but can be regenerated in some other |
| 738 | fashion, can give this variable a buffer-local value that is a function to | 735 | fashion, can give this variable a buffer-local value that is a special |
| 739 | regenerate the contents. | 736 | function to regenerate the contents. |
| 740 | @end defvar | 737 | @end defvar |
| 741 | 738 | ||
| 742 | @defvar revert-buffer-insert-file-contents-function | 739 | @defvar revert-buffer-insert-file-contents-function |
| 743 | The value of this variable, if non-@code{nil}, specifies the function to use to | 740 | The value of this variable specifies the function to use to |
| 744 | insert the updated contents when reverting this buffer. The function | 741 | insert the updated contents when reverting this buffer. The function |
| 745 | receives two arguments: first the file name to use; second, @code{t} if | 742 | receives two arguments: first the file name to use; second, @code{t} if |
| 746 | the user has asked to read the auto-save file. | 743 | the user has asked to read the auto-save file. |
| 747 | 744 | ||
| 748 | The reason for a mode to set this variable instead of | 745 | The reason for a mode to change this variable instead of |
| 749 | @code{revert-buffer-function} is to avoid duplicating or replacing the | 746 | @code{revert-buffer-function} is to avoid duplicating or replacing the |
| 750 | rest of what @code{revert-buffer} does: asking for confirmation, | 747 | rest of what @code{revert-buffer} does: asking for confirmation, |
| 751 | clearing the undo list, deciding the proper major mode, and running the | 748 | clearing the undo list, deciding the proper major mode, and running the |
| @@ -753,21 +750,23 @@ hooks listed below. | |||
| 753 | @end defvar | 750 | @end defvar |
| 754 | 751 | ||
| 755 | @defvar before-revert-hook | 752 | @defvar before-revert-hook |
| 756 | This normal hook is run by @code{revert-buffer} before | 753 | This normal hook is run by the default @code{revert-buffer-function} |
| 757 | inserting the modified contents---but only if | 754 | before inserting the modified contents. A custom @code{revert-buffer-function} |
| 758 | @code{revert-buffer-function} is @code{nil}. | 755 | may or may not run this hook. |
| 759 | @end defvar | 756 | @end defvar |
| 760 | 757 | ||
| 761 | @defvar after-revert-hook | 758 | @defvar after-revert-hook |
| 762 | This normal hook is run by @code{revert-buffer} after inserting | 759 | This normal hook is run by the default @code{revert-buffer-function} |
| 763 | the modified contents---but only if @code{revert-buffer-function} is | 760 | after inserting the modified contents. A custom @code{revert-buffer-function} |
| 764 | @code{nil}. | 761 | may or may not run this hook. |
| 765 | @end defvar | 762 | @end defvar |
| 766 | 763 | ||
| 767 | @c FIXME? Move this section from arevert-xtra to here? | 764 | @c FIXME? Move this section from arevert-xtra to here? |
| 768 | @defvar buffer-stale-function | 765 | @defvar buffer-stale-function |
| 769 | The value of this variable, if non-@code{nil}, specifies a function | 766 | The value of this variable specifies a function to call to check |
| 770 | to call to check whether a non-file buffer needs reverting | 767 | whether a buffer needs reverting. The default value only handles |
| 768 | buffers that are visiting files, by checking their modification time. | ||
| 769 | Buffers that are not visiting files require a custom function | ||
| 771 | @iftex | 770 | @iftex |
| 772 | (@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}). | 771 | (@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}). |
| 773 | @end iftex | 772 | @end iftex |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index cad5d7ec544..b63b932b4da 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2001,20 +2001,11 @@ This function opens a @dfn{dribble file} named @var{filename}. When a | |||
| 2001 | dribble file is open, each input event from the keyboard or mouse (but | 2001 | dribble file is open, each input event from the keyboard or mouse (but |
| 2002 | not those from keyboard macros) is written in that file. A | 2002 | not those from keyboard macros) is written in that file. A |
| 2003 | non-character event is expressed using its printed representation | 2003 | non-character event is expressed using its printed representation |
| 2004 | surrounded by @samp{<@dots{}>}. | 2004 | surrounded by @samp{<@dots{}>}. Be aware that sensitive information |
| 2005 | (such as passwords) may end up recorded in the dribble file. | ||
| 2005 | 2006 | ||
| 2006 | You close the dribble file by calling this function with an argument | 2007 | You close the dribble file by calling this function with an argument |
| 2007 | of @code{nil}. | 2008 | of @code{nil}. |
| 2008 | |||
| 2009 | This function is normally used to record the input necessary to | ||
| 2010 | trigger an Emacs bug, for the sake of a bug report. | ||
| 2011 | |||
| 2012 | @example | ||
| 2013 | @group | ||
| 2014 | (open-dribble-file "~/dribble") | ||
| 2015 | @result{} nil | ||
| 2016 | @end group | ||
| 2017 | @end example | ||
| 2018 | @end deffn | 2009 | @end deffn |
| 2019 | 2010 | ||
| 2020 | See also the @code{open-termscript} function (@pxref{Terminal Output}). | 2011 | See also the @code{open-termscript} function (@pxref{Terminal Output}). |
| @@ -219,6 +219,10 @@ You can change the default by customizing `blink-cursor-blinks'. | |||
| 219 | ** In keymaps where SPC scrolls forward, S-SPC now scrolls backward. | 219 | ** In keymaps where SPC scrolls forward, S-SPC now scrolls backward. |
| 220 | This affects View mode, etc. | 220 | This affects View mode, etc. |
| 221 | 221 | ||
| 222 | +++ | ||
| 223 | ** The default value of `make-backup-file-name-function' is no longer nil. | ||
| 224 | Instead it defaults to a function that does what the nil value used to. | ||
| 225 | |||
| 222 | ** Help changes | 226 | ** Help changes |
| 223 | 227 | ||
| 224 | +++ | 228 | +++ |
| @@ -1457,9 +1461,13 @@ argument, with the same interpretation as the returned value of | |||
| 1457 | 1461 | ||
| 1458 | ** Revert and Autorevert changes | 1462 | ** Revert and Autorevert changes |
| 1459 | 1463 | ||
| 1460 | *** The default value of `revert-buffer-function' is no longer nil. | 1464 | +++ |
| 1461 | Instead it defaults to a function that does what the nil value used to. | 1465 | *** The default values of `buffer-stale-function', `revert-buffer-function', |
| 1462 | The same applies for `revert-buffer-insert-file-contents-function'. | 1466 | and `revert-buffer-insert-file-contents-function' are no longer nil. |
| 1467 | Instead they default to functions that do what the nil value used to. | ||
| 1468 | |||
| 1469 | +++ | ||
| 1470 | *** `buffer-stale-function' is now used for buffers visiting files too. | ||
| 1463 | 1471 | ||
| 1464 | --- | 1472 | --- |
| 1465 | *** If Emacs is compiled with file notification support, it uses notifications | 1473 | *** If Emacs is compiled with file notification support, it uses notifications |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87f3c74c9fc..e4df943c1bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,128 @@ | |||
| 1 | 2014-04-07 João Távora <joaotavora@gmail.com> | ||
| 2 | |||
| 3 | * elec-pair.el: | ||
| 4 | (electric-pair--syntax-ppss): When inside comments parse from | ||
| 5 | comment beginning. | ||
| 6 | (electric-pair--balance-info): Fix typo in comment. | ||
| 7 | (electric-pair--in-unterminated-string-p): Delete. | ||
| 8 | (electric-pair--unbalanced-strings-p): New function. | ||
| 9 | (electric-pair-string-bound-function): New var. | ||
| 10 | (electric-pair-inhibit-if-helps-balance): Decide quote pairing | ||
| 11 | according to `electric-pair--in-unterminated-string-p' | ||
| 12 | |||
| 13 | 2014-04-07 João Távora <joaotavora@gmail.com> | ||
| 14 | |||
| 15 | * elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit | ||
| 16 | quote pairing if point-max is inside an unterminated string. | ||
| 17 | (electric-pair--looking-at-unterminated-string-p): | ||
| 18 | Delete. | ||
| 19 | (electric-pair--in-unterminated-string-p): New function. | ||
| 20 | |||
| 21 | 2014-04-07 Glenn Morris <rgm@gnu.org> | ||
| 22 | |||
| 23 | * shell.el (shell-directory-tracker): | ||
| 24 | Go back to just ignoring failures. (Bug#17159) | ||
| 25 | |||
| 26 | 2014-04-06 João Távora <joaotavora@gmail.com> | ||
| 27 | |||
| 28 | Fix `electric-pair-delete-adjacent-pairs' in modes binding | ||
| 29 | backspace. (bug#16981) | ||
| 30 | * elec-pair.el (electric-pair-backward-delete-char): Delete. | ||
| 31 | (electric-pair-backward-delete-char-untabify): Delete. | ||
| 32 | (electric-pair-mode-map): Bind backspace to a menu item filtering | ||
| 33 | a new `electric-pair-delete-pair' command. | ||
| 34 | (electric-pair-delete-pair): New command. | ||
| 35 | |||
| 36 | 2014-04-06 João Távora <joaotavora@gmail.com> | ||
| 37 | |||
| 38 | * progmodes/python.el (python-electric-pair-string-delimiter): Fix | ||
| 39 | triple-quoting electricity. (Bug#17192) | ||
| 40 | |||
| 41 | 2014-04-06 João Távora <joaotavora@gmail.com> | ||
| 42 | |||
| 43 | * elec-pair.el (electric-pair-post-self-insert-function): Don't | ||
| 44 | skip whitespace when `electric-pair-text-pairs' and | ||
| 45 | `electric-pair-pairs' were used. syntax to | ||
| 46 | electric-pair--skip-whitespace. (Bug#17183) | ||
| 47 | |||
| 48 | 2014-04-06 Eli Zaretskii <eliz@gnu.org> | ||
| 49 | |||
| 50 | * leim/quail/ipa.el (ipa-x-sampa): Fix the character produced for | ||
| 51 | "<F>". (Bug#17199) | ||
| 52 | |||
| 53 | 2014-04-06 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 54 | |||
| 55 | * mpc.el (mpc--status-timer-run): Disable timer if not displayed. | ||
| 56 | (mpc--status-idle-timer-run): Use mpc--status-timer-run. | ||
| 57 | |||
| 58 | 2014-04-05 Glenn Morris <rgm@gnu.org> | ||
| 59 | |||
| 60 | * help.el (view-lossage): Doc tweak. | ||
| 61 | |||
| 62 | 2014-04-05 Matthias Dahl <ml_emacs-lists@binary-island.eu> | ||
| 63 | |||
| 64 | * faces.el (face-spec-recalc): Call make-face-x-resource-internal | ||
| 65 | only when inhibit-x-resources is nil, and do that earlier in the | ||
| 66 | function. Doc fix. (Bug#16694) | ||
| 67 | (face-spec-choose): Accept additional optional argument, whose | ||
| 68 | value is returned if no matching attributes are found. | ||
| 69 | (face-spec-recalc): Use the new optional argument when calling | ||
| 70 | face-spec-choose. (Bug#16378) | ||
| 71 | (make-face-x-resource-internal): Do nothing when | ||
| 72 | inhibit-x-resources is non-nil. Don't touch the default face if | ||
| 73 | reversed video is given--as was done in previous versions of Emacs. | ||
| 74 | (face-set-after-frame-default): Don't call | ||
| 75 | make-face-x-resource-internal here. (Bug#16434) | ||
| 76 | |||
| 77 | 2014-04-04 Tassilo Horn <tsdh@gnu.org> | ||
| 78 | |||
| 79 | * doc-view.el (doc-view-bookmark-jump): | ||
| 80 | Use `bookmark-after-jump-hook' to jump to the right page after the | ||
| 81 | buffer is shown in a window. (bug#16090) | ||
| 82 | |||
| 83 | 2014-04-04 Eli Zaretskii <eliz@gnu.org> | ||
| 84 | |||
| 85 | * international/characters.el (mirroring): Fix last change: | ||
| 86 | instead of loading uni-mirrored.el explicitly, do that implicitly | ||
| 87 | by creating the 'mirroring' uniprop table. This avoids announcing | ||
| 88 | the loading of uni-mirrored.el. | ||
| 89 | |||
| 90 | 2014-04-04 Glenn Morris <rgm@gnu.org> | ||
| 91 | |||
| 92 | * files.el (buffer-stale--default-function) | ||
| 93 | (buffer-stale-function, revert-buffer--default): | ||
| 94 | * autorevert.el (auto-revert-buffers): Doc tweaks. | ||
| 95 | |||
| 96 | 2014-04-03 Eli Zaretskii <eliz@gnu.org> | ||
| 97 | |||
| 98 | * international/characters.el: Preload uni-mirrored.el. (Bug#17169) | ||
| 99 | |||
| 100 | 2014-04-03 Glenn Morris <rgm@gnu.org> | ||
| 101 | |||
| 102 | * files.el (make-backup-file-name-function) | ||
| 103 | (make-backup-file-name, make-backup-file-name--default-function) | ||
| 104 | (make-backup-file-name-1, find-backup-file-name) | ||
| 105 | (revert-buffer-function, revert-buffer-insert-file-contents-function) | ||
| 106 | (buffer-stale--default-function, buffer-stale-function) | ||
| 107 | (before-revert-hook, after-revert-hook, revert-buffer-in-progress-p) | ||
| 108 | (revert-buffer, revert-buffer--default) | ||
| 109 | (revert-buffer-insert-file-contents--default-function): | ||
| 110 | Doc fixes related to defaults no longer being nil. | ||
| 111 | (make-backup-file-name-function): Bump :version. | ||
| 112 | Restore nil as a valid but deprecated custom type. | ||
| 113 | |||
| 114 | 2014-04-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 115 | |||
| 116 | * progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $' | ||
| 117 | used as a variable (bug#17174). | ||
| 118 | |||
| 119 | 2014-04-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 120 | |||
| 121 | * progmodes/perl-mode.el (perl-indent-new-calculate): | ||
| 122 | Handle forward-sexp failure (bug#16985). | ||
| 123 | (perl-syntax-propertize-function): Add "foreach" and "for" statement | ||
| 124 | modifiers introducing expressions (bug#17116). | ||
| 125 | |||
| 1 | 2014-04-06 Stefan Monnier <monnier@iro.umontreal.ca> | 126 | 2014-04-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 127 | ||
| 3 | * dired-aux.el (dired-file-set-difference): Use lexical-scoping. | 128 | * dired-aux.el (dired-file-set-difference): Use lexical-scoping. |
| @@ -488,6 +613,19 @@ | |||
| 488 | (tty-color-approximate, tty-color-by-index, tty-color-values) | 613 | (tty-color-approximate, tty-color-by-index, tty-color-values) |
| 489 | (tty-color-desc): Remove superfluous backslashes. | 614 | (tty-color-desc): Remove superfluous backslashes. |
| 490 | 615 | ||
| 616 | 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 617 | |||
| 618 | * electric.el (electric-newline-and-maybe-indent): New command. | ||
| 619 | Bind it globally to C-j. | ||
| 620 | (electric-indent-mode): Don't mess with the global map any more. | ||
| 621 | Don't drop the post-self-insert-hook is some buffer is still using it | ||
| 622 | (bug#16770). | ||
| 623 | |||
| 624 | * bindings.el (global-map): Remove C-j binding. | ||
| 625 | |||
| 626 | * emacs-lisp/nadvice.el (advice--make-docstring): Try harder to find | ||
| 627 | the docstring of functions advised before dumping (bug#16993). | ||
| 628 | |||
| 491 | 2014-03-21 Glenn Morris <rgm@gnu.org> | 629 | 2014-03-21 Glenn Morris <rgm@gnu.org> |
| 492 | 630 | ||
| 493 | * cus-start.el (history-length): Bump :version. | 631 | * cus-start.el (history-length): Bump :version. |
| @@ -516,18 +654,6 @@ | |||
| 516 | 654 | ||
| 517 | * skeleton.el (skeleton-autowrap): Mark as obsolete. Doc fix. | 655 | * skeleton.el (skeleton-autowrap): Mark as obsolete. Doc fix. |
| 518 | 656 | ||
| 519 | 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 520 | |||
| 521 | * electric.el (electric-newline-and-maybe-indent): New command. | ||
| 522 | Bind it globally to C-j. | ||
| 523 | (electric-indent-mode): Don't mess with the global map any more. | ||
| 524 | Don't drop the post-self-insert-hook is some buffer is still using it | ||
| 525 | (bug#16770). | ||
| 526 | * bindings.el (global-map): Remove C-j binding. | ||
| 527 | |||
| 528 | * emacs-lisp/nadvice.el (advice--make-docstring): Try harder to find | ||
| 529 | the docstring of functions advised before dumping (bug#16993). | ||
| 530 | |||
| 531 | 2014-03-19 Stefan-W. Hahn <stefan.hahn@s-hahn.de> (tiny change) | 657 | 2014-03-19 Stefan-W. Hahn <stefan.hahn@s-hahn.de> (tiny change) |
| 532 | 658 | ||
| 533 | * ps-print.el (ps-generate-postscript-with-faces): | 659 | * ps-print.el (ps-generate-postscript-with-faces): |
| @@ -2154,7 +2280,6 @@ | |||
| 2154 | * net/shr.el (shr-tag-img): Prefer the title over the alt text | 2280 | * net/shr.el (shr-tag-img): Prefer the title over the alt text |
| 2155 | (bug#16537). | 2281 | (bug#16537). |
| 2156 | 2282 | ||
| 2157 | >>>>>>> MERGE-SOURCE | ||
| 2158 | 2014-01-24 Juanma Barranquero <lekktu@gmail.com> | 2283 | 2014-01-24 Juanma Barranquero <lekktu@gmail.com> |
| 2159 | 2284 | ||
| 2160 | * net/eww.el (eww-download-callback): | 2285 | * net/eww.el (eww-download-callback): |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index a08bf7fee6a..f1074e22e51 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -672,7 +672,7 @@ Should `auto-revert-mode' be active in some buffers, those buffers | |||
| 672 | are checked. | 672 | are checked. |
| 673 | 673 | ||
| 674 | Non-file buffers that have a custom `revert-buffer-function' and | 674 | Non-file buffers that have a custom `revert-buffer-function' and |
| 675 | a `buffer-stale-function' are reverted either when Auto-Revert | 675 | `buffer-stale-function' are reverted either when Auto-Revert |
| 676 | Mode is active in that buffer, or when the variable | 676 | Mode is active in that buffer, or when the variable |
| 677 | `global-auto-revert-non-file-buffers' is non-nil and Global | 677 | `global-auto-revert-non-file-buffers' is non-nil and Global |
| 678 | Auto-Revert Mode is active. | 678 | Auto-Revert Mode is active. |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 6706865e598..09d5925b3e2 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -1862,20 +1862,23 @@ See the command `doc-view-mode' for more information on this mode." | |||
| 1862 | `((page . ,(doc-view-current-page)) | 1862 | `((page . ,(doc-view-current-page)) |
| 1863 | (handler . doc-view-bookmark-jump)))) | 1863 | (handler . doc-view-bookmark-jump)))) |
| 1864 | 1864 | ||
| 1865 | |||
| 1866 | ;;;###autoload | 1865 | ;;;###autoload |
| 1867 | (defun doc-view-bookmark-jump (bmk) | 1866 | (defun doc-view-bookmark-jump (bmk) |
| 1868 | ;; This implements the `handler' function interface for record type | 1867 | ;; This implements the `handler' function interface for record type |
| 1869 | ;; returned by `doc-view-bookmark-make-record', which see. | 1868 | ;; returned by `doc-view-bookmark-make-record', which see. |
| 1870 | (prog1 (bookmark-default-handler bmk) | 1869 | (let ((page (bookmark-prop-get bmk 'page)) |
| 1871 | (let ((page (bookmark-prop-get bmk 'page))) | 1870 | (show-fn-sym (make-symbol "doc-view-bookmark-after-jump-hook"))) |
| 1872 | (when (not (eq major-mode 'doc-view-mode)) | 1871 | (fset show-fn-sym |
| 1873 | (doc-view-toggle-display)) | 1872 | (lambda () |
| 1874 | (with-selected-window | 1873 | (remove-hook 'bookmark-after-jump-hook show-fn-sym) |
| 1875 | (or (get-buffer-window (current-buffer) 0) | 1874 | (when (not (eq major-mode 'doc-view-mode)) |
| 1876 | (selected-window)) | 1875 | (doc-view-toggle-display)) |
| 1877 | (doc-view-goto-page page))))) | 1876 | (with-selected-window |
| 1878 | 1877 | (or (get-buffer-window (current-buffer) 0) | |
| 1878 | (selected-window)) | ||
| 1879 | (doc-view-goto-page page)))) | ||
| 1880 | (add-hook 'bookmark-after-jump-hook show-fn-sym) | ||
| 1881 | (bookmark-default-handler bmk))) | ||
| 1879 | 1882 | ||
| 1880 | (provide 'doc-view) | 1883 | (provide 'doc-view) |
| 1881 | 1884 | ||
diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 73eabdf51c8..c16c1141800 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el | |||
| @@ -166,36 +166,6 @@ return value is considered instead." | |||
| 166 | quotes or comments. If lookup fails here, `electric-pair-text-pairs' will | 166 | quotes or comments. If lookup fails here, `electric-pair-text-pairs' will |
| 167 | be considered.") | 167 | be considered.") |
| 168 | 168 | ||
| 169 | (defun electric-pair-backward-delete-char (n &optional killflag untabify) | ||
| 170 | "Delete characters backward, and maybe also two adjacent paired delimiters. | ||
| 171 | |||
| 172 | Remaining behavior is given by `backward-delete-char' or, if UNTABIFY is | ||
| 173 | non-nil, `backward-delete-char-untabify'." | ||
| 174 | (interactive "*p\nP") | ||
| 175 | (let* ((prev (char-before)) | ||
| 176 | (next (char-after)) | ||
| 177 | (syntax-info (and prev | ||
| 178 | (electric-pair-syntax-info prev))) | ||
| 179 | (syntax (car syntax-info)) | ||
| 180 | (pair (cadr syntax-info))) | ||
| 181 | (when (and next pair | ||
| 182 | (if (functionp electric-pair-delete-adjacent-pairs) | ||
| 183 | (funcall electric-pair-delete-adjacent-pairs) | ||
| 184 | electric-pair-delete-adjacent-pairs) | ||
| 185 | (memq syntax '(?\( ?\" ?\$)) | ||
| 186 | (eq pair next)) | ||
| 187 | (delete-char 1 killflag)) | ||
| 188 | (if untabify | ||
| 189 | (backward-delete-char-untabify n killflag) | ||
| 190 | (backward-delete-char n killflag)))) | ||
| 191 | |||
| 192 | (defun electric-pair-backward-delete-char-untabify (n &optional killflag) | ||
| 193 | "Delete characters backward, and maybe also two adjacent paired delimiters. | ||
| 194 | |||
| 195 | Remaining behavior is given by `backward-delete-char-untabify'." | ||
| 196 | (interactive "*p\nP") | ||
| 197 | (electric-pair-backward-delete-char n killflag t)) | ||
| 198 | |||
| 199 | (defun electric-pair-conservative-inhibit (char) | 169 | (defun electric-pair-conservative-inhibit (char) |
| 200 | (or | 170 | (or |
| 201 | ;; I find it more often preferable not to pair when the | 171 | ;; I find it more often preferable not to pair when the |
| @@ -503,10 +473,12 @@ happened." | |||
| 503 | (funcall electric-pair-skip-self last-command-event) | 473 | (funcall electric-pair-skip-self last-command-event) |
| 504 | electric-pair-skip-self)) | 474 | electric-pair-skip-self)) |
| 505 | (save-excursion | 475 | (save-excursion |
| 506 | (when (setq skip-whitespace-info | 476 | (when (and (not (and unconditional |
| 507 | (if (functionp electric-pair-skip-whitespace) | 477 | (eq syntax ?\"))) |
| 508 | (funcall electric-pair-skip-whitespace) | 478 | (setq skip-whitespace-info |
| 509 | electric-pair-skip-whitespace)) | 479 | (if (functionp electric-pair-skip-whitespace) |
| 480 | (funcall electric-pair-skip-whitespace) | ||
| 481 | electric-pair-skip-whitespace))) | ||
| 510 | (electric-pair--skip-whitespace)) | 482 | (electric-pair--skip-whitespace)) |
| 511 | (eq (char-after) last-command-event)))) | 483 | (eq (char-after) last-command-event)))) |
| 512 | ;; This is too late: rather than insert&delete we'd want to only | 484 | ;; This is too late: rather than insert&delete we'd want to only |
| @@ -546,14 +518,34 @@ happened." | |||
| 546 | (memq (car (electric-pair-syntax-info last-command-event)) | 518 | (memq (car (electric-pair-syntax-info last-command-event)) |
| 547 | '(?\( ?\) ?\" ?\$)))) | 519 | '(?\( ?\) ?\" ?\$)))) |
| 548 | 520 | ||
| 521 | (defun electric-pair-delete-pair (arg &optional killp) | ||
| 522 | "When between adjacent paired delimiters, delete both of them. | ||
| 523 | ARG and KILLP are passed directly to | ||
| 524 | `backward-delete-char-untabify', which see." | ||
| 525 | (interactive "*p\nP") | ||
| 526 | (delete-char 1) | ||
| 527 | (backward-delete-char-untabify arg killp)) | ||
| 528 | |||
| 549 | (defvar electric-pair-mode-map | 529 | (defvar electric-pair-mode-map |
| 550 | (let ((map (make-sparse-keymap))) | 530 | (let ((map (make-sparse-keymap))) |
| 551 | (define-key map [remap backward-delete-char-untabify] | 531 | (define-key map "\177" |
| 552 | 'electric-pair-backward-delete-char-untabify) | 532 | `(menu-item |
| 553 | (define-key map [remap backward-delete-char] | 533 | "" electric-pair-delete-pair |
| 554 | 'electric-pair-backward-delete-char) | 534 | :filter |
| 555 | (define-key map [remap delete-backward-char] | 535 | ,(lambda (cmd) |
| 556 | 'electric-pair-backward-delete-char) | 536 | (let* ((prev (char-before)) |
| 537 | (next (char-after)) | ||
| 538 | (syntax-info (and prev | ||
| 539 | (electric-pair-syntax-info prev))) | ||
| 540 | (syntax (car syntax-info)) | ||
| 541 | (pair (cadr syntax-info))) | ||
| 542 | (and next pair | ||
| 543 | (memq syntax '(?\( ?\" ?\$)) | ||
| 544 | (eq pair next) | ||
| 545 | (if (functionp electric-pair-delete-adjacent-pairs) | ||
| 546 | (funcall electric-pair-delete-adjacent-pairs) | ||
| 547 | electric-pair-delete-adjacent-pairs) | ||
| 548 | cmd))))) | ||
| 557 | map) | 549 | map) |
| 558 | "Keymap used by `electric-pair-mode'.") | 550 | "Keymap used by `electric-pair-mode'.") |
| 559 | 551 | ||
diff --git a/lisp/faces.el b/lisp/faces.el index 49b59281576..b2f353d089e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -354,11 +354,16 @@ specifies an invalid attribute." | |||
| 354 | 354 | ||
| 355 | (defun make-face-x-resource-internal (face &optional frame) | 355 | (defun make-face-x-resource-internal (face &optional frame) |
| 356 | "Fill frame-local FACE on FRAME from X resources. | 356 | "Fill frame-local FACE on FRAME from X resources. |
| 357 | FRAME nil or not specified means do it for all frames." | 357 | FRAME nil or not specified means do it for all frames. |
| 358 | (if (null frame) | 358 | |
| 359 | (dolist (frame (frame-list)) | 359 | If `inhibit-x-resources' is non-nil, this function does nothing." |
| 360 | (set-face-attributes-from-resources face frame)) | 360 | (unless inhibit-x-resources |
| 361 | (set-face-attributes-from-resources face frame))) | 361 | (dolist (frame (if (null frame) (frame-list) (list frame))) |
| 362 | ;; `x-create-frame' already took care of correctly handling | ||
| 363 | ;; the reverse video case-- do _not_ touch the default face | ||
| 364 | (unless (and (eq face 'default) | ||
| 365 | (frame-parameter frame 'reverse)) | ||
| 366 | (set-face-attributes-from-resources face frame))))) | ||
| 362 | 367 | ||
| 363 | 368 | ||
| 364 | 369 | ||
| @@ -1532,13 +1537,15 @@ If FRAME is nil, the current FRAME is used." | |||
| 1532 | match)) | 1537 | match)) |
| 1533 | 1538 | ||
| 1534 | 1539 | ||
| 1535 | (defun face-spec-choose (spec &optional frame) | 1540 | (defun face-spec-choose (spec &optional frame no-match-retval) |
| 1536 | "Choose the proper attributes for FRAME, out of SPEC. | 1541 | "Return the proper attributes for FRAME, out of SPEC. |
| 1537 | If SPEC is nil, return nil." | 1542 | |
| 1543 | If no match is found or SPEC is nil, return nil, unless NO-MATCH-RETVAL | ||
| 1544 | is given, in which case return its value instead." | ||
| 1538 | (unless frame | 1545 | (unless frame |
| 1539 | (setq frame (selected-frame))) | 1546 | (setq frame (selected-frame))) |
| 1540 | (let ((tail spec) | 1547 | (let ((tail spec) |
| 1541 | result defaults) | 1548 | result defaults match-found) |
| 1542 | (while tail | 1549 | (while tail |
| 1543 | (let* ((entry (pop tail)) | 1550 | (let* ((entry (pop tail)) |
| 1544 | (display (car entry)) | 1551 | (display (car entry)) |
| @@ -1558,9 +1565,18 @@ If SPEC is nil, return nil." | |||
| 1558 | (setq defaults thisval) | 1565 | (setq defaults thisval) |
| 1559 | ;; Otherwise, if it matches, use it. | 1566 | ;; Otherwise, if it matches, use it. |
| 1560 | (when (face-spec-set-match-display display frame) | 1567 | (when (face-spec-set-match-display display frame) |
| 1561 | (setq result thisval) | 1568 | (setq result thisval |
| 1562 | (setq tail nil))))) | 1569 | tail nil |
| 1563 | (if defaults (append result defaults) result))) | 1570 | match-found t))))) |
| 1571 | ;; If defaults have been found, it's safe to just append those to the result | ||
| 1572 | ;; list (which at this point will be either nil or contain actual specs) and | ||
| 1573 | ;; return it to the caller. Since there will most definitely be something to | ||
| 1574 | ;; return in this case, there's no need to know/check if a match was found. | ||
| 1575 | (if defaults | ||
| 1576 | (append result defaults) | ||
| 1577 | (if match-found | ||
| 1578 | result | ||
| 1579 | no-match-retval)))) | ||
| 1564 | 1580 | ||
| 1565 | 1581 | ||
| 1566 | (defun face-spec-reset-face (face &optional frame) | 1582 | (defun face-spec-reset-face (face &optional frame) |
| @@ -1639,19 +1655,27 @@ function for its other effects." | |||
| 1639 | 1655 | ||
| 1640 | (defun face-spec-recalc (face frame) | 1656 | (defun face-spec-recalc (face frame) |
| 1641 | "Reset the face attributes of FACE on FRAME according to its specs. | 1657 | "Reset the face attributes of FACE on FRAME according to its specs. |
| 1642 | This applies the defface/custom spec first, then the custom theme specs, | 1658 | After the reset, the specs are applied from the following sources in this order: |
| 1643 | then the override spec." | 1659 | X resources (if applicable) |
| 1660 | | | ||
| 1661 | (theme and user customization) | ||
| 1662 | or, if nonexistent or does not match the current frame, | ||
| 1663 | (defface default spec) | ||
| 1664 | | | ||
| 1665 | defface override spec" | ||
| 1644 | (while (get face 'face-alias) | 1666 | (while (get face 'face-alias) |
| 1645 | (setq face (get face 'face-alias))) | 1667 | (setq face (get face 'face-alias))) |
| 1646 | (face-spec-reset-face face frame) | 1668 | (face-spec-reset-face face frame) |
| 1669 | (make-face-x-resource-internal face frame) | ||
| 1647 | ;; If FACE is customized or themed, set the custom spec from | 1670 | ;; If FACE is customized or themed, set the custom spec from |
| 1648 | ;; `theme-face' records. | 1671 | ;; `theme-face' records. |
| 1649 | (let ((theme-faces (get face 'theme-face)) | 1672 | (let ((theme-faces (get face 'theme-face)) |
| 1673 | (no-match-found 0) | ||
| 1650 | spec theme-face-applied) | 1674 | spec theme-face-applied) |
| 1651 | (if theme-faces | 1675 | (if theme-faces |
| 1652 | (dolist (elt (reverse theme-faces)) | 1676 | (dolist (elt (reverse theme-faces)) |
| 1653 | (setq spec (face-spec-choose (cadr elt) frame)) | 1677 | (setq spec (face-spec-choose (cadr elt) frame no-match-found)) |
| 1654 | (when spec | 1678 | (unless (eq spec no-match-found) |
| 1655 | (face-spec-set-2 face frame spec) | 1679 | (face-spec-set-2 face frame spec) |
| 1656 | (setq theme-face-applied t)))) | 1680 | (setq theme-face-applied t)))) |
| 1657 | ;; If there was a spec applicable to FRAME, that overrides the | 1681 | ;; If there was a spec applicable to FRAME, that overrides the |
| @@ -1661,8 +1685,7 @@ then the override spec." | |||
| 1661 | (setq spec (face-spec-choose (face-default-spec face) frame)) | 1685 | (setq spec (face-spec-choose (face-default-spec face) frame)) |
| 1662 | (face-spec-set-2 face frame spec)) | 1686 | (face-spec-set-2 face frame spec)) |
| 1663 | (setq spec (face-spec-choose (get face 'face-override-spec) frame)) | 1687 | (setq spec (face-spec-choose (get face 'face-override-spec) frame)) |
| 1664 | (face-spec-set-2 face frame spec)) | 1688 | (face-spec-set-2 face frame spec))) |
| 1665 | (make-face-x-resource-internal face frame)) | ||
| 1666 | 1689 | ||
| 1667 | (defun face-spec-set-2 (face frame spec) | 1690 | (defun face-spec-set-2 (face frame spec) |
| 1668 | "Set the face attributes of FACE on FRAME according to SPEC." | 1691 | "Set the face attributes of FACE on FRAME according to SPEC." |
| @@ -2046,10 +2069,6 @@ frame parameters in PARAMETERS." | |||
| 2046 | (progn | 2069 | (progn |
| 2047 | ;; Initialize faces from face spec and custom theme. | 2070 | ;; Initialize faces from face spec and custom theme. |
| 2048 | (face-spec-recalc face frame) | 2071 | (face-spec-recalc face frame) |
| 2049 | ;; X resources for the default face are applied during | ||
| 2050 | ;; `x-create-frame'. | ||
| 2051 | (and (not (eq face 'default)) window-system-p | ||
| 2052 | (make-face-x-resource-internal face frame)) | ||
| 2053 | ;; Apply attributes specified by face-new-frame-defaults | 2072 | ;; Apply attributes specified by face-new-frame-defaults |
| 2054 | (internal-merge-in-global-face face frame)) | 2073 | (internal-merge-in-global-face face frame)) |
| 2055 | ;; Don't let invalid specs prevent frame creation. | 2074 | ;; Don't let invalid specs prevent frame creation. |
diff --git a/lisp/files.el b/lisp/files.el index 5883c8c348e..34c66bbd1d6 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4207,15 +4207,22 @@ FILENAME defaults to `buffer-file-name'." | |||
| 4207 | 4207 | ||
| 4208 | (defcustom make-backup-file-name-function | 4208 | (defcustom make-backup-file-name-function |
| 4209 | #'make-backup-file-name--default-function | 4209 | #'make-backup-file-name--default-function |
| 4210 | "A function to use instead of the default `make-backup-file-name'. | 4210 | "A function that `make-backup-file-name' uses to create backup file names. |
| 4211 | The function receives a single argument, the original file name. | ||
| 4211 | 4212 | ||
| 4212 | This could be buffer-local to do something special for specific | 4213 | If you change this, you may need to change `backup-file-name-p' and |
| 4213 | files. If you define it, you may need to change `backup-file-name-p' | 4214 | `file-name-sans-versions' too. |
| 4214 | and `file-name-sans-versions' too. | 4215 | |
| 4216 | You could make this buffer-local to do something special for specific files. | ||
| 4217 | |||
| 4218 | For historical reasons, a value of nil means to use the default function. | ||
| 4219 | This should not be relied upon. | ||
| 4215 | 4220 | ||
| 4216 | See also `backup-directory-alist'." | 4221 | See also `backup-directory-alist'." |
| 4222 | :version "24.4" ; nil -> make-backup-file-name--default-function | ||
| 4217 | :group 'backup | 4223 | :group 'backup |
| 4218 | :type '(function :tag "Your function")) | 4224 | :type '(choice (const :tag "Deprecated way to get the default function" nil) |
| 4225 | (function :tag "Function"))) | ||
| 4219 | 4226 | ||
| 4220 | (defcustom backup-directory-alist nil | 4227 | (defcustom backup-directory-alist nil |
| 4221 | "Alist of filename patterns and backup directory names. | 4228 | "Alist of filename patterns and backup directory names. |
| @@ -4272,20 +4279,17 @@ Checks for files in `temporary-file-directory', | |||
| 4272 | 4279 | ||
| 4273 | (defun make-backup-file-name (file) | 4280 | (defun make-backup-file-name (file) |
| 4274 | "Create the non-numeric backup file name for FILE. | 4281 | "Create the non-numeric backup file name for FILE. |
| 4275 | Normally this will just be the file's name with `~' appended. | 4282 | This calls the function that `make-backup-file-name-function' specifies, |
| 4276 | Customization hooks are provided as follows. | 4283 | with a single argument FILE." |
| 4277 | |||
| 4278 | The value of `make-backup-file-name-function' should be a function which | ||
| 4279 | will be called with FILE as its argument; the resulting name is used. | ||
| 4280 | |||
| 4281 | By default, a match for FILE is sought in `backup-directory-alist'; see | ||
| 4282 | the documentation of that variable. If the directory for the backup | ||
| 4283 | doesn't exist, it is created." | ||
| 4284 | (funcall (or make-backup-file-name-function | 4284 | (funcall (or make-backup-file-name-function |
| 4285 | #'make-backup-file-name--default-function) | 4285 | #'make-backup-file-name--default-function) |
| 4286 | file)) | 4286 | file)) |
| 4287 | 4287 | ||
| 4288 | (defun make-backup-file-name--default-function (file) | 4288 | (defun make-backup-file-name--default-function (file) |
| 4289 | "Default function for `make-backup-file-name'. | ||
| 4290 | Normally this just returns FILE's name with `~' appended. | ||
| 4291 | It searches for a match for FILE in `backup-directory-alist'. | ||
| 4292 | If the directory for the backup doesn't exist, it is created." | ||
| 4289 | (if (and (eq system-type 'ms-dos) | 4293 | (if (and (eq system-type 'ms-dos) |
| 4290 | (not (msdos-long-file-names))) | 4294 | (not (msdos-long-file-names))) |
| 4291 | (let ((fn (file-name-nondirectory file))) | 4295 | (let ((fn (file-name-nondirectory file))) |
| @@ -4297,7 +4301,8 @@ doesn't exist, it is created." | |||
| 4297 | (concat (make-backup-file-name-1 file) "~"))) | 4301 | (concat (make-backup-file-name-1 file) "~"))) |
| 4298 | 4302 | ||
| 4299 | (defun make-backup-file-name-1 (file) | 4303 | (defun make-backup-file-name-1 (file) |
| 4300 | "Subroutine of `make-backup-file-name' and `find-backup-file-name'." | 4304 | "Subroutine of `make-backup-file-name--default-function'. |
| 4305 | The function `find-backup-file-name' also uses this." | ||
| 4301 | (let ((alist backup-directory-alist) | 4306 | (let ((alist backup-directory-alist) |
| 4302 | elt backup-directory abs-backup-directory) | 4307 | elt backup-directory abs-backup-directory) |
| 4303 | (while alist | 4308 | (while alist |
| @@ -4374,8 +4379,8 @@ the index in the name where the version number begins." | |||
| 4374 | Value is a list whose car is the name for the backup file | 4379 | Value is a list whose car is the name for the backup file |
| 4375 | and whose cdr is a list of old versions to consider deleting now. | 4380 | and whose cdr is a list of old versions to consider deleting now. |
| 4376 | If the value is nil, don't make a backup. | 4381 | If the value is nil, don't make a backup. |
| 4377 | Uses `backup-directory-alist' in the same way as does | 4382 | Uses `backup-directory-alist' in the same way as |
| 4378 | `make-backup-file-name'." | 4383 | `make-backup-file-name--default-function' does." |
| 4379 | (let ((handler (find-file-name-handler fn 'find-backup-file-name))) | 4384 | (let ((handler (find-file-name-handler fn 'find-backup-file-name))) |
| 4380 | ;; Run a handler for this function so that ange-ftp can refuse to do it. | 4385 | ;; Run a handler for this function so that ange-ftp can refuse to do it. |
| 4381 | (if handler | 4386 | (if handler |
| @@ -5312,28 +5317,41 @@ comparison." | |||
| 5312 | 5317 | ||
| 5313 | (put 'revert-buffer-function 'permanent-local t) | 5318 | (put 'revert-buffer-function 'permanent-local t) |
| 5314 | (defvar revert-buffer-function #'revert-buffer--default | 5319 | (defvar revert-buffer-function #'revert-buffer--default |
| 5315 | "Function to use to revert this buffer, or nil to do the default. | 5320 | "Function to use to revert this buffer. |
| 5316 | The function receives two arguments IGNORE-AUTO and NOCONFIRM, | 5321 | The function receives two arguments IGNORE-AUTO and NOCONFIRM, |
| 5317 | which are the arguments that `revert-buffer' received. | 5322 | which are the arguments that `revert-buffer' received. |
| 5318 | It also has access to the `preserve-modes' argument of `revert-buffer' | 5323 | It also has access to the `preserve-modes' argument of `revert-buffer' |
| 5319 | via the `revert-buffer-preserve-modes' dynamic variable.") | 5324 | via the `revert-buffer-preserve-modes' dynamic variable. |
| 5325 | |||
| 5326 | For historical reasons, a value of nil means to use the default function. | ||
| 5327 | This should not be relied upon.") | ||
| 5320 | 5328 | ||
| 5321 | (put 'revert-buffer-insert-file-contents-function 'permanent-local t) | 5329 | (put 'revert-buffer-insert-file-contents-function 'permanent-local t) |
| 5322 | (defvar revert-buffer-insert-file-contents-function | 5330 | (defvar revert-buffer-insert-file-contents-function |
| 5323 | #'revert-buffer-insert-file-contents--default-function | 5331 | #'revert-buffer-insert-file-contents--default-function |
| 5324 | "Function to use to insert contents when reverting this buffer. | 5332 | "Function to use to insert contents when reverting this buffer. |
| 5325 | Gets two args, first the nominal file name to use, | 5333 | The function receives two arguments: the first the nominal file name to use; |
| 5326 | and second, t if reading the auto-save file. | 5334 | the second is t if reading the auto-save file. |
| 5335 | |||
| 5336 | The function is responsible for updating (or preserving) point. | ||
| 5327 | 5337 | ||
| 5328 | The function you specify is responsible for updating (or preserving) point.") | 5338 | For historical reasons, a value of nil means to use the default function. |
| 5339 | This should not be relied upon.") | ||
| 5329 | 5340 | ||
| 5330 | (defun buffer-stale--default-function (&optional _noconfirm) | 5341 | (defun buffer-stale--default-function (&optional _noconfirm) |
| 5342 | "Default function to use for `buffer-stale-function'. | ||
| 5343 | This function ignores its argument. | ||
| 5344 | This returns non-nil if the current buffer is visiting a readable file | ||
| 5345 | whose modification time does not match that of the buffer. | ||
| 5346 | |||
| 5347 | This function only handles buffers that are visiting files. | ||
| 5348 | Non-file buffers need a custom function" | ||
| 5331 | (and buffer-file-name | 5349 | (and buffer-file-name |
| 5332 | (file-readable-p buffer-file-name) | 5350 | (file-readable-p buffer-file-name) |
| 5333 | (not (verify-visited-file-modtime (current-buffer))))) | 5351 | (not (verify-visited-file-modtime (current-buffer))))) |
| 5334 | 5352 | ||
| 5335 | (defvar buffer-stale-function #'buffer-stale--default-function | 5353 | (defvar buffer-stale-function #'buffer-stale--default-function |
| 5336 | "Function to check whether a non-file buffer needs reverting. | 5354 | "Function to check whether a buffer needs reverting. |
| 5337 | This should be a function with one optional argument NOCONFIRM. | 5355 | This should be a function with one optional argument NOCONFIRM. |
| 5338 | Auto Revert Mode passes t for NOCONFIRM. The function should return | 5356 | Auto Revert Mode passes t for NOCONFIRM. The function should return |
| 5339 | non-nil if the buffer should be reverted. A return value of | 5357 | non-nil if the buffer should be reverted. A return value of |
| @@ -5346,13 +5364,16 @@ non-nil if the buffer is going to be reverted without asking the | |||
| 5346 | user. In such situations, one has to be careful with potentially | 5364 | user. In such situations, one has to be careful with potentially |
| 5347 | time consuming operations. | 5365 | time consuming operations. |
| 5348 | 5366 | ||
| 5367 | For historical reasons, a value of nil means to use the default function. | ||
| 5368 | This should not be relied upon. | ||
| 5369 | |||
| 5349 | For more information on how this variable is used by Auto Revert mode, | 5370 | For more information on how this variable is used by Auto Revert mode, |
| 5350 | see Info node `(emacs)Supporting additional buffers'.") | 5371 | see Info node `(emacs)Supporting additional buffers'.") |
| 5351 | 5372 | ||
| 5352 | (defvar before-revert-hook nil | 5373 | (defvar before-revert-hook nil |
| 5353 | "Normal hook for `revert-buffer' to run before reverting. | 5374 | "Normal hook for `revert-buffer' to run before reverting. |
| 5354 | If `revert-buffer-function' is used to override the normal revert | 5375 | The function `revert-buffer--default' runs this. |
| 5355 | mechanism, this hook is not used.") | 5376 | A customized `revert-buffer-function' need not run this hook.") |
| 5356 | 5377 | ||
| 5357 | (defvar after-revert-hook nil | 5378 | (defvar after-revert-hook nil |
| 5358 | "Normal hook for `revert-buffer' to run after reverting. | 5379 | "Normal hook for `revert-buffer' to run after reverting. |
| @@ -5360,12 +5381,11 @@ Note that the hook value that it runs is the value that was in effect | |||
| 5360 | before reverting; that makes a difference if you have buffer-local | 5381 | before reverting; that makes a difference if you have buffer-local |
| 5361 | hook functions. | 5382 | hook functions. |
| 5362 | 5383 | ||
| 5363 | If `revert-buffer-function' is used to override the normal revert | 5384 | The function `revert-buffer--default' runs this. |
| 5364 | mechanism, this hook is not used.") | 5385 | A customized `revert-buffer-function' need not run this hook.") |
| 5365 | 5386 | ||
| 5366 | (defvar revert-buffer-in-progress-p nil | 5387 | (defvar revert-buffer-in-progress-p nil |
| 5367 | "Non-nil if a `revert-buffer' operation is in progress, nil otherwise. | 5388 | "Non-nil if a `revert-buffer' operation is in progress, nil otherwise.") |
| 5368 | This is true even if a `revert-buffer-function' is being used.") | ||
| 5369 | 5389 | ||
| 5370 | (defvar revert-buffer-internal-hook) | 5390 | (defvar revert-buffer-internal-hook) |
| 5371 | 5391 | ||
| @@ -5402,12 +5422,10 @@ the files modes. Normally we reinitialize them using `normal-mode'. | |||
| 5402 | 5422 | ||
| 5403 | This function binds `revert-buffer-in-progress-p' non-nil while it operates. | 5423 | This function binds `revert-buffer-in-progress-p' non-nil while it operates. |
| 5404 | 5424 | ||
| 5405 | If the value of `revert-buffer-function' is non-nil, it is called to | 5425 | This function calls the function that `revert-buffer-function' specifies |
| 5406 | do all the work for this command. Otherwise, the hooks | 5426 | to do the work, with arguments IGNORE-AUTO and NOCONFIRM. |
| 5407 | `before-revert-hook' and `after-revert-hook' are run at the beginning | 5427 | The default function runs the hooks `before-revert-hook' and |
| 5408 | and the end, and if `revert-buffer-insert-file-contents-function' is | 5428 | `after-revert-hook'." |
| 5409 | non-nil, it is called instead of rereading visited file contents." | ||
| 5410 | |||
| 5411 | ;; I admit it's odd to reverse the sense of the prefix argument, but | 5429 | ;; I admit it's odd to reverse the sense of the prefix argument, but |
| 5412 | ;; there is a lot of code out there which assumes that the first | 5430 | ;; there is a lot of code out there which assumes that the first |
| 5413 | ;; argument should be t to avoid consulting the auto-save file, and | 5431 | ;; argument should be t to avoid consulting the auto-save file, and |
| @@ -5419,7 +5437,19 @@ non-nil, it is called instead of rereading visited file contents." | |||
| 5419 | (revert-buffer-preserve-modes preserve-modes)) | 5437 | (revert-buffer-preserve-modes preserve-modes)) |
| 5420 | (funcall (or revert-buffer-function #'revert-buffer--default) | 5438 | (funcall (or revert-buffer-function #'revert-buffer--default) |
| 5421 | ignore-auto noconfirm))) | 5439 | ignore-auto noconfirm))) |
| 5440 | |||
| 5422 | (defun revert-buffer--default (ignore-auto noconfirm) | 5441 | (defun revert-buffer--default (ignore-auto noconfirm) |
| 5442 | "Default function for `revert-buffer'. | ||
| 5443 | The arguments IGNORE-AUTO and NOCONFIRM are as described for `revert-buffer'. | ||
| 5444 | Runs the hooks `before-revert-hook' and `after-revert-hook' at the | ||
| 5445 | start and end. | ||
| 5446 | |||
| 5447 | Calls `revert-buffer-insert-file-contents-function' to reread the | ||
| 5448 | contents of the visited file, with two arguments: the first is the file | ||
| 5449 | name, the second is non-nil if reading an auto-save file. | ||
| 5450 | |||
| 5451 | This function only handles buffers that are visiting files. | ||
| 5452 | Non-file buffers need a custom function." | ||
| 5423 | (with-current-buffer (or (buffer-base-buffer (current-buffer)) | 5453 | (with-current-buffer (or (buffer-base-buffer (current-buffer)) |
| 5424 | (current-buffer)) | 5454 | (current-buffer)) |
| 5425 | (let* ((auto-save-p (and (not ignore-auto) | 5455 | (let* ((auto-save-p (and (not ignore-auto) |
| @@ -5473,6 +5503,10 @@ non-nil, it is called instead of rereading visited file contents." | |||
| 5473 | t))))) | 5503 | t))))) |
| 5474 | 5504 | ||
| 5475 | (defun revert-buffer-insert-file-contents--default-function (file-name auto-save-p) | 5505 | (defun revert-buffer-insert-file-contents--default-function (file-name auto-save-p) |
| 5506 | "Default function for `revert-buffer-insert-file-contents-function'. | ||
| 5507 | The function `revert-buffer--default' calls this. | ||
| 5508 | FILE-NAME is the name of the file. AUTO-SAVE-P is non-nil if this is | ||
| 5509 | an auto-save file." | ||
| 5476 | (cond | 5510 | (cond |
| 5477 | ((not (file-exists-p file-name)) | 5511 | ((not (file-exists-p file-name)) |
| 5478 | (error (if buffer-file-number | 5512 | (error (if buffer-file-number |
diff --git a/lisp/help.el b/lisp/help.el index 4434ce27bdb..76c27de8da6 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -446,7 +446,7 @@ is specified by the variable `message-log-max'." | |||
| 446 | (defun view-lossage () | 446 | (defun view-lossage () |
| 447 | "Display last 300 input keystrokes. | 447 | "Display last 300 input keystrokes. |
| 448 | 448 | ||
| 449 | To record all your input on a file, use `open-dribble-file'." | 449 | To record all your input, use `open-dribble-file'." |
| 450 | (interactive) | 450 | (interactive) |
| 451 | (help-setup-xref (list #'view-lossage) | 451 | (help-setup-xref (list #'view-lossage) |
| 452 | (called-interactively-p 'interactive)) | 452 | (called-interactively-p 'interactive)) |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 2b656375ca2..54ab362df04 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -495,6 +495,13 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 495 | (modify-category-entry key ?L)))) | 495 | (modify-category-entry key ?L)))) |
| 496 | table))) | 496 | table))) |
| 497 | 497 | ||
| 498 | ;; Load uni-mirrored.el if available, so that it gets dumped into | ||
| 499 | ;; Emacs. This allows to start Emacs with force-load-messages in | ||
| 500 | ;; ~/.emacs, and avoid infinite recursion in bidi_initialize, which | ||
| 501 | ;; needs to load uni-mirrored.el in order to display the "Loading" | ||
| 502 | ;; messages. | ||
| 503 | (unicode-property-table-internal 'mirroring) | ||
| 504 | |||
| 498 | ;; Latin | 505 | ;; Latin |
| 499 | 506 | ||
| 500 | (modify-category-entry '(#x80 . #x024F) ?l) | 507 | (modify-category-entry '(#x80 . #x024F) ?l) |
diff --git a/lisp/leim/quail/ipa.el b/lisp/leim/quail/ipa.el index 322f34ad33e..e0e1c9f0c56 100644 --- a/lisp/leim/quail/ipa.el +++ b/lisp/leim/quail/ipa.el | |||
| @@ -475,7 +475,7 @@ displays them, incorrectly, as separate from the modified glyphs.") | |||
| 475 | ("_d" "̪") ;; Dental U+032A | 475 | ("_d" "̪") ;; Dental U+032A |
| 476 | ("_e" "Ì´") ;; Velarized or pharyngeal U+0334 | 476 | ("_e" "Ì´") ;; Velarized or pharyngeal U+0334 |
| 477 | 477 | ||
| 478 | ("<F>" "↙") ;; Global fall; SOUTH EAST ARROW; may be a bit smaller than | 478 | ("<F>" "↘") ;; Global fall; SOUTH EAST ARROW; may be a bit smaller than |
| 479 | ;; intended. | 479 | ;; intended. |
| 480 | ("_F" "Ì‚") ;; Falling tone U+0302 | 480 | ("_F" "Ì‚") ;; Falling tone U+0302 |
| 481 | ("_G" "Ë ") ;; Velarized U+02E0 | 481 | ("_G" "Ë ") ;; Velarized U+02E0 |
diff --git a/lisp/mpc.el b/lisp/mpc.el index 921b5fc8b89..d89231e81b9 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -491,9 +491,13 @@ to call FUN for any change whatsoever.") | |||
| 491 | (cancel-timer mpc--status-timer) | 491 | (cancel-timer mpc--status-timer) |
| 492 | (setq mpc--status-timer nil))) | 492 | (setq mpc--status-timer nil))) |
| 493 | (defun mpc--status-timer-run () | 493 | (defun mpc--status-timer-run () |
| 494 | (with-demoted-errors "MPC: %s" | 494 | (with-demoted-errors "MPC: %S" |
| 495 | (when (process-get (mpc-proc) 'ready) | 495 | (when (process-get (mpc-proc) 'ready) |
| 496 | (with-local-quit (mpc-status-refresh))))) | 496 | (let* ((buf (mpc-proc-buffer (mpc-proc) 'status)) |
| 497 | (win (get-buffer-window buf t))) | ||
| 498 | (if (not win) | ||
| 499 | (mpc--status-timer-stop) | ||
| 500 | (with-local-quit (mpc-status-refresh))))))) | ||
| 497 | 501 | ||
| 498 | (defvar mpc--status-idle-timer nil) | 502 | (defvar mpc--status-idle-timer nil) |
| 499 | (defun mpc--status-idle-timer-start () | 503 | (defun mpc--status-idle-timer-start () |
| @@ -518,10 +522,8 @@ to call FUN for any change whatsoever.") | |||
| 518 | ;; client starts playback, we may get a chance to notice it. | 522 | ;; client starts playback, we may get a chance to notice it. |
| 519 | (run-with-idle-timer 10 t 'mpc--status-idle-timer-run)))) | 523 | (run-with-idle-timer 10 t 'mpc--status-idle-timer-run)))) |
| 520 | (defun mpc--status-idle-timer-run () | 524 | (defun mpc--status-idle-timer-run () |
| 521 | (when (process-get (mpc-proc) 'ready) | 525 | (mpc--status-timer-start) |
| 522 | (with-demoted-errors "MPC: %s" | 526 | (mpc--status-timer-run)) |
| 523 | (with-local-quit (mpc-status-refresh)))) | ||
| 524 | (mpc--status-timer-start)) | ||
| 525 | 527 | ||
| 526 | (defun mpc--status-timers-refresh () | 528 | (defun mpc--status-timers-refresh () |
| 527 | "Start/stop the timers according to whether a song is playing." | 529 | "Start/stop the timers according to whether a song is playing." |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index d09fb59371a..3486c0a1983 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -250,7 +250,11 @@ | |||
| 250 | ;; Catch ${ so that ${var} doesn't screw up indentation. | 250 | ;; Catch ${ so that ${var} doesn't screw up indentation. |
| 251 | ;; This also catches $' to handle 'foo$', although it should really | 251 | ;; This also catches $' to handle 'foo$', although it should really |
| 252 | ;; check that it occurs inside a '..' string. | 252 | ;; check that it occurs inside a '..' string. |
| 253 | ("\\(\\$\\)[{']" (1 ". p")) | 253 | ("\\(\\$\\)[{']" (1 (unless (and (eq ?\' (char-after (match-end 1))) |
| 254 | (save-excursion | ||
| 255 | (not (nth 3 (syntax-ppss | ||
| 256 | (match-beginning 0)))))) | ||
| 257 | (string-to-syntax ". p")))) | ||
| 254 | ;; Handle funny names like $DB'stop. | 258 | ;; Handle funny names like $DB'stop. |
| 255 | ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_")) | 259 | ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_")) |
| 256 | ;; format statements | 260 | ;; format statements |
| @@ -276,7 +280,7 @@ | |||
| 276 | ;; perl-font-lock-special-syntactic-constructs. | 280 | ;; perl-font-lock-special-syntactic-constructs. |
| 277 | ((concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" | 281 | ((concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" |
| 278 | (regexp-opt '("split" "if" "unless" "until" "while" "split" | 282 | (regexp-opt '("split" "if" "unless" "until" "while" "split" |
| 279 | "grep" "map" "not" "or" "and")) | 283 | "grep" "map" "not" "or" "and" "for" "foreach")) |
| 280 | "\\|[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)") | 284 | "\\|[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)") |
| 281 | (2 (ignore | 285 | (2 (ignore |
| 282 | (if (and (match-end 1) ; / at BOL. | 286 | (if (and (match-end 1) ; / at BOL. |
| @@ -854,11 +858,12 @@ changed by, or (parse-state) if line starts in a quoted string." | |||
| 854 | (and (= (char-syntax (following-char)) ?\)) | 858 | (and (= (char-syntax (following-char)) ?\)) |
| 855 | (save-excursion | 859 | (save-excursion |
| 856 | (forward-char 1) | 860 | (forward-char 1) |
| 857 | (forward-sexp -1) | 861 | (when (condition-case nil (progn (forward-sexp -1) t) |
| 858 | (perl-indent-new-calculate | 862 | (scan-error nil)) |
| 859 | ;; Recalculate the parsing-start, since we may have jumped | 863 | (perl-indent-new-calculate |
| 860 | ;; dangerously close (typically in the case of nested functions). | 864 | ;; Recalculate the parsing-start, since we may have jumped |
| 861 | 'virtual nil (save-excursion (perl-beginning-of-function))))) | 865 | ;; dangerously close (typically in the case of nested functions). |
| 866 | 'virtual nil (save-excursion (perl-beginning-of-function)))))) | ||
| 862 | (and (and (= (following-char) ?{) | 867 | (and (and (= (following-char) ?{) |
| 863 | (save-excursion (forward-char) (perl-hanging-paren-p))) | 868 | (save-excursion (forward-char) (perl-hanging-paren-p))) |
| 864 | (+ (or default (perl-calculate-indent parse-start)) | 869 | (+ (or default (perl-calculate-indent parse-start)) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index b0102c55ffd..240cf8aff8c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -3651,8 +3651,9 @@ returned as is." | |||
| 3651 | (let ((count 0)) | 3651 | (let ((count 0)) |
| 3652 | (while (eq (char-before (- (point) count)) last-command-event) | 3652 | (while (eq (char-before (- (point) count)) last-command-event) |
| 3653 | (cl-incf count)) | 3653 | (cl-incf count)) |
| 3654 | (= count 3))) | 3654 | (= count 3)) |
| 3655 | (save-excursion (insert (make-string 3 last-command-event))))) | 3655 | (eq (char-after) last-command-event)) |
| 3656 | (save-excursion (insert (make-string 2 last-command-event))))) | ||
| 3656 | 3657 | ||
| 3657 | (defvar electric-indent-inhibit) | 3658 | (defvar electric-indent-inhibit) |
| 3658 | 3659 | ||
diff --git a/lisp/shell.el b/lisp/shell.el index c5c1275f19f..9dc9a013f8b 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -792,8 +792,11 @@ and `shell-pushd-dunique' control the behavior of the relevant command. | |||
| 792 | Environment variables are expanded, see function `substitute-in-file-name'." | 792 | Environment variables are expanded, see function `substitute-in-file-name'." |
| 793 | (if shell-dirtrackp | 793 | (if shell-dirtrackp |
| 794 | ;; We fail gracefully if we think the command will fail in the shell. | 794 | ;; We fail gracefully if we think the command will fail in the shell. |
| 795 | (with-demoted-errors "Couldn't cd: %s" | 795 | ;;; (with-demoted-errors "Directory tracker failure: %s" |
| 796 | (let ((start (progn (string-match | 796 | ;; This fails so often that it seems better to just ignore errors (?). |
| 797 | ;; Eg even: foo=/tmp; cd $foo is beyond us (bug#17159). | ||
| 798 | (ignore-errors | ||
| 799 | (let ((start (progn (string-match | ||
| 797 | (concat "^" shell-command-separator-regexp) | 800 | (concat "^" shell-command-separator-regexp) |
| 798 | str) ; skip whitespace | 801 | str) ; skip whitespace |
| 799 | (match-end 0))) | 802 | (match-end 0))) |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 62a33906b0d..8e2875805dd 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-04-03 Ken Brown <kbrown@cornell.edu> | ||
| 2 | |||
| 3 | * emacs.rc: Don't use manifest on Cygwin. (Bug#17176) | ||
| 4 | |||
| 1 | 2014-02-17 Juanma Barranquero <lekktu@gmail.com> | 5 | 2014-02-17 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * Makefile.in (install): Create destination directory before copying | 7 | * Makefile.in (install): Create destination directory before copying |
diff --git a/nt/emacs.rc b/nt/emacs.rc index 2d007ba9043..f363e6aad78 100644 --- a/nt/emacs.rc +++ b/nt/emacs.rc | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | Emacs ICON icons/emacs.ico | 1 | Emacs ICON icons/emacs.ico |
| 2 | 32649 CURSOR icons/hand.cur | 2 | 32649 CURSOR icons/hand.cur |
| 3 | #if defined (WIN64) || defined (__x86_64__) | 3 | #ifndef __CYGWIN__ |
| 4 | #ifdef WIN64 | ||
| 4 | 1 24 "emacs-x64.manifest" | 5 | 1 24 "emacs-x64.manifest" |
| 5 | #else | 6 | #else |
| 6 | 1 24 "emacs-x86.manifest" | 7 | 1 24 "emacs-x86.manifest" |
| 7 | #endif | 8 | #endif |
| 9 | #endif | ||
| 8 | 10 | ||
| 9 | #ifndef VS_VERSION_INFO | 11 | #ifndef VS_VERSION_INFO |
| 10 | #define VS_VERSION_INFO 1 | 12 | #define VS_VERSION_INFO 1 |
diff --git a/src/ChangeLog b/src/ChangeLog index b4722839fe3..d0d133c4989 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,37 @@ | |||
| 1 | 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * lisp.h (struct Lisp_Symbol): New bitfield `pinned'. | ||
| 4 | |||
| 5 | * alloc.c: Keep track of symbols referenced from pure space (bug#17168). | ||
| 6 | (symbol_block_pinned): New var. | ||
| 7 | (Fmake_symbol): Initialize `pinned'. | ||
| 8 | (purecopy): New function, extracted from Fpurecopy. Mark symbols as | ||
| 9 | pinned and signal an error for un-purifiable objects. | ||
| 10 | (pure_cons): Use it. | ||
| 11 | (Fpurecopy): Use it, except for objects that can't be purified. | ||
| 12 | (mark_pinned_symbols): New function. | ||
| 13 | (Fgarbage_collect): Use it. | ||
| 14 | (gc_sweep): Remove hack made unnecessary. | ||
| 15 | |||
| 16 | 2014-04-05 Glenn Morris <rgm@gnu.org> | ||
| 17 | |||
| 18 | * keyboard.c (Fopen_dribble_file): Doc tweak. | ||
| 19 | |||
| 20 | 2014-04-04 Jan Djärv <jan.h.d@swipnet.se> | ||
| 21 | |||
| 22 | Backport from trunk. | ||
| 23 | * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool | ||
| 24 | bar is zero height, just return (Bug#16976). | ||
| 25 | (initFrameFromEmacs:): Initialize wait_for_tool_bar. | ||
| 26 | * nsterm.h (EmacsView): Add wait_for_tool_bar. | ||
| 27 | * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar | ||
| 28 | is nil. If waiting for toolbar to complete, force a redraw. | ||
| 29 | (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976). | ||
| 30 | |||
| 31 | 2014-04-03 Ken Brown <kbrown@cornell.edu> | ||
| 32 | |||
| 33 | * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176) | ||
| 34 | |||
| 1 | 2014-04-07 Paul Eggert <eggert@cs.ucla.edu> | 35 | 2014-04-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 36 | ||
| 3 | * alloc.c: Simplify by removing use of HAVE_EXECINFO_H. | 37 | * alloc.c: Simplify by removing use of HAVE_EXECINFO_H. |
| @@ -4490,7 +4524,7 @@ | |||
| 4490 | * frame.c (delete_frame): Block/unblock input to overcome race | 4524 | * frame.c (delete_frame): Block/unblock input to overcome race |
| 4491 | condition (Bug#15475). | 4525 | condition (Bug#15475). |
| 4492 | 4526 | ||
| 4493 | 2013-09-29 Andreas Politz <politza@hochschule-trier.de> (tiny change) | 4527 | 2013-09-29 Andreas Politz <politza@hochschule-trier.de> |
| 4494 | 4528 | ||
| 4495 | * frame.c (delete_frame): Record selected frame only after | 4529 | * frame.c (delete_frame): Record selected frame only after |
| 4496 | calling Qdelete_frame_functions (Bug#15477). | 4530 | calling Qdelete_frame_functions (Bug#15477). |
diff --git a/src/Makefile.in b/src/Makefile.in index 388923596c9..7e71d030279 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -259,7 +259,7 @@ W32_LIBS=@W32_LIBS@ | |||
| 259 | 259 | ||
| 260 | ## emacs.res if HAVE_W32 | 260 | ## emacs.res if HAVE_W32 |
| 261 | EMACSRES = @EMACSRES@ | 261 | EMACSRES = @EMACSRES@ |
| 262 | ## emacs-*.manifest if HAVE_W32 | 262 | ## emacs-*.manifest if WINDOWSNT |
| 263 | EMACS_MANIFEST = @EMACS_MANIFEST@ | 263 | EMACS_MANIFEST = @EMACS_MANIFEST@ |
| 264 | ## If HAVE_W32, compiler arguments for including | 264 | ## If HAVE_W32, compiler arguments for including |
| 265 | ## the resource file in the binary. | 265 | ## the resource file in the binary. |
diff --git a/src/alloc.c b/src/alloc.c index dbd1ece5d49..ea8d81648d7 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3357,6 +3357,13 @@ struct symbol_block | |||
| 3357 | 3357 | ||
| 3358 | static struct symbol_block *symbol_block; | 3358 | static struct symbol_block *symbol_block; |
| 3359 | static int symbol_block_index = SYMBOL_BLOCK_SIZE; | 3359 | static int symbol_block_index = SYMBOL_BLOCK_SIZE; |
| 3360 | /* Pointer to the first symbol_block that contains pinned symbols. | ||
| 3361 | Tests for 24.4 showed that at dump-time, Emacs contains about 15K symbols, | ||
| 3362 | 10K of which are pinned (and all but 250 of them are interned in obarray), | ||
| 3363 | whereas a "typical session" has in the order of 30K symbols. | ||
| 3364 | `symbol_block_pinned' lets mark_pinned_symbols scan only 15K symbols rather | ||
| 3365 | than 30K to find the 10K symbols we need to mark. */ | ||
| 3366 | static struct symbol_block *symbol_block_pinned; | ||
| 3360 | 3367 | ||
| 3361 | /* List of free symbols. */ | 3368 | /* List of free symbols. */ |
| 3362 | 3369 | ||
| @@ -3409,10 +3416,11 @@ Its value is void, and its function definition and property list are nil. */) | |||
| 3409 | SET_SYMBOL_VAL (p, Qunbound); | 3416 | SET_SYMBOL_VAL (p, Qunbound); |
| 3410 | set_symbol_function (val, Qnil); | 3417 | set_symbol_function (val, Qnil); |
| 3411 | set_symbol_next (val, NULL); | 3418 | set_symbol_next (val, NULL); |
| 3412 | p->gcmarkbit = 0; | 3419 | p->gcmarkbit = false; |
| 3413 | p->interned = SYMBOL_UNINTERNED; | 3420 | p->interned = SYMBOL_UNINTERNED; |
| 3414 | p->constant = 0; | 3421 | p->constant = 0; |
| 3415 | p->declared_special = 0; | 3422 | p->declared_special = false; |
| 3423 | p->pinned = false; | ||
| 3416 | consing_since_gc += sizeof (struct Lisp_Symbol); | 3424 | consing_since_gc += sizeof (struct Lisp_Symbol); |
| 3417 | symbols_consed++; | 3425 | symbols_consed++; |
| 3418 | total_free_symbols--; | 3426 | total_free_symbols--; |
| @@ -5214,6 +5222,8 @@ make_pure_c_string (const char *data, ptrdiff_t nchars) | |||
| 5214 | return string; | 5222 | return string; |
| 5215 | } | 5223 | } |
| 5216 | 5224 | ||
| 5225 | static Lisp_Object purecopy (Lisp_Object obj); | ||
| 5226 | |||
| 5217 | /* Return a cons allocated from pure space. Give it pure copies | 5227 | /* Return a cons allocated from pure space. Give it pure copies |
| 5218 | of CAR as car and CDR as cdr. */ | 5228 | of CAR as car and CDR as cdr. */ |
| 5219 | 5229 | ||
| @@ -5223,8 +5233,8 @@ pure_cons (Lisp_Object car, Lisp_Object cdr) | |||
| 5223 | Lisp_Object new; | 5233 | Lisp_Object new; |
| 5224 | struct Lisp_Cons *p = pure_alloc (sizeof *p, Lisp_Cons); | 5234 | struct Lisp_Cons *p = pure_alloc (sizeof *p, Lisp_Cons); |
| 5225 | XSETCONS (new, p); | 5235 | XSETCONS (new, p); |
| 5226 | XSETCAR (new, Fpurecopy (car)); | 5236 | XSETCAR (new, purecopy (car)); |
| 5227 | XSETCDR (new, Fpurecopy (cdr)); | 5237 | XSETCDR (new, purecopy (cdr)); |
| 5228 | return new; | 5238 | return new; |
| 5229 | } | 5239 | } |
| 5230 | 5240 | ||
| @@ -5265,9 +5275,19 @@ Does not copy symbols. Copies strings without text properties. */) | |||
| 5265 | { | 5275 | { |
| 5266 | if (NILP (Vpurify_flag)) | 5276 | if (NILP (Vpurify_flag)) |
| 5267 | return obj; | 5277 | return obj; |
| 5268 | 5278 | else if (MARKERP (obj) || OVERLAYP (obj) | |
| 5269 | if (PURE_POINTER_P (XPNTR (obj))) | 5279 | || HASH_TABLE_P (obj) || SYMBOLP (obj)) |
| 5280 | /* Can't purify those. */ | ||
| 5270 | return obj; | 5281 | return obj; |
| 5282 | else | ||
| 5283 | return purecopy (obj); | ||
| 5284 | } | ||
| 5285 | |||
| 5286 | static Lisp_Object | ||
| 5287 | purecopy (Lisp_Object obj) | ||
| 5288 | { | ||
| 5289 | if (PURE_POINTER_P (XPNTR (obj)) || INTEGERP (obj) || SUBRP (obj)) | ||
| 5290 | return obj; /* Already pure. */ | ||
| 5271 | 5291 | ||
| 5272 | if (HASH_TABLE_P (Vpurify_flag)) /* Hash consing. */ | 5292 | if (HASH_TABLE_P (Vpurify_flag)) /* Hash consing. */ |
| 5273 | { | 5293 | { |
| @@ -5295,7 +5315,7 @@ Does not copy symbols. Copies strings without text properties. */) | |||
| 5295 | size &= PSEUDOVECTOR_SIZE_MASK; | 5315 | size &= PSEUDOVECTOR_SIZE_MASK; |
| 5296 | vec = XVECTOR (make_pure_vector (size)); | 5316 | vec = XVECTOR (make_pure_vector (size)); |
| 5297 | for (i = 0; i < size; i++) | 5317 | for (i = 0; i < size; i++) |
| 5298 | vec->contents[i] = Fpurecopy (AREF (obj, i)); | 5318 | vec->contents[i] = purecopy (AREF (obj, i)); |
| 5299 | if (COMPILEDP (obj)) | 5319 | if (COMPILEDP (obj)) |
| 5300 | { | 5320 | { |
| 5301 | XSETPVECTYPE (vec, PVEC_COMPILED); | 5321 | XSETPVECTYPE (vec, PVEC_COMPILED); |
| @@ -5304,11 +5324,23 @@ Does not copy symbols. Copies strings without text properties. */) | |||
| 5304 | else | 5324 | else |
| 5305 | XSETVECTOR (obj, vec); | 5325 | XSETVECTOR (obj, vec); |
| 5306 | } | 5326 | } |
| 5307 | else if (MARKERP (obj)) | 5327 | else if (SYMBOLP (obj)) |
| 5308 | error ("Attempt to copy a marker to pure storage"); | 5328 | { |
| 5329 | if (!XSYMBOL (obj)->pinned) | ||
| 5330 | { /* We can't purify them, but they appear in many pure objects. | ||
| 5331 | Mark them as `pinned' so we know to mark them at every GC cycle. */ | ||
| 5332 | XSYMBOL (obj)->pinned = true; | ||
| 5333 | symbol_block_pinned = symbol_block; | ||
| 5334 | } | ||
| 5335 | return obj; | ||
| 5336 | } | ||
| 5309 | else | 5337 | else |
| 5310 | /* Not purified, don't hash-cons. */ | 5338 | { |
| 5311 | return obj; | 5339 | Lisp_Object args[2]; |
| 5340 | args[0] = build_pure_c_string ("Don't know how to purify: %S"); | ||
| 5341 | args[1] = obj; | ||
| 5342 | Fsignal (Qerror, (Fcons (Fformat (2, args), Qnil))); | ||
| 5343 | } | ||
| 5312 | 5344 | ||
| 5313 | if (HASH_TABLE_P (Vpurify_flag)) /* Hash consing. */ | 5345 | if (HASH_TABLE_P (Vpurify_flag)) /* Hash consing. */ |
| 5314 | Fputhash (obj, obj, Vpurify_flag); | 5346 | Fputhash (obj, obj, Vpurify_flag); |
| @@ -5471,6 +5503,24 @@ compact_undo_list (Lisp_Object list) | |||
| 5471 | return list; | 5503 | return list; |
| 5472 | } | 5504 | } |
| 5473 | 5505 | ||
| 5506 | static void | ||
| 5507 | mark_pinned_symbols (void) | ||
| 5508 | { | ||
| 5509 | struct symbol_block *sblk; | ||
| 5510 | int lim = (symbol_block_pinned == symbol_block | ||
| 5511 | ? symbol_block_index : SYMBOL_BLOCK_SIZE); | ||
| 5512 | |||
| 5513 | for (sblk = symbol_block_pinned; sblk; sblk = sblk->next) | ||
| 5514 | { | ||
| 5515 | union aligned_Lisp_Symbol *sym = sblk->symbols, *end = sym + lim; | ||
| 5516 | for (; sym < end; ++sym) | ||
| 5517 | if (sym->s.pinned) | ||
| 5518 | mark_object (make_lisp_ptr (&sym->s, Lisp_Symbol)); | ||
| 5519 | |||
| 5520 | lim = SYMBOL_BLOCK_SIZE; | ||
| 5521 | } | ||
| 5522 | } | ||
| 5523 | |||
| 5474 | DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", | 5524 | DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", |
| 5475 | doc: /* Reclaim storage for Lisp objects no longer needed. | 5525 | doc: /* Reclaim storage for Lisp objects no longer needed. |
| 5476 | Garbage collection happens automatically if you cons more than | 5526 | Garbage collection happens automatically if you cons more than |
| @@ -5573,6 +5623,7 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5573 | for (i = 0; i < staticidx; i++) | 5623 | for (i = 0; i < staticidx; i++) |
| 5574 | mark_object (*staticvec[i]); | 5624 | mark_object (*staticvec[i]); |
| 5575 | 5625 | ||
| 5626 | mark_pinned_symbols (); | ||
| 5576 | mark_specpdl (); | 5627 | mark_specpdl (); |
| 5577 | mark_terminals (); | 5628 | mark_terminals (); |
| 5578 | mark_kboards (); | 5629 | mark_kboards (); |
| @@ -6574,12 +6625,7 @@ sweep_symbols (void) | |||
| 6574 | 6625 | ||
| 6575 | for (; sym < end; ++sym) | 6626 | for (; sym < end; ++sym) |
| 6576 | { | 6627 | { |
| 6577 | /* Check if the symbol was created during loadup. In such a case | 6628 | if (!sym->s.gcmarkbit) |
| 6578 | it might be pointed to by pure bytecode which we don't trace, | ||
| 6579 | so we conservatively assume that it is live. */ | ||
| 6580 | bool pure_p = PURE_POINTER_P (XSTRING (sym->s.name)); | ||
| 6581 | |||
| 6582 | if (!sym->s.gcmarkbit && !pure_p) | ||
| 6583 | { | 6629 | { |
| 6584 | if (sym->s.redirect == SYMBOL_LOCALIZED) | 6630 | if (sym->s.redirect == SYMBOL_LOCALIZED) |
| 6585 | xfree (SYMBOL_BLV (&sym->s)); | 6631 | xfree (SYMBOL_BLV (&sym->s)); |
| @@ -6593,8 +6639,6 @@ sweep_symbols (void) | |||
| 6593 | else | 6639 | else |
| 6594 | { | 6640 | { |
| 6595 | ++num_used; | 6641 | ++num_used; |
| 6596 | if (!pure_p) | ||
| 6597 | eassert (!STRING_MARKED_P (XSTRING (sym->s.name))); | ||
| 6598 | sym->s.gcmarkbit = 0; | 6642 | sym->s.gcmarkbit = 0; |
| 6599 | } | 6643 | } |
| 6600 | } | 6644 | } |
diff --git a/src/bidi.c b/src/bidi.c index b96cc24bbd1..53c2dad1b6b 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -22,9 +22,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | A sequential implementation of the Unicode Bidirectional algorithm, | 22 | A sequential implementation of the Unicode Bidirectional algorithm, |
| 23 | (UBA) as per UAX#9, a part of the Unicode Standard. | 23 | (UBA) as per UAX#9, a part of the Unicode Standard. |
| 24 | 24 | ||
| 25 | Unlike the reference and most other implementations, this one is | 25 | Unlike the Reference Implementation and most other implementations, |
| 26 | designed to be called once for every character in the buffer or | 26 | this one is designed to be called once for every character in the |
| 27 | string. | 27 | buffer or string. That way, we can leave intact the design of the |
| 28 | Emacs display engine, whereby an iterator object is used to | ||
| 29 | traverse buffer or string text character by character, and generate | ||
| 30 | the necessary data for displaying each character in 'struct glyph' | ||
| 31 | objects. (See xdisp.c for the details of that iteration.) The | ||
| 32 | functions on this file replace the original linear iteration in the | ||
| 33 | logical order of the text with a non-linear iteration in the visual | ||
| 34 | order, i.e. in the order characters should be shown on display. | ||
| 28 | 35 | ||
| 29 | The main entry point is bidi_move_to_visually_next. Each time it | 36 | The main entry point is bidi_move_to_visually_next. Each time it |
| 30 | is called, it finds the next character in the visual order, and | 37 | is called, it finds the next character in the visual order, and |
| @@ -52,7 +59,182 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | A note about references to UAX#9 rules: if the reference says | 59 | A note about references to UAX#9 rules: if the reference says |
| 53 | something like "X9/Retaining", it means that you need to refer to | 60 | something like "X9/Retaining", it means that you need to refer to |
| 54 | rule X9 and to its modifications described in the "Implementation | 61 | rule X9 and to its modifications described in the "Implementation |
| 55 | Notes" section of UAX#9, under "Retaining Format Codes". */ | 62 | Notes" section of UAX#9, under "Retaining Format Codes". |
| 63 | |||
| 64 | Here's the overview of the design of the reordering engine | ||
| 65 | implemented by this file. | ||
| 66 | |||
| 67 | Basic implementation structure | ||
| 68 | ------------------------------ | ||
| 69 | |||
| 70 | The sequential processing steps described by UAX#9 are implemented | ||
| 71 | as recursive levels of processing, all of which examine the next | ||
| 72 | character in the logical order. This hierarchy of processing looks | ||
| 73 | as follows, from the innermost (deepest) to the outermost level, | ||
| 74 | omitting some subroutines used by each level: | ||
| 75 | |||
| 76 | bidi_fetch_char -- fetch next character | ||
| 77 | bidi_resolve_explicit -- resolve explicit levels and directions | ||
| 78 | bidi_resolve_weak -- resolve weak types | ||
| 79 | bidi_resolve_neutral -- resolve neutral types | ||
| 80 | bidi_level_of_next_char -- resolve implicit levels | ||
| 81 | |||
| 82 | Each level calls the level below it, and works on the result | ||
| 83 | returned by the lower level, including all of its sub-levels. | ||
| 84 | |||
| 85 | Unlike all the levels below it, bidi_level_of_next_char can return | ||
| 86 | the information about either the next or previous character in the | ||
| 87 | logical order, depending on the current direction of scanning the | ||
| 88 | buffer or string. For the next character, it calls all the levels | ||
| 89 | below it; for the previous character, it uses the cache, described | ||
| 90 | below. | ||
| 91 | |||
| 92 | Thus, the result of calling bidi_level_of_next_char is the resolved | ||
| 93 | level of the next or the previous character in the logical order. | ||
| 94 | Based on this information, the function bidi_move_to_visually_next | ||
| 95 | finds the next character in the visual order and updates the | ||
| 96 | direction in which the buffer is scanned, either forward or | ||
| 97 | backward, to find the next character to be displayed. (Text is | ||
| 98 | scanned backwards when it needs to be reversed for display, i.e. if | ||
| 99 | the visual order is the inverse of the logical order.) This | ||
| 100 | implements the last, reordering steps of the UBA, by successively | ||
| 101 | calling bidi_level_of_next_char until the character of the required | ||
| 102 | embedding level is found; the scan direction is dynamically updated | ||
| 103 | as a side effect. See the commentary before the 'while' loop in | ||
| 104 | bidi_move_to_visually_next, for the details. | ||
| 105 | |||
| 106 | Fetching characters | ||
| 107 | ------------------- | ||
| 108 | |||
| 109 | In a nutshell, fetching the next character boils down to calling | ||
| 110 | STRING_CHAR_AND_LENGTH, passing it the address of a buffer or | ||
| 111 | string position. See bidi_fetch_char. However, if the next | ||
| 112 | character is "covered" by a display property of some kind, | ||
| 113 | bidi_fetch_char returns the u+FFFC "object replacement character" | ||
| 114 | that represents the entire run of text covered by the display | ||
| 115 | property. (The ch_len and nchars members of 'struct bidi_it' | ||
| 116 | reflect the length in bytes and characters of that text.) This is | ||
| 117 | so we reorder text on both sides of the display property as | ||
| 118 | appropriate for an image or embedded string. Similarly, text | ||
| 119 | covered by a display spec of the form '(space ...)', is replaced | ||
| 120 | with the u+2029 paragraph separator character, so such display | ||
| 121 | specs produce the same effect as a TAB under UBA. Both these | ||
| 122 | special characters are not actually displayed -- the display | ||
| 123 | property is displayed instead -- but just used to compute the | ||
| 124 | embedding level of the surrounding text so as to produce the | ||
| 125 | required effect. | ||
| 126 | |||
| 127 | Bidi iterator states | ||
| 128 | -------------------- | ||
| 129 | |||
| 130 | The UBA is highly context dependent in some of its parts, | ||
| 131 | i.e. results of processing a character can generally depend on | ||
| 132 | characters very far away. The UAX#9 description of the UBA | ||
| 133 | prescribes a stateful processing of each character, whereby the | ||
| 134 | results of this processing depend on various state variables, such | ||
| 135 | as the current embedding level, level stack, and directional | ||
| 136 | override status. In addition, the UAX#9 description includes many | ||
| 137 | passages like this (from rule W2 in this case): | ||
| 138 | |||
| 139 | Search backward from each instance of a European number until the | ||
| 140 | first strong type (R, L, AL, or sos) is found. If an AL is found, | ||
| 141 | change the type of the European number to Arabic number. | ||
| 142 | |||
| 143 | To support this, we use a bidi iterator object, 'struct bidi_it', | ||
| 144 | which is a sub-structure of 'struct it' used by xdisp.c (see | ||
| 145 | dispextern.h for the definition of both of these structures). The | ||
| 146 | bidi iterator holds the entire state of the iteration required by | ||
| 147 | the UBA, and is updated as the text is traversed. In particular, | ||
| 148 | the embedding level of the current character being resolved is | ||
| 149 | recorded in the iterator state. To avoid costly searches backward | ||
| 150 | in support of rules like W2 above, the necessary character types | ||
| 151 | are also recorded in the iterator state as they are found during | ||
| 152 | the forward scan, and then used when such rules need to be applied. | ||
| 153 | (Forward scans cannot be avoided in this way; they need to be | ||
| 154 | performed at least once, and the results recorded in the iterator | ||
| 155 | state, to be reused until the forward scan oversteps the recorded | ||
| 156 | position.) | ||
| 157 | |||
| 158 | In this manner, the iterator state acts as a mini-cache of | ||
| 159 | contextual information required for resolving the level of the | ||
| 160 | current character by various UBA rules. | ||
| 161 | |||
| 162 | Caching of bidi iterator states | ||
| 163 | ------------------------------- | ||
| 164 | |||
| 165 | As described above, the reordering engine uses the information | ||
| 166 | recorded in the bidi iterator state in order to resolve the | ||
| 167 | embedding level of the current character. When the reordering | ||
| 168 | engine needs to process the next character in the logical order, it | ||
| 169 | fetches it and applies to it all the UBA levels, updating the | ||
| 170 | iterator state as it goes. But when the buffer or string is | ||
| 171 | scanned backwards, i.e. in the reverse order of buffer/string | ||
| 172 | positions, the scanned characters were already processed during the | ||
| 173 | preceding forward scan (see bidi_find_other_level_edge). To avoid | ||
| 174 | costly re-processing of characters that were already processed | ||
| 175 | during the forward scan, the iterator states computed while | ||
| 176 | scanning forward are cached. | ||
| 177 | |||
| 178 | The cache is just a linear array of 'struct bidi_it' objects, which | ||
| 179 | is dynamically allocated and reallocated as needed, since the size | ||
| 180 | of the cache depends on the text being processed. We only need the | ||
| 181 | cache while processing embedded levels higher than the base | ||
| 182 | paragraph embedding level, because these higher levels require | ||
| 183 | changes in scan direction. Therefore, as soon as we are back to | ||
| 184 | the base embedding level, we can free the cache; see the calls to | ||
| 185 | bidi_cache_reset and bidi_cache_shrink, for the conditions to do | ||
| 186 | this. | ||
| 187 | |||
| 188 | The cache maintains the index of the next unused cache slot -- this | ||
| 189 | is where the next iterator state will be cached. The function | ||
| 190 | bidi_cache_iterator_state saves an instance of the state in the | ||
| 191 | cache and increments the unused slot index. The companion function | ||
| 192 | bidi_cache_find looks up a cached state that corresponds to a given | ||
| 193 | buffer/string position. All of the cached states must correspond | ||
| 194 | 1:1 to the buffer or string region whose processing they reflect; | ||
| 195 | bidi.c will abort if it finds cache slots that violate this 1:1 | ||
| 196 | correspondence. | ||
| 197 | |||
| 198 | When the parent iterator 'struct it' is pushed (see push_it in | ||
| 199 | xdisp.c) to pause the current iteration and start iterating over a | ||
| 200 | different object (e.g., a 'display' string that covers some buffer | ||
| 201 | text), the bidi iterator cache needs to be "pushed" as well, so | ||
| 202 | that a new empty cache could be used while iterating over the new | ||
| 203 | object. Later, when the new object is exhausted, and xdisp.c calls | ||
| 204 | pop_it, we need to "pop" the bidi cache as well and return to the | ||
| 205 | original cache. See bidi_push_it and bidi_pop_it for how this is | ||
| 206 | done. | ||
| 207 | |||
| 208 | Some functions of the display engine save copies of 'struct it' in | ||
| 209 | local variables, and restore them later. For examples, see | ||
| 210 | pos_visible_p and move_it_in_display_line_to in xdisp.c, and | ||
| 211 | window_scroll_pixel_based in window.c. When this happens, we need | ||
| 212 | to save and restore the bidi cache as well, because conceptually | ||
| 213 | the cache is part of the 'struct it' state, and needs to be in | ||
| 214 | perfect sync with the portion of the buffer/string that is being | ||
| 215 | processed. This saving and restoring of the cache state is handled | ||
| 216 | by bidi_shelve_cache and bidi_unshelve_cache, and the helper macros | ||
| 217 | SAVE_IT and RESTORE_IT defined on xdisp.c. | ||
| 218 | |||
| 219 | Note that, because reordering is implemented below the level in | ||
| 220 | xdisp.c that breaks glyphs into screen lines, we are violating | ||
| 221 | paragraph 3.4 of UAX#9. which mandates that line breaking shall be | ||
| 222 | done before reordering each screen line separately. However, | ||
| 223 | following UAX#9 to the letter in this matter goes against the basic | ||
| 224 | design of the Emacs display engine, and so we choose here this | ||
| 225 | minor deviation from the UBA letter in preference to redesign of | ||
| 226 | the display engine. The effect of this is only seen in continued | ||
| 227 | lines that are broken into screen lines in the middle of a run | ||
| 228 | whose direction is opposite to the paragraph's base direction. | ||
| 229 | |||
| 230 | Important design and implementation note: when the code needs to | ||
| 231 | scan far ahead, be sure to avoid such scans as much as possible | ||
| 232 | when the buffer/string doesn't contain any RTL characters. Users | ||
| 233 | of left-to-right scripts will never forgive you if you introduce | ||
| 234 | some slow-down due to bidi in situations that don't involve any | ||
| 235 | bidirectional text. See the large comment near the beginning of | ||
| 236 | bidi_resolve_neutral, for one situation where such shortcut was | ||
| 237 | necessary. */ | ||
| 56 | 238 | ||
| 57 | #include <config.h> | 239 | #include <config.h> |
| 58 | #include <stdio.h> | 240 | #include <stdio.h> |
diff --git a/src/buffer.h b/src/buffer.h index d461415e036..de117eb9c61 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -847,8 +847,8 @@ struct buffer | |||
| 847 | struct region_cache *width_run_cache; | 847 | struct region_cache *width_run_cache; |
| 848 | struct region_cache *bidi_paragraph_cache; | 848 | struct region_cache *bidi_paragraph_cache; |
| 849 | 849 | ||
| 850 | /* Non-zero means don't use redisplay optimizations for | 850 | /* Non-zero means disable redisplay optimizations when rebuilding the glyph |
| 851 | displaying this buffer. */ | 851 | matrices (but not when redrawing). */ |
| 852 | bool_bf prevent_redisplay_optimizations_p : 1; | 852 | bool_bf prevent_redisplay_optimizations_p : 1; |
| 853 | 853 | ||
| 854 | /* Non-zero whenever the narrowing is changed in this buffer. */ | 854 | /* Non-zero whenever the narrowing is changed in this buffer. */ |
diff --git a/src/frame.h b/src/frame.h index 62dc33511b5..ff696df9eff 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -375,7 +375,8 @@ struct frame | |||
| 375 | set this directly, use SET_FRAME_ICONIFIED instead. */ | 375 | set this directly, use SET_FRAME_ICONIFIED instead. */ |
| 376 | bool_bf iconified : 1; | 376 | bool_bf iconified : 1; |
| 377 | 377 | ||
| 378 | /* True if this frame should be redrawn. */ | 378 | /* True if this frame should be fully redisplayed. Disables all |
| 379 | optimizations while rebuilding matrices and redrawing. */ | ||
| 379 | bool_bf garbaged : 1; | 380 | bool_bf garbaged : 1; |
| 380 | 381 | ||
| 381 | /* False means, if this frame has just one window, | 382 | /* False means, if this frame has just one window, |
diff --git a/src/keyboard.c b/src/keyboard.c index 277d4f1047c..87a2f91a17c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Keyboard and mouse input; editor command loop. | 1 | /* Keyboard and mouse input; editor command loop. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1993-1997, 1999-2014 Free Software Foundation, | 3 | Copyright (C) 1985-1989, 1993-1997, 1999-2014 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 7 | 6 | ||
| @@ -2379,7 +2378,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time, | |||
| 2379 | -2 means do neither. | 2378 | -2 means do neither. |
| 2380 | 1 means do both. */ | 2379 | 1 means do both. */ |
| 2381 | 2380 | ||
| 2382 | /* The arguments MAP is for menu prompting. MAP is a keymap. | 2381 | /* The argument MAP is a keymap for menu prompting. |
| 2383 | 2382 | ||
| 2384 | PREV_EVENT is the previous input event, or nil if we are reading | 2383 | PREV_EVENT is the previous input event, or nil if we are reading |
| 2385 | the first event of a key sequence (or not reading a key sequence). | 2384 | the first event of a key sequence (or not reading a key sequence). |
| @@ -10068,7 +10067,10 @@ DEFUN ("open-dribble-file", Fopen_dribble_file, Sopen_dribble_file, 1, 1, | |||
| 10068 | "FOpen dribble file: ", | 10067 | "FOpen dribble file: ", |
| 10069 | doc: /* Start writing all keyboard characters to a dribble file called FILE. | 10068 | doc: /* Start writing all keyboard characters to a dribble file called FILE. |
| 10070 | If FILE is nil, close any open dribble file. | 10069 | If FILE is nil, close any open dribble file. |
| 10071 | The file will be closed when Emacs exits. */) | 10070 | The file will be closed when Emacs exits. |
| 10071 | |||
| 10072 | Be aware that this records ALL characters you type! | ||
| 10073 | This may include sensitive information such as passwords. */) | ||
| 10072 | (Lisp_Object file) | 10074 | (Lisp_Object file) |
| 10073 | { | 10075 | { |
| 10074 | if (dribble) | 10076 | if (dribble) |
diff --git a/src/lisp.h b/src/lisp.h index 03c0d99fb27..264b8832092 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1572,6 +1572,9 @@ struct Lisp_Symbol | |||
| 1572 | special (with `defvar' etc), and shouldn't be lexically bound. */ | 1572 | special (with `defvar' etc), and shouldn't be lexically bound. */ |
| 1573 | bool_bf declared_special : 1; | 1573 | bool_bf declared_special : 1; |
| 1574 | 1574 | ||
| 1575 | /* True if pointed to from purespace and hence can't be GC'd. */ | ||
| 1576 | bool_bf pinned : 1; | ||
| 1577 | |||
| 1575 | /* The symbol's name, as a Lisp string. */ | 1578 | /* The symbol's name, as a Lisp string. */ |
| 1576 | Lisp_Object name; | 1579 | Lisp_Object name; |
| 1577 | 1580 | ||
diff --git a/test/ChangeLog b/test/ChangeLog index 4b1e352051b..2ef22c9a4c6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | 2014-04-07 João Távora <joaotavora@gmail.com> | ||
| 2 | |||
| 3 | * automated/electric-tests.el (define-electric-pair-test): Don't | ||
| 4 | overtest.. | ||
| 5 | (inhibit-in-mismatched-string-inside-ruby-comments): New test. | ||
| 6 | (inhibit-in-mismatched-string-inside-c-comments): New test. | ||
| 7 | |||
| 8 | 2014-04-07 João Távora <joaotavora@gmail.com> | ||
| 9 | |||
| 10 | * automated/electric-tests.el (inhibit-if-strings-mismatched): | ||
| 11 | New test, change from `inhibit-only-of-next-is-mismatched'. | ||
| 12 | |||
| 13 | 2014-04-06 João Távora <joaotavora@gmail.com> | ||
| 14 | |||
| 15 | * automated/python-tests.el (python-triple-quote-pairing): New test. | ||
| 16 | (python-syntax-after-python-backspace): New test. | ||
| 17 | |||
| 18 | 2014-04-06 João Távora <joaotavora@gmail.com> | ||
| 19 | |||
| 20 | * automated/electric-tests.el (electric-pair-define-test-form): | ||
| 21 | More readable test docstrings. | ||
| 22 | (whitespace-skipping-for-quotes-not-ouside) | ||
| 23 | (whitespace-skipping-for-quotes-only-inside) | ||
| 24 | (whitespace-skipping-for-quotes-in-text-mode): New tests. | ||
| 25 | |||
| 1 | 2014-04-04 João Távora <joaotavora@gmail.com> | 26 | 2014-04-04 João Távora <joaotavora@gmail.com> |
| 2 | 27 | ||
| 3 | * automated/electric-tests.el (define-electric-pair-test): Don't | 28 | * automated/electric-tests.el (define-electric-pair-test): Don't |
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el index 9f0973e16b3..bcef9cc2adb 100644 --- a/test/automated/electric-tests.el +++ b/test/automated/electric-tests.el | |||
| @@ -114,8 +114,8 @@ | |||
| 114 | mode | 114 | mode |
| 115 | extra-desc)) | 115 | extra-desc)) |
| 116 | () | 116 | () |
| 117 | ,(format "With \"%s\", try input %c at point %d. \ | 117 | ,(format "With |%s|, try input %c at point %d. \ |
| 118 | Should %s \"%s\" and point at %d" | 118 | Should %s |%s| and point at %d" |
| 119 | fixture | 119 | fixture |
| 120 | char | 120 | char |
| 121 | (1+ pos) | 121 | (1+ pos) |
| @@ -383,6 +383,31 @@ baz\"\"" | |||
| 383 | :test-in-code nil | 383 | :test-in-code nil |
| 384 | :test-in-comments t) | 384 | :test-in-comments t) |
| 385 | 385 | ||
| 386 | (define-electric-pair-test whitespace-skipping-for-quotes-not-ouside | ||
| 387 | " \" \"" "\"-----" :expected-string "\"\" \" \"" | ||
| 388 | :expected-point 2 | ||
| 389 | :bindings '((electric-pair-skip-whitespace . chomp)) | ||
| 390 | :test-in-strings nil | ||
| 391 | :test-in-code t | ||
| 392 | :test-in-comments nil) | ||
| 393 | |||
| 394 | (define-electric-pair-test whitespace-skipping-for-quotes-only-inside | ||
| 395 | " \" \"" "---\"--" :expected-string " \"\"" | ||
| 396 | :expected-point 5 | ||
| 397 | :bindings '((electric-pair-skip-whitespace . chomp)) | ||
| 398 | :test-in-strings nil | ||
| 399 | :test-in-code t | ||
| 400 | :test-in-comments nil) | ||
| 401 | |||
| 402 | (define-electric-pair-test whitespace-skipping-quotes-not-without-proper-syntax | ||
| 403 | " \" \"" "---\"--" :expected-string " \"\"\" \"" | ||
| 404 | :expected-point 5 | ||
| 405 | :modes '(text-mode) | ||
| 406 | :bindings '((electric-pair-skip-whitespace . chomp)) | ||
| 407 | :test-in-strings nil | ||
| 408 | :test-in-code t | ||
| 409 | :test-in-comments nil) | ||
| 410 | |||
| 386 | 411 | ||
| 387 | ;;; Pairing arbitrary characters | 412 | ;;; Pairing arbitrary characters |
| 388 | ;;; | 413 | ;;; |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index dc58138ced4..8fe8f71264f 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -134,6 +134,16 @@ aliqua." | |||
| 134 | 134 | ||
| 135 | ;;; Font-lock and syntax | 135 | ;;; Font-lock and syntax |
| 136 | 136 | ||
| 137 | (ert-deftest python-syntax-after-python-backspace () | ||
| 138 | ;; `python-indent-dedent-line-backspace' garbles syntax | ||
| 139 | :expected-result :failed | ||
| 140 | (python-tests-with-temp-buffer | ||
| 141 | "\"\"\"" | ||
| 142 | (goto-char (point-max)) | ||
| 143 | (python-indent-dedent-line-backspace 1) | ||
| 144 | (should (string= (buffer-string) "\"\"")) | ||
| 145 | (should (null (nth 3 (syntax-ppss)))))) | ||
| 146 | |||
| 137 | 147 | ||
| 138 | ;;; Indentation | 148 | ;;; Indentation |
| 139 | 149 | ||
| @@ -2696,6 +2706,9 @@ def foo(a, b, c): | |||
| 2696 | (equal (symbol-value (car ccons)) (cdr ccons))))) | 2706 | (equal (symbol-value (car ccons)) (cdr ccons))))) |
| 2697 | (kill-buffer buffer))) | 2707 | (kill-buffer buffer))) |
| 2698 | 2708 | ||
| 2709 | |||
| 2710 | ;;; Electricity | ||
| 2711 | |||
| 2699 | (ert-deftest python-util-forward-comment-1 () | 2712 | (ert-deftest python-util-forward-comment-1 () |
| 2700 | (python-tests-with-temp-buffer | 2713 | (python-tests-with-temp-buffer |
| 2701 | (concat | 2714 | (concat |
| @@ -2708,6 +2721,32 @@ def foo(a, b, c): | |||
| 2708 | (python-util-forward-comment -1) | 2721 | (python-util-forward-comment -1) |
| 2709 | (should (= (point) (point-min))))) | 2722 | (should (= (point) (point-min))))) |
| 2710 | 2723 | ||
| 2724 | (ert-deftest python-triple-quote-pairing () | ||
| 2725 | (python-tests-with-temp-buffer | ||
| 2726 | "\"\"\n" | ||
| 2727 | (goto-char (1- (point-max))) | ||
| 2728 | (let ((last-command-event ?\")) | ||
| 2729 | (call-interactively 'self-insert-command)) | ||
| 2730 | (should (string= (buffer-string) | ||
| 2731 | "\"\"\"\"\"\"\n")) | ||
| 2732 | (should (= (point) 4))) | ||
| 2733 | (python-tests-with-temp-buffer | ||
| 2734 | "\n" | ||
| 2735 | (let ((last-command-event ?\")) | ||
| 2736 | (dotimes (i 3) | ||
| 2737 | (call-interactively 'self-insert-command))) | ||
| 2738 | (should (string= (buffer-string) | ||
| 2739 | "\"\"\"\"\"\"\n")) | ||
| 2740 | (should (= (point) 4))) | ||
| 2741 | (python-tests-with-temp-buffer | ||
| 2742 | "\"\n\"\"\n" | ||
| 2743 | (goto-char (1- (point-max))) | ||
| 2744 | (let ((last-command-event ?\")) | ||
| 2745 | (call-interactively 'self-insert-command)) | ||
| 2746 | (should (= (point) (1- (point-max)))) | ||
| 2747 | (should (string= (buffer-string) | ||
| 2748 | "\"\n\"\"\"\n")))) | ||
| 2749 | |||
| 2711 | 2750 | ||
| 2712 | (provide 'python-tests) | 2751 | (provide 'python-tests) |
| 2713 | 2752 | ||
diff --git a/test/indent/perl.perl b/test/indent/perl.perl index 69c1f90c807..7cb877b0a95 100755 --- a/test/indent/perl.perl +++ b/test/indent/perl.perl | |||
| @@ -16,5 +16,9 @@ EOF1 | |||
| 16 | bar | 16 | bar |
| 17 | EOF2 | 17 | EOF2 |
| 18 | 18 | ||
| 19 | print $'; # This should not start a string! | ||
| 20 | |||
| 21 | print "hello" for /./; | ||
| 22 | |||
| 19 | $fileType_filesButNot # bug#12373? | 23 | $fileType_filesButNot # bug#12373? |
| 20 | = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} ); | 24 | = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} ); |