commit 683e995e53aac51eb2fea4eeaf630a51bdc714f5 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Tue Jun 9 20:34:50 2015 -0700 ; * lisp/simple: Revert presumably unintentional deletion of special-mode. diff --git a/lisp/simple.el b/lisp/simple.el index 9dfb3f2..1eb0643 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -353,6 +353,27 @@ Other major modes are defined by comparison with this one." (kill-all-local-variables) (run-mode-hooks)) +;; Special major modes to view specially formatted data rather than files. + +(defvar special-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (define-key map "q" 'quit-window) + (define-key map " " 'scroll-up-command) + (define-key map [?\S-\ ] 'scroll-down-command) + (define-key map "\C-?" 'scroll-down-command) + (define-key map "?" 'describe-mode) + (define-key map "h" 'describe-mode) + (define-key map ">" 'end-of-buffer) + (define-key map "<" 'beginning-of-buffer) + (define-key map "g" 'revert-buffer) + map)) + +(put 'special-mode 'mode-class 'special) +(define-derived-mode special-mode nil "Special" + "Parent major mode from which special major modes should inherit." + (setq buffer-read-only t)) + ;; Making and deleting lines. (defvar self-insert-uses-region-functions nil commit 0fad7268a8c552274c842ab24a085bd43946f2db Author: Stefan Monnier Date: Tue Jun 9 22:14:47 2015 -0400 * lisp/simple.el (eval-expression): Macroexpand before evaluating (bug#20730) diff --git a/lisp/simple.el b/lisp/simple.el index 4ef45c5..9dfb3f2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -353,27 +353,6 @@ Other major modes are defined by comparison with this one." (kill-all-local-variables) (run-mode-hooks)) -;; Special major modes to view specially formatted data rather than files. - -(defvar special-mode-map - (let ((map (make-sparse-keymap))) - (suppress-keymap map) - (define-key map "q" 'quit-window) - (define-key map " " 'scroll-up-command) - (define-key map [?\S-\ ] 'scroll-down-command) - (define-key map "\C-?" 'scroll-down-command) - (define-key map "?" 'describe-mode) - (define-key map "h" 'describe-mode) - (define-key map ">" 'end-of-buffer) - (define-key map "<" 'beginning-of-buffer) - (define-key map "g" 'revert-buffer) - map)) - -(put 'special-mode 'mode-class 'special) -(define-derived-mode special-mode nil "Special" - "Parent major mode from which special major modes should inherit." - (setq buffer-read-only t)) - ;; Making and deleting lines. (defvar self-insert-uses-region-functions nil @@ -1448,7 +1427,7 @@ this command arranges for all errors to enter the debugger." ;; Bind debug-on-error to something unique so that we can ;; detect when evalled code changes it. (let ((debug-on-error old-value)) - (push (eval exp lexical-binding) values) + (push (eval (macroexpand-all exp) lexical-binding) values) (setq new-value debug-on-error)) ;; If evalled code has changed the value of debug-on-error, ;; propagate that change to the global binding. commit 06193432f2c38811a4be075274bb5be014f9b594 Author: Stefan Monnier Date: Tue Jun 9 22:10:38 2015 -0400 * lisp/progmodes/sh-script.el: Better handle nested quotes (sh-here-doc-open-re): Don't mis-match the <<< operator (bug#20683). (sh-font-lock-quoted-subshell): Make sure double quotes within single quotes don't mistakenly end prematurely the surrounding string. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 537b180..6709e75 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -987,7 +987,7 @@ See `sh-feature'.") "\\(?:\\(?:.*[^\\\n]\\)?\\(?:\\\\\\\\\\)*\\\\\n\\)*.*") (defconst sh-here-doc-open-re - (concat "<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|[-/~._]\\)+\\)" + (concat "[^<]<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|[-/~._]\\)+\\)" sh-escaped-line-re "\\(\n\\)"))) (defun sh--inside-noncommand-expression (pos) @@ -1064,7 +1064,16 @@ subshells can nest." (pcase (char-after) (?\' (pcase state (`double-quote nil) - (_ (forward-char 1) (skip-chars-forward "^'" limit)))) + (_ (forward-char 1) + ;; FIXME: mark skipped double quotes as punctuation syntax. + (let ((spos (point))) + (skip-chars-forward "^'" limit) + (save-excursion + (let ((epos (point))) + (goto-char spos) + (while (search-forward "\"" epos t) + (put-text-property (point) (1- (point)) + 'syntax-table '(1))))))))) (?\\ (forward-char 1)) (?\" (pcase state (`double-quote (setq state (pop states))) commit 26a17f5ac9b5b996cb1598607441b3e29be8e00b Author: Stefan Monnier Date: Tue Jun 9 21:21:29 2015 -0400 * lisp/progmodes/elisp-mode.el: Require cl-lib for cl-defstruct. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 9494e97..5d5f258 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -29,6 +29,7 @@ ;;; Code: (require 'lisp-mode) +(eval-when-compile (require 'cl-lib)) (define-abbrev-table 'emacs-lisp-mode-abbrev-table () "Abbrev table for Emacs Lisp mode. commit 898945a27ecc020e6295ffe27b534129267c4f56 Author: Glenn Morris Date: Tue Jun 9 15:24:17 2015 -0400 * test/automated/Makefile.in (ELFILES): Sort. diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in index faf0b3d..174b3b6 100644 --- a/test/automated/Makefile.in +++ b/test/automated/Makefile.in @@ -93,7 +93,7 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@ $(emacs) -l ert -l $$loadfile \ -f ert-run-tests-batch-and-exit ${WRITE_LOG} -ELFILES = $(wildcard ${srcdir}/*.el) +ELFILES = $(sort $(wildcard ${srcdir}/*.el)) LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES})) TESTS = ${LOGFILES:.log=} commit 79344156956891ded1ab79c42e8b4bc467366b3b Author: Glenn Morris Date: Tue Jun 9 15:23:47 2015 -0400 * Makefile.in (SUBDIR_MAKEFILES): * lwlib/Makefile.in (WARN_CFLAGS): Use built-in Make functions rather than echo+sed. diff --git a/Makefile.in b/Makefile.in index d2948f8..63e17c3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -290,7 +290,7 @@ SUBDIR = $(NTDIR) lib lib-src src lisp # The subdir makefiles created by config.status. SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@ -SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'` +SUBDIR_MAKEFILES = $(patsubst ${srcdir}/%,%,${SUBDIR_MAKEFILES_IN:.in=}) # Subdirectories to install, and where they'll go. lib-src's and nt's # makefiles know how to install them, so we don't do that here. diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index cbc747c..bfeef16 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -31,7 +31,8 @@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ -WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'` +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_CFLAGS := $(filter-out -Wwrite-strings,${WARN_CFLAGS}) WERROR_CFLAGS = @WERROR_CFLAGS@ CAIRO_CFLAGS= @CAIRO_CFLAGS@ commit 76f2d766ad6691eae6ae4006264f59724cc73a23 Author: Eli Zaretskii Date: Tue Jun 9 19:36:14 2015 +0300 Update char-script-table * lisp/international/characters.el (char-script-table): Update from Unicode 8.0 Draft. diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 247a10d..f70a328 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1172,6 +1172,8 @@ Setup char-width-table appropriate for non-CJK language environment." ;; ;; The Unicode blocks actually extend past some of these ranges with ;; undefined codepoints. +;; +;; Last update: http://www.unicode.org/Public/8.0.0/ucd/Blocks-8.0.0d3.txt (let ((script-list nil)) (dolist (elt @@ -1181,7 +1183,7 @@ Setup char-width-table appropriate for non-CJK language environment." (#x02B0 #x036F latin) ; Spacing Modifiers and Diacriticals (#x0370 #x03E1 greek) (#x03E2 #x03EF coptic) - (#x03F0 #x03F3 greek) + (#x03F0 #x03FF greek) (#x0400 #x052F cyrillic) (#x0530 #x058F armenian) (#x0590 #x05FF hebrew) @@ -1225,7 +1227,7 @@ Setup char-width-table appropriate for non-CJK language environment." (#x1950 #x197F tai-le) (#x1980 #x19DF tai-lue) ; New Tai Lue (#x19E0 #x19FF khmer) ; Khmer Symbols - (#x1A00 #x1A00 buginese) + (#x1A00 #x1A1F buginese) (#x1A20 #x1AAF tai-tham) (#x1AB0 #x1AFF latin) ; Combining Diacritical Marks Extended (#x1B00 #x1B7F balinese) @@ -1259,7 +1261,7 @@ Setup char-width-table appropriate for non-CJK language environment." (#x31A0 #x31BF bopomofo) ; Bopomofo Extended (#x31C0 #x31EF cjk-misc) ; CJK Strokes (#x31F0 #x31FF kana) ; Katakana Phonetic Extensions - (#x3200 #x9FAF han) + (#x3200 #x9FFF han) (#xA000 #xA4CF yi) (#xA4D0 #xA4FF lisu) (#xA500 #xA63F vai) @@ -1282,6 +1284,7 @@ Setup char-width-table appropriate for non-CJK language environment." (#xAAE0 #xAAFF meetei-mayek) ; Meetei Mayek Extensions (#xAB00 #xAB2F ethiopic) ; Ethiopic Extended-A (#xAB30 #xAB6F latin) ; Latin Extended-E + (#xAB70 #xABBF cherokee) ; Cherokee Supplement (#xABC0 #xABFF meetei-mayek) (#xAC00 #xD7FF hangul) (#xF900 #xFAFF han) @@ -1289,12 +1292,14 @@ Setup char-width-table appropriate for non-CJK language environment." (#xFB13 #xFB17 armenian) ; Armenian ligatures (#xFB1D #xFB4F hebrew) ; Alphabetic Presentation Forms (#xFB50 #xFDFF arabic) ; Arabic Presentation Forms-A + (#xFE10 #xFE1F vertical-form) (#xFE20 #xFE2F latin) ; Combining Half Marks (#xFE30 #xFE4F han) + (#xFE50 #xFE6F symbol) ; Small Form Variants (#xFE70 #xFEFF arabic) ; Arabic Presentation Forms-B (#xFF00 #xFF5F cjk-misc) (#xFF61 #xFF9F kana) - (#xFFE0 #xFFE6 cjk-misc) + (#xFFE0 #xFFEF cjk-misc) (#x10000 #x100FF linear-b) (#x10100 #x1013F aegean-number) (#x10140 #x1018F ancient-greek-number) @@ -1313,11 +1318,12 @@ Setup char-width-table appropriate for non-CJK language environment." (#x10480 #x104AF osmanya) (#x10500 #x1052F elbasan) (#x10530 #x1056F caucasian-albanian) - (#x10600 #x106BF linear-a) + (#x10600 #x1077F linear-a) (#x10800 #x1083F cypriot-syllabary) (#x10840 #x1085F aramaic) (#x10860 #x1087F palmyrene) (#x10880 #x108AF nabataean) + (#x108E0 #x108FF hatran) (#x10900 #x1091F phoenician) (#x10920 #x1093F lydian) (#x10980 #x109FF meroitic) @@ -1330,6 +1336,7 @@ Setup char-width-table appropriate for non-CJK language environment." (#x10B60 #x10B7F inscriptional-pahlavi) (#x10B80 #x10BAF psalter-pahlavi) (#x10C00 #x10C4F old-turkic) + (#x10C80 #x10CFF old-hungarian) (#x10E60 #x10E7F rumi-number) (#x11000 #x1107F brahmi) (#x11080 #x110CF kaithi) @@ -1339,17 +1346,21 @@ Setup char-width-table appropriate for non-CJK language environment." (#x11180 #x111DF sharada) (#x111E0 #x111FF sinhala-archaic-number) (#x11200 #x1124F khojki) + (#x11280 #x112AF multani) (#x112B0 #x112FF khudawadi) (#x11300 #x1137F grantha) (#x11480 #x114DF tirhuta) (#x11580 #x115FF siddham) (#x11600 #x1165F modi) (#x11680 #x116CF takri) + (#x11700 #x1173F ahom) (#x118A0 #x118FF warang-citi) (#x11AC0 #x11AFF pau-cin-hau) (#x12000 #x123FF cuneiform) (#x12400 #x1247F cuneiform-numbers-and-punctuation) + (#x12400 #x1254F cuneiform) ; Early Dynastic Cuneiform (#x13000 #x1342F egyptian) + (#x14400 #x1457F anatolian) (#x16800 #x16A3F bamum) (#x16A40 #x16A6F mro) (#x16AD0 #x16AFF bassa-vah) @@ -1363,6 +1374,7 @@ Setup char-width-table appropriate for non-CJK language environment." (#x1D300 #x1D35F tai-xuan-jing-symbol) (#x1D360 #x1D37F counting-rod-numeral) (#x1D400 #x1D7FF mathematical) + (#x1D800 #x1DAAF sutton-sign-writing) (#x1E800 #x1E8DF mende-kikakui) (#x1EE00 #x1EEFF arabic) ; Arabic Mathematical Alphabetic Symbols (#x1F000 #x1F02F mahjong-tile) @@ -1370,8 +1382,8 @@ Setup char-width-table appropriate for non-CJK language environment." (#x1F0A0 #x1F0FF playing-cards) (#x1F100 #x1F1FF symbol) ; Enclosed Alphanumeric Supplement (#x1F200 #x1F2FF han) ; Enclosed Ideographic Supplement - (#x1F300 #x1F8FF symbol) - (#x20000 #x2B81F han) + (#x1F300 #x1F9FF symbol) + (#x20000 #x2CEAF han) (#x2F800 #x2FFFF han))) (set-char-table-range char-script-table (cons (car elt) (nth 1 elt)) (nth 2 elt)) commit e0707282d214ff17b20a9f07ca2f4055610d30ea Author: Eli Zaretskii Date: Tue Jun 9 17:56:39 2015 +0300 Improve font selection for punctuation and other symbols * src/fontset.c (face_for_char): If the character's script is 'symbol', and the font used for ASCII face has a glyph for it, use the font for the ASCII face instead of searching the fontsets. This comes instead of NS-specific code that used the current face's font instead, which is now disabled due to undesirable consequences. (Bug#20727) diff --git a/src/fontset.c b/src/fontset.c index e957c38..97bdbce 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -892,18 +892,46 @@ face_for_char (struct frame *f, struct face *face, int c, if (ASCII_CHAR_P (c) || CHAR_BYTE8_P (c)) return face->ascii_face->id; -#ifdef HAVE_NS - if (face->font) + if (c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol)) { - /* Fonts often have characters in other scripts, like symbol, even if they - don't match script: symbol. So check if the character is present - in the current face first. Only enable for NS for now, but should - perhaps be general? */ + /* Fonts often have characters for punctuation and other + symbols, even if they don't match the 'symbol' script. So + check if the character is present in the current ASCII face + first, and if so, use the same font as used by that face. + This avoids unnecessarily switching to another font when the + frame's default font will do. We only do this for symbols so + that users could still setup fontsets to force Emacs to use + specific fonts for characters from other scripts, because + choice of fonts is frequently affected by cultural + preferences and font features, not by font coverage. + However, these considerations are unlikely to be relevant to + punctuation and other symbols, since the latter generally + aren't specific to any culture, and don't require + sophisticated OTF features. */ Lisp_Object font_object; - XSETFONT (font_object, face->font); - if (font_has_char (f, font_object, c)) return face->id; - } + + if (face->ascii_face->font) + { + XSETFONT (font_object, face->ascii_face->font); + if (font_has_char (f, font_object, c)) + return face->ascii_face->id; + } + +#if 0 + /* Try the current face. Disabled because it can cause + counter-intuitive results, whereby the font used for some + character depends on the characters that precede it on + display. See the discussion of bug #15138. Note that the + original bug reported in #15138 was in a situation where face + == face->ascii_face, so the above code solves that situation + without risking the undesirable consequences. */ + if (face->font) + { + XSETFONT (font_object, face->font); + if (font_has_char (f, font_object, c)) return face->id; + } #endif + } fontset = FONTSET_FROM_ID (face->fontset); eassert (!BASE_FONTSET_P (fontset));