commit 32a488344057f210b51f4618feb3a85799eef0c5 (HEAD, refs/remotes/origin/master) Author: Nils Ackermann Date: Tue Jun 16 09:24:47 2015 +0200 Improve reftex-label-regexps default value * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Make keyvals label regexp more strict to better cope with unbalanced brackets common in math documents. diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 7f050e9..a8f5fce 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -876,7 +876,7 @@ DOWNCASE t: Downcase words before using them." "\\\\label{\\(?1:[^}]*\\)}" ;; keyvals [..., label = {foo}, ...] forms used by ctable, ;; listings, minted, ... - "\\[[^]]*\\ Date: Tue Jun 16 00:01:21 2015 -0700 * doc/emacs/calendar.texi (Format of Diary File): Move "nonmarking" from here... (Displaying the Diary): ... to here. diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 6a387e6..6b21dda 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -966,16 +966,15 @@ preceding entry are ignored. Here's an example: @example 12/22/2015 Twentieth wedding anniversary! -&1/1. Happy New Year! 10/22 Ruth's birthday. * 21, *: Payday Tuesday--weekly meeting with grad students at 10am Supowit, Shen, Bitner, and Kapoor to attend. 1/13/89 Friday the thirteenth!! -&thu 4pm squash game with Lloyd. +thu 4pm squash game with Lloyd. mar 16 Dad's birthday April 15, 2016 Income tax due. -&* 15 time cards due. +* 15 time cards due. @end example @noindent @@ -1010,16 +1009,6 @@ continuation lines appear. This style of entry looks neater when you display just a single day's entries, but can cause confusion if you ask for more than one day's entries. -@vindex diary-nonmarking-symbol - You can inhibit the marking of certain diary entries in the calendar -window; to do this, insert the string that -@code{diary-nonmarking-symbol} specifies (default @samp{&}) at the -beginning of the entry, before the date. This -has no effect on display of the entry in the diary window; it only -affects marks on dates in the calendar window. Nonmarking entries are -especially useful for generic entries that would otherwise mark many -different dates. - @node Displaying the Diary @subsection Displaying the Diary @@ -1050,9 +1039,9 @@ Mail yourself email reminders about upcoming diary entries. @kindex d @r{(Calendar mode)} @findex diary-view-entries @vindex calendar-view-diary-initially-flag - Displaying the diary entries with @kbd{d} shows in a separate window + Displaying the diary entries with @kbd{d} shows in a separate buffer the diary entries for the selected date in the calendar. The mode line -of the new window shows the date of the diary entries. Holidays are +of the new buffer shows the date of the diary entries. Holidays are shown either in the buffer or in the mode line, depending on the display method you choose @iftex @@ -1092,6 +1081,15 @@ turns off holiday marks (@pxref{Holidays}). If the variable @code{calendar-mark-diary-entries-flag} is non-@code{nil}, creating or updating the calendar marks diary dates automatically. +@vindex diary-nonmarking-symbol + To prevent an individual diary entry from being marked in the +calendar, insert the string that @code{diary-nonmarking-symbol} +specifies (the default is @samp{&}) at the beginning of the entry, +before the date. This has no effect on display of the entry in the +diary buffer; it only affects marks on dates in the calendar. +Nonmarking entries can be useful for generic entries that would +otherwise mark many different dates. + @kindex s @r{(Calendar mode)} @findex diary-show-all-entries To see the full diary file, rather than just some of the entries, use commit b73912bd2ecb1ca1250286b0bf7ce9672c53323f Author: Glenn Morris Date: Mon Jun 15 23:53:24 2015 -0700 * doc/emacs/calendar.texi (Format of Diary File, Displaying the Diary): Swap the order of these nodes. * doc/emacs/emacs.texi: Update detailed menu for the above change. diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 92f5c91..6a387e6 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -929,13 +929,97 @@ provides a number of commands to let you view, add, and change diary entries. @menu -* Displaying the Diary:: Viewing diary entries and associated calendar dates. * Format of Diary File:: Entering events in your diary. +* Displaying the Diary:: Viewing diary entries and associated calendar dates. * Date Formats:: Various ways you can specify dates. * Adding to Diary:: Commands to create diary entries. * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc. @end menu +@node Format of Diary File +@subsection The Diary File +@cindex diary file + +@vindex diary-file + Your @dfn{diary file} is a file that records events associated with +particular dates. The name of the diary file is specified by the +variable @code{diary-file}. The default is @file{~/.emacs.d/diary}, +though for compatibility with older versions Emacs will use +@file{~/diary} if it exists. +@ignore +@c I don't think this is relevant any more. The utility doesn't seem +@c to be part of the default install on GNU/Linux machines these days. +@c When I tried it with my basic diary file, it just died with an error. +The @code{calendar} utility program supports a subset of the format +allowed by the Emacs diary facilities, so you can use that utility to +view the diary file, with reasonable results aside from the entries it +cannot understand. +@end ignore + + Each entry in the diary file describes one event and consists of one +or more lines. An entry always begins with a date specification at the +left margin. The rest of the entry is simply text to describe the +event. If the entry has more than one line, then the lines after the +first must begin with whitespace to indicate they continue a previous +entry. Lines that do not begin with valid dates and do not continue a +preceding entry are ignored. Here's an example: + +@example +12/22/2015 Twentieth wedding anniversary! +&1/1. Happy New Year! +10/22 Ruth's birthday. +* 21, *: Payday +Tuesday--weekly meeting with grad students at 10am + Supowit, Shen, Bitner, and Kapoor to attend. +1/13/89 Friday the thirteenth!! +&thu 4pm squash game with Lloyd. +mar 16 Dad's birthday +April 15, 2016 Income tax due. +&* 15 time cards due. +@end example + +@noindent +This example uses extra spaces to align the event descriptions of most +of the entries. Such formatting is purely a matter of taste. + + You can also use a format where the first line of a diary entry +consists only of the date or day name (with no following blanks or +punctuation). For example: + +@example +02/11/2012 + Bill B. visits Princeton today + 2pm Cognitive Studies Committee meeting + 2:30-5:30 Liz at Lawrenceville + 4:00pm Dentist appt + 7:30pm Dinner at George's + 8:00-10:00pm concert +@end example + +@noindent +This entry will have a different appearance if you use the simple diary +display +@iftex +(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}). +@end iftex +@ifnottex +(@pxref{Diary Display}). +@end ifnottex +The simple diary display omits the date line at the beginning; only the +continuation lines appear. This style of entry looks neater when you +display just a single day's entries, but can cause confusion if you ask +for more than one day's entries. + +@vindex diary-nonmarking-symbol + You can inhibit the marking of certain diary entries in the calendar +window; to do this, insert the string that +@code{diary-nonmarking-symbol} specifies (default @samp{&}) at the +beginning of the entry, before the date. This +has no effect on display of the entry in the diary window; it only +affects marks on dates in the calendar window. Nonmarking entries are +especially useful for generic entries that would otherwise mark many +different dates. + @node Displaying the Diary @subsection Displaying the Diary @@ -1037,90 +1121,6 @@ diary-mail-entries}. A prefix argument specifies how many days (starting with today) to check; otherwise, the variable @code{diary-mail-days} says how many days. -@node Format of Diary File -@subsection The Diary File -@cindex diary file - -@vindex diary-file - Your @dfn{diary file} is a file that records events associated with -particular dates. The name of the diary file is specified by the -variable @code{diary-file}. The default is @file{~/.emacs.d/diary}, -though for compatibility with older versions Emacs will use -@file{~/diary} if it exists. -@ignore -@c I don't think this is relevant any more. The utility doesn't seem -@c to be part of the default install on GNU/Linux machines these days. -@c When I tried it with my basic diary file, it just died with an error. -The @code{calendar} utility program supports a subset of the format -allowed by the Emacs diary facilities, so you can use that utility to -view the diary file, with reasonable results aside from the entries it -cannot understand. -@end ignore - - Each entry in the diary file describes one event and consists of one -or more lines. An entry always begins with a date specification at the -left margin. The rest of the entry is simply text to describe the -event. If the entry has more than one line, then the lines after the -first must begin with whitespace to indicate they continue a previous -entry. Lines that do not begin with valid dates and do not continue a -preceding entry are ignored. Here's an example: - -@example -12/22/2015 Twentieth wedding anniversary! -&1/1. Happy New Year! -10/22 Ruth's birthday. -* 21, *: Payday -Tuesday--weekly meeting with grad students at 10am - Supowit, Shen, Bitner, and Kapoor to attend. -1/13/89 Friday the thirteenth!! -&thu 4pm squash game with Lloyd. -mar 16 Dad's birthday -April 15, 2016 Income tax due. -&* 15 time cards due. -@end example - -@noindent -This example uses extra spaces to align the event descriptions of most -of the entries. Such formatting is purely a matter of taste. - - You can also use a format where the first line of a diary entry -consists only of the date or day name (with no following blanks or -punctuation). For example: - -@example -02/11/2012 - Bill B. visits Princeton today - 2pm Cognitive Studies Committee meeting - 2:30-5:30 Liz at Lawrenceville - 4:00pm Dentist appt - 7:30pm Dinner at George's - 8:00-10:00pm concert -@end example - -@noindent -This entry will have a different appearance if you use the simple diary -display -@iftex -(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}). -@end iftex -@ifnottex -(@pxref{Diary Display}). -@end ifnottex -The simple diary display omits the date line at the beginning; only the -continuation lines appear. This style of entry looks neater when you -display just a single day's entries, but can cause confusion if you ask -for more than one day's entries. - -@vindex diary-nonmarking-symbol - You can inhibit the marking of certain diary entries in the calendar -window; to do this, insert the string that -@code{diary-nonmarking-symbol} specifies (default @samp{&}) at the -beginning of the entry, before the date. This -has no effect on display of the entry in the diary window; it only -affects marks on dates in the calendar window. Nonmarking entries are -especially useful for generic entries that would otherwise mark many -different dates. - @node Date Formats @subsection Date Formats diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 713bf8b..5f53f9b 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -961,8 +961,8 @@ Conversion To and From Other Calendars The Diary -* Displaying the Diary:: Viewing diary entries and associated calendar dates. * Format of Diary File:: Entering events in your diary. +* Displaying the Diary:: Viewing diary entries and associated calendar dates. * Date Formats:: Various ways you can specify dates. * Adding to Diary:: Commands to create diary entries. * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc. commit bb53338aaf81bf9f41c4d80d265ddcbd4529b5de Author: Glenn Morris Date: Mon Jun 15 23:49:17 2015 -0700 * doc/emacs/calendar.texi (Specified Dates, Special Diary Entries): Update date of examples. (Diary, Format of Diary File): Move example from former to latter. Reduce duplication. diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 9367136..92f5c91 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -206,7 +206,7 @@ Move point to today's date (@code{calendar-goto-today}). @kbd{g d} (@code{calendar-goto-date}) prompts for a year, a month, and a day of the month, and then moves to that date. Because the calendar includes all dates from the beginning of the current era, you must type the year in its -entirety; that is, type @samp{1990}, not @samp{90}. +entirety; that is, type @samp{2010}, not @samp{10}. @kindex g D @r{(Calendar mode)} @findex calendar-goto-day-of-year @@ -919,36 +919,11 @@ years, and then displays the list of yahrzeit dates. The Emacs diary keeps track of appointments or other events on a daily basis, in conjunction with the calendar. To use the diary feature, you -must first create a @dfn{diary file} containing a list of events and +must first create a diary file containing a list of events and their dates. Then Emacs can automatically pick out and display the events for today, for the immediate future, or for any specified date. - The name of the diary file is specified by the variable -@code{diary-file}. The default is @file{~/.emacs.d/diary}, though for -compatibility with older versions Emacs will use @file{~/diary} if it -exists. Here's an example showing what the file looks like: - -@example -12/22/2012 Twentieth wedding anniversary!! -&1/1. Happy New Year! -10/22 Ruth's birthday. -* 21, *: Payday -Tuesday--weekly meeting with grad students at 10am - Supowit, Shen, Bitner, and Kapoor to attend. -1/13/89 Friday the thirteenth!! -&thu 4pm squash game with Lloyd. -mar 16 Dad's birthday -April 15, 2013 Income tax due. -&* 15 time cards due. -@end example - -@noindent -This format is essentially the same as the one used by the separate -@command{calendar} utility that is present on some Unix systems. This -example uses extra spaces to align the event descriptions of most of -the entries. Such formatting is purely a matter of taste. - Although you probably will start by creating a diary manually, Emacs provides a number of commands to let you view, add, and change diary entries. @@ -1069,10 +1044,18 @@ diary-mail-entries}. A prefix argument specifies how many days @vindex diary-file Your @dfn{diary file} is a file that records events associated with particular dates. The name of the diary file is specified by the -variable @code{diary-file}. The @code{calendar} utility program -supports a subset of the format allowed by the Emacs diary facilities, -so you can use that utility to view the diary file, with reasonable -results aside from the entries it cannot understand. +variable @code{diary-file}. The default is @file{~/.emacs.d/diary}, +though for compatibility with older versions Emacs will use +@file{~/diary} if it exists. +@ignore +@c I don't think this is relevant any more. The utility doesn't seem +@c to be part of the default install on GNU/Linux machines these days. +@c When I tried it with my basic diary file, it just died with an error. +The @code{calendar} utility program supports a subset of the format +allowed by the Emacs diary facilities, so you can use that utility to +view the diary file, with reasonable results aside from the entries it +cannot understand. +@end ignore Each entry in the diary file describes one event and consists of one or more lines. An entry always begins with a date specification at the @@ -1080,7 +1063,25 @@ left margin. The rest of the entry is simply text to describe the event. If the entry has more than one line, then the lines after the first must begin with whitespace to indicate they continue a previous entry. Lines that do not begin with valid dates and do not continue a -preceding entry are ignored. +preceding entry are ignored. Here's an example: + +@example +12/22/2015 Twentieth wedding anniversary! +&1/1. Happy New Year! +10/22 Ruth's birthday. +* 21, *: Payday +Tuesday--weekly meeting with grad students at 10am + Supowit, Shen, Bitner, and Kapoor to attend. +1/13/89 Friday the thirteenth!! +&thu 4pm squash game with Lloyd. +mar 16 Dad's birthday +April 15, 2016 Income tax due. +&* 15 time cards due. +@end example + +@noindent +This example uses extra spaces to align the event descriptions of most +of the entries. Such formatting is purely a matter of taste. You can also use a format where the first line of a diary entry consists only of the date or day name (with no following blanks or @@ -1271,12 +1272,12 @@ entry. The entry looks like this: @findex diary-anniversary @example -%%(diary-anniversary 10 31 1948) Arthur's birthday +%%(diary-anniversary 10 31 1988) Arthur's birthday @end example @noindent -This entry applies to October 31 in any year after 1948; @samp{10 31 -1948} specifies the date. (If you are using the European or ISO +This entry applies to October 31 in any year after 1988; @samp{10 31 +1988} specifies the date. (If you are using the European or ISO calendar style, the input order of month, day and year is different.) The reason this expression requires a beginning year is that advanced diary functions can use it to calculate the number of elapsed years. commit 7ca145d3f991db69d31177f6b0ff51dadef13bf1 Author: Glenn Morris Date: Mon Jun 15 23:02:58 2015 -0700 No need for cp51932.el, eucjp-ms.el to not be compiled any more. * admin/charsets/cp51932.awk, admin/charsets/eucjp-ms.awk: Don't set no-byte-compile in the outputs. * lisp/loadup.el: Don't specify uncompiled cp51932, eucjp-ms. diff --git a/admin/charsets/cp51932.awk b/admin/charsets/cp51932.awk index f59e91c..df1f8cd 100644 --- a/admin/charsets/cp51932.awk +++ b/admin/charsets/cp51932.awk @@ -31,7 +31,7 @@ # already been mapped to 1 or 3. BEGIN { - print ";;; cp51932.el -- translation table for CP51932. -*- no-byte-compile: t -*-"; + print ";;; cp51932.el -- translation table for CP51932"; print ";;; Automatically generated from CP932-2BYTE.map"; print "(let ((map"; printf " '(;JISEXT<->UNICODE"; diff --git a/admin/charsets/eucjp-ms.awk b/admin/charsets/eucjp-ms.awk index f17222d..59c6388 100644 --- a/admin/charsets/eucjp-ms.awk +++ b/admin/charsets/eucjp-ms.awk @@ -38,7 +38,7 @@ BEGIN { JISX0208_FROM2 = "/xf5/xa1"; JISX0212_FROM = "/x8f/xf3/xf3"; - print ";;; eucjp-ms.el -- translation table for eucJP-ms. -*- no-byte-compile: t -*-"; + print ";;; eucjp-ms.el -- translation table for eucJP-ms"; print ";;; Automatically generated from /usr/share/i18n/charmaps/EUC-JP-MS.gz"; print "(let ((map"; print " '(;JISEXT<->UNICODE"; diff --git a/lisp/loadup.el b/lisp/loadup.el index 84fa327..fef111f 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -179,8 +179,8 @@ (load "language/romanian") (load "language/greek") (load "language/hebrew") -(load "international/cp51932.el") -(load "international/eucjp-ms.el") +(load "international/cp51932") +(load "international/eucjp-ms") (load "language/japanese") (load "language/korean") (load "language/lao") commit e80225000dda3f1deac5ea95a9253301b05fbed7 Author: Glenn Morris Date: Mon Jun 15 21:24:24 2015 -0400 ; Comment fixes. diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 5d72c56..7c5819d 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -37,7 +37,7 @@ ;; ;; NOTE: MIT Cscheme, when invoked with the -emacs flag, has a special user ;; interface that communicates process state back to the superior emacs by -;; outputting special control sequences. The gnumacs package, xscheme.el, has +;; outputting special control sequences. The Emacs package, xscheme.el, has ;; lots and lots of special purpose code to read these control sequences, and ;; so is very tightly integrated with the cscheme process. The cscheme ;; interrupt handler and debugger read single character commands in cbreak diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index cdedbce..17aaab9 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -126,7 +126,7 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword ;;; This function exists for backwards compatibility. ;;; Previous versions of this package bound commands to C-c -;;; bindings, which is not allowed by the gnumacs standard. +;;; bindings, which is not allowed by the Emacs standard. ;;; "This function binds many inferior-lisp commands to C-c bindings, ;;;where they are more accessible. C-c bindings are reserved for the @@ -662,7 +662,7 @@ See variable `lisp-describe-sym-command'." ;;; Changed all keybindings of the form C-c . These are ;;; supposed to be reserved for the user to bind. This affected ;;; mainly the compile/eval-defun/region[-and-go] commands. -;;; This was painful, but necessary to adhere to the gnumacs standard. +;;; This was painful, but necessary to adhere to the Emacs standard. ;;; For some backwards compatibility, see the ;;; cmulisp-install-letter-bindings ;;; function. commit 6ebbc2f69825e9fdc5a5658047469ad541cf3dce Author: Glenn Morris Date: Mon Jun 15 20:46:01 2015 -0400 * lisp/calendar/calendar.el (diary-file): Use locate-user-emacs-file. * doc/emacs/calendar.texi (Diary, Format of Diary File): Update for above diary-file change. : * etc/NEWS: Mention this. diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 03a484b..9367136 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -925,8 +925,9 @@ events for today, for the immediate future, or for any specified date. The name of the diary file is specified by the variable -@code{diary-file}; @file{~/diary} is the default. Here's an example -showing what that file looks like: +@code{diary-file}. The default is @file{~/.emacs.d/diary}, though for +compatibility with older versions Emacs will use @file{~/diary} if it +exists. Here's an example showing what the file looks like: @example 12/22/2012 Twentieth wedding anniversary!! @@ -1068,11 +1069,10 @@ diary-mail-entries}. A prefix argument specifies how many days @vindex diary-file Your @dfn{diary file} is a file that records events associated with particular dates. The name of the diary file is specified by the -variable @code{diary-file}; @file{~/diary} is the default. The -@code{calendar} utility program supports a subset of the format allowed -by the Emacs diary facilities, so you can use that utility to view the -diary file, with reasonable results aside from the entries it cannot -understand. +variable @code{diary-file}. The @code{calendar} utility program +supports a subset of the format allowed by the Emacs diary facilities, +so you can use that utility to view the diary file, with reasonable +results aside from the entries it cannot understand. Each entry in the diary file describes one event and consists of one or more lines. An entry always begins with a date specification at the diff --git a/etc/NEWS b/etc/NEWS index 76b4772..cdfd748 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -504,6 +504,9 @@ hash-table and arrays. All functions are prefixed with "map-". ** Calendar and diary +++ +*** The default `diary-file' is now located in .emacs.d. + ++++ *** New commands to insert diary entries with Chinese dates: `diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' `diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 233d2cf..fd2580e 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -566,7 +566,7 @@ See also `calendar-intermonth-header'." 'font-lock-face 'font-lock-function-name-face))) :version "23.1") -(defcustom diary-file "~/diary" +(defcustom diary-file (locate-user-emacs-file "diary" "diary") "Name of the file in which one's personal diary of dates is kept. The file's entries are lines beginning with any of the forms @@ -653,6 +653,7 @@ documentation of these hooks for details. Diary files can contain directives to include the contents of other files; for details, see the documentation for the variable `diary-list-entries-hook'." + :version "25.1" ; ~/diary -> locate-user-emacs-file :type 'file :group 'diary) commit c57b0e4b243a7a4a92549e833c7266b0be39f906 Author: Glenn Morris Date: Mon Jun 15 20:41:54 2015 -0400 * lisp/macros.el (name-last-kbd-macro, kbd-macro-query) (apply-macro-to-region-lines): Use user-error. diff --git a/lisp/macros.el b/lisp/macros.el index bf1aa30..101f8b4 100644 --- a/lisp/macros.el +++ b/lisp/macros.el @@ -39,14 +39,14 @@ The symbol's function definition becomes the keyboard macro string. Such a \"function\" cannot be called from Lisp, but it is a valid editor command." (interactive "SName for last kbd macro: ") (or last-kbd-macro - (error "No keyboard macro defined")) + (user-error "No keyboard macro defined")) (and (fboundp symbol) (not (stringp (symbol-function symbol))) (not (vectorp (symbol-function symbol))) - (error "Function %s is already defined and not a keyboard macro" + (user-error "Function %s is already defined and not a keyboard macro" symbol)) (if (string-equal symbol "") - (error "No command name given")) + (user-error "No command name given")) (fset symbol last-kbd-macro)) ;;;###autoload @@ -166,7 +166,7 @@ Your options are: \\ (interactive "P") (or executing-kbd-macro defining-kbd-macro - (error "Not defining or executing kbd macro")) + (user-error "Not defining or executing kbd macro")) (if flag (let (executing-kbd-macro defining-kbd-macro) (recursive-edit)) @@ -260,7 +260,7 @@ and then select the region of un-tablified names and use (or macro (progn (if (null last-kbd-macro) - (error "No keyboard macro has been defined")) + (user-error "No keyboard macro has been defined")) (setq macro last-kbd-macro))) (save-excursion (let ((end-marker (copy-marker bottom)) commit 2f1f014b931ff570554522f17ae687cc8163c415 Author: Glenn Morris Date: Mon Jun 15 20:40:41 2015 -0400 * lisp/textmodes/page-ext.el (add-new-page, pages-directory) (pages-directory-for-addresses): Doc fixes. diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 3781c98..d3bd33e 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -345,14 +345,13 @@ If point is in the pages directory buffer, insert the new page in the buffer associated with the directory. Insert the new page just before current page if - pages-directory-for-adding-new-page-before-current-page-p variable -is non-nil. Else insert at exact location of point. +`pages-directory-for-adding-new-page-before-current-page-p' is non-nil. +Else insert at exact location of point. -Narrow to new page if - pages-directory-for-adding-page-narrowing-p variable -is non-nil. +Narrow to new page if `pages-directory-for-adding-page-narrowing-p' is +non-nil. -Page begins with a `^L' as the default page-delimiter. +Page begins with a '^L' as the default `page-delimiter'. Use \\[set-page-delimiter] to change the page-delimiter. Point is left in the body of page." (interactive "sHeader line: ") @@ -516,7 +515,7 @@ resets the page-delimiter to the original value." (defun pages-directory (pages-list-all-headers-p count-lines-p &optional regexp) "Display a directory of the page headers in a temporary buffer. -A header is the first non-blank line after the page-delimiter. +A header is the first non-blank line after the `page-delimiter'. \\[pages-directory-mode] You may move point to one of the lines in the temporary buffer, then use \\ to go to the same line in the pages buffer. @@ -752,10 +751,10 @@ Move point to one of the lines in the displayed directory, then use \\[pages-directory-goto] to go to the same line in the addresses buffer. -If pages-directory-for-addresses-goto-narrowing-p is non-nil, +If `pages-directory-for-addresses-goto-narrowing-p' is non-nil, `pages-directory-goto' narrows addresses buffer to entry. -If pages-directory-for-addresses-buffer-keep-windows-p is nil, +If `pages-directory-for-addresses-buffer-keep-windows-p' is nil, this command deletes other windows when it displays the addresses directory." commit b95f53f0383b5df82e0b711f5027881950893f4f Author: Stefan Monnier Date: Mon Jun 15 18:48:08 2015 -0400 * lisp/info.el: Cleanup bytepos/charpos issues * lisp/international/mule-util.el: Use lexical-binding. (filepos-to-bufferpos): New function. * lisp/info.el (Info-find-in-tag-table-1): Use 0-based file positions. (Info-find-node-2): Use filepos-to-bufferpos (bug#20704). (Info-read-subfile, Info-search): Use 0-based file positions. diff --git a/etc/NEWS b/etc/NEWS index 571adad..76b4772 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -851,6 +851,8 @@ behavior, set `diff-switches' to `-c'. * Lisp Changes in Emacs 25.1 +** New function `filepos-to-bufferpos'. + ** The default value of `load-read-function' is now `read'. ** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function. diff --git a/lisp/info.el b/lisp/info.el index 9602337..413928b 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1009,7 +1009,7 @@ REGEXP is a regular expression matching nodes or references. Its first group should match `Node:' or `Ref:'. CASE-FOLD t means search for a case-insensitive match. If a match was found, value is a list (FOUND-ANCHOR POS MODE), where -FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position +FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the file position where the match was found, and MODE is `major-mode' of the buffer in which the match was found." (let ((case-fold-search case-fold)) @@ -1020,7 +1020,7 @@ which the match was found." (beginning-of-line) (when (re-search-forward regexp nil t) (list (string-equal "Ref:" (match-string 1)) - (+ (point-min) (read (current-buffer))) + (read (current-buffer)) major-mode))))) (defun Info-find-in-tag-table (marker regexp &optional strict-case) @@ -1029,7 +1029,7 @@ MARKER specifies the buffer and position to start searching at. REGEXP is a regular expression matching nodes or references. Its first group should match `Node:' or `Ref:'. If a match was found, value is a list (FOUND-ANCHOR POS MODE), where -FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position +FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the file position where the match was found, and MODE is `major-mode' of the buffer in which the match was found. This function tries to find a case-sensitive match first, then a @@ -1187,15 +1187,18 @@ is non-nil)." (when found ;; FOUND is (ANCHOR POS MODE). - (setq guesspos (nth 1 found)) + (let ((filepos (nth 1 found))) ;File position in bytes. - ;; If this is an indirect file, determine which - ;; file really holds this node and read it in. - (unless (eq (nth 2 found) 'Info-mode) - ;; Note that the current buffer must be the - ;; *info* buffer on entry to - ;; Info-read-subfile. Thus the hackery above. - (setq guesspos (Info-read-subfile guesspos))) + ;; If this is an indirect file, determine which + ;; file really holds this node and read it in. + (unless (eq (nth 2 found) 'Info-mode) + ;; Note that the current buffer must be the + ;; *info* buffer on entry to + ;; Info-read-subfile. Thus the hackery above. + (setq filepos (Info-read-subfile filepos))) + + (setq guesspos + (filepos-to-bufferpos filepos 'approximate))) ;; Handle anchor (when (nth 0 found) @@ -1203,8 +1206,7 @@ is non-nil)." (throw 'foo t))))) ;; Else we may have a node, which we search for: - (goto-char (max (point-min) - (- (byte-to-position guesspos) 1000))) + (goto-char (max (point-min) (- guesspos 1000))) ;; Now search from our advised position (or from beg of ;; buffer) to find the actual node. First, check @@ -1506,7 +1508,7 @@ is non-nil)." ;; Note that on entry to this function the current-buffer must be the ;; *info* buffer; not the info tags buffer. (defun Info-read-subfile (nodepos) - ;; NODEPOS is either a position (in the Info file as a whole, + ;; NODEPOS is either a position in bytes (in the Info file as a whole, ;; not relative to a subfile) or the name of a subfile. (let (lastfilepos lastfilename) @@ -1523,7 +1525,7 @@ is non-nil)." thisfilepos thisfilename) (search-forward ": ") (setq thisfilename (buffer-substring beg (- (point) 2))) - (setq thisfilepos (+ (point-min) (read (current-buffer)))) + (setq thisfilepos (read (current-buffer))) ;; read in version 19 stops at the end of number. ;; Advance to the next line. (forward-line 1) @@ -1554,7 +1556,7 @@ is non-nil)." ;; Don't add the length of the skipped summary segment to ;; the value returned to `Info-find-node-2'. (Bug#14125) (if (numberp nodepos) - (+ (- nodepos lastfilepos) (point-min))))) + (- nodepos lastfilepos)))) (defun Info-unescape-quotes (value) "Unescape double quotes and backslashes in VALUE." @@ -2013,10 +2015,9 @@ If DIRECTION is `backward', search in the reverse direction." (re-search-backward "\\(^.*\\): [0-9]+$") (re-search-forward "\\(^.*\\): [0-9]+$")) (goto-char (+ (match-end 1) 2)) - (setq list (cons (cons (+ (point-min) - (read (current-buffer))) - (match-string-no-properties 1)) - list)) + (push (cons (read (current-buffer)) + (match-string-no-properties 1)) + list) (goto-char (if backward (1- (match-beginning 0)) (1+ (match-end 0))))) diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index eae787b..92c540c 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -1,4 +1,4 @@ -;;; mule-util.el --- utility functions for multilingual environment (mule) +;;; mule-util.el --- utility functions for multilingual environment (mule) -*- lexical-binding:t -*- ;; Copyright (C) 1997-1998, 2000-2015 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -30,8 +30,7 @@ ;;; Code: -;;; String manipulations while paying attention to multibyte -;;; characters. +;;; String manipulations while paying attention to multibyte characters. ;;;###autoload (defsubst string-to-list (string) @@ -49,7 +48,6 @@ (if (integerp obj) (aset string idx obj) (let ((len1 (length obj)) - (len2 (length string)) (i 0)) (while (< i len1) (aset string (+ idx i) (aref obj i)) @@ -90,7 +88,6 @@ defaults to `truncate-string-ellipsis'." (setq ellipsis truncate-string-ellipsis)) (let ((str-len (length str)) (str-width (string-width str)) - (ellipsis-len (if ellipsis (length ellipsis) 0)) (ellipsis-width (if ellipsis (string-width ellipsis) 0)) (idx 0) (column 0) @@ -129,8 +126,8 @@ defaults to `truncate-string-ellipsis'." tail-padding ellipsis)))) -;;; Nested alist handler. Nested alist is alist whose elements are -;;; also nested alist. +;;; Nested alist handler. +;; Nested alist is alist whose elements are also nested alist. ;;;###autoload (defsubst nested-alist-p (obj) @@ -313,6 +310,42 @@ per-character basis, this may not be accurate." (throw 'tag3 charset))) charset-list) nil))))))))) + +;;;###autoload +(defun filepos-to-bufferpos (byte &optional quality coding-system) + "Try to return the buffer position corresponding to a particular file position. +The file position is given as a (0-based) BYTE count. +The function presumes the file is encoded with CODING-SYSTEM, which defaults +to `buffer-file-coding-system'. +QUALITY can be: + `approximate', in which case we may cut some corners to avoid + excessive work. + nil, in which case we may return nil rather than an approximation." + ;; `exact', in which case we may end up re-(en|de)coding a large + ;; part of the file. + (unless coding-system (setq coding-system buffer-file-coding-system)) + (let ((eol (coding-system-eol-type coding-system)) + (type (coding-system-type coding-system)) + (pm (save-restriction (widen) (point-min)))) + (pcase type + (`utf-8 + (when (coding-system-get coding-system :bom) + (setq byte (max 0 (- byte 3)))) + (let (pos lines (eol-offset 0)) + (while + (progn + (setq pos (byte-to-position (+ pm byte (- eol-offset)))) + (setq lines (1- (line-number-at-pos pos))) + (not (= lines eol-offset))) + (setq eol-offset (+ eol-offset lines))) + pos)) + ;; FIXME: What if it's a 2-byte charset? Are there such beasts? + (`charset (+ pm byte)) + (_ + (pcase quality + (`approximate (+ pm (byte-to-position byte))) + ;; (`exact ...) + ))))) (provide 'mule-util) commit 4c4a329cf4fac46e3cc4c9ec6c9edb06ed9f9fb8 Author: Glenn Morris Date: Mon Jun 15 18:02:33 2015 -0400 ; * lisp/emacs-lisp/derived.el (derived-mode-make-docstring): Fix recent change. diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 52ff2aa..ee137f1 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -332,7 +332,8 @@ which more-or-less shadow%s %s's corresponding table%s." (concat "\n\nIn addition to any hooks its parent mode " (if (string-match (format "[`‘]%s['’]" - (regexp-quote parent)) + (regexp-quote + (symbol-name parent))) docstring) nil (format "`%s' " parent)) commit f784272f7381dfd1fc1e6ba2c3c79cd1b7a9c5cd Author: Stefan Monnier Date: Mon Jun 15 17:10:06 2015 -0400 * lisp/progmodes/perl-mode.el: Refine handling of /re/ and y/abc/def/ (perl--syntax-exp-intro-keywords): New var. (perl--syntax-exp-intro-regexp, perl-syntax-propertize-function): Use it. (bug#20800). diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index a64944f..3521a13 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -204,10 +204,13 @@ '((?\( . ?\)) (?\[ . ?\]) (?\{ . ?\}) (?\< . ?\>))) (eval-and-compile + (defconst perl--syntax-exp-intro-keywords + '("split" "if" "unless" "until" "while" "print" + "grep" "map" "not" "or" "and" "for" "foreach")) + (defconst perl--syntax-exp-intro-regexp (concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" - (regexp-opt '("split" "if" "unless" "until" "while" "print" - "grep" "map" "not" "or" "and" "for" "foreach")) + (regexp-opt perl--syntax-exp-intro-keywords) "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*"))) ;; FIXME: handle here-docs and regexps. @@ -278,8 +281,13 @@ (forward-comment (- (point-max))) (put-text-property (point) (match-end 2) 'syntax-multiline t) - (not (memq (char-before) - '(?? ?: ?. ?, ?\; ?= ?! ?~ ?\( ?\[))))) + (not (or (and (eq ?w (char-syntax (preceding-char))) + (let ((end (point))) + (backward-sexp 1) + (member (buffer-substring (point) end) + perl--syntax-exp-intro-keywords))) + (memq (char-before) + '(?? ?: ?. ?, ?\; ?= ?! ?~ ?\( ?\[)))))) nil ;; A division sign instead of a regexp-match. (put-text-property (match-beginning 2) (match-end 2) 'syntax-table (string-to-syntax "\"")) @@ -297,13 +305,19 @@ (looking-at-p "sub[ \t\n]")) ;; This is defining a function. nil - (put-text-property (match-beginning 3) (match-end 3) - 'syntax-table - (if (assoc (char-after (match-beginning 3)) - perl-quote-like-pairs) - (string-to-syntax "|") - (string-to-syntax "\""))) - (perl-syntax-propertize-special-constructs end))))) + (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 1)))) + ;; Don't add this syntax-table property if + ;; within a string, which would misbehave in cases such as + ;; $a = "foo y \"toto\" bar" where we'd end up changing the + ;; syntax of the backslash and hence de-escaping the embedded + ;; double quote. + (put-text-property (match-beginning 3) (match-end 3) + 'syntax-table + (if (assoc (char-after (match-beginning 3)) + perl-quote-like-pairs) + (string-to-syntax "|") + (string-to-syntax "\""))) + (perl-syntax-propertize-special-constructs end)))))) ;; Here documents. ((concat "\\(?:" diff --git a/test/indent/perl.perl b/test/indent/perl.perl index ea48754..f86a09b 100755 --- a/test/indent/perl.perl +++ b/test/indent/perl.perl @@ -59,3 +59,11 @@ print "hello" for /./; $fileType_filesButNot # bug#12373? = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} ); + +# There can be a comment between an if/when/while and a // matcher! +return 'W' if #/^Not Available on Mobile/m; #W=Web only + /This video is not available on mobile devices./m; #bug#20800 + +# A "y|abc|def|" shouldn't interfere when inside a string! +$toto = " x \" string\""; +$toto = " y \" string\""; # This is not the `y' operator! commit e58a815339fe77f184da8e71e3b932a46b2c0433 Author: Paul Eggert Date: Mon Jun 15 12:40:32 2015 -0700 Fix quoting when making derived mode docstring * lisp/emacs-lisp/derived.el (derived-mode-make-docstring): Nest regexp-quote inside format, not the reverse. Problem reported by Artur Malabarba in: http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00206.html diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 75bd325..52ff2aa 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -331,9 +331,10 @@ which more-or-less shadow%s %s's corresponding table%s." "\n\nThis mode " (concat "\n\nIn addition to any hooks its parent mode " - (if (string-match (regexp-quote (format "[`‘]%s['’]" - parent)) - docstring) nil + (if (string-match (format "[`‘]%s['’]" + (regexp-quote parent)) + docstring) + nil (format "`%s' " parent)) "might have run,\nthis mode ")) (format "runs the hook `%s'" hook) commit f0f216eaa1ebc84457812f66a5e714721245ef9d Author: Eli Zaretskii Date: Mon Jun 15 20:14:11 2015 +0300 ;* src/fontset.c: Update obsolete commentary. diff --git a/src/fontset.c b/src/fontset.c index f1a3e59..50fcc64 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -66,16 +66,15 @@ along with GNU Emacs. If not, see . */ A fontset object is implemented by a char-table whose default value and parent are always nil. - An element of a base fontset is a vector of FONT-DEFs which itself - is a vector [ FONT-SPEC ENCODING REPERTORY ]. + An element of a base fontset is a vector of FONT-DEFs which themselves + are vectors of the form [ FONT-SPEC ENCODING REPERTORY ]. An element of a realized fontset is nil, t, 0, or a vector of this form: - [ CHARSET-ORDERED-LIST-TICK PREFERRED-RFONT-DEF - RFONT-DEF0 RFONT-DEF1 ... ] + [ PREFERRED-RFONT-DEF RFONT-DEF0 RFONT-DEF1 ... ] - RFONT-DEFn (i.e. Realized FONT-DEF) has this form: + Each RFONT-DEFn (i.e. Realized FONT-DEF) has this form: [ FACE-ID FONT-DEF FONT-OBJECT SORTING-SCORE ] @@ -370,14 +369,12 @@ fontset_compare_rfontdef (const void *val1, const void *val2) - RFONT_DEF_SCORE (*(Lisp_Object *) val2)); } -/* Update FONT-GROUP which has this form: - [ CHARSET-ORDERED-LIST-TICK PREFERRED-RFONT-DEF - RFONT-DEF0 RFONT-DEF1 ... ] +/* Update a cons cell which has this form: + (CHARSET-ORDERED-LIST-TICK . FONT-GROUP) + where FONT-GROUP is of the form + [ PREFERRED-RFONT-DEF RFONT-DEF0 RFONT-DEF1 ... ] Reorder RFONT-DEFs according to the current language, and update - CHARSET-ORDERED-LIST-TICK. - - If PREFERRED_FAMILY is not nil, that family has the higher priority - if the encoding charsets or languages in font-specs are the same. */ + CHARSET-ORDERED-LIST-TICK. */ static void reorder_font_vector (Lisp_Object font_group, struct font *font) commit ee715b9f6d9fccf4415a21a756058a60c924bc27 Author: Eli Zaretskii Date: Mon Jun 15 20:10:19 2015 +0300 Fix current-iso639-language on MS-Windows * lisp/international/mule-cmds.el (set-locale-environment): Downcase the locale name before interning it. This is so the 'current-iso639-language' on MS-Windows matches the ':lang' property of font-spec objects. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 7643668..e56fceb 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2603,7 +2603,18 @@ See also `locale-charset-language-names', `locale-language-names', (setq system-time-locale locale)) (if (string-match "^[a-z][a-z]" locale) - (setq current-iso639-language (intern (match-string 0 locale))))) + ;; The value of 'current-iso639-language' is matched against + ;; the ':lang' property of font-spec objects when selecting + ;; and prioritizing available fonts for displaying + ;; characters; see fontset.c. + (setq current-iso639-language + ;; The call to 'downcase' is for w32, where the + ;; MS-Windows locale names are in caps, as in "ENU", + ;; the equivalent of the Posix "en_US". Since the + ;; match mentioned above uses memq, and ':lang' + ;; properties have lower-case values, the letter-case + ;; must match exactly. + (intern (downcase (match-string 0 locale)))))) (setq woman-locale (or system-messages-locale commit 643e0527b12abe6cbd6ce4d2d42300a2825560db Author: Eli Zaretskii Date: Mon Jun 15 19:11:43 2015 +0300 Limit Symbola usage some more * lisp/international/fontset.el (setup-default-fontset): Limit Symbol coverage of Currency Symbols to u+20B6..u+20CF. (Bug#20727) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 279382b..2c693f5 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -706,8 +706,7 @@ (#x2031 . #x2038) (#x203B . #x206F) (#x2070 . #x209F) ;; Superscripts and Subscripts - (#x20A0 . #x20AB) ;; Currency Symbols - (#x20AD . #x20CF) + (#x20B6 . #x20CF) ;; Currency Symbols (#x2100 . #x2121) ;; Letterlike Symbols (#x2123 . #x214F) (#x2150 . #x215A) ;; Number Forms commit c8dc4d680430255895e5654a2634ee6994dde050 Author: Nicolas Petton Date: Mon Jun 15 12:43:09 2015 +0200 * lisp/emacs-lisp/map.el (map-let): Better docstring. diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 85f6bca..dd7fb91 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -49,8 +49,11 @@ Matches if the object is a map (list, hash-table or array), and binds values from ARGS to their corresponding elements of the map. -ARGS can be a list elements of the form (KEY PAT) or elements -of the form SYMBOL, which stands for ('SYMBOL SYMBOL)." +ARGS can be a list elements of the form (KEY PAT), in which case +KEY in an unquoted form. + +ARGS can also be a list of symbols, which stands for ('SYMBOL +SYMBOL)." `(and (pred map-p) ,@(map--make-pcase-bindings args))) @@ -61,7 +64,7 @@ KEYS can be a list of symbols, in which case each element will be bound to the looked up value in MAP. KEYS can also be a list of (KEY VARNAME) pairs, in which case -KEY is not quoted. +KEY is an unquoted form. MAP can be a list, hash-table or array." (declare (indent 2) (debug t))