commit 2276a19d88b6c35ee5b82aa449641660dc674075 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sat Jun 13 10:31:37 2015 +0300 Revert last change in fontset.el * lisp/international/fontset.el (setup-default-fontset): Revert the change "Configure Symbola font only if installed", since font search is evidently not yet set up when this function is called. (Bug#20727) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index aa7a30e..8daa4b6 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -695,49 +695,47 @@ ;; Special setup for various symbols and some rarely used characters ;; covered well by Symbola. - (when (find-font (font-spec :name "Symbola")) - (dolist (symbol-subgroup - '((#x0250 . #x02AF) ;; IPA Extensions - (#x2000 . #x206F) ;; General Punctuation - (#x2070 . #x209F) ;; Superscripts and Subscripts - (#x20A0 . #x20CF) ;; Currency Symbols - (#x2100 . #x214F) ;; Letterlike Symbols - (#x2150 . #x218F) ;; Number Forms - (#x2190 . #x21FF) ;; Arrows - (#x2200 . #x22FF) ;; Mathematical Operators - (#x2300 . #x23FF) ;; Miscellaneous Technical - (#x2400 . #x243F) ;; Control Pictures - (#x2440 . #x245F) ;; Optical Char Recognition - (#x2460 . #x24FF) ;; Enclosed Alphanumerics - (#x25A0 . #x25FF) ;; Geometric Shapes - (#x2600 . #x26FF) ;; Miscellaneous Symbols - (#x2700 . #x27bF) ;; Dingbats - (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A - (#x27F0 . #x27FF) ;; Supplemental Arrows-A - (#x2900 . #x297F) ;; Supplemental Arrows-B - (#x2980 . #x29FF) ;; Misc Mathematical Symbols-B - (#x2A00 . #x2AFF) ;; Suppl. Math Operators - (#x2B00 . #x2BFF) ;; Misc Symbols and Arrows - (#x2E00 . #x2E7F) ;; Supplemental Punctuation - (#x4DC0 . #x4DFF) ;; Yijing Hexagram Symbols - (#xFE10 . #xFE1F) ;; Vertical Forms - (#x10100 . #x1013F) ;; Aegean Numbers - (#x102E0 . #x102FF) ;; Coptic Epact Numbers - (#x1D000 . #x1D0FF) ;; Byzanthine Musical Symbols - (#x1D200 . #x1D24F) ;; Ancient Greek Musical Notation - (#x1F0A0 . #x1F0FF) ;; Playing Cards - (#x1F100 . #x1F1FF) ;; Enclosed Alphanumeric Suppl - (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs - (#x1F600 . #x1F64F) ;; Emoticons - (#x1F650 . #x1F67F) ;; Ornamental Dingbats - (#x1F680 . #x1F6FF) ;; Transport and Map Symbols - (#x1F700 . #x1F77F) ;; Alchemical Symbols - (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended - (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C - (set-fontset-font "fontset-default" symbol-subgroup "Symbola"))) + (dolist (symbol-subgroup + '((#x0250 . #x02AF) ;; IPA Extensions + (#x2000 . #x206F) ;; General Punctuation + (#x2070 . #x209F) ;; Superscripts and Subscripts + (#x20A0 . #x20CF) ;; Currency Symbols + (#x2100 . #x214F) ;; Letterlike Symbols + (#x2150 . #x218F) ;; Number Forms + (#x2190 . #x21FF) ;; Arrows + (#x2200 . #x22FF) ;; Mathematical Operators + (#x2300 . #x23FF) ;; Miscellaneous Technical + (#x2400 . #x243F) ;; Control Pictures + (#x2440 . #x245F) ;; Optical Char Recognition + (#x2460 . #x24FF) ;; Enclosed Alphanumerics + (#x25A0 . #x25FF) ;; Geometric Shapes + (#x2600 . #x26FF) ;; Miscellaneous Symbols + (#x2700 . #x27bF) ;; Dingbats + (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A + (#x27F0 . #x27FF) ;; Supplemental Arrows-A + (#x2900 . #x297F) ;; Supplemental Arrows-B + (#x2980 . #x29FF) ;; Misc Mathematical Symbols-B + (#x2A00 . #x2AFF) ;; Suppl. Math Operators + (#x2B00 . #x2BFF) ;; Misc Symbols and Arrows + (#x2E00 . #x2E7F) ;; Supplemental Punctuation + (#x4DC0 . #x4DFF) ;; Yijing Hexagram Symbols + (#xFE10 . #xFE1F) ;; Vertical Forms + (#x10100 . #x1013F) ;; Aegean Numbers + (#x102E0 . #x102FF) ;; Coptic Epact Numbers + (#x1D000 . #x1D0FF) ;; Byzanthine Musical Symbols + (#x1D200 . #x1D24F) ;; Ancient Greek Musical Notation + (#x1F0A0 . #x1F0FF) ;; Playing Cards + (#x1F100 . #x1F1FF) ;; Enclosed Alphanumeric Suppl + (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs + (#x1F600 . #x1F64F) ;; Emoticons + (#x1F650 . #x1F67F) ;; Ornamental Dingbats + (#x1F680 . #x1F6FF) ;; Transport and Map Symbols + (#x1F700 . #x1F77F) ;; Alchemical Symbols + (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended + (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C + (set-fontset-font "fontset-default" symbol-subgroup "Symbola")) ;; Box Drawing and Block Elements - (when (find-font (font-spec :name "FreeMono")) - (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono")) + (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono") ;; Append CJK fonts for characters other than han, kana, cjk-misc. ;; Append fonts for scripts whose name is also a charset name. commit 1fabab62f841c67037c3fb27697ce18177c3d4a9 Author: Glenn Morris Date: Fri Jun 12 19:26:21 2015 -0700 Ensure early startup warnings are visible at the end. (Bug#20792) * lisp/emacs-lisp/warnings.el (display-warning): If startup isn't complete, delay the warning. * lisp/startup.el (normal-top-level, command-line): Let display-warning automatically handle the needed delays. Run delayed-warnings-hook. diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 3ab4026..44a9876 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -224,87 +224,91 @@ See the `warnings' custom group for user customization features. See also `warning-series', `warning-prefix-function' and `warning-fill-prefix' for additional programming features." - (unless level - (setq level :warning)) - (unless buffer-name - (setq buffer-name "*Warnings*")) - (if (assq level warning-level-aliases) - (setq level (cdr (assq level warning-level-aliases)))) - (or (< (warning-numeric-level level) - (warning-numeric-level warning-minimum-log-level)) - (warning-suppress-p type warning-suppress-log-types) - (let* ((typename (if (consp type) (car type) type)) - (old (get-buffer buffer-name)) - (buffer (or old (get-buffer-create buffer-name))) - (level-info (assq level warning-levels)) - start end) - (with-current-buffer buffer - ;; If we created the buffer, disable undo. - (unless old - (special-mode) - (setq buffer-read-only t) - (setq buffer-undo-list t)) - (goto-char (point-max)) - (when (and warning-series (symbolp warning-series)) - (setq warning-series - (prog1 (point-marker) - (unless (eq warning-series t) - (funcall warning-series))))) - (let ((inhibit-read-only t)) - (unless (bolp) - (newline)) - (setq start (point)) - (if warning-prefix-function - (setq level-info (funcall warning-prefix-function - level level-info))) - (insert (format (nth 1 level-info) - (format warning-type-format typename)) - message) - (newline) - (when (and warning-fill-prefix (not (string-match "\n" message))) - (let ((fill-prefix warning-fill-prefix) - (fill-column 78)) - (fill-region start (point)))) - (setq end (point))) - (when (and (markerp warning-series) - (eq (marker-buffer warning-series) buffer)) - (goto-char warning-series))) - (if (nth 2 level-info) - (funcall (nth 2 level-info))) - (cond (noninteractive - ;; Noninteractively, take the text we inserted - ;; in the warnings buffer and print it. - ;; Do this unconditionally, since there is no way - ;; to view logged messages unless we output them. - (with-current-buffer buffer - (save-excursion - ;; Don't include the final newline in the arg - ;; to `message', because it adds a newline. - (goto-char end) - (if (bolp) - (forward-char -1)) - (message "%s" (buffer-substring start (point)))))) - ((and (daemonp) (null after-init-time)) - ;; Warnings assigned during daemon initialization go into - ;; the messages buffer. - (message "%s" - (with-current-buffer buffer - (save-excursion - (goto-char end) - (if (bolp) - (forward-char -1)) - (buffer-substring start (point)))))) - (t - ;; Interactively, decide whether the warning merits - ;; immediate display. - (or (< (warning-numeric-level level) - (warning-numeric-level warning-minimum-level)) - (warning-suppress-p type warning-suppress-types) - (let ((window (display-buffer buffer))) - (when (and (markerp warning-series) - (eq (marker-buffer warning-series) buffer)) - (set-window-start window warning-series)) - (sit-for 0)))))))) + (if (not (or after-init-time noninteractive (daemonp))) + ;; Ensure warnings that happen early in the startup sequence + ;; are visible when startup completes (bug#20792). + (delay-warning type message level buffer-name) + (unless level + (setq level :warning)) + (unless buffer-name + (setq buffer-name "*Warnings*")) + (if (assq level warning-level-aliases) + (setq level (cdr (assq level warning-level-aliases)))) + (or (< (warning-numeric-level level) + (warning-numeric-level warning-minimum-log-level)) + (warning-suppress-p type warning-suppress-log-types) + (let* ((typename (if (consp type) (car type) type)) + (old (get-buffer buffer-name)) + (buffer (or old (get-buffer-create buffer-name))) + (level-info (assq level warning-levels)) + start end) + (with-current-buffer buffer + ;; If we created the buffer, disable undo. + (unless old + (special-mode) + (setq buffer-read-only t) + (setq buffer-undo-list t)) + (goto-char (point-max)) + (when (and warning-series (symbolp warning-series)) + (setq warning-series + (prog1 (point-marker) + (unless (eq warning-series t) + (funcall warning-series))))) + (let ((inhibit-read-only t)) + (unless (bolp) + (newline)) + (setq start (point)) + (if warning-prefix-function + (setq level-info (funcall warning-prefix-function + level level-info))) + (insert (format (nth 1 level-info) + (format warning-type-format typename)) + message) + (newline) + (when (and warning-fill-prefix (not (string-match "\n" message))) + (let ((fill-prefix warning-fill-prefix) + (fill-column 78)) + (fill-region start (point)))) + (setq end (point))) + (when (and (markerp warning-series) + (eq (marker-buffer warning-series) buffer)) + (goto-char warning-series))) + (if (nth 2 level-info) + (funcall (nth 2 level-info))) + (cond (noninteractive + ;; Noninteractively, take the text we inserted + ;; in the warnings buffer and print it. + ;; Do this unconditionally, since there is no way + ;; to view logged messages unless we output them. + (with-current-buffer buffer + (save-excursion + ;; Don't include the final newline in the arg + ;; to `message', because it adds a newline. + (goto-char end) + (if (bolp) + (forward-char -1)) + (message "%s" (buffer-substring start (point)))))) + ((and (daemonp) (null after-init-time)) + ;; Warnings assigned during daemon initialization go into + ;; the messages buffer. + (message "%s" + (with-current-buffer buffer + (save-excursion + (goto-char end) + (if (bolp) + (forward-char -1)) + (buffer-substring start (point)))))) + (t + ;; Interactively, decide whether the warning merits + ;; immediate display. + (or (< (warning-numeric-level level) + (warning-numeric-level warning-minimum-level)) + (warning-suppress-p type warning-suppress-types) + (let ((window (display-buffer buffer))) + (when (and (markerp warning-series) + (eq (marker-buffer warning-series) buffer)) + (set-window-start window warning-series)) + (sit-for 0))))))))) ;; Use \\ so that help-enable-auto-load can do its thing. ;; Any keymap that is defined will do. diff --git a/lisp/startup.el b/lisp/startup.el index ec222b3..b389648 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -612,7 +612,7 @@ It is the default value of the variable `top-level'." charset-map-path)))) (if default-directory (setq default-directory (abbreviate-file-name default-directory)) - (delay-warning 'initialization "Error setting default-directory")) + (display-warning 'initialization "Error setting default-directory")) (let ((old-face-font-rescale-alist face-font-rescale-alist)) (unwind-protect (command-line) @@ -1167,25 +1167,18 @@ please check its value") (funcall inner) (setq init-file-had-error nil)) (error - ;; Postpone displaying the warning until all hooks - ;; in `after-init-hook' like `desktop-read' will finalize - ;; possible changes in the window configuration. - (add-hook - 'after-init-hook - (lambda () - (display-warning - 'initialization - (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\ + (display-warning + 'initialization + (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\ To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace." - user-init-file - (get (car error) 'error-message) - (if (cdr error) ": " "") - (mapconcat (lambda (s) (prin1-to-string s t)) - (cdr error) ", ")) - :warning)) - t) + user-init-file + (get (car error) 'error-message) + (if (cdr error) ": " "") + (mapconcat (lambda (s) (prin1-to-string s t)) + (cdr error) ", ")) + :warning) (setq init-file-had-error t)))) (if (and deactivate-mark transient-mark-mode) @@ -1268,7 +1261,10 @@ the `--debug-init' option to view a complete error backtrace." (package-initialize)) (setq after-init-time (current-time)) - (run-hooks 'after-init-hook) + ;; Display any accumulated warnings after all functions in + ;; `after-init-hook' like `desktop-read' have finalized possible + ;; changes in the window configuration. + (run-hooks 'after-init-hook 'delayed-warnings-hook) ;; If *scratch* exists and init file didn't change its mode, initialize it. (if (get-buffer "*scratch*") commit 147c3915a5badb09cc7708fdac30fb57b90a538f Author: Glenn Morris Date: Fri Jun 12 21:22:00 2015 -0400 * lisp/version.el (emacs-repository-get-version): Avoid calling external executable if possible. (Bug#20799) diff --git a/lisp/version.el b/lisp/version.el index 7b636f3..5776e6d 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -100,7 +100,7 @@ or if we could not determine the revision.") (define-obsolete-function-alias 'emacs-bzr-get-version 'emacs-repository-get-version "24.4") -(defun emacs-repository-get-version (&optional dir external) +(defun emacs-repository-get-version (&optional dir _unused) "Try to return as a string the repository revision of the Emacs sources. The format of the returned string is dependent on the VCS in use. Value is nil if the sources do not seem to be under version @@ -108,21 +108,35 @@ control, or if we could not determine the revision. Note that this reports on the current state of the sources, which may not correspond to the running Emacs. -Optional argument DIR is a directory to use instead of -`source-directory'. Optional argument EXTERNAL is ignored and is -retained for compatibility." +Optional argument DIR is a directory to use instead of `source-directory'." (or dir (setq dir source-directory)) - (cond ((file-directory-p (expand-file-name ".git" dir)) - (message "Waiting for git...") - (with-temp-buffer - (let ((default-directory (file-name-as-directory dir))) - (and (eq 0 - (condition-case nil - (call-process "git" nil '(t nil) nil "rev-parse" - "HEAD") - (error nil))) - (not (zerop (buffer-size))) - (replace-regexp-in-string "\n" "" (buffer-string)))))))) + (let ((file (expand-file-name ".git/HEAD" dir))) + (or (if (file-readable-p file) + (with-temp-buffer + (insert-file-contents file) + (cond ((looking-at "[0-9a-fA-F]\\{40\\}") + (match-string 0)) + ((looking-at "ref: \\(.*\\)") + (when (file-readable-p + (setq file + (expand-file-name (format ".git/%s" + (match-string 1)) + dir))) + (erase-buffer) + (insert-file-contents file) + (if (looking-at "[0-9a-fA-F]\\{40\\}") + (match-string 0))))))) + (when (file-accessible-directory-p (expand-file-name ".git" dir)) + (message "Waiting for git...") + (with-temp-buffer + (let ((default-directory (file-name-as-directory dir))) + (and (eq 0 + (condition-case nil + (call-process "git" nil '(t nil) nil "rev-parse" + "HEAD") + (error nil))) + (not (zerop (buffer-size))) + (replace-regexp-in-string "\n" "" (buffer-string))))))))) ;; We put version info into the executable in the form that `ident' uses. (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) commit 351739ba1446446dd4755aac2406c21a93edf63f Author: Paul Eggert Date: Fri Jun 12 16:27:42 2015 -0700 Document `X as "`X", not as "(` X)" * lisp/help.el (help-split-fundoc, help--make-usage-docstring): Document (backquote FOO) as "`FOO", not as "(` FOO)" (Bug#20759). diff --git a/lisp/help.el b/lisp/help.el index b766cd0..d24fbfd 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1368,18 +1368,21 @@ DEF is the function whose usage we're looking for in DOCSTRING." ;; In cases where `function' has been fset to a subr we can't search for ;; function's name in the doc string so we use `fn' as the anonymous ;; function name instead. - (when (and docstring (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring)) + (when (and docstring + (string-match "\n\n(fn\\(\\( +\\([^\n ]+\\( .*\\)?\\)?\\)?)\\)\\'" + docstring)) (let ((doc (unless (zerop (match-beginning 0)) - (substring docstring 0 (match-beginning 0)))) - (usage-tail (match-string 1 docstring))) - (cons (format "(%s%s" - ;; Replace `fn' with the actual function name. - (if (symbolp def) - (help--docstring-quote - (substring (format "%S" (list def)) 1 -1)) - 'anonymous) - usage-tail) - doc)))) + (substring docstring 0 (match-beginning 0))))) + (cons (if (and (eq def '\`) (match-beginning 3) (not (match-beginning 4))) + (concat "\\=`" (match-string 3 docstring)) + (let ((usage-tail (match-string 1 docstring))) + (format "(%s%s" + ;; Replace `fn' with the actual function name. + (if (symbolp def) + (help--docstring-quote (format "%S" def)) + 'anonymous) + usage-tail))) + doc)))) (defun help-add-fundoc-usage (docstring arglist) "Add the usage info to DOCSTRING. @@ -1467,7 +1470,9 @@ the same names as used in the original source code, when possible." (define-obsolete-function-alias 'help-make-usage 'help--make-usage "25.1") (defun help--make-usage-docstring (fn arglist) - (help--docstring-quote (format "%S" (help--make-usage fn arglist)))) + (help--docstring-quote + (let ((print-quoted (eq fn '\`))) + (format "%S" (help--make-usage fn arglist))))) (provide 'help) commit d4870a525dcd7dc233a1ed1df676885bad27ee16 Author: Paul Eggert Date: Fri Jun 12 16:18:05 2015 -0700 * src/print.c (print_object): Minor simplification. diff --git a/src/print.c b/src/print.c index 65c120d..f396151 100644 --- a/src/print.c +++ b/src/print.c @@ -1586,33 +1586,32 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) && print_depth > XINT (Vprint_level)) print_c_string ("...", printcharfun); else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) - && (EQ (XCAR (obj), Qquote))) + && EQ (XCAR (obj), Qquote)) { printchar ('\'', printcharfun); print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); } else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) - && (EQ (XCAR (obj), Qfunction))) + && EQ (XCAR (obj), Qfunction)) { print_c_string ("#'", printcharfun); print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); } else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) - && ((EQ (XCAR (obj), Qbackquote)))) + && EQ (XCAR (obj), Qbackquote)) { - print_object (XCAR (obj), printcharfun, 0); + printchar ('`', printcharfun); new_backquote_output++; print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); new_backquote_output--; } else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) && new_backquote_output - && ((EQ (XCAR (obj), Qbackquote) - || EQ (XCAR (obj), Qcomma) - || EQ (XCAR (obj), Qcomma_at) - || EQ (XCAR (obj), Qcomma_dot)))) + && (EQ (XCAR (obj), Qcomma) + || EQ (XCAR (obj), Qcomma_at) + || EQ (XCAR (obj), Qcomma_dot))) { - print_object (XCAR (obj), printcharfun, 0); + print_object (XCAR (obj), printcharfun, false); new_backquote_output--; print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); new_backquote_output++; commit f8e26cd3af6b48428c3199f3f9c2a08c4f359234 Author: Glenn Morris Date: Fri Jun 12 18:07:48 2015 -0400 * src/buffer.c (init_buffer): Add final newline to message. diff --git a/src/buffer.c b/src/buffer.c index 75a00f0..e151e94 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5286,7 +5286,8 @@ init_buffer (int initialized) if (!pwd) { - fprintf (stderr, "Error getting directory: %s", emacs_strerror (errno)); + fprintf (stderr, "Error getting directory: %s\n", + emacs_strerror (errno)); bset_directory (current_buffer, Qnil); } else commit 37fdfbfeb2b2612e2e16d2cc78189abf154f8065 Author: Glenn Morris Date: Fri Jun 12 18:03:10 2015 -0400 ; * lisp/international/fontset.el (setup-default-fontset): Fix typo. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 14f30c1..aa7a30e 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -736,7 +736,7 @@ (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C (set-fontset-font "fontset-default" symbol-subgroup "Symbola"))) ;; Box Drawing and Block Elements - (when (find-font (font-spec "FreeMono")) + (when (find-font (font-spec :name "FreeMono")) (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono")) ;; Append CJK fonts for characters other than han, kana, cjk-misc. commit 203e84c6cf9b8356e376cc748b5ed331df96dc9e Author: Paul Eggert Date: Fri Jun 12 13:39:57 2015 -0700 Configure Symbola font only if installed * lisp/international/fontset.el (setup-default-fontset): Don't specify the Symbola font if it's not installed. Likewise for FreeMono. (Bug#20727) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 6fd1b525..14f30c1 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -695,46 +695,49 @@ ;; Special setup for various symbols and some rarely used characters ;; covered well by Symbola. - (dolist (symbol-subgroup '((#x0250 . #x02AF) ;; IPA Extensions - (#x2000 . #x206F) ;; General Punctuation - (#x2070 . #x209F) ;; Superscripts and Subscripts - (#x20A0 . #x20CF) ;; Currency Symbols - (#x2100 . #x214F) ;; Letterlike Symbols - (#x2150 . #x218F) ;; Number Forms - (#x2190 . #x21FF) ;; Arrows - (#x2200 . #x22FF) ;; Mathematical Operators - (#x2300 . #x23FF) ;; Miscellaneous Technical - (#x2400 . #x243F) ;; Control Pictures - (#x2440 . #x245F) ;; Optical Char Recognition - (#x2460 . #x24FF) ;; Enclosed Alphanumerics - (#x25A0 . #x25FF) ;; Geometric Shapes - (#x2600 . #x26FF) ;; Miscellaneous Symbols - (#x2700 . #x27bF) ;; Dingbats - (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A - (#x27F0 . #x27FF) ;; Supplemental Arrows-A - (#x2900 . #x297F) ;; Supplemental Arrows-B - (#x2980 . #x29FF) ;; Misc Mathematical Symbols-B - (#x2A00 . #x2AFF) ;; Suppl. Math Operators - (#x2B00 . #x2BFF) ;; Misc Symbols and Arrows - (#x2E00 . #x2E7F) ;; Supplemental Punctuation - (#x4DC0 . #x4DFF) ;; Yijing Hexagram Symbols - (#xFE10 . #xFE1F) ;; Vertical Forms - (#x10100 . #x1013F) ;; Aegean Numbers - (#x102E0 . #x102FF) ;; Coptic Epact Numbers - (#x1D000 . #x1D0FF) ;; Byzanthine Musical Symbols - (#x1D200 . #x1D24F) ;; Ancient Greek Musical Notation - (#x1F0A0 . #x1F0FF) ;; Playing Cards - (#x1F100 . #x1F1FF) ;; Enclosed Alphanumeric Suppl - (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs - (#x1F600 . #x1F64F) ;; Emoticons - (#x1F650 . #x1F67F) ;; Ornamental Dingbats - (#x1F680 . #x1F6FF) ;; Transport and Map Symbols - (#x1F700 . #x1F77F) ;; Alchemical Symbols - (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended - (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C - (set-fontset-font "fontset-default" symbol-subgroup "Symbola")) + (when (find-font (font-spec :name "Symbola")) + (dolist (symbol-subgroup + '((#x0250 . #x02AF) ;; IPA Extensions + (#x2000 . #x206F) ;; General Punctuation + (#x2070 . #x209F) ;; Superscripts and Subscripts + (#x20A0 . #x20CF) ;; Currency Symbols + (#x2100 . #x214F) ;; Letterlike Symbols + (#x2150 . #x218F) ;; Number Forms + (#x2190 . #x21FF) ;; Arrows + (#x2200 . #x22FF) ;; Mathematical Operators + (#x2300 . #x23FF) ;; Miscellaneous Technical + (#x2400 . #x243F) ;; Control Pictures + (#x2440 . #x245F) ;; Optical Char Recognition + (#x2460 . #x24FF) ;; Enclosed Alphanumerics + (#x25A0 . #x25FF) ;; Geometric Shapes + (#x2600 . #x26FF) ;; Miscellaneous Symbols + (#x2700 . #x27bF) ;; Dingbats + (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A + (#x27F0 . #x27FF) ;; Supplemental Arrows-A + (#x2900 . #x297F) ;; Supplemental Arrows-B + (#x2980 . #x29FF) ;; Misc Mathematical Symbols-B + (#x2A00 . #x2AFF) ;; Suppl. Math Operators + (#x2B00 . #x2BFF) ;; Misc Symbols and Arrows + (#x2E00 . #x2E7F) ;; Supplemental Punctuation + (#x4DC0 . #x4DFF) ;; Yijing Hexagram Symbols + (#xFE10 . #xFE1F) ;; Vertical Forms + (#x10100 . #x1013F) ;; Aegean Numbers + (#x102E0 . #x102FF) ;; Coptic Epact Numbers + (#x1D000 . #x1D0FF) ;; Byzanthine Musical Symbols + (#x1D200 . #x1D24F) ;; Ancient Greek Musical Notation + (#x1F0A0 . #x1F0FF) ;; Playing Cards + (#x1F100 . #x1F1FF) ;; Enclosed Alphanumeric Suppl + (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs + (#x1F600 . #x1F64F) ;; Emoticons + (#x1F650 . #x1F67F) ;; Ornamental Dingbats + (#x1F680 . #x1F6FF) ;; Transport and Map Symbols + (#x1F700 . #x1F77F) ;; Alchemical Symbols + (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended + (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C + (set-fontset-font "fontset-default" symbol-subgroup "Symbola"))) ;; Box Drawing and Block Elements - (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono") + (when (find-font (font-spec "FreeMono")) + (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono")) ;; Append CJK fonts for characters other than han, kana, cjk-misc. ;; Append fonts for scripts whose name is also a charset name. commit b63d0a5ab3161ca306e572d2fa00cfd68681fa84 Author: Eli Zaretskii Date: Fri Jun 12 22:45:41 2015 +0300 Configure Symbola font only for symbols and punctuation * lisp/international/fontset.el (setup-default-fontset): Leave only symbols and punctuation in the fontset setup for Symbola font; remove "Greek and Coptic" and "Cyrillic Supplement". (Bug#20798) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index ebf1290..6fd1b525 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -696,8 +696,6 @@ ;; Special setup for various symbols and some rarely used characters ;; covered well by Symbola. (dolist (symbol-subgroup '((#x0250 . #x02AF) ;; IPA Extensions - (#x0370 . #x03FF) ;; Greek and Coptic - (#x0500 . #x052F) ;; Cyrillic Supplement (#x2000 . #x206F) ;; General Punctuation (#x2070 . #x209F) ;; Superscripts and Subscripts (#x20A0 . #x20CF) ;; Currency Symbols commit c660910d2043503f338fc254a2e1a33e747b4df1 Author: Andreas Schwab Date: Fri Jun 12 21:09:23 2015 +0200 Fix crash in fontset-info * src/fontset.c (Ffontset_info): Check that the RFONT-DEF elt is non-nil. diff --git a/src/fontset.c b/src/fontset.c index 97bdbce..5fc92fe 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1983,7 +1983,7 @@ format is the same as above. */) for (j = 0; j < ASIZE (val); j++) { elt = AREF (val, j); - if (FONT_OBJECT_P (RFONT_DEF_OBJECT (elt))) + if (!NILP (elt) && FONT_OBJECT_P (RFONT_DEF_OBJECT (elt))) { Lisp_Object font_object = RFONT_DEF_OBJECT (elt); Lisp_Object slot, name;