commit 20087772d63192a2ef443cc2ea6ac48423db5ed6 (HEAD, refs/remotes/origin/master) Author: Martin Jesper Low Madsen Date: Sat Feb 6 17:17:27 2016 +1100 Search for host/port combinations in auth-source on OS X * lisp/gnus/auth-source.el (auth-source-macos-keychain-search): Search for all host/port (or protocol) combinations for a match in the OS X keychain. diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 52765ce..da3d670 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -1715,12 +1715,13 @@ entries for git.gnus.org: (let* ((coll (oref backend source)) (max (or max 5000)) ; sanity check: default to stop at 5K - (ignored-keys '(:create :delete :max :backend :label)) + ;; Filter out ignored keys from the spec + (ignored-keys '(:create :delete :max :backend :label :host :port)) + ;; Build a search spec without the ignored keys (search-keys (loop for i below (length spec) by 2 unless (memq (nth i spec) ignored-keys) collect (nth i spec))) - ;; build a search spec without the ignored keys - ;; if a search key is nil or t (match anything), we skip it + ;; If a search key value is nil or t (match anything), we skip it (search-spec (apply #'append (mapcar (lambda (k) (if (or (null (plist-get spec k)) @@ -1732,11 +1733,25 @@ entries for git.gnus.org: (returned-keys (mm-delete-duplicates (append '(:host :login :port :secret) search-keys))) - (items (apply #'auth-source-macos-keychain-search-items - coll - type - max - search-spec)) + ;; Extract host and port from spec + (hosts (plist-get spec :host)) + (hosts (if (and hosts (listp hosts)) hosts `(,hosts))) + (ports (plist-get spec :port)) + (ports (if (and ports (listp ports)) ports `(,ports))) + ;; Loop through all combinations of host/port and pass each of these to + ;; auth-source-macos-keychain-search-items + (items (catch 'match + (dolist (host hosts) + (dolist (port ports) + (let* ((port (format "%S" port)) + (items (apply #'auth-source-macos-keychain-search-items + coll + type + max + host port + search-spec))) + (when items + (throw 'match items))))))) ;; ensure each item has each key in `returned-keys' (items (mapcar (lambda (plist) @@ -1752,8 +1767,9 @@ entries for git.gnus.org: items)) (defun* auth-source-macos-keychain-search-items (coll _type _max + host port &key label type - host user port + user &allow-other-keys) (let* ((keychain-generic (eq type 'macos-keychain-generic)) commit c796361d79f2ec856847ed38c45f83c4d7247aab Author: Lars Ingebrigtsen Date: Sat Feb 6 16:46:43 2016 +1100 Remove nonsensical setting of gnus-newsgroup-unseen * lisp/gnus/gnus-sum.el (gnus-update-marks): Remove nonsensical setting of gnus-newsgroup-unseen. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 3dbcc21..f2b2782 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -6084,9 +6084,6 @@ If SELECT-ARTICLES, only select those articles from GROUP." (setq arts (cdr arts))) (setq list (cdr all))))) - (when (eq (cdr type) 'seen) - (setq list (gnus-range-add list gnus-newsgroup-unseen))) - (when (eq (gnus-article-mark-to-type (cdr type)) 'list) (setq list (gnus-compress-sequence (set symbol (sort list '<)) t))) commit 8d88dbdf9a6f5a85707d6923407b9041f7f0460b Author: Lars Ingebrigtsen Date: Sat Feb 6 14:08:10 2016 +1100 Use underline on all terminals that support it * lisp/subr.el (read-multiple-choice): Use display-supports-face-attributes-p instead of display-graphic-p to determine whether we can use underlining. diff --git a/lisp/subr.el b/lisp/subr.el index 8e430bf..f70f3ed 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2268,7 +2268,8 @@ Usage example: (format "[%c] %s" (car elem) name)) ;; The prompt character is in the name, so highlight ;; it on graphical terminals... - ((display-graphic-p) + ((display-supports-face-attributes-p + '(:underline t) (window-frame)) (setq name (copy-sequence name)) (put-text-property pos (1+ pos) 'face 'read-multiple-choice-face commit c6d4b63f25fd44f22c5de4c8f5017812b7017ff6 Author: Lars Ingebrigtsen Date: Fri Feb 5 17:48:44 2016 +1100 Make the nsm query say what it did after the user interaction * lisp/net/nsm.el (nsm-query): Issue a message about aborting/accepting messages (suggested by N. Jackson) (bug#22531). diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index d93b1bb..72bff66 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -307,7 +307,13 @@ unencrypted." (quit 'no) (error 'no)))) (if (eq response 'no) - nil + (progn + (message "Aborting connection to %s:%s" host port) + nil) + (message (if (eq response 'session) + "Accepting certificate for %s:%s this session only" + "Permanently accepting certificate for %s:%s") + host port) (nsm-save-host host port status what response) t)))) commit 130056880fe9d807fbaee5bc5f68249ea9cf6438 Author: Paul Eggert Date: Fri Feb 5 14:37:09 2016 -0800 Omit XLI (init) == 0 optimization in make-vector * src/alloc.c (Fmake_vector): Simplify by omitting the (XLI (init) == 0) case, as this optimization is probably not worth the hassle. Just for the record, the test for that case could have been (XLI (init) % ((EMACS_UINT) -1 / UCHAR_MAX) == 0) (!), assuming the typical platform with no padding bits and where conversion to int omits the most significant bits. diff --git a/src/alloc.c b/src/alloc.c index 031c78c..92945bc 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3321,14 +3321,9 @@ See also the function `vector'. */) (Lisp_Object length, Lisp_Object init) { CHECK_NATNUM (length); - struct Lisp_Vector *p = allocate_vector (XFASTINT (length)); - if (XLI (init) == 0) - memset (p->contents, 0, XFASTINT (length) * sizeof p->contents[0]); - else - for (ptrdiff_t i = 0; i < XFASTINT (length); i++) - p->contents[i] = init; - + for (ptrdiff_t i = 0; i < XFASTINT (length); i++) + p->contents[i] = init; return make_lisp_ptr (p, Lisp_Vectorlike); } commit f8a8da25353efc54fd24f4ea5c7ed0ad85378b98 Author: Paul Eggert Date: Fri Feb 5 13:45:11 2016 -0800 * autogen.sh: Port to dash (Bug#22556). diff --git a/autogen.sh b/autogen.sh index 2ed58e1..ac728cc 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,9 +104,10 @@ check_version () } do_autoconf=false +test $# -eq 0 && do_autoconf=true do_git=false -for arg in ${*-autoconf}; do +for arg; do case $arg in --help) exec echo "$0: usage: $0 [all|autoconf|git]";; commit 05570f0002a6bcecf2b72ea3f22d6653e00a45a6 Author: Michael Albinus Date: Fri Feb 5 18:57:35 2016 +0100 Minor cleanup for Tramp "doas". * doc/misc/tramp.texi (Inline methods): Add "doas" method. * etc/NEWS: Add Tramp connection method "doas". * lisp/net/tramp-sh.el (tramp-methods) : Add `tramp-remote-shell-args'. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 16ff76b..294a3a9 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -590,6 +590,12 @@ the host returned by the function @command{(system-name)}. See Similar to @option{su} method, @option{sudo} uses @command{sudo}. @command{sudo} must have sufficient rights to start a shell. +@item @option{doas} +@cindex method doas +@cindex doas method + +This method is used on OpenBSD like the @command{sudo} command. + @item @option{sg} @cindex method sg @cindex sg method diff --git a/etc/NEWS b/etc/NEWS index 3b520ec..95ade41 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -67,9 +67,13 @@ for the ChangeLog file, if none already exists. Customize ** Tramp ++++ *** New connection method "sg", which allows to edit files under different group ID. ++++ +*** New connection method "doas" for OpenBSD hosts. + * New Modes and Packages in Emacs 25.2 diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5771269..c2ab67b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -312,6 +312,7 @@ The string is used in `tramp-methods'.") (tramp-login-program "doas") (tramp-login-args (("-u" "%u") ("-s"))) (tramp-remote-shell "/bin/sh") + (tramp-remote-shell-args ("-c")) (tramp-connection-timeout 10))) ;;;###tramp-autoload (add-to-list 'tramp-methods @@ -415,7 +416,7 @@ The string is used in `tramp-methods'.") ;;;###tramp-autoload (add-to-list 'tramp-default-user-alist - `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu" "doas")) "\\'") + `(,(concat "\\`" (regexp-opt '("su" "sudo" "doas" "ksu")) "\\'") nil "root")) ;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored. ;; Do not add "plink" based methods, they ask interactively for the user. commit d66e8f72483ef8c6d7aa1afd391075235b4f23d2 Author: Xi Lu Date: Fri Feb 5 18:03:57 2016 +0100 * lisp/net/tramp-sh.el (tramp-methods) : Add. (Bug#22542) (tramp-default-user-alist): Add rule for "doas". (top): Completion function for "doas" is `tramp-completion-function-alist-su'. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8d01a4b..5771269 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -308,6 +308,13 @@ The string is used in `tramp-methods'.") (tramp-connection-timeout 10))) ;;;###tramp-autoload (add-to-list 'tramp-methods + '("doas" + (tramp-login-program "doas") + (tramp-login-args (("-u" "%u") ("-s"))) + (tramp-remote-shell "/bin/sh") + (tramp-connection-timeout 10))) +;;;###tramp-autoload +(add-to-list 'tramp-methods '("ksu" (tramp-login-program "ksu") (tramp-login-args (("%u") ("-q"))) @@ -408,7 +415,7 @@ The string is used in `tramp-methods'.") ;;;###tramp-autoload (add-to-list 'tramp-default-user-alist - `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu")) "\\'") + `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu" "doas")) "\\'") nil "root")) ;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored. ;; Do not add "plink" based methods, they ask interactively for the user. @@ -483,6 +490,7 @@ The string is used in `tramp-methods'.") (tramp-set-completion-function "nc" tramp-completion-function-alist-telnet) (tramp-set-completion-function "su" tramp-completion-function-alist-su) (tramp-set-completion-function "sudo" tramp-completion-function-alist-su) + (tramp-set-completion-function "doas" tramp-completion-function-alist-su) (tramp-set-completion-function "ksu" tramp-completion-function-alist-su) (tramp-set-completion-function "sg" tramp-completion-function-alist-sg) (tramp-set-completion-function commit 44b15ee2e3ad47f97ecdcc68a35ece7943abf289 Author: Lars Ingebrigtsen Date: Fri Feb 5 17:34:44 2016 +1100 Restore the window configuration * lisp/net/nsm.el (nsm-query-user): Restore the window configuration (bug#22532). diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index b039d11..d93b1bb 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -313,27 +313,28 @@ unencrypted." (defun nsm-query-user (message args cert) (let ((buffer (get-buffer-create "*Network Security Manager*"))) - ;; First format the certificate and warnings. - (with-help-window buffer - (with-current-buffer buffer - (erase-buffer) - (when (> (length cert) 0) - (insert cert "\n")) - (let ((start (point))) - (insert (apply #'format-message message args)) - (goto-char start) - ;; Fill the first line of the message, which usually - ;; contains lots of explanatory text. - (fill-region (point) (line-end-position))))) - ;; Then ask the user what to do about it. - (unwind-protect - (cadr - (read-multiple-choice - "Continue connecting?" - '((?a "always" "Accept this certificate this session and for all future sessions.") - (?s "session only" "Accept this certificate this session only.") - (?n "no" "Refuse to use this certificate, and close the connection.")))) - (kill-buffer buffer)))) + (save-window-excursion + ;; First format the certificate and warnings. + (with-help-window buffer + (with-current-buffer buffer + (erase-buffer) + (when (> (length cert) 0) + (insert cert "\n")) + (let ((start (point))) + (insert (apply #'format-message message args)) + (goto-char start) + ;; Fill the first line of the message, which usually + ;; contains lots of explanatory text. + (fill-region (point) (line-end-position))))) + ;; Then ask the user what to do about it. + (unwind-protect + (cadr + (read-multiple-choice + "Continue connecting?" + '((?a "always" "Accept this certificate this session and for all future sessions.") + (?s "session only" "Accept this certificate this session only.") + (?n "no" "Refuse to use this certificate, and close the connection.")))) + (kill-buffer buffer))))) (defun nsm-save-host (host port status what permanency) (let* ((id (nsm-id host port)) commit ebc6985b83ce2b1aefd761072d40ec3037bdd996 Author: Lars Ingebrigtsen Date: Fri Feb 5 14:52:45 2016 +1100 Use an X popup in read-multiple-choice if running from a mouse command * lisp/subr.el (read-multiple-choice): Use an X popup if called from a mouse action (bug#19368). diff --git a/lisp/subr.el b/lisp/subr.el index e47570a..8e430bf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2296,10 +2296,23 @@ Usage example: "Invalid choice. " "") full-prompt) - (setq tchar (condition-case nil - (let ((cursor-in-echo-area t)) - (read-char)) - (error nil))) + (setq tchar + (if (and (display-popup-menus-p) + last-input-event ; not during startup + (listp last-nonmenu-event) + use-dialog-box) + (x-popup-dialog + t + (cons prompt + (mapcar + (lambda (elem) + (cons (capitalize (cadr elem)) + (car elem))) + choices))) + (condition-case nil + (let ((cursor-in-echo-area t)) + (read-char)) + (error nil)))) ;; The user has entered an invalid choice, so display the ;; help messages. (when (not (assq tchar choices)) commit fa6912fc9e9013c6ec6915c6e11e43c3d4b3e6f7 Author: Lars Ingebrigtsen Date: Fri Feb 5 14:40:59 2016 +1100 Display cursor in echo area when prompting * lisp/subr.el (read-multiple-choice): Display the cursor in the echo area when prompting (bug#19368). diff --git a/lisp/subr.el b/lisp/subr.el index a45d4a7..e47570a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2297,13 +2297,16 @@ Usage example: "") full-prompt) (setq tchar (condition-case nil - (read-char) + (let ((cursor-in-echo-area t)) + (read-char)) (error nil))) ;; The user has entered an invalid choice, so display the ;; help messages. (when (not (assq tchar choices)) (setq wrong-char (not (memq tchar '(?? ?\C-h))) tchar nil) + (when wrong-char + (ding)) (with-help-window (setq buf (get-buffer-create "*Multiple Choice Help*")) (with-current-buffer buf commit e49c46f771e52dd1d050114bba605a26c2061ab2 Author: Lars Ingebrigtsen Date: Fri Feb 5 14:32:35 2016 +1100 Make NSM prompting clearer * lisp/net/nsm.el (nsm-query-user): Use read-multiple-choice to prompt in a nicer way (bug#19368). diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index ee8b55b..b039d11 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -297,7 +297,11 @@ unencrypted." nil (let ((response (condition-case nil - (nsm-query-user message args (nsm-format-certificate status)) + (intern + (car (split-string + (nsm-query-user message args + (nsm-format-certificate status)))) + obarray) ;; Make sure we manage to close the process if the user hits ;; `C-g'. (quit 'no) @@ -309,6 +313,7 @@ unencrypted." (defun nsm-query-user (message args cert) (let ((buffer (get-buffer-create "*Network Security Manager*"))) + ;; First format the certificate and warnings. (with-help-window buffer (with-current-buffer buffer (erase-buffer) @@ -320,28 +325,15 @@ unencrypted." ;; Fill the first line of the message, which usually ;; contains lots of explanatory text. (fill-region (point) (line-end-position))))) - (let ((responses '((?n . no) - (?s . session) - (?a . always))) - (prefix "") - (cursor-in-echo-area t) - response) - (while (not response) - (setq response - (cdr - (assq (downcase - (read-char - (concat prefix - "Continue connecting? (No, Session only, Always) "))) - responses))) - (unless response - (ding) - (setq prefix "Invalid choice. "))) - (kill-buffer buffer) - ;; If called from a callback, `read-char' will insert things - ;; into the pending input. Clear that. - (clear-this-command-keys) - response))) + ;; Then ask the user what to do about it. + (unwind-protect + (cadr + (read-multiple-choice + "Continue connecting?" + '((?a "always" "Accept this certificate this session and for all future sessions.") + (?s "session only" "Accept this certificate this session only.") + (?n "no" "Refuse to use this certificate, and close the connection.")))) + (kill-buffer buffer)))) (defun nsm-save-host (host port status what permanency) (let* ((id (nsm-id host port)) commit cbcc3b79ba2e5914e71bd2990f24d610efd0ab15 Author: Lars Ingebrigtsen Date: Fri Feb 5 14:21:27 2016 +1100 Underline read-multiple-choice-face * lisp/faces.el (read-multiple-choice-face): Also underline the choice. diff --git a/lisp/faces.el b/lisp/faces.el index d80a557..bfb5d4c 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2671,7 +2671,8 @@ It is used for characters of no fonts too." :group 'basic-faces) (defface read-multiple-choice-face - '((t (:inherit bold))) + '((t (:inherit underline + :weight bold))) "Face for the symbol name in Apropos output." :group 'basic-faces :version "25.2") commit b3a28d088ff060df7690ffeaa04ac97f5c072e81 Author: Lars Ingebrigtsen Date: Fri Feb 5 12:31:17 2016 +1100 Make the read-multiple-choice prompt a bit prettier * doc/lispref/commands.texi (Reading One Event): Mention read-multiple-choice-face. * lisp/subr.el (read-multiple-choice): Make the prompting a bit prettier. diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 1964ec8..3ea6ea0 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2618,7 +2618,7 @@ then continues to wait for a valid input character, or keyboard-quit. @end defun @defun read-multiple-choice prompt choices -Ask user a multiple choice question. @var{prompt} should be a string +Ask user a multiple choice question. @var{prompt} should be a string that will be displayed as the prompt. @var{choices} is an alist where the first element in each entry is a @@ -2636,6 +2636,10 @@ The return value is the matching value from @var{choices}. (?s "session only" "Accept this certificate this session only.") (?n "no" "Refuse to use this certificate, and close the connection."))) @end lisp + +The @code{read-multiple-choice-face} face is used to highlight the +matching characters in the name string on graphical terminals. + @end defun @node Event Mod diff --git a/lisp/subr.el b/lisp/subr.el index db1baf0..a45d4a7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2255,7 +2255,7 @@ Usage example: (let* ((altered-names nil) (full-prompt (format - "%s (%s, ?): " + "%s (%s): " prompt (mapconcat (lambda (elem) @@ -2285,19 +2285,25 @@ Usage example: (push (cons (car elem) altered-name) altered-names) altered-name)) - choices ", "))) - tchar buf) + (append choices '((?? "?"))) + ", "))) + tchar buf wrong-char) (save-window-excursion (save-excursion (while (not tchar) - (message "%s" full-prompt) + (message "%s%s" + (if wrong-char + "Invalid choice. " + "") + full-prompt) (setq tchar (condition-case nil (read-char) (error nil))) ;; The user has entered an invalid choice, so display the ;; help messages. (when (not (assq tchar choices)) - (setq tchar nil) + (setq wrong-char (not (memq tchar '(?? ?\C-h))) + tchar nil) (with-help-window (setq buf (get-buffer-create "*Multiple Choice Help*")) (with-current-buffer buf commit 605f9019b47764d5b46544e525fa46b375951b35 Author: Paul Eggert Date: Thu Feb 4 16:36:48 2016 -0800 Prefer memcpy and memset to doing it by hand * src/alloc.c (Fmake_vector): * src/ccl.c (setup_ccl_program): Use memset to clear array. * src/alloc.c (Fvector, Fmake_byte_code): * src/charset.c (Fdefine_charset_internal): Use memcpy to copy array. diff --git a/src/alloc.c b/src/alloc.c index ca86a84..031c78c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3318,22 +3318,18 @@ allocate_buffer (void) DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, doc: /* Return a newly created vector of length LENGTH, with each element being INIT. See also the function `vector'. */) - (register Lisp_Object length, Lisp_Object init) + (Lisp_Object length, Lisp_Object init) { - Lisp_Object vector; - register ptrdiff_t sizei; - register ptrdiff_t i; - register struct Lisp_Vector *p; - CHECK_NATNUM (length); - p = allocate_vector (XFASTINT (length)); - sizei = XFASTINT (length); - for (i = 0; i < sizei; i++) - p->contents[i] = init; + struct Lisp_Vector *p = allocate_vector (XFASTINT (length)); + if (XLI (init) == 0) + memset (p->contents, 0, XFASTINT (length) * sizeof p->contents[0]); + else + for (ptrdiff_t i = 0; i < XFASTINT (length); i++) + p->contents[i] = init; - XSETVECTOR (vector, p); - return vector; + return make_lisp_ptr (p, Lisp_Vectorlike); } DEFUN ("vector", Fvector, Svector, 0, MANY, 0, @@ -3342,12 +3338,9 @@ Any number of arguments, even zero arguments, are allowed. usage: (vector &rest OBJECTS) */) (ptrdiff_t nargs, Lisp_Object *args) { - ptrdiff_t i; - register Lisp_Object val = make_uninit_vector (nargs); - register struct Lisp_Vector *p = XVECTOR (val); - - for (i = 0; i < nargs; i++) - p->contents[i] = args[i]; + Lisp_Object val = make_uninit_vector (nargs); + struct Lisp_Vector *p = XVECTOR (val); + memcpy (p->contents, args, nargs * sizeof *args); return val; } @@ -3386,9 +3379,8 @@ stack before executing the byte-code. usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) (ptrdiff_t nargs, Lisp_Object *args) { - ptrdiff_t i; - register Lisp_Object val = make_uninit_vector (nargs); - register struct Lisp_Vector *p = XVECTOR (val); + Lisp_Object val = make_uninit_vector (nargs); + struct Lisp_Vector *p = XVECTOR (val); /* We used to purecopy everything here, if purify-flag was set. This worked OK for Emacs-23, but with Emacs-24's lexical binding code, it can be @@ -3398,8 +3390,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT just wasteful and other times plainly wrong (e.g. those free vars may want to be setcar'd). */ - for (i = 0; i < nargs; i++) - p->contents[i] = args[i]; + memcpy (p->contents, args, nargs * sizeof *args); make_byte_code (p); XSETCOMPILED (val, p); return val; diff --git a/src/ccl.c b/src/ccl.c index 8cfd9b5..ef6cb98 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1908,8 +1908,6 @@ ccl_get_compiled_code (Lisp_Object ccl_prog, ptrdiff_t *idx) bool setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) { - int i; - if (! NILP (ccl_prog)) { struct Lisp_Vector *vp; @@ -1931,8 +1929,7 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) } } ccl->ic = CCL_HEADER_MAIN; - for (i = 0; i < 8; i++) - ccl->reg[i] = 0; + memset (ccl->reg, 0, sizeof ccl->reg); ccl->last_block = false; ccl->status = 0; ccl->stack_idx = 0; diff --git a/src/charset.c b/src/charset.c index 48e4768..f911e9e 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1050,8 +1050,8 @@ usage: (define-charset-internal ...) */) /* Here, we just copy the parent's fast_map. It's not accurate, but at least it works for quickly detecting which character DOESN'T belong to this charset. */ - for (i = 0; i < 190; i++) - charset.fast_map[i] = parent_charset->fast_map[i]; + memcpy (charset.fast_map, parent_charset->fast_map, + sizeof charset.fast_map); /* We also copy these for parents. */ charset.min_char = parent_charset->min_char; commit 46dfdd831b817ef9e281350043bd4231f2dc5acc Author: Nicolas Petton Date: Thu Feb 4 21:43:42 2016 +0100 Do not ignore redirections of 301, 302 and 307 status codes The current version of HTTP/1.1 (RFC 7231) no longer requires confirmation on 301, 302 or 307 status codes, therefore we do not have to ignore redirects for other requests than GET and HEAD. * lisp/url/url-http.el (url-http-parse-headers): Do not ignore 301, 302 and 307 redirects for other requests than GET and HEAD. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 222dbc6..d49e527 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -590,15 +590,7 @@ should be shown to the user." ;; We do not support agent-driven negotiation, so we just ;; redirect to the preferred URI if one is provided. nil) - ((or `moved-permanently `found `temporary-redirect) ; 301 302 307 - ;; If the 301|302 status code is received in response to a - ;; request other than GET or HEAD, the user agent MUST NOT - ;; automatically redirect the request unless it can be - ;; confirmed by the user, since this might change the - ;; conditions under which the request was issued. - (unless (member url-http-method '("HEAD" "GET")) - (setq redirect-uri nil))) - (`see-other ; 303 + (`see-other ; 303 ;; The response to the request can be found under a different ;; URI and SHOULD be retrieved using a GET method on that ;; resource. commit 7a7164ea3eb7b3b7d2f7cfaec4ef73a90e14f735 Author: Mark Oteiza Date: Thu Feb 4 12:48:35 2016 -0500 * lisp/net/eww.el (eww-switch-to-buffer): Use pop-to-buffer-same-window instead. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index e8b8c63..6a5fb4b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1515,7 +1515,7 @@ If CHARSET is nil then use UTF-8." '(:annotation-function (lambda (buf) (with-current-buffer buf (format " %s" (eww-current-url))))))) - (switch-to-buffer + (pop-to-buffer-same-window (read-buffer "Switch to EWW buffer: " (cl-loop for buf in (nreverse (buffer-list)) if (with-current-buffer buf (derived-mode-p 'eww-mode)) commit 0815944ac4a190d1402079453b99d00fcc26dc25 Author: Paul Eggert Date: Thu Feb 4 08:38:48 2016 -0800 Simplify USE_ALIGNED_ALLOC * src/alloc.c (USE_ALIGNED_ALLOC): Simplify, now that we’ve merged in the emacs-25 changes. Omit no-longer-needed decl for aligned_alloc. diff --git a/src/alloc.c b/src/alloc.c index f0e9f20..ca86a84 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1126,21 +1126,12 @@ lisp_free (void *block) unexmacosx.c, so don't use it on Darwin. */ #if ! ADDRESS_SANITIZER && !defined DARWIN_OS -# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC +# if (defined HAVE_ALIGNED_ALLOC \ + || (defined HYBRID_MALLOC \ + ? defined HAVE_POSIX_MEMALIGN \ + : !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC)) # define USE_ALIGNED_ALLOC 1 -# ifndef HAVE_ALIGNED_ALLOC -/* Defined in gmalloc.c. */ -void *aligned_alloc (size_t, size_t); -# endif -# elif defined HYBRID_MALLOC -# if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN -# define USE_ALIGNED_ALLOC 1 -# endif -# elif !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC -# define USE_ALIGNED_ALLOC 1 -# elif defined HAVE_ALIGNED_ALLOC -# define USE_ALIGNED_ALLOC 1 -# elif defined HAVE_POSIX_MEMALIGN +# elif !defined HYBRID_MALLOC && defined HAVE_POSIX_MEMALIGN # define USE_ALIGNED_ALLOC 1 static void * aligned_alloc (size_t alignment, size_t size) commit 1f5eeb7be4ac31986baae6abc279b1685ad57a5b Author: Eric Abrahamsen Date: Thu Feb 4 11:14:39 2016 +0000 Honor docstring of gnus-group-get-new-news * lisp/gnus/gnus-start.el (gnus-get-unread-articles): If the prefix arg is t, but non-numeric, unconditionally consider all groups to need updating. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 4efec86..f2e6978 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -122,7 +122,6 @@ This variable can be a list of select methods which Gnus will query with the `ask-server' method in addition to the primary, secondary, and archive servers. - E.g.: (setq gnus-check-new-newsgroups \\='((nntp \"some.server\") (nntp \"other.server\"))) @@ -1673,10 +1672,11 @@ backend check whether the group actually exists." (push (setq method-group-list (list method method-type nil nil)) type-cache)) ;; Only add groups that need updating. - (if (funcall (if one-level #'= #'<=) (gnus-info-level info) - (if (eq (cadr method-group-list) 'foreign) - foreign-level - alevel)) + (if (or (and foreign-level (null (numberp foreign-level))) + (funcall (if one-level #'= #'<=) (gnus-info-level info) + (if (eq (cadr method-group-list) 'foreign) + foreign-level + alevel))) (setcar (nthcdr 2 method-group-list) (cons info (nth 2 method-group-list))) ;; The group is inactive, so we nix out the number of unread articles. commit 4531b03ec98b50fc61baad2b75f6faf439894583 Author: Lars Ingebrigtsen Date: Thu Feb 4 19:51:54 2016 +1100 New function read-multiple-choice * doc/lispref/commands.texi (Reading One Event): Document read-multiple-choice. * lisp/faces.el (read-multiple-choice-face): New face. * lisp/subr.el (read-multiple-choice): New function. diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 9c1df89..1964ec8 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2617,6 +2617,27 @@ causes it to evaluate @code{help-form} and display the result. It then continues to wait for a valid input character, or keyboard-quit. @end defun +@defun read-multiple-choice prompt choices +Ask user a multiple choice question. @var{prompt} should be a string +that will be displayed as the prompt. + +@var{choices} is an alist where the first element in each entry is a +character to be entered, the second element is a short name for the +entry to be displayed while prompting (if there's room, it might be +shortened), and the third, optional entry is a longer explanation that +will be displayed in a help buffer if the user requests more help. + +The return value is the matching value from @var{choices}. + +@lisp +(read-multiple-choice + "Continue connecting?" + '((?a "always" "Accept this certificate this session and for all future sessions.") + (?s "session only" "Accept this certificate this session only.") + (?n "no" "Refuse to use this certificate, and close the connection."))) +@end lisp +@end defun + @node Event Mod @subsection Modifying and Translating Input Events @cindex modifiers of events diff --git a/etc/NEWS b/etc/NEWS index 1f4f989..3b520ec 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -283,6 +283,10 @@ selected window is strongly dedicated to its buffer. `even-window-sizes' and now handles window widths as well. +++ +** New function `read-multiple-choice' use to prompt for +multiple-choice questions, with a handy way to display help texts. + ++++ ** terpri gets an optional arg ENSURE to conditionally output a newline. +++ diff --git a/lisp/faces.el b/lisp/faces.el index 612bd16..d80a557 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2670,6 +2670,12 @@ It is used for characters of no fonts too." :version "24.1" :group 'basic-faces) +(defface read-multiple-choice-face + '((t (:inherit bold))) + "Face for the symbol name in Apropos output." + :group 'basic-faces + :version "25.2") + ;; Faces for TTY menus. (defface tty-menu-enabled-face '((t diff --git a/lisp/subr.el b/lisp/subr.el index c685f95..db1baf0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2233,6 +2233,120 @@ keyboard-quit events while waiting for a valid input." (message "%s%s" prompt (char-to-string char)) char)) +(defun read-multiple-choice (prompt choices) + "Ask user a multiple choice question. +PROMPT should be a string that will be displayed as the prompt. + +CHOICES is an alist where the first element in each entry is a +character to be entered, the second element is a short name for +the entry to be displayed while prompting (if there's room, it +might be shortened), and the third, optional entry is a longer +explanation that will be displayed in a help buffer if the user +requests more help. + +The return value is the matching entry from the CHOICES list. + +Usage example: + +\(read-multiple-choice \"Continue connecting?\" + '((?a \"always\") + (?s \"session only\") + (?n \"no\")))" + (let* ((altered-names nil) + (full-prompt + (format + "%s (%s, ?): " + prompt + (mapconcat + (lambda (elem) + (let* ((name (cadr elem)) + (pos (seq-position name (car elem))) + (altered-name + (cond + ;; Not in the name string. + ((not pos) + (format "[%c] %s" (car elem) name)) + ;; The prompt character is in the name, so highlight + ;; it on graphical terminals... + ((display-graphic-p) + (setq name (copy-sequence name)) + (put-text-property pos (1+ pos) + 'face 'read-multiple-choice-face + name) + name) + ;; And put it in [bracket] on non-graphical terminals. + (t + (concat + (substring name 0 pos) + "[" + (upcase (substring name pos (1+ pos))) + "]" + (substring name (1+ pos))))))) + (push (cons (car elem) altered-name) + altered-names) + altered-name)) + choices ", "))) + tchar buf) + (save-window-excursion + (save-excursion + (while (not tchar) + (message "%s" full-prompt) + (setq tchar (condition-case nil + (read-char) + (error nil))) + ;; The user has entered an invalid choice, so display the + ;; help messages. + (when (not (assq tchar choices)) + (setq tchar nil) + (with-help-window (setq buf (get-buffer-create + "*Multiple Choice Help*")) + (with-current-buffer buf + (erase-buffer) + (pop-to-buffer buf) + (insert prompt "\n\n") + (let* ((columns (/ (window-width) 25)) + (fill-column 21) + (times 0) + (start (point))) + (dolist (elem choices) + (goto-char start) + (unless (zerop times) + (if (zerop (mod times columns)) + ;; Go to the next "line". + (goto-char (setq start (point-max))) + ;; Add padding. + (while (not (eobp)) + (end-of-line) + (insert (make-string (- (* (mod times columns) + (+ fill-column 4)) + (current-column)) + ?\s)) + (forward-line 1)))) + (setq times (1+ times)) + (let ((text + (with-temp-buffer + (insert (format + "%c: %s\n" + (car elem) + (cdr (assq (car elem) altered-names)))) + (fill-region (point-min) (point-max)) + (when (nth 2 elem) + (insert (nth 2 elem)) + (unless (bolp) + (insert "\n")) + (fill-region start (point-max))) + (buffer-string)))) + (goto-char start) + (dolist (line (split-string text "\n")) + (end-of-line) + (if (bolp) + (insert line "\n") + (insert line)) + (forward-line 1))))))))))) + (when (buffer-live-p buf) + (kill-buffer buf)) + (assq tchar choices))) + (defun sit-for (seconds &optional nodisp obsolete) "Redisplay, then wait for SECONDS seconds. Stop when input is available. SECONDS may be a floating-point value. commit d95c7bb472cd259661dfed41ccfe534f9026c826 Merge: 0608bf1 bf64d65 Author: John Wiegley Date: Wed Feb 3 23:56:17 2016 -0800 ; Merge from origin/emacs-25 The following commit was skipped: bf64d65 Allow sending empty hidden values in eww commit 0608bf1c3d91196bcf06a6da96243f0fac119089 Merge: 91ab662 ee73997 Author: John Wiegley Date: Wed Feb 3 23:56:08 2016 -0800 Merge from origin/emacs-25 ee73997 Make erc work better when encountering unknown prefix chars b99141d Make erc completion case-insensitive again 66c4620 Make complection in erc use consistent casing 8c562b2 Make /QUIT in erc more robust d93d2c5 Make tracking faces in Emacs work more reliably af6ab7e Make shr not bug out on images on non-graphical displays 3311f40 Fix bookmark display widths d90ab1e Fix typo in eww-make-unique-file-name 7f81825 Make it possible to TAB to input fields a43a1dc Insert complete alt texts when images are disabled 56ed4e1 Allow eww text fields to grow 66b315c Make erc work when subword-mode is switched on 255b68f Fix IMAP doc example 91557f5 Quoting fixes in doc strings and diagnostics 2c0dc9f Fix warning message in hack-local-variables 504696d Etags: yet another improvement in Ruby tags 8784ebf Fix x-popup-menu on TTYs without a mouse 8b87ecb * lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro 6191003 Use pop-to-buffer-same-window in eww fe321fd * autogen.sh: Revert all recent changes. 74ebd4a * make-dist: Updates related to nt/. 737193a * make-dist: Add modules/. 3696bf2 * make-dist: Update for super-special file that can't live in etc/. a4278e2 Fix failure to compile ns-win.el in parallel builds 860da4d Fix names of tags generated for Ruby accessors f6213ce Fix file-name recognition in 'etags' e42e662 Change Ruby file names and extensions recognized by 'etags' 58bfb6a More improvements for Ruby support in 'etags' c04e911 Add --git-config option to autogen.sh 5713466 Fix editing undo changes in eww fields 51362d6 Allow the user more control of popping up the eww window ee0fbd8 Make eww-browse-url with new-window parameter work again 9c3142d Clean up eww code slightly cb035f3 Don't insert nil faces in shr 4c3fae3 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary. 93f2153 Improve the custom type of some user options. 9f60d7e Mark some risky calendar variables. 1d07dcd Highlight two additional SCSS keywords ee8b466 Recommend enabling integrity-checking in git e639e10 Some corrections in Elisp manual d766ca8 Chatter when autogen.sh changes Git configuration 3b734e1 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) 43cb9f8 Omit unnecessary history from Lisp intro 2fbd1da * etc/HISTORY: Add some more history, plus git tags. c90e1b4 Improve elisp “Security Considerations” doc cedd7ca autogen.sh now arranges for git to check hashes 86ce76b ; Fix ChangeLog.2 commit ID. 7b1d2b1 Fix (c & 040) typo in emergency escapes a8273da Fix display of overlay strings with 'display' and 'box' property fc48106 Fix imap-starttls-open cdecbed Fix return value of imap-starttls-open 20c7e34 ; * etc/NEWS: Fix renamed command name 98bdbdb Correct reference to DARWIN_OS preprocessor symbol b250d29 Spelling fix b920a0e Spelling fixes 93b144b Pacify GCC on C library without glibc API commit 91ab66201cedbcd2e4e8533a7152f6736ad08731 Merge: 1829a1f 71b20b3 Author: John Wiegley Date: Wed Feb 3 23:54:58 2016 -0800 ; Merge from origin/emacs-25 The following commit was skipped: 71b20b3 Backport: * lisp/files.el: Remove support for extra .dir-locals file commit 1829a1fc85b040912dc194806c64670096ddcf43 Merge: 535e2be ae26c8a Author: John Wiegley Date: Wed Feb 3 23:54:45 2016 -0800 Merge from origin/emacs-25 ea26c8a * lisp/net/browse-url.el (browse-url-default-browser): Lower priority of non-free Chrome. 0fac75f Improve the custom type of some user options. 2df0e04 Highlight CSS variables with variable name face 3cf5e81 * lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not user-serviceable. 2a5233c Mark some user options that can get evalled as risky. 39b166f Disable DebPrint in sys_read on MS-Windows 9fd0189 ;Fix ChangeLog entry 4bb7233 Fix typos in Introduction to Emacs Lisp manual commit bf64d65c640ebec74d804a76b8e6cef28c275381 Author: Vasilij Schneidermann Date: Thu Feb 4 15:52:59 2016 +1100 Allow sending empty hidden values in eww * lisp/net/eww.el (eww-tag-input): Allow sending empty hidden values (bug#22388). Copyright-paperwork-exempt: Yes (cherry picked from commit 5898da8210af7953e638ddf7821c05260979c3f0) Backport: diff --git a/lisp/net/eww.el b/lisp/net/eww.el index a96241d..5e24d4f 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1132,7 +1132,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (nconc eww-form (list (list 'hidden :name name - :value (dom-attr dom 'value))))))) + :value (or (dom-attr dom 'value) ""))))))) (t (eww-form-text dom))) (unless (= start (point)) commit ee7399792f865905d393df05c3d4e5ec309aa06c Author: David Edmondson Date: Thu Feb 4 16:52:01 2016 +1100 Make erc work better when encountering unknown prefix chars * lisp/erc/erc.el (erc-channel-receive-names): Output a warning instead of erroring out on unknown prefix chars (bug#22380). diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7b73446..ef3a6b3 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4832,7 +4832,7 @@ channel." ((pred (eq op-ch)) op) ((pred (eq adm-ch)) admin) ((pred (eq own-ch)) owner) - (_ (error "Unknown prefix char `%S'" ch) voice)) + (_ (message "Unknown prefix char `%S'" ch) voice)) 'on))) (when updatep ;; If we didn't issue the NAMES request (consider two clients commit 535e2bef6dd7b9abe2567f865c8b24a06a555178 Author: Mark Oteiza Date: Thu Feb 4 18:00:37 2016 +1100 Add a new command to switch between erc buffers * doc/misc/eww.texi: Document eww-switch-to-buffer and its keybinding * etc/NEWS: Mention new command * lisp/net/eww.el (eww-mode-map): Bind eww-switch-to-buffer to "s" (eww-mode-map): Add menu item (eww-switch-to-buffer): New command diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 0e9bedb..afb1caf 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -164,12 +164,16 @@ You can view stored bookmarks with @kbd{B} (@code{eww-list-bookmarks}). This will open the bookmark buffer @file{*eww bookmarks*}. +@findex eww-switch-to-buffer @findex eww-list-buffers +@kindex s @kindex S @cindex Multiple Buffers To get summary of currently opened EWW buffers, press @kbd{S} (@code{eww-list-buffers}). The @file{*eww buffers*} buffer allows you -to quickly kill, flip through and switch to specific EWW buffer. +to quickly kill, flip through and switch to specific EWW buffer. To +switch EWW buffers through a minibuffer prompt, press @kbd{s} +(@code{eww-switch-to-buffer}). @findex eww-browse-with-external-browser @vindex shr-external-browser diff --git a/etc/NEWS b/etc/NEWS index 3150432..faf49b0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -52,6 +52,11 @@ in these situations. * Changes in Specialized Modes and Packages in Emacs 25.2 +** eww + ++++ +*** A new `s' command for switching to another eww buffer via the minibuffer. + +++ ** The commands that add ChangeLog entries now prefer a VCS root directory for the ChangeLog file, if none already exists. Customize diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 503651c..bc74a0d 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -689,6 +689,7 @@ the like." (define-key map "R" 'eww-readable) (define-key map "H" 'eww-list-histories) (define-key map "E" 'eww-set-character-encoding) + (define-key map "s" 'eww-switch-to-buffer) (define-key map "S" 'eww-list-buffers) (define-key map "F" 'eww-toggle-fonts) (define-key map [(meta C)] 'eww-toggle-colors) @@ -712,6 +713,7 @@ the like." ["View page source" eww-view-source] ["Copy page URL" eww-copy-page-url t] ["List histories" eww-list-histories t] + ["Switch to buffer" eww-switch-to-buffer t] ["List buffers" eww-list-buffers t] ["Add bookmark" eww-add-bookmark t] ["List bookmarks" eww-list-bookmarks t] @@ -1498,6 +1500,24 @@ If CHARSET is nil then use UTF-8." (eww-reload nil 'utf-8) (eww-reload nil charset))) +(defun eww-switch-to-buffer () + "Prompt for an EWW buffer to display in the selected window." + (interactive) + (let ((completion-extra-properties + '(:annotation-function (lambda (buf) + (with-current-buffer buf + (format " %s" (eww-current-url))))))) + (switch-to-buffer + (read-buffer "Switch to EWW buffer: " + (cl-loop for buf in (nreverse (buffer-list)) + if (with-current-buffer buf (derived-mode-p 'eww-mode)) + return buf) + t + (lambda (bufn) + (with-current-buffer + (if (consp bufn) (cdr bufn) (get-buffer bufn)) + (derived-mode-p 'eww-mode))))))) + (defun eww-toggle-fonts () "Toggle whether to use monospaced or font-enabled layouts." (interactive) commit 8b35b109dd00e42a06f1031c49c471882460184f Author: David Edmondson Date: Thu Feb 4 16:52:01 2016 +1100 Make erc work better when encountering unknown prefix chars * lisp/erc/erc.el (erc-channel-receive-names): Output a warning instead of erroring out on unknown prefix chars (bug#22380). diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 56317b8..b7f40a8 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4830,7 +4830,7 @@ channel." ((pred (eq op-ch)) op) ((pred (eq adm-ch)) admin) ((pred (eq own-ch)) owner) - (_ (error "Unknown prefix char `%S'" ch) voice)) + (_ (message "Unknown prefix char `%S'" ch) voice)) 'on))) (when updatep ;; If we didn't issue the NAMES request (consider two clients commit 5898da8210af7953e638ddf7821c05260979c3f0 Author: Vasilij Schneidermann Date: Thu Feb 4 15:52:59 2016 +1100 Allow sending empty hidden values in eww * lisp/net/eww.el (eww-tag-input): Allow sending empty hidden values (bug#22388). Copyright-paperwork-exempt: Yes diff --git a/lisp/net/eww.el b/lisp/net/eww.el index cb23127..503651c 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1139,7 +1139,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (nconc eww-form (list (list 'hidden :name name - :value (dom-attr dom 'value))))))) + :value (or (dom-attr dom 'value) ""))))))) (t (eww-form-text dom))) (unless (= start (point)) commit b99141da55d130cdf6d50b9247a6c10d925a7238 Author: Lars Ingebrigtsen Date: Thu Feb 4 17:51:53 2016 +1100 Make erc completion case-insensitive again * lisp/erc/erc.el (erc-completion-at-point): Make erc completion case-insensitive again (bug#11360). diff --git a/etc/NEWS b/etc/NEWS index a3d9e84..d4691b9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -428,6 +428,10 @@ specified message types for the respective specified targets. --- *** Reconnection is now asynchronous. +--- +*** Nick completion is now case-insentive again after inadvertently +being made case-sensitive in Emacs 24.2. + ** Midnight-mode --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 51ab20e..7b73446 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1141,7 +1141,7 @@ which the local user typed." (define-key map "\C-c\C-u" 'erc-kill-input) (define-key map "\C-c\C-x" 'erc-quit-server) (define-key map "\M-\t" 'ispell-complete-word) - (define-key map "\t" 'completion-at-point) + (define-key map "\t" 'erc-completion-at-point) ;; Suppress `font-lock-fontify-block' key binding since it ;; destroys face properties. @@ -3991,6 +3991,13 @@ Prompt for one if called interactively." (format "MODE %s +k %s" tgt key) (format "MODE %s -k" tgt))))) +(defun erc-completion-at-point () + "Perform complection on the text around point case-insentitively. +See `completion-at-point'." + (interactive) + (let ((completion-ignore-case t)) + (completion-at-point))) + (defun erc-quit-server (reason) "Disconnect from current server after prompting for REASON. `erc-quit-reason' works with this just like with `erc-cmd-QUIT'." commit 66c462005cc873d8e9dee684d525daa036d4f757 Author: Carlos Pita Date: Thu Feb 4 17:03:34 2016 +1100 Make complection in erc use consistent casing * lisp/erc/erc-pcomplete.el (pcomplete-erc-all-nicks): Make case in the complection consistent (bug#18509). Copyright-paperwork-exempt: Yes diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index cf3f51b..9f57239 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -238,10 +238,12 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick." "Returns a list of all nicks on the current server." (let (nicks) (erc-with-server-buffer - (maphash (lambda (nick _user) - (setq nicks (cons (concat nick postfix) nicks))) + (maphash (lambda (_nick user) + (setq nicks (cons + (concat (erc-server-user-nickname user) postfix) + nicks))) erc-server-users)) - nicks)) + nicks)) (defun pcomplete-erc-channels () "Returns a list of channels associated with the current server." commit 8c562b2d7f6378b71e0dcbc172a4dd6673895256 Author: Francis Litterio Date: Thu Feb 4 16:55:01 2016 +1100 Make /QUIT in erc more robust * lisp/erc/erc.el (erc-kill-query-buffers): Don't bug out if we're issuing /QUIT to disconnected servers (bug#22099). diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 3e96bb2..51ab20e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -6083,13 +6083,15 @@ If it doesn't exist, create it." (or (file-accessible-directory-p dir) (error "Cannot access %s" dir))) (defun erc-kill-query-buffers (process) - "Kill all buffers of PROCESS." + "Kill all buffers of PROCESS. +Does nothing if PROCESS is not a process object." ;; here, we only want to match the channel buffers, to avoid ;; "selecting killed buffers" b0rkage. - (erc-with-all-buffers-of-server process - (lambda () - (not (erc-server-buffer-p))) - (kill-buffer (current-buffer)))) + (when (processp process) + (erc-with-all-buffers-of-server process + (lambda () + (not (erc-server-buffer-p))) + (kill-buffer (current-buffer))))) (defun erc-nick-at-point () "Give information about the nickname at `point'. commit d93d2c5b16dc98671a35374ac20fa6f7108f1c7c Author: Kevin Brubeck Unhammer Date: Thu Feb 4 16:49:42 2016 +1100 Make tracking faces in Emacs work more reliably * lisp/erc/erc-track.el (erc-faces-in): Always return lists of faces to avoid later ambiguity (bug#22424). Copyright-paperwork-exempt: Yes diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 1750cb7..4d8feb5 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -971,7 +971,8 @@ is in `erc-mode'." "Return a list of all faces used in STR." (let ((i 0) (m (length str)) - (faces (erc-list (get-text-property 0 'face str))) + (faces (let ((face1 (get-text-property 0 'face str))) + (when face1 (list face1)))) cur) (while (and (setq i (next-single-property-change i 'face str m)) (not (= i m))) commit af6ab7efc7a6ce83a289e05792498fa9354e6a32 Author: Lars Ingebrigtsen Date: Thu Feb 4 16:44:06 2016 +1100 Make shr not bug out on images on non-graphical displays * lisp/net/shr.el (shr-put-image): Don't bug out on alt-less images on non-graphical displays (bug#22327). diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 611f0a9..bfda654 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -966,7 +966,7 @@ element is the data blob and the second element is the content-type." (image-animated-p image)))) (image-animate image nil 60))) image) - (insert alt))) + (insert (or alt "")))) (defun shr-rescale-image (data &optional content-type) "Rescale DATA, if too big, to fit the current buffer." commit b1713476022b5cac430457efc226fccf8fb38e91 Author: Andrew Hyatt Date: Thu Feb 4 00:13:36 2016 -0500 Remove packages obsoleted before Emacs 24. In accordance with the policy discussed in the emacs-devel list, packages that have been obsoleted for a full major release cycle are up for deletion. This removes almost all packages that are now eligible for deletion, with the exception of "cl-compat", which seems it is likely to still be used, and "optional", which offers some functionality that doesn't have a replacement yet. diff --git a/lisp/obsolete/awk-mode.el b/lisp/obsolete/awk-mode.el deleted file mode 100644 index b9e4e40..0000000 --- a/lisp/obsolete/awk-mode.el +++ /dev/null @@ -1,124 +0,0 @@ -;;; awk-mode.el --- AWK code editing commands for Emacs - -;; Copyright (C) 1988, 1994, 1996, 2000-2016 Free Software Foundation, -;; Inc. - -;; Maintainer: emacs-devel@gnu.org -;; Keywords: unix, languages -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Sets up C-mode with support for awk-style #-comments and a lightly -;; hacked syntax table. - -;;; Code: - -(defvar awk-mode-syntax-table - (let ((st (make-syntax-table))) - (modify-syntax-entry ?\\ "\\" st) - (modify-syntax-entry ?\n "> " st) - (modify-syntax-entry ?\f "> " st) - (modify-syntax-entry ?\# "< " st) - ;; / can delimit regexes or be a division operator. We assume that it is - ;; more commonly used for regexes and fix the remaining cases with - ;; `font-lock-syntactic-keywords'. - (modify-syntax-entry ?/ "\"" st) - (modify-syntax-entry ?* "." st) - (modify-syntax-entry ?+ "." st) - (modify-syntax-entry ?- "." st) - (modify-syntax-entry ?= "." st) - (modify-syntax-entry ?% "." st) - (modify-syntax-entry ?< "." st) - (modify-syntax-entry ?> "." st) - (modify-syntax-entry ?& "." st) - (modify-syntax-entry ?| "." st) - (modify-syntax-entry ?_ "_" st) - (modify-syntax-entry ?\' "\"" st) - st) - "Syntax table in use in `awk-mode' buffers.") - -;; Regexps written with help from Peter Galbraith . -(defconst awk-font-lock-keywords - (eval-when-compile - (list - ;; - ;; Function names. - '("^[ \t]*\\(function\\)\\>[ \t]*\\(\\sw+\\)?" - (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) - ;; - ;; Variable names. - (cons (regexp-opt - '("ARGC" "ARGIND" "ARGV" "CONVFMT" "ENVIRON" "ERRNO" - "FIELDWIDTHS" "FILENAME" "FNR" "FS" "IGNORECASE" "NF" "NR" - "OFMT" "OFS" "ORS" "RLENGTH" "RS" "RSTART" "SUBSEP") 'words) - 'font-lock-variable-name-face) - ;; - ;; Keywords. - (regexp-opt - '("BEGIN" "END" "break" "continue" "delete" "do" "exit" "else" "for" - "getline" "if" "next" "print" "printf" "return" "while") 'words) - ;; - ;; Builtins. - (list (regexp-opt - '("atan2" "close" "cos" "ctime" "exp" "gsub" "index" "int" - "length" "log" "match" "rand" "sin" "split" "sprintf" - "sqrt" "srand" "sub" "substr" "system" "time" - "tolower" "toupper") 'words) - 1 'font-lock-builtin-face) - ;; - ;; Operators. Is this too much? - (cons (regexp-opt '("&&" "||" "<=" "<" ">=" ">" "==" "!=" "!~" "~")) - 'font-lock-constant-face) - )) - "Default expressions to highlight in AWK mode.") - -(require 'syntax) - -(defconst awk-font-lock-syntactic-keywords - ;; `/' is mostly used for /.../ regular expressions, but is also - ;; used as a division operator. Distinguishing between the two is - ;; a pain in the youknowwhat. - ;; '(("\\(^\\|[<=>-+*%/!^,~(?:|&]\\)\\s-*\\(/\\)\\([^/\n\\]\\|\\\\.\\)*\\(/\\)" - ;; (2 "\"") (4 "\""))) - '(("[^<=>-+*%/!^,~(?:|& \t\n\f]\\s-*\\(/\\)" - (1 (unless (nth 3 (syntax-ppss (match-beginning 1))) ".")))) - "Syntactic keywords for `awk-mode'.") - -;; No longer autoloaded since it might clobber the autoload directive in CC Mode. -(define-derived-mode awk-mode c-mode "AWK" - "Major mode for editing AWK code. -This is much like C mode except for the syntax of comments. Its keymap -inherits from C mode's and it has the same variables for customizing -indentation. It has its own abbrev table and its own syntax table. - -Turning on AWK mode runs `awk-mode-hook'." - (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter)) - (set (make-local-variable 'paragraph-separate) paragraph-start) - (set (make-local-variable 'comment-start) "# ") - (set (make-local-variable 'comment-end) "") - (set (make-local-variable 'comment-start-skip) "#+ *") - (setq font-lock-defaults '(awk-font-lock-keywords - nil nil ((?_ . "w")) nil - (parse-sexp-lookup-properties . t) - (font-lock-syntactic-keywords - . awk-font-lock-syntactic-keywords)))) - -(provide 'awk-mode) - -;;; awk-mode.el ends here diff --git a/lisp/obsolete/iso-acc.el b/lisp/obsolete/iso-acc.el deleted file mode 100644 index 7bec92c..0000000 --- a/lisp/obsolete/iso-acc.el +++ /dev/null @@ -1,489 +0,0 @@ -;;; iso-acc.el --- minor mode providing electric accent keys - -;; Copyright (C) 1993-1994, 1996, 2001-2016 Free Software Foundation, -;; Inc. - -;; Author: Johan Vromans -;; Maintainer: emacs-devel@gnu.org -;; Keywords: i18n -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Function `iso-accents-mode' activates a minor mode in which -;; typewriter "dead keys" are emulated. The purpose of this emulation -;; is to provide a simple means for inserting accented characters -;; according to the ISO-8859-1...3 character sets. -;; -;; In `iso-accents-mode', pseudo accent characters are used to -;; introduce accented keys. The pseudo-accent characters are: -;; -;; ' (minute) -> acute accent -;; ` (backtick) -> grave accent -;; " (second) -> diaeresis -;; ^ (caret) -> circumflex -;; ~ (tilde) -> tilde over the character -;; / (slash) -> slash through the character. -;; Also: /A is A-with-ring and /E is AE ligature. -;; These two are enabled only if you set iso-accents-enable -;; to include them: -;; . (period) -> dot over the character (some languages only) -;; , (cedilla) -> cedilla under the character (some languages only) -;; -;; The action taken depends on the key that follows the pseudo accent. -;; In general: -;; -;; pseudo-accent + appropriate letter -> accented letter -;; pseudo-accent + space -> pseudo-accent (except comma and period) -;; pseudo-accent + pseudo-accent -> accent (if available) -;; pseudo-accent + other -> pseudo-accent + other -;; -;; If the pseudo-accent is followed by anything else than a -;; self-insert-command, the dead-key code is terminated, the -;; pseudo-accent inserted ‘as is’ and the bell is rung to signal this. -;; -;; Function `iso-accents-mode' can be used to enable the iso accents -;; minor mode, or disable it. - -;; If you want only some of these characters to serve as accents, -;; add a language to `iso-languages' which specifies the accent characters -;; that you want, then select the language with `iso-accents-customize'. - -;;; Code: - -(provide 'iso-acc) - -(defgroup iso-acc nil - "Minor mode providing electric accent keys." - :prefix "iso-accents-" - :group 'i18n) - -(defcustom iso-accents-insert-offset nonascii-insert-offset - "Offset added by ISO Accents mode to character codes 0200 and above." - :type 'integer - :group 'iso-acc) - -(defvar iso-languages - '(("catalan" - ;; Note this includes some extra characters used in Spanish, - ;; on the idea that someone who uses Catalan is likely to use Spanish - ;; as well. - (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) - (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) - (?\ . ?')) - (?` (?A . ?\300) (?E . ?\310) (?O . ?\322) - (?a . ?\340) (?e . ?\350) (?o . ?\362) - (?\ . ?`)) - (?\" (?I . ?\317) (?U . ?\334) (?i . ?\357) (?u . ?\374) - (?\ . ?\")) - (?~ (?C . ?\307) (?N . ?\321) (?c . ?\347) (?n . ?\361) - (?> . ?\273) (?< . ?\253) (?! . ?\241) (?? . ?\277) - (?\ . ?\~))) - - ("esperanto" - (?^ (?H . ?\246) (?J . ?\254) (?h . ?\266) (?j . ?\274) (?C . ?\306) - (?G . ?\330) (?S . ?\336) (?c . ?\346) (?g . ?\370) (?s . ?\376) - (?^ . ?^) (?\ . ?^)) - (?~ (?U . ?\335) (?u . ?\375) (?\ . ?~))) - - ("french" - (?' (?E . ?\311) (?C . ?\307) (?e . ?\351) (?c . ?\347) - (?\ . ?')) - (?` (?A . ?\300) (?E . ?\310) (?U . ?\331) - (?a . ?\340) (?e . ?\350) (?u . ?\371) - (?\ . ?`)) - (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333) - (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373) - (?\ . ?^)) - (?\" (?E . ?\313) (?I . ?\317) - (?e . ?\353) (?i . ?\357) - (?\ . ?\")) - (?~ (?< . ?\253) (?> . ?\273) (?C . ?\307) (?c . ?\347) - (?\ . ?~)) - (?, (?C . ?\307) (?c . ?\347) (?\ . ?\,))) - - ("german" - (?\" (?A . ?\304) (?O . ?\326) (?U . ?\334) - (?a . ?\344) (?o . ?\366) (?u . ?\374) (?s . ?\337) (?\ . ?\"))) - - ("irish" - (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) - (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) - (?\ . ?'))) - - ("portuguese" - (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) - (?C . ?\307) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) - (?u . ?\372) (?c . ?\347) - (?\ . ?')) - (?` (?A . ?\300) (?a . ?\340) - (?\ . ?`)) - (?^ (?A . ?\302) (?E . ?\312) (?O . ?\324) - (?a . ?\342) (?e . ?\352) (?o . ?\364) - (?\ . ?^)) - (?\" (?U . ?\334) (?u . ?\374) - (?\ . ?\")) - (?~ (?A . ?\303) (?O . ?\325) (?a . ?\343) (?o . ?\365) - (?C . ?\307) (?N . ?\321) (?c . ?\347) (?n . ?\361) - (?\ . ?~)) - (?, (?c . ?\347) (?C . ?\307) (?, . ?,))) - - ("spanish" - (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) - (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) - (?\ . ?')) - (?\" (?U . ?\334) (?u . ?\374) (?\ . ?\")) - (?\~ (?N . ?\321) (?n . ?\361) (?> . ?\273) (?< . ?\253) (?! . ?\241) - (?? . ?\277) (?\ . ?\~))) - - ("latin-1" - (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) - (?Y . ?\335) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) - (?u . ?\372) (?y . ?\375) (?' . ?\264) - (?\ . ?')) - (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331) - (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371) - (?` . ?`) (?\ . ?`)) - (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333) - (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373) - (?^ . ?^) (?\ . ?^)) - (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334) - (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?s . ?\337) - (?u . ?\374) (?y . ?\377) - (?\" . ?\250) (?\ . ?\")) - (?~ (?A . ?\303) (?C . ?\307) (?D . ?\320) (?N . ?\321) (?O . ?\325) - (?T . ?\336) (?a . ?\343) (?c . ?\347) (?d . ?\360) (?n . ?\361) - (?o . ?\365) (?t . ?\376) - (?> . ?\273) (?< . ?\253) (?! . ?\241) (?? . ?\277) - (?\~ . ?\270) (?\ . ?~)) - (?/ (?A . ?\305) (?E . ?\306) (?O . ?\330) (?a . ?\345) (?e . ?\346) - (?o . ?\370) - (?/ . ?\260) (?\ . ?/))) - - ("latin-2" latin-iso8859-2 - (?' (?A . ?\301) (?C . ?\306) (?D . ?\320) (?E . ?\311) (?I . ?\315) - (?L . ?\305) (?N . ?\321) (?O . ?\323) (?R . ?\300) (?S . ?\246) - (?U . ?\332) (?Y . ?\335) (?Z . ?\254) - (?a . ?\341) (?c . ?\346) (?d . ?\360) (?e . ?\351) (?i . ?\355) - (?l . ?\345) (?n . ?\361) (?o . ?\363) (?r . ?\340) (?s . ?\266) - (?u . ?\372) (?y . ?\375) (?z . ?\274) - (?' . ?\264) (?\ . ?')) - (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252) - (?T . ?\336) (?Z . ?\257) - (?a . ?\261) (?l . ?\263) (?c . ?\347) (?e . ?\352) (?s . ?\272) - (?t . ?\376) (?z . ?\277) - (?` . ?\252) - (?. . ?\377) (?\ . ?`)) - (?^ (?A . ?\302) (?I . ?\316) (?O . ?\324) - (?a . ?\342) (?i . ?\356) (?o . ?\364) - (?^ . ?^) ; no special code? - (?\ . ?^)) - (?\" (?A . ?\304) (?E . ?\313) (?O . ?\326) (?U . ?\334) - (?a . ?\344) (?e . ?\353) (?o . ?\366) (?s . ?\337) (?u . ?\374) - (?\" . ?\250) - (?\ . ?\")) - (?~ (?A . ?\303) (?C . ?\310) (?D . ?\317) (?L . ?\245) (?N . ?\322) - (?O . ?\325) (?R . ?\330) (?S . ?\251) (?T . ?\253) (?U . ?\333) - (?Z . ?\256) - (?a . ?\343) (?c . ?\350) (?d . ?\357) (?l . ?\265) (?n . ?\362) - (?o . ?\365) (?r . ?\370) (?s . ?\271) (?t . ?\273) (?u . ?\373) - (?z . ?\276) - (?v . ?\242) ; v accent - (?\~ . ?\242) ; v accent - (?\. . ?\270) ; cedilla accent - (?\ . ?~))) - - ("latin-3" latin-iso8859-3 - (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) - (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) - (?' . ?\264) (?\ . ?')) - (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331) - (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371) - (?` . ?`) (?\ . ?`)) - (?^ (?A . ?\302) (?C . ?\306) (?E . ?\312) (?G . ?\330) (?H . ?\246) - (?I . ?\316) (?J . ?\254) (?O . ?\324) (?S . ?\336) (?U . ?\333) - (?a . ?\342) (?c . ?\346) (?e . ?\352) (?g . ?\370) (?h . ?\266) - (?i . ?\356) (?j . ?\274) (?o . ?\364) (?s . ?\376) (?u . ?\373) - (?^ . ?^) (?\ . ?^)) - (?\" (?A . ?\304) (?E . ?\313) (?I . ?\317) (?O . ?\326) (?U . ?\334) - (?a . ?\344) (?e . ?\353) (?i . ?\357) (?o . ?\366) (?u . ?\374) - (?s . ?\337) - (?\" . ?\250) (?\ . ?\")) - (?~ (?A . ?\303) (?C . ?\307) (?D . ?\320) (?N . ?\321) (?O . ?\325) - (?a . ?\343) (?c . ?\347) (?d . ?\360) (?n . ?\361) (?o . ?\365) - (?$ . ?\245) (?S . ?\252) (?s . ?\272) (?G . ?\253) (?g . ?\273) - (?U . ?\335) (?u . ?\375) (?` . ?\242) - (?~ . ?\270) (?\ . ?~)) - (?/ (?C . ?\305) (?G . ?\325) (?H . ?\241) (?I . ?\251) (?Z . ?\257) - (?c . ?\345) (?g . ?\365) (?h . ?\261) (?i . ?\271) (?z . ?\277) - (?r . ?\256) - (?. . ?\377) (?# . ?\243) (?$ . ?\244) - (?/ . ?\260) (?\ . ?/)) - (?. (?C . ?\305) (?G . ?\325) (?I . ?\251) (?Z . ?\257) - (?c . ?\345) (?g . ?\365) (?z . ?\277)))) - "List of language-specific customizations for the ISO Accents mode. - -Each element of the list is of the form - - (LANGUAGE [CHARSET] - (PSEUDO-ACCENT MAPPINGS) - (PSEUDO-ACCENT MAPPINGS) - ...) - -LANGUAGE is a string naming the language. -CHARSET (which may be omitted) is the symbol name - of the character set used in this language. - If CHARSET is omitted, latin-iso8859-1 is the default. -PSEUDO-ACCENT is a char specifying an accent key. -MAPPINGS are cons cells of the form (CHAR . ISO-CHAR). - -The net effect is that the key sequence PSEUDO-ACCENT CHAR is mapped -to ISO-CHAR on input.") - -(defvar iso-language nil - "Language for which ISO Accents mode is currently customized. -Change it with the `iso-accents-customize' function.") - -(defvar iso-accents-list nil - "Association list for ISO accent combinations, for the chosen language.") - -(defcustom iso-accents-mode nil - "Non-nil enables ISO Accents mode. -Setting this variable makes it local to the current buffer. -See the function `iso-accents-mode'." - :type 'boolean - :group 'iso-acc) -(make-variable-buffer-local 'iso-accents-mode) - -(defcustom iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/) - "List of accent keys that become prefixes in ISO Accents mode. -The default is (?\\=' ?\\=` ?^ ?\" ?~ ?/), which contains all the supported -accent keys. If you set this variable to a list in which some of those -characters are missing, the missing ones do not act as accents. - -Note that if you specify a language with `iso-accents-customize', -that can also turn off certain prefixes (whichever ones are not needed in -the language you choose)." - :type '(repeat character) - :group 'iso-acc) - -(defun iso-accents-accent-key (prompt) - "Modify the following character by adding an accent to it." - ;; Pick up the accent character. - (if (and iso-accents-mode - (memq last-input-event iso-accents-enable)) - (iso-accents-compose prompt) - (vector last-input-event))) - - -;; The iso-accents-compose function is called deep inside Emacs' read -;; key sequence machinery, so the call to read-event below actually -;; recurses into that machinery. Doing that does not cause any -;; problem on its own, but read-event will have marked the window's -;; display matrix to be accurate -- which is broken by the subsequent -;; call to delete-region. Therefore, we must call force-window-update -;; after delete-region to explicitly clear the accurate state of the -;; window's display matrix. - -(defun iso-accents-compose (prompt) - (let* ((first-char last-input-event) - (list (assq first-char iso-accents-list)) - ;; Wait for the second key and look up the combination. - (second-char (if (or prompt - (not (eq (key-binding "a") - 'self-insert-command)) - ;; Not at start of a key sequence. - (> (length (this-single-command-keys)) 1) - ;; Called from anything but the command loop. - this-command) - (progn - (message "%s%c" - (or prompt "Compose with ") - first-char) - (read-event)) - (insert first-char) - (prog1 (read-event) - (delete-region (1- (point)) (point)) - ;; Display is no longer up-to-date. - (force-window-update (selected-window))))) - (entry (cdr (assq second-char list)))) - (if entry - ;; Found it: return the mapped char - (vector - (if (and enable-multibyte-characters - (>= entry ?\200)) - (+ iso-accents-insert-offset entry) - entry)) - ;; Otherwise, advance and schedule the second key for execution. - (push second-char unread-command-events) - (vector first-char)))) - -;; It is a matter of taste if you want the minor mode indicated -;; in the mode line... -;; If so, uncomment the next four lines. -;; (or (assq 'iso-accents-mode minor-mode-alist) -;; (setq minor-mode-alist -;; (append minor-mode-alist -;; '((iso-accents-mode " ISO-Acc"))))) - -;;;###autoload -(defun iso-accents-mode (&optional arg) - "Toggle ISO Accents mode, in which accents modify the following letter. -This permits easy insertion of accented characters according to ISO-8859-1. -When Iso-accents mode is enabled, accent character keys -\(\\=`, \\=', \", ^, / and ~) do not self-insert; instead, they modify the following -letter key so that it inserts an ISO accented letter. - -You can customize ISO Accents mode to a particular language -with the command `iso-accents-customize'. - -Special combinations: ~c gives a c with cedilla, -~d gives an Icelandic eth (d with dash). -~t gives an Icelandic thorn. -\"s gives German sharp s. -/a gives a with ring. -/e gives an a-e ligature. -~< and ~> give guillemots. -~! gives an inverted exclamation mark. -~? gives an inverted question mark. - -With an argument, a positive argument enables ISO Accents mode, -and a negative argument disables it." - - (interactive "P") - - (if (if arg - ;; Negative arg means switch it off. - (<= (prefix-numeric-value arg) 0) - ;; No arg means toggle. - iso-accents-mode) - (setq iso-accents-mode nil) - - ;; Enable electric accents. - (setq iso-accents-mode t))) - -(defun iso-accents-customize (language) - "Customize the ISO accents machinery for a particular language. -It selects the customization based on the specifications in the -`iso-languages' variable." - (interactive (list (completing-read "Language: " iso-languages nil t))) - (let ((table (cdr (assoc language iso-languages))) - all-accents tail) - (if (not table) - (error "Unknown language `%s'" language) - (setq iso-accents-insert-offset (- (make-char (if (symbolp (car table)) - (car table) - 'latin-iso8859-1)) - 128)) - (if (symbolp (car table)) - (setq table (cdr table))) - (setq iso-language language - iso-accents-list table) - (if key-translation-map - (substitute-key-definition - 'iso-accents-accent-key nil key-translation-map) - (setq key-translation-map (make-sparse-keymap))) - ;; Set up translations for all the characters that are used as - ;; accent prefixes in this language. - (setq tail iso-accents-list) - (while tail - (define-key key-translation-map (vector (car (car tail))) - 'iso-accents-accent-key) - (setq tail (cdr tail)))))) - -(defun iso-accentuate (start end) - "Convert two-character sequences in region into accented characters. -Noninteractively, this operates on text from START to END. -This uses the same conversion that ISO Accents mode uses for type-in." - (interactive "r") - (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (forward-char 1) - (let (entry) - (while (< (point) end) - (if (and (memq (preceding-char) iso-accents-enable) - (setq entry (cdr (assq (following-char) (assq (preceding-char) iso-accents-list))))) - (progn - (forward-char -1) - (delete-char 2) - (insert entry) - (setq end (1- end))) - (forward-char 1))))))) - -(defun iso-accent-rassoc-unit (value alist) - (let (elt acc) - (while (and alist (not elt)) - (setq acc (car (car alist)) - elt (car (rassq value (cdr (car alist)))) - alist (cdr alist))) - (if elt - (cons acc elt)))) - -(defun iso-unaccentuate (start end) - "Convert accented characters in the region into two-character sequences. -Noninteractively, this operates on text from START to END. -This uses the opposite of the conversion done by ISO Accents mode for type-in." - (interactive "r") - (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (let (entry) - (while (< (point) end) - (if (and (> (following-char) 127) - (setq entry (iso-accent-rassoc-unit (following-char) - iso-accents-list))) - (progn - (delete-char 1) - (insert (car entry) (cdr entry)) - (setq end (1+ end))) - (forward-char 1))))))) - -(defun iso-deaccentuate (start end) - "Convert accented characters in the region into unaccented characters. -Noninteractively, this operates on text from START to END." - (interactive "r") - (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (let (entry) - (while (< (point) end) - (if (and (> (following-char) 127) - (setq entry (iso-accent-rassoc-unit (following-char) - iso-accents-list))) - (progn - (delete-char 1) - (insert (cdr entry))) - (forward-char 1))))))) - -;; Set up the default settings. -(iso-accents-customize "latin-1") - -;; Use Iso-Accents mode in the minibuffer -;; if it was in use in the previous buffer. -(defun iso-acc-minibuf-setup () - (setq iso-accents-mode - (with-current-buffer (window-buffer minibuffer-scroll-window) - iso-accents-mode))) - -(add-hook 'minibuffer-setup-hook 'iso-acc-minibuf-setup) - -;;; iso-acc.el ends here diff --git a/lisp/obsolete/iso-insert.el b/lisp/obsolete/iso-insert.el deleted file mode 100644 index dcb9e3d..0000000 --- a/lisp/obsolete/iso-insert.el +++ /dev/null @@ -1,630 +0,0 @@ -;;; iso-insert.el --- insert functions for ISO 8859/1 - -;; Copyright (C) 1987, 1994, 2001-2016 Free Software Foundation, Inc. - -;; Author: Howard Gayle -;; Maintainer: emacs-devel@gnu.org -;; Keywords: i18n -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Provides keys for inserting ISO Latin-1 characters. They use the -;; prefix key C-x 8. Type C-x 8 C-h for a list. - -;;; Code: - -(defun insert-no-break-space () - (interactive "*") - (insert ?\ ) -) - -(defun insert-inverted-exclamation-mark () - (interactive "*") - (insert ?\¡) -) - -(defun insert-cent-sign () - (interactive "*") - (insert ?\¢) -) - -(defun insert-pound-sign () - (interactive "*") - (insert ?\£) -) - -(defun insert-general-currency-sign () - (interactive "*") - (insert ?\¤) -) - -(defun insert-yen-sign () - (interactive "*") - (insert ?\¥) -) - -(defun insert-broken-vertical-line () - (interactive "*") - (insert ?\¦) -) - -(defun insert-section-sign () - (interactive "*") - (insert ?\§) -) - -(defun insert-diaeresis () - (interactive "*") - (insert ?\¨) -) - -(defun insert-copyright-sign () - (interactive "*") - (insert ?\©) -) - -(defun insert-ordinal-indicator-feminine () - (interactive "*") - (insert ?\ª) -) - -(defun insert-angle-quotation-mark-left () - (interactive "*") - (insert ?\«) -) - -(defun insert-not-sign () - (interactive "*") - (insert ?\¬) -) - -(defun insert-soft-hyphen () - (interactive "*") - (insert ?\­) -) - -(defun insert-registered-sign () - (interactive "*") - (insert ?\®) -) - -(defun insert-macron () - (interactive "*") - (insert ?\¯) -) - -(defun insert-degree-sign () - (interactive "*") - (insert ?\°) -) - -(defun insert-plus-or-minus-sign () - (interactive "*") - (insert ?\±) -) - -(defun insert-superscript-two () - (interactive "*") - (insert ?\²) -) - -(defun insert-superscript-three () - (interactive "*") - (insert ?\³) -) - -(defun insert-acute-accent () - (interactive "*") - (insert ?\´) -) - -(defun insert-micro-sign () - (interactive "*") - (insert ?\µ) -) - -(defun insert-pilcrow () - (interactive "*") - (insert ?\¶) -) - -(defun insert-middle-dot () - (interactive "*") - (insert ?\·) -) - -(defun insert-cedilla () - (interactive "*") - (insert ?\¸) -) - -(defun insert-superscript-one () - (interactive "*") - (insert ?\¹) -) - -(defun insert-ordinal-indicator-masculine () - (interactive "*") - (insert ?\º) -) - -(defun insert-angle-quotation-mark-right () - (interactive "*") - (insert ?\») -) - -(defun insert-fraction-one-quarter () - (interactive "*") - (insert ?\¼) -) - -(defun insert-fraction-one-half () - (interactive "*") - (insert ?\½) -) - -(defun insert-fraction-three-quarters () - (interactive "*") - (insert ?\¾) -) - -(defun insert-inverted-question-mark () - (interactive "*") - (insert ?\¿) -) - -(defun insert-A-grave () - (interactive "*") - (insert ?\À) -) - -(defun insert-A-acute () - (interactive "*") - (insert ?\Á) -) - -(defun insert-A-circumflex () - (interactive "*") - (insert ?\Â) -) - -(defun insert-A-tilde () - (interactive "*") - (insert ?\Ã) -) - -(defun insert-A-umlaut () - (interactive "*") - (insert ?\Ä) -) - -(defun insert-A-ring () - (interactive "*") - (insert ?\Å) -) - -(defun insert-AE () - (interactive "*") - (insert ?\Æ) -) - -(defun insert-C-cedilla () - (interactive "*") - (insert ?\Ç) -) - -(defun insert-E-grave () - (interactive "*") - (insert ?\È) -) - -(defun insert-E-acute () - (interactive "*") - (insert ?\É) -) - -(defun insert-E-circumflex () - (interactive "*") - (insert ?\Ê) -) - -(defun insert-E-umlaut () - (interactive "*") - (insert ?\Ë) -) - -(defun insert-I-grave () - (interactive "*") - (insert ?\Ì) -) - -(defun insert-I-acute () - (interactive "*") - (insert ?\Í) -) - -(defun insert-I-circumflex () - (interactive "*") - (insert ?\Î) -) - -(defun insert-I-umlaut () - (interactive "*") - (insert ?\Ï) -) - -(defun insert-D-stroke () - (interactive "*") - (insert ?\Ð) -) - -(defun insert-N-tilde () - (interactive "*") - (insert ?\Ñ) -) - -(defun insert-O-grave () - (interactive "*") - (insert ?\Ò) -) - -(defun insert-O-acute () - (interactive "*") - (insert ?\Ó) -) - -(defun insert-O-circumflex () - (interactive "*") - (insert ?\Ô) -) - -(defun insert-O-tilde () - (interactive "*") - (insert ?\Õ) -) - -(defun insert-O-umlaut () - (interactive "*") - (insert ?\Ö) -) - -(defun insert-multiplication-sign () - (interactive "*") - (insert ?\×) -) - -(defun insert-O-slash () - (interactive "*") - (insert ?\Ø) -) - -(defun insert-U-grave () - (interactive "*") - (insert ?\Ù) -) - -(defun insert-U-acute () - (interactive "*") - (insert ?\Ú) -) - -(defun insert-U-circumflex () - (interactive "*") - (insert ?\Û) -) - -(defun insert-U-umlaut () - (interactive "*") - (insert ?\Ü) -) - -(defun insert-Y-acute () - (interactive "*") - (insert ?\Ý) -) - -(defun insert-THORN () - (interactive "*") - (insert ?\Þ) -) - -(defun insert-ss () - (interactive "*") - (insert ?\ß) -) - -(defun insert-a-grave () - (interactive "*") - (insert ?\à) -) - -(defun insert-a-acute () - (interactive "*") - (insert ?\á) -) - -(defun insert-a-circumflex () - (interactive "*") - (insert ?\â) -) - -(defun insert-a-tilde () - (interactive "*") - (insert ?\ã) -) - -(defun insert-a-umlaut () - (interactive "*") - (insert ?\ä) -) - -(defun insert-a-ring () - (interactive "*") - (insert ?\å) -) - -(defun insert-ae () - (interactive "*") - (insert ?\æ) -) - -(defun insert-c-cedilla () - (interactive "*") - (insert ?\ç) -) - -(defun insert-e-grave () - (interactive "*") - (insert ?\è) -) - -(defun insert-e-acute () - (interactive "*") - (insert ?\é) -) - -(defun insert-e-circumflex () - (interactive "*") - (insert ?\ê) -) - -(defun insert-e-umlaut () - (interactive "*") - (insert ?\ë) -) - -(defun insert-i-grave () - (interactive "*") - (insert ?\ì) -) - -(defun insert-i-acute () - (interactive "*") - (insert ?\í) -) - -(defun insert-i-circumflex () - (interactive "*") - (insert ?\î) -) - -(defun insert-i-umlaut () - (interactive "*") - (insert ?\ï) -) - -(defun insert-d-stroke () - (interactive "*") - (insert ?\ð) -) - -(defun insert-n-tilde () - (interactive "*") - (insert ?\ñ) -) - -(defun insert-o-grave () - (interactive "*") - (insert ?\ò) -) - -(defun insert-o-acute () - (interactive "*") - (insert ?\ó) -) - -(defun insert-o-circumflex () - (interactive "*") - (insert ?\ô) -) - -(defun insert-o-tilde () - (interactive "*") - (insert ?\õ) -) - -(defun insert-o-umlaut () - (interactive "*") - (insert ?\ö) -) - -(defun insert-division-sign () - (interactive "*") - (insert ?\÷) -) - -(defun insert-o-slash () - (interactive "*") - (insert ?\ø) -) - -(defun insert-u-grave () - (interactive "*") - (insert ?\ù) -) - -(defun insert-u-acute () - (interactive "*") - (insert ?\ú) -) - -(defun insert-u-circumflex () - (interactive "*") - (insert ?\û) -) - -(defun insert-u-umlaut () - (interactive "*") - (insert ?\ü) -) - -(defun insert-y-acute () - (interactive "*") - (insert ?\ý) -) - -(defun insert-thorn () - (interactive "*") - (insert ?\þ) -) - -(defun insert-y-umlaut () - (interactive "*") - (insert ?\ÿ) -) - -(defvar 8859-1-map nil "Keymap for ISO 8859/1 character insertion.") -(if 8859-1-map nil - (setq 8859-1-map (make-keymap)) - (define-key 8859-1-map " " 'insert-no-break-space) - (define-key 8859-1-map "!" 'insert-inverted-exclamation-mark) - (define-key 8859-1-map "\"" (make-sparse-keymap)) - (define-key 8859-1-map "\"\"" 'insert-diaeresis) - (define-key 8859-1-map "\"A" 'insert-A-umlaut) - (define-key 8859-1-map "\"E" 'insert-E-umlaut) - (define-key 8859-1-map "\"I" 'insert-I-umlaut) - (define-key 8859-1-map "\"O" 'insert-O-umlaut) - (define-key 8859-1-map "\"U" 'insert-U-umlaut) - (define-key 8859-1-map "\"a" 'insert-a-umlaut) - (define-key 8859-1-map "\"e" 'insert-e-umlaut) - (define-key 8859-1-map "\"i" 'insert-i-umlaut) - (define-key 8859-1-map "\"o" 'insert-o-umlaut) - (define-key 8859-1-map "\"u" 'insert-u-umlaut) - (define-key 8859-1-map "\"y" 'insert-y-umlaut) - (define-key 8859-1-map "'" (make-sparse-keymap)) - (define-key 8859-1-map "''" 'insert-acute-accent) - (define-key 8859-1-map "'A" 'insert-A-acute) - (define-key 8859-1-map "'E" 'insert-E-acute) - (define-key 8859-1-map "'I" 'insert-I-acute) - (define-key 8859-1-map "'O" 'insert-O-acute) - (define-key 8859-1-map "'U" 'insert-U-acute) - (define-key 8859-1-map "'Y" 'insert-Y-acute) - (define-key 8859-1-map "'a" 'insert-a-acute) - (define-key 8859-1-map "'e" 'insert-e-acute) - (define-key 8859-1-map "'i" 'insert-i-acute) - (define-key 8859-1-map "'o" 'insert-o-acute) - (define-key 8859-1-map "'u" 'insert-u-acute) - (define-key 8859-1-map "'y" 'insert-y-acute) - (define-key 8859-1-map "$" 'insert-general-currency-sign) - (define-key 8859-1-map "+" 'insert-plus-or-minus-sign) - (define-key 8859-1-map "," (make-sparse-keymap)) - (define-key 8859-1-map ",," 'insert-cedilla) - (define-key 8859-1-map ",C" 'insert-C-cedilla) - (define-key 8859-1-map ",c" 'insert-c-cedilla) - (define-key 8859-1-map "-" 'insert-soft-hyphen) - (define-key 8859-1-map "." 'insert-middle-dot) - (define-key 8859-1-map "/" (make-sparse-keymap)) - (define-key 8859-1-map "//" 'insert-division-sign) - (define-key 8859-1-map "/O" 'insert-O-slash) - (define-key 8859-1-map "/o" 'insert-o-slash) - (define-key 8859-1-map "1" (make-sparse-keymap)) - (define-key 8859-1-map "1/" (make-sparse-keymap)) - (define-key 8859-1-map "1/2" 'insert-fraction-one-half) - (define-key 8859-1-map "1/4" 'insert-fraction-one-quarter) - (define-key 8859-1-map "3" (make-sparse-keymap)) - (define-key 8859-1-map "3/" (make-sparse-keymap)) - (define-key 8859-1-map "3/4" 'insert-fraction-three-quarters) - (define-key 8859-1-map "<" 'insert-angle-quotation-mark-left) - (define-key 8859-1-map "=" 'insert-macron) - (define-key 8859-1-map ">" 'insert-angle-quotation-mark-right) - (define-key 8859-1-map "?" 'insert-inverted-question-mark) - (define-key 8859-1-map "A" 'insert-A-ring) - (define-key 8859-1-map "E" 'insert-AE) - (define-key 8859-1-map "C" 'insert-copyright-sign) - (define-key 8859-1-map "D" 'insert-D-stroke) - (define-key 8859-1-map "L" 'insert-pound-sign) - (define-key 8859-1-map "P" 'insert-pilcrow) - (define-key 8859-1-map "R" 'insert-registered-sign) - (define-key 8859-1-map "S" 'insert-section-sign) - (define-key 8859-1-map "T" 'insert-THORN) - (define-key 8859-1-map "Y" 'insert-yen-sign) - (define-key 8859-1-map "^" (make-sparse-keymap)) - (define-key 8859-1-map "^1" 'insert-superscript-one) - (define-key 8859-1-map "^2" 'insert-superscript-two) - (define-key 8859-1-map "^3" 'insert-superscript-three) - (define-key 8859-1-map "^A" 'insert-A-circumflex) - (define-key 8859-1-map "^E" 'insert-E-circumflex) - (define-key 8859-1-map "^I" 'insert-I-circumflex) - (define-key 8859-1-map "^O" 'insert-O-circumflex) - (define-key 8859-1-map "^U" 'insert-U-circumflex) - (define-key 8859-1-map "^a" 'insert-a-circumflex) - (define-key 8859-1-map "^e" 'insert-e-circumflex) - (define-key 8859-1-map "^i" 'insert-i-circumflex) - (define-key 8859-1-map "^o" 'insert-o-circumflex) - (define-key 8859-1-map "^u" 'insert-u-circumflex) - (define-key 8859-1-map "_" (make-sparse-keymap)) - (define-key 8859-1-map "_a" 'insert-ordinal-indicator-feminine) - (define-key 8859-1-map "_o" 'insert-ordinal-indicator-masculine) - (define-key 8859-1-map "`" (make-sparse-keymap)) - (define-key 8859-1-map "`A" 'insert-A-grave) - (define-key 8859-1-map "`E" 'insert-E-grave) - (define-key 8859-1-map "`I" 'insert-I-grave) - (define-key 8859-1-map "`O" 'insert-O-grave) - (define-key 8859-1-map "`U" 'insert-U-grave) - (define-key 8859-1-map "`a" 'insert-a-grave) - (define-key 8859-1-map "`e" 'insert-e-grave) - (define-key 8859-1-map "`i" 'insert-i-grave) - (define-key 8859-1-map "`o" 'insert-o-grave) - (define-key 8859-1-map "`u" 'insert-u-grave) - (define-key 8859-1-map "a" 'insert-a-ring) - (define-key 8859-1-map "e" 'insert-ae) - (define-key 8859-1-map "c" 'insert-cent-sign) - (define-key 8859-1-map "d" 'insert-d-stroke) - (define-key 8859-1-map "o" 'insert-degree-sign) - (define-key 8859-1-map "s" 'insert-ss) - (define-key 8859-1-map "t" 'insert-thorn) - (define-key 8859-1-map "u" 'insert-micro-sign) - (define-key 8859-1-map "x" 'insert-multiplication-sign) - (define-key 8859-1-map "|" 'insert-broken-vertical-line) - (define-key 8859-1-map "~" (make-sparse-keymap)) - (define-key 8859-1-map "~A" 'insert-A-tilde) - (define-key 8859-1-map "~N" 'insert-N-tilde) - (define-key 8859-1-map "~O" 'insert-O-tilde) - (define-key 8859-1-map "~a" 'insert-a-tilde) - (define-key 8859-1-map "~n" 'insert-n-tilde) - (define-key 8859-1-map "~o" 'insert-o-tilde) - (define-key 8859-1-map "~~" 'insert-not-sign) - (if (not (lookup-key global-map "\C-x8")) - (define-key global-map "\C-x8" 8859-1-map)) -) -(defalias '8859-1-map 8859-1-map) - -(provide 'iso-insert) - -;;; iso-insert.el ends here diff --git a/lisp/obsolete/iso-swed.el b/lisp/obsolete/iso-swed.el deleted file mode 100644 index bae69d2..0000000 --- a/lisp/obsolete/iso-swed.el +++ /dev/null @@ -1,150 +0,0 @@ -;;; iso-swed.el --- set up char tables for ISO 8859/1 for Swedish/Finnish ttys - -;; Copyright (C) 1987, 2001-2016 Free Software Foundation, Inc. - -;; Author: Howard Gayle -;; Maintainer: emacs-devel@gnu.org -;; Keywords: i18n -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Written by Howard Gayle. See case-table.el for details. - -;;; Code: - -;; This code sets up to display ISO 8859/1 characters on -;; terminals that have ASCII in the G0 set and a Swedish/Finnish -;; version of ISO 646 in the G1 set. The G1 set differs from -;; ASCII as follows: -;; -;; ASCII G1 -;; $ general currency sign -;; @ capital E with acute accent -;; [ capital A with diaeresis or umlaut mark -;; \ capital O with diaeresis or umlaut mark -;; ] capital A with ring -;; ^ capital U with diaeresis or umlaut mark -;; ` small e with acute accent -;; { small a with diaeresis or umlaut mark -;; | small o with diaeresis or umlaut mark -;; } small a with ring -;; ~ small u with diaeresis or umlaut mark - -(require 'disp-table) - -(standard-display-ascii 160 "{_}") ; NBSP (no-break space) -(standard-display-ascii 161 "{!}") ; inverted exclamation mark -(standard-display-ascii 162 "{c}") ; cent sign -(standard-display-ascii 163 "{GBP}") ; pound sign -(standard-display-g1 164 ?$) ; general currency sign -(standard-display-ascii 165 "{JPY}") ; yen sign -(standard-display-ascii 166 "{|}") ; broken vertical line -(standard-display-ascii 167 "{S}") ; section sign -(standard-display-ascii 168 "{\"}") ; diaeresis -(standard-display-ascii 169 "{C}") ; copyright sign -(standard-display-ascii 170 "{_a}") ; ordinal indicator, feminine -(standard-display-ascii 171 "{<<}") ; left angle quotation mark -(standard-display-ascii 172 "{~}") ; not sign -(standard-display-ascii 173 "{-}") ; soft hyphen -(standard-display-ascii 174 "{R}") ; registered sign -(standard-display-ascii 175 "{=}") ; macron -(standard-display-ascii 176 "{o}") ; degree sign -(standard-display-ascii 177 "{+-}") ; plus or minus sign -(standard-display-ascii 178 "{2}") ; superscript two -(standard-display-ascii 179 "{3}") ; superscript three -(standard-display-ascii 180 "{'}") ; acute accent -(standard-display-ascii 181 "{u}") ; micro sign -(standard-display-ascii 182 "{P}") ; pilcrow -(standard-display-ascii 183 "{.}") ; middle dot -(standard-display-ascii 184 "{,}") ; cedilla -(standard-display-ascii 185 "{1}") ; superscript one -(standard-display-ascii 186 "{_o}") ; ordinal indicator, masculine -(standard-display-ascii 187 "{>>}") ; right angle quotation mark -(standard-display-ascii 188 "{1/4}") ; fraction one-quarter -(standard-display-ascii 189 "{1/2}") ; fraction one-half -(standard-display-ascii 190 "{3/4}") ; fraction three-quarters -(standard-display-ascii 191 "{?}") ; inverted question mark -(standard-display-ascii 192 "{`A}") ; A with grave accent -(standard-display-ascii 193 "{'A}") ; A with acute accent -(standard-display-ascii 194 "{^A}") ; A with circumflex accent -(standard-display-ascii 195 "{~A}") ; A with tilde -(standard-display-g1 196 ?[) ; A with diaeresis or umlaut mark -(standard-display-g1 197 ?]) ; A with ring -(standard-display-ascii 198 "{AE}") ; AE diphthong -(standard-display-ascii 199 "{,C}") ; C with cedilla -(standard-display-ascii 200 "{`E}") ; E with grave accent -(standard-display-g1 201 ?@) ; E with acute accent -(standard-display-ascii 202 "{^E}") ; E with circumflex accent -(standard-display-ascii 203 "{\"E}") ; E with diaeresis or umlaut mark -(standard-display-ascii 204 "{`I}") ; I with grave accent -(standard-display-ascii 205 "{'I}") ; I with acute accent -(standard-display-ascii 206 "{^I}") ; I with circumflex accent -(standard-display-ascii 207 "{\"I}") ; I with diaeresis or umlaut mark -(standard-display-ascii 208 "{-D}") ; D with stroke, Icelandic eth -(standard-display-ascii 209 "{~N}") ; N with tilde -(standard-display-ascii 210 "{`O}") ; O with grave accent -(standard-display-ascii 211 "{'O}") ; O with acute accent -(standard-display-ascii 212 "{^O}") ; O with circumflex accent -(standard-display-ascii 213 "{~O}") ; O with tilde -(standard-display-g1 214 ?\\) ; O with diaeresis or umlaut mark -(standard-display-ascii 215 "{x}") ; multiplication sign -(standard-display-ascii 216 "{/O}") ; O with slash -(standard-display-ascii 217 "{`U}") ; U with grave accent -(standard-display-ascii 218 "{'U}") ; U with acute accent -(standard-display-ascii 219 "{^U}") ; U with circumflex accent -(standard-display-g1 220 ?^) ; U with diaeresis or umlaut mark -(standard-display-ascii 221 "{'Y}") ; Y with acute accent -(standard-display-ascii 222 "{TH}") ; capital thorn, Icelandic -(standard-display-ascii 223 "{ss}") ; small sharp s, German -(standard-display-ascii 224 "{`a}") ; a with grave accent -(standard-display-ascii 225 "{'a}") ; a with acute accent -(standard-display-ascii 226 "{^a}") ; a with circumflex accent -(standard-display-ascii 227 "{~a}") ; a with tilde -(standard-display-g1 228 ?{) ; a with diaeresis or umlaut mark -(standard-display-g1 229 ?}) ; a with ring -(standard-display-ascii 230 "{ae}") ; ae diphthong -(standard-display-ascii 231 "{,c}") ; c with cedilla -(standard-display-ascii 232 "{`e}") ; e with grave accent -(standard-display-g1 233 ?`) ; e with acute accent -(standard-display-ascii 234 "{^e}") ; e with circumflex accent -(standard-display-ascii 235 "{\"e}") ; e with diaeresis or umlaut mark -(standard-display-ascii 236 "{`i}") ; i with grave accent -(standard-display-ascii 237 "{'i}") ; i with acute accent -(standard-display-ascii 238 "{^i}") ; i with circumflex accent -(standard-display-ascii 239 "{\"i}") ; i with diaeresis or umlaut mark -(standard-display-ascii 240 "{-d}") ; d with stroke, Icelandic eth -(standard-display-ascii 241 "{~n}") ; n with tilde -(standard-display-ascii 242 "{`o}") ; o with grave accent -(standard-display-ascii 243 "{'o}") ; o with acute accent -(standard-display-ascii 244 "{^o}") ; o with circumflex accent -(standard-display-ascii 245 "{~o}") ; o with tilde -(standard-display-g1 246 ?|) ; o with diaeresis or umlaut mark -(standard-display-ascii 247 "{/}") ; division sign -(standard-display-ascii 248 "{/o}") ; o with slash -(standard-display-ascii 249 "{`u}") ; u with grave accent -(standard-display-ascii 250 "{'u}") ; u with acute accent -(standard-display-ascii 251 "{^u}") ; u with circumflex accent -(standard-display-g1 252 ?~) ; u with diaeresis or umlaut mark -(standard-display-ascii 253 "{'y}") ; y with acute accent -(standard-display-ascii 254 "{th}") ; small thorn, Icelandic -(standard-display-ascii 255 "{\"y}") ; small y with diaeresis or umlaut mark - -(provide 'iso-swed) - -;;; iso-swed.el ends here diff --git a/lisp/obsolete/keyswap.el b/lisp/obsolete/keyswap.el deleted file mode 100644 index ee3ba10..0000000 --- a/lisp/obsolete/keyswap.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; keyswap.el --- swap BS and DEL keys - -;; Copyright (C) 1992, 2001-2016 Free Software Foundation, Inc. - -;; Author: Eric S. Raymond -;; Keywords: terminals -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; This package is meant to be called by other terminal packages. - -;;; Code: - -(let ((the-table (make-string 128 0))) - (let ((i 0)) - (while (< i 128) - (aset the-table i i) - (setq i (1+ i)))) - ;; Swap ^H and DEL - (aset the-table ?\177 ?\^h) - (aset the-table ?\^h ?\177) - (setq keyboard-translate-table the-table)) - -;;; keyswap.el ends here diff --git a/lisp/obsolete/resume.el b/lisp/obsolete/resume.el deleted file mode 100644 index b7f699d..0000000 --- a/lisp/obsolete/resume.el +++ /dev/null @@ -1,125 +0,0 @@ -;;; resume.el --- process command line args from within a suspended Emacs job - -;; Copyright (C) 1992, 2001-2016 Free Software Foundation, Inc. - -;; Author: Joe Wells -;; Adapted-By: ESR -;; Keywords: processes -;; Obsolete-since: 23.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; The purpose of this library is to handle command line arguments -;; when you resume an existing Emacs job. - -;; In order to use it, you must put this code in your .emacs file. - -;; (add-hook 'suspend-hook 'resume-suspend-hook) -;; (add-hook 'suspend-resume-hook 'resume-process-args) - -;; You can't get the benefit of this library by using the `emacs' command, -;; since that always starts a new Emacs job. Instead you must use a -;; command called `edit' which knows how to resume an existing Emacs job -;; if you have one, or start a new Emacs job if you don't have one. - -;; To define the `edit' command, run the script etc/emacs.csh (if you use CSH), -;; or etc/emacs.bash if you use BASH. You would normally do this in your -;; login script. - -;; Stephan Gildea suggested bug fix (gildea@bbn.com). -;; Ideas from Michael DeCorte and other people. - -;;; Code: - -(defvar resume-emacs-args-file (expand-file-name "~/.emacs_args") - "This file is where arguments are placed for a suspended Emacs job.") - -(defvar resume-emacs-args-buffer " *Command Line Args*" - "Buffer that is used by `resume-process-args'.") - -(defun resume-process-args () - "Handler for command line args given when Emacs is resumed." - (let ((start-buffer (current-buffer)) - (args-buffer (get-buffer-create resume-emacs-args-buffer)) - length args - (command-line-default-directory default-directory)) - (unwind-protect - (progn - (set-buffer args-buffer) - (erase-buffer) - ;; get the contents of resume-emacs-args-file - (condition-case () - (let ((result (insert-file-contents resume-emacs-args-file))) - (setq length (car (cdr result)))) - ;; the file doesn't exist, ergo no arguments - (file-error - (erase-buffer) - (setq length 0))) - (if (<= length 0) - (setq args nil) - ;; get the arguments from the buffer - (goto-char (point-min)) - (while (not (eobp)) - (skip-chars-forward " \t\n") - (let ((begin (point))) - (skip-chars-forward "^ \t\n") - (setq args (cons (buffer-substring begin (point)) args))) - (skip-chars-forward " \t\n")) - ;; arguments are now in reverse order - (setq args (nreverse args)) - ;; make sure they're not read again - (erase-buffer)) - (resume-write-buffer-to-file (current-buffer) resume-emacs-args-file) - ;; if nothing was in buffer, args will be null - (or (null args) - (setq command-line-default-directory - (file-name-as-directory (car args)) - args (cdr args))) - ;; actually process the arguments - (command-line-1 args)) - ;; If the command line args don't result in a find-file, the - ;; buffer will be left in args-buffer. So we change back to the - ;; original buffer. The reason I don't just use - ;; (let ((default-directory foo)) - ;; (command-line-1 args)) - ;; in the context of the original buffer is because let does not - ;; work properly with buffer-local variables. - (if (eq (current-buffer) args-buffer) - (set-buffer start-buffer))))) - -;;;###autoload -(defun resume-suspend-hook () - "Clear out the file used for transmitting args when Emacs resumes." - (with-current-buffer (get-buffer-create resume-emacs-args-buffer) - (erase-buffer) - (resume-write-buffer-to-file (current-buffer) resume-emacs-args-file))) - -(defun resume-write-buffer-to-file (buffer file) - "Writes the contents of BUFFER into FILE, if permissions allow." - (if (not (file-writable-p file)) - (error "No permission to write file %s" file)) - (with-current-buffer buffer - (clear-visited-file-modtime) - (save-restriction - (widen) - (write-region (point-min) (point-max) file nil 'quiet)) - (set-buffer-modified-p nil))) - -(provide 'resume) - -;;; resume.el ends here diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el deleted file mode 100644 index c354e65..0000000 --- a/lisp/obsolete/scribe.el +++ /dev/null @@ -1,329 +0,0 @@ -;;; scribe.el --- scribe mode, and its idiosyncratic commands - -;; Copyright (C) 1985, 2001-2016 Free Software Foundation, Inc. - -;; Author: William Sommerfeld -;; (according to ack.texi) -;; Maintainer: emacs-devel@gnu.org -;; Keywords: wp -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; A major mode for editing source in written for the Scribe text formatter. -;; Knows about Scribe syntax and standard layout rules. The command to -;; run Scribe on a buffer is bogus; someone interested should fix it. - -;;; Code: - -(defvar compile-command) - -(defgroup scribe nil - "Scribe mode." - :prefix "scribe-" - :group 'wp) - -(defvar scribe-mode-syntax-table nil - "Syntax table used while in scribe mode.") - -(defvar scribe-mode-abbrev-table nil - "Abbrev table used while in scribe mode.") - -(defcustom scribe-fancy-paragraphs nil - "Non-nil makes Scribe mode use a different style of paragraph separation." - :type 'boolean - :group 'scribe) - -(defcustom scribe-electric-quote nil - "Non-nil makes insert of double quote use \\=`\\=` or \\='\\=' depending on context." - :type 'boolean - :group 'scribe) - -(defcustom scribe-electric-parenthesis nil - "Non-nil makes parenthesis char ( (]}> ) automatically insert its close -if typed after an @Command form." - :type 'boolean - :group 'scribe) - -(defconst scribe-open-parentheses "[({<" - "Open parenthesis characters for Scribe.") - -(defconst scribe-close-parentheses "])}>" - "Close parenthesis characters for Scribe. -These should match up with `scribe-open-parenthesis'.") - -(if (null scribe-mode-syntax-table) - (let ((st (syntax-table))) - (unwind-protect - (progn - (setq scribe-mode-syntax-table (copy-syntax-table - text-mode-syntax-table)) - (set-syntax-table scribe-mode-syntax-table) - (modify-syntax-entry ?\" " ") - (modify-syntax-entry ?\\ " ") - (modify-syntax-entry ?@ "w ") - (modify-syntax-entry ?< "(> ") - (modify-syntax-entry ?> ")< ") - (modify-syntax-entry ?[ "(] ") - (modify-syntax-entry ?] ")[ ") - (modify-syntax-entry ?{ "(} ") - (modify-syntax-entry ?} "){ ") - (modify-syntax-entry ?' "w ")) - (set-syntax-table st)))) - -(defvar scribe-mode-map nil) - -(if scribe-mode-map - nil - (setq scribe-mode-map (make-sparse-keymap)) - (define-key scribe-mode-map "\t" 'scribe-tab) - (define-key scribe-mode-map "\e\t" 'tab-to-tab-stop) - (define-key scribe-mode-map "\es" 'center-line) - (define-key scribe-mode-map "\e}" 'up-list) - (define-key scribe-mode-map "\eS" 'center-paragraph) - (define-key scribe-mode-map "\"" 'scribe-insert-quote) - (define-key scribe-mode-map "(" 'scribe-parenthesis) - (define-key scribe-mode-map "[" 'scribe-parenthesis) - (define-key scribe-mode-map "{" 'scribe-parenthesis) - (define-key scribe-mode-map "<" 'scribe-parenthesis) - (define-key scribe-mode-map "\C-c\C-c" 'scribe-chapter) - (define-key scribe-mode-map "\C-c\C-t" 'scribe-section) - (define-key scribe-mode-map "\C-c\C-s" 'scribe-subsection) - (define-key scribe-mode-map "\C-c\C-v" 'scribe-insert-environment) - (define-key scribe-mode-map "\C-c\C-e" 'scribe-bracket-region-be) - (define-key scribe-mode-map "\C-c[" 'scribe-begin) - (define-key scribe-mode-map "\C-c]" 'scribe-end) - (define-key scribe-mode-map "\C-c\C-i" 'scribe-italicize-word) - (define-key scribe-mode-map "\C-c\C-b" 'scribe-bold-word) - (define-key scribe-mode-map "\C-c\C-u" 'scribe-underline-word)) - -;;;###autoload -(define-derived-mode scribe-mode text-mode "Scribe" - "Major mode for editing files of Scribe (a text formatter) source. -Scribe-mode is similar to text-mode, with a few extra commands added. -\\{scribe-mode-map} - -Interesting variables: - -`scribe-fancy-paragraphs' - Non-nil makes Scribe mode use a different style of paragraph separation. - -`scribe-electric-quote' - Non-nil makes insert of double quote use \\=`\\=` or \\='\\=' depending on context. - -`scribe-electric-parenthesis' - Non-nil makes an open-parenthesis char (one of `([<{') - automatically insert its close if typed after an @Command form." - (set (make-local-variable 'comment-start) "@Comment[") - (set (make-local-variable 'comment-start-skip) (concat "@Comment[" scribe-open-parentheses "]")) - (set (make-local-variable 'comment-column) 0) - (set (make-local-variable 'comment-end) "]") - (set (make-local-variable 'paragraph-start) - (concat "\\([\n\f]\\)\\|\\(@\\w+[" - scribe-open-parentheses - "].*[" - scribe-close-parentheses - "]$\\)")) - (set (make-local-variable 'paragraph-separate) - (if scribe-fancy-paragraphs paragraph-start "$")) - (set (make-local-variable 'sentence-end) - "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") - (set (make-local-variable 'compile-command) - (concat "scribe " - (if buffer-file-name - (shell-quote-argument (buffer-file-name)))))) - -(defun scribe-tab () - (interactive) - (insert "@\\")) - -;; This algorithm could probably be improved somewhat. -;; Right now, it loses seriously... - -(defun scribe () - "Run Scribe on the current buffer." - (interactive) - (call-interactively 'compile)) - -(defun scribe-envelop-word (string count) - "Surround current word with Scribe construct @STRING[...]. -COUNT specifies how many words to surround. A negative count means -to skip backward." - (let ((spos (point)) (epos (point)) (ccoun 0) noparens) - (if (not (zerop count)) - (progn (if (= (char-syntax (preceding-char)) ?w) - (forward-sexp (min -1 count))) - (setq spos (point)) - (if (looking-at (concat "@\\w[" scribe-open-parentheses "]")) - (forward-char 2) - (goto-char epos) - (skip-chars-backward "\\W") - (forward-char -1)) - (forward-sexp (max count 1)) - (setq epos (point)))) - (goto-char spos) - (while (and (< ccoun (length scribe-open-parentheses)) - (save-excursion - (or (search-forward (char-to-string - (aref scribe-open-parentheses ccoun)) - epos t) - (search-forward (char-to-string - (aref scribe-close-parentheses ccoun)) - epos t))) - (setq ccoun (1+ ccoun)))) - (if (>= ccoun (length scribe-open-parentheses)) - (progn (goto-char epos) - (insert "@end(" string ")") - (goto-char spos) - (insert "@begin(" string ")")) - (goto-char epos) - (insert (aref scribe-close-parentheses ccoun)) - (goto-char spos) - (insert "@" string (aref scribe-open-parentheses ccoun)) - (goto-char epos) - (forward-char 3) - (skip-chars-forward scribe-close-parentheses)))) - -(defun scribe-underline-word (count) - "Underline COUNT words around point by means of Scribe constructs." - (interactive "p") - (scribe-envelop-word "u" count)) - -(defun scribe-bold-word (count) - "Boldface COUNT words around point by means of Scribe constructs." - (interactive "p") - (scribe-envelop-word "b" count)) - -(defun scribe-italicize-word (count) - "Italicize COUNT words around point by means of Scribe constructs." - (interactive "p") - (scribe-envelop-word "i" count)) - -(defun scribe-begin () - (interactive) - (insert "\n") - (forward-char -1) - (scribe-envelop-word "Begin" 0) - (re-search-forward (concat "[" scribe-open-parentheses "]"))) - -(defun scribe-end () - (interactive) - (insert "\n") - (forward-char -1) - (scribe-envelop-word "End" 0) - (re-search-forward (concat "[" scribe-open-parentheses "]"))) - -(defun scribe-chapter () - (interactive) - (insert "\n") - (forward-char -1) - (scribe-envelop-word "Chapter" 0) - (re-search-forward (concat "[" scribe-open-parentheses "]"))) - -(defun scribe-section () - (interactive) - (insert "\n") - (forward-char -1) - (scribe-envelop-word "Section" 0) - (re-search-forward (concat "[" scribe-open-parentheses "]"))) - -(defun scribe-subsection () - (interactive) - (insert "\n") - (forward-char -1) - (scribe-envelop-word "SubSection" 0) - (re-search-forward (concat "[" scribe-open-parentheses "]"))) - -(defun scribe-bracket-region-be (env min max) - (interactive "sEnvironment: \nr") - (save-excursion - (goto-char max) - (insert "@end(" env ")\n") - (goto-char min) - (insert "@begin(" env ")\n"))) - -(defun scribe-insert-environment (env) - (interactive "sEnvironment: ") - (scribe-bracket-region-be env (point) (point)) - (forward-line 1) - (insert ?\n) - (forward-char -1)) - -(defun scribe-insert-quote (count) - "Insert \\=`\\=`, \\='\\=' or \" according to preceding character. -If `scribe-electric-quote' is non-nil, insert \\=`\\=`, \\='\\=' or \" according -to preceding character. With numeric arg N, always insert N \" characters. -Else just insert \"." - (interactive "P") - (if (or count (not scribe-electric-quote)) - (self-insert-command (prefix-numeric-value count)) - (let (lastfore lastback lastquote) - (insert - (cond - ((= (preceding-char) ?\\) ?\") - ((bobp) "``") - (t - (setq lastfore (save-excursion (and (search-backward - "``" (- (point) 1000) t) - (point))) - lastback (save-excursion (and (search-backward - "''" (- (point) 1000) t) - (point))) - lastquote (save-excursion (and (search-backward - "\"" (- (point) 100) t) - (point)))) - (if (not lastquote) - (cond ((not lastfore) "``") - ((not lastback) "''") - ((> lastfore lastback) "''") - (t "``")) - (cond ((and (not lastback) (not lastfore)) "\"") - ((and lastback (not lastfore) (> lastquote lastback)) "\"") - ((and lastback (not lastfore) (> lastback lastquote)) "``") - ((and lastfore (not lastback) (> lastquote lastfore)) "\"") - ((and lastfore (not lastback) (> lastfore lastquote)) "''") - ((and (> lastquote lastfore) (> lastquote lastback)) "\"") - ((> lastfore lastback) "''") - (t "``"))))))))) - -(defun scribe-parenthesis (count) - "If scribe-electric-parenthesis is non-nil, insertion of an open-parenthesis -character inserts the following close parenthesis character if the -preceding text is of the form @Command." - (interactive "P") - (self-insert-command (prefix-numeric-value count)) - (let (at-command paren-char point-save) - (if (or count (not scribe-electric-parenthesis)) - nil - (save-excursion - (forward-char -1) - (setq point-save (point)) - (skip-chars-backward (concat "^ \n\t\f" scribe-open-parentheses)) - (setq at-command (and (equal (following-char) ?@) - (/= (point) (1- point-save))))) - (if (and at-command - (setq paren-char - (string-match (regexp-quote - (char-to-string (preceding-char))) - scribe-open-parentheses))) - (save-excursion - (insert (aref scribe-close-parentheses paren-char))))))) - -(provide 'scribe) - -;;; scribe.el ends here diff --git a/lisp/obsolete/spell.el b/lisp/obsolete/spell.el deleted file mode 100644 index 03047e9..0000000 --- a/lisp/obsolete/spell.el +++ /dev/null @@ -1,171 +0,0 @@ -;;; spell.el --- spelling correction interface for Emacs - -;; Copyright (C) 1985, 2001-2016 Free Software Foundation, Inc. - -;; Maintainer: emacs-devel@gnu.org -;; Keywords: wp, unix -;; Obsolete-since: 23.1 -;; (not in obsolete/ directory then, but all functions marked obsolete) - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; This mode provides an Emacs interface to the UNIX spell(1) program. -;; Entry points are `spell-buffer', `spell-word', `spell-region' and -;; `spell-string'. - -;; See also ispell.el for an interface to the ispell program. - -;;; Code: - -(defgroup spell nil - "Interface to the UNIX spell(1) program." - :prefix "spell-" - :group 'applications) - -(defcustom spell-command "spell" - "Command to run the spell program." - :type 'string - :group 'spell) - -(defcustom spell-filter nil - "Filter function to process text before passing it to spell program. -This function might remove text-processor commands. -nil means don't alter the text before checking it." - :type '(choice (const nil) function) - :group 'spell) - -;;;###autoload -(put 'spell-filter 'risky-local-variable t) - -;;;###autoload -(defun spell-buffer () - "Check spelling of every word in the buffer. -For each incorrect word, you are asked for the correct spelling -and then put into a query-replace to fix some or all occurrences. -If you do not want to change a word, just give the same word -as its \"correct\" spelling; then the query replace is skipped." - (interactive) - ;; Don't warn about spell-region being obsolete. - (with-no-warnings - (spell-region (point-min) (point-max) "buffer"))) -;;;###autoload -(make-obsolete 'spell-buffer 'ispell-buffer "23.1") - -;;;###autoload -(defun spell-word () - "Check spelling of word at or before point. -If it is not correct, ask user for the correct spelling -and `query-replace' the entire buffer to substitute it." - (interactive) - (let (beg end spell-filter) - (save-excursion - (if (not (looking-at "\\<")) - (forward-word -1)) - (setq beg (point)) - (forward-word 1) - (setq end (point))) - ;; Don't warn about spell-region being obsolete. - (with-no-warnings - (spell-region beg end (buffer-substring beg end))))) -;;;###autoload -(make-obsolete 'spell-word 'ispell-word "23.1") - -;;;###autoload -(defun spell-region (start end &optional description) - "Like `spell-buffer' but applies only to region. -Used in a program, applies from START to END. -DESCRIPTION is an optional string naming the unit being checked: -for example, \"word\"." - (interactive "r") - (let ((filter spell-filter) - (buf (get-buffer-create " *temp*"))) - (with-current-buffer buf - (widen) - (erase-buffer)) - (message "Checking spelling of %s..." (or description "region")) - (if (and (null filter) (= ?\n (char-after (1- end)))) - (if (string= "spell" spell-command) - (call-process-region start end "spell" nil buf) - (call-process-region start end shell-file-name - nil buf nil "-c" spell-command)) - (let ((oldbuf (current-buffer))) - (with-current-buffer buf - (insert-buffer-substring oldbuf start end) - (or (bolp) (insert ?\n)) - (if filter (funcall filter)) - (if (string= "spell" spell-command) - (call-process-region (point-min) (point-max) "spell" t buf) - (call-process-region (point-min) (point-max) shell-file-name - t buf nil "-c" spell-command))))) - (message "Checking spelling of %s...%s" - (or description "region") - (if (with-current-buffer buf - (> (buffer-size) 0)) - "not correct" - "correct")) - (let (word newword - (case-fold-search t) - (case-replace t)) - (while (with-current-buffer buf - (> (buffer-size) 0)) - (with-current-buffer buf - (goto-char (point-min)) - (setq word (downcase - (buffer-substring (point) - (progn (end-of-line) (point))))) - (forward-char 1) - (delete-region (point-min) (point)) - (setq newword - (read-string (concat "`" word - "' not recognized; edit a replacement: ") - word)) - (flush-lines (concat "^" (regexp-quote word) "$"))) - (if (not (equal word newword)) - (progn - (goto-char (point-min)) - (query-replace-regexp (concat "\\b" (regexp-quote word) "\\b") - newword))))))) -;;;###autoload -(make-obsolete 'spell-region 'ispell-region "23.1") - -;;;###autoload -(defun spell-string (string) - "Check spelling of string supplied as argument." - (interactive "sSpell string: ") - (with-temp-buffer - (widen) - (erase-buffer) - (insert string "\n") - (if (string= "spell" spell-command) - (call-process-region (point-min) (point-max) "spell" - t t) - (call-process-region (point-min) (point-max) shell-file-name - t t nil "-c" spell-command)) - (if (= 0 (buffer-size)) - (message "%s is correct" string) - (goto-char (point-min)) - (while (search-forward "\n" nil t) - (replace-match " ")) - (message "%sincorrect" (buffer-substring 1 (point-max)))))) -;;;###autoload -(make-obsolete 'spell-string "The `spell' package is obsolete - use `ispell'." - "23.1") - -(provide 'spell) - -;;; spell.el ends here diff --git a/lisp/obsolete/swedish.el b/lisp/obsolete/swedish.el deleted file mode 100644 index 38dce00..0000000 --- a/lisp/obsolete/swedish.el +++ /dev/null @@ -1,160 +0,0 @@ -;;; swedish.el --- miscellaneous functions for dealing with Swedish - -;; Copyright (C) 1988, 2001-2016 Free Software Foundation, Inc. - -;; Author: Howard Gayle -;; Maintainer: emacs-devel@gnu.org -;; Keywords: i18n -;; Obsolete-since: 22.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Fixme: Is this actually used? if so, it should be in language, -;; possibly as a feature property of Swedish, probably defining a -;; `swascii' coding system. - -;;; Code: - -;; Written by Howard Gayle. See case-table.el for details. - -;; See iso-swed.el for a description of the character set. - -(defvar mail-send-hook) -(defvar news-group-hook-alist) -(defvar news-inews-hook) - -(defvar swedish-re - "[ \t\n]\\(och\\|att\\|en\\|{r\\|\\[R\\|p}\\|P\\]\\|som\\|det\\|av\\|den\\|f|r\\|F\\\\R\\)[ \t\n.,?!:;'\")}]" - "Regular expression for common Swedish words.") - -(defvar swascii-to-8859-trans - (let ((string (make-string 256 ? )) - (i 0)) - (while (< i 256) - (aset string i i) - (setq i (1+ i))) - (aset string ?\[ 196) - (aset string ?\] 197) - (aset string ?\\ 214) - (aset string ?^ 220) - (aset string ?\{ 228) - (aset string ?\} 229) - (aset string ?\` 233) - (aset string ?\| 246) - (aset string ?~ 252) - string) - "Trans table from SWASCII to 8859.") - -; $ is not converted because it almost always means US -; dollars, not general currency sign. @ is not converted -; because it is more likely to be an at sign in a mail address -; than an E with acute accent. - -(defun swascii-to-8859-buffer () - "Convert characters in buffer from Swedish/Finnish-ascii to ISO 8859/1. -Works even on read-only buffers. `$' and `@' are not converted." - (interactive) - (let ((buffer-read-only nil)) - (translate-region (point-min) (point-max) swascii-to-8859-trans))) - -(defun swascii-to-8859-buffer-maybe () - "Call swascii-to-8859-buffer if the buffer looks like Swedish-ascii. -Leaves point just after the word that looks Swedish." - (interactive) - (let ((case-fold-search t)) - (if (re-search-forward swedish-re nil t) - (swascii-to-8859-buffer)))) - -(setq rmail-show-message-hook 'swascii-to-8859-buffer-maybe) - -(setq news-group-hook-alist - (append '(("^swnet." . swascii-to-8859-buffer-maybe)) - (bound-and-true-p news-group-hook-alist))) - -(defvar 8859-to-swascii-trans - (let ((string (make-string 256 ? )) - (i 0)) - (while (< i 256) - (aset string i i) - (setq i (1+ i))) - (aset string 164 ?$) - (aset string 196 ?\[) - (aset string 197 ?\]) - (aset string 201 ?@) - (aset string 214 ?\\) - (aset string 220 ?^) - (aset string 228 ?\{) - (aset string 229 ?\}) - (aset string 233 ?\`) - (aset string 246 ?\|) - (aset string 252 ?~) - string) - "8859 to SWASCII trans table.") - -(defun 8859-to-swascii-buffer () - "Convert characters in buffer from ISO 8859/1 to Swedish/Finnish-ascii." - (interactive "*") - (translate-region (point-min) (point-max) 8859-to-swascii-trans)) - -(setq mail-send-hook '8859-to-swascii-buffer) -(setq news-inews-hook '8859-to-swascii-buffer) - -;; It's not clear what purpose is served by a separate -;; Swedish mode that differs from Text mode only in having -;; a separate abbrev table. Nothing says that the abbrevs you -;; define in Text mode have to be English! - -;(defvar swedish-mode-abbrev-table nil -; "Abbrev table used while in swedish mode.") -;(define-abbrev-table 'swedish-mode-abbrev-table ()) - -;(defun swedish-mode () -; "Major mode for editing Swedish text intended for humans to -;read. Special commands:\\{text-mode-map} -;Turning on swedish-mode calls the value of the variable -;text-mode-hook, if that value is non-nil." -; (interactive) -; (kill-all-local-variables) -; (use-local-map text-mode-map) -; (setq mode-name "Swedish") -; (setq major-mode 'swedish-mode) -; (setq local-abbrev-table swedish-mode-abbrev-table) -; (set-syntax-table text-mode-syntax-table) -; (run-mode-hooks 'text-mode-hook)) - -;(defun indented-swedish-mode () -; "Major mode for editing indented Swedish text intended for -;humans to read.\\{indented-text-mode-map} -;Turning on indented-swedish-mode calls the value of the -;variable text-mode-hook, if that value is non-nil." -; (interactive) -; (kill-all-local-variables) -; (use-local-map text-mode-map) -; (define-abbrev-table 'swedish-mode-abbrev-table ()) -; (setq local-abbrev-table swedish-mode-abbrev-table) -; (set-syntax-table text-mode-syntax-table) -; (make-local-variable 'indent-line-function) -; (setq indent-line-function 'indent-relative-maybe) -; (use-local-map indented-text-mode-map) -; (setq mode-name "Indented Swedish") -; (setq major-mode 'indented-swedish-mode) -; (run-mode-hooks 'text-mode-hook)) - -(provide 'swedish) - -;;; swedish.el ends here diff --git a/lisp/obsolete/sym-comp.el b/lisp/obsolete/sym-comp.el deleted file mode 100644 index c2eab2c..0000000 --- a/lisp/obsolete/sym-comp.el +++ /dev/null @@ -1,237 +0,0 @@ -;;; sym-comp.el --- mode-dependent symbol completion - -;; Copyright (C) 2004, 2008-2016 Free Software Foundation, Inc. - -;; Author: Dave Love -;; Keywords: extensions -;; URL: http://www.loveshack.ukfsn.org/emacs -;; Obsolete-since: 23.2 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; This defines `symbol-complete', which is a generalization of the -;; old `lisp-complete-symbol'. It provides the following hooks to -;; allow major modes to set up completion appropriate for the mode: -;; `symbol-completion-symbol-function', -;; `symbol-completion-completions-function', -;; `symbol-completion-predicate-function', -;; `symbol-completion-transform-function'. Typically it is only -;; necessary for a mode to set -;; `symbol-completion-completions-function' locally and to bind -;; `symbol-complete' appropriately. - -;; It's unfortunate that there doesn't seem to be a good way of -;; combining this with `complete-symbol'. - -;; There is also `symbol-completion-try-complete', for use with -;; Hippie-exp. - -;;; Code: - -;;;; Mode-dependent symbol completion. - -(defun symbol-completion-symbol () - "Default `symbol-completion-symbol-function'. -Uses `current-word' with the buffer narrowed to the part before -point." - (save-restriction - ;; Narrow in case point is in the middle of a symbol -- we want - ;; just the preceding part. - (narrow-to-region (point-min) (point)) - (current-word))) - -(defvar symbol-completion-symbol-function 'symbol-completion-symbol - "Function to return a partial symbol before point for completion. -The value it returns should be a string (or nil). -Major modes may set this locally if the default isn't appropriate. - -Beware: the length of the string STR returned need to be equal to the length -of text before point that's subject to completion. Typically, this amounts -to saying that STR is equal to -\(buffer-substring (- (point) (length STR)) (point)).") - -(defvar symbol-completion-completions-function nil - "Function to return possible symbol completions. -It takes an argument which is the string to be completed and -returns a value suitable for the second argument of -`try-completion'. This value need not use the argument, i.e. it -may be all possible completions, such as `obarray' in the case of -Emacs Lisp. - -Major modes may set this locally to allow them to support -`symbol-complete'. See also `symbol-completion-symbol-function', -`symbol-completion-predicate-function' and -`symbol-completion-transform-function'.") - -(defvar symbol-completion-predicate-function nil - "If non-nil, function to return a predicate for selecting symbol completions. -The function gets two args, the positions of the beginning and -end of the symbol to be completed. - -Major modes may set this locally if the default isn't -appropriate. This is a function returning a predicate so that -the predicate can be context-dependent, e.g. to select only -function names if point is at a function call position. The -function's args may be useful for determining the context.") - -(defvar symbol-completion-transform-function nil - "If non-nil, function to transform symbols in the symbol-completion buffer. -E.g., for Lisp, it may annotate the symbol as being a function, -not a variable. - -The function takes the symbol name as argument. If it needs to -annotate this, it should return a value suitable as an element of -the list passed to `display-completion-list'. - -The predicate being used for selecting completions (from -`symbol-completion-predicate-function') is available -dynamically-bound as `symbol-completion-predicate' in case the -transform needs it.") - -(defvar symbol-completion-predicate) - -;;;###autoload -(defun symbol-complete (&optional predicate) - "Perform completion of the symbol preceding point. -This is done in a way appropriate to the current major mode, -perhaps by interrogating an inferior interpreter. Compare -`complete-symbol'. -If no characters can be completed, display a list of possible completions. -Repeating the command at that point scrolls the list. - -When called from a program, optional arg PREDICATE is a predicate -determining which symbols are considered. - -This function requires `symbol-completion-completions-function' -to be set buffer-locally. Variables `symbol-completion-symbol-function', -`symbol-completion-predicate-function' and -`symbol-completion-transform-function' are also consulted." - (interactive) - ;; Fixme: Punt to `complete-symbol' in this case? - (unless (functionp symbol-completion-completions-function) - (error "symbol-completion-completions-function not defined")) - (let* ((pattern (or (funcall symbol-completion-symbol-function) - (error "No preceding symbol to complete"))) - ;; FIXME: We assume below that `pattern' holds the text just - ;; before point. This is a problem in the way - ;; symbol-completion-symbol-function was defined. - (predicate (or predicate - (if symbol-completion-predicate-function - (funcall symbol-completion-predicate-function - (- (point) (length pattern)) - (point))))) - (completions (funcall symbol-completion-completions-function - pattern)) - ;; In case the transform needs to access it. - (symbol-completion-predicate predicate) - (completion-extra-properties - (if (functionp symbol-completion-transform-function) - '(:annotation-function - (lambda (str) - (car-safe (cdr-safe - (funcall symbol-completion-transform-function - str)))))))) - (completion-in-region (- (point) (length pattern)) (point) - completions predicate))) - -(defvar he-search-string) -(defvar he-tried-table) -(defvar he-expand-list) -(declare-function he-init-string "hippie-exp" (beg end)) -(declare-function he-string-member "hippie-exp" (str lst &optional trans-case)) -(declare-function he-substitute-string "hippie-exp" (str &optional trans-case)) -(declare-function he-reset-string "hippie-exp" ()) - -;;;###autoload -(defun symbol-completion-try-complete (old) - "Completion function for use with `hippie-expand'. -Uses `symbol-completion-symbol-function' and -`symbol-completion-completions-function'. It is intended to be -used something like this in a major mode which provides symbol -completion: - - (if (featurep \\='hippie-exp) - (set (make-local-variable \\='hippie-expand-try-functions-list) - (cons \\='symbol-completion-try-complete - hippie-expand-try-functions-list)))" - (when (and symbol-completion-symbol-function - symbol-completion-completions-function) - (unless old - (let ((symbol (funcall symbol-completion-symbol-function))) - (he-init-string (- (point) (length symbol)) (point)) - (if (not (he-string-member he-search-string he-tried-table)) - (push he-search-string he-tried-table)) - (setq he-expand-list - (and symbol - (funcall symbol-completion-completions-function symbol))))) - (while (and he-expand-list - (he-string-member (car he-expand-list) he-tried-table)) - (pop he-expand-list)) - (if he-expand-list - (progn - (he-substitute-string (pop he-expand-list)) - t) - (if old (he-reset-string)) - nil))) - -;;; Emacs Lisp symbol completion. - -(defun lisp-completion-symbol () - "`symbol-completion-symbol-function' for Lisp." - (let ((end (point)) - (beg (with-syntax-table emacs-lisp-mode-syntax-table - (save-excursion - (backward-sexp 1) - (while (= (char-syntax (following-char)) ?\') - (forward-char 1)) - (point))))) - (buffer-substring-no-properties beg end))) - -(defun lisp-completion-predicate (beg end) - "`symbol-completion-predicate-function' for Lisp." - (save-excursion - (goto-char beg) - (if (not (eq (char-before) ?\()) - (lambda (sym) ;why not just nil ? -sm - ;To avoid interned symbols with - ;no slots. -- fx - (or (boundp sym) (fboundp sym) - (symbol-plist sym))) - ;; Looks like a funcall position. Let's double check. - (if (condition-case nil - (progn (up-list -2) (forward-char 1) - (eq (char-after) ?\()) - (error nil)) - ;; If the first element of the parent list is an open - ;; parenthesis we are probably not in a funcall position. - ;; Maybe a `let' varlist or something. - nil - ;; Else, we assume that a function name is expected. - 'fboundp)))) - -(defun lisp-symbol-completion-transform () - "`symbol-completion-transform-function' for Lisp." - (lambda (elt) - (if (and (not (eq 'fboundp symbol-completion-predicate)) - (fboundp (intern elt))) - (list elt " ") - elt))) - -(provide 'sym-comp) - -;;; sym-comp.el ends here diff --git a/lisp/obsolete/vc-mcvs.el b/lisp/obsolete/vc-mcvs.el deleted file mode 100644 index 4214e4d..0000000 --- a/lisp/obsolete/vc-mcvs.el +++ /dev/null @@ -1,593 +0,0 @@ -;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system - -;; Copyright (C) 2003-2016 Free Software Foundation, Inc. - -;; Author: FSF (see vc.el for full credits) -;; Maintainer: None -;; Obsolete-since: 23.1 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; ********** READ THIS! ********** -;; -;; This file apparently does not work with the new (as of Emacs 23) -;; VC code. Use at your own risk. Please contact emacs-devel if you -;; can maintain this file and update it to work correctly. -;; -;; ********** READ THIS! ********** - -;; The home page of the Meta-CVS version control system is at -;; -;; http://users.footprints.net/~kaz/mcvs.html -;; -;; This is derived from vc-cvs.el as follows: -;; - cp vc-cvs.el vc-mcvs.el -;; - Replace CVS/ with MCVS/CVS/ -;; - Replace 'CVS with 'MCVS -;; - Replace -cvs- with -mcvs- -;; - Replace most of the rest of CVS to Meta-CVS -;; -;; Then of course started the hacking. Only a small part of the code -;; has been touched and not much more than that was tested, so if -;; you bump into a bug, don't be surprised: just report it to me. -;; -;; What has been partly tested: -;; - C-x v v to start editing a file that was checked out with CVSREAD on. -;; - C-x v v to commit a file -;; - C-x v = -;; - C-x v l -;; - C-x v i -;; - C-x v g -;; - M-x vc-rename-file RET - -;;; Bugs: - -;; - Retrieving tags doesn't filter `cvs update' output and thus -;; parses bogus filenames. Don't know if it harms. - -;;; Code: - -(eval-when-compile (require 'vc)) -(require 'vc-cvs) - -;;; -;;; Customization options -;;; - -(defcustom vc-mcvs-global-switches nil - "Global switches to pass to any Meta-CVS command." - :type '(choice (const :tag "None" nil) - (string :tag "Argument String") - (repeat :tag "Argument List" :value ("") string)) - :version "22.1" - :group 'vc) - -(defcustom vc-mcvs-register-switches nil - "Switches for registering a file into Meta-CVS. -A string or list of strings passed to the checkin program by -\\[vc-register]. If nil, use the value of `vc-register-switches'. -If t, use no switches." - :type '(choice (const :tag "Unspecified" nil) - (const :tag "None" t) - (string :tag "Argument String") - (repeat :tag "Argument List" :value ("") string)) - :version "22.1" - :group 'vc) - -(defcustom vc-mcvs-diff-switches nil - "String or list of strings specifying switches for Meta-CVS diff under VC. -If nil, use the value of `vc-diff-switches'. If t, use no switches." - :type '(choice (const :tag "Unspecified" nil) - (const :tag "None" t) - (string :tag "Argument String") - (repeat :tag "Argument List" :value ("") string)) - :version "22.1" - :group 'vc) - -(defcustom vc-mcvs-header vc-cvs-header - "Header keywords to be inserted by `vc-insert-headers'." - :version "24.1" ; no longer consult the obsolete vc-header-alist - :type '(repeat string) - :group 'vc) - -(defcustom vc-mcvs-use-edit vc-cvs-use-edit - "Non-nil means to use `cvs edit' to \"check out\" a file. -This is only meaningful if you don't use the implicit checkout model -\(i.e. if you have $CVSREAD set)." - :type 'boolean - :version "22.1" - :group 'vc) - -;;; Properties of the backend - -(defalias 'vc-mcvs-revision-granularity 'vc-cvs-revision-granularity) -(defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model) - -;;; -;;; State-querying functions -;;; - -;;;###autoload (defun vc-mcvs-registered (file) -;;;###autoload (if (vc-find-root file "MCVS/CVS") -;;;###autoload (progn -;;;###autoload (load "vc-mcvs") -;;;###autoload (vc-mcvs-registered file)))) - -(defun vc-mcvs-root (file) - "Return the root directory of a Meta-CVS project, if any." - (or (vc-file-getprop file 'mcvs-root) - (vc-file-setprop file 'mcvs-root (vc-find-root file "MCVS/CVS")))) - -(defun vc-mcvs-read (file) - (if (file-readable-p file) - (with-temp-buffer - (insert-file-contents file) - (goto-char (point-min)) - (read (current-buffer))))) - -(defun vc-mcvs-map-file (dir file) - (let ((map (vc-mcvs-read (expand-file-name "MCVS/MAP" dir))) - inode) - (dolist (x map inode) - (if (equal (nth 2 x) file) (setq inode (nth 1 x)))))) - -(defun vc-mcvs-registered (file) - (let (root inode cvsfile) - (when (and (setq root (vc-mcvs-root file)) - (setq inode (vc-mcvs-map-file - root (file-relative-name file root)))) - (vc-file-setprop file 'mcvs-inode inode) - ;; Avoid calling `mcvs diff' in vc-workfile-unchanged-p. - (vc-file-setprop file 'vc-checkout-time - (if (vc-cvs-registered - (setq cvsfile (expand-file-name inode root))) - (vc-file-getprop cvsfile 'vc-checkout-time) - ;; The file might not be registered yet because - ;; of lazy-adding. - 0)) - t))) - -(defun vc-mcvs-state (file) - ;; This would assume the Meta-CVS sandbox is synchronized. - ;; (vc-mcvs-cvs state file)) - "Meta-CVS-specific version of `vc-state'." - (if (vc-stay-local-p file) - (let ((state (vc-file-getprop file 'vc-state))) - ;; If we should stay local, use the heuristic but only if - ;; we don't have a more precise state already available. - (if (memq state '(up-to-date edited)) - (vc-mcvs-state-heuristic file) - state)) - (with-temp-buffer - (setq default-directory (vc-mcvs-root file)) - (vc-mcvs-command t 0 file "status") - (vc-cvs-parse-status t)))) - - -(defalias 'vc-mcvs-state-heuristic 'vc-cvs-state-heuristic) - -(defun vc-mcvs-working-revision (file) - (vc-cvs-working-revision - (expand-file-name (vc-file-getprop file 'mcvs-inode) - (vc-file-getprop file 'mcvs-root)))) - -;;; -;;; State-changing functions -;;; -(autoload 'vc-checkout "vc") -(autoload 'vc-switches "vc") - -(defun vc-mcvs-register (files &optional rev comment) - "Register FILES into the Meta-CVS version-control system. -COMMENT can be used to provide an initial description of FILE. -Passes either `vc-mcvs-register-switches' or `vc-register-switches' -to the Meta-CVS command." - ;; FIXME: multiple-file case should be made to work. - (if (> (length files) 1) (error "Registering filesets is not yet supported")) - (let* ((file (car files)) - (filename (file-name-nondirectory file)) - (extpos (string-match "\\." filename)) - (ext (if extpos (substring filename (1+ extpos)))) - (root (vc-mcvs-root file)) - (types-file (expand-file-name "MCVS/TYPES" root)) - (map-file (expand-file-name "MCVS/MAP" root)) - (types (vc-mcvs-read types-file))) - ;; Make sure meta files like MCVS/MAP are not read-only (happens with - ;; CVSREAD) since Meta-CVS doesn't pay attention to it at all and goes - ;; belly-up. - (unless (file-writable-p map-file) - (vc-checkout map-file t)) - (unless (or (file-writable-p types-file) (not (file-exists-p types-file))) - (vc-checkout types-file t)) - ;; Make sure the `mcvs add' will not fire up the CVSEDITOR - ;; to add a rule for the given file's extension. - (when (and ext (not (assoc ext types))) - (let ((type (completing-read "Type to use (default): " - '("default" "name-only" "keep-old" - "binary" "value-only") - nil t nil nil "default"))) - (push (list ext (make-symbol (upcase (concat ":" type)))) types) - (setq types (sort types (lambda (x y) (string< (car x) (car y))))) - (with-current-buffer (find-file-noselect types-file) - (erase-buffer) - (pp types (current-buffer)) - (save-buffer) - (unless (get-buffer-window (current-buffer) t) - (kill-buffer (current-buffer)))))) - ;; Now do the ADD. - (prog1 (apply 'vc-mcvs-command nil 0 file - "add" - (and comment (string-match "[^\t\n ]" comment) - (concat "-m" comment)) - (vc-switches 'MCVS 'register)) - ;; I'm not sure exactly why, but if we don't setup the inode and root - ;; prop of the file, things break later on in vc-mode-line that - ;; ends up calling vc-mcvs-working-revision. - ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p - ;; doesn't try to call `mcvs diff' on the file. - (vc-mcvs-registered file)))) - -(defalias 'vc-mcvs-responsible-p 'vc-mcvs-root - "Return non-nil if CVS thinks it is responsible for FILE.") - -(defalias 'vc-cvs-could-register 'vc-cvs-responsible-p - "Return non-nil if FILE could be registered in Meta-CVS. -This is only possible if Meta-CVS is responsible for FILE's directory.") - -(defun vc-mcvs-checkin (files rev comment) - "Meta-CVS-specific version of `vc-backend-checkin'." - (unless (or (not rev) (vc-mcvs-valid-revision-number-p rev)) - (if (not (vc-mcvs-valid-symbolic-tag-name-p rev)) - (error "%s is not a valid symbolic tag name" rev) - ;; If the input revision is a valid symbolic tag name, we create it - ;; as a branch, commit and switch to it. - ;; This file-specific form of branching is deprecated. - ;; We can't use `mcvs branch' and `mcvs switch' because they cannot - ;; be applied just to this one file. - (apply 'vc-mcvs-command nil 0 files "tag" "-b" (list rev)) - (apply 'vc-mcvs-command nil 0 files "update" "-r" (list rev)) - (mapc (lambda (file) (vc-file-setprop file 'vc-mcvs-sticky-tag rev)) - files) - (setq rev nil))) - ;; This commit might cvs-commit several files (e.g. MAP and TYPES) - ;; so using numbered revs here is dangerous and somewhat meaningless. - (when rev (error "Cannot commit to a specific revision number")) - (let ((status (apply 'vc-mcvs-command nil 1 files - "ci" "-m" comment - (vc-switches 'MCVS 'checkin)))) - (set-buffer "*vc*") - (goto-char (point-min)) - (when (not (zerop status)) - ;; Check checkin problem. - (cond - ((re-search-forward "Up-to-date check failed" nil t) - (mapc (lambda (file) (vc-file-setprop file 'vc-state 'needs-merge)) - files) - (error "%s" (substitute-command-keys - (concat "Up-to-date check failed: " - "type \\[vc-next-action] to merge in changes")))) - (t - (pop-to-buffer (current-buffer)) - (goto-char (point-min)) - (shrink-window-if-larger-than-buffer) - (error "Check-in failed")))) - ;; Single-file commit? Then update the revision by parsing the buffer. - ;; Otherwise we can't necessarily tell what goes with what; clear - ;; its properties so they have to be refetched. - (if (= (length files) 1) - (vc-file-setprop - (car files) 'vc-working-revision - (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) - (mapc (lambda (file) (vc-file-clearprops file)) files)) - ;; Anyway, forget the checkout model of the file, because we might have - ;; guessed wrong when we found the file. After commit, we can - ;; tell it from the permissions of the file (see - ;; vc-mcvs-checkout-model). - (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) - files) - - ;; if this was an explicit check-in (does not include creation of - ;; a branch), remove the sticky tag. - (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev))) - (vc-mcvs-command nil 0 files "update" "-A")))) - -(defun vc-mcvs-find-revision (file rev buffer) - (apply 'vc-mcvs-command - buffer 0 file - "-Q" ; suppress diagnostic output - "update" - (and rev (not (string= rev "")) - (concat "-r" rev)) - "-p" - (vc-switches 'MCVS 'checkout))) - -(defun vc-mcvs-checkout (file &optional editable rev) - (message "Checking out %s..." file) - (with-current-buffer (or (get-file-buffer file) (current-buffer)) - (vc-mcvs-update file editable rev (vc-switches 'MCVS 'checkout))) - (vc-mode-line file) - (message "Checking out %s...done" file)) - -(defun vc-mcvs-update (file editable rev switches) - (if (and (file-exists-p file) (not rev)) - ;; If no revision was specified, just make the file writable - ;; if necessary (using `cvs-edit' if requested). - (and editable (not (eq (vc-mcvs-checkout-model (list file)) 'implicit)) - (if vc-mcvs-use-edit - (vc-mcvs-command nil 0 file "edit") - (set-file-modes file (logior (file-modes file) 128)) - (if (equal file buffer-file-name) (read-only-mode -1)))) - ;; Check out a particular revision (or recreate the file). - (vc-file-setprop file 'vc-working-revision nil) - (apply 'vc-mcvs-command nil 0 file - (if editable "-w") - "update" - ;; default for verbose checkout: clear the sticky tag so - ;; that the actual update will get the head of the trunk - (if (or (not rev) (string= rev "")) - "-A" - (concat "-r" rev)) - switches))) - -(defun vc-mcvs-rename-file (old new) - (vc-mcvs-command nil 0 new "move" (file-relative-name old))) - -(autoload 'vc-default-revert "vc") - -(defun vc-mcvs-revert (file &optional contents-done) - "Revert FILE to the working revision it was based on." - (vc-default-revert 'MCVS file contents-done) - (unless (eq (vc-mcvs-checkout-model (list file)) 'implicit) - (if vc-mcvs-use-edit - (vc-mcvs-command nil 0 file "unedit") - ;; Make the file read-only by switching off all w-bits - (set-file-modes file (logand (file-modes file) 3950))))) - -(defun vc-mcvs-merge (file first-revision &optional second-revision) - "Merge changes into current working copy of FILE. -The changes are between FIRST-REVISION and SECOND-REVISION." - (vc-mcvs-command nil 0 file - "update" "-kk" - (concat "-j" first-revision) - (concat "-j" second-revision)) - (vc-file-setprop file 'vc-state 'edited) - (with-current-buffer (get-buffer "*vc*") - (goto-char (point-min)) - (if (re-search-forward "conflicts during merge" nil t) - 1 ; signal error - 0))) ; signal success - -(defun vc-mcvs-merge-news (file) - "Merge in any new changes made to FILE." - (message "Merging changes into %s..." file) - ;; (vc-file-setprop file 'vc-working-revision nil) - (vc-file-setprop file 'vc-checkout-time 0) - (vc-mcvs-command nil 0 file "update") - ;; Analyze the merge result reported by Meta-CVS, and set - ;; file properties accordingly. - (with-current-buffer (get-buffer "*vc*") - (goto-char (point-min)) - ;; get new working revision - (if (re-search-forward - "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) - (vc-file-setprop file 'vc-working-revision (match-string 1)) - (vc-file-setprop file 'vc-working-revision nil)) - ;; get file status - (prog1 - (if (eq (buffer-size) 0) - 0 ;; there were no news; indicate success - (if (re-search-forward - (concat "^\\([CMUP] \\)?" - ".*" - "\\( already contains the differences between \\)?") - nil t) - (cond - ;; Merge successful, we are in sync with repository now - ((or (match-string 2) - (string= (match-string 1) "U ") - (string= (match-string 1) "P ")) - (vc-file-setprop file 'vc-state 'up-to-date) - (vc-file-setprop file 'vc-checkout-time - (nth 5 (file-attributes file))) - 0);; indicate success to the caller - ;; Merge successful, but our own changes are still in the file - ((string= (match-string 1) "M ") - (vc-file-setprop file 'vc-state 'edited) - 0);; indicate success to the caller - ;; Conflicts detected! - (t - (vc-file-setprop file 'vc-state 'edited) - 1);; signal the error to the caller - ) - (pop-to-buffer "*vc*") - (error "Couldn't analyze mcvs update result"))) - (message "Merging changes into %s...done" file)))) - -(defun vc-mcvs-modify-change-comment (files rev comment) - "Modify the change comments for FILES on a specified REV. -Will fail unless you have administrative privileges on the repo." - (vc-mcvs-command nil 0 files "rcs" (concat "-m" comment ":" rev))) - - -;;; -;;; History functions -;;; - -(defun vc-mcvs-print-log (files &optional buffer) - "Get change log associated with FILES." - (let ((default-directory (vc-mcvs-root (car files)))) - ;; Run the command from the root dir so that `mcvs filt' returns - ;; valid relative names. - (vc-mcvs-command - buffer - (if (vc-stay-local-p files) 'async 0) - files "log"))) - -(defun vc-mcvs-diff (files &optional oldvers newvers buffer) - "Get a difference report using Meta-CVS between two revisions of FILES." - (let* ((async (and (not vc-disable-async-diff) - (vc-stay-local-p files))) - ;; Run the command from the root dir so that `mcvs filt' returns - ;; valid relative names. - (default-directory (vc-mcvs-root (car files))) - (status - (apply 'vc-mcvs-command (or buffer "*vc-diff*") - (if async 'async 1) - files "diff" - (and oldvers (concat "-r" oldvers)) - (and newvers (concat "-r" newvers)) - (vc-switches 'MCVS 'diff)))) - (if async 1 status))) ; async diff, pessimistic assumption. - -(defun vc-mcvs-annotate-command (file buffer &optional revision) - "Execute \"mcvs annotate\" on FILE, inserting the contents in BUFFER. -Optional arg REVISION is a revision to annotate from." - (vc-mcvs-command - buffer - (if (vc-stay-local-p file) 'async 0) - file "annotate" (if revision (concat "-r" revision))) - (with-current-buffer buffer - (goto-char (point-min)) - (re-search-forward "^[0-9]") - (delete-region (point-min) (1- (point))))) - -(defalias 'vc-mcvs-annotate-current-time 'vc-cvs-annotate-current-time) -(defalias 'vc-mcvs-annotate-time 'vc-cvs-annotate-time) - -;;; -;;; Tag system -;;; - -(defun vc-mcvs-create-tag (dir name branchp) - "Assign to DIR's current revision a given NAME. -If BRANCHP is non-nil, the name is created as a branch (and the current -workspace is immediately moved to that new branch)." - (if (not branchp) - (vc-mcvs-command nil 0 dir "tag" "-c" name) - (vc-mcvs-command nil 0 dir "branch" name) - (vc-mcvs-command nil 0 dir "switch" name))) - -;; vc-mcvs-command calls the autoloaded vc-do-command from vc-dispatcher. -(declare-function vc-resynch-buffer "vc-dispatcher" - (file &optional keep noquery reset-vc-info)) - -(defun vc-mcvs-retrieve-tag (dir name update) - "Retrieve a tag at and below DIR. -NAME is the name of the tag; if it is empty, do a `cvs update'. -If UPDATE is non-nil, then update (resynch) any affected buffers." - (with-current-buffer (get-buffer-create "*vc*") - (let ((default-directory dir) - (sticky-tag)) - (erase-buffer) - (if (or (not name) (string= name "")) - (vc-mcvs-command t 0 nil "update") - (vc-mcvs-command t 0 nil "update" "-r" name) - (setq sticky-tag name)) - (when update - (goto-char (point-min)) - (while (not (eobp)) - (if (looking-at "\\([CMUP]\\) \\(.*\\)") - (let* ((file (expand-file-name (match-string 2) dir)) - (state (match-string 1)) - (buffer (find-buffer-visiting file))) - (when buffer - (cond - ((or (string= state "U") - (string= state "P")) - (vc-file-setprop file 'vc-state 'up-to-date) - (vc-file-setprop file 'vc-working-revision nil) - (vc-file-setprop file 'vc-checkout-time - (nth 5 (file-attributes file)))) - ((or (string= state "M") - (string= state "C")) - (vc-file-setprop file 'vc-state 'edited) - (vc-file-setprop file 'vc-working-revision nil) - (vc-file-setprop file 'vc-checkout-time 0))) - (vc-file-setprop file 'vc-mcvs-sticky-tag sticky-tag) - (vc-resynch-buffer file t t)))) - (forward-line 1)))))) - - -;;; -;;; Miscellaneous -;;; - -(defalias 'vc-mcvs-make-version-backups-p 'vc-stay-local-p - "Return non-nil if version backups should be made for FILE.") -(defalias 'vc-mcvs-check-headers 'vc-cvs-check-headers) - - -;;; -;;; Internal functions -;;; - -(defun vc-mcvs-command (buffer okstatus file &rest flags) - "A wrapper around `vc-do-command' for use in vc-mcvs.el. -The difference to vc-do-command is that this function always invokes `mcvs', -and that it passes `vc-mcvs-global-switches' to it before FLAGS." - (let ((args (append '("--error-terminate") - (if (stringp vc-mcvs-global-switches) - (cons vc-mcvs-global-switches flags) - (append vc-mcvs-global-switches flags))))) - (if (not (member (car flags) '("diff" "log" "status"))) - ;; No need to filter: do it the easy way. - (apply 'vc-do-command (or buffer "*vc*") okstatus "mcvs" file args) - ;; We need to filter the output. - ;; The output of the filter uses filenames relative to the root, - ;; so we need to change the default-directory. - ;; (assert (equal default-directory (vc-mcvs-root file))) - (vc-do-command - (or buffer "*vc*") okstatus "sh" nil "-c" - (concat "mcvs " - (mapconcat - 'shell-quote-argument - (append (remq nil args) - (if file (list (file-relative-name file)))) - " ") - " | mcvs filt"))))) - -(defun vc-mcvs-repository-hostname (dirname) - (vc-cvs-repository-hostname (vc-mcvs-root dirname))) - -(defun vc-mcvs-dir-state-heuristic (dir) - "Find the Meta-CVS state of all files in DIR, using only local information." - (with-temp-buffer - (vc-cvs-get-entries dir) - (goto-char (point-min)) - (while (not (eobp)) - ;; Meta-MCVS-removed files are not taken under VC control. - (when (looking-at "/\\([^/]*\\)/[^/-]") - (let ((file (expand-file-name (match-string 1) dir))) - (unless (vc-file-getprop file 'vc-state) - (vc-cvs-parse-entry file t)))) - (forward-line 1)))) - -(defalias 'vc-mcvs-valid-symbolic-tag-name-p 'vc-cvs-valid-symbolic-tag-name-p) -(defalias 'vc-mcvs-valid-revision-number-p 'vc-cvs-valid-revision-number-p) - -(provide 'vc-mcvs) - -;; ********** READ THIS! ********** -;; -;; This file apparently does not work with the new (as of Emacs 23) -;; VC code. Use at your own risk. Please contact emacs-devel if you -;; can maintain this file and update it to work correctly. -;; -;; ********** READ THIS! ********** - -;;; vc-mcvs.el ends here commit 3311f4080b5210900e582a2836d30d5ed101f3f0 Author: Lars Ingebrigtsen Date: Thu Feb 4 16:10:49 2016 +1100 Fix bookmark display widths * lisp/net/eww.el (eww-list-bookmarks): Pop to the buffer before preparing it so that the widths are computed correctly (bug#22328). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 6872be4..a96241d 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1542,8 +1542,8 @@ If CHARSET is nil then use UTF-8." (defun eww-list-bookmarks () "Display the bookmarks." (interactive) - (eww-bookmark-prepare) - (pop-to-buffer "*eww bookmarks*")) + (pop-to-buffer "*eww bookmarks*") + (eww-bookmark-prepare)) (defun eww-bookmark-prepare () (eww-read-bookmarks) commit d90ab1e2215cd7afbc1957a4928b3a35931cd425 Author: Lars Ingebrigtsen Date: Thu Feb 4 16:05:05 2016 +1100 Fix typo in eww-make-unique-file-name * lisp/net/eww.el (eww-make-unique-file-name): Make this function actually work. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7cb324e..6872be4 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1469,21 +1469,21 @@ Differences in #targets are ignored." string))) (defun eww-make-unique-file-name (file directory) - (cond - ((zerop (length file)) - (setq file "!")) - ((string-match "\\`[.]" file) - (setq file (concat "!" file)))) - (let ((count 1) - (stem file) - (suffix "")) - (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) - (setq stem (match-string 1) - suffix (match-string 2))) - (while (file-exists-p (expand-file-name file directory)) - (setq file (format "%s(%d)%s" stem count suffix)) - (setq count (1+ count))) - (expand-file-name file directory))) + (cond + ((zerop (length file)) + (setq file "!")) + ((string-match "\\`[.]" file) + (setq file (concat "!" file)))) + (let ((count 1) + (stem file) + (suffix "")) + (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) + (setq stem (match-string 1 file) + suffix (match-string 2))) + (while (file-exists-p (expand-file-name file directory)) + (setq file (format "%s(%d)%s" stem count suffix)) + (setq count (1+ count))) + (expand-file-name file directory))) (defun eww-set-character-encoding (charset) "Set character encoding to CHARSET. commit 7f818250739d9b7404dbe79326e1bf89fce0fd13 Author: Lars Ingebrigtsen Date: Thu Feb 4 15:42:08 2016 +1100 Make it possible to TAB to input fields * lisp/net/eww.el (eww-tag-input): Make it possible to TAB to input fields (bug#22540). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index f8d7c75..7cb324e 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1136,7 +1136,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (t (eww-form-text dom))) (unless (= start (point)) - (put-text-property start (1+ start) 'help-echo "Input field")))) + (put-text-property start (1+ start) 'help-echo "Input field") + ;; Mark this as an element we can TAB to. + (put-text-property start (1+ start) 'shr-url dom)))) (defun eww-tag-select (dom) (shr-ensure-paragraph) commit a43a1dcc3d4a2e1eeecac43017a21779fb1557b3 Author: Lars Ingebrigtsen Date: Thu Feb 4 15:35:20 2016 +1100 Insert complete alt texts when images are disabled * lisp/net/shr.el (shr-tag-img): When images are disabled, insert the complete alt/title string (bug#22293). diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c600c74..611f0a9 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1409,9 +1409,7 @@ The preference is a float determined from `shr-prefer-media-type'." (and shr-blocked-images (string-match shr-blocked-images url))) (setq shr-start (point)) - (if (> (string-width alt) 8) - (shr-insert (truncate-string-to-width alt 8)) - (shr-insert alt))) + (shr-insert alt)) ((and (not shr-ignore-cache) (url-is-cached (shr-encode-url url))) (funcall shr-put-image-function (shr-get-image-data url) alt)) commit 56ed4e188603180aa8c9f1272da0954a80875c5c Author: Lars Ingebrigtsen Date: Thu Feb 4 15:28:57 2016 +1100 Allow eww text fields to grow * lisp/net/eww.el (eww-process-text-input): Allow text fields to grow when typing in stuff that's longer than the original width. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index af6e0af..f8d7c75 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1046,7 +1046,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (1- (line-end-position)) (eww-end-of-field))) (while (and (> length 0) - (eql (following-char) ? )) + (eql (char-after (1- (point))) ? )) (delete-region (1- (point)) (point)) (cl-decf length)))) ((< length 0) commit 66b315c9c94c871de2c70b92ac69ef86f19d8a2f Author: Dima Kogan Date: Thu Feb 4 14:24:18 2016 +1100 Make erc work when subword-mode is switched on * lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p) (erc-bounds-of-word-at-point): New functions to do word-based things when subword-mode is switched on. * lisp/erc/erc-button.el (erc-button-add-nickname-buttons): Use them (bug#17558). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 694f66e..6d508e2 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -474,13 +474,39 @@ Currently this is called by `erc-send-input'." nil t)) (split-string (buffer-string) "\n")))) +(defun erc-forward-word () + "Moves forward one word, ignoring any subword settings. If no +subword-mode is active, then this is (forward-word)." + (skip-syntax-forward "^w") + (> (skip-syntax-forward "w") 0)) + +(defun erc-word-at-arg-p (pos) + "Reports whether the char after a given POS has word syntax. +If POS is out of range, the value is nil." + (let ((c (char-after pos))) + (if c + (eq ?w (char-syntax c)) + nil))) + +(defun erc-bounds-of-word-at-point () + "Returns the bounds of a word at point, or nil if we're not at +a word. If no subword-mode is active, then this +is (bounds-of-thing-at-point 'word)." + (if (or (erc-word-at-arg-p (point)) + (erc-word-at-arg-p (1- (point)))) + (save-excursion + (let* ((start (progn (skip-syntax-backward "w") (point))) + (end (progn (skip-syntax-forward "w") (point)))) + (cons start end))) + nil)) + ;; Used by CTCP functions (defun erc-upcase-first-word (str) "Upcase the first word in STR." (with-temp-buffer (insert str) (goto-char (point-min)) - (upcase-word 1) + (upcase-region (point) (progn (erc-forward-word) (point))) (buffer-string))) (defun erc-server-setup-periodical-ping (buffer) diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index e1ccea9..7d50919 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -300,14 +300,14 @@ specified by `erc-button-alist'." (when (or (eq t form) (eval form)) (goto-char (point-min)) - (while (forward-word 1) - (setq bounds (bounds-of-thing-at-point 'word)) - (setq word (buffer-substring-no-properties - (car bounds) (cdr bounds))) - (when (or (and (erc-server-buffer-p) (erc-get-server-user word)) - (and erc-channel-users (erc-get-channel-user word))) - (erc-button-add-button (car bounds) (cdr bounds) - fun t (list word))))))) + (while (erc-forward-word) + (when (setq bounds (erc-bounds-of-word-at-point)) + (setq word (buffer-substring-no-properties + (car bounds) (cdr bounds))) + (when (or (and (erc-server-buffer-p) (erc-get-server-user word)) + (and erc-channel-users (erc-get-channel-user word))) + (erc-button-add-button (car bounds) (cdr bounds) + fun t (list word)))))))) (defun erc-button-add-buttons-1 (regexp entry) "Search through the buffer for matches to ENTRY and add buttons." commit 255b68f00ba74dbe2f6014b38cf17c8390be6561 Author: Teemu Likonen Date: Thu Feb 4 14:09:06 2016 +1100 Fix IMAP doc example * doc/misc/gnus.texi (Client-Side IMAP Splitting): Fix example. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index ab96684..8dd0c1b 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -14325,7 +14325,7 @@ Here's a complete example @code{nnimap} backend with a client-side @example (nnimap "imap.example.com" (nnimap-inbox "INBOX") - (nnimap-split-methods + (nnimap-split-fancy (| ("MailScanner-SpamCheck" "spam" "spam.detected") (to "foo@@bar.com" "foo") "undecided"))) commit 91557f5e2decb723544a703d01f11879be07fd04 Author: Paul Eggert Date: Wed Feb 3 17:13:04 2016 -0800 Quoting fixes in doc strings and diagnostics * lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall): * lisp/gnus/mml-smime.el (mml-smime-get-dns-cert) (mml-smime-get-ldap-cert): Follow user style preference when quoting diagnostics. diff --git a/CONTRIBUTE b/CONTRIBUTE index 3ccaff3..f1f3a3f 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -252,7 +252,7 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info for more information on writing and running tests. If your test lasts longer than some few seconds, mark it in its -`ert-deftest' definition with ":tags '(:expensive-test)". +'ert-deftest' definition with ":tags '(:expensive-test)". To run tests on the entire Emacs tree, run "make check" from the top-level directory. Most tests are in the directory diff --git a/admin/release-process b/admin/release-process index 5a95fa2..2f23dac 100644 --- a/admin/release-process +++ b/admin/release-process @@ -7,7 +7,7 @@ Each release cycle will be split into two periods. ** Phase one: development The first phase of the release schedule is the "heads-down" working -period for new features, on the `master' branch and several feature +period for new features, on the 'master' branch and several feature branches. ** Phase two: fixing and stabilizing the release branch @@ -23,11 +23,11 @@ new features. At the beginning of this phase, a release branch called "emacs-NN" ("NN" represents the major version number of the new Emacs release) -will be cut from `master'. When that happens, the version number on -`master' should be incremented; use admin/admin.el's `set-version' +will be cut from 'master'. When that happens, the version number on +'master' should be incremented; use admin/admin.el's 'set-version' command to do that, then commit the changes it made and push to -`master'. For major releases, also update the value of -`customize-changed-options-previous-release'. +'master'. For major releases, also update the value of +'customize-changed-options-previous-release'. The 2 main manuals, the User Manual and the Emacs Lisp Manual, need to be proofread, preferably by at least 2 different persons, and any @@ -35,7 +35,7 @@ uncovered problems fixed. This is a lot of work, so it is advisable to divide the job between several people (see the checklist near the end of this file). -In parallel to this phase, `master' can receive new features, to be +In parallel to this phase, 'master' can receive new features, to be released in the next release cycle. From time to time, the master branches merges bugfix commits from the "emacs-NN" branch. @@ -55,7 +55,7 @@ Change "block" to "unblock" to unblock the bug. * TO BE DONE SHORTLY BEFORE RELEASE ** Make sure the Copyright date reflects the current year in the source -files. See `admin/notes/years' for information about maintaining +files. See 'admin/notes/years' for information about maintaining copyright years for GNU Emacs. ** Make sure the necessary sources and scripts for any generated files @@ -344,10 +344,10 @@ windows.texi * OTHER INFORMATION -For Emacs's versioning scheme, see `admin/notes/versioning'. +For Emacs's versioning scheme, see 'admin/notes/versioning'. For instructions to create pretest or release tarballs, announcements, -etc., see `admin/make-tarball.txt'. +etc., see 'admin/make-tarball.txt'. Local variables: diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 7bf2e53..9320a6e 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2036,7 +2036,7 @@ When @end ifset is @code{nil} (the default), such problems do not occur. -To ``turns off'' the backup feature for @value{tramp} files and stop +To ``turn off'' the backup feature for @value{tramp} files and stop @value{tramp} from saving to the backup directory, use this: @ifset emacs diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4ee8b37..1526e2f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1169,7 +1169,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (display-warning 'bytecomp string level byte-compile-log-buffer))) (defun byte-compile-warn (format &rest args) - "Issue a byte compiler warning; use (format FORMAT ARGS...) for message." + "Issue a byte compiler warning; use (format-message FORMAT ARGS...) for message." (setq format (apply #'format-message format args)) (if byte-compile-error-on-warn (error "%s" format) ; byte-compile-file catches and logs it @@ -3746,7 +3746,8 @@ discarding." (if (= (logand len 1) 1) (progn (byte-compile-log-warning - (format "missing value for `%S' at end of setq" (car (last args))) + (format-message + "missing value for `%S' at end of setq" (car (last args))) nil :error) (byte-compile-form `(signal 'wrong-number-of-arguments '(setq ,len)) @@ -4017,7 +4018,8 @@ that suppresses all warnings during execution of BODY." (progn (mapc 'byte-compile-form (cdr form)) (byte-compile-out 'byte-call (length (cdr (cdr form))))) - (byte-compile-log-warning "`funcall' called with no arguments" nil :error) + (byte-compile-log-warning + (format-message "`funcall' called with no arguments") nil :error) (byte-compile-form '(signal 'wrong-number-of-arguments '(funcall 0)) byte-compile--for-effect))) diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 8786115..ec8d3d7 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -55,7 +55,7 @@ found in the map, the corresponding PAT doesn't match the value associated to the KEY. Each element can also be a SYMBOL, which is an abbreviation of a (KEY -PAT) tuple of the form ('SYMBOL SYMBOL). +PAT) tuple of the form (\\='SYMBOL SYMBOL). Keys in ARGS not found in the map are ignored, and the match doesn't fail." diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 7be997e..7e164c0 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -111,7 +111,7 @@ CASES is a list of elements of the form (PATTERN CODE...). A structural PATTERN describes a template that identifies a class -of values. For example, the pattern `(,foo ,bar) matches any +of values. For example, the pattern \\=`(,foo ,bar) matches any two element list, binding its elements to symbols named `foo' and `bar' -- in much the same way that `cl-destructuring-bind' would. @@ -119,12 +119,12 @@ A significant difference from `cl-destructuring-bind' is that, if a pattern match fails, the next case is tried until either a successful match is found or there are no more cases. -Another difference is that pattern elements may be backquoted, +Another difference is that pattern elements may be quoted, meaning they must match exactly: The pattern \\='(foo bar) matches only against two element lists containing the symbols `foo' and `bar' in that order. (As a short-hand, atoms always match themselves, such as numbers or strings, and need not be -quoted). +quoted.) Lastly, a pattern can be logical, such as (pred numberp), that matches any number-like element; or the symbol `_', that matches diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 2d8f25c..248e636 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -216,7 +216,7 @@ Whether the passphrase is cached at all is controlled by ""))))) (if (setq cert (smime-cert-by-dns who)) (setq result (list 'certfile (buffer-name cert))) - (setq bad (format "`%s' not found. " who)))) + (setq bad (gnus-format-message "`%s' not found. " who)))) (quit)) result)) @@ -235,7 +235,7 @@ Whether the passphrase is cached at all is controlled by ""))))) (if (setq cert (smime-cert-by-ldap who)) (setq result (list 'certfile (buffer-name cert))) - (setq bad (format "`%s' not found. " who)))) + (setq bad (gnus-format-message "`%s' not found. " who)))) (quit)) result)) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 8c8e679..cd8ec0e 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -144,7 +144,7 @@ Interactively, URL defaults to the string looking like a url around point." (defun xwidget-webkit-scroll-up () "Scroll webkit up. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) @@ -153,7 +153,7 @@ this scrolls in 'native' fashion, or like `image-mode' would." (defun xwidget-webkit-scroll-down () "Scroll webkit down. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) @@ -162,7 +162,7 @@ this scrolls in 'native' fashion, or like `image-mode' would." (defun xwidget-webkit-scroll-forward () "Scroll webkit forwards. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) @@ -171,7 +171,7 @@ this scrolls in 'native' fashion, or like `image-mode' would." (defun xwidget-webkit-scroll-backward () "Scroll webkit backwards. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) commit 6b0ab7f5806844dc158b60a0c0c0fcc5fe5b6678 Author: Paul Eggert Date: Wed Feb 3 13:21:10 2016 -0800 Mention context when resume from emergency escape That way, if the user has been doing something else for a while, they are reminded of the situation when restarting Emacs, and are more likely to understand the two questions. * doc/emacs/trouble.texi (Emergency Escape): Document this. * src/keyboard.c (handle_interrupt): Implement this. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 3268063..bd347b0 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -417,19 +417,22 @@ first @kbd{C-g} properly, then the second one will get you back to the shell. When you resume Emacs after a suspension caused by emergency escape, -it asks two questions before going back to what it had been doing: +it reports the resumption and asks a question or two before going back +to what it had been doing: @example +Emacs is resuming after an emergency escape. Auto-save? (y or n) Abort (and dump core)? (y or n) @end example @noindent -Answer each one with @kbd{y} or @kbd{n} followed by @key{RET}. +Answer each question with @kbd{y} or @kbd{n} followed by @key{RET}. Saying @kbd{y} to @samp{Auto-save?} causes immediate auto-saving of all modified buffers in which auto-saving is enabled. Saying @kbd{n} -skips this. +skips this. This question is omitted if Emacs is in a state where +auto-saving cannot be done safely. Saying @kbd{y} to @samp{Abort (and dump core)?} causes Emacs to crash, dumping core. This is to enable a wizard to figure out why diff --git a/src/keyboard.c b/src/keyboard.c index 64d7b13..7e95ad7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10295,6 +10295,9 @@ handle_interrupt (bool in_signal_handler) is used. Note that [Enter] is not echoed by dos. */ cursor_to (SELECTED_FRAME (), 0, 0); #endif + + write_stdout ("Emacs is resuming after an emergency escape.\n"); + /* It doesn't work to autosave while GC is in progress; the code used for auto-saving doesn't cope with the mark bit. */ if (!gc_in_progress) commit 60d712bba7ef0f3a80daa1757de70856a7af9a67 Author: Ken Brown Date: Wed Feb 3 13:27:08 2016 -0500 ; Fix last aligned_alloc declaration change diff --git a/src/lisp.h b/src/lisp.h index a99002b..c8363be 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3775,7 +3775,7 @@ INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); } #if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC extern size_t __malloc_extra_blocks; #endif -#ifndef HAVE_DECL_ALIGNED_ALLOC +#if !HAVE_DECL_ALIGNED_ALLOC extern void *aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2)); #endif extern void malloc_enable_thread (void); commit 2c0dc9fa70dcde56f68db6e72309f995e5c0e6e0 Author: Noam Postavsky Date: Wed Feb 3 19:48:45 2016 +0200 Fix warning message in hack-local-variables * lisp/files.el (hack-local-variables): use 'thisbuf' to reference the original buffer name in the warning message. (Bug#21681) diff --git a/lisp/files.el b/lisp/files.el index 3898dff..72c2752 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3426,7 +3426,11 @@ local variables, but directory-local variables may still be applied." (format-message "%s: `lexical-binding' at end of file unreliable" (file-name-nondirectory - (or buffer-file-name "")))))) + ;; We are called from + ;; 'with-temp-buffer', so we need + ;; to use 'thisbuf's name in the + ;; warning message. + (or (buffer-file-name thisbuf) "")))))) (t (ignore-errors (push (cons (if (eq var 'eval) commit 504696d75dbd9b8159490ec4cd9da2b5578f2934 Author: Eli Zaretskii Date: Wed Feb 3 18:24:20 2016 +0200 Etags: yet another improvement in Ruby tags * lib-src/etags.c (Ruby_functions): Handle continuation lines in Ruby accessor definitions. (Bug#22241) * test/etags/ruby-src/test1.ru (A::B#X): Add some more tests for accessors and multiline definitions. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags. diff --git a/lib-src/etags.c b/lib-src/etags.c index ca6fe51..bb27589 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4630,6 +4630,7 @@ static void Ruby_functions (FILE *inf) { char *cp = NULL; + bool reader = false, writer = false, alias = false, continuation = false; LOOP_ON_INPUT_LINES (inf, lb, cp) { @@ -4638,7 +4639,9 @@ Ruby_functions (FILE *inf) char *name; cp = skip_spaces (cp); - if (c_isalpha (*cp) && c_isupper (*cp)) /* constants */ + if (!continuation + /* Constants. */ + && c_isalpha (*cp) && c_isupper (*cp)) { char *bp, *colon = NULL; @@ -4661,9 +4664,11 @@ Ruby_functions (FILE *inf) } } } - else if ((is_method = LOOKING_AT (cp, "def")) /* module/class/method */ - || (is_class = LOOKING_AT (cp, "class")) - || LOOKING_AT (cp, "module")) + else if (!continuation + /* Modules, classes, methods. */ + && ((is_method = LOOKING_AT (cp, "def")) + || (is_class = LOOKING_AT (cp, "class")) + || LOOKING_AT (cp, "module"))) { const char self_name[] = "self."; const size_t self_size1 = sizeof (self_name) - 1; @@ -4701,21 +4706,27 @@ Ruby_functions (FILE *inf) else { /* Tag accessors and aliases. */ + + if (!continuation) + reader = writer = alias = false; + while (*cp && *cp != '#') { - bool reader = false, writer = false, alias = false; - - if (LOOKING_AT (cp, "attr_reader")) - reader = true; - else if (LOOKING_AT (cp, "attr_writer")) - writer = true; - else if (LOOKING_AT (cp, "attr_accessor")) + if (!continuation) { - reader = true; - writer = true; + reader = writer = alias = false; + if (LOOKING_AT (cp, "attr_reader")) + reader = true; + else if (LOOKING_AT (cp, "attr_writer")) + writer = true; + else if (LOOKING_AT (cp, "attr_accessor")) + { + reader = true; + writer = true; + } + else if (LOOKING_AT (cp, "alias_method")) + alias = true; } - else if (LOOKING_AT (cp, "alias_method")) - alias = true; if (reader || writer || alias) { do { @@ -4725,9 +4736,12 @@ Ruby_functions (FILE *inf) np++; cp = skip_name (cp); if (reader) - make_tag (np, cp - np, true, - lb.buffer, cp - lb.buffer + 1, - lineno, linecharno); + { + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + continuation = false; + } if (writer) { size_t name_len = cp - np + 1; @@ -4737,19 +4751,34 @@ Ruby_functions (FILE *inf) memcpy (wr_name + name_len - 1, "=", 2); pfnote (wr_name, true, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + continuation = false; } if (alias) { - make_tag (np, cp - np, true, - lb.buffer, cp - lb.buffer + 1, - lineno, linecharno); + if (!continuation) + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + continuation = false; while (*cp && *cp != '#' && *cp != ';') - cp++; + { + if (*cp == ',') + continuation = true; + else if (!c_isspace (*cp)) + continuation = false; + cp++; + } + if (*cp == ';') + continuation = false; } - } while (*cp == ',' + cp = skip_spaces (cp); + } while ((alias + ? (*cp == ',') + : (continuation = (*cp == ','))) && (cp = skip_spaces (cp + 1), *cp && *cp != '#')); } - cp = skip_name (cp); + if (*cp != '#') + cp = skip_name (cp); while (*cp && *cp != '#' && notinname (*cp)) cp++; } diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index afb1096..b78c194 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -454,7 +454,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ -Constant ruby-src/test1.ru 35 +Constant ruby-src/test1.ru 39 ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ Controls pyt-src/server.py /^class Controls:$/ CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ @@ -2556,11 +2556,12 @@ bar c-src/c.c /^void bar() {while(0) {}}$/ bar c.c 143 bar c-src/h.h 19 bar cp-src/x.cc /^XX::bar()$/ -bar= ruby-src/test1.ru /^ attr_writer :bar$/ +bar= ruby-src/test1.ru /^ attr_writer :bar,$/ bas_syn prol-src/natded.prolog /^bas_syn(n(_)).$/ base c-src/emacs/src/lisp.h 2188 base cp-src/c.C /^double base (void) const { return rng_base; }$/ base cp-src/Range.h /^ double base (void) const { return rng_base; }$/ +baz= ruby-src/test1.ru /^ :baz,$/ bb c.c 275 bbb c.c 251 bbbbbb c-src/h.h 113 @@ -3514,6 +3515,7 @@ modifier_symbols c-src/emacs/src/keyboard.c 6327 modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/ module_instance_method ruby-src/test.rb /^ def module_instance_method$/ +more= ruby-src/test1.ru /^ :more$/ more_aligned_int c.c 165 morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ morecore_recursing c-src/emacs/src/gmalloc.c 604 @@ -3879,7 +3881,7 @@ questo ../c/c.web 34 quiettest make-src/Makefile /^quiettest:$/ quit_char c-src/emacs/src/keyboard.c 192 quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ -qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ +qux ruby-src/test1.ru /^ alias_method :qux, :tee, attr_accessor :bogu/ qux= ruby-src/test1.ru /^ def qux=(tee)$/ r0 c-src/sysdep.h 54 r1 c-src/sysdep.h 55 @@ -3904,8 +3906,8 @@ read cp-src/conway.hpp /^ char read() { return alive; }$/ read php-src/lce_functions.php /^ function read()$/ read-key-sequence c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence", Fread_key_sequence, Sr/ read-key-sequence-vector c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence-vector", Fread_key_seque/ -read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +read1 ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ +read2 ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ read_char c-src/emacs/src/keyboard.c /^read_char (int commandflag, Lisp_Object map,$/ read_char_help_form_unwind c-src/emacs/src/keyboard.c /^read_char_help_form_unwind (void)$/ read_char_minibuf_menu_prompt c-src/emacs/src/keyboard.c /^read_char_minibuf_menu_prompt (int commandflag,$/ @@ -4164,6 +4166,7 @@ substitute c-src/etags.c /^substitute (char *in, char *out, struct re_registe/ subsubsec=\relax tex-src/texinfo.tex /^\\let\\appendixsubsubsec=\\relax$/ subsubsection perl-src/htlmify-cystic 27 subsubsection=\relax tex-src/texinfo.tex /^\\let\\appendixsubsubsection=\\relax$/ +subtle ruby-src/test1.ru /^ :tee ; attr_reader :subtle$/ subtree prol-src/natded.prolog /^subtree(T,T).$/ suffix c-src/etags.c 186 suffixes c-src/etags.c 195 @@ -4450,8 +4453,8 @@ womboid c-src/h.h 75 word_size c-src/emacs/src/lisp.h 1473 write php-src/lce_functions.php /^ function write()$/ write php-src/lce_functions.php /^ function write($save="yes")$/ -write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +write1= ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ +write2= ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ write_abbrev c-src/abbrev.c /^write_abbrev (sym, stream)$/ write_classname c-src/etags.c /^write_classname (linebuffer *cn, const char *quali/ write_lex prol-src/natded.prolog /^write_lex(File):-$/ @@ -4492,6 +4495,7 @@ xref-location-marker el-src/emacs/lisp/progmodes/etags.el /^(cl-defmethod xref-l xref-make-etags-location el-src/emacs/lisp/progmodes/etags.el /^(defun xref-make-etags-location (tag-info file)$/ xrnew c-src/etags.c /^#define xrnew(op, n, Type) ((op) = (Type *) xreall/ xx make-src/Makefile /^xx="this line is here because of a fontlock bug$/ +xyz ruby-src/test1.ru /^ alias_method :xyz,$/ y cp-src/conway.hpp 7 y cp-src/clheir.hpp 49 y cp-src/clheir.hpp 58 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 87ab88f..1390187 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3061,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3075,15 +3075,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 8615982..f8b1546 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3631,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3645,15 +3645,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 52d5a61..a1e895a 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3408,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3422,15 +3422,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 333274c..32390fa 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3225,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3239,15 +3239,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index fdf2329..ee19bcf 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -4156,15 +4156,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 95d59d3..f4d9ab8 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -4156,15 +4156,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ruby-src/test1.ru b/test/etags/ruby-src/test1.ru index 75dcd51..bc9dbec 100644 --- a/test/etags/ruby-src/test1.ru +++ b/test/etags/ruby-src/test1.ru @@ -24,10 +24,14 @@ module A end def X attr_reader :foo - attr_reader :read1, :read2; attr_writer :write1, :write2 - attr_writer :bar + attr_reader :read1 , :read2; attr_writer :write1, :write2 + attr_writer :bar, + :baz, + :more attr_accessor :tee - alias_method :qux, :tee + alias_method :qux, :tee, attr_accessor :bogus + alias_method :xyz, + :tee ; attr_reader :subtle end end end commit 8784ebf3a9f94c64cd09149c4906a3f494a1251d Author: Eli Zaretskii Date: Wed Feb 3 18:11:10 2016 +0200 Fix x-popup-menu on TTYs without a mouse * src/menu.c (Fx_popup_menu): Be sure to initialize 'x' and 'y' for the TTY case without a mouse. (Bug#22538) diff --git a/src/menu.c b/src/menu.c index caae228..cbddef3 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1236,6 +1236,9 @@ no quit occurs and `x-popup-menu' returns nil. */) { /* Use the mouse's current position. */ struct frame *new_f = SELECTED_FRAME (); + + XSETFASTINT (x, 0); + XSETFASTINT (y, 0); #ifdef HAVE_X_WINDOWS if (FRAME_X_P (new_f)) { commit 8b87ecb77dc8212e16be4ef8cb28fe2829f6877b Author: Nicolas Petton Date: Wed Feb 3 15:18:36 2016 +0100 * lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index ebef271..8786115 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -47,17 +47,18 @@ (pcase-defmacro map (&rest args) "Build a `pcase' pattern matching map elements. -The `pcase' pattern will match each element of PATTERN against -the corresponding elements of the map. +ARGS is a list of elements to be matched in the map. -Extra elements of the map are ignored if fewer ARGS are -given, and the match does not fail. +Each element of ARGS can be of the form (KEY PAT), in which case KEY is +evaluated and searched for in the map. The match fails if for any KEY +found in the map, the corresponding PAT doesn't match the value +associated to the KEY. -ARGS can be a list of the form (KEY PAT), in which case KEY in an -unquoted form. +Each element can also be a SYMBOL, which is an abbreviation of a (KEY +PAT) tuple of the form ('SYMBOL SYMBOL). -ARGS can also be a list of symbols, which stands for ('SYMBOL -SYMBOL)." +Keys in ARGS not found in the map are ignored, and the match doesn't +fail." `(and (pred mapp) ,@(map--make-pcase-bindings args))) commit 5fcd89f52ec6b8b5b24641d20b9907998c4fa0b9 Author: Paul Eggert Date: Wed Feb 3 00:37:44 2016 -0800 Port aligned_alloc decl to Cygwin. Problem reported by Ken Brown (Bug#22522#38). * configure.ac (aligned_alloc): Check for decl too. * src/lisp.h (aligned_alloc): Declare if not already declared. diff --git a/configure.ac b/configure.ac index d97d9e5..1e076c7 100644 --- a/configure.ac +++ b/configure.ac @@ -3824,6 +3824,7 @@ if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \ && test "$opsys" != darwin; then AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) fi +AC_CHECK_DECLS([aligned_alloc], [], [], [[#include ]]) dnl Cannot use AC_CHECK_FUNCS AC_CACHE_CHECK([for __builtin_unwind_init], diff --git a/src/lisp.h b/src/lisp.h index 54bce0f..a99002b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3774,10 +3774,9 @@ INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); } /* Defined in gmalloc.c. */ #if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC extern size_t __malloc_extra_blocks; -extern void *aligned_alloc (size_t, size_t); #endif -#if defined HYBRID_MALLOC && !defined HAVE_ALIGNED_ALLOC -extern void *hybrid_aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2)); +#ifndef HAVE_DECL_ALIGNED_ALLOC +extern void *aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2)); #endif extern void malloc_enable_thread (void); commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 Author: Paul Eggert Date: Tue Feb 2 23:11:36 2016 -0800 autogen.sh now configures git only on request * autogen.sh (do_autoconf, do_git): New vars. Support new arguments --help, all, autoconf, git. By default, just do autoconf-related configuration, not git. Prefer 'echo' to 'cat <&2 'There seems to be no "configure" file in this directory.' - @echo >&2 'Running ./autogen.sh ...' - ./autogen.sh + @echo >&2 Running ./autogen.sh $(ALL_IF_GIT) ... + ./autogen.sh $(ALL_IF_GIT) @echo >&2 '"configure" file built.' Makefile: configure diff --git a/INSTALL.REPO b/INSTALL.REPO index 1720758..7497f1f 100644 --- a/INSTALL.REPO +++ b/INSTALL.REPO @@ -18,9 +18,10 @@ makeinfo - not strictly necessary, but highly recommended, so that you can build the manuals. To use the autotools, run the following shell command to generate the -'configure' script and some related files: +'configure' script and some related files, and to set up your git +configuration: - $ ./autogen.sh + $ ./autogen.sh all You can then configure your build as follows: diff --git a/autogen.sh b/autogen.sh index a63c53c..2ed58e1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -103,16 +103,35 @@ check_version () return 2 } +do_autoconf=false +do_git=false + +for arg in ${*-autoconf}; do + case $arg in + --help) + exec echo "$0: usage: $0 [all|autoconf|git]";; + all) + do_autoconf=true do_git=true;; + autoconf) + do_autoconf=true;; + git) + do_git=true;; + *) + echo >&2 "$0: $arg: unknown argument"; exit 1;; + esac +done + + +# Generate Autoconf and Automake related files, if requested. -cat < src/stamp-h.in || exit fi -echo 'Your system has the required tools.' -echo "Running 'autoreconf -fi -I m4' ..." +# True if the Git setup was OK before autogen.sh was run. -## Let autoreconf figure out what, if anything, needs doing. -## Use autoreconf's -f option in case autoreconf itself has changed. -autoreconf -fi -I m4 || exit $? +git_was_ok=true -## Create a timestamp, so that './autogen.sh; make' doesn't -## cause 'make' to needlessly run 'autoheader'. -echo timestamp > src/stamp-h.in || exit +if $do_git; then + case `cp --help 2>/dev/null` in + *--backup*--verbose*) + cp_options='--backup=numbered --verbose';; + *) + cp_options='-f';; + esac +fi -## Configure Git, if using Git. -if test -d .git && (git status -s) >/dev/null 2>&1; then +# Like 'git config NAME VALUE' but verbose on change and exiting on failure. +# Also, do not configure unless requested. - # Configure 'git diff' hunk header format. +git_config () +{ + name=$1 + value=$2 + + ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { + if $do_git; then + if $git_was_ok; then + echo 'Configuring local git repository...' + case $cp_options in + --backup=*) + cp $cp_options --force .git/config .git/config || exit;; + esac + fi + echo "git config $name '$value'" + git config "$name" "$value" || exit + fi + git_was_ok=false + } +} + +## Configure Git, if requested. + +# Check hashes when transferring objects among repositories. + +git_config transfer.fsckObjects true + + +# Configure 'git diff' hunk header format. - git config 'diff.elisp.xfuncname' \ - '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit - git config 'diff.texinfo.xfuncname' \ - '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit +git_config diff.elisp.xfuncname \ + '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' +git_config diff.texinfo.xfuncname \ + '^@node[[:space:]]+([^,[:space:]][^,]+)' - # Install Git hooks. +# Install Git hooks. - tailored_hooks= - sample_hooks= +tailored_hooks= +sample_hooks= - for hook in commit-msg pre-commit; do - cmp build-aux/git-hooks/$hook .git/hooks/$hook >/dev/null 2>&1 || +for hook in commit-msg pre-commit; do + cmp build-aux/git-hooks/$hook .git/hooks/$hook >/dev/null 2>&1 || tailored_hooks="$tailored_hooks $hook" - done - for hook in applypatch-msg pre-applypatch; do - test ! -r .git/hooks/$hook.sample || - cmp .git/hooks/$hook.sample .git/hooks/$hook >/dev/null 2>&1 || +done +for hook in applypatch-msg pre-applypatch; do + src=.git/hooks/$hook.sample + cmp "$src" .git/hooks/$hook >/dev/null 2>&1 || sample_hooks="$sample_hooks $hook" - done +done - if test -n "$tailored_hooks$sample_hooks"; then +if test -n "$tailored_hooks$sample_hooks"; then + if $do_git; then echo "Installing git hooks..." - case `cp --help 2>/dev/null` in - *--backup*--verbose*) - cp_options='--backup=numbered --verbose';; - *) - cp_options='-f';; - esac - if test -n "$tailored_hooks"; then for hook in $tailored_hooks; do - cp $cp_options build-aux/git-hooks/$hook .git/hooks || exit - chmod a-w .git/hooks/$hook || exit + dst=.git/hooks/$hook + cp $cp_options build-aux/git-hooks/$hook "$dst" || exit + chmod a-w "$dst" || exit done fi @@ -266,10 +317,19 @@ if test -d .git && (git status -s) >/dev/null 2>&1; then chmod a-w .git/hooks/$hook || exit done fi + else + git_was_ok=false fi fi -echo "You can now run './configure'." +if test ! -f configure; then + echo "You can now run '$0 autoconf'." +elif test -d .git && test $git_was_ok = false && test $do_git = false; then + echo "You can now run '$0 git'." +elif test ! -f config.status || + test -n "`find src/stamp-h.in -newer config.status`"; then + echo "You can now run './configure'." +fi exit 0 commit 6191003fcd2bc65f2b18d5337f6f390d43f07173 Author: Lars Ingebrigtsen Date: Wed Feb 3 13:35:10 2016 +1100 Use pop-to-buffer-same-window in eww * lisp/net/eww.el: pop-to-buffer-same-window throughout instead of switch-to-buffer (bug#22244). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7f98b5b..af6e0af 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -551,7 +551,7 @@ Currently this means either text/html or application/xhtml+xml." (declare-function mailcap-view-mime "mailcap" (type)) (defun eww-display-pdf () (let ((data (buffer-substring (point) (point-max)))) - (switch-to-buffer (get-buffer-create "*eww pdf*")) + (pop-to-buffer-same-window (get-buffer-create "*eww pdf*")) (let ((coding-system-for-write 'raw-text) (inhibit-read-only t)) (erase-buffer) @@ -748,7 +748,7 @@ the like." ;;;###autoload (defun eww-browse-url (url &optional new-window) (when new-window - (switch-to-buffer (generate-new-buffer "*eww*")) + (pop-to-buffer-same-window (generate-new-buffer "*eww*")) (eww-mode)) (eww url)) @@ -1728,7 +1728,7 @@ If CHARSET is nil then use UTF-8." (let ((buffer eww-current-buffer)) (quit-window) (when buffer - (switch-to-buffer buffer))) + (pop-to-buffer-same-window buffer))) (eww-restore-history history))) (defvar eww-history-mode-map @@ -1809,7 +1809,7 @@ If CHARSET is nil then use UTF-8." (unless buffer (error "No buffer on current line")) (quit-window) - (switch-to-buffer buffer))) + (pop-to-buffer-same-window buffer))) (defun eww-buffer-show () "Display buffer under point in eww buffer list." @@ -1818,7 +1818,7 @@ If CHARSET is nil then use UTF-8." (unless buffer (error "No buffer on current line")) (other-window -1) - (switch-to-buffer buffer) + (pop-to-buffer-same-window buffer) (other-window 1))) (defun eww-buffer-show-next () commit fe321fdb668c42f1fbb2590c6c8cabcfcc59ab13 Author: Paul Eggert Date: Tue Feb 2 18:03:59 2016 -0800 * autogen.sh: Revert all recent changes. diff --git a/autogen.sh b/autogen.sh index 4a0fbb7..a63c53c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,21 +104,6 @@ check_version () } -git_config=true - -for arg -do - case $arg in - --git-config=false) git_config=false;; - --git-config=true) git_config=true ;; - --help) - exec echo "$0: usage: $0 [--help|--git-config=[false|true]]";; - *) - echo >&2 "$0: $arg: unknown option"; exit 1;; - esac -done - - cat < src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then - # Like 'git config NAME VALUE', but conditional on --git-config, - # verbose on change, and exiting on failure. - - git_config () - { - name=$1 - value=$2 - - if $git_config; then - ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { - echo "${Configuring_git}git config $name '$value'" - Configuring_git= - git config "$name" "$value" || exit - } - fi - } - Configuring_git='Configuring git... -' - - # Check hashes when transferring objects among repositories. - - git_config transfer.fsckObjects true - - # Configure 'git diff' hunk header format. - git_config 'diff.elisp.xfuncname' \ - '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' - git_config 'diff.texinfo.xfuncname' \ - '^@node[[:space:]]+([^,[:space:]][^,]+)' + git config 'diff.elisp.xfuncname' \ + '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit + git config 'diff.texinfo.xfuncname' \ + '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit # Install Git hooks. commit b50075dd056b1c18afe96f29142981fe5774ceb1 Author: Paul Eggert Date: Tue Feb 2 14:43:59 2016 -0800 Build with C11 if available * admin/merge-gnulib (GNULIB_MODULES): Add std-gnu11. * m4/std-gnu11.m4: New file, from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 40b5b78..5463d1b 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -35,7 +35,7 @@ GNULIB_MODULES=' ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat - sig2str socklen stat-time stdalign stddef stdio + sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens diff --git a/lib/gnulib.mk b/lib/gnulib.mk index b920cbb..b1edd86 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings MOSTLYCLEANFILES += core *.stackdump diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 547af66..831bb4c 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -126,6 +126,7 @@ AC_DEFUN([gl_EARLY], # Code from module ssize_t: # Code from module stat: # Code from module stat-time: + # Code from module std-gnu11: # Code from module stdalign: # Code from module stddef: # Code from module stdint: @@ -1052,6 +1053,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/st_dm_mode.m4 m4/stat-time.m4 m4/stat.m4 + m4/std-gnu11.m4 m4/stdalign.m4 m4/stddef_h.m4 m4/stdint.m4 diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4 new file mode 100644 index 0000000..a687cdb --- /dev/null +++ b/m4/std-gnu11.m4 @@ -0,0 +1,818 @@ +# Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*- + +# This implementation is taken from GNU Autoconf lib/autoconf/c.m4 +# commit 5ad3567c3cbd90b4faa6539c35bc4a8c6500f535 +# dated 2015-10-08 10:12:41 2015 +0200. +# This implementation will be obsolete once we can assume Autoconf 2.70 +# or later is installed everywhere a Gnulib program might be developed. + + +# Copyright (C) 2001-2016 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Written by David MacKenzie, with help from +# Akim Demaille, Paul Eggert, +# François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, +# Roland McGrath, Noah Friedman, david d zuhn, and many others. + + +# AC_PROG_CC([COMPILER ...]) +# -------------------------- +# COMPILER ... is a space separated list of C compilers to search for. +# This just gives the user an opportunity to specify an alternative +# search list for the C compiler. +AC_DEFUN_ONCE([AC_PROG_CC], +[AC_LANG_PUSH(C)dnl +AC_ARG_VAR([CC], [C compiler command])dnl +AC_ARG_VAR([CFLAGS], [C compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +_AC_ARG_VAR_LIBS()dnl +_AC_ARG_VAR_CPPFLAGS()dnl +m4_ifval([$1], + [AC_CHECK_TOOLS(CC, [$1])], +[AC_CHECK_TOOL(CC, gcc) +if test -z "$CC"; then + dnl Here we want: + dnl AC_CHECK_TOOL(CC, cc) + dnl but without the check for a tool without the prefix. + dnl Until the check is removed from there, copy the code: + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc]) + fi +fi +if test -z "$CC"; then + AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) +fi +if test -z "$CC"; then + AC_CHECK_TOOLS(CC, cl.exe) +fi +]) + +test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) + +# Provide some information about the compiler. +_AS_ECHO_LOG([checking for _AC_LANG compiler version]) +set X $ac_compile +ac_compiler=$[2] +for ac_option in --version -v -V -qversion -version; do + _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) +done + +m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl +m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl +_AC_LANG_COMPILER_GNU +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +_AC_PROG_CC_G +dnl +dnl Set ac_prog_cc_stdc to the supported C version. +dnl Also set the documented variable ac_cv_prog_cc_stdc; +dnl its name was chosen when it was cached, but it is no longer cached. +_AC_PROG_CC_C11([ac_prog_cc_stdc=c11 + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11], + [_AC_PROG_CC_C99([ac_prog_cc_stdc=c99 + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99], + [_AC_PROG_CC_C89([ac_prog_cc_stdc=c89 + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89], + [ac_prog_cc_stdc=no + ac_cv_prog_cc_stdc=no])])]) +dnl +AC_LANG_POP(C)dnl +])# AC_PROG_CC + + + +# AC_PROG_CXX([LIST-OF-COMPILERS]) +# -------------------------------- +# LIST-OF-COMPILERS is a space separated list of C++ compilers to search +# for (if not specified, a default list is used). This just gives the +# user an opportunity to specify an alternative search list for the C++ +# compiler. +# aCC HP-UX C++ compiler much better than `CC', so test before. +# FCC Fujitsu C++ compiler +# KCC KAI C++ compiler +# RCC Rational C++ +# xlC_r AIX C Set++ (with support for reentrant code) +# xlC AIX C Set++ +AC_DEFUN([AC_PROG_CXX], +[AC_LANG_PUSH(C++)dnl +AC_ARG_VAR([CXX], [C++ compiler command])dnl +AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +_AC_ARG_VAR_LIBS()dnl +_AC_ARG_VAR_CPPFLAGS()dnl +_AC_ARG_VAR_PRECIOUS([CCC])dnl +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + AC_CHECK_TOOLS(CXX, + [m4_default([$1], + [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC])], + g++) + fi +fi +# Provide some information about the compiler. +_AS_ECHO_LOG([checking for _AC_LANG compiler version]) +set X $ac_compile +ac_compiler=$[2] +for ac_option in --version -v -V -qversion; do + _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) +done + +m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl +m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl +_AC_LANG_COMPILER_GNU +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +_AC_PROG_CXX_G +_AC_PROG_CXX_CXX11([ac_prog_cxx_stdcxx=cxx11 + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11], + [_AC_PROG_CXX_CXX98([ac_prog_cxx_stdcxx=cxx98 + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98], + [ac_prog_cxx_stdcxx=no + ac_cv_prog_cxx_stdcxx=no])]) +AC_LANG_POP(C++)dnl +])# AC_PROG_CXX + + +# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, +# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) +# -------------------------------------------------------------- +# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') +# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, +# try again with each compiler option in the space-separated OPTION-LIST; if one +# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, +# else ACTION-IF-UNAVAILABLE. +AC_DEFUN([_AC_C_STD_TRY], +[AC_MSG_CHECKING([for $CC option to enable ]m4_translit($1, [c], [C])[ features]) +AC_CACHE_VAL(ac_cv_prog_cc_$1, +[ac_cv_prog_cc_$1=no +ac_save_CC=$CC +AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) +for ac_arg in '' $4 +do + CC="$ac_save_CC $ac_arg" + _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) + test "x$ac_cv_prog_cc_$1" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +])# AC_CACHE_VAL +ac_prog_cc_stdc_options= +case "x$ac_cv_prog_cc_$1" in + x) + AC_MSG_RESULT([none needed]) ;; + xno) + AC_MSG_RESULT([unsupported]) ;; + *) + ac_prog_cc_stdc_options=" $ac_cv_prog_cc_$1" + CC=$CC$ac_prog_cc_stdc_options + AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; +esac +AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) +])# _AC_C_STD_TRY + +# _AC_C_C99_TEST_HEADER +# --------------------- +# A C header suitable for testing for C99. +AC_DEFUN([_AC_C_C99_TEST_HEADER], +[[#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +}]])# _AC_C_C99_TEST_HEADER + +# _AC_C_C99_TEST_BODY +# ------------------- +# A C body suitable for testing for C99, assuming the corresponding header. +AC_DEFUN([_AC_C_C99_TEST_BODY], +[[ + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); +]]) + +# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ---------------------------------------------------------------- +# If the C compiler is not in ISO C99 mode by default, try to add an +# option to output variable CC to make it so. This macro tries +# various options that select ISO C99 on some system or another. It +# considers the compiler to be in ISO C99 mode if it handles _Bool, +# // comments, flexible array members, inline, long long int, mixed +# code and declarations, named initialization of structs, restrict, +# va_copy, varargs macros, variable declarations in for loops and +# variable length arrays. +AC_DEFUN([_AC_PROG_CC_C99], +[_AC_C_STD_TRY([c99], +[_AC_C_C99_TEST_HEADER], +[_AC_C_C99_TEST_BODY], +dnl Try +dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) +dnl IBM XL C -qlanglvl=extc1x (V12.1; does not pass C11 test) +dnl IBM XL C -qlanglvl=extc99 +dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdc99) +dnl HP cc -AC99 +dnl Intel ICC -std=c99, -c99 (deprecated) +dnl IRIX -c99 +dnl Solaris -D_STDC_C99= +dnl cc's -xc99 option uses linker magic to define the external +dnl symbol __xpg4 as if by "int __xpg4 = 1;", which enables C99 +dnl behavior for C library functions. This is not wanted here, +dnl because it means that a single module compiled with -xc99 +dnl alters C runtime behavior for the entire program, not for +dnl just the module. Instead, define the (private) symbol +dnl _STDC_C99, which suppresses a bogus failure in . +dnl The resulting compiler passes the test case here, and that's +dnl good enough. For more, please see the thread starting at: +dnl http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html +dnl Tru64 -c99 +dnl with extended modes being tried first. +[[-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99]], [$1], [$2])[]dnl +])# _AC_PROG_CC_C99 + + +# _AC_PROG_CC_C11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ---------------------------------------------------------------- +# If the C compiler is not in ISO C11 mode by default, try to add an +# option to output variable CC to make it so. This macro tries +# various options that select ISO C11 on some system or another. It +# considers the compiler to be in ISO C11 mode if it handles _Alignas, +# _Alignof, _Noreturn, _Static_assert, UTF-8 string literals, +# duplicate typedefs, and anonymous structures and unions. +AC_DEFUN([_AC_PROG_CC_C11], +[_AC_C_STD_TRY([c11], +[_AC_C_C99_TEST_HEADER[ +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +]], +[_AC_C_C99_TEST_BODY[ + v1.i = 2; + v1.w.k = 5; + _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch"); +]], +dnl Try +dnl GCC -std=gnu11 (unused restrictive mode: -std=c11) +dnl with extended modes being tried first. +dnl +dnl Do not try -qlanglvl=extc1x, because IBM XL C V12.1 (the latest version as +dnl of September 2012) does not pass the C11 test. For now, try extc1x when +dnl compiling the C99 test instead, since it enables _Static_assert and +dnl _Noreturn, which is a win. If -qlanglvl=extc11 or -qlanglvl=extc1x passes +dnl the C11 test in some future version of IBM XL C, we'll add it here, +dnl preferably extc11. +[[-std=gnu11]], [$1], [$2])[]dnl +])# _AC_PROG_CC_C11 + + +# AC_PROG_CC_C89 +# -------------- +# Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC, +# as that'd be incompatible with how Automake redefines AC_PROG_CC. See +# . +AU_DEFUN([AC_PROG_CC_C89], + [AC_REQUIRE([AC_PROG_CC])], + [$0 is obsolete; use AC_PROG_CC] +) + +# AC_PROG_CC_C99 +# -------------- +AU_DEFUN([AC_PROG_CC_C99], + [AC_REQUIRE([AC_PROG_CC])], + [$0 is obsolete; use AC_PROG_CC] +) + +# AC_PROG_CC_STDC +# --------------- +AU_DEFUN([AC_PROG_CC_STDC], + [AC_REQUIRE([AC_PROG_CC])], + [$0 is obsolete; use AC_PROG_CC] +) + + +# AC_C_PROTOTYPES +# --------------- +# Check if the C compiler supports prototypes, included if it needs +# options. +AC_DEFUN([AC_C_PROTOTYPES], +[AC_REQUIRE([AC_PROG_CC])dnl +if test "$ac_prog_cc_stdc" != no; then + AC_DEFINE(PROTOTYPES, 1, + [Define to 1 if the C compiler supports function prototypes.]) + AC_DEFINE(__PROTOTYPES, 1, + [Define like PROTOTYPES; this can be used by system headers.]) +fi +])# AC_C_PROTOTYPES + + +# _AC_CXX_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, +# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) +# ---------------------------------------------------------------- +# Check whether the C++ compiler accepts features of STANDARD (e.g +# `cxx98', `cxx11') by trying to compile a program of TEST-PROLOGUE +# and TEST-BODY. If this fails, try again with each compiler option +# in the space-separated OPTION-LIST; if one helps, append it to CXX. +# If eventually successful, run ACTION-IF-AVAILABLE, else +# ACTION-IF-UNAVAILABLE. +AC_DEFUN([_AC_CXX_STD_TRY], +[AC_MSG_CHECKING([for $CXX option to enable ]m4_translit(m4_translit($1, [x], [+]), [a-z], [A-Z])[ features]) +AC_LANG_PUSH(C++)dnl +AC_CACHE_VAL(ac_cv_prog_cxx_$1, +[ac_cv_prog_cxx_$1=no +ac_save_CXX=$CXX +AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) +for ac_arg in '' $4 +do + CXX="$ac_save_CXX $ac_arg" + _AC_COMPILE_IFELSE([], [ac_cv_prog_cxx_$1=$ac_arg]) + test "x$ac_cv_prog_cxx_$1" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +])# AC_CACHE_VAL +ac_prog_cxx_stdcxx_options= +case "x$ac_cv_prog_cxx_$1" in + x) + AC_MSG_RESULT([none needed]) ;; + xno) + AC_MSG_RESULT([unsupported]) ;; + *) + ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_$1" + CXX=$CXX$ac_prog_cxx_stdcxx_options + AC_MSG_RESULT([$ac_cv_prog_cxx_$1]) ;; +esac +AC_LANG_POP(C++)dnl +AS_IF([test "x$ac_cv_prog_cxx_$1" != xno], [$5], [$6]) +])# _AC_CXX_STD_TRY + +# _AC_CXX_CXX98_TEST_HEADER +# ------------------------- +# A C++ header suitable for testing for CXX98. +AC_DEFUN([_AC_CXX_CXX98_TEST_HEADER], +[[ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace test { + typedef std::vector string_vec; + typedef std::pair map_value; + typedef std::map map_type; + typedef std::set set_type; + + template + class printer { + public: + printer(std::ostringstream& os): os(os) {} + void operator() (T elem) { os << elem << std::endl; } + private: + std::ostringstream& os; + }; +} +]])# _AC_CXX_CXX98_TEST_HEADER + +# _AC_CXX_CXX98_TEST_BODY +# ----------------------- +# A C++ body suitable for testing for CXX98, assuming the corresponding header. +AC_DEFUN([_AC_CXX_CXX98_TEST_BODY], +[[ + +try { + // Basic string. + std::string teststr("ASCII text"); + teststr += " string"; + + // Simple vector. + test::string_vec testvec; + testvec.push_back(teststr); + testvec.push_back("foo"); + testvec.push_back("bar"); + if (testvec.size() != 3) { + throw std::runtime_error("vector size is not 1"); + } + + // Dump vector into stringstream and obtain string. + std::ostringstream os; + for (test::string_vec::const_iterator i = testvec.begin(); + i != testvec.end(); ++i) { + if (i + 1 != testvec.end()) { + os << teststr << '\n'; + } + } + // Check algorithms work. + std::for_each(testvec.begin(), testvec.end(), test::printer(os)); + std::string os_out = os.str(); + + // Test pair and map. + test::map_type testmap; + testmap.insert(std::make_pair(std::string("key"), + std::make_pair(53,false))); + + // Test set. + int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + test::set_type testset(values, values + sizeof(values)/sizeof(values[0])); + std::list testlist(testset.begin(), testset.end()); + std::copy(testset.begin(), testset.end(), std::back_inserter(testlist)); +} catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << std::endl; + + // Test fstream + std::ofstream of("test.txt"); + of << "Test ASCII text\n" << std::flush; + of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl; + of.close(); +} +std::exit(0); +]]) + +# _AC_CXX_CXX11_TEST_HEADER +# ------------------------- +# A C++ header suitable for testing for CXX11. +AC_DEFUN([_AC_CXX_CXX11_TEST_HEADER], +[[ +#include +#include +#include +#include +#include +#include +#include + +namespace cxx11test +{ + typedef std::shared_ptr sptr; + typedef std::weak_ptr wptr; + + typedef std::tuple tp; + typedef std::array int_array; + + constexpr int get_val() { return 20; } + + struct testinit + { + int i; + double d; + }; + + class delegate { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + + virtual int getval() { return this->n; }; + protected: + int n; + }; + + class overridden : public delegate { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + + class nocopy { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; +} +]])# _AC_CXX_CXX11_TEST_HEADER + +# _AC_CXX_CXX11_TEST_BODY +# ----------------------- +# A C++ body suitable for testing for CXX11, assuming the corresponding header. +AC_DEFUN([_AC_CXX_CXX11_TEST_BODY], +[[ +{ + // Test auto and decltype + std::deque d; + d.push_front(43); + d.push_front(484); + d.push_front(3); + d.push_front(844); + int total = 0; + for (auto i = d.begin(); i != d.end(); ++i) { total += *i; } + + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initialiser lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for and lambda + cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (int &x : array) { x += 23; } + std::for_each(array.begin(), array.end(), [](int v1){ std::cout << v1; }); +} +{ + using cxx11test::sptr; + using cxx11test::wptr; + + sptr sp(new std::string("ASCII string")); + wptr wp(sp); + sptr sp2(wp); +} +{ + cxx11test::tp tuple("test", 54, 45.53434); + double d = std::get<2>(tuple); + std::string s; + int i; + std::tie(s,i,d) = tuple; +} +{ + static std::regex filename_regex("^_?([a-z0-9_.]+-)+[a-z0-9]+$"); + std::string testmatch("Test if this string matches"); + bool match = std::regex_search(testmatch, filename_regex); +} +{ + cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + cxx11test::int_array::size_type size = array.size(); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + std::vector> v1; +} +{ + // Unicode literals + char *utf8 = u8"UTF-8 string \u2500"; + char16_t *utf16 = u"UTF-8 string \u2500"; + char32_t *utf32 = U"UTF-32 string \u2500"; +} +]]) + +# _AC_PROG_CXX_CXX98 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ------------------------------------------------------------------- + +# If the C++ compiler is not in ISO C++98 mode by default, try to add +# an option to output variable CXX to make it so. This macro tries +# various options that select ISO C++98 on some system or another. It +# considers the compiler to be in ISO C++98 mode if it handles basic +# features of the std namespace including: string, containers (list, +# map, set, vector), streams (fstreams, iostreams, stringstreams, +# iomanip), pair, exceptions and algorithms. + + +AC_DEFUN([_AC_PROG_CXX_CXX98], +[_AC_CXX_STD_TRY([cxx98], +[_AC_CXX_CXX98_TEST_HEADER], +[_AC_CXX_CXX98_TEST_BODY], +dnl Try +dnl GCC -std=gnu++98 (unused restrictive mode: -std=c++98) +dnl IBM XL C -qlanglvl=extended +dnl HP aC++ -AA +dnl Intel ICC -std=gnu++98 +dnl Solaris N/A (default) +dnl Tru64 N/A (default, but -std gnu could be used) +dnl with extended modes being tried first. +[[-std=gnu++98 -std=c++98 -qlanglvl=extended -AA]], [$1], [$2])[]dnl +])# _AC_PROG_CXX_CXX98 + +# _AC_PROG_CXX_CXX11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) +# ------------------------------------------------------------------- +# If the C++ compiler is not in ISO CXX11 mode by default, try to add +# an option to output variable CXX to make it so. This macro tries +# various options that select ISO C++11 on some system or another. It +# considers the compiler to be in ISO C++11 mode if it handles all the +# tests from the C++98 checks, plus the following: Language features +# (auto, constexpr, decltype, default/deleted constructors, delegate +# constructors, final, initialiser lists, lambda functions, nullptr, +# override, range-based for loops, template brackets without spaces, +# unicode literals) and library features (array, memory (shared_ptr, +# weak_ptr), regex and tuple types). +AC_DEFUN([_AC_PROG_CXX_CXX11], +[_AC_CXX_STD_TRY([cxx11], +[_AC_CXX_CXX11_TEST_HEADER +_AC_CXX_CXX98_TEST_HEADER], +[_AC_CXX_CXX11_TEST_BODY +_AC_CXX_CXX98_TEST_BODY], +dnl Try +dnl GCC -std=gnu++11 (unused restrictive mode: -std=c++11) [and 0x variants] +dnl IBM XL C -qlanglvl=extended0x +dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdcxx11) +dnl HP aC++ -AA +dnl Intel ICC -std=c++11 -std=c++0x +dnl Solaris N/A (no support) +dnl Tru64 N/A (no support) +dnl with extended modes being tried first. +[[-std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA]], [$1], [$2])[]dnl +])# _AC_PROG_CXX_CXX11 commit d743b56f6cc6034511e0372ea78039a41b715711 Author: Paul Eggert Date: Tue Feb 2 14:35:05 2016 -0800 Update gnulib copy * doc/misc/texinfo.tex: Copy from gnulib. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 8b3c949..58021b2 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2016-01-20.20} +\def\texinfoversion{2016-02-02.07} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -4739,8 +4739,8 @@ end % \uccode`\1=`\{ \uppercase{\def\{{1}}% \uccode`\1=`\} \uppercase{\def\}{1}}% - \let\lbracechar\{ - \let\rbracechar\} + \let\lbracechar\{% + \let\rbracechar\}% % % Non-English letters. \def\AA{AA}% @@ -8601,12 +8601,9 @@ end % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \ifx,\tokenafterxref - \else\ifx.\tokenafterxref - \else\ifx;\tokenafterxref - \else\ifx)\tokenafterxref - \else,% add a , if xref not followed by punctuation - \fi\fi\fi\fi + \if\noexpand\tokenafterxref\space + ,% add a , if xref not followed by punctuation + \fi \fi\fi \fi \endlink @@ -9953,7 +9950,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} - + % \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B1}{\ensuremath\pm} \DeclareUnicodeCharacter{00B2}{$^2$} @@ -9970,7 +9967,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{00BD}{$1\over2$} \DeclareUnicodeCharacter{00BE}{$3\over4$} \DeclareUnicodeCharacter{00BF}{\questiondown} - + % \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} @@ -9987,7 +9984,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} - + % \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} @@ -10004,7 +10001,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} - + % \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} @@ -10021,7 +10018,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} - + % \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} @@ -10038,7 +10035,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} - + % \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} @@ -10055,7 +10052,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{010F}{d'} - + % \DeclareUnicodeCharacter{0110}{\DH} \DeclareUnicodeCharacter{0111}{\dh} \DeclareUnicodeCharacter{0112}{\=E} @@ -10072,7 +10069,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} - + % \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0122}{\cedilla{G}} @@ -10089,7 +10086,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{012E}{\ogonek{I}} \DeclareUnicodeCharacter{012F}{\ogonek{i}} - + % \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} @@ -10106,7 +10103,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{013D}{L'}% should kern \DeclareUnicodeCharacter{013E}{l'}% should kern \DeclareUnicodeCharacter{013F}{L\U{00B7}} - + % \DeclareUnicodeCharacter{0140}{l\U{00B7}} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} @@ -10123,7 +10120,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} - + % \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} @@ -10140,7 +10137,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} - + % \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{T}} @@ -10157,7 +10154,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} - + % \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0172}{\ogonek{U}} @@ -10174,7 +10171,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} - + % \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} @@ -10187,20 +10184,20 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} - + % \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} - + % \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} - + % \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} @@ -10213,23 +10210,23 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} - + % \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} - + % \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} - + % \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} - + % \DeclareUnicodeCharacter{02DB}{\ogonek{ }} - + % % Greek letters upper case \DeclareUnicodeCharacter{0391}{{\it A}} \DeclareUnicodeCharacter{0392}{{\it B}} @@ -10256,7 +10253,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{03A7}{{\it X}} \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}} \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}} - + % % Vowels with accents \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}} \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}} @@ -10264,10 +10261,10 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}} \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}} \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}} - + % % Standalone accent \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}} - + % % Greek letters lower case \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha} \DeclareUnicodeCharacter{03B2}{\ensuremath\beta} @@ -10294,19 +10291,19 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{03C7}{\ensuremath\chi} \DeclareUnicodeCharacter{03C8}{\ensuremath\psi} \DeclareUnicodeCharacter{03C9}{\ensuremath\omega} - + % % More Greek vowels with accents \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}} \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}} \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}} \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}} \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}} - + % % Variant Greek letters \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta} \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi} \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho} - + % \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} @@ -10319,10 +10316,10 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} - + % \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} - + % \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} @@ -10331,7 +10328,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} - + % \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} @@ -10344,7 +10341,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} - + % \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} @@ -10355,7 +10352,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} - + % \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} @@ -10366,7 +10363,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} - + % \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} @@ -10377,12 +10374,12 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} - + % \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} - + % \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} @@ -10399,7 +10396,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} - + % \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} @@ -10410,30 +10407,30 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} - + % \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} - + % \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} - + % \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} - + % \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} - + % \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} - + % \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} - + % % Punctuation \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} @@ -10450,12 +10447,12 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} - + % \DeclareUnicodeCharacter{20AC}{\euro} - + % \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} - + % % Mathematical symbols \DeclareUnicodeCharacter{2200}{\ensuremath\forall} \DeclareUnicodeCharacter{2203}{\ensuremath\exists} @@ -10471,7 +10468,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{2265}{\ensuremath\geq} \DeclareUnicodeCharacter{2282}{\ensuremath\subset} \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq} - + % \DeclareUnicodeCharacter{2016}{\ensuremath\Vert} \DeclareUnicodeCharacter{2032}{\ensuremath\prime} \DeclareUnicodeCharacter{210F}{\ensuremath\hbar} @@ -10571,7 +10568,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor} \DeclareUnicodeCharacter{2322}{\ensuremath\frown} \DeclareUnicodeCharacter{2323}{\ensuremath\smile} - + % \DeclareUnicodeCharacter{25A1}{\ensuremath\Box} \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle} \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright} @@ -10603,7 +10600,7 @@ callback.register("process_output_buffer", convert_line_out) \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg} \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq} \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq} - + % \global\mathchardef\checkmark="1370 % actually the square root sign \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark} }% end of \utfeightchardefs commit 74ebd4a7917f8f23cea2f0beed62097370c5464d Author: Glenn Morris Date: Tue Feb 2 16:19:15 2016 -0500 * make-dist: Updates related to nt/. diff --git a/make-dist b/make-dist index 719e890..1cd1a50 100755 --- a/make-dist +++ b/make-dist @@ -362,7 +362,7 @@ echo "Making links to 'build-aux'" ln gitlog-to-changelog gitlog-to-emacslog ../${tempdir}/build-aux ln install-sh missing move-if-change ../${tempdir}/build-aux ln update-copyright update-subdirs ../${tempdir}/build-aux - ln dir_top make-info-dir ../${tempdir}/build-aux) + ln dir_top make-info-dir ar-lib ../${tempdir}/build-aux) echo "Making links to 'build-aux/snippet'" (cd build-aux/snippet @@ -421,9 +421,9 @@ echo "Making links to 'modules'" echo "Making links to 'nt'" (cd nt ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt - ln subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt + ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt ln *.in gnulib.mk ../${tempdir}/nt - ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt + ln mingw-cfg.site epaths.nt INSTALL.W64 ../${tempdir}/nt ln ChangeLog.*[0-9] INSTALL README README.W32 ../${tempdir}/nt) echo "Making links to 'nt/inc' and its subdirectories" commit 737193a44c1a6f52e910f262d5eaffec0270c024 Author: Glenn Morris Date: Tue Feb 2 16:08:03 2016 -0500 * make-dist: Add modules/. diff --git a/make-dist b/make-dist index db036e7..719e890 100755 --- a/make-dist +++ b/make-dist @@ -311,7 +311,7 @@ for subdir in site-lisp \ nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ `find etc lisp admin test -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ - info m4 msdos \ + info m4 modules modules/mod-test msdos \ nextstep nextstep/templates \ nextstep/Cocoa nextstep/Cocoa/Emacs.base \ nextstep/Cocoa/Emacs.base/Contents \ @@ -323,7 +323,7 @@ do if [ "$with_tests" != "yes" ]; then case $subdir in - test*) continue ;; + test*|*/mod-test*) continue ;; esac fi @@ -405,6 +405,19 @@ echo "Making links to 'm4'" (cd m4 ln *.m4 ../${tempdir}/m4) +echo "Making links to 'modules'" +(cd modules + ln *.py ../${tempdir}/modules + if [ "$with_tests" = "yes" ]; then + for f in `find mod-test -type f`; do + case $f in + *.log|*.o|*.so) continue ;; + esac + ln $f ../$tempdir/modules/$f + done + fi +) + echo "Making links to 'nt'" (cd nt ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt commit 3696bf2f63782cbe14e76e2e3aa62f42b784e190 Author: Glenn Morris Date: Tue Feb 2 15:53:01 2016 -0500 * make-dist: Update for super-special file that can't live in etc/. diff --git a/make-dist b/make-dist index 50662a4..db036e7 100755 --- a/make-dist +++ b/make-dist @@ -301,7 +301,7 @@ echo "Making links to top-level files" ln INSTALL README BUGS ${tempdir} ln ChangeLog.*[0-9] Makefile.in autogen.sh configure configure.ac ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} -ln aclocal.m4 ${tempdir} +ln aclocal.m4 CONTRIBUTE ${tempdir} echo "Creating subdirectories" for subdir in site-lisp \ commit a4278e28f6d6b22ba21468643c1cd8f6c60fb564 Author: Eli Zaretskii Date: Tue Feb 2 22:09:32 2016 +0200 Fix failure to compile ns-win.el in parallel builds * src/Makefile.in ($(lispsource)/term/ns-win.elc): Add order-only dependency on $(lispsource)/international/charprop.el. (Bug#22501) diff --git a/src/Makefile.in b/src/Makefile.in index fab10ae..f99a2f4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -501,6 +501,11 @@ $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \ $(lispsource)/international/ucs-normalize.elc: | \ $(lispsource)/international/charprop.el +## ns-win.el loads ucs-normalize, so it also needs the above-mentioned +## 2 uni-*.el files to exist. +$(lispsource)/term/ns-win.elc: | \ + $(lispsource)/international/charprop.el + lispintdir = ${lispsource}/international ${lispintdir}/cp51932.el ${lispintdir}/eucjp-ms.el: FORCE ${MAKE} -C ../admin/charsets $(notdir $@) commit 860da4dccb4f54391f3ff77a9dc23ca54e986cb4 Author: Eli Zaretskii Date: Tue Feb 2 20:31:43 2016 +0200 Fix names of tags generated for Ruby accessors * lib-src/etags.c (Ruby_functions): Don't include the leading colon ':' in tags for Ruby accessors and aliases. (Bug#22241) * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags. diff --git a/lib-src/etags.c b/lib-src/etags.c index 760685a..ca6fe51 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4721,6 +4721,8 @@ Ruby_functions (FILE *inf) do { char *np = cp; + if (*np == ':') + np++; cp = skip_name (cp); if (reader) make_tag (np, cp - np, true, diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index ac577e4..afb1096 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -171,15 +171,6 @@ ${CHECKOBJS} make-src/Makefile /^${CHECKOBJS}: CFLAGS=-g3 -DNULLFREECHECK=0$/ /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ -:bar= ruby-src/test1.ru /^ attr_writer :bar$/ -:foo ruby-src/test1.ru /^ attr_reader :foo$/ -:qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ -:read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:tee ruby-src/test1.ru /^ attr_accessor :tee$/ -:tee= ruby-src/test1.ru /^ attr_accessor :tee$/ -:write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -2565,6 +2556,7 @@ bar c-src/c.c /^void bar() {while(0) {}}$/ bar c.c 143 bar c-src/h.h 19 bar cp-src/x.cc /^XX::bar()$/ +bar= ruby-src/test1.ru /^ attr_writer :bar$/ bas_syn prol-src/natded.prolog /^bas_syn(n(_)).$/ base c-src/emacs/src/lisp.h 2188 base cp-src/c.C /^double base (void) const { return rng_base; }$/ @@ -3014,6 +3006,7 @@ foo f-src/entry.for /^ character*(*) function foo()$/ foo f-src/entry.strange_suffix /^ character*(*) function foo()$/ foo f-src/entry.strange /^ character*(*) function foo()$/ foo php-src/ptest.php /^foo()$/ +foo ruby-src/test1.ru /^ attr_reader :foo$/ foo! ruby-src/test1.ru /^ def foo!$/ foobar c-src/c.c /^int foobar() {;}$/ foobar c.c /^extern void foobar (void) __attribute__ ((section / @@ -3886,6 +3879,7 @@ questo ../c/c.web 34 quiettest make-src/Makefile /^quiettest:$/ quit_char c-src/emacs/src/keyboard.c 192 quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ +qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ qux= ruby-src/test1.ru /^ def qux=(tee)$/ r0 c-src/sysdep.h 54 r1 c-src/sysdep.h 55 @@ -3910,6 +3904,8 @@ read cp-src/conway.hpp /^ char read() { return alive; }$/ read php-src/lce_functions.php /^ function read()$/ read-key-sequence c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence", Fread_key_sequence, Sr/ read-key-sequence-vector c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence-vector", Fread_key_seque/ +read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ read_char c-src/emacs/src/keyboard.c /^read_char (int commandflag, Lisp_Object map,$/ read_char_help_form_unwind c-src/emacs/src/keyboard.c /^read_char_help_form_unwind (void)$/ read_char_minibuf_menu_prompt c-src/emacs/src/keyboard.c /^read_char_minibuf_menu_prompt (int commandflag,$/ @@ -4284,6 +4280,8 @@ tags-with-face el-src/emacs/lisp/progmodes/etags.el /^(defmacro tags-with-face ( target_multibyte c-src/emacs/src/regex.h 407 tcpdump html-src/software.html /^tcpdump$/ teats cp-src/c.C 127 +tee ruby-src/test1.ru /^ attr_accessor :tee$/ +tee= ruby-src/test1.ru /^ attr_accessor :tee$/ temporarily_switch_to_single_kboard c-src/emacs/src/keyboard.c /^temporarily_switch_to_single_kboard (struct frame / tend c-src/etags.c 2432 terminate objc-src/Subprocess.m /^- terminate:sender$/ @@ -4452,6 +4450,8 @@ womboid c-src/h.h 75 word_size c-src/emacs/src/lisp.h 1473 write php-src/lce_functions.php /^ function write()$/ write php-src/lce_functions.php /^ function write($save="yes")$/ +write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ write_abbrev c-src/abbrev.c /^write_abbrev (sym, stream)$/ write_classname c-src/etags.c /^write_classname (linebuffer *cn, const char *quali/ write_lex prol-src/natded.prolog /^write_lex(File):-$/ diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 84831c9..87ab88f 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3061,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3074,15 +3074,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index b97d5f7..8615982 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3631,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3644,15 +3644,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 108fcae..52d5a61 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3408,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3421,15 +3421,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 1f10a40..333274c 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3225,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3238,15 +3238,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 0a6cfc8..fdf2329 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -4155,15 +4155,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index cb1264f..95d59d3 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -4155,15 +4155,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 commit 1fa431d3145ffea33fb3272b5d09f961a17974f1 Author: Glenn Morris Date: Tue Feb 2 13:14:45 2016 -0500 * lisp/vc/add-log.el (change-log-directory-files, find-change-log): Doc tweaks. diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index ceb0d42..112bc7b 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -172,7 +172,7 @@ Note: The search is conducted only within 10%, at the beginning of the file." :group 'change-log) (defcustom change-log-directory-files '(".bzr" ".git" ".hg" ".svn") - "List of files that cause ChangeLog search to stop in containing directory. + "List of files that cause `find-change-log' to stop in containing directory. This applies if no pre-existing ChangeLog is found. If nil, then in such a case simply use the directory containing the changed file." :version "25.2" @@ -699,7 +699,11 @@ If `change-log-default-name' is nil, behave as though it were \"ChangeLog\" If `change-log-default-name' contains a leading directory component, then simply find it in the current directory. Otherwise, search in the current -directory and its successive parents for a file so named. +directory and its successive parents for a file so named. Stop at the first +such file that exists (or has a buffer visiting it), or the first directory +that contains any of `change-log-directory-files'. If no match is found, +use the current directory. To override the choice of this function, +simply create an empty ChangeLog file first by hand in the desired place. Once a file is found, `change-log-default-name' is set locally in the current buffer to the complete file name. commit f6213ce79981747b3cb2c8213710986b93999fe5 Author: Eli Zaretskii Date: Tue Feb 2 20:01:33 2016 +0200 Fix file-name recognition in 'etags' * lib-src/etags.c (get_language_from_filename): If FILE includes a leading directory, compare only its basename to the known file names in lang_names[]. * test/etags/Makefile (RBSRC): Adapt to recent test1.ruby renaming. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby file names and to the results in Makefile due to the above etags.c fix. diff --git a/lib-src/etags.c b/lib-src/etags.c index acf20dd..760685a 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1485,8 +1485,16 @@ get_language_from_filename (char *file, int case_sensitive) { language *lang; const char **name, **ext, *suffix; + char *slash; /* Try whole file name first. */ + slash = strrchr (file, '/'); + if (slash != NULL) + file = slash + 1; +#ifdef DOS_NT + else if (file[0] && file[1] == ':') + file += 2; +#endif for (lang = lang_names; lang->name != NULL; lang++) if (lang->filenames != NULL) for (name = lang->filenames; *name != NULL; name++) diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index c4962a7..ac577e4 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -1,17 +1,5 @@ #a-defer-word forth-src/test-forth.fth /^defer #a-defer-word$/ #some-storage forth-src/test-forth.fth /^2000 buffer: #some-storage$/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--no-members' ${LATEST}ediff$/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--declarations --no-members' $/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--members' ${LATEST}ediff$/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--regex=@regexfile --no-member/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='nonexistent --members --declar/ -$ make-src/Makefile /^ @-$(MAKE) ${LATEST}cdiff$/ -$ make-src/Makefile /^ $(CC) ${FASTCFLAGS} -c $?$/ -$ make-src/Makefile /^ $(CC) ${FASTCFLAGS} -c $?$/ -$ make-src/Makefile /^ $(CC) ${FASTCFLAGS} -c $?$/ -$ make-src/Makefile /^ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o etags e/ -$ make-src/Makefile /^ $(CC) $(CFLAGS) $(CPPFLAGS) -DCTAGS $(LDFLAGS) -o/ -$$i make-src/Makefile 140 $0x80 c-src/sysdep.h 32 $SYS_##syscall_na c-src/sysdep.h 31 $domain php-src/lce_functions.php 175 @@ -41,6 +29,9 @@ $unk_comment_lc php-src/lce_functions.php 117 $user_comment php-src/lce_functions.php 109 $user_comment php-src/lce_functions.php 167 $user_comment_lc php-src/lce_functions.php 115 +${CHECKOBJS} make-src/Makefile /^${CHECKOBJS}: CFLAGS=-g3 -DNULLFREECHECK=0$/ +%cdiff make-src/Makefile /^%cdiff: CTAGS% CTAGS ${infiles}$/ +%ediff make-src/Makefile /^%ediff: ETAGS% ETAGS ${infiles}$/ ($_,$flag,$opt,$f,$r,@temp perl-src/yagrip.pl 8 ($prog,$_,@list perl-src/yagrip.pl 39 ($string,$flag,@string,@temp,@last perl-src/yagrip.pl 40 @@ -48,6 +39,7 @@ $user_comment_lc php-src/lce_functions.php 115 (another-forth-word forth-src/test-forth.fth /^: (another-forth-word) ( -- )$/ + ruby-src/test.rb /^ def +(y)$/ + tex-src/texinfo.tex /^\\def+{{\\tt \\char 43}}$/ +.PRECIOUS make-src/Makefile /^.PRECIOUS: ETAGS CTAGS ETAGS16 CTAGS16 ETAGS17 CTA/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ @@ -138,6 +130,8 @@ $user_comment_lc php-src/lce_functions.php 115 /graymode ps-src/rfc1245.ps /^\/graymode true def$/ /grayness ps-src/rfc1245.ps /^\/grayness {$/ /guillemotleft ps-src/rfc1245.ps /^\/guillemotleft \/guillemotright \/ellipsis \/.notdef / +/home/www/pub/etags.c.gz make-src/Makefile /^\/home\/www\/pub\/etags.c.gz: etags.c$/ +/home/www/pub/software/unix/etags.tar.gz make-src/Makefile /^\/home\/www\/pub\/software\/unix\/etags.tar.gz: Makefile/ /hx ps-src/rfc1245.ps /^\/hx { $/ /i ps-src/rfc1245.ps /^\/i \/j \/k \/l \/m \/n \/o \/p \/q \/r \/s \/t \/u \/v \/w \/x \/y/ /iacute ps-src/rfc1245.ps /^\/iacute \/igrave \/icircumflex \/idieresis \/ntilde \/o/ @@ -177,15 +171,15 @@ $user_comment_lc php-src/lce_functions.php 115 /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ -:bar= ruby-src/test1.ruby /^ attr_writer :bar$/ -:foo ruby-src/test1.ruby /^ attr_reader :foo$/ -:qux ruby-src/test1.ruby /^ alias_method :qux, :tee$/ -:read1 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ -:read2 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ -:tee ruby-src/test1.ruby /^ attr_accessor :tee$/ -:tee= ruby-src/test1.ruby /^ attr_accessor :tee$/ -:write1= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ -:write2= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:bar= ruby-src/test1.ru /^ attr_writer :bar$/ +:foo ruby-src/test1.ru /^ attr_reader :foo$/ +:qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ +:read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +:read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +:tee ruby-src/test1.ru /^ attr_accessor :tee$/ +:tee= ruby-src/test1.ru /^ attr_accessor :tee$/ +:write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +:write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -216,16 +210,6 @@ $user_comment_lc php-src/lce_functions.php 115 > tex-src/texinfo.tex /^\\def>{{\\tt \\gtr}}$/ >field1 forth-src/test-forth.fth /^ 9 field >field1$/ >field2 forth-src/test-forth.fth /^ 5 field >field2$/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--no-members' ${LATEST}ediff$/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--declarations --no-members' ${/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--members' ${LATEST}ediff$/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--regex=@regexfile --no-members/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='nonexistent --members --declara/ -@$ make-src/Makefile /^ @$(MAKE) ${LATEST}cdiff$/ -@$ make-src/Makefile /^ @$(MAKE) etags "CPPFLAGS=-UVERSION"$/ -@$ make-src/Makefile /^ @$(MAKE) CHECKOBJS= CHECKFLAGS= etags "CFLAGS=-an/ -@$ make-src/Makefile /^ @$(MAKE) CHECKOBJS= CHECKFLAGS= ctags "CFLAGS=-an/ -@$ make-src/Makefile /^ @$(MAKE) etags CHECKOBJS= CHECKFLAGS= REGEXOBJS= / A c.c 162 A cp-src/c.C 39 A cp-src/c.C 56 @@ -235,9 +219,10 @@ A cp-src/c.C 73 A cp-src/c.C 117 A cp-src/fail.C 7 A cp-src/fail.C 23 -A ruby-src/test1.ruby /^class A$/ -A ruby-src/test1.ruby /^module A$/ -ABC ruby-src/test1.ruby 11 +A ruby-src/test1.ru /^class A$/ +A ruby-src/test1.ru /^module A$/ +ABC ruby-src/test1.ru 11 +ADASRC make-src/Makefile /^ADASRC=etags-test-for.ada 2ataspri.adb 2ataspri.ad/ ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/ ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378 ALLOCATED_BEFORE_DUMPING c-src/emacs/src/gmalloc.c /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/ @@ -247,6 +232,7 @@ AND y-src/cccp.c 11 ANSIC c-src/h.h 84 ANSIC c-src/h.h 85 AREF c-src/emacs/src/lisp.h /^AREF (Lisp_Object array, ptrdiff_t idx)$/ +ARGS make-src/Makefile /^ARGS=- < srclist$/ ARITH_EQUAL c-src/emacs/src/lisp.h 3498 ARITH_GRTR c-src/emacs/src/lisp.h 3501 ARITH_GRTR_OR_EQUAL c-src/emacs/src/lisp.h 3503 @@ -259,6 +245,7 @@ ARRAY_MARK_FLAG c-src/emacs/src/lisp.h 768 ASCII_CHAR_P c-src/emacs/src/lisp.h /^#define ASCII_CHAR_P(c) UNSIGNED_CMP (c, <, 0x80)$/ ASET c-src/emacs/src/lisp.h /^ASET (Lisp_Object array, ptrdiff_t idx, Lisp_Objec/ ASIZE c-src/emacs/src/lisp.h /^ASIZE (Lisp_Object array)$/ +ASRC make-src/Makefile /^ASRC=empty.zz empty.zz.gz$/ AST_Array::AST_Array cp-src/c.C /^AST_Array::AST_Array(UTL_ScopedName *n, unsigned l/ AST_ConcreteType::AST_ConcreteType cp-src/c.C /^AST_ConcreteType::AST_ConcreteType(AST_Decl::NodeT/ AST_Root cp-src/c.C 92 @@ -300,7 +287,7 @@ B cp-src/c.C /^void B::B() {}$/ B cp-src/c.C 122 B cp-src/fail.C 8 B cp-src/fail.C 24 -B ruby-src/test1.ruby /^ class B$/ +B ruby-src/test1.ru /^ class B$/ BE_Node cp-src/c.C /^void BE_Node::BE_Node() {}$/ BE_Node cp-src/c.C 77 BITS_PER_BITS_WORD c-src/emacs/src/lisp.h 125 @@ -349,7 +336,7 @@ CAR_SAFE c-src/emacs/src/lisp.h /^CAR_SAFE (Lisp_Object c)$/ CATCHER c-src/emacs/src/lisp.h 3021 CDR c-src/emacs/src/lisp.h /^CDR (Lisp_Object c)$/ CDR_SAFE c-src/emacs/src/lisp.h /^CDR_SAFE (Lisp_Object c)$/ -CFLAGS make-src/Makefile 88 +CFLAGS make-src/Makefile /^CFLAGS=${WARNINGS} -ansi -g3 # -pg -O$/ CHAR c-src/etags.c /^#define CHAR(x) ((unsigned int)(x) & (CHARS - 1))/ CHAR y-src/cccp.c 7 CHARACTERBITS c-src/emacs/src/lisp.h 2457 @@ -377,7 +364,8 @@ CHAR_TABLE_SET c-src/emacs/src/lisp.h /^CHAR_TABLE_SET (Lisp_Object ct, int idx, CHAR_TABLE_STANDARD_SLOTS c-src/emacs/src/lisp.h 1697 CHAR_TYPE_SIZE cccp.y 87 CHAR_TYPE_SIZE y-src/cccp.y 87 -CHECKEROPTS make-src/Makefile 92 +CHECKFLAGS make-src/Makefile /^CHECKFLAGS=-DDEBUG -Wno-unused-function$/ +CHECKOBJS make-src/Makefile /^CHECKOBJS=chkmalloc.o chkxm.o$/ CHECK_ARRAY c-src/emacs/src/lisp.h /^CHECK_ARRAY (Lisp_Object x, Lisp_Object predicate)/ CHECK_BOOL_VECTOR c-src/emacs/src/lisp.h /^CHECK_BOOL_VECTOR (Lisp_Object x)$/ CHECK_BUFFER c-src/emacs/src/lisp.h /^CHECK_BUFFER (Lisp_Object x)$/ @@ -416,6 +404,7 @@ CK_REL_R parse.y /^#define CK_REL_R(x) if( ((x)>0 && MAX_ROW-(x)$/ test go-src/test1.go /^func test(p plus) {$/ +test make-src/Makefile /^test:$/ test php-src/ptest.php /^test $/ test.me22b lua-src/test.lua /^ local function test.me22b (one)$/ test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ @@ -4386,15 +4439,12 @@ warning cccp.y /^warning (msg)$/ warning y-src/cccp.y /^warning (msg)$/ weak c-src/emacs/src/lisp.h 1830 weak_alias c-src/emacs/src/gmalloc.c /^weak_alias (free, cfree)$/ +web ftp publish make-src/Makefile /^web ftp publish:$/ what c-src/etags.c 252 wheel_syms c-src/emacs/src/keyboard.c 4628 where c-src/emacs/src/lisp.h 2348 where cp-src/clheir.hpp 77 where_in_registry cp-src/clheir.hpp 15 -width make-src/Makefile 186 -width make-src/Makefile 189 -width make-src/Makefile 192 -width make-src/Makefile 195 windowWillClose objcpp-src/SimpleCalc.M /^- windowWillClose:sender$/ wipe_kboard c-src/emacs/src/keyboard.c /^wipe_kboard (KBOARD *kb)$/ womboid c-src/h.h 63 @@ -4432,6 +4482,7 @@ x-get-selection-internal c.c /^DEFUN ("x-get-selection-internal", Fx_get_selecti x-get-selection-internal c.c /^ Fx_get_selection_internal, Sx_get_selection/ xcar_addr c-src/emacs/src/lisp.h /^xcar_addr (Lisp_Object c)$/ xcdr_addr c-src/emacs/src/lisp.h /^xcdr_addr (Lisp_Object c)$/ +xdiff make-src/Makefile /^xdiff: ETAGS EXTAGS ${infiles}$/ xmalloc c-src/etags.c /^xmalloc (size_t size)$/ xnew c-src/etags.c /^#define xnew(n, Type) ((Type *) xmalloc ((n) / xrealloc c-src/etags.c /^xrealloc (void *ptr, size_t size)$/ @@ -4440,6 +4491,7 @@ xref-location-line el-src/emacs/lisp/progmodes/etags.el /^(cl-defmethod xref-loc xref-location-marker el-src/emacs/lisp/progmodes/etags.el /^(cl-defmethod xref-location-marker ((l xref-etags-/ xref-make-etags-location el-src/emacs/lisp/progmodes/etags.el /^(defun xref-make-etags-location (tag-info file)$/ xrnew c-src/etags.c /^#define xrnew(op, n, Type) ((op) = (Type *) xreall/ +xx make-src/Makefile /^xx="this line is here because of a fontlock bug$/ y cp-src/conway.hpp 7 y cp-src/clheir.hpp 49 y cp-src/clheir.hpp 58 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 435cd08..84831c9 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -2362,49 +2362,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1133 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3009,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 4abdc90..b97d5f7 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -2931,50 +2931,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1156 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(140,5320 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3580,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 94815ca..108fcae 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -2682,49 +2682,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1133 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3356,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index f71e1b0..1f10a40 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -2526,49 +2526,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1133 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3173,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index d51542c..0a6cfc8 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -3415,50 +3415,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1156 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(140,5320 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -4091,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 84b7319..cb1264f 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -3415,50 +3415,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1156 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(140,5320 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -4091,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/Makefile b/test/etags/Makefile index 21a77eb..6e33571 100644 --- a/test/etags/Makefile +++ b/test/etags/Makefile @@ -24,7 +24,7 @@ PHPSRC=$(addprefix ./php-src/,lce_functions.php ptest.php sendmail.php) PSSRC=$(addprefix ./ps-src/,rfc1245.ps) PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog) PYTSRC=$(addprefix ./pyt-src/,server.py) -RBSRC=$(addprefix ./ruby-src/,test.rb test1.ruby) +RBSRC=$(addprefix ./ruby-src/,test.rb test1.ru) TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex) YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y) SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ commit e42e662f26523ba0d10c41ab6deead85077c9f79 Author: Eli Zaretskii Date: Tue Feb 2 19:50:08 2016 +0200 Change Ruby file names and extensions recognized by 'etags' * lib-src/etags.c : New variable, holds names of Ruby files. : Treat .rb, .ru, and .rbw as Ruby extensions. : Add Ruby_filenames to the Ruby entry. * test/etags/ruby-src/test1.ru: Renamed from test1.ruby. (Bug#22241) diff --git a/lib-src/etags.c b/lib-src/etags.c index 769a220..acf20dd 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -729,7 +729,9 @@ static const char Python_help [] = generate a tag."; static const char *Ruby_suffixes [] = - { "rb", "ruby", NULL }; + { "rb", "ru", "rbw", NULL }; +static const char *Ruby_filenames [] = + { "Rakefile", "Thorfile", NULL }; static const char Ruby_help [] = "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\ a line generate a tag. Constants also generate a tag."; @@ -813,7 +815,7 @@ static language lang_names [] = { "proc", no_lang_help, plain_C_entries, plain_C_suffixes }, { "prolog", Prolog_help, Prolog_functions, Prolog_suffixes }, { "python", Python_help, Python_functions, Python_suffixes }, - { "ruby", Ruby_help, Ruby_functions, Ruby_suffixes }, + { "ruby", Ruby_help,Ruby_functions,Ruby_suffixes,Ruby_filenames }, { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes }, { "tex", TeX_help, TeX_commands, TeX_suffixes }, { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes }, diff --git a/test/etags/ruby-src/test1.ru b/test/etags/ruby-src/test1.ru new file mode 100644 index 0000000..75dcd51 --- /dev/null +++ b/test/etags/ruby-src/test1.ru @@ -0,0 +1,38 @@ +class A + def a() + super(" do ") + end + def b() + end +end + +module A + class B + ABC = 4 + Def_ = 'blah' + Xyzzy =10 + + def foo! + end + + def self._bar?(abc) + end + + class << self + def qux=(tee) + end + end + def X + attr_reader :foo + attr_reader :read1, :read2; attr_writer :write1, :write2 + attr_writer :bar + attr_accessor :tee + alias_method :qux, :tee + end + end +end + +A::Constant = 5 + +# def foo_in_comment +# end diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby deleted file mode 100644 index 75dcd51..0000000 --- a/test/etags/ruby-src/test1.ruby +++ /dev/null @@ -1,38 +0,0 @@ -class A - def a() - super(" do ") - end - def b() - end -end - -module A - class B - ABC = 4 - Def_ = 'blah' - Xyzzy =10 - - def foo! - end - - def self._bar?(abc) - end - - class << self - def qux=(tee) - end - end - def X - attr_reader :foo - attr_reader :read1, :read2; attr_writer :write1, :write2 - attr_writer :bar - attr_accessor :tee - alias_method :qux, :tee - end - end -end - -A::Constant = 5 - -# def foo_in_comment -# end commit b65255ea20e02a6a0569e045f8f3a29b2410c1c2 Author: Paul Eggert Date: Tue Feb 2 09:28:52 2016 -0800 Port better to platforms lacking aligned_alloc Problem reported by Ken Brown (Bug#22522). * src/lisp.h (hybrid_aligned_alloc) [HYBRID_MALLOC && !HAVE_ALIGNED_ALLOC]: New decl. diff --git a/src/lisp.h b/src/lisp.h index ef86c4f..54bce0f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3771,11 +3771,14 @@ extern void check_cons_list (void); INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); } #endif -#if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC /* Defined in gmalloc.c. */ +#if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC extern size_t __malloc_extra_blocks; extern void *aligned_alloc (size_t, size_t); #endif +#if defined HYBRID_MALLOC && !defined HAVE_ALIGNED_ALLOC +extern void *hybrid_aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2)); +#endif extern void malloc_enable_thread (void); #ifdef REL_ALLOC commit 39d8cac38b1668b3dc12dd5a2cfa35ce57adbac9 Author: Paul Eggert Date: Tue Feb 2 09:16:24 2016 -0800 Port malloc.h hygiene fix to LTO * src/alloc.c (__malloc_initialize_hook): Make it externally visible (Bug#22522). diff --git a/src/alloc.c b/src/alloc.c index 57ef4c5..b40c1f3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -157,10 +157,12 @@ malloc_initialize_hook (void) } } +/* Declare the malloc initialization hook, which runs before 'main' starts. + EXTERNALLY_VISIBLE works around Bug#22522. */ # ifndef __MALLOC_HOOK_VOLATILE # define __MALLOC_HOOK_VOLATILE # endif -voidfuncptr __MALLOC_HOOK_VOLATILE __malloc_initialize_hook +voidfuncptr __MALLOC_HOOK_VOLATILE __malloc_initialize_hook EXTERNALLY_VISIBLE = malloc_initialize_hook; #endif commit 58bfb6a4f597b98f01169f42410df3184c451408 Author: Eli Zaretskii Date: Tue Feb 2 19:16:22 2016 +0200 More improvements for Ruby support in 'etags' * lib-src/etags.c (Ruby_functions): Tag Ruby accessors and alias_method. Identify constants even if the assignment is not followed by whitespace. (Bug#22241) * test/etags/ruby-src/test1.ruby: Add tests for constants, accessors, and alias_method. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tests. diff --git a/lib-src/etags.c b/lib-src/etags.c index bdfced5..769a220 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4642,7 +4642,7 @@ Ruby_functions (FILE *inf) if (cp > name + 1) { bp = skip_spaces (cp); - if (*bp == '=' && c_isspace (bp[1])) + if (*bp == '=' && !(bp[1] == '=' || bp[1] == '>')) { if (colon && !c_isspace (colon[1])) name = colon + 1; @@ -4656,7 +4656,7 @@ Ruby_functions (FILE *inf) || LOOKING_AT (cp, "module")) { const char self_name[] = "self."; - const size_t self_size1 = sizeof ("self.") - 1; + const size_t self_size1 = sizeof (self_name) - 1; name = cp; @@ -4688,6 +4688,60 @@ Ruby_functions (FILE *inf) make_tag (name, cp - name, true, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } + else + { + /* Tag accessors and aliases. */ + while (*cp && *cp != '#') + { + bool reader = false, writer = false, alias = false; + + if (LOOKING_AT (cp, "attr_reader")) + reader = true; + else if (LOOKING_AT (cp, "attr_writer")) + writer = true; + else if (LOOKING_AT (cp, "attr_accessor")) + { + reader = true; + writer = true; + } + else if (LOOKING_AT (cp, "alias_method")) + alias = true; + if (reader || writer || alias) + { + do { + char *np = cp; + + cp = skip_name (cp); + if (reader) + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + if (writer) + { + size_t name_len = cp - np + 1; + char *wr_name = xnew (name_len + 1, char); + + memcpy (wr_name, np, name_len - 1); + memcpy (wr_name + name_len - 1, "=", 2); + pfnote (wr_name, true, lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + } + if (alias) + { + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + while (*cp && *cp != '#' && *cp != ';') + cp++; + } + } while (*cp == ',' + && (cp = skip_spaces (cp + 1), *cp && *cp != '#')); + } + cp = skip_name (cp); + while (*cp && *cp != '#' && notinname (*cp)) + cp++; + } + } } } diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index 846725e..c4962a7 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -177,6 +177,15 @@ $user_comment_lc php-src/lce_functions.php 115 /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ +:bar= ruby-src/test1.ruby /^ attr_writer :bar$/ +:foo ruby-src/test1.ruby /^ attr_reader :foo$/ +:qux ruby-src/test1.ruby /^ alias_method :qux, :tee$/ +:read1 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:read2 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:tee ruby-src/test1.ruby /^ attr_accessor :tee$/ +:tee= ruby-src/test1.ruby /^ attr_accessor :tee$/ +:write1= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:write2= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -460,7 +469,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ -Constant ruby-src/test1.ruby 26 +Constant ruby-src/test1.ruby 35 ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ Controls pyt-src/server.py /^class Controls:$/ CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ @@ -522,6 +531,7 @@ DOS_NT c-src/etags.c 117 DOS_NT c-src/etags.c 118 DUMPED c-src/emacs/src/gmalloc.c 80 Debug cp-src/functions.cpp /^void Debug ( int lineno, int level, char* func , c/ +Def_ ruby-src/test1.ruby 12 DisposeANameList pas-src/common.pas /^procedure DisposeANameList( $/ DisposeNameList pas-src/common.pas /^procedure DisposeNameList;$/ ELEM_I c-src/h.h 3 @@ -1457,6 +1467,7 @@ WorkingDays cp-src/functions.cpp /^int WorkingDays(Date a, Date b){$/ Write_Lock/p ada-src/2ataspri.adb /^ procedure Write_Lock (L : in out Lock; Ceiling_/ Write_Lock/p ada-src/2ataspri.ads /^ procedure Write_Lock (L : in out Lock; Ceiling_/ X c-src/h.h 100 +X ruby-src/test1.ruby /^ def X$/ XBOOL_VECTOR c-src/emacs/src/lisp.h /^XBOOL_VECTOR (Lisp_Object a)$/ XBUFFER c-src/emacs/src/lisp.h /^XBUFFER (Lisp_Object a)$/ XBUFFER_OBJFWD c-src/emacs/src/lisp.h /^XBUFFER_OBJFWD (union Lisp_Fwd *a)$/ @@ -1534,6 +1545,7 @@ XUNTAG c-src/emacs/src/lisp.h /^# define XUNTAG(a, type) lisp_h_XUNTAG (a, type XUNTAG c-src/emacs/src/lisp.h /^XUNTAG (Lisp_Object a, int type)$/ XWINDOW c-src/emacs/src/lisp.h /^XWINDOW (Lisp_Object a)$/ XX cp-src/x.cc 1 +Xyzzy ruby-src/test1.ruby 13 Y c-src/h.h 100 YACC c-src/etags.c 2199 YELLOW cp-src/screen.hpp 26 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index c7b1221..435cd08 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3009,17 +3009,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 8d0f338..4abdc90 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3580,17 +3580,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 060389c..94815ca 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3356,17 +3356,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 40404f9..f71e1b0 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3173,17 +3173,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 432819d..d51542c 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4091,17 +4091,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 4ad5d76..84b7319 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4091,17 +4091,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby index 26b7d53..75dcd51 100644 --- a/test/etags/ruby-src/test1.ruby +++ b/test/etags/ruby-src/test1.ruby @@ -9,6 +9,8 @@ end module A class B ABC = 4 + Def_ = 'blah' + Xyzzy =10 def foo! end @@ -20,6 +22,13 @@ module A def qux=(tee) end end + def X + attr_reader :foo + attr_reader :read1, :read2; attr_writer :write1, :write2 + attr_writer :bar + attr_accessor :tee + alias_method :qux, :tee + end end end commit c04e91134f256be298d8739d493aa8df7e8d05ec Author: Paul Eggert Date: Mon Feb 1 23:45:10 2016 -0800 Add --git-config option to autogen.sh * autogen.sh: New options --git-config, --help. (git_config): New shell var. Alter function to respect this var. diff --git a/autogen.sh b/autogen.sh index 42a779e..4a0fbb7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,6 +104,21 @@ check_version () } +git_config=true + +for arg +do + case $arg in + --git-config=false) git_config=false;; + --git-config=true) git_config=true ;; + --help) + exec echo "$0: usage: $0 [--help|--git-config=[false|true]]";; + *) + echo >&2 "$0: $arg: unknown option"; exit 1;; + esac +done + + cat < src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then - # Like 'git config NAME VALUE', but verbose on change and exit on failure. + # Like 'git config NAME VALUE', but conditional on --git-config, + # verbose on change, and exiting on failure. git_config () { name=$1 value=$2 - ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { + + if $git_config; then + ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { echo "${Configuring_git}git config $name '$value'" Configuring_git= git config "$name" "$value" || exit - } + } + fi } Configuring_git='Configuring git... ' commit 57134666465488819ac1fe0678484eefb9bd7853 Author: Lars Ingebrigtsen Date: Tue Feb 2 18:00:02 2016 +1100 Fix editing undo changes in eww fields * eww.el (eww-tag-form): Don't overwrite initial form data in text fields. (eww-process-text-input): Make `M-t' at the end of text fields work better (bug#19085). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 147ba5f..7f98b5b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -921,6 +921,7 @@ network, but just re-display the HTML already fetched." (let ((eww-form (list (cons :method (dom-attr dom 'method)) (cons :action (dom-attr dom 'action)))) (start (point))) + (insert "\n") (shr-ensure-paragraph) (shr-generic dom) (unless (bolp) @@ -1030,6 +1031,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (1- end))))) (let* ((form (get-text-property pos 'eww-form)) (properties (text-properties-at pos)) + (buffer-undo-list t) (inhibit-read-only t) (length (- end beg replace-length)) (type (plist-get form :type))) @@ -1050,13 +1052,13 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") ((< length 0) ;; Add padding. (save-excursion - (goto-char (1- end)) + (goto-char end) (goto-char (if (equal type "textarea") (1- (line-end-position)) (1+ (eww-end-of-field)))) (let ((start (point))) - (insert (make-string (abs length) ? )) + (insert (make-string (abs length) ? )) (set-text-properties start (point) properties)) (goto-char (1- end))))) (set-text-properties (plist-get form :start) (plist-get form :end) @@ -1070,8 +1072,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (when (equal type "password") ;; Display passwords as asterisks. (let ((start (eww-beginning-of-field))) - (put-text-property start (+ start (length value)) - 'display (make-string (length value) ?*))))))))) + (put-text-property + start (+ start (length value)) + 'display (make-string (length value) ?*))))))))) (defun eww-tag-textarea (dom) (let ((start (point)) commit 51362d68d14af92799c65198a690f769b04d456d Author: Lars Ingebrigtsen Date: Tue Feb 2 15:57:07 2016 +1100 Allow the user more control of popping up the eww window * eww.el (eww): Use pop-to-buffer-same-window (suggested by Michael Heerdegen) (bug#22244). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 128752a..147ba5f 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -274,7 +274,7 @@ word(s) will be searched for via `eww-search-prefix'." (setq url (concat url "/")))) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url)))))) - (switch-to-buffer + (pop-to-buffer-same-window (if (eq major-mode 'eww-mode) (current-buffer) (get-buffer-create "*eww*"))) commit ee0fbd854f452ef268de76892ed6b671c91f6d48 Author: Lars Ingebrigtsen Date: Tue Feb 2 15:53:39 2016 +1100 Make eww-browse-url with new-window parameter work again * eww.el (eww-browse-url): Stay in the same buffer if we're already in a eww mode buffer so that eww-browse-url with a new-window parameter works (bug#22244). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 372b674..128752a 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -274,6 +274,10 @@ word(s) will be searched for via `eww-search-prefix'." (setq url (concat url "/")))) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url)))))) + (switch-to-buffer + (if (eq major-mode 'eww-mode) + (current-buffer) + (get-buffer-create "*eww*"))) (eww-setup-buffer) (plist-put eww-data :url url) (plist-put eww-data :title "") @@ -556,7 +560,6 @@ Currently this means either text/html or application/xhtml+xml." (goto-char (point-min))) (defun eww-setup-buffer () - (switch-to-buffer (get-buffer-create "*eww*")) (when (or (plist-get eww-data :url) (plist-get eww-data :dom)) (eww-save-history)) commit 9c3142dcc09841a8bd2c25a2ddd3a9121a5015b6 Author: Lars Ingebrigtsen Date: Tue Feb 2 15:43:35 2016 +1100 Clean up eww code slightly * eww.el (eww-browse-url): Clean up code slightly. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 29cde24..372b674 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -744,9 +744,9 @@ the like." ;;;###autoload (defun eww-browse-url (url &optional new-window) - (cond (new-window - (switch-to-buffer (generate-new-buffer "*eww*")) - (eww-mode))) + (when new-window + (switch-to-buffer (generate-new-buffer "*eww*")) + (eww-mode)) (eww url)) (defun eww-back-url () commit cb035f348ecee23009461af9ce3aa6f92996684f Author: Lars Ingebrigtsen Date: Tue Feb 2 05:16:34 2016 +0100 Don't insert nil faces in shr * shr.el (shr-insert-table): Don't add nil faces, because that will show up in *Messages* as "Invalid face reference: nil [32 times]". diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 41c5f95..c600c74 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1754,17 +1754,18 @@ The preference is a float determined from `shr-prefer-media-type'." align))) (dolist (line lines) (end-of-line) - (let ((start (point))) - (insert - line - (propertize " " - 'display `(space :align-to (,pixel-align)) - 'face (and (> (length line) 0) - (shr-face-background - (get-text-property - (1- (length line)) 'face line))) - 'shr-table-indent shr-table-id) - shr-table-vertical-line) + (let ((start (point)) + (background (and (> (length line) 0) + (shr-face-background + (get-text-property + (1- (length line)) 'face line)))) + (space (propertize + " " + 'display `(space :align-to (,pixel-align)) + 'shr-table-indent shr-table-id))) + (when background + (setq space (propertize space 'face background))) + (insert line space shr-table-vertical-line) (shr-colorize-region start (1- (point)) (nth 5 column) (nth 6 column))) (forward-line 1)) commit 4c3fae351a6015eef3a672529b0ba9877e16b08b Author: Glenn Morris Date: Mon Feb 1 21:00:58 2016 -0500 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary. diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 9c15f3b..9ee405b 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -53,34 +53,16 @@ ;; all the bells and whistles one would expect, including syntax ;; highlighting and auto indentation. It can also send regions to an ;; inferior Prolog process. -;; -;; The code requires the comint, easymenu, info, imenu, and font-lock -;; libraries. These are normally distributed with GNU Emacs and -;; XEmacs. -;;; Installation: -;; -;; Insert the following lines in your init file: -;; -;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) -;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) -;; (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) -;; (autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t) +;; Some settings you may wish to use: + ;; (setq prolog-system 'swi) ; optional, the system you are using; ;; ; see `prolog-system' below for possible values -;; (setq auto-mode-alist (append '(("\\.pl$" . prolog-mode) -;; ("\\.m$" . mercury-mode)) +;; (setq auto-mode-alist (append '(("\\.pl\\'" . prolog-mode) +;; ("\\.m\\'" . mercury-mode)) ;; auto-mode-alist)) ;; -;; where the path in the first line is the file system path to this file. -;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp". -;; Note: In XEmacs, either `/usr/lib/xemacs/site-lisp' (RPM default in -;; Red Hat-based distributions) or `/usr/local/lib/xemacs/site-lisp' -;; (default when compiling from sources) are automatically added to -;; `load-path', so the first line is not necessary provided that you -;; put this file in the appropriate place. -;; -;; The last s-expression above makes sure that files ending with .pl +;; The last expression above makes sure that files ending with .pl ;; are assumed to be Prolog files and not Perl, which is the default ;; Emacs setting. If this is not wanted, remove this line. It is then ;; necessary to either @@ -98,8 +80,8 @@ ;; If the command to start the prolog process ('sicstus', 'pl' or ;; 'swipl' for SWI prolog, etc.) is not available in the default path, ;; then it is necessary to set the value of the environment variable -;; EPROLOG to a shell command to invoke the prolog process. In XEmacs -;; and Emacs 20+ you can also customize the variable +;; EPROLOG to a shell command to invoke the prolog process. +;; You can also customize the variable ;; `prolog-program-name' (in the group `prolog-inferior') and provide ;; a full path for your Prolog system (swi, scitus, etc.). ;; @@ -109,6 +91,7 @@ ;; to keep the GNU Emacs compatibility. So if you work under Emacs ;; and see something that does not work do drop me a line, as I have ;; a smaller chance to notice this kind of bugs otherwise. +; [The above comment dates from 2011.] ;; Changelog: commit 93f21530ad0a17310f97f1a25dfbc67b249bf2e7 Author: Glenn Morris Date: Mon Feb 1 20:59:32 2016 -0500 Improve the custom type of some user options. * lisp/autoinsert.el (auto-insert-alist): * lisp/replace.el (query-replace-from-to-separator): * lisp/gnus/gnus-art.el (gnus-hidden-properties): * lisp/gnus/gnus-gravatar.el (gnus-gravatar-properties): * lisp/gnus/gnus-picon.el (gnus-picon-properties): * lisp/progmodes/prolog.el (prolog-keywords, prolog-types) (prolog-mode-specificators, prolog-determinism-specificators) (prolog-directives, prolog-program-name, prolog-program-switches) (prolog-consult-string, prolog-compile-string, prolog-eof-string) (prolog-prompt-regexp): Improve custom type. diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index e5dd62f..43fa312 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -305,7 +305,17 @@ ACTION may be a skeleton to insert (see `skeleton-insert'), an absolute file-name or one relative to `auto-insert-directory' or a function to call. ACTION may also be a vector containing several successive single actions as described above, e.g. [\"header.insert\" date-and-author-update]." - :type 'sexp + :type '(alist :key-type + (choice (regexp :tag "Regexp matching file name") + (symbol :tag "Major mode") + (cons :tag "Condition and description" + (choice :tag "Condition" + (regexp :tag "Regexp matching file name") + (symbol :tag "Major mode")) + (string :tag "Description"))) + ;; There's no custom equivalent of "repeat" for vectors. + :value-type (choice file function + (sexp :tag "Skeleton or vector"))) :version "25.1" :group 'auto-insert) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 54bbfd8..366d14a 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -260,7 +260,7 @@ This can also be a list of the above values." ;; needed there. And XEmacs doesn't handle `intangible' anyway. '(invisible t) "Property list to use for hiding text." - :type 'sexp + :type 'plist :group 'gnus-article-hiding) ;; Fixme: This isn't the right thing for mixed graphical and non-graphical diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index deb6e4b..de7203d 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el @@ -41,7 +41,7 @@ If nil, default to `gravatar-size'." (defcustom gnus-gravatar-properties '(:ascent center :relief 1) "List of image properties applied to Gravatar images." - :type 'sexp + :type 'plist :version "24.1" :group 'gnus-gravatar) diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index 6365e8e..bbbe0ed 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -73,7 +73,7 @@ Some people may want to add \"unknown\" to this list." (defcustom gnus-picon-properties '(:color-symbols (("None" . "white"))) "List of image properties applied to picons." - :type 'sexp + :type 'plist :version "24.3" :group 'gnus-picon) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 4f23f87..9c15f3b 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -272,9 +272,6 @@ ;; Version 0.1.35: ;; o Minor font-lock bug fixes. -;;; TODO: - -;; Replace ":type 'sexp" with more precise Custom types. ;;; Code: @@ -441,7 +438,12 @@ Legal values: "Alist of Prolog keywords which is used for font locking of directives." :version "24.1" :group 'prolog-font-lock - :type 'sexp + ;; Note that "(repeat string)" also allows "nil" (repeat-count 0). + ;; This gets processed by prolog-find-value-by-system, which + ;; allows both the car and the cdr to be a list to eval. + ;; Though the latter must have the form '(eval ...)'. + ;; Of course, none of this is documented... + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-types @@ -451,7 +453,7 @@ Legal values: "Alist of Prolog types used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-mode-specificators @@ -461,7 +463,7 @@ Legal values: "Alist of Prolog mode specificators used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-determinism-specificators @@ -472,7 +474,7 @@ Legal values: "Alist of Prolog determinism specificators used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-directives @@ -482,7 +484,7 @@ Legal values: "Alist of Prolog source code directives used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) @@ -569,7 +571,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline." (or (car names) "prolog")))) "Alist of program names for invoking an inferior Prolog with `run-prolog'." :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-program-name () (prolog-find-value-by-system prolog-program-name)) @@ -580,7 +583,7 @@ the first column (i.e., DCG heads) inserts ` -->' and newline." "Alist of switches given to inferior Prolog run with `run-prolog'." :version "24.1" :group 'prolog-inferior - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defun prolog-program-switches () (prolog-find-value-by-system prolog-program-switches)) @@ -604,7 +607,8 @@ Some parts of the string are replaced: region of a buffer, in which case it is the number of lines before the region." :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-consult-string () @@ -631,17 +635,21 @@ Some parts of the string are replaced: If `prolog-program-name' is non-nil, it is a string sent to a Prolog process. If `prolog-program-name' is nil, it is an argument to the `compile' function." :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-compile-string () (prolog-find-value-by-system prolog-compile-string)) (defcustom prolog-eof-string "end_of_file.\n" - "Alist of strings that represent end of file for prolog. -nil means send actual operating system end of file." + "String or alist of strings that represent end of file for prolog. +If nil, send actual operating system end of file." :group 'prolog-inferior - :type 'sexp + :type '(choice string + (const nil) + (alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp)))) :risky t) (defcustom prolog-prompt-regexp @@ -653,7 +661,8 @@ nil means send actual operating system end of file." "Alist of prompts of the prolog system command line." :version "24.1" :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-prompt-regexp () @@ -664,7 +673,8 @@ nil means send actual operating system end of file." ;; (t "^|: +")) ;; "Alist of regexps matching the prompt when consulting `user'." ;; :group 'prolog-inferior -;; :type 'sexp +;; :type '(alist :key-type (choice symbol sexp) +;; :value-type (group (choice string (const nil) sexp))) ;; :risky t) (defcustom prolog-debug-on-string "debug.\n" diff --git a/lisp/replace.el b/lisp/replace.el index f5c8d33..dfe8cd7 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -85,7 +85,7 @@ from Isearch by using a key sequence like `C-s C-s M-%'." "24.3") ;; while preparing to dump, also stops customize-rogue listing this. :initialize 'custom-initialize-delay :group 'matching - :type 'sexp + :type '(choice string (sexp :tag "Display specification")) :version "25.1") (defcustom query-replace-from-history-variable 'query-replace-history commit 9f60d7e9a27b107d5bd35bf9d7621a300e17dbfb Author: Glenn Morris Date: Mon Feb 1 20:53:44 2016 -0500 Mark some risky calendar variables. * lisp/calendar/cal-china.el (chinese-calendar-time-zone): Remove risky setting for deleted obsolete alias. (calendar-chinese-standard-time-zone-name) (calendar-chinese-daylight-saving-start) (calendar-chinese-daylight-saving-end): * lisp/calendar/calendar.el (calendar-iso-date-display-form) (calendar-european-date-display-form) (calendar-american-date-display-form, calendar-date-display-form): * lisp/calendar/diary-lib.el (diary-remind-message) (diary-header-line-format): * lisp/calendar/solar.el (calendar-time-display-form) (calendar-location-name): Mark as risky. diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index cfddd6b..661a818 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -71,9 +71,6 @@ Default is for Beijing. This is an expression in `year' since it changed at ;; It gets eval'd. ;;;###autoload (put 'calendar-chinese-time-zone 'risky-local-variable t) -;;;###autoload -(put 'chinese-calendar-time-zone 'risky-local-variable t) - ;; FIXME unused. (defcustom calendar-chinese-location-name "Beijing" @@ -98,6 +95,7 @@ Default is for no daylight saving time." This is an expression depending on `year' because it changed at 1928-01-01 00:00:00 from `PMT' to `CST'." :type 'sexp + :risky t :group 'calendar-chinese) (defcustom calendar-chinese-daylight-time-zone-name "CDT" @@ -115,6 +113,7 @@ at 1928-01-01 00:00:00 from `PMT' to `CST'." Default is for no daylight saving time. See documentation of `calendar-daylight-savings-starts'." :type 'sexp + :risky t :group 'calendar-chinese) (defcustom calendar-chinese-daylight-saving-end nil @@ -125,6 +124,7 @@ Default is for no daylight saving time. See documentation of Default is for no daylight saving time. See documentation of `calendar-daylight-savings-ends'." :type 'sexp + :risky t :group 'calendar-chinese) (defcustom calendar-chinese-daylight-saving-start-time 0 diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 5dec3ec..ccdae48 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -850,6 +850,7 @@ For examples of three common styles, see `diary-american-date-forms', Normally you should not customize this, but `calendar-date-display-form' \(which see)." :type 'sexp + :risky t :version "23.1" :group 'calendar) @@ -859,6 +860,7 @@ Normally you should not customize this, but `calendar-date-display-form' Normally you should not customize this, but `calendar-date-display-form' \(which see)." :type 'sexp + :risky t :group 'calendar) (defcustom calendar-american-date-display-form @@ -867,6 +869,7 @@ Normally you should not customize this, but `calendar-date-display-form' Normally you should not customize this, but `calendar-date-display-form' \(which see)." :type 'sexp + :risky t :group 'calendar) (defcustom calendar-date-display-form @@ -892,6 +895,7 @@ would give the usual American style in fixed-length fields. The variables `calendar-american-date-display-form' provide some defaults for three common styles." :type 'sexp + :risky t :set-after '(calendar-date-style calendar-iso-date-display-form calendar-european-date-display-form calendar-american-date-display-form) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 0523d83..9ba4e35 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -296,6 +296,7 @@ Used by the function `diary-remind', a pseudo-pattern is a list of expressions that can involve the keywords `days' (a number), `date' \(a list of month, day, year), and `diary-entry' (a string)." :type 'sexp + :risky t :group 'diary) (defcustom diary-abbreviated-year-flag t @@ -412,6 +413,7 @@ The format of the header is specified by `diary-header-line-format'." Only used if `diary-header-line-flag' is non-nil." :group 'diary :type 'sexp + :risky t :initialize 'custom-initialize-default :set 'diary-set-header :version "23.3") ; frame-width -> window-width diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index eb64b77..15f5b74 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -70,6 +70,7 @@ For example, the form would give military-style times like `21:07 (UTC)'." :type 'sexp + :risky t :group 'calendar) (defcustom calendar-latitude nil @@ -131,6 +132,7 @@ variable `calendar-latitude' paired with the variable `calendar-longitude'. This variable should be set in `site-start'.el." :type 'sexp + :risky t :group 'calendar) (defcustom solar-error 0.5 commit 1d07dcd720890764774770e0ad24ba11a5bda233 Author: Simen Heggestøyl Date: Mon Feb 1 21:38:25 2016 +0100 Highlight two additional SCSS keywords * lisp/textmodes/css-mode.el (css-bang-ids): New defconst holding CSS identifiers on the form !foo. (scss-bang-ids): New defconst holding SCSS identifiers on the form !foo. (css--font-lock-keywords): Highlight the new SCSS bang identifiers in `font-lock-builtin-face'. * test/indent/css-mode.css: Add bang rule test case. * test/indent/scss-mode.css: Add test cases for the introduced bang rules. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 96a82ba..b3a41d3 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -54,6 +54,14 @@ '("charset" "font-face" "import" "media" "namespace" "page") "Identifiers that appear in the form @foo.") +(defconst css-bang-ids + '("important") + "Identifiers that appear in the form !foo.") + +(defconst scss-bang-ids + '("default" "global" "optional") + "Additional identifiers that appear in the form !foo in SCSS.") + (defconst css-descriptor-ids '("ascent" "baseline" "bbox" "cap-height" "centerline" "definition-src" "descent" "font-family" "font-size" "font-stretch" "font-style" @@ -236,8 +244,8 @@ (defun css--font-lock-keywords (&optional sassy) `((,(concat "!\\s-*" - (regexp-opt (append (if sassy '("global")) - '("important")))) + (regexp-opt (append (if sassy scss-bang-ids) + css-bang-ids))) (0 font-lock-builtin-face)) ;; Atrules keywords. IDs not in css-at-ids are valid (ignored). ;; In fact the regexp should probably be diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css index 24166b0..3a00739 100644 --- a/test/indent/css-mode.css +++ b/test/indent/css-mode.css @@ -9,7 +9,7 @@ article[role="main"] { } a, b:hover, c { - color: black; + color: black !important; } a, b:hover { /* bug:20282 */ diff --git a/test/indent/scss-mode.scss b/test/indent/scss-mode.scss index 02a4a98..e1ec90a 100644 --- a/test/indent/scss-mode.scss +++ b/test/indent/scss-mode.scss @@ -40,11 +40,20 @@ p.#{$name} var } article[role="main"] { $toto: 500 !global; - float: left; + $var-with-default: 300 !default; + float: left !important; width: 600px / 888px * 100%; height: 100px / 888px * 100%; } +%placeholder { + color: #f0f0f0; +} + +button { + @extend %placeholder !optional; +} + @import 'reset'; @mixin border-radius($radius) { commit ee8b46699523cc1dea7b3d03e3cccff3d62cd847 Author: Karl Fogel Date: Mon Feb 1 12:46:45 2016 -0600 Recommend enabling integrity-checking in git * admin/notes/git-workflow: Recommend setting transfer.fsckObjects. This is related to the autogen.sh changes made by Paul Eggert in commit d766ca8f (2016-02-01) and commit cedd7cad (2016-02-01), and to my edits today to http://www.emacswiki.org/emacs/GitForEmacsDevs and to emacswiki.org/emacs/GitQuickStartForEmacsDevs. See also the thread "Recommend these .gitconfig settings for git integrity." at https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802. diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 3c2c76c..b6168c3 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -9,6 +9,11 @@ If you haven't configured git before you should first do: git config --global user.name "Frank Chu" git config --global user.email "fchu@example.com" +git config --global transfer.fsckObjects true + +(See the thread "Recommend these .gitconfig settings for git integrity." +[https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802] +for more details about why that last line is there.) Initial setup ============= commit e639e10a63c574609df3f745c4adb538415d9b1b Author: Martin Rudalics Date: Mon Feb 1 19:01:34 2016 +0100 Some corrections in Elisp manual * doc/lispref/buffers.texi (Read Only Buffers): Describe optional argument POSITION. * doc/lispref/debugging.texi (Error Debugging): `debug-on-signal' is an option. * doc/lispref/display.texi (Refresh Screen): Describe optional argument FRAME of `redraw-frame'. (Attribute Functions): Describe optional argument CHARACTER of `face-font'. (Defining Images): `image-load-path' is an option. (Beeping): `ring-bell-function' is an option. * doc/lispref/frames.texi (Size and Position): The PIXELWISE argument of `set-frame-size' is optional. (Raising and Lowering): The TERMINAL argument of `tty-top-frame' is optional. * doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of `set-transient-map'. * doc/lispref/minibuf.texi (Text from Minibuffer): `read-regexp-defaults-function' is an option. (Minibuffer Contents): `delete-minibuffer-contents' is a command. * doc/lispref/modes.texi (Mode Line Variables): `mode-line-position' and `mode-line-modes' are variables, not options. * doc/lispref/strings.texi (Creating Strings): The START argument of `substring' is optional. * doc/lispref/text.texi (Buffer Contents): Describe optional argument NO-PROPERTIES of `thing-at-point'. (User-Level Deletion): Both arguments of `delete-trailing-whitespace' are optional. (Margins): Use @key{RET} instead of @kbd{RET}. * doc/lispref/windows.texi (Display Action Functions): Write non-@code{nil} instead of non-nil. (Choosing Window Options): The WINDOW arg of `split-window-sensibly' is optional. (Choosing Window Options): Write non-@code{nil} instead of non-nil. (Window Start and End): Both args of `window-group-end' are optional. * src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS to POSITION to keep consisteny with doc-string. diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index e56d77c7..1f7f263 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -755,10 +755,14 @@ When disabling Read Only mode, it disables View mode if View mode was enabled. @end deffn -@defun barf-if-buffer-read-only +@defun barf-if-buffer-read-only &optional position This function signals a @code{buffer-read-only} error if the current -buffer is read-only. @xref{Using Interactive}, for another way to -signal an error if the current buffer is read-only. +buffer is read-only. If the text at @var{position} (which defaults to +point) has the @code{inhibit-read-only} text property set, the error +will not be raised. + +@xref{Using Interactive}, for another way to signal an error if the +current buffer is read-only. @end defun @node Buffer List diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 3f1574f..98c4705 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -141,7 +141,7 @@ If @code{eval-expression-debug-on-error} is @code{nil}, then the value of @code{debug-on-error} is not changed during @code{eval-expression}. @end defopt -@defvar debug-on-signal +@defopt debug-on-signal Normally, errors caught by @code{condition-case} never invoke the debugger. The @code{condition-case} gets a chance to handle the error before the debugger gets a chance. @@ -158,7 +158,7 @@ course of affairs, and you may not even realize that errors happen there. If you need to debug code wrapped in @code{condition-case}, consider using @code{condition-case-unless-debug} (@pxref{Handling Errors}). -@end defvar +@end defopt @defopt debug-on-event If you set @code{debug-on-event} to a special event (@pxref{Special diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index aa98ed4..3238959 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -47,8 +47,9 @@ that Emacs presents to the user. contents of a given frame (@pxref{Frames}). This is useful if the screen is corrupted. -@defun redraw-frame frame -This function clears and redisplays frame @var{frame}. +@defun redraw-frame &optional frame +This function clears and redisplays frame @var{frame}. If @var{frame} +is omitted or nil, it redraws the selected frame. @end defun Even more powerful is @code{redraw-display}: @@ -2686,8 +2687,14 @@ considered, until a specified attribute is found. To ensure that the return value is always specified, use a value of @code{default} for @var{inherit}. -@defun face-font face &optional frame +@defun face-font face &optional frame character This function returns the name of the font of face @var{face}. + +If the optional argument @var{frame} is specified, it returns the name +of the font of @var{face} for that frame. If @var{frame} is omitted or +@code{nil}, the selected frame is used. And, in this case, if the +optional third argument @var{character} is supplied, it returns the font +name used for @var{character}. @end defun @defun face-foreground face &optional frame inherit @@ -5324,7 +5331,7 @@ returned. If no specification is satisfied, @code{nil} is returned. The image is looked for in @code{image-load-path}. @end defun -@defvar image-load-path +@defopt image-load-path This variable's value is a list of locations in which to search for image files. If an element is a string or a variable symbol whose value is a string, the string is taken to be the name of a directory @@ -5343,7 +5350,7 @@ should specify the image as follows: @example (defimage foo-image '((:type xpm :file "foo/bar.xpm"))) @end example -@end defvar +@end defopt @defun image-load-path-for-library library image &optional path no-error This function returns a suitable search path for images used by the @@ -6899,12 +6906,12 @@ provided the terminal's Termcap entry defines the visible bell capability (@samp{vb}). @end defopt -@defvar ring-bell-function +@defopt ring-bell-function If this is non-@code{nil}, it specifies how Emacs should ring the bell. Its value should be a function of no arguments. If this is non-@code{nil}, it takes precedence over the @code{visible-bell} variable. -@end defvar +@end defopt @node Window Systems @section Window Systems diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index b98e3a5..15a9bd9 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -847,7 +847,7 @@ With some window managers you may have to set this to non-@code{nil} in order to make a frame appear truly maximized or full-screen. @end defopt -@defun set-frame-size frame width height pixelwise +@defun set-frame-size frame width height &optional pixelwise This function sets the size of the text area of @var{frame}, measured in terms of the canonical height and width of a character on @var{frame} (@pxref{Frame Font}). @@ -2236,7 +2236,7 @@ parameters. @xref{Management Parameters}. terminal frames. On each text terminal, only the top frame is displayed at any one time. -@defun tty-top-frame terminal +@defun tty-top-frame &optional terminal This function returns the top frame on @var{terminal}. @var{terminal} should be a terminal object, a frame (meaning that frame's terminal), or @code{nil} (meaning the selected frame's terminal). If it does not diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 354be3c..0ea3028 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -950,22 +950,25 @@ are used before @code{minor-mode-map-alist} and @end defvar @cindex transient keymap -@defun set-transient-map keymap &optional keep +@defun set-transient-map keymap &optional keep-pred on-exit This function adds @var{keymap} as a @dfn{transient} keymap, which takes precedence over other keymaps for one (or more) subsequent keys. -Normally, @var{keymap} is used just once, to look up the very next -key. If the optional argument @var{pred} is @code{t}, the map stays -active as long as the user types keys defined in @var{keymap}; when -the user types a key that is not in @var{keymap}, the transient keymap -is deactivated and normal key lookup continues for that key. +Normally, @var{keymap} is used just once, to look up the very next key. +If the optional argument @var{keep-pred} is @code{t}, the map stays +active as long as the user types keys defined in @var{keymap}; when the +user types a key that is not in @var{keymap}, the transient keymap is +deactivated and normal key lookup continues for that key. -The @var{pred} argument can also be a function. In that case, the +The @var{keep-pred} argument can also be a function. In that case, the function is called with no arguments, prior to running each command, while @var{keymap} is active; it should return non-@code{nil} if @var{keymap} should stay active. -This function works by adding and removing @code{keymap} from the +The optional argument @var{on-exit}, if non-nil, specifies a function +that is called, with no arguments, after @var{keymap} is deactivated. + +This function works by adding and removing @var{keymap} from the variable @code{overriding-terminal-local-map}, which takes precedence over all other active keymaps (@pxref{Searching Keymaps}). @end defun diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index e24d2cd..6f41090 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -272,7 +272,7 @@ History}). If it is omitted or @code{nil}, the history list defaults to @code{regexp-history}. @end defun -@defvar read-regexp-defaults-function +@defopt read-regexp-defaults-function The function @code{read-regexp} may use the value of this variable to determine its list of default regular expressions. If non-@code{nil}, the value of this variable should be either: @@ -288,7 +288,7 @@ or a list of strings. @noindent See @code{read-regexp} above for details of how these values are used. -@end defvar +@end defopt @defvar minibuffer-allow-text-properties If this variable is @code{nil}, then @code{read-from-minibuffer} @@ -2336,11 +2336,11 @@ This is like @code{minibuffer-contents}, except that it does not copy text properties, just the characters themselves. @xref{Text Properties}. @end defun -@defun delete-minibuffer-contents -This function erases the editable contents of the minibuffer (that is, +@deffn Command delete-minibuffer-contents +This command erases the editable contents of the minibuffer (that is, everything except the prompt), if a minibuffer is current. Otherwise, it erases the entire current buffer. -@end defun +@end deffn @node Recursive Mini @section Recursive Minibuffers diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 2b621e4..66f7a35 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1943,11 +1943,11 @@ Its default value displays the buffer name, padded with spaces to at least 12 columns. @end defvar -@defopt mode-line-position +@defvar mode-line-position This variable indicates the position in the buffer. Its default value displays the buffer percentage and, optionally, the buffer size, the line number and the column number. -@end defopt +@end defvar @defvar vc-mode The variable @code{vc-mode}, buffer-local in each buffer, records @@ -1956,11 +1956,11 @@ and, if so, which kind. Its value is a string that appears in the mode line, or @code{nil} for no version control. @end defvar -@defopt mode-line-modes +@defvar mode-line-modes This variable displays the buffer's major and minor modes. Its default value also displays the recursive editing level, information on the process status, and whether narrowing is in effect. -@end defopt +@end defvar @defvar mode-line-remote This variable is used to show whether @code{default-directory} for the diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 091db5e..9d6613c 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -145,11 +145,12 @@ This returns a string containing the characters @var{characters}. @end example @end defun -@defun substring string start &optional end +@defun substring string &optional start end This function returns a new string which consists of those characters from @var{string} in the range from (and including) the character at the index @var{start} up to (but excluding) the character at the index -@var{end}. The first character is at index zero. +@var{end}. The first character is at index zero. With one argument, +this function just copies @var{string}. @example @group diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 41991c9..4c3a1a0 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -303,7 +303,7 @@ there, the function returns @code{nil}. Otherwise, a nearby symbol or word on the same line is acceptable. @end defun -@defun thing-at-point thing +@defun thing-at-point thing &optional no-properties Return the @var{thing} around or next to point, as a string. The argument @var{thing} is a symbol which specifies a kind of syntactic @@ -311,6 +311,9 @@ entity. Possibilities include @code{symbol}, @code{list}, @code{sexp}, @code{defun}, @code{filename}, @code{url}, @code{word}, @code{sentence}, @code{whitespace}, @code{line}, @code{page}, and others. +When the optional argument @var{no-properties} is non-@code{nil}, this +function strips text properties from the return value. + @example ---------- Buffer: foo ---------- Gentlemen may cry ``Pea@point{}ce! Peace!,'' @@ -804,7 +807,7 @@ A blank line is defined as a line containing only tabs and spaces. @code{delete-blank-lines} returns @code{nil}. @end deffn -@deffn Command delete-trailing-whitespace start end +@deffn Command delete-trailing-whitespace &optional start end Delete trailing whitespace in the region defined by @var{start} and @var{end}. @@ -1763,7 +1766,7 @@ is value of @code{indent-line-function} in Paragraph-Indent Text mode. @defopt left-margin This variable specifies the base left margin column. In Fundamental -mode, @kbd{RET} indents to this column. This variable automatically +mode, @key{RET} indents to this column. This variable automatically becomes buffer-local when set in any fashion. @end defopt diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 771bd4e..f61f08a 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -2415,9 +2415,10 @@ If this function chooses a window on another frame, it makes that frame visible and, unless @var{alist} contains an @code{inhibit-switch-frame} entry (@pxref{Choosing Window Options}), raises that frame if necessary. -If @var{alist} has a non-nil @code{frame-predicate} entry, its value is a -function taking one argument (a frame), returning non-nil if the -frame is a candidate; this function replaces the default predicate. +If @var{alist} has a non-@code{nil} @code{frame-predicate} entry, its +value is a function taking one argument (a frame), returning +non-@code{nil} if the frame is a candidate; this function replaces the +default predicate. If @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry, the selected window is used; thus if the selected frame has a single @@ -2637,10 +2638,11 @@ and return either a new window (which will be used to display the desired buffer) or @code{nil} (which means the splitting failed). @end defopt -@defun split-window-sensibly window -This function tries to split @var{window}, and return the newly -created window. If @var{window} cannot be split, it returns -@code{nil}. +@defun split-window-sensibly &optional window +This function tries to split @var{window}, and return the newly created +window. If @var{window} cannot be split, it returns @code{nil}. If +@var{window} is omitted or @code{nil}, it defaults to the selected +window. This function obeys the usual rules that determine when a window may be split (@pxref{Splitting Windows}). It first tries to split by @@ -2671,9 +2673,9 @@ to split this way. @end defopt @defopt even-window-sizes -This variable, if non-nil, causes @code{display-buffer} to even window -sizes whenever it reuses an existing window and that window is adjacent -to the selected one. +This variable, if non-@code{nil}, causes @code{display-buffer} to even +window sizes whenever it reuses an existing window and that window is +adjacent to the selected one. If its value is @code{width-only}, sizes are evened only if the reused window is on the left or right of the selected one and the selected @@ -3161,7 +3163,7 @@ text will end if scrolling is not required. @end defun @vindex window-group-end-function -@defun window-group-end window update +@defun window-group-end &optional window update This function is like @code{window-end}, except that when @var{window} is a part of a group of windows (@pxref{Window Group}), @code{window-group-end} returns the end position of the entire group. diff --git a/src/buffer.c b/src/buffer.c index 74b6fb6..653e3fe 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2145,16 +2145,16 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. If the text under POSITION (which defaults to point) has the `inhibit-read-only' text property set, the error will not be raised. */) - (Lisp_Object pos) + (Lisp_Object position) { - if (NILP (pos)) - XSETFASTINT (pos, PT); + if (NILP (position)) + XSETFASTINT (position, PT); else - CHECK_NUMBER (pos); + CHECK_NUMBER (position); if (!NILP (BVAR (current_buffer, read_only)) && NILP (Vinhibit_read_only) - && NILP (Fget_text_property (pos, Qinhibit_read_only, Qnil))) + && NILP (Fget_text_property (position, Qinhibit_read_only, Qnil))) xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); return Qnil; } commit d766ca8ff1e4ff1a30385508e1f456fad6bfe9f8 Author: Paul Eggert Date: Mon Feb 1 08:29:28 2016 -0800 Chatter when autogen.sh changes Git configuration * autogen.sh (git_config): New function. Use it instead of ‘git config’. diff --git a/autogen.sh b/autogen.sh index 877bb84..42a779e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -220,17 +220,32 @@ echo timestamp > src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then + # Like 'git config NAME VALUE', but verbose on change and exit on failure. + + git_config () + { + name=$1 + value=$2 + ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { + echo "${Configuring_git}git config $name '$value'" + Configuring_git= + git config "$name" "$value" || exit + } + } + Configuring_git='Configuring git... +' + # Check hashes when transferring objects among repositories. - git config transfer.fsckObjects true || exit + git_config transfer.fsckObjects true # Configure 'git diff' hunk header format. - git config 'diff.elisp.xfuncname' \ - '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit - git config 'diff.texinfo.xfuncname' \ - '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit + git_config 'diff.elisp.xfuncname' \ + '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' + git_config 'diff.texinfo.xfuncname' \ + '^@node[[:space:]]+([^,[:space:]][^,]+)' # Install Git hooks. commit 3b734e1273220596485f2dcbdb3be916eba53047 Author: Kyle Meyer Date: Mon Feb 1 08:48:35 2016 -0500 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 6403d4d..cf6aafc 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -479,9 +479,9 @@ LIMIT." (not (null pos))))) (defalias 'org-font-lock-ensure - (if (fboundp 'org-font-lock-ensure) + (if (fboundp 'font-lock-ensure) #'font-lock-ensure - (lambda (_beg _end) (font-lock-fontify-buffer)))) + (lambda (&optional _beg _end) (font-lock-fontify-buffer)))) (defun org-floor* (x &optional y) "Return a list of the floor of X and the fractional part of X. commit 43cb9f8ff378100ec31cb576faf347a87a05ba5d Author: Paul Eggert Date: Sun Jan 31 17:31:23 2016 -0800 Omit unnecessary history from Lisp intro * doc/lispintro/emacs-lisp-intro.texi (Review, Digression into C) (Conclusion): Reword so as not to talk about earlier versions of Emacs in what should be an intro. diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 6c4f305..78c1865 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -4309,38 +4309,18 @@ documentation, an optional interactive declaration, and the body of the definition. @need 1250 -For example, in an early version of Emacs, the function definition was -as follows. (It is slightly more complex now that it seeks the first -non-whitespace character rather than the first visible character.) +For example, in Emacs the function definition of +@code{dired-unmark-all-marks} is as follows. @smallexample @group -(defun back-to-indentation () - "Move point to first visible character on line." +(defun dired-unmark-all-marks () + "Remove all marks from all files in the Dired buffer." (interactive) - (beginning-of-line 1) - (skip-chars-forward " \t")) + (dired-unmark-all-files ?\r)) @end group @end smallexample -@ignore -In GNU Emacs 22, - -(defun backward-to-indentation (&optional arg) - "Move backward ARG lines and position at first nonblank character." - (interactive "p") - (forward-line (- (or arg 1))) - (skip-chars-forward " \t")) - -(defun back-to-indentation () - "Move point to the first non-whitespace character on this line." - (interactive) - (beginning-of-line 1) - (skip-syntax-forward " " (line-end-position)) - ;; Move back over chars that have whitespace syntax but have the p flag. - (backward-prefix-chars)) -@end ignore - @item interactive Declare to the interpreter that the function can be used interactively. This special form may be followed by a string with one @@ -9123,13 +9103,12 @@ deleted@footnote{More precisely, and requiring more expert knowledge to understand, the two integers are of type @code{Lisp_Object}, which can also be a C union instead of an integer type.}. -In early versions of Emacs, these two numbers were thirty-two bits -long, but the code is slowly being generalized to handle other -lengths. Three of the available bits are used to specify the type of -information; the remaining bits are used as content. +Integer widths depend on the machine, and are typically 32 or 64 bits. +A few of the bits are used to specify the type of information; the +remaining bits are used as content. @samp{XINT} is a C macro that extracts the relevant number from the -longer collection of bits; the three other bits are discarded. +longer collection of bits; the type bits are discarded. @need 800 The command in @code{delete-and-extract-region} looks like this: @@ -18724,10 +18703,7 @@ Even though it is short, @code{split-line} contains expressions we have not studied: @code{skip-chars-forward}, @code{indent-to}, @code{current-column} and @code{insert-and-inherit}. -Consider the @code{skip-chars-forward} function. (It is part of the -function definition for @code{back-to-indentation}, which is shown in -@ref{Review, , Review}.) - +Consider the @code{skip-chars-forward} function. In GNU Emacs, you can find out more about @code{skip-chars-forward} by typing @kbd{C-h f} (@code{describe-function}) and the name of the function. This gives you the function documentation. commit 2fbd1dabebf01029ef449389b9f4cb0b43aa62d9 Author: Paul Eggert Date: Sun Jan 31 16:53:24 2016 -0800 * etc/HISTORY: Add some more history, plus git tags. diff --git a/etc/HISTORY b/etc/HISTORY index 0426425..8107026 100644 --- a/etc/HISTORY +++ b/etc/HISTORY @@ -1,14 +1,35 @@ - GNU Emacs versions and their release dates + GNU Emacs history, versions, and release dates For more details about release contents, see the NEWS* files. +Most of the development history of GNU Emacs is available in its +source code repository . +However, in the early days GNU Emacs was developed without using +version control systems and was published via half-inch 9-track +1600-bpi magnetic tape reels. Although information about this early +development is sketchy, the following text summarizes what is known. + +EMACS started out as a set of macros atop the TECO text editor, and +was first operational in late 1976. It was inspired by earlier work +such as the E editor of Stanford, and was based on older TECO macro +sets. EMACS in turn inspired several similar editors. See: +Stallman RM. EMACS: The Extensible, Customizable Self-Documenting +Display Editor. AI Memo 519a, MIT, 1981-03-26 +. + +In 1984, work began on GNU Emacs, a fresh implementation designed to +run on GNU and GNU-like systems, with a full-featured Lisp at its +core. GNU Emacs 1.0 through 1.12 were released in early 1985. The +next version after 1.12 was 13; this was the initial public release. + +Here is a list of known GNU Emacs stable releases starting with the +initial public release. Entries in the list are of the form "GNU +Emacs N (DATE) TAG", where N is the version number, DATE the release +date, and TAG (if present) the corresponding tag in the source code +repository. Any commentary about the version starts on the next line. Dates are approximate in the following list; some are when the version was made, some are when it was announced. - -GNU Emacs 1.0 through 1.12 were released in early 1985. -The next release after 1.12 was 13. - GNU Emacs 13 (1985-03-20) Initial release announced on Usenet. @@ -135,15 +156,15 @@ GNU Emacs 19.32 (1996-07-31) GNU Emacs 19.33 (1996-08-11) -GNU Emacs 19.34 (1996-08-21) +GNU Emacs 19.34 (1996-08-21) emacs-19.34 -GNU Emacs 20.1 (1997-09-15) +GNU Emacs 20.1 (1997-09-15) emacs-20.1 -GNU Emacs 20.2 (1997-09-19) +GNU Emacs 20.2 (1997-09-19) emacs-20.2 -GNU Emacs 20.3 (1998-08-19) +GNU Emacs 20.3 (1998-08-19) emacs-20.3 -GNU Emacs 20.4 (1999-07-12) +GNU Emacs 20.4 (1999-07-12) emacs-20.4 GNU Emacs 20.5 (1999-12-04) @@ -151,40 +172,40 @@ GNU Emacs 20.6 (2000-02-15) GNU Emacs 20.7 (2000-06-13) -GNU Emacs 21.1 (2001-10-20) +GNU Emacs 21.1 (2001-10-20) emacs-21.1 -GNU Emacs 21.2 (2002-03-16) +GNU Emacs 21.2 (2002-03-16) emacs-21.2 -GNU Emacs 21.3 (2003-03-19) +GNU Emacs 21.3 (2003-03-19) emacs-21.3 GNU Emacs 21.4 (2005-02-08) GNU Emacs 21.4a (2005-02-17) This is Emacs 21.4 with an updated notice in etc/PROBLEMS. -GNU Emacs 22.1 (2007-06-02) +GNU Emacs 22.1 (2007-06-02) emacs-22.1 -GNU Emacs 22.2 (2008-03-26) +GNU Emacs 22.2 (2008-03-26) emacs-22.2 -GNU Emacs 22.3 (2008-09-05) +GNU Emacs 22.3 (2008-09-05) emacs-22.3 -GNU Emacs 23.1 (2009-07-29) +GNU Emacs 23.1 (2009-07-29) emacs-23.1 -GNU Emacs 23.2 (2010-05-08) +GNU Emacs 23.2 (2010-05-08) emacs-23.2 -GNU Emacs 23.3 (2011-03-10) +GNU Emacs 23.3 (2011-03-10) emacs-23.3 -GNU Emacs 23.4 (2012-01-29) +GNU Emacs 23.4 (2012-01-29) emacs-23.4 -GNU Emacs 24.1 (2012-06-10) +GNU Emacs 24.1 (2012-06-10) emacs-24.1 -GNU Emacs 24.2 (2012-08-27) +GNU Emacs 24.2 (2012-08-27) emacs-24.2 -GNU Emacs 24.3 (2013-03-10) +GNU Emacs 24.3 (2013-03-10) emacs-24.3 -GNU Emacs 24.4 (2014-10-20) +GNU Emacs 24.4 (2014-10-20) emacs-24.4 -GNU Emacs 24.5 (2015-04-10) +GNU Emacs 24.5 (2015-04-10) emacs-24.5 ---------------------------------------------------------------------- commit c90e1b4da89b3cb24a72ee201b83976cc5a3e630 Author: Paul Eggert Date: Sun Jan 31 15:50:51 2016 -0800 Improve elisp “Security Considerations” doc * doc/lispref/os.texi (Security Considerations): Mention call-process and rename-file as opposed to shell commands. Add some more cross-references. diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 8e3720e..c5e3672 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2959,34 +2959,40 @@ Buffers}. @item Authentication Emacs has several functions that deal with passwords, e.g., -@code{password-read}. Although these functions do not attempt to +@code{read-passwd}. @xref{Reading a Password}. +Although these functions do not attempt to broadcast passwords to the world, their implementations are not proof against determined attackers with access to Emacs internals. For -example, even if Elisp code attempts to scrub a password from +example, even if Elisp code uses @code{clear-string} to scrub a password from its memory after using it, remnants of the password may still reside -in the garbage-collected free list. +in the garbage-collected free list. @xref{Modifying Strings}. @item Code injection Emacs can send commands to many other applications, and applications should take care that strings sent as operands of these commands are -not misinterpreted as directives. For example, when sending a shell +not misinterpreted as directives. For example, when using a shell command to rename a file @var{a} to @var{b}, do not simply use the string @code{mv @var{a} @var{b}}, because either file name might start with @samp{-}, or might contain shell metacharacters like @samp{;}. Although functions like @code{shell-quote-argument} can help avoid this sort of problem, they are not panaceas; for example, on a POSIX platform @code{shell-quote-argument} quotes shell metacharacters but -not leading @samp{-}. @xref{Shell Arguments}. +not leading @samp{-}. @xref{Shell Arguments}. Typically it is safer +to use @code{call-process} than a subshell. @xref{Synchronous +Processes}. And it is safer yet to use builtin Emacs functions; for +example, use @code{(rename-file "@var{a}" "@var{b}" t)} instead of +invoking @command{mv}. @xref{Changing Files}. @item Coding systems Emacs attempts to infer the coding systems of the files and network -connections it accesses. If it makes a mistake, or if the other -parties to the network connection disagree with Emacs's deductions, +connections it accesses. @xref{Coding Systems}. +If Emacs infers incorrectly, or if the other +parties to the network connection disagree with Emacs's inferences, the resulting system could be unreliable. Also, even when it infers correctly, Emacs often can use bytes that other programs cannot. For -example, although to Emacs the NUL (all bits zero) byte is just a +example, although to Emacs the null byte is just a character like any other, many other applications treat it as a string -terminator and mishandle strings or files containing NUL bytes. +terminator and mishandle strings or files containing null bytes. @item Environment and configuration variables POSIX specifies several environment variables that can affect how @@ -2998,7 +3004,7 @@ environment variables (e.g., @env{PATH}, @env{POSIXLY_CORRECT}, @env{SHELL}, @env{TMPDIR}) need to have properly-configured values in order to get standard behavior for any utility Emacs might invoke. Even seemingly-benign variables like @env{TZ} may have security -implications. +implications. @xref{System Environment}. Emacs has customization and other variables with similar considerations. For example, if the variable @code{shell-file-name} @@ -3025,6 +3031,7 @@ other applications do. For example, even when @code{(file-readable-p "foo.txt")} returns @code{t}, it could be that @file{foo.txt} is unreadable because some other program changed the file's permissions between the call to @code{file-readable-p} and now. +@xref{Testing Accessibility}. @item Resource limits When Emacs exhausts memory or other operating system resources, its commit cedd7cad092809a97c1ed7fb883b68fa844cea58 Author: Paul Eggert Date: Sun Jan 31 13:43:13 2016 -0800 autogen.sh now arranges for git to check hashes Suggested by Karl Fogel in: http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01802.html * autogen.sh: Do "git config transfer.fsckObjects true". diff --git a/autogen.sh b/autogen.sh index a63c53c..877bb84 100755 --- a/autogen.sh +++ b/autogen.sh @@ -220,6 +220,11 @@ echo timestamp > src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then + # Check hashes when transferring objects among repositories. + + git config transfer.fsckObjects true || exit + + # Configure 'git diff' hunk header format. git config 'diff.elisp.xfuncname' \ commit 86ce76b8e31a94ab91632daff02e0a84f5e68bcf Author: Paul Eggert Date: Sun Jan 31 12:18:03 2016 -0800 ; Fix ChangeLog.2 commit ID. diff --git a/ChangeLog.2 b/ChangeLog.2 index 27c6ce3..5921546 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -26338,7 +26338,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit d5195155f9a297dc45a40c9b7175715ffe4f1612 (inclusive). +commit e6b7b6d89ff9288a49099f041752908b5eb9613e (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit 7b1d2b1b620b0c5815fba705eedd5f1353f0c488 Author: Paul Eggert Date: Sun Jan 31 10:38:41 2016 -0800 Fix (c & 040) typo in emergency escapes * src/keyboard.c (handle_interrupt): Fix recently-introduced typo (040 should have been ~040) that silently suppressed auto-saves after emergency escapes. Redo comparison to avoid similar problems. diff --git a/src/keyboard.c b/src/keyboard.c index 20aa2db..546c012 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10302,7 +10302,7 @@ handle_interrupt (bool in_signal_handler) { write_stdout ("Auto-save? (y or n) "); c = read_stdin (); - if ((c & 040) == 'Y') + if (c == 'y' || c == 'Y') { Fdo_auto_save (Qt, Qnil); #ifdef MSDOS @@ -10334,7 +10334,7 @@ handle_interrupt (bool in_signal_handler) write_stdout ("Abort (and dump core)? (y or n) "); #endif c = read_stdin (); - if ((c & ~040) == 'Y') + if (c == 'y' || c == 'Y') emacs_abort (); while (c != '\n') c = read_stdin (); commit a8273dacd51fc2dfa917722ad25390c64759318d Author: Eli Zaretskii Date: Sun Jan 31 18:10:12 2016 +0200 Fix display of overlay strings with 'display' and 'box' property * src/xdisp.c (get_next_display_element): Take the box face from display stack level that comes from a buffer, not an overlay string. (Bug#22499) diff --git a/src/xdisp.c b/src/xdisp.c index 78fddd6..8f1e98d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7234,14 +7234,23 @@ get_next_display_element (struct it *it) buffer position is stored in the 'position' member of the iteration stack slot below the current one, see handle_single_display_spec. By - contrast, it->current.pos was is not yet updated + contrast, it->current.pos was not yet updated to point to that buffer position; that will happen in pop_it, after we finish displaying the current string. Note that we already checked above that it->sp is positive, so subtracting one from it is safe. */ if (it->from_disp_prop_p) - pos = (it->stack + it->sp - 1)->position; + { + int stackp = it->sp - 1; + + /* Find the stack level with data from buffer. */ + while (stackp >= 0 + && STRINGP ((it->stack + stackp)->string)) + stackp--; + eassert (stackp >= 0); + pos = (it->stack + stackp)->position; + } else INC_TEXT_POS (pos, it->multibyte_p); commit fc48106d0bdbd938ec51c1f9609b7a58108d8f00 Author: Andreas Schwab Date: Sun Jan 31 14:29:14 2016 +0100 Fix imap-starttls-open * lisp/net/imap.el (imap-starttls-open): Log imap process output. Call imap-parse-greeting. (Bug#22500) diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 7e4cc72..e5a14d7 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -747,14 +747,19 @@ sure of changing the value of `foo'." :capability-command "1 CAPABILITY\r\n" :always-query-capabilities t :end-of-command "\r\n" - :success " OK " + :success "^1 OK " :starttls-function - (lambda (capabilities) - (when (string-match-p "STARTTLS" capabilities) - "1 STARTTLS\r\n")))) - (done (if (and process - (memq (process-status process) '(open run))) - process))) + #'(lambda (capabilities) + (when (string-match-p "STARTTLS" capabilities) + "1 STARTTLS\r\n")))) + done) + (when process + (imap-log buffer) + (when (memq (process-status process) '(open run)) + (setq done process) + (with-current-buffer buffer + (goto-char (point-min)) + (imap-parse-greeting)))) (message "imap: Connecting with STARTTLS...%s" (if done "done" "failed")) done)) commit cdecbedbf0cc0872bc41e842f67a5af40109f29d Author: Andreas Schwab Date: Sun Jan 31 13:34:03 2016 +0100 Fix return value of imap-starttls-open * lisp/net/imap.el (imap-starttls-open): Fix return value. diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 5c5ed86..7e4cc72 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -752,8 +752,9 @@ sure of changing the value of `foo'." (lambda (capabilities) (when (string-match-p "STARTTLS" capabilities) "1 STARTTLS\r\n")))) - (done (and process - (memq (process-status process) '(open run))))) + (done (if (and process + (memq (process-status process) '(open run))) + process))) (message "imap: Connecting with STARTTLS...%s" (if done "done" "failed")) done)) commit 20c7e34a713eee988cbc261ec0bfb457668164ee Author: Simen Heggestøyl Date: Sun Jan 31 10:14:10 2016 +0100 ; * etc/NEWS: Fix renamed command name Command `package-install-user-selected-packages' was renamed to `package-install-selected-packages' in f3b43fca. diff --git a/etc/NEWS b/etc/NEWS index a7348e4..a3d9e84 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -492,7 +492,7 @@ which were installed by the user (as opposed to installed as dependencies). This variable can also be manually customized. --- -*** New command `package-install-user-selected-packages' installs all +*** New command `package-install-selected-packages' installs all packages from `package-selected-packages' which are currently missing. --- commit 98bdbdbebb42a29b6be391bc9b3a68456ffeadd2 Author: John Wiegley Date: Sat Jan 30 21:34:32 2016 -0800 Correct reference to DARWIN_OS preprocessor symbol * src/alloc.c: Correct a preprocessor reference to DARWIN_OS, which may not be defined. diff --git a/src/alloc.c b/src/alloc.c index 5f74d90..6c6c1aa 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1108,7 +1108,7 @@ lisp_free (void *block) clang 3.3 anyway. Aligned allocation is incompatible with unexmacosx.c, so don't use it on Darwin. */ -#if ! ADDRESS_SANITIZER && ! DARWIN_OS +#if ! ADDRESS_SANITIZER && !defined DARWIN_OS # if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC # define USE_ALIGNED_ALLOC 1 # ifndef HAVE_ALIGNED_ALLOC commit b250d2996abccadb5765dd6974a1210b25ca83a0 Author: Paul Eggert Date: Sat Jan 30 20:16:20 2016 -0800 Spelling fix diff --git a/src/xwidget.c b/src/xwidget.c index 8745416..f436e95 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -320,7 +320,7 @@ xwidget_show_view (struct xwidget_view *xv) xv->y + xv->clip_top); } -/* Hide an xvidget view. */ +/* Hide an xwidget view. */ static void xwidget_hide_view (struct xwidget_view *xv) { commit b920a0ee6b31e0b89771e8a986ef9e11e8ae4aa1 Author: Paul Eggert Date: Sat Jan 30 20:05:26 2016 -0800 Spelling fixes diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 3767dba..4f23f87 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1036,7 +1036,7 @@ VERSION is of the format (Major . Minor)" (define-abbrev-table 'prolog-mode-abbrev-table ()) -;; Becauses this can `eval' its arguments, any variable that gets +;; Because this can `eval' its arguments, any variable that gets ;; processed by it should be marked as :risky. (defun prolog-find-value-by-system (alist) "Get value from ALIST according to `prolog-system'." diff --git a/lisp/ses.el b/lisp/ses.el index 858833e..5010194 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -446,10 +446,8 @@ is nil if SYM is not a symbol that names a cell." (ses-get-cell (car rowcol) (cdr rowcol))))))) (defun ses-plist-delq (plist prop) - "Return PLIST after deletion of proprerty/value pair. - -PROP is the symbol identifying the property/value pair. PLIST may -be modified by border effect." + "Return PLIST after deleting the first pair (if any) with symbol PROP. +This can alter PLIST." (cond ((null plist) nil) ((eq (car plist) prop) (cddr plist)) commit 93b144bbaa4bcef356655613cf2fc4fa14e09df6 Author: Paul Eggert Date: Sat Jan 30 18:38:51 2016 -0800 Pacify GCC on C library without glibc API Without this change, with --enable-gcc-warnings GCC would complain “error: redundant redeclaration of ‘aligned_alloc’”. * configure.ac: Simplify aligned_alloc testing. * src/alloc.c (aligned_alloc): Don’t use if DARWIN_OS, since the simplified configure.ac no longer checks for that. Don’t declare if HAVE_ALIGNED_ALLOC. Correct misspelling of HAVE_ALIGNED_ALLOC in ifdef. diff --git a/configure.ac b/configure.ac index 5d6fcda..57bde94 100644 --- a/configure.ac +++ b/configure.ac @@ -3806,14 +3806,8 @@ getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start log2) LIBS=$OLD_LIBS -dnl No need to check for aligned_alloc and posix_memalign if using -dnl gmalloc.o, as it supplies them, unless we're using hybrid_malloc. -dnl Don't use these functions on Darwin as they are incompatible with -dnl unexmacosx.c. -if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \ - && test "$opsys" != darwin; then - AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) -fi +dnl No need to check for posix_memalign if aligned_alloc works. +AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) dnl Cannot use AC_CHECK_FUNCS AC_CACHE_CHECK([for __builtin_unwind_init], diff --git a/src/alloc.c b/src/alloc.c index d379761..5f74d90 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1105,15 +1105,18 @@ lisp_free (void *block) /* Use aligned_alloc if it or a simple substitute is available. Address sanitization breaks aligned allocation, as of gcc 4.8.2 and - clang 3.3 anyway. */ + clang 3.3 anyway. Aligned allocation is incompatible with + unexmacosx.c, so don't use it on Darwin. */ -#if ! ADDRESS_SANITIZER +#if ! ADDRESS_SANITIZER && ! DARWIN_OS # if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC # define USE_ALIGNED_ALLOC 1 +# ifndef HAVE_ALIGNED_ALLOC /* Defined in gmalloc.c. */ void *aligned_alloc (size_t, size_t); +# endif # elif defined HYBRID_MALLOC -# if defined ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN +# if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN # define USE_ALIGNED_ALLOC 1 # define aligned_alloc hybrid_aligned_alloc /* Defined in gmalloc.c. */ commit 71b20b31c8ee25bcd0de1a954c9ca7b49140b3b2 Author: Artur Malabarba Date: Sat Jan 30 16:14:52 2016 +0000 Backport: * lisp/files.el: Remove support for extra .dir-locals file (dir-locals-file-2, dir-locals--all-files): Remove. (dir-locals-collect-variables, dir-locals-file, dir-locals-find-file) (dir-locals-read-from-file, hack-dir-local-variables): Revert changes. * lisp/files-x.el (modify-dir-local-variable): Revert changes. * lisp/help-fns.el (describe-variable): Revert changes. * doc/emacs/custom.texi (Directory Variables): Revert changes. * etc/NEWS: Revert changes. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 7be660c..c109335 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1298,11 +1298,7 @@ accomplished with @dfn{directory-local variables}. named @file{.dir-locals.el}@footnote{ On MS-DOS, the name of this file should be @file{_dir-locals.el}, due to limitations of the DOS filesystems. If the filesystem is limited to 8+3 file names, the name -of the file will be truncated by the OS to @file{_dir-loc.el}. -}@footnote{ You can also use @file{.dir-locals-2.el}, which -is loaded in addition. This is useful when @file{.dir-locals.el} is -under version control in a shared repository and can't be used for -personal customizations. } in a +of the file will be truncated by the OS to @file{_dir-loc.el}. } in a directory. Whenever Emacs visits any file in that directory or any of its subdirectories, it will apply the directory-local variables specified in @file{.dir-locals.el}, as though they had been defined as diff --git a/etc/NEWS b/etc/NEWS index d0415a2..a7348e4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -181,10 +181,6 @@ by default, and must be enabled by using the `--with-modules' option at configure time. +++ -** A second dir-local file (.dir-locals-2.el) is now accepted. -See the variable `dir-locals-file-2' for more information. - -+++ ** Network security (TLS/SSL certificate validity and the like) is added via the new Network Security Manager (NSM) and controlled via the `network-security-level' variable. diff --git a/lisp/files-x.el b/lisp/files-x.el index 05ad7f5..f0102fd 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -429,24 +429,18 @@ from the MODE alist ignoring the input argument VALUE." (catch 'exit (unless enable-local-variables (throw 'exit (message "Directory-local variables are disabled"))) - (let* ((dir-or-cache (and (buffer-file-name) - (not (file-remote-p (buffer-file-name))) - (dir-locals-find-file (buffer-file-name)))) - (variables-file - ;; If there are several .dir-locals, the user probably - ;; wants to edit the last one (the highest priority). - (cond ((stringp dir-or-cache) - (car (last (dir-locals--all-files dir-or-cache)))) - ((consp dir-or-cache) ; result from cache - ;; If cache element has an mtime, assume it came - ;; from a file. Otherwise, assume it was set - ;; directly. - (if (nth 2 dir-or-cache) - (car (last (dir-locals--all-files (car dir-or-cache)))) - (cadr dir-or-cache))) - ;; Try to make a proper file-name. - (t (expand-file-name dir-locals-file)))) - variables) + (let ((variables-file (or (and (buffer-file-name) + (not (file-remote-p (buffer-file-name))) + (dir-locals-find-file (buffer-file-name))) + dir-locals-file)) + variables) + (if (consp variables-file) ; result from cache + ;; If cache element has an mtime, assume it came from a file. + ;; Otherwise, assume it was set directly. + (setq variables-file (if (nth 2 variables-file) + (expand-file-name dir-locals-file + (car variables-file)) + (cadr variables-file)))) ;; I can't be bothered to handle this case right now. ;; Dir locals were set directly from a class. You need to ;; directly modify the class in dir-locals-class-alist. diff --git a/lisp/files.el b/lisp/files.el index 92ae434..3898dff 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3663,7 +3663,7 @@ Return the new variables list." (error ;; The file's content might be invalid (e.g. have a merge conflict), but ;; that shouldn't prevent the user from opening the file. - (message "%s error: %s" dir-locals-file (error-message-string err)) + (message ".dir-locals error: %s" (error-message-string err)) nil)))) (defun dir-locals-set-directory-class (directory class &optional mtime) @@ -3715,41 +3715,8 @@ VARIABLES list of the class. The list is processed in order. (defconst dir-locals-file ".dir-locals.el" "File that contains directory-local variables. -It has to be constant to enforce uniform values across different -environments and users. -See also `dir-locals-file-2', whose values override this one's. -See Info node `(elisp)Directory Local Variables' for details.") - -(defconst dir-locals-file-2 ".dir-locals-2.el" - "File that contains directory-local variables. -This essentially a second file that can be used like -`dir-locals-file', so that users can have specify their personal -dir-local variables even if the current directory already has a -`dir-locals-file' that is shared with other users (such as in a -git repository). -See Info node `(elisp)Directory Local Variables' for details.") - -(defun dir-locals--all-files (directory) - "Return a list of all readable dir-locals files in DIRECTORY. -The returned list is sorted by increasing priority. That is, -values specified in the last file should take precedence over -those in the first." - (when (file-readable-p directory) - (let* ((file-1 (expand-file-name (if (eq system-type 'ms-dos) - (dosified-file-name dir-locals-file) - dir-locals-file) - directory)) - (file-2 (when (string-match "\\.el\\'" file-1) - (replace-match "-2.el" t nil file-1))) - (out nil)) - ;; The order here is important. - (dolist (f (list file-2 file-1)) - (when (and f - (file-readable-p f) - (file-regular-p f) - (not (file-directory-p f))) - (push f out))) - out))) +It has to be constant to enforce uniform values +across different environments and users.") (defun dir-locals-find-file (file) "Find the directory-local variables for FILE. @@ -3764,93 +3731,78 @@ A cache entry based on a `dir-locals-file' is valid if the modification time stored in the cache matches the current file modification time. If not, the cache entry is cleared so that the file will be re-read. -This function returns either: - - nil (no directory local variables found), - - the matching entry from `dir-locals-directory-cache' (a list), - - or the full path to the directory (a string) containing at - least one `dir-locals-file' in the case of no valid cache - entry." +This function returns either nil (no directory local variables found), +or the matching entry from `dir-locals-directory-cache' (a list), +or the full path to the `dir-locals-file' (a string) in the case +of no valid cache entry." (setq file (expand-file-name file)) - (let* ((locals-dir (locate-dominating-file (file-name-directory file) - #'dir-locals--all-files)) - dir-elt) + (let* ((dir-locals-file-name + (if (eq system-type 'ms-dos) + (dosified-file-name dir-locals-file) + dir-locals-file)) + (locals-file (locate-dominating-file file dir-locals-file-name)) + (dir-elt nil)) ;; `locate-dominating-file' may have abbreviated the name. - (when locals-dir - (setq locals-dir (expand-file-name locals-dir))) + (and locals-file + (setq locals-file (expand-file-name dir-locals-file-name locals-file))) + ;; Let dir-locals-read-from-file inform us via demoted-errors + ;; about unreadable files, etc. + ;; Maybe we'd want to keep searching though - that is + ;; a locate-dominating-file issue. +;;; (or (not (file-readable-p locals-file)) +;;; (not (file-regular-p locals-file))) +;;; (setq locals-file nil)) ;; Find the best cached value in `dir-locals-directory-cache'. (dolist (elt dir-locals-directory-cache) (when (and (string-prefix-p (car elt) file - (memq system-type - '(windows-nt cygwin ms-dos))) - (> (length (car elt)) (length (car dir-elt)))) - (setq dir-elt elt))) + (memq system-type + '(windows-nt cygwin ms-dos))) + (> (length (car elt)) (length (car dir-elt)))) + (setq dir-elt elt))) (if (and dir-elt - (or (null locals-dir) - (<= (length locals-dir) - (length (car dir-elt))))) - ;; Found a potential cache entry. Check validity. - ;; A cache entry with no MTIME is assumed to always be valid - ;; (ie, set directly, not from a dir-locals file). - ;; Note, we don't bother to check that there is a matching class - ;; element in dir-locals-class-alist, since that's done by - ;; dir-locals-set-directory-class. - (if (or (null (nth 2 dir-elt)) - (let ((cached-files (dir-locals--all-files (car dir-elt)))) - ;; The entry MTIME should match the most recent - ;; MTIME among matching files. - (and cached-files - (= (time-to-seconds (nth 2 dir-elt)) - (apply #'max (mapcar (lambda (f) (time-to-seconds (nth 5 (file-attributes f)))) - cached-files)))))) - ;; This cache entry is OK. - dir-elt - ;; This cache entry is invalid; clear it. - (setq dir-locals-directory-cache - (delq dir-elt dir-locals-directory-cache)) - ;; Return the first existing dir-locals file. Might be the same - ;; as dir-elt's, might not (eg latter might have been deleted). - locals-dir) + (or (null locals-file) + (<= (length (file-name-directory locals-file)) + (length (car dir-elt))))) + ;; Found a potential cache entry. Check validity. + ;; A cache entry with no MTIME is assumed to always be valid + ;; (ie, set directly, not from a dir-locals file). + ;; Note, we don't bother to check that there is a matching class + ;; element in dir-locals-class-alist, since that's done by + ;; dir-locals-set-directory-class. + (if (or (null (nth 2 dir-elt)) + (let ((cached-file (expand-file-name dir-locals-file-name + (car dir-elt)))) + (and (file-readable-p cached-file) + (equal (nth 2 dir-elt) + (nth 5 (file-attributes cached-file)))))) + ;; This cache entry is OK. + dir-elt + ;; This cache entry is invalid; clear it. + (setq dir-locals-directory-cache + (delq dir-elt dir-locals-directory-cache)) + ;; Return the first existing dir-locals file. Might be the same + ;; as dir-elt's, might not (eg latter might have been deleted). + locals-file) ;; No cache entry. - locals-dir))) - -(defun dir-locals-read-from-dir (dir) - "Load all variables files in DIR and register a new class and instance. -DIR is the absolute name of a directory which must contain at -least one dir-local file (which is a file holding variables to -apply). -Return the new class name, which is a symbol named DIR." - (require 'map) - (let* ((class-name (intern dir)) - (files (dir-locals--all-files dir)) - (read-circle nil) - (success nil) - (variables)) + locals-file))) + +(defun dir-locals-read-from-file (file) + "Load a variables FILE and register a new class and instance. +FILE is the name of the file holding the variables to apply. +The new class name is the same as the directory in which FILE +is found. Returns the new class name." + (with-temp-buffer (with-demoted-errors "Error reading dir-locals: %S" - (dolist (file files) - (with-temp-buffer - (insert-file-contents file) - (condition-case-unless-debug nil - (setq variables - (map-merge-with 'list (lambda (a b) (map-merge 'list a b)) - variables - (read (current-buffer)))) - (end-of-file nil)))) - (setq success t)) - (dir-locals-set-class-variables class-name variables) - (dir-locals-set-directory-class - dir class-name - (seconds-to-time - (if success - (apply #'max (mapcar (lambda (file) - (time-to-seconds (nth 5 (file-attributes file)))) - files)) - ;; If there was a problem, use the values we could get but - ;; don't let the cache prevent future reads. - 0))) - class-name)) - -(define-obsolete-function-alias 'dir-locals-read-from-file - 'dir-locals-read-from-dir "25.1") + (insert-file-contents file) + (unless (zerop (buffer-size)) + (let* ((dir-name (file-name-directory file)) + (class-name (intern dir-name)) + (variables (let ((read-circle nil)) + (read (current-buffer))))) + (dir-locals-set-class-variables class-name variables) + (dir-locals-set-directory-class dir-name class-name + (nth 5 (file-attributes file))) + class-name))))) (defcustom enable-remote-dir-locals nil "Non-nil means dir-local variables will be applied to remote files." @@ -3873,17 +3825,17 @@ This does nothing if either `enable-local-variables' or (not (file-remote-p (or (buffer-file-name) default-directory))))) ;; Find the variables file. - (let ((dir-or-cache (dir-locals-find-file - (or (buffer-file-name) default-directory))) + (let ((variables-file (dir-locals-find-file + (or (buffer-file-name) default-directory))) (class nil) (dir-name nil)) (cond - ((stringp dir-or-cache) - (setq dir-name dir-or-cache - class (dir-locals-read-from-dir dir-or-cache))) - ((consp dir-or-cache) - (setq dir-name (nth 0 dir-or-cache)) - (setq class (nth 1 dir-or-cache)))) + ((stringp variables-file) + (setq dir-name (file-name-directory variables-file) + class (dir-locals-read-from-file variables-file))) + ((consp variables-file) + (setq dir-name (nth 0 variables-file)) + (setq class (nth 1 variables-file)))) (when class (let ((variables (dir-locals-collect-variables diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 2021885..547bc7e 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -911,35 +911,29 @@ if it is given a local binding.\n")))) (buffer-file-name buffer))) (dir-locals-find-file (buffer-file-name buffer)))) - (is-directory nil)) + (dir-file t)) (princ (substitute-command-keys " This variable's value is directory-local")) - (when (consp file) ; result from cache - ;; If the cache element has an mtime, we - ;; assume it came from a file. - (if (nth 2 file) - ;; (car file) is a directory. - (setq file (dir-locals--all-files (car file))) - ;; Otherwise, assume it was set directly. - (setq file (car file) - is-directory t))) - (if (null file) - (princ ".\n") - (princ ", set ") - (princ (substitute-command-keys - (cond - (is-directory "for the directory\n `") - ;; Many files matched. - ((and (consp file) (cdr file)) - (setq file (file-name-directory (car file))) - (format "by one of the\n %s files in the directory\n `" - dir-locals-file)) - (t (setq file (car file)) - "by the file\n `")))) + (if (null file) + (princ ".\n") + (princ ", set ") + (if (consp file) ; result from cache + ;; If the cache element has an mtime, we + ;; assume it came from a file. + (if (nth 2 file) + (setq file (expand-file-name + dir-locals-file (car file))) + ;; Otherwise, assume it was set directly. + (setq file (car file) + dir-file nil))) + (princ (substitute-command-keys + (if dir-file + "by the file\n `" + "for the directory\n `"))) (with-current-buffer standard-output (insert-text-button file 'type 'help-dir-local-var-def - 'help-args (list variable file))) + 'help-args (list variable file))) (princ (substitute-command-keys "'.\n")))) (princ (substitute-command-keys " This variable's value is file-local.\n")))) commit ae26c8a7a46ffa6266a4efce592827cf47e85170 Author: Glenn Morris Date: Sat Jan 30 11:52:42 2016 -0800 * lisp/net/browse-url.el (browse-url-default-browser): Lower priority of non-free Chrome. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 1a666e0..c0b3591 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -920,7 +920,6 @@ instead of `browse-url-new-window-flag'." ((browse-url-can-use-xdg-open) 'browse-url-xdg-open) ;;; ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) - ((executable-find browse-url-chrome-program) 'browse-url-chrome) ((executable-find browse-url-firefox-program) 'browse-url-firefox) ((executable-find browse-url-chromium-program) 'browse-url-chromium) ;;; ((executable-find browse-url-galeon-program) 'browse-url-galeon) @@ -928,6 +927,7 @@ instead of `browse-url-new-window-flag'." ;;; ((executable-find browse-url-netscape-program) 'browse-url-netscape) ;;; ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) ((executable-find browse-url-conkeror-program) 'browse-url-conkeror) + ((executable-find browse-url-chrome-program) 'browse-url-chrome) ((executable-find browse-url-xterm-program) 'browse-url-text-xterm) ((locate-library "w3") 'browse-url-w3) (t commit 0fac75fed1c7d61858bef15e951bf9a0835d5bac Author: Glenn Morris Date: Sat Jan 30 11:48:18 2016 -0800 Improve the custom type of some user options. * lisp/desktop.el (desktop-minor-mode-table): * lisp/man.el (Man-frame-parameters): * lisp/midnight.el (midnight-delay): * lisp/speedbar.el (speedbar-select-frame-method): * lisp/tooltip.el (tooltip-frame-parameters): * lisp/tree-widget.el (tree-widget-space-width): * lisp/type-break.el (type-break-keystroke-threshold): * lisp/woman.el (woman-imenu-generic-expression): * lisp/cedet/ede.el (ede-debug-program-function): * lisp/cedet/ede/project-am.el (project-am-debug-target-function): * lisp/emulation/viper-keym.el (viper-toggle-key): * lisp/erc/erc-networks.el (erc-server-alist): * lisp/gnus/message.el (message-deletable-headers, message-signature): * lisp/mail/mailalias.el (mail-directory-stream): * lisp/play/tetris.el (tetris-x-colors): * lisp/progmodes/gud.el (gud-tooltip-modes): Improve custom type. diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 41d6c89..f013d43 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -96,7 +96,7 @@ target willing to take the file. `never' means never perform the check." (defcustom ede-debug-program-function 'gdb "Default Emacs command used to debug a target." :group 'ede - :type 'sexp) ; make this be a list of options some day + :type 'function) ; make this be a list of options some day (defcustom ede-project-directories nil "Directories in which EDE may search for project files. diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index e1b0c3d..715f3cf 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -65,7 +65,7 @@ (defcustom project-am-debug-target-function 'gdb "*Default Emacs command used to debug a target." :group 'project-am - :type 'sexp) ; make this be a list some day + :type 'function) ; make this be a list some day (defconst project-am-type-alist '(("bin" project-am-program "bin_PROGRAMS" t) diff --git a/lisp/desktop.el b/lisp/desktop.el index e795d9c..822db05 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -554,7 +554,9 @@ RESTORE-FUNCTION nil means don't try to restore the minor mode. Only minor modes for which the name of the buffer-local variable and the name of the minor mode function are different have to be added to this table. See also `desktop-minor-mode-handlers'." - :type 'sexp + :type '(alist :key-type (symbol :tag "Minor mode") + :value-type (list :tag "Restore function" + (choice (const nil) function))) :group 'desktop) ;;;###autoload diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 998f850..f5bb32f 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -154,10 +154,8 @@ viper-insert-basic-map. Not recommended, except for novice users.") ;; Some important keys used in viper (defcustom viper-toggle-key [(control ?z)] ; "\C-z" "The key used to change states from Emacs to Vi and back. -In insert mode, this key also functions as Meta. - -Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]." - :type 'sexp +In insert mode, this key also functions as Meta." + :type 'key-sequence :group 'viper :set (lambda (symbol value) (let ((old-value (if (boundp 'viper-toggle-key) diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index c859a48..f911d64 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -443,7 +443,15 @@ NET is a symbol indicating to which network from `erc-networks-alist' this HOST is the servers hostname and PORTS is either a number, a list of numbers, or a list of port ranges." :group 'erc-networks - :type 'sexp) + :type '(alist :key-type (string :tag "Name") + :value-type + (group symbol (string :tag "Hostname") + (choice :tag "Ports" + (integer :tag "Port number") + (repeat :tag "List of ports or ranges" + (choice (integer :tag "Port number") + (list :tag "Port range" + integer integer))))))) (defcustom erc-networks-alist '((4-irc "4-irc.com") diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index f175036..27cae74 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -256,10 +256,10 @@ This is a list of regexps and regexp matches." :type '(repeat regexp)) (defcustom message-deletable-headers '(Message-ID Date Lines) - "Headers to be deleted if they already exist and were generated by message previously." + "Headers to delete if present and previously generated by message." :group 'message-headers :link '(custom-manual "(message)Message Headers") - :type 'sexp) + :type '(repeat (symbol :tag "Header"))) (defcustom message-ignored-news-headers "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:\\|^X-Message-SMTP-Method:\\|^X-Gnus-Delayed:" @@ -1072,7 +1072,9 @@ If t, the `message-signature-file' file will be inserted instead. If a function, the result from the function will be used instead. If a form, the result from the form will be used instead." :version "23.2" - :type 'sexp + :type '(choice string (const :tag "Contents of signature file" t) + function + sexp) :risky t :link '(custom-manual "(message)Insertion Variables") :group 'message-insertion) diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index 35528af..59670a7 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -130,7 +130,12 @@ or like this: (defcustom mail-directory-stream nil "List of (HOST SERVICE) for stream connection to mail directory." - :type 'sexp + :type '(choice (const nil) + (list (string :tag "Host name or ip address") + (choice (integer :tag "Service port number") + (string :tag "Service name")) + (plist :inline t + :tag "Additional open-network-stream parameters"))) :group 'mailalias) (put 'mail-directory-stream 'risky-local-variable t) diff --git a/lisp/man.el b/lisp/man.el index 04a7fc3..b483dd1 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -184,7 +184,9 @@ The value also can be a positive integer for a fixed width." (defcustom Man-frame-parameters nil "Frame parameter list for creating a new frame for a manual page." - :type 'sexp + :type '(repeat (cons :format "%v" + (symbol :tag "Parameter") + (sexp :tag "Value"))) :group 'man) (defcustom Man-downcase-section-letters-flag t diff --git a/lisp/midnight.el b/lisp/midnight.el index a9eedd7..0e68eb9 100644 --- a/lisp/midnight.el +++ b/lisp/midnight.el @@ -217,7 +217,7 @@ You should set this variable before loading midnight.el, or set it by calling `midnight-delay-set', or use `custom'. If you wish, you can use a string instead, it will be passed as the first argument to `run-at-time'." - :type 'sexp + :type '(choice integer string) :set #'midnight-delay-set) (provide 'midnight) diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index b68b541..d4ab668 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -87,9 +87,15 @@ If the return value is a number, it is used as the timer period." (defcustom tetris-x-colors [[0 0 1] [0.7 0 1] [1 1 0] [1 0 1] [0 1 1] [0 1 0] [1 0 0]] - "Vector of colors of the various shapes." + "Vector of RGB colors of the various shapes." :group 'tetris - :type 'sexp) + :type '(vector (vector :tag "Shape 1" number number number) + (vector :tag "Shape 2" number number number) + (vector :tag "Shape 3" number number number) + (vector :tag "Shape 4" number number number) + (vector :tag "Shape 5" number number number) + (vector :tag "Shape 6" number number number) + (vector :tag "Shape 7" number number number))) (defcustom tetris-buffer-name "*Tetris*" "Name used for Tetris buffer." diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 7843efd..356cd3e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3406,7 +3406,7 @@ it if ARG is omitted or nil." (defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode python-mode) "List of modes for which to enable GUD tooltips." - :type 'sexp + :type '(repeat (symbol :tag "Major mode")) :group 'gud :group 'tooltip) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index f469873..4ed00ae 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3469,11 +3469,11 @@ TOKEN will be the list, and INDENT is the current indentation level." ;; (defcustom speedbar-select-frame-method 'attached "Specify how to select a frame for displaying a file. -A value of `attached' means to use the attached frame (the frame -that speedbar was started from.) A number such as 1 or -1 means to -pass that number to `other-frame' while selecting a frame from speedbar." +A number such as 1 or -1 means to pass that number to `other-frame' +while selecting a frame from speedbar. Any other value means to use +the attached frame (the frame that speedbar was started from)." :group 'speedbar - :type 'sexp) + :type '(choice integer (other :tag "attached" attached))) (defun speedbar-find-file-in-frame (file) "This will load FILE into the speedbar attached frame. diff --git a/lisp/tooltip.el b/lisp/tooltip.el index ce190e9..60eabec 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -127,7 +127,9 @@ position to pop up the tooltip. Note that font and color parameters are ignored, and the attributes of the `tooltip' face are used instead." - :type 'sexp + :type '(repeat (cons :format "%v" + (symbol :tag "Parameter") + (sexp :tag "Value"))) :group 'tooltip) (defface tooltip diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index fd502dd..0ffb8dc 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el @@ -208,9 +208,11 @@ icon widgets used to draw the tree. By default these images are used: (defcustom tree-widget-space-width 0.5 "Amount of space between an icon image and a node widget. -Must be a valid space :width display property." +Must be a valid space :width display property. +See Info node `(elisp)Specified Space'." :group 'tree-widget - :type 'sexp) + :type '(choice (number :tag "Multiple of normal character width") + sexp)) ;;; Image support ;; diff --git a/lisp/type-break.el b/lisp/type-break.el index ba708b2..0b3ee75 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -133,7 +133,7 @@ keystroke even though they really require multiple keys to generate them. The command `type-break-guesstimate-keystroke-threshold' can be used to guess a reasonably good pair of values for this variable." :set-after '(type-break-interval) - :type 'sexp + :type '(cons (choice integer (const nil)) (choice integer (const nil))) :group 'type-break) (defcustom type-break-query-function 'yes-or-no-p diff --git a/lisp/woman.el b/lisp/woman.el index 4ca7dbe..28a4798 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -752,7 +752,10 @@ Default is t." "Imenu support for Sections and Subsections. An alist with elements of the form (MENU-TITLE REGEXP INDEX) -- see the documentation for `imenu-generic-expression'." - :type 'sexp + :type '(alist :key-type (choice :tag "Title" (const nil) string) + :value-type (group (choice (string :tag "Regexp") + function) + integer)) :group 'woman-interface) (defcustom woman-imenu nil commit 2df0e04296b73d212875ce46c8734ec255496a78 Author: Simen Heggestøyl Date: Sat Jan 30 20:47:18 2016 +0100 Highlight CSS variables with variable name face * lisp/textmodes/css-mode.el (css-nmstart-re): Don't match variables. (css--font-lock-keywords): Highlight variables in `font-lock-variable-name-face'. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index d402fb1..96a82ba 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -215,7 +215,7 @@ (defconst css-escapes-re "\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)") (defconst css-nmchar-re (concat "\\(?:[-[:alnum:]]\\|" css-escapes-re "\\)")) -(defconst css-nmstart-re (concat "\\(?:--\\)?\\(?:[[:alpha:]]\\|" css-escapes-re "\\)")) +(defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)")) (defconst css-ident-re ;; (concat css-nmstart-re css-nmchar-re "*") ;; Apparently, "at rules" names can start with a dash, e.g. @-moz-keyframes. (concat css-nmchar-re "+")) @@ -246,6 +246,8 @@ ;; Since "An at-rule consists of everything up to and including the next ;; semicolon (;) or the next block, whichever comes first." (,(concat "@" css-ident-re) (0 font-lock-builtin-face)) + ;; Variables. + (,(concat "--" css-ident-re) (0 font-lock-variable-name-face)) ;; Selectors. ;; FIXME: attribute selectors don't work well because they may contain ;; strings which have already been highlighted as f-l-string-face and commit 3cf5e81ded367e64fa93aca4aeb1ed75373dc085 Author: Glenn Morris Date: Sat Jan 30 11:41:26 2016 -0800 * lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not user-serviceable. diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index 9c06d4b..059a5cd 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el @@ -47,11 +47,9 @@ :group 'gnus-score-kill :type 'boolean) -(defcustom gnus-winconf-kill-file nil +(defvar gnus-winconf-kill-file nil "What does this do, Lars? -I don't know, Per." - :group 'gnus-score-kill - :type 'sexp) +I don't know, Per.") (defcustom gnus-kill-killed t "*If non-nil, Gnus will apply kill files to already killed articles. commit 2a5233c3c44d3ae6183d8b766f1a86083c318119 Author: Glenn Morris Date: Sat Jan 30 11:36:41 2016 -0800 Mark some user options that can get evalled as risky. * lisp/allout.el (allout-title): * lisp/emacs-lisp/edebug.el (edebug-global-break-condition): * lisp/gnus/message.el (message-mailer-swallows-blank-line): * lisp/progmodes/gud.el (gud-tooltip-display): * lisp/vc/ediff-mult.el (ediff-default-filtering-regexp): Mark as risky. diff --git a/lisp/allout.el b/lisp/allout.el index 15a8a11..49bdc06 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -797,9 +797,9 @@ numbers are always used." :group 'allout) ;;;_ - allout-title (defcustom allout-title '(or buffer-file-name (buffer-name)) - "Expression to be evaluated to determine the title for LaTeX -formatted copy." + "Expression to evaluate to determine the title for LaTeX formatted copy." :type 'sexp + :risky t :group 'allout) ;;;_ - allout-line-skip (defcustom allout-line-skip ".05cm" diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 5b841e8..e8484fa 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -225,6 +225,7 @@ After execution is resumed, the error is signaled again." "If non-nil, an expression to test for at every stop point. If the result is non-nil, then break. Errors are ignored." :type 'sexp + :risky t :group 'edebug) (defcustom edebug-sit-for-seconds 1 diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 51dcc1a..f175036 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1073,6 +1073,7 @@ If a function, the result from the function will be used instead. If a form, the result from the form will be used instead." :version "23.2" :type 'sexp + :risky t :link '(custom-manual "(message)Insertion Variables") :group 'message-insertion) @@ -1287,6 +1288,7 @@ The value should be an expression to test whether the problem will actually occur." :group 'message-sending :link '(custom-manual "(message)Mail Variables") + :risky t :type 'sexp) ;;;###autoload diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 1a0385e..7843efd 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3421,6 +3421,7 @@ it if ARG is omitted or nil." Forms in the list are combined with AND. The default is to display only tooltips in the buffer containing the overlay arrow." :type 'sexp + :risky t :group 'gud :group 'tooltip) diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 9c763d4..7f0db5d 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -174,7 +174,8 @@ directories.") (defcustom ediff-default-filtering-regexp nil "The default regular expression used as a filename filter in multifile comparisons. Should be a sexp. For instance (car ediff-filtering-regexp-history) or nil." - :type 'sexp + :type 'sexp ; yuck - why not just a regexp? + :risky t :group 'ediff-mult) ;; This has the form ((meta-buf regexp dir1 dir2 dir3 merge-auto-store-dir) commit 39b166fc43a37d1731a194c06deacba571894847 Author: Eli Zaretskii Date: Sat Jan 30 20:05:20 2016 +0200 Disable DebPrint in sys_read on MS-Windows * src/w32.c (sys_read): Disable a debugging print that is normal when non-blocking reads are retried. diff --git a/src/w32.c b/src/w32.c index 067bb3d..fbcfb97 100644 --- a/src/w32.c +++ b/src/w32.c @@ -8369,7 +8369,17 @@ sys_read (int fd, char * buffer, unsigned int count) case STATUS_READ_READY: case STATUS_READ_IN_PROGRESS: - DebPrint (("sys_read called when read is in progress\n")); +#if 0 + /* This happens all the time during GnuTLS handshake + with the remote, evidently because GnuTLS waits for + the read to complete by retrying the read operation + upon EAGAIN. So I'm disabling the DebPrint to avoid + wasting cycles on something that is not a real + problem. Enable if you need to debug something that + bumps into this. */ + DebPrint (("sys_read called when read is in progress %d\n", + current_status)); +#endif errno = EWOULDBLOCK; return -1; commit 9fd01893372e3cb8a6ef1fb2b47b10204d633a93 Author: Martin Rudalics Date: Sat Jan 30 18:28:26 2016 +0100 ;Fix ChangeLog entry diff --git a/ChangeLog.2 b/ChangeLog.2 index aaa2d5c..27c6ce3 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -237,11 +237,25 @@ Re-enable checks in member, memql, delete to complain about non-lists - * src/fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change. + * src/fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change. 2016-01-29 Martin Rudalics - c:/emacs-git/next/ChangeLog + Minor doc(-string) tweaks + + * lisp/window.el (window-in-direction): Fix doc-string typo. + * doc/lispref/frames.texi (Frame Font): Mention canonical + character width/height. + * doc/lispref/windows.texi (Windows and Frames): Clarify + handling of minibuffer window for `window-in-direction'. + (Window Sizes): Minor tweaks in descriptions of + `window-max-chars-per-line', `window-min-width' and + `window-min-size'. + (Deleting Windows): Minor tweak in `delete-window' description. + (Selecting Windows): Clarify window use time description. + (Cyclic Window Ordering): Minor tweak. + (Switching Buffers): Clarify description of + `switch-to-buffer-in-dedicated-window'. 2016-01-29 Eli Zaretskii commit 4bb72337657e2caee3414ed706fafe30b69df463 Author: Eli Zaretskii Date: Sat Jan 30 17:27:45 2016 +0200 Fix typos in Introduction to Emacs Lisp manual * doc/lispintro/emacs-lisp-intro.texi (Emacs Initialization) (kill-new function, Digression into C) (Complete forward-sentence, Divide and Conquer, Find a File) (lengths-list-many-files, Columns of a graph, defcustom) (recursive-count-words): Fix typos. Reported by Daniel Bastos . diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 36e60c2..6c4f305 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -8681,10 +8681,9 @@ The critical lines are these: @end group @group ;; @r{else} - (push string kill-ring) + (push string kill-ring) @end group @group - (setq kill-ring (cons string kill-ring)) (if (> (length kill-ring) kill-ring-max) ;; @r{avoid overly long kill ring} (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))) @@ -9075,7 +9074,7 @@ arguments. @item The sixth part is nearly like the argument that follows the @code{interactive} declaration in a function written in Lisp: a letter -followed, perhaps, by a prompt. The only difference from the Lisp is +followed, perhaps, by a prompt. The only difference from Lisp is when the macro is called with no arguments. Then you write a @code{0} (which is a null string), as in this macro. @@ -9115,7 +9114,7 @@ then return an empty string. The @code{del_range_1} function actually deletes the text. It is a complex function we will not look into. It updates the buffer and does other things. However, it is worth looking at the two arguments -passed to @code{del_range}. These are @w{@code{XINT (start)}} and +passed to @code{del_range_1}. These are @w{@code{XINT (start)}} and @w{@code{XINT (end)}}. As far as the C language is concerned, @code{start} and @code{end} are @@ -11644,7 +11643,7 @@ Else, act on the beginning of the list (the @sc{car} of the list) @end itemize @need 1500 -Here is example: +Here is an example: @smallexample @group @@ -12538,7 +12537,7 @@ value of @code{arg} to 1, in the case when @code{arg} is bound to @code{nil}. Next is a @code{let}. That specifies the values of two local -variables, @code{point} and @code{sentence-end}. The local value of +variables, @code{opoint} and @code{sentence-end}. The local value of point, from before the search, is used in the @code{constrain-to-field} function which handles forms and equivalents. The @code{sentence-end} variable is set by the @@ -14184,7 +14183,7 @@ the expression that moves point forward, word by word. The third part of a recursive function is the recursive call. -Somewhere, also, we also need a part that does the work of the +Somewhere, we also need a part that does the work of the function, a part that does the counting. A vital part! @need 1250 @@ -14482,12 +14481,12 @@ First, write a function to count the words in one definition. This includes the problem of handling symbols as well as words. @item -Second, write a function to list the numbers of words in each function +Second, write a function to list the number of words in each function in a file. This function can use the @code{count-words-in-defun} function. @item -Third, write a function to list the numbers of words in each function +Third, write a function to list the number of words in each function in each of several files. This entails automatically finding the various files, switching to them, and counting the words in the definitions within them. @@ -14952,7 +14951,7 @@ contains two functions, @code{find-file-noselect} and According to its documentation as shown by @kbd{C-h f} (the @code{describe-function} command), the @code{find-file-noselect} function reads the named file into a buffer and returns the buffer. -(Its most recent version includes an optional wildcards argument, +(Its most recent version includes an optional @var{wildcards} argument, too, as well as another to read a file literally and an other you suppress warning messages. These optional arguments are irrelevant.) @@ -15139,7 +15138,7 @@ either a @code{while} loop or recursion. @end ifnottex The design using a @code{while} loop is routine. The argument passed -the function is a list of files. As we saw earlier (@pxref{Loop +to the function is a list of files. As we saw earlier (@pxref{Loop Example}), you can write a @code{while} loop so that the body of the loop is evaluated if such a list contains elements, but to exit the loop if the list is empty. For this design to work, the body of the @@ -16106,7 +16105,7 @@ columns. Very likely, the name of the function will contain either the word ``print'' or the word ``insert'' or the word ``column''. Therefore, we can simply type @kbd{M-x apropos RET print\|insert\|column RET} and look at the result. On my system, this -command once too takes quite some time, and then produced a list of 79 +command once took quite some time, and then produced a list of 79 functions and variables. Now it does not take much time at all and produces a list of 211 functions and variables. Scanning down the list, the only function that looks as if it might do the job is @@ -16183,7 +16182,7 @@ The number of asterisks in the column is the number specified by the current element of the @code{numbers-list}. We need to construct a list of asterisks of the right length for each call to @code{insert-rectangle}. If this list consists solely of the requisite -number of asterisks, then we will have position point the right number +number of asterisks, then we will have to position point the right number of lines above the base for the graph to print correctly. This could be difficult. @@ -16348,7 +16347,7 @@ As written, @code{column-of-graph} contains a major flaw: the symbols used for the blank and for the marked entries in the column are hard-coded as a space and asterisk. This is fine for a prototype, but you, or another user, may wish to use other symbols. For example, -in testing the graph function, you many want to use a period in place +in testing the graph function, you may want to use a period in place of the space, to make sure the point is being repositioned properly each time the @code{insert-rectangle} function is called; or you might want to substitute a @samp{+} sign or other symbol for the asterisk. @@ -16711,7 +16710,7 @@ Write a line graph version of the graph printing functions. ``You don't have to like Emacs to like it''---this seemingly paradoxical statement is the secret of GNU Emacs. The plain, out-of-the-box -Emacs is a generic tool. Most people who use it, customize +Emacs is a generic tool. Most people who use it customize it to suit themselves. GNU Emacs is mostly written in Emacs Lisp; this means that by writing @@ -16907,7 +16906,7 @@ M-x customize @end smallexample @noindent -and find that the group for editing files of data is called ``data''. +and find that the group for editing files of text is called ``Text''. Enter that group. Text Mode Hook is the first member. You can click on its various options, such as @code{turn-on-auto-fill}, to set the values. After you click on the button to