commit 86076e65524933f7d1c9812cec292fdc7d5dc60c (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Sat Jun 13 17:17:47 2015 -0700 Tweaks for getting repository version; a bit more like it was for bzr. * lisp/version.el (emacs-repository-version-git) (emacs-repository--version-git-1): New functions, split from emacs-repository-get-version. (emacs-repository-get-version): Make the second argument meaningful. diff --git a/lisp/version.el b/lisp/version.el index 5776e6d..112611d 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -100,7 +100,30 @@ 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 _unused) +(defun emacs-repository-version-git (dir) + "Ask git itself for the version information for directory DIR." + (message "Waiting for git...") + (with-temp-buffer + (let ((default-directory (file-name-as-directory dir))) + (and (eq 0 + (ignore-errors + (call-process "git" nil '(t nil) nil "rev-parse" "HEAD"))) + (not (zerop (buffer-size))) + (replace-regexp-in-string "\n" "" (buffer-string)))))) + +(defun emacs-repository--version-git-1 (file) + "Internal subroutine of `emacs-repository-get-version'." + (when (file-readable-p file) + (erase-buffer) + (insert-file-contents file) + (cond ((looking-at "[0-9a-fA-F]\\{40\\}") + (match-string 0)) + ((looking-at "ref: \\(.*\\)") + (emacs-repository--version-git-1 + (expand-file-name (match-string 1) + (file-name-directory file))))))) + +(defun emacs-repository-get-version (&optional dir external) "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,35 +131,25 @@ 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 DIR is a directory to use instead of `source-directory'. +Optional argument EXTERNAL non-nil means to just ask the VCS itself, +if the sources appear to be under version control. Otherwise only ask +the VCS if we cannot find any information ourselves." (or dir (setq dir source-directory)) - (let ((file (expand-file-name ".git/HEAD" dir))) - (or (if (file-readable-p file) + (when (file-directory-p (expand-file-name ".git" dir)) + (if external + (emacs-repository-version-git dir) + (or (let ((files '("HEAD" "refs/heads/master")) + file rev) (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))))))))) + (while (and (not rev) + (setq file (car files))) + (setq file (expand-file-name (format ".git/%s" file) dir) + files (cdr files) + rev (emacs-repository--version-git-1 file)))) + rev) + ;; AFAICS this doesn't work during dumping (bug#20799). + (emacs-repository-version-git dir))))) ;; 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 e5ab4d92ec404531b5fa9d8fcbce5979a46b220a Author: Glenn Morris Date: Sat Jun 13 16:41:55 2015 -0700 * lisp/startup.el (command-line-1): Inform if skipping relative file names due to deleted PWD. diff --git a/lisp/startup.el b/lisp/startup.el index b389648..ab5a3a4 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -2193,16 +2193,13 @@ A fancy display is used on graphic displays, normal otherwise." ;; to zero when `process-file-arg' returns. (process-file-arg (lambda (name) - ;; If a relative filename was specified and - ;; command-line-default-directory is nil, - ;; silently drop that argument. ;; This can only happen if PWD is deleted. - ;; The warning about setting default-directory will - ;; clue you in. - (when (and (or dir (file-name-absolute-p name)) + (if (not (or dir (file-name-absolute-p name))) + (message "Ignoring relative file name (%s) due to \ +nil default-directory" name) (let* ((file (expand-file-name - (command-line-normalize-file-name name) - dir)) + (command-line-normalize-file-name name) + dir)) (buf (find-file-noselect file))) (setq displayable-buffers (cons buf displayable-buffers)) (with-current-buffer buf @@ -2212,7 +2209,7 @@ A fancy display is used on graphic displays, normal otherwise." (setq line 0) (unless (< column 1) (move-to-column (1- column))) - (setq column 0)))))))) + (setq column 0))))))) ;; Add the long X options to longopts. (dolist (tem command-line-x-option-alist) commit 9bdd1c4c90bc19904f63361c32ebd4304f038aaf Author: Glenn Morris Date: Sat Jun 13 16:35:54 2015 -0700 * src/xsmfns.c (x_session_initialize): Avoid libSM crash when starup directory is missing. (Bug#18851) (errno.h): Include it. diff --git a/src/xsmfns.c b/src/xsmfns.c index 48aaa9b..3b06f71 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include #include "lisp.h" @@ -402,6 +403,14 @@ x_session_initialize (struct x_display_info *dpyinfo) SmcCallbacks callbacks; ptrdiff_t name_len = 0; + /* libSM seems to crash if pwd is missing - see bug#18851. */ + if (! get_current_dir_name ()) + { + fprintf (stderr, "Disabling session management due to pwd error: %s\n", + emacs_strerror (errno)); + return; + } + ice_fd = -1; doing_interact = false; commit 8afef016e2bc413c7a4913554ea6ed2c55474de6 Author: Paul Eggert Date: Sat Jun 13 09:35:10 2015 -0700 Better fix for documenting `X as "`X" Fix suggested by Stefan Monnier. * lisp/help-fns.el (help-fns--signature): Insert "`X", not "(\` X)", when documenting `X (Bug#20759). * lisp/help.el (help-split-fundoc, help--make-usage-docstring): Don't treat `X specially, as help-fns--signature now handles this. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 931e8af..80f30e8 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -383,9 +383,13 @@ suitable file is found, return nil." (help--docstring-quote (format-kbd-macro real-def)))) (t "[Missing arglist. Please make a bug report.]"))) + ;; Insert "`X", not "(\` X)", when documenting `X. + (use1 (replace-regexp-in-string + "\\`(\\\\=\\\\\\\\=` \\([^\n ]*\\))\\'" + "\\\\=`\\1" use t)) (high (if raw - (cons use doc) - (help-highlight-arguments (substitute-command-keys use) + (cons use1 doc) + (help-highlight-arguments (substitute-command-keys use1) (substitute-command-keys doc))))) (let ((fill-begin (point)) (high-usage (car high)) diff --git a/lisp/help.el b/lisp/help.el index d24fbfd..2bf53c0 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1368,21 +1368,17 @@ 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\\(\\( +\\([^\n ]+\\( .*\\)?\\)?\\)?)\\)\\'" - docstring)) + (when (and docstring (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring)) (let ((doc (unless (zerop (match-beginning 0)) - (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)))) + (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 (format "%S" def)) + 'anonymous) + usage-tail) + doc)))) (defun help-add-fundoc-usage (docstring arglist) "Add the usage info to DOCSTRING. @@ -1470,9 +1466,7 @@ 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 - (let ((print-quoted (eq fn '\`))) - (format "%S" (help--make-usage fn arglist))))) + (help--docstring-quote (format "%S" (help--make-usage fn arglist)))) (provide 'help) commit eb92f89c2125aaf8fdf93cdd85ab46ae278dd950 Author: Eli Zaretskii Date: Sat Jun 13 14:51:33 2015 +0300 Improve the default fontset when Symbola is not installed * lisp/international/fontset.el (setup-default-fontset): Only prepend Symbola and FreeMono font specs for symbols and punctuation; do not replace the default spec for them. This should have better results when Symbola/FreeMono are not installed. (Bug#20727) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 8daa4b6..696940e 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -733,9 +733,10 @@ (#x1F700 . #x1F77F) ;; Alchemical Symbols (#x1F780 . #x1F7FF) ;; Geometric Shapes Extended (#x1F800 . #x1F8FF))) ;; Supplemental Arrows-C - (set-fontset-font "fontset-default" symbol-subgroup "Symbola")) + (set-fontset-font "fontset-default" symbol-subgroup "Symbola" nil 'prepend)) ;; Box Drawing and Block Elements - (set-fontset-font "fontset-default" '(#x2500 . #x259F) "FreeMono") + (set-fontset-font "fontset-default" '(#x2500 . #x259F) + "FreeMono" nil 'prepend) ;; Append CJK fonts for characters other than han, kana, cjk-misc. ;; Append fonts for scripts whose name is also a charset name. commit f75d189ed87d4a5bcad5eb1b9c54382e6b7802dc Author: Eli Zaretskii Date: Sat Jun 13 13:23:42 2015 +0300 Improve documentation of ':lang' in font specs * src/font.c (Ffont_spec): Doc fix: elaborate on the values and use of the ':lang' property of the font spec. * doc/emacs/frames.texi (Fonts): Document the language names that can be in the STYLE part of XLFD. * doc/lispref/display.texi (Low-Level Font): Document the ':lang' property. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index f401c8f..de72d87 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -703,7 +703,10 @@ The font width---normally @samp{normal}, @samp{condensed}, other values. @item style An optional additional style name. Usually it is empty---most XLFDs -have two hyphens in a row at this point. +have two hyphens in a row at this point. The style name can also +specify a two-letter ISO-639 language name, like @samp{ja} or +@samp{ko}; some fonts that support CJK scripts have that spelled out +in the style name part. @item pixels The font height, in pixels. @item height diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 357a3c3..b4e2037 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3419,6 +3419,15 @@ The charset registry and encoding of the font, such as @item :script The script that the font must support (a symbol). +@item :lang +The language that the font should support. The value should be a +symbol whose name is a two-letter ISO-639 language name. On X, the +value is matched against the ``Additional Style'' field of the XLFD +name of a font, if it is non-empty. On MS-Windows, fonts matching the +spec are required to support codepages needed for the language. +Currently, only a small set of CJK languages is supported with this +property: @samp{ja}, @samp{ko}, and @samp{zh}. + @item :otf @cindex OpenType font The font must be an OpenType font that supports these OpenType diff --git a/src/font.c b/src/font.c index 7aa0e85..564c53a 100644 --- a/src/font.c +++ b/src/font.c @@ -3857,8 +3857,10 @@ listed in the variable `script-representative-chars'. `:lang' -VALUE must be a symbol of two-letter ISO-639 language names, -e.g. `ja'. +VALUE must be a symbol whose name is a two-letter ISO-639 language +name, e.g. `ja'. The value is matched against the "Additional Style" +field of the XLFD spec of a font, if it's non-empty, on X, and +against the codepages supported by the font on w32. `:otf' commit 2f6956a0383f56c55d308d8ba8f10c052cd89c3e Author: Eli Zaretskii Date: Sat Jun 13 12:34:09 2015 +0300 * nt/README: Don't advertise the (obsolescent) w32 FAQ. diff --git a/nt/README b/nt/README index a5226f6..d331e9e 100644 --- a/nt/README +++ b/nt/README @@ -78,13 +78,19 @@ * Further information - The FAQ for the MS Windows port of Emacs is distributed with Emacs - (info manual "efaq-w32"), and also available at + The Emacs User manual describes Windows-specific issues in the + appendix named "Emacs and Microsoft Windows/MS-DOS". You can read + it in Emacs by typing - http://www.gnu.org/software/emacs/manual/efaq-w32.html + C-h r g Microsoft Windows RET - There is also a mailing list for discussing issues related to this - port of Emacs. For information about the list, see this Web page: + This appendix is also available (as part of the entire manual) at + + http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows + + In addition to the manual, there is a mailing list for discussing + issues related to the Windows port of Emacs. For information about + the list, see this Web page: http://mail.gnu.org/mailman/listinfo/help-emacs-windows commit 6f9d21333152f864e62353af78622f6e2abe0c02 Author: Eli Zaretskii Date: Sat Jun 13 11:41:08 2015 +0300 * nt/README.W32: Don't advertise the (obsolescent) w32 FAQ. diff --git a/nt/README.W32 b/nt/README.W32 index 5024bdc..a26ca10 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -265,14 +265,19 @@ See the end of the file for license conditions. * Further information - The FAQ for the MS Windows port of Emacs is distributed with Emacs - (info manual "efaq-w32"), and also available at + The Emacs User manual describes Windows-specific issues in the + appendix named "Emacs and Microsoft Windows/MS-DOS". You can read + it in Emacs by typing - http://www.gnu.org/software/emacs/manual/efaq-w32.html + C-h r g Microsoft Windows RET - In addition to the FAQ, there is a mailing list for discussing issues - related to the Windows port of Emacs. For information about the - list, see this Web page: + This appendix is also available (as part of the entire manual) at + + http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows + + In addition to the manual, there is a mailing list for discussing + issues related to the Windows port of Emacs. For information about + the list, see this Web page: http://lists.gnu.org/mailman/listinfo/help-emacs-windows