From c07659054603ef1d7ce4eaeb5b79b50131abf265 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 12 Mar 2013 00:15:15 -0700 Subject: [PATCH 1/8] Tweaks for www.gnu.org html versions of manuals * admin/admin.el (manual-html-mono, manual-html-node): Add -DWWW_GNU_ORG. * doc/emacs/emacs.texi (Top): Add some stuff specific to www.gnu.org. * doc/lispintro/emacs-lisp-intro.texi: Add some stuff specific to www.gnu.org. * doc/lispref/elisp.texi: Add some stuff specific to www.gnu.org. --- admin/ChangeLog | 4 ++++ admin/admin.el | 2 ++ doc/emacs/ChangeLog | 4 ++++ doc/emacs/emacs.texi | 13 ++++++++++++- doc/lispintro/ChangeLog | 4 ++++ doc/lispintro/emacs-lisp-intro.texi | 8 ++++++++ doc/lispref/ChangeLog | 4 ++++ doc/lispref/elisp.texi | 10 ++++++++++ 8 files changed, 48 insertions(+), 1 deletion(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index 6c9ed389528..bf37688c337 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2013-03-12 Glenn Morris + + * admin.el (manual-html-mono, manual-html-node): Add -DWWW_GNU_ORG. + 2013-03-11 Glenn Morris * admin.el (make-manuals): Add emacs-lisp-intro and some more diff --git a/admin/admin.el b/admin/admin.el index 08d9039d4bc..ea08c0d1c74 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -268,6 +268,7 @@ This function also edits the HTML files so that they validate as HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using the @import directive." (call-process "makeinfo" nil nil nil + "-D" "WWW_GNU_ORG" "-I" (expand-file-name "../emacs" (file-name-directory texi-file)) "-I" (expand-file-name "../misc" @@ -293,6 +294,7 @@ the @import directive." (unless (file-exists-p texi-file) (error "Manual file %s not found" texi-file)) (call-process "makeinfo" nil nil nil + "-D" "WWW_GNU_ORG" "-I" (expand-file-name "../emacs" (file-name-directory texi-file)) "-I" (expand-file-name "../misc" diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 330bcfaaaee..e4c36533caf 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2013-03-12 Glenn Morris + + * emacs.texi (Top): Add some stuff specific to www.gnu.org. + 2013-03-11 Glenn Morris * Version 24.3 released. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index bda7c0821c0..972304ac575 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -111,10 +111,21 @@ Cover art by Etienne Suvasa; cover design by Matt Lee. @top The Emacs Editor Emacs is the extensible, customizable, self-documenting real-time -display editor. This Info file describes how to edit with Emacs and +display editor. This manual describes how to edit with Emacs and some of the ways to customize it; it corresponds to GNU Emacs version @value{EMACSVER}. +@ifset WWW_GNU_ORG +@html +The homepage for GNU Emacs is at +http://www.gnu.org/software/emacs/.
+To view this manual in other formats, click +here.
+You can also purchase a printed copy from the +FSF store. +@end html +@end ifset + @ifinfo If you are reading this in Emacs, type @kbd{h} to read a basic introduction to the Info documentation system. diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 6a3cffac520..4dd7c0e00a5 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog @@ -1,3 +1,7 @@ +2013-03-12 Glenn Morris + + * emacs-lisp-intro.texi: Add some stuff specific to www.gnu.org. + 2013-03-11 Glenn Morris * Version 24.3 released. diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 055ed557825..13e12b52785 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -227,6 +227,14 @@ This is an @cite{Introduction to Programming in Emacs Lisp}, for people who are not programmers. @sp 1 Edition @value{edition-number}, @value{update-date} +@ifset WWW_GNU_ORG +@html +

The homepage for GNU Emacs is at +http://www.gnu.org/software/emacs/. +
To view this manual in other formats, click +here. +@end html +@end ifset @sp 1 Copyright @copyright{} 1990--1995, 1997, 2001--2013 Free Software Foundation, Inc. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7b1e9f6a9ad..36dd05b125a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2013-03-12 Glenn Morris + + * elisp.texi: Add some stuff specific to www.gnu.org. + 2013-03-11 Glenn Morris * Version 24.3 released. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 5ad9e8212a5..9acbf85534e 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -97,6 +97,16 @@ This is edition @value{VERSION} of the @cite{GNU Emacs Lisp Reference Manual},@* This is the @cite{GNU Emacs Lisp Reference Manual} @end ifnottex corresponding to Emacs version @value{EMACSVER}. +@ifset WWW_GNU_ORG +@html +

The homepage for GNU Emacs is at +http://www.gnu.org/software/emacs/.
+For information on using Emacs, refer to +the Emacs +Manual.
To view this manual in other formats, +click here. +@end html +@end ifset Copyright @copyright{} 1990--1996, 1998--2013 Free Software Foundation, Inc. From b2e37dad6876445f53037e82280cc2b77e6a5086 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Mar 2013 15:00:07 -0700 Subject: [PATCH 2/8] * pop.c: Fix ERRMAX typo (Bug#13925). (socket_connection) [!HAVE_KRB5_ERROR_TEXT && HAVE_KRB5_ERROR_E_TEXT]: Use ERROR_MAX, not ERRMAX. --- lib-src/ChangeLog | 6 ++++++ lib-src/pop.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 871f572facd..68594311332 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2013-03-12 Paul Eggert + + * pop.c: Fix ERRMAX typo (Bug#13925). + (socket_connection) [!HAVE_KRB5_ERROR_TEXT && HAVE_KRB5_ERROR_E_TEXT]: + Use ERROR_MAX, not ERRMAX. + 2013-03-11 Glenn Morris * Version 24.3 released. diff --git a/lib-src/pop.c b/lib-src/pop.c index ba384db3d19..1f3f82baa68 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1198,7 +1198,7 @@ socket_connection (char *host, int flags) } #elif defined HAVE_KRB5_ERROR_E_TEXT if (err_ret && err_ret->e_text && **err_ret->e_text) - snprintf (pop_error + pop_error_len, ERRMAX - pop_error_len, + snprintf (pop_error + pop_error_len, ERROR_MAX - pop_error_len, " [server says '%s']", *err_ret->e_text); #endif if (err_ret) From c8cefd6a819caa8ad4d863c135a92abc3d33b791 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Mar 2013 23:00:18 -0400 Subject: [PATCH 3/8] * leim/quail/latin-ltx.el: Resolve conflicts. (latin-ltx--mark-map, latin-ltx--mark-re): New constants. (latin-ltx--define-rules): Check for conflicts. Eval `re's. (rules): Use tighter regexps to avoid conflicts. Consolidate the various rules for combining marks. Fixes: debbugs:13950 --- leim/ChangeLog | 8 ++ leim/quail/latin-ltx.el | 199 +++++++++++++++------------------------- 2 files changed, 82 insertions(+), 125 deletions(-) diff --git a/leim/ChangeLog b/leim/ChangeLog index 21757b8472c..cef14a1a8f7 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,11 @@ +2013-03-14 Stefan Monnier + + * quail/latin-ltx.el: Resolve conflicts (bug#13950). + (latin-ltx--mark-map, latin-ltx--mark-re): New constants. + (latin-ltx--define-rules): Check for conflicts. Eval `re's. + (rules): Use tighter regexps to avoid conflicts. + Consolidate the various rules for combining marks. + 2013-03-11 Glenn Morris * Version 24.3 released. diff --git a/leim/quail/latin-ltx.el b/leim/quail/latin-ltx.el index 024bb62c970..30836b8e752 100644 --- a/leim/quail/latin-ltx.el +++ b/leim/quail/latin-ltx.el @@ -43,6 +43,26 @@ system, including many technical ones. Examples: t t nil nil nil nil nil nil nil t) (eval-when-compile + (require 'cl-lib) + + (defconst latin-ltx--mark-map + '(("DOT BELOW" . "d") + ("DOT ABOVE" . ".") + ("OGONEK" . "k") + ("CEDILLA" . "c") + ("CARON" . "v") + ;; ("HOOK ABOVE" . ??) + ("MACRON" . "=") + ("BREVE" . "u") + ("TILDE" . "~") + ("GRAVE" . "`") + ("CIRCUMFLEX" . "^") + ("DIAERESIS" . "\"") + ("DOUBLE ACUTE" . "H") + ("ACUTE" . "'"))) + + (defconst latin-ltx--mark-re (regexp-opt (mapcar #'car latin-ltx--mark-map))) + (defun latin-ltx--ascii-p (char) (and (characterp char) (< char 128))) @@ -53,7 +73,8 @@ system, including many technical ones. Examples: (pcase rule (`(,_ ,(pred characterp)) (push rule newrules)) ;; Normal quail rule. (`(,seq ,re) - (let ((count 0)) + (let ((count 0) + (re (eval re t))) (dolist (pair (ucs-names)) (let ((name (car pair)) (char (cdr pair))) @@ -68,9 +89,27 @@ system, including many technical ones. Examples: (push (list x char) newrules)) (setq count (1+ count)) (push (list keys char) newrules)))))) - ;(message "latin-ltx: %d mapping for %S" count re) + ;; (message "latin-ltx: %d mappings for %S" count re) )))) - `(quail-define-rules ,@(nreverse (delete-dups newrules)))))) + (setq newrules (delete-dups newrules)) + (let ((rules (copy-sequence newrules))) + (while rules + (let ((rule (pop rules))) + (when (assoc (car rule) rules) + (let ((conflicts (list (cadr rule))) + (tail rules) + c) + (while (setq c (assoc (car rule) tail)) + (push (cadr c) conflicts) + (setq tail (cdr (memq c tail))) + (setq rules (delq c rules))) + (message "Conflict for %S: %S" + (car rule) (apply #'string conflicts))))))) + (let ((inputs (mapcar #'car newrules))) + (setq inputs (delete-dups inputs)) + (message "latin-ltx: %d rules (+ %d conflicts)!" + (length inputs) (- (length newrules) (length inputs)))) + `(quail-define-rules ,@(nreverse newrules))))) (latin-ltx--define-rules ("!`" ?¡) @@ -89,69 +128,35 @@ system, including many technical ones. Examples: ("$^o$" ?º) ("?`" ?¿) - ("\\`" ?̀) - ("\\`{}" ?`) ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\`{%s}" c) (format "\\`%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH GRAVE") + (let* ((c (if (match-end 1) + (downcase (match-string 2 name)) + (match-string 2 name))) + (mark1 (cdr (assoc (match-string 3 name) latin-ltx--mark-map))) + (mark2 (if (match-end 4) + (cdr (assoc (match-string 4 name) latin-ltx--mark-map)))) + (marks (if mark2 (concat mark1 "\\" mark2) mark1))) + (cl-assert mark1) + (cons (format "\\%s{%s}" marks c) + ;; Exclude "d" because we use "\\dh" for something else. + (unless (member (or mark2 mark1) '("d"));; "k" + (list (format "\\%s%s" marks c)))))) + (concat "\\`LATIN \\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH \\(" + latin-ltx--mark-re "\\)\\(?: AND \\(" + latin-ltx--mark-re "\\)\\)?\\'")) - ("\\'" ?́) - ("\\'{}" ?´) ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\'{%s}" c) (format "\\'%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH ACUTE") + (let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map)))) + (cl-assert mark) + (list (format "\\%s" mark)))) + (concat "\\`COMBINING \\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'")) - ("\\^" ?̂) - ("\\^{}" ?^) ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\^{%s}" c) (format "\\^%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CIRCUMFLEX") - - ("\\~" ?̃) - ("\\~{}" ?˜) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\~{%s}" c) (format "\\~%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH TILDE") - - ("\\\"" ?̈) - ("\\\"{}" ?¨) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\\"{%s}" c) (format "\\\"%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DIAERESIS") - - ("\\k" ?̨) - ("\\k{}" ?˛) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\k{%s}" c) ;; (format "\\k%s" c) - ))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH OGONEK") - - ("\\c" ?̧) - ("\\c{}" ?¸) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\c{%s}" c) (format "\\c%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CEDILLA") + (unless (latin-ltx--ascii-p char) + (let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map)))) + (cl-assert mark) + (list (format "\\%s{}" mark))))) + (concat "\\`\\(?:SPACING \\)?\\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'")) ("\\AA" ?Å) ;; ("{\\AA}" ?Å) ("\\AE" ?Æ) ;; ("{\\AE}" ?Æ) @@ -166,42 +171,6 @@ system, including many technical ones. Examples: ("$\\div$" ?÷) ("\\div" ?÷) ("\\o" ?ø) ;; ("{\\o}" ?ø) - ("\\=" ?̄) - ("\\={}" ?¯) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\={%s}" c) (format "\\=%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH MACRON") - - ("\\u" ?̆) - ("\\u{}" ?˘) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\u{%s}" c) (format "\\u%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH BREVE") - - ("\\." ?̇) - ("\\.{}" ?˙) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\.{%s}" c) (format "\\.%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOT ABOVE") - - ("\\v" ?̌) - ("\\v{}" ?ˇ) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\v{%s}" c) (format "\\v%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CARON") - ("\\~{\\i}" ?ĩ) ("\\={\\i}" ?ī) ("\\u{\\i}" ?ĭ) @@ -214,12 +183,6 @@ system, including many technical ones. Examples: ("\\H" ?̋) ("\\H{}" ?˝) - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\H{%s}" c) (format "\\H%s" c)))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOUBLE ACUTE") ("\\U{o}" ?ő) ("\\Uo" ?ő) ;; FIXME: Was it just a typo? ("\\OE" ?Œ) ;; ("{\\OE}" ?Œ) @@ -248,15 +211,11 @@ system, including many technical ones. Examples: (string (if (match-end 2) ?^ ?_) basechar)))) "\\(.*\\)SU\\(?:B\\|\\(PER\\)\\)SCRIPT \\(.*\\)") - ("^\\gamma" ?ˠ) - - ((lambda (name char) - (let* ((base (format "LATIN %s LETTER %s" - (match-string 1 name) (match-string 2 name))) - (basechar (cdr (assoc base (ucs-names))))) - (when (latin-ltx--ascii-p basechar) - (string ?^ basechar)))) - "MODIFIER LETTER \\(SMALL\\|CAPITAL\\) \\(.*\\)") + ((lambda (name _char) + (let* ((basename (match-string 2 name)) + (name (if (match-end 1) (capitalize basename) (downcase basename)))) + (concat "^" (if (> (length name) 1) "\\") name))) + "\\`MODIFIER LETTER \\(?:SMALL\\|CAPITA\\(L\\)\\) \\([[:ascii:]]+\\)\\'") ;; ((lambda (name char) (format "^%s" (downcase (match-string 1 name)))) ;; "\\`MODIFIER LETTER SMALL \\(.\\)\\'") @@ -268,22 +227,14 @@ system, including many technical ones. Examples: ("\\b" ?̱) - ("\\d" ?̣) - ;; ("\\d{}" ?) ;; FIXME: can't find the DOT BELOW character. - ((lambda (name char) - (let ((c (if (match-end 1) - (downcase (match-string 2 name)) - (match-string 2 name)))) - (list (format "\\d{%s}" c) ;; (format "\\d%s" c) - ))) - "\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOT BELOW") - ("\\rq" ?’) ;; FIXME: Provides some useful entries (yen, euro, copyright, registered, ;; currency, minus, micro), but also a lot of dubious ones. ((lambda (name char) - (unless (latin-ltx--ascii-p char) + (unless (or (latin-ltx--ascii-p char) + ;; We prefer COMBINING LONG SOLIDUS OVERLAY for \not. + (member name '("NOT SIGN"))) (concat "\\" (downcase (match-string 1 name))))) "\\`\\([^- ]+\\) SIGN\\'") @@ -373,7 +324,6 @@ system, including many technical ones. Examples: ("\\circledcirc" ?⊚) ("\\circleddash" ?⊝) ("\\clubsuit" ?♣) - ("\\colon" ?:) ;FIXME: Conflict with "COLON SIGN" ₡. ("\\coloneq" ?≔) ("\\complement" ?∁) ("\\cong" ?≅) @@ -396,7 +346,6 @@ system, including many technical ones. Examples: ("\\ddots" ?⋱) ("\\diamond" ?⋄) ("\\diamondsuit" ?♢) - ("\\digamma" ?Ϝ) ("\\divideontimes" ?⋇) ("\\doteq" ?≐) ("\\doteqdot" ?≑) From 206580428516ca7b21d438b5ae4618e4c8b49ac8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 13 Mar 2013 21:59:13 -0700 Subject: [PATCH 4/8] * admin/admin.el (manual-pdf, manual-dvi): Pass -I to texi2pdf, texi2dvi. --- admin/ChangeLog | 4 ++++ admin/admin.el | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index bf37688c337..e0573318187 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2013-03-14 Glenn Morris + + * admin.el (manual-pdf, manual-dvi): Pass -I to texi2pdf, texi2dvi. + 2013-03-12 Glenn Morris * admin.el (manual-html-mono, manual-html-node): Add -DWWW_GNU_ORG. diff --git a/admin/admin.el b/admin/admin.el index ea08c0d1c74..1ae3148ffd3 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -339,12 +339,22 @@ the @import directive." (defun manual-pdf (texi-file dest) "Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST." - (call-process "texi2pdf" nil nil nil texi-file "-o" dest)) + (call-process "texi2pdf" nil nil nil + "-I" (expand-file-name "../emacs" + (file-name-directory texi-file)) + "-I" (expand-file-name "../misc" + (file-name-directory texi-file)) + texi-file "-o" dest)) (defun manual-dvi (texi-file dest ps-dest) "Run texi2dvi on TEXI-FILE, emitting dvi output to DEST. Also generate PostScript output in PS-DEST." - (call-process "texi2dvi" nil nil nil texi-file "-o" dest) + (call-process "texi2dvi" nil nil nil + "-I" (expand-file-name "../emacs" + (file-name-directory texi-file)) + "-I" (expand-file-name "../misc" + (file-name-directory texi-file)) + texi-file "-o" dest) (call-process "dvips" nil nil nil dest "-o" ps-dest) (call-process "gzip" nil nil nil dest) (call-process "gzip" nil nil nil ps-dest)) From 00094c26f3140609f43276673908530fe3390cfc Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 14 Mar 2013 19:48:05 +0800 Subject: [PATCH 5/8] * thingatpt.el (end-of-sexp): Fix bug#13952. --- lisp/ChangeLog | 4 ++++ lisp/thingatpt.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b853399e462..85d0d5e9c39 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-03-14 Leo Liu + + * thingatpt.el (end-of-sexp): Fix bug#13952. + 2013-03-11 Glenn Morris * Version 24.3 released. diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index e1e3e8e1e46..4fd9e2e83b2 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -182,7 +182,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." (defun end-of-sexp () "Move point to the end of the current sexp. \[This is an internal function.]" - (let ((char-syntax (char-syntax (char-after)))) + (let ((char-syntax (and (char-after) (char-syntax (char-after))))) (if (or (eq char-syntax ?\)) (and (eq char-syntax ?\") (in-string-p))) (forward-char 1) From 95b43468a4958795cee5e7bd232239c5f61d2475 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 14 Mar 2013 22:16:00 +0800 Subject: [PATCH 6/8] * thingatpt.el (end-of-sexp): Use syntax-after. --- lisp/ChangeLog | 2 +- lisp/thingatpt.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85d0d5e9c39..993d9789bad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,6 @@ 2013-03-14 Leo Liu - * thingatpt.el (end-of-sexp): Fix bug#13952. + * thingatpt.el (end-of-sexp): Fix bug#13952. Use syntax-after. 2013-03-11 Glenn Morris diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 4fd9e2e83b2..8c45659ee4a 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -182,7 +182,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." (defun end-of-sexp () "Move point to the end of the current sexp. \[This is an internal function.]" - (let ((char-syntax (and (char-after) (char-syntax (char-after))))) + (let ((char-syntax (syntax-after (point)))) (if (or (eq char-syntax ?\)) (and (eq char-syntax ?\") (in-string-p))) (forward-char 1) From efe8bf5d9bd5ec99867abe624ddb055236a882f4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 14 Mar 2013 10:48:03 -0400 Subject: [PATCH 7/8] * lisp/emacs-lisp/smie.el (smie-auto-fill): Don't inf-loop if there's no token before point. Fixes: debbugs:13942 --- lisp/ChangeLog | 17 ++++++++----- lisp/emacs-lisp/smie.el | 53 ++++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 993d9789bad..71460a3d7a7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-03-14 Stefan Monnier + + * emacs-lisp/smie.el (smie-auto-fill): Don't inf-loop if there's no + token before point (bug#13942). + 2013-03-14 Leo Liu * thingatpt.el (end-of-sexp): Fix bug#13952. Use syntax-after. @@ -25,8 +30,8 @@ 2013-02-20 Fabián Ezequiel Gallina - * progmodes/python.el (python-info-current-defun): Enhance - match-data cluttering prevention. + * progmodes/python.el (python-info-current-defun): + Enhance match-data cluttering prevention. 2013-02-19 Glenn Morris @@ -40,8 +45,8 @@ 2013-02-19 Fabián Ezequiel Gallina - * progmodes/python.el (python-indent-context): Fix - python-info-line-ends-backslash-p call. + * progmodes/python.el (python-indent-context): + Fix python-info-line-ends-backslash-p call. (python-info-line-ends-backslash-p) (python-info-beginning-of-backslash): Respect line-number argument. @@ -119,8 +124,8 @@ searching for its match. (c-invalidate-state-cache-1): Add HERE parameter to function call. (c-parse-state-1): Don't narrow here for 'forward strategy, - instead passing extra parameter HERE to several functions. Remove - 'BOD strategy. + instead passing extra parameter HERE to several functions. + Remove 'BOD strategy. 2013-02-01 Stefan Monnier diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index eb3fa8f3b09..18cc0e811ce 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1631,31 +1631,34 @@ to which that point should be aligned, if we were to reindent it.") (defun smie-auto-fill () (let ((fc (current-fill-column))) (while (and fc (> (current-column) fc)) - (cond - ((not (or (nth 8 (save-excursion - (syntax-ppss (line-beginning-position)))) - (nth 8 (syntax-ppss)))) - (save-excursion - (beginning-of-line) - (smie-indent-forward-token) - (let ((bsf (point)) - (gain 0) - curcol) - (while (<= (setq curcol (current-column)) fc) - ;; FIXME? `smie-indent-calculate' can (and often will) - ;; return a result that actually depends on the presence/absence - ;; of a newline, so the gain computed here may not be accurate, - ;; but in practice it seems to works well enough. - (let* ((newcol (smie-indent-calculate)) - (newgain (- curcol newcol))) - (when (> newgain gain) - (setq gain newgain) - (setq bsf (point)))) - (smie-indent-forward-token)) - (when (> gain 0) - (goto-char bsf) - (newline-and-indent))))) - (t (do-auto-fill)))))) + (or (unless (or (nth 8 (save-excursion + (syntax-ppss (line-beginning-position)))) + (nth 8 (syntax-ppss))) + (save-excursion + (let ((end (point)) + (bsf (progn (beginning-of-line) + (smie-indent-forward-token) + (point))) + (gain 0) + curcol) + (while (and (<= (point) end) + (<= (setq curcol (current-column)) fc)) + ;; FIXME? `smie-indent-calculate' can (and often will) + ;; return a result that actually depends on the + ;; presence/absence of a newline, so the gain computed here + ;; may not be accurate, but in practice it seems to works + ;; well enough. + (let* ((newcol (smie-indent-calculate)) + (newgain (- curcol newcol))) + (when (> newgain gain) + (setq gain newgain) + (setq bsf (point)))) + (smie-indent-forward-token)) + (when (> gain 0) + (goto-char bsf) + (newline-and-indent) + 'done)))) + (do-auto-fill))))) (defun smie-setup (grammar rules-function &rest keywords) From 67ed8fcd04edeff2d4931acf476e7067c5ceeef2 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 16 Mar 2013 23:24:39 +0800 Subject: [PATCH 8/8] =?UTF-8?q?*=20progmodes/scheme.el:=20Add=20indentatio?= =?UTF-8?q?n=20and=20font-locking=20for=20=CE=BB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: debbugs:13975 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/scheme.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71460a3d7a7..8102cb56a97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-03-16 Leo Liu + + * progmodes/scheme.el: Add indentation and font-locking for λ. + (Bug#13975) + 2013-03-14 Stefan Monnier * emacs-lisp/smie.el (smie-auto-fill): Don't inf-loop if there's no diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index a7dbc411622..01f0988f08f 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -310,7 +310,7 @@ See `run-hooks'." "(" (regexp-opt '("begin" "call-with-current-continuation" "call/cc" "call-with-input-file" "call-with-output-file" "case" "cond" - "do" "else" "for-each" "if" "lambda" + "do" "else" "for-each" "if" "lambda" "λ" "let" "let*" "let-syntax" "letrec" "letrec-syntax" ;; SRFI 11 usage comes up often enough. "let-values" "let*-values" @@ -410,6 +410,7 @@ that variable's value is a string." (put 'make 'scheme-indent-function 1) (put 'style 'scheme-indent-function 1) (put 'root 'scheme-indent-function 1) +(put 'λ 'scheme-indent-function 1) (defvar dsssl-font-lock-keywords (eval-when-compile