commit 381c0bfaf2104295f25c4cc0ea68e881ed37170e (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Mon Dec 29 04:21:51 2014 +0200 Unbreak jumping to an alias's definition * lisp/emacs-lisp/find-func.el (find-function-library): Return a pair (ORIG-FUNCTION . LIBRARY) instead of just its second element. (find-function-noselect): Use it. * lisp/progmodes/elisp-mode.el (elisp--xref-identifier-file): Rename to `elisp--xref-identifier-location', incorporate logic from `elisp--xref-find-definitions', use the changed `find-function-library' return value. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37f3892..1d2aa9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2014-12-29 Dmitry Gutov + + Unbreak jumping to an alias's definition. + + * emacs-lisp/find-func.el (find-function-library): Return a pair + (ORIG-FUNCTION . LIBRARY) instead of just its second element. + (find-function-noselect): Use it. + + * progmodes/elisp-mode.el (elisp--xref-identifier-file): Rename to + `elisp--xref-identifier-location', incorporate logic from + `elisp--xref-find-definitions', use the changed + `find-function-library' return value. + 2014-12-29 Juri Linkov * comint.el (comint-history-isearch-message): Use field-beginning diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index e1586a9..3131be0 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -312,9 +312,14 @@ The search is done in the source for library LIBRARY." (cons (current-buffer) nil)))))))) (defun find-function-library (function &optional lisp-only verbose) - "Return the library FUNCTION is defined in. + "Return the pair (ORIG-FUNCTION . LIBRARY) for FUNCTION. -If FUNCTION is a built-in function and LISP-ONLY is non-nil, +ORIG-FUNCTION is the original name, after removing all advice and +resolving aliases. LIBRARY is an absolute file name, a relative +file name inside the C sources directory, or a name of an +autoloaded feature. + +If ORIG-FUNCTION is a built-in function and LISP-ONLY is non-nil, signal an error. If VERBOSE is non-nil, and FUNCTION is an alias, display a @@ -336,13 +341,14 @@ message about the whole chain of aliases." def (symbol-function (find-function-advised-original function)))) (if aliases (message "%s" aliases)) - (cond - ((autoloadp def) (nth 1 def)) - ((subrp def) - (if lisp-only - (error "%s is a built-in function" function)) - (help-C-file-name def 'subr)) - ((symbol-file function 'defun))))) + (cons function + (cond + ((autoloadp def) (nth 1 def)) + ((subrp def) + (if lisp-only + (error "%s is a built-in function" function)) + (help-C-file-name def 'subr)) + ((symbol-file function 'defun)))))) ;;;###autoload (defun find-function-noselect (function &optional lisp-only) @@ -362,8 +368,8 @@ searched for in `find-function-source-path' if non-nil, otherwise in `load-path'." (if (not function) (error "You didn't specify a function")) - (let ((library (find-function-library function lisp-only t))) - (find-function-search-for-symbol function nil library))) + (let ((func-lib (find-function-library function lisp-only t))) + (find-function-search-for-symbol (car func-lib) nil (cdr func-lib)))) (defun find-function-read (&optional type) "Read and return an interned symbol, defaulting to the one near point. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 74a8070..c5f587e 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -507,16 +507,6 @@ menu)) -(defun menu-bar-next-tag-other-window () - "Find the next definition of the tag already specified." - (interactive) - (find-tag-other-window nil t)) - -(defun menu-bar-next-tag () - "Find the next definition of the tag already specified." - (interactive) - (find-tag nil t)) - (define-obsolete-function-alias 'menu-bar-kill-ring-save 'kill-ring-save "24.1") diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ac216d9..c6cab12 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -570,18 +570,26 @@ It can be quoted, or be inside a quoted form." (`apropos (elisp--xref-find-apropos id)))) -(defun elisp--xref-identifier-file (type sym) - (pcase type - (`defun (when (fboundp sym) - (find-function-library sym))) - (`defvar (when (boundp sym) - (or (symbol-file sym 'defvar) - (help-C-file-name sym 'var)))) - (`feature (when (featurep sym) - (ignore-errors - (find-library-name (symbol-name sym))))) - (`defface (when (facep sym) - (symbol-file sym 'defface))))) +(defun elisp--xref-identifier-location (type sym) + (let ((file + (pcase type + (`defun (when (fboundp sym) + (let ((fun-lib + (find-function-library sym))) + (setq sym (car fun-lib)) + (cdr fun-lib)))) + (`defvar (when (boundp sym) + (or (symbol-file sym 'defvar) + (help-C-file-name sym 'var)))) + (`feature (when (featurep sym) + (ignore-errors + (find-library-name (symbol-name sym))))) + (`defface (when (facep sym) + (symbol-file sym 'defface)))))) + (when file + (when (string-match-p "\\.elc\\'" file) + (setq file (substring file 0 -1))) + (xref-make-elisp-location sym type file)))) (defun elisp--xref-find-definitions (symbol) (save-excursion @@ -589,11 +597,7 @@ It can be quoted, or be inside a quoted form." (dolist (type '(feature defface defvar defun)) (let ((loc (condition-case err - (let ((file (elisp--xref-identifier-file type symbol))) - (when file - (when (string-match-p "\\.elc\\'" file) - (setq file (substring file 0 -1))) - (xref-make-elisp-location symbol type file))) + (elisp--xref-identifier-location type symbol) (error (xref-make-bogus-location (error-message-string err)))))) (when loc commit ceed9dd191c6739489f4ba78d82c21e162f5e95d Author: Juri Linkov Date: Mon Dec 29 02:54:41 2014 +0200 Small fixes in etc/grep.txt diff --git a/etc/grep.txt b/etc/grep.txt index 523b1fa..b96a916 100644 --- a/etc/grep.txt +++ b/etc/grep.txt @@ -39,7 +39,7 @@ grep -nH --color=always -e "INFO tree" ../info/* * GNU grep 2.5.1 on lines starting with a number and colon -grep -nH -e "Universal Time" ../lispref/* +grep -nH --color=always -e "Universal Time" ../doc/lispref/* ../lispref/os.texi:1010:0:00 January 1, 1970 UTC (Coordinated Universal Time) * GNU grep 2.5.1 with context lines @@ -78,8 +78,8 @@ bzr grep --color=always -in "org-element-map" lisp/org/org.el:21047: (org-element-map * git-grep - with `[diff "el"] xfuncname = "^(\\(.*)$"' in .gitconfig - and `*.el diff=el' in .gitattributes + with `[diff "lisp"] xfuncname = "^(\\(.*)$"' in .gitconfig + and `*.el diff=lisp' in .gitattributes git --no-pager grep -inH -p -e "org-element-map" lisp/org/org.el=20969=(defun org-fill-paragraph (&optional justify) commit a0ae3d7331f6126941f90c6b80c293685004e165 Author: Juri Linkov Date: Mon Dec 29 02:52:38 2014 +0200 More fixes to support multi-line search in comint * lisp/comint.el (comint-history-isearch-message): Use field-beginning instead of comint-line-beginning-position - that's more fixes for http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html (comint-history-isearch-message): Fix args of isearch-message-prefix. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6982ee9..37f3892 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2014-12-29 Juri Linkov + * comint.el (comint-history-isearch-message): Use field-beginning + instead of comint-line-beginning-position - that's more fixes for + http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html + (comint-history-isearch-message): Fix args of isearch-message-prefix. + +2014-12-29 Juri Linkov + * vc/vc-dir.el (vc-dir-display-file): New command (bug#19450). (vc-dir-mode-map): Bind it to "\C-o". (vc-dir-menu-map): Add it to menu. diff --git a/lisp/comint.el b/lisp/comint.el index 3085052..4acaa30 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1532,14 +1532,20 @@ the function `isearch-message'." ;; the initial comint prompt. (if (overlayp comint-history-isearch-message-overlay) (move-overlay comint-history-isearch-message-overlay - (save-excursion (forward-line 0) (point)) - (comint-line-beginning-position)) + (save-excursion + (goto-char (field-beginning)) + (forward-line 0) + (point)) + (field-beginning)) (setq comint-history-isearch-message-overlay - (make-overlay (save-excursion (forward-line 0) (point)) - (comint-line-beginning-position))) + (make-overlay (save-excursion + (goto-char (field-beginning)) + (forward-line 0) + (point)) + (field-beginning))) (overlay-put comint-history-isearch-message-overlay 'evaporate t)) (overlay-put comint-history-isearch-message-overlay - 'display (isearch-message-prefix c-q-hack ellipsis)) + 'display (isearch-message-prefix ellipsis isearch-nonincremental)) (if (and comint-input-ring-index (not ellipsis)) ;; Display the current history index. (message "History item: %d" (1+ comint-input-ring-index)) commit df0f2a5f3b6c4e439215245d19f9e9cadb742581 Author: Juri Linkov Date: Mon Dec 29 02:47:05 2014 +0200 * lisp/vc/vc-dir.el (vc-dir-display-file): New command. (vc-dir-mode-map): Bind it to "\C-o". (vc-dir-menu-map): Add it to menu. Fixes: debbugs:19450 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f150179..6982ee9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-29 Juri Linkov + + * vc/vc-dir.el (vc-dir-display-file): New command (bug#19450). + (vc-dir-mode-map): Bind it to "\C-o". + (vc-dir-menu-map): Add it to menu. + 2014-12-29 Dmitry Gutov * progmodes/etags.el (find-tag-other-window) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 54496b9..c90bf1c 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -169,6 +169,9 @@ See `run-hooks'." (define-key map [ise] '(menu-item "Isearch Files..." vc-dir-isearch :help "Incremental search a string in the marked files")) + (define-key map [display] + '(menu-item "Display in Other Window" vc-dir-display-file + :help "Display the file on the current line, in another window")) (define-key map [open-other] '(menu-item "Open in Other Window" vc-dir-find-file-other-window :help "Find the file on the current line, in another window")) @@ -273,6 +276,7 @@ See `run-hooks'." (define-key map "e" 'vc-dir-find-file) ; dired-mode compatibility (define-key map "\C-m" 'vc-dir-find-file) (define-key map "o" 'vc-dir-find-file-other-window) + (define-key map "\C-o" 'vc-dir-display-file) (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) (define-key map [down-mouse-3] 'vc-dir-menu) (define-key map [mouse-2] 'vc-dir-toggle-mark) @@ -755,6 +759,13 @@ that share the same state." (if event (posn-set-point (event-end event))) (find-file-other-window (vc-dir-current-file))) +(defun vc-dir-display-file (&optional event) + "Display the file on the current line, in another window." + (interactive (list last-nonmenu-event)) + (if event (posn-set-point (event-end event))) + (display-buffer (find-file-noselect (vc-dir-current-file)) + t)) + (defun vc-dir-isearch () "Search for a string through all marked buffers using Isearch." (interactive) commit c1eec814857c59069c8115bf83fce3548a8684b8 Author: Dmitry Gutov Date: Mon Dec 29 02:36:57 2014 +0200 Declare many etags command obsolete; update the goto menu * lisp/menu-bar.el (menu-bar-goto-menu): Replace all but one etags item with xref ones. * lisp/progmodes/etags.el (find-tag-other-window) (find-tag-other-frame, find-tag-regexp, tags-loop-continue) (tags-apropos): Declare obsolete. diff --git a/etc/NEWS b/etc/NEWS index 4d63278..548f409 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -456,6 +456,11 @@ easier binding, which is now unoccupied (`M-,'). alias for a private variable. `xref-push-marker-stack' and `xref-pop-marker-stack' should be used to mutate it instead. +** etags +As a result of the above, these commands are now obsolete: +`find-tag-other-window', `find-tag-other-frame', `find-tag-regexp', +`tags-apropos' and `tags-loop-continue'. + ** Obsolete packages --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba7503f..f150179 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2014-12-29 Dmitry Gutov + + * progmodes/etags.el (find-tag-other-window) + (find-tag-other-frame, find-tag-regexp, tags-loop-continue) + (tags-apropos): Declare obsolete. + + * menu-bar.el (menu-bar-goto-menu): Replace all but one etags item + with xref ones. + 2014-12-28 Eli Zaretskii * international/mule.el (define-coding-system): Fix typos in the diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 8f33641..74a8070 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -378,30 +378,23 @@ (bindings--define-key menu [separator-tag-file] menu-bar-separator) - (bindings--define-key menu [apropos-tags] - '(menu-item "Tags Apropos..." tags-apropos + (bindings--define-key menu [xref-pop] + '(menu-item "Back..." xref-pop-marker-stack + :help "Back to the position of the last search")) + + (bindings--define-key menu [xref-apropos] + '(menu-item "Find Apropos..." xref-find-apropos :help "Find function/variables whose names match regexp")) - (bindings--define-key menu [next-tag-otherw] - '(menu-item "Next Tag in Other Window" - menu-bar-next-tag-other-window - :enable (and (boundp 'tags-location-ring) - (not (ring-empty-p tags-location-ring))) - :help "Find next function/variable matching last tag name in another window")) - - (bindings--define-key menu [next-tag] - '(menu-item "Find Next Tag" - menu-bar-next-tag - :enable (and (boundp 'tags-location-ring) - (not (ring-empty-p tags-location-ring))) - :help "Find next function/variable matching last tag name")) - (bindings--define-key menu [find-tag-otherw] - '(menu-item "Find Tag in Other Window..." find-tag-other-window + + (bindings--define-key menu [xref-find-otherw] + '(menu-item "Find Definition in Other Window..." + xref-find-definitions-other-window :help "Find function/variable definition in another window")) - (bindings--define-key menu [find-tag] - '(menu-item "Find Tag..." find-tag + (bindings--define-key menu [xref-find-def] + '(menu-item "Find Definition..." xref-find-definitions :help "Find definition of function or variable")) - (bindings--define-key menu [separator-tags] + (bindings--define-key menu [separator-xref] menu-bar-separator) (bindings--define-key menu [end-of-buf] diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 0be9979..be0dabf 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -975,6 +975,7 @@ onto a ring and may be popped back to with \\[pop-tag-mark]. Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'." + (declare (obsolete xref-find-definitions-other-window "25.1")) (interactive (find-tag-interactive "Find tag other window: ")) ;; This hair is to deal with the case where the tag is found in the @@ -1015,6 +1016,7 @@ onto a ring and may be popped back to with \\[pop-tag-mark]. Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'." + (declare (obsolete xref-find-definitions-other-frame "25.1")) (interactive (find-tag-interactive "Find tag other frame: ")) (let ((pop-up-frames t)) (find-tag-other-window tagname next-p))) @@ -1037,6 +1039,7 @@ onto a ring and may be popped back to with \\[pop-tag-mark]. Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'." + (declare (obsolete xref-find-apropos "25.1")) (interactive (find-tag-interactive "Find tag regexp: " t)) ;; We go through find-tag-other-window to do all the display hair there. (funcall (if other-window 'find-tag-other-window 'find-tag) @@ -1786,6 +1789,7 @@ Two variables control the processing we do on each file: the value of interesting (it returns non-nil if so) and `tags-loop-operate' is a form to evaluate to operate on an interesting file. If the latter evaluates to nil, we exit; otherwise we scan the next file." + (declare (obsolete "use `xref-find-definitions' interface instead." "25.1")) (interactive) (let (new ;; Non-nil means we have finished one file @@ -1929,6 +1933,7 @@ directory specification." ;;;###autoload (defun tags-apropos (regexp) "Display list of all tags in tags table REGEXP matches." + (declare (obsolete xref-find-apropos "25.1")) (interactive "sTags apropos (regexp): ") (with-output-to-temp-buffer "*Tags List*" (princ "Click mouse-2 to follow tags.\n\nTags matching regexp `") commit 9fb9136398821ed5f3a8b4405bbc222964f54028 Merge: c12598a f646cd9 Author: Paul Eggert Date: Sun Dec 28 10:17:48 2014 -0800 Merge from origin/emacs-24 f646cd9 * build-aux/git-hooks/commit-msg: Allow tabs. commit c12598a62e2e31f3377c52fe4b283b710ce1451e Merge: 2079106 39eaef9 Author: Paul Eggert Date: Sun Dec 28 10:14:19 2014 -0800 Merge from origin/emacs-24 The following commits were skipped: 39eaef9 lisp/international/mule.el (define-coding-system): Fix typos in the doc string. Add missing ChangeLog entry for the previous commit. df932d8 lisp/international/mule.el (define-coding-system): Improve docstring. commit f646cd99e5f2181cbaef365d2f8262789a515e45 Author: Paul Eggert Date: Sun Dec 28 10:05:14 2014 -0800 * build-aux/git-hooks/commit-msg: Allow tabs. Treat them as if they were expanded to spaces, with tab stops every 8 columns. diff --git a/ChangeLog b/ChangeLog index b6d0fcb..1b161ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-12-28 Paul Eggert + + * build-aux/git-hooks/commit-msg: Allow tabs. + Treat them as if they were expanded to spaces, with tab stops + every 8 columns. + 2014-12-17 Paul Eggert * .gitignore: Ignore /conftest*. diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 2e3e4f2..9b6179e 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -87,6 +87,15 @@ exec $awk ' status = 1 } + { + # Expand tabs to spaces for length calculations etc. + while (match($0, /\t/)) { + before_tab = substr($0, 1, RSTART - 1) + after_tab = substr($0, RSTART + 1) + $0 = sprintf("%s%*s%s", before_tab, 8 - (RSTART - 1) % 8, "", after_tab) + } + } + 78 < length && $0 ~ space { print "Line longer than 78 characters in commit message" status = 1 @@ -103,12 +112,7 @@ exec $awk ' } $0 ~ non_print { - if (gsub(/\t/, "")) { - print "Tab in commit message; please use spaces instead" - } - if ($0 ~ non_print) { - print "Unprintable character in commit message" - } + print "Unprintable character in commit message" status = 1 } commit 20791069fa34b486c018ba7f27982bdc6ad2a4ea Author: Paul Eggert Date: Sun Dec 28 09:00:14 2014 -0800 Fix produce_composite_width typo * term.c (produce_composite_glyph): Fix typo that confused number of columns for pixel width. diff --git a/src/ChangeLog b/src/ChangeLog index 9e3fb90..2ab5101 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-12-28 Paul Eggert + + Fix produce_composite_width typo + * term.c (produce_composite_glyph): + Fix typo that confused number of columns for pixel width. + 2014-12-28 Paul Eggert Wrap dll functions more simply diff --git a/src/term.c b/src/term.c index 04f6e33..bcb83e5 100644 --- a/src/term.c +++ b/src/term.c @@ -1736,7 +1736,7 @@ produce_composite_glyph (struct it *it) { struct composition *cmp = composition_table[it->cmp_it.id]; - it->pixel_width = cmp->width; + it->pixel_width = cmp->pixel_width; } else { commit 39eaef9f8b5aa9481e8d7c636f27b87fe8310060 Author: Eli Zaretskii Date: Sun Dec 28 17:43:43 2014 +0200 lisp/international/mule.el (define-coding-system): Fix typos in the doc string. Add missing ChangeLog entry for the previous commit. Backported from trunk; do not merge back. (cherry picked from commit 79e2dade762491c58aa6396e35bae0ef418bafc6) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b8f8f6..bd7959e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2014-12-28 Eli Zaretskii + + * international/mule.el (define-coding-system): Fix typos in the + doc string. + +2014-12-28 Kenichi Handa + + * international/mule.el (define-coding-system): Improve the doc + string. + 2014-12-27 Fabián Ezequiel Gallina * progmodes/python.el (python-shell-buffer-substring): Handle diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 4f8d50c..c957a77 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -599,21 +599,22 @@ opposite of decoding). The decoding is done by at most 3 steps; the first is to convert a byte sequence to a character sequence by one of Emacs' -internal routines specified by :coding-type attribute. The +internal routines specified by `:coding-type' attribute. The optional second step is to convert the character sequence (the result of the first step) by a translation table specified -by :decode-translation-table attribute. The optional third step -is to convert the above reslut by a Lisp function specified -by :post-read-conversion attribute. - -The encoding is done by at most 3 steps which are reverse of the -decoding steps. The optional first step converts a character -sequence to another character sequence by a Lisp function -specified by :pre-write-conversion attribute. The optional -second step converts the above result by a translation table -specified by :encode-translation-table attribute.. The third -step converts the abobe result to a byte sequence by one of -Emacs' internal routines specified by :coding-type attribute. +by `:decode-translation-table' attribute. The optional third step +is to convert the above result by a Lisp function specified +by `:post-read-conversion' attribute. + +The encoding is done by at most 3 steps, which are the reverse +of the decoding steps. The optional first step converts a +character sequence to another character sequence by a Lisp +function specified by `:pre-write-conversion' attribute. The +optional second step converts the above result by a translation +table specified by `:encode-translation-table' attribute. The +third step converts the above result to a byte sequence by one +of the Emacs's internal routines specified by the `:coding-type' +attribute. The following attributes have special meanings. Those labeled as \"(required)\" should not be omitted. @@ -629,53 +630,52 @@ decodes and encodes to. It must be one of `charset', `utf-8', `utf-16', `iso-2022', `emacs-mule', `shift-jis', `ccl', `raw-text', `undecided'. -If VALUE is `charset', the coding system is for handling a byte -sequence in which each byte or each two to four bytes sequence -represents a character code of a charset specified -by :charset-list attribute. +If VALUE is `charset', the coding system is for handling a +byte sequence in which each byte or every two- to four-byte +sequence represents a character code of a charset specified +by the `:charset-list' attribute. If VALUE is `utf-8', the coding system is for handling Unicode -UTF-8 byte sequence. See also the documentation of the -attribute :bom. +UTF-8 byte sequences. See also the documentation of the +attribute `:bom'. If VALUE is `utf-16', the coding system is for handling Unicode -UTF-16 byte sequence. See also the documentation of the -attributes :bom and :endian. +UTF-16 byte sequences. See also the documentation of the +attributes :bom and `:endian'. -If VALUE is `iso-2022', the coding system is for handling a byte -sequence conforming to ISO/IEC 2022. See also the documentation -of the attributes :charset-list, :flags, and :designation. +If VALUE is `iso-2022', the coding system is for handling byte +sequences conforming to ISO/IEC 2022. See also the documentation +of the attributes `:charset-list', `:flags', and `:designation'. -If VALUE is `emacs-mule', the coding system is for handling a -byte sequence which Emacs 20 and 21 used for internal character -representations. +If VALUE is `emacs-mule', the coding system is for handling +byte sequences which Emacs 20 and 21 used for their internal +representation of characters. -If VALUE is `shift-jis', the coding system is for handling a byte -sequence of Shift_JIS format. See also the -attribute :charset-list. +If VALUE is `shift-jis', the coding system is for handling byte +sequences of Shift_JIS format. See also the attribute `:charset-list'. -If VALUE is `ccl', the coding system uses CCL programs to decodes -and encodes to a byte sequence. The CCL programs must be -specified by the attributes :ccl-decoder and :ccl-encoder. +If VALUE is `ccl', the coding system uses CCL programs to decode +and encode byte sequences. The CCL programs must be +specified by the attributes `:ccl-decoder' and `:ccl-encoder'. -If VALUE is `raw-text', the coding system decodes a byte sequence -as is. +If VALUE is `raw-text', the coding system decodes byte sequences +without any conversions. `:eol-type' VALUE is the EOL (end-of-line) format of the coding system. It must be one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL -\(i.e. single LF), `dos' means DOS-like EOL \(i.e. sequence of CR LF), -and `mac' means Mac-like EOL \(i.e. single CR). If omitted, Emacs -detects the EOL format automatically when decoding. +\(i.e. a single LF character), `dos' means DOS-like EOL \(i.e. a sequence +of CR followed by LF), and `mac' means Mac-like EOL \(i.e. a single CR). +If omitted, Emacs detects the EOL format automatically when decoding. -`:charset-list' (required if :coding-type is `charset' or `shift-jis') +`:charset-list' (required if `:coding-type' is `charset' or `shift-jis') VALUE must be a list of charsets supported by the coding system. -If `coding-type:' is `charset', on decoding and encoding by the +If `coding-type:' is `charset', then on decoding and encoding by the coding system, if a character belongs to multiple charsets in the -list, a charset that comes earlier in the list is selected. +list, a charset that comes first in the list is selected. If `:coding-type' is `iso-2022', VALUE may be `iso-2022', which indicates that the coding system supports all ISO-2022 based @@ -685,7 +685,7 @@ If `:coding-type' is `shift-jis', VALUE must be a list of three to four charsets supported by Shift_JIS encoding scheme. The first charset (one dimension) is for code space 0x00..0x7F, the second (one dimension) for 0xA1..0xDF, the third (two dimension) -for 0x8140..0xEFFC, the optional fourth (thw dimension) for +for 0x8140..0xEFFC, the optional fourth (three dimension) for 0xF040..0xFCFC. If `:coding-type' is `emacs-mule', VALUE may be `emacs-mule', @@ -711,9 +711,9 @@ VALUE must be a translation table to use on encoding. VALUE must be a function to call after some text is inserted and decoded by the coding system itself and before any functions in `after-insert-functions' are called. This function is passed one -argument; the number of characters in the text to convert, with +argument: the number of characters in the text to convert, with point at the start of the text. The function should leave point -the same, and return the new character count. +unchanged, and should return the new character count. `:pre-write-conversion' @@ -742,7 +742,7 @@ to lower case. `:mime-text-unsuitable' VALUE non-nil means the `:mime-charset' property names a charset which -is unsuitable for the top-level media type \"text\". +is unsuitable for the top-level media of type \"text\". `:flags' @@ -772,8 +772,8 @@ This attribute is meaningful only when `:coding-type' is `iso-2022'. `:bom' -This attributes specifies whether the coding system uses a `byte order -mark'. VALUE must be nil, t, or cons of coding systems whose +This attributes specifies whether the coding system uses a \"byte order +mark\". VALUE must be nil, t, or a cons cell of coding systems whose `:coding-type' is `utf-16' or `utf-8'. If the value is nil, on decoding, don't treat the first two-byte as @@ -782,9 +782,9 @@ BOM, and on encoding, don't produce BOM bytes. If the value is t, on decoding, skip the first two-byte as BOM, and on encoding, produce BOM bytes according to the value of `:endian'. -If the value is cons, on decoding, check the first two-byte. If they -are 0xFE 0xFF, use the car part coding system of the value. If they -are 0xFF 0xFE, use the cdr part coding system of the value. +If the value is a cons cell, on decoding, check the first two bytes. +If they are 0xFE 0xFF, use the car part coding system of the value. +If they are 0xFF 0xFE, use the cdr part coding system of the value. Otherwise, treat them as bytes for a normal character. On encoding, produce BOM bytes according to the value of `:endian'. @@ -801,14 +801,14 @@ This attribute is meaningful only when `:coding-type' is `utf-16'. `:ccl-decoder' (required if :coding-type is `ccl') VALUE is a CCL program name defined by `define-ccl-program'. The -the CCL program reads a byte sequence and writes a character -sequence as a decoding result. +CCL program reads a byte sequence and writes a character sequence +as a decoding result. `:ccl-encoder' (required if :coding-type is `ccl') VALUE is a CCL program name defined by `define-ccl-program'. The -the CCL program reads a character sequence and writes a byte -sequence as a encoding result. +CCL program reads a character sequence and writes a byte sequence +as an encoding result. `:inhibit-null-byte-detection' commit df932d859162d476e51a0c709a179a2a451e8119 Author: Kenichi Handa Date: Sun Dec 28 22:17:33 2014 +0900 lisp/international/mule.el (define-coding-system): Improve docstring. Backported from trunk; do not merge back. (cherry picked from commit 5979af512bf5d6a28acea24299b67c7939d9e703) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index bb8111e..4f8d50c 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -593,6 +593,28 @@ as the single-shift area.") The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE may be any symbol. +A coding system specifies a rule to decode (i.e. to convert a +byte sequence to a character sequence) and a rule to encode (the +opposite of decoding). + +The decoding is done by at most 3 steps; the first is to convert +a byte sequence to a character sequence by one of Emacs' +internal routines specified by :coding-type attribute. The +optional second step is to convert the character sequence (the +result of the first step) by a translation table specified +by :decode-translation-table attribute. The optional third step +is to convert the above reslut by a Lisp function specified +by :post-read-conversion attribute. + +The encoding is done by at most 3 steps which are reverse of the +decoding steps. The optional first step converts a character +sequence to another character sequence by a Lisp function +specified by :pre-write-conversion attribute. The optional +second step converts the above result by a translation table +specified by :encode-translation-table attribute.. The third +step converts the abobe result to a byte sequence by one of +Emacs' internal routines specified by :coding-type attribute. + The following attributes have special meanings. Those labeled as \"(required)\" should not be omitted. @@ -602,8 +624,42 @@ VALUE is a character to display on mode line for the coding system. `:coding-type' (required) -VALUE must be one of `charset', `utf-8', `utf-16', `iso-2022', -`emacs-mule', `shift-jis', `ccl', `raw-text', `undecided'. +VALUE specifies the format of byte sequence the coding system +decodes and encodes to. It must be one of `charset', `utf-8', +`utf-16', `iso-2022', `emacs-mule', `shift-jis', `ccl', +`raw-text', `undecided'. + +If VALUE is `charset', the coding system is for handling a byte +sequence in which each byte or each two to four bytes sequence +represents a character code of a charset specified +by :charset-list attribute. + +If VALUE is `utf-8', the coding system is for handling Unicode +UTF-8 byte sequence. See also the documentation of the +attribute :bom. + +If VALUE is `utf-16', the coding system is for handling Unicode +UTF-16 byte sequence. See also the documentation of the +attributes :bom and :endian. + +If VALUE is `iso-2022', the coding system is for handling a byte +sequence conforming to ISO/IEC 2022. See also the documentation +of the attributes :charset-list, :flags, and :designation. + +If VALUE is `emacs-mule', the coding system is for handling a +byte sequence which Emacs 20 and 21 used for internal character +representations. + +If VALUE is `shift-jis', the coding system is for handling a byte +sequence of Shift_JIS format. See also the +attribute :charset-list. + +If VALUE is `ccl', the coding system uses CCL programs to decodes +and encodes to a byte sequence. The CCL programs must be +specified by the attributes :ccl-decoder and :ccl-encoder. + +If VALUE is `raw-text', the coding system decodes a byte sequence +as is. `:eol-type' @@ -613,16 +669,28 @@ one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL and `mac' means Mac-like EOL \(i.e. single CR). If omitted, Emacs detects the EOL format automatically when decoding. -`:charset-list' +`:charset-list' (required if :coding-type is `charset' or `shift-jis') + +VALUE must be a list of charsets supported by the coding system. + +If `coding-type:' is `charset', on decoding and encoding by the +coding system, if a character belongs to multiple charsets in the +list, a charset that comes earlier in the list is selected. + +If `:coding-type' is `iso-2022', VALUE may be `iso-2022', which +indicates that the coding system supports all ISO-2022 based +charsets. + +If `:coding-type' is `shift-jis', VALUE must be a list of three +to four charsets supported by Shift_JIS encoding scheme. The +first charset (one dimension) is for code space 0x00..0x7F, the +second (one dimension) for 0xA1..0xDF, the third (two dimension) +for 0x8140..0xEFFC, the optional fourth (thw dimension) for +0xF040..0xFCFC. -VALUE must be a list of charsets supported by the coding system. On -encoding by the coding system, if a character belongs to multiple -charsets in the list, a charset that comes earlier in the list is -selected. If `:coding-type' is `iso-2022', VALUE may be `iso-2022', -which indicates that the coding system supports all ISO-2022 based -charsets. If `:coding-type' is `emacs-mule', VALUE may be -`emacs-mule', which indicates that the coding system supports all -charsets that have the `:emacs-mule-id' property. +If `:coding-type' is `emacs-mule', VALUE may be `emacs-mule', +which indicates that the coding system supports all charsets that +have the `:emacs-mule-id' property. `:ascii-compatible-p' @@ -730,17 +798,17 @@ little-endian respectively. The default value is `big'. This attribute is meaningful only when `:coding-type' is `utf-16'. -`:ccl-decoder' +`:ccl-decoder' (required if :coding-type is `ccl') -VALUE is a symbol representing the registered CCL program used for -decoding. This attribute is meaningful only when `:coding-type' is -`ccl'. +VALUE is a CCL program name defined by `define-ccl-program'. The +the CCL program reads a byte sequence and writes a character +sequence as a decoding result. -`:ccl-encoder' +`:ccl-encoder' (required if :coding-type is `ccl') -VALUE is a symbol representing the registered CCL program used for -encoding. This attribute is meaningful only when `:coding-type' is -`ccl'. +VALUE is a CCL program name defined by `define-ccl-program'. The +the CCL program reads a character sequence and writes a byte +sequence as a encoding result. `:inhibit-null-byte-detection' commit 79e2dade762491c58aa6396e35bae0ef418bafc6 Author: Eli Zaretskii Date: Sun Dec 28 17:43:43 2014 +0200 lisp/international/mule.el (define-coding-system): Fix typos in the doc string. Add missing ChangeLog entry for the previous commit. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 193e0c0..ba7503f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2014-12-28 Eli Zaretskii + + * international/mule.el (define-coding-system): Fix typos in the + doc string. + +2014-12-28 Kenichi Handa + + * international/mule.el (define-coding-system): Improve the doc + string. + 2014-12-28 Ivan Shmakov * net/shr.el (shr-tag-table): Fix handling of tbody/header/footer diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 4f8d50c..c957a77 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -599,21 +599,22 @@ opposite of decoding). The decoding is done by at most 3 steps; the first is to convert a byte sequence to a character sequence by one of Emacs' -internal routines specified by :coding-type attribute. The +internal routines specified by `:coding-type' attribute. The optional second step is to convert the character sequence (the result of the first step) by a translation table specified -by :decode-translation-table attribute. The optional third step -is to convert the above reslut by a Lisp function specified -by :post-read-conversion attribute. - -The encoding is done by at most 3 steps which are reverse of the -decoding steps. The optional first step converts a character -sequence to another character sequence by a Lisp function -specified by :pre-write-conversion attribute. The optional -second step converts the above result by a translation table -specified by :encode-translation-table attribute.. The third -step converts the abobe result to a byte sequence by one of -Emacs' internal routines specified by :coding-type attribute. +by `:decode-translation-table' attribute. The optional third step +is to convert the above result by a Lisp function specified +by `:post-read-conversion' attribute. + +The encoding is done by at most 3 steps, which are the reverse +of the decoding steps. The optional first step converts a +character sequence to another character sequence by a Lisp +function specified by `:pre-write-conversion' attribute. The +optional second step converts the above result by a translation +table specified by `:encode-translation-table' attribute. The +third step converts the above result to a byte sequence by one +of the Emacs's internal routines specified by the `:coding-type' +attribute. The following attributes have special meanings. Those labeled as \"(required)\" should not be omitted. @@ -629,53 +630,52 @@ decodes and encodes to. It must be one of `charset', `utf-8', `utf-16', `iso-2022', `emacs-mule', `shift-jis', `ccl', `raw-text', `undecided'. -If VALUE is `charset', the coding system is for handling a byte -sequence in which each byte or each two to four bytes sequence -represents a character code of a charset specified -by :charset-list attribute. +If VALUE is `charset', the coding system is for handling a +byte sequence in which each byte or every two- to four-byte +sequence represents a character code of a charset specified +by the `:charset-list' attribute. If VALUE is `utf-8', the coding system is for handling Unicode -UTF-8 byte sequence. See also the documentation of the -attribute :bom. +UTF-8 byte sequences. See also the documentation of the +attribute `:bom'. If VALUE is `utf-16', the coding system is for handling Unicode -UTF-16 byte sequence. See also the documentation of the -attributes :bom and :endian. +UTF-16 byte sequences. See also the documentation of the +attributes :bom and `:endian'. -If VALUE is `iso-2022', the coding system is for handling a byte -sequence conforming to ISO/IEC 2022. See also the documentation -of the attributes :charset-list, :flags, and :designation. +If VALUE is `iso-2022', the coding system is for handling byte +sequences conforming to ISO/IEC 2022. See also the documentation +of the attributes `:charset-list', `:flags', and `:designation'. -If VALUE is `emacs-mule', the coding system is for handling a -byte sequence which Emacs 20 and 21 used for internal character -representations. +If VALUE is `emacs-mule', the coding system is for handling +byte sequences which Emacs 20 and 21 used for their internal +representation of characters. -If VALUE is `shift-jis', the coding system is for handling a byte -sequence of Shift_JIS format. See also the -attribute :charset-list. +If VALUE is `shift-jis', the coding system is for handling byte +sequences of Shift_JIS format. See also the attribute `:charset-list'. -If VALUE is `ccl', the coding system uses CCL programs to decodes -and encodes to a byte sequence. The CCL programs must be -specified by the attributes :ccl-decoder and :ccl-encoder. +If VALUE is `ccl', the coding system uses CCL programs to decode +and encode byte sequences. The CCL programs must be +specified by the attributes `:ccl-decoder' and `:ccl-encoder'. -If VALUE is `raw-text', the coding system decodes a byte sequence -as is. +If VALUE is `raw-text', the coding system decodes byte sequences +without any conversions. `:eol-type' VALUE is the EOL (end-of-line) format of the coding system. It must be one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL -\(i.e. single LF), `dos' means DOS-like EOL \(i.e. sequence of CR LF), -and `mac' means Mac-like EOL \(i.e. single CR). If omitted, Emacs -detects the EOL format automatically when decoding. +\(i.e. a single LF character), `dos' means DOS-like EOL \(i.e. a sequence +of CR followed by LF), and `mac' means Mac-like EOL \(i.e. a single CR). +If omitted, Emacs detects the EOL format automatically when decoding. -`:charset-list' (required if :coding-type is `charset' or `shift-jis') +`:charset-list' (required if `:coding-type' is `charset' or `shift-jis') VALUE must be a list of charsets supported by the coding system. -If `coding-type:' is `charset', on decoding and encoding by the +If `coding-type:' is `charset', then on decoding and encoding by the coding system, if a character belongs to multiple charsets in the -list, a charset that comes earlier in the list is selected. +list, a charset that comes first in the list is selected. If `:coding-type' is `iso-2022', VALUE may be `iso-2022', which indicates that the coding system supports all ISO-2022 based @@ -685,7 +685,7 @@ If `:coding-type' is `shift-jis', VALUE must be a list of three to four charsets supported by Shift_JIS encoding scheme. The first charset (one dimension) is for code space 0x00..0x7F, the second (one dimension) for 0xA1..0xDF, the third (two dimension) -for 0x8140..0xEFFC, the optional fourth (thw dimension) for +for 0x8140..0xEFFC, the optional fourth (three dimension) for 0xF040..0xFCFC. If `:coding-type' is `emacs-mule', VALUE may be `emacs-mule', @@ -711,9 +711,9 @@ VALUE must be a translation table to use on encoding. VALUE must be a function to call after some text is inserted and decoded by the coding system itself and before any functions in `after-insert-functions' are called. This function is passed one -argument; the number of characters in the text to convert, with +argument: the number of characters in the text to convert, with point at the start of the text. The function should leave point -the same, and return the new character count. +unchanged, and should return the new character count. `:pre-write-conversion' @@ -742,7 +742,7 @@ to lower case. `:mime-text-unsuitable' VALUE non-nil means the `:mime-charset' property names a charset which -is unsuitable for the top-level media type \"text\". +is unsuitable for the top-level media of type \"text\". `:flags' @@ -772,8 +772,8 @@ This attribute is meaningful only when `:coding-type' is `iso-2022'. `:bom' -This attributes specifies whether the coding system uses a `byte order -mark'. VALUE must be nil, t, or cons of coding systems whose +This attributes specifies whether the coding system uses a \"byte order +mark\". VALUE must be nil, t, or a cons cell of coding systems whose `:coding-type' is `utf-16' or `utf-8'. If the value is nil, on decoding, don't treat the first two-byte as @@ -782,9 +782,9 @@ BOM, and on encoding, don't produce BOM bytes. If the value is t, on decoding, skip the first two-byte as BOM, and on encoding, produce BOM bytes according to the value of `:endian'. -If the value is cons, on decoding, check the first two-byte. If they -are 0xFE 0xFF, use the car part coding system of the value. If they -are 0xFF 0xFE, use the cdr part coding system of the value. +If the value is a cons cell, on decoding, check the first two bytes. +If they are 0xFE 0xFF, use the car part coding system of the value. +If they are 0xFF 0xFE, use the cdr part coding system of the value. Otherwise, treat them as bytes for a normal character. On encoding, produce BOM bytes according to the value of `:endian'. @@ -801,14 +801,14 @@ This attribute is meaningful only when `:coding-type' is `utf-16'. `:ccl-decoder' (required if :coding-type is `ccl') VALUE is a CCL program name defined by `define-ccl-program'. The -the CCL program reads a byte sequence and writes a character -sequence as a decoding result. +CCL program reads a byte sequence and writes a character sequence +as a decoding result. `:ccl-encoder' (required if :coding-type is `ccl') VALUE is a CCL program name defined by `define-ccl-program'. The -the CCL program reads a character sequence and writes a byte -sequence as a encoding result. +CCL program reads a character sequence and writes a byte sequence +as an encoding result. `:inhibit-null-byte-detection' commit a45d4b846434cf9fb70ac9e4d591956af4259214 Merge: c2f9c07 53822ba Author: K. Handa Date: Sun Dec 28 23:16:13 2014 +0900 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 53822badf47960e9341dd31e379affe86d3a7165 Author: Ivan Shmakov Date: Sun Dec 28 15:06:05 2014 +0100 shr table header/footer fixes Fixes: debbugs:19444 * lisp/net/shr.el (shr-tag-table): Fix handling of tbody/header/footer elements in tables. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f0f9ba..193e0c0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-12-28 Ivan Shmakov + * net/shr.el (shr-tag-table): Fix handling of tbody/header/footer + elements in tables (bug#19444). + * net/eww.el (eww-handle-link): Fix typo in "up" rel handling (bug#19445). diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 387bb02..26bb292 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1439,10 +1439,11 @@ The preference is a float determined from `shr-prefer-media-type'." (defun shr-tag-table (dom) (shr-ensure-paragraph) - (let* ((caption (dom-child-by-tag dom 'caption)) - (header (dom-child-by-tag dom 'thead)) - (body (or (dom-child-by-tag dom 'tbody) dom)) - (footer (dom-child-by-tag dom 'tfoot)) + (let* ((caption (dom-children (dom-child-by-tag dom 'caption))) + (header (dom-non-text-children (dom-child-by-tag dom 'thead))) + (body (dom-non-text-children (or (dom-child-by-tag dom 'tbody) + dom))) + (footer (dom-non-text-children (dom-child-by-tag dom 'tfoot))) (bgcolor (dom-attr dom 'bgcolor)) (start (point)) (shr-stylesheet (nconc (list (cons 'background-color bgcolor)) @@ -1461,42 +1462,62 @@ The preference is a float determined from `shr-prefer-media-type'." ;; It's a real table, so render it. (shr-tag-table-1 (nconc - (if caption `((tr (td ,@caption)))) - (if header - (if footer - ;; header + body + footer - (if (= nheader nbody) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@header ,@body ,@footer))))) - (nconc `((tr (td (table (tbody ,@header ,@body))))) - (if (= nfooter 1) - footer - `((tr (td (table (tbody ,@footer)))))))) - (nconc `((tr (td (table (tbody ,@header))))) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (nconc `((tr (td (table (tbody ,@body))))) - (if (= nfooter 1) - footer - `((tr (td (table (tbody ,@footer)))))))))) - ;; header + body - (if (= nheader nbody) - `((tr (td (table (tbody ,@header ,@body))))) - (if (= nheader 1) - `(,@header (tr (td (table (tbody ,@body))))) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))))))) - (if footer - ;; body + footer - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (nconc `((tr (td (table (tbody ,@body))))) - (if (= nfooter 1) - footer - `((tr (td (table (tbody ,@footer)))))))) - (if caption - `((tr (td (table (tbody ,@body))))) - body)))))) + (list 'table nil) + (if caption `((tr nil (td nil ,@caption)))) + (cond (header + (if footer + ;; header + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr nil (td nil (table nil + (tbody nil ,@header + ,@body ,@footer))))) + (nconc `((tr nil (td nil (table nil + (tbody nil ,@header + ,@body))))) + (if (= nfooter 1) + footer + `((tr nil (td nil (table + nil (tbody + nil ,@footer)))))))) + (nconc `((tr nil (td nil (table nil (tbody + nil ,@header))))) + (if (= nbody nfooter) + `((tr nil (td nil (table + nil (tbody nil ,@body + ,@footer))))) + (nconc `((tr nil (td nil (table + nil (tbody nil + ,@body))))) + (if (= nfooter 1) + footer + `((tr nil (td nil (table + nil + (tbody + nil + ,@footer)))))))))) + ;; header + body + (if (= nheader nbody) + `((tr nil (td nil (table nil (tbody nil ,@header + ,@body))))) + (if (= nheader 1) + `(,@header (tr nil (td nil (table + nil (tbody nil ,@body))))) + `((tr nil (td nil (table nil (tbody nil ,@header)))) + (tr nil (td nil (table nil (tbody nil ,@body))))))))) + (footer + ;; body + footer + (if (= nbody nfooter) + `((tr nil (td nil (table + nil (tbody nil ,@body ,@footer))))) + (nconc `((tr nil (td nil (table nil (tbody nil ,@body))))) + (if (= nfooter 1) + footer + `((tr nil (td nil (table + nil (tbody nil ,@footer))))))))) + (caption + `((tr nil (td nil (table nil (tbody nil ,@body)))))) + (body))))) (when bgcolor (shr-colorize-region start (point) (cdr (assq 'color shr-stylesheet)) bgcolor)) commit 28a584d0e930a2f19dc4f09c9dfb85d9dac24587 Author: Ivan Shmakov Date: Sun Dec 28 14:54:46 2014 +0100 Fix eww typo in "up" handling Fixes: debbugs:19445 * lisp/net/eww.el (eww-handle-link): Fix typo in "up" rel handling. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfe2dfb..4f0f9ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-28 Ivan Shmakov + + * net/eww.el (eww-handle-link): Fix typo in "up" rel handling + (bug#19445). + 2014-12-28 Juri Linkov * vc/compare-w.el: Require diff-mode for diff faces. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c6d3bbc..9d787d3 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -445,7 +445,7 @@ See the `eww-search-prefix' variable for the search engine used." ("start" . :start) ("home" . :home) ("contents" . :contents) - ("up" . up))))) + ("up" . :up))))) (and href where (plist-put eww-data (cdr where) href)))) commit c2f9c07aa02d1c8cba4efdd503463642a910cd6b Merge: 5979af5 e092acc Author: K. Handa Date: Sun Dec 28 22:18:39 2014 +0900 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 5979af512bf5d6a28acea24299b67c7939d9e703 Author: Kenichi Handa Date: Sun Dec 28 22:17:33 2014 +0900 (define-coding-system): Improve docstring. diff --git a/lisp/international/mule.el b/lisp/international/mule.el index bb8111e..4f8d50c 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -593,6 +593,28 @@ as the single-shift area.") The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE may be any symbol. +A coding system specifies a rule to decode (i.e. to convert a +byte sequence to a character sequence) and a rule to encode (the +opposite of decoding). + +The decoding is done by at most 3 steps; the first is to convert +a byte sequence to a character sequence by one of Emacs' +internal routines specified by :coding-type attribute. The +optional second step is to convert the character sequence (the +result of the first step) by a translation table specified +by :decode-translation-table attribute. The optional third step +is to convert the above reslut by a Lisp function specified +by :post-read-conversion attribute. + +The encoding is done by at most 3 steps which are reverse of the +decoding steps. The optional first step converts a character +sequence to another character sequence by a Lisp function +specified by :pre-write-conversion attribute. The optional +second step converts the above result by a translation table +specified by :encode-translation-table attribute.. The third +step converts the abobe result to a byte sequence by one of +Emacs' internal routines specified by :coding-type attribute. + The following attributes have special meanings. Those labeled as \"(required)\" should not be omitted. @@ -602,8 +624,42 @@ VALUE is a character to display on mode line for the coding system. `:coding-type' (required) -VALUE must be one of `charset', `utf-8', `utf-16', `iso-2022', -`emacs-mule', `shift-jis', `ccl', `raw-text', `undecided'. +VALUE specifies the format of byte sequence the coding system +decodes and encodes to. It must be one of `charset', `utf-8', +`utf-16', `iso-2022', `emacs-mule', `shift-jis', `ccl', +`raw-text', `undecided'. + +If VALUE is `charset', the coding system is for handling a byte +sequence in which each byte or each two to four bytes sequence +represents a character code of a charset specified +by :charset-list attribute. + +If VALUE is `utf-8', the coding system is for handling Unicode +UTF-8 byte sequence. See also the documentation of the +attribute :bom. + +If VALUE is `utf-16', the coding system is for handling Unicode +UTF-16 byte sequence. See also the documentation of the +attributes :bom and :endian. + +If VALUE is `iso-2022', the coding system is for handling a byte +sequence conforming to ISO/IEC 2022. See also the documentation +of the attributes :charset-list, :flags, and :designation. + +If VALUE is `emacs-mule', the coding system is for handling a +byte sequence which Emacs 20 and 21 used for internal character +representations. + +If VALUE is `shift-jis', the coding system is for handling a byte +sequence of Shift_JIS format. See also the +attribute :charset-list. + +If VALUE is `ccl', the coding system uses CCL programs to decodes +and encodes to a byte sequence. The CCL programs must be +specified by the attributes :ccl-decoder and :ccl-encoder. + +If VALUE is `raw-text', the coding system decodes a byte sequence +as is. `:eol-type' @@ -613,16 +669,28 @@ one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL and `mac' means Mac-like EOL \(i.e. single CR). If omitted, Emacs detects the EOL format automatically when decoding. -`:charset-list' +`:charset-list' (required if :coding-type is `charset' or `shift-jis') + +VALUE must be a list of charsets supported by the coding system. + +If `coding-type:' is `charset', on decoding and encoding by the +coding system, if a character belongs to multiple charsets in the +list, a charset that comes earlier in the list is selected. + +If `:coding-type' is `iso-2022', VALUE may be `iso-2022', which +indicates that the coding system supports all ISO-2022 based +charsets. + +If `:coding-type' is `shift-jis', VALUE must be a list of three +to four charsets supported by Shift_JIS encoding scheme. The +first charset (one dimension) is for code space 0x00..0x7F, the +second (one dimension) for 0xA1..0xDF, the third (two dimension) +for 0x8140..0xEFFC, the optional fourth (thw dimension) for +0xF040..0xFCFC. -VALUE must be a list of charsets supported by the coding system. On -encoding by the coding system, if a character belongs to multiple -charsets in the list, a charset that comes earlier in the list is -selected. If `:coding-type' is `iso-2022', VALUE may be `iso-2022', -which indicates that the coding system supports all ISO-2022 based -charsets. If `:coding-type' is `emacs-mule', VALUE may be -`emacs-mule', which indicates that the coding system supports all -charsets that have the `:emacs-mule-id' property. +If `:coding-type' is `emacs-mule', VALUE may be `emacs-mule', +which indicates that the coding system supports all charsets that +have the `:emacs-mule-id' property. `:ascii-compatible-p' @@ -730,17 +798,17 @@ little-endian respectively. The default value is `big'. This attribute is meaningful only when `:coding-type' is `utf-16'. -`:ccl-decoder' +`:ccl-decoder' (required if :coding-type is `ccl') -VALUE is a symbol representing the registered CCL program used for -decoding. This attribute is meaningful only when `:coding-type' is -`ccl'. +VALUE is a CCL program name defined by `define-ccl-program'. The +the CCL program reads a byte sequence and writes a character +sequence as a decoding result. -`:ccl-encoder' +`:ccl-encoder' (required if :coding-type is `ccl') -VALUE is a symbol representing the registered CCL program used for -encoding. This attribute is meaningful only when `:coding-type' is -`ccl'. +VALUE is a CCL program name defined by `define-ccl-program'. The +the CCL program reads a character sequence and writes a byte +sequence as a encoding result. `:inhibit-null-byte-detection' commit e092accb6bb8aea08dab1796d707b3adce55a38c Author: Paul Eggert Date: Fri Dec 26 09:32:06 2014 -0800 Wrap dll functions more simply * decompress.c, gnutls.c, image.c, xml.c: If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions, rather than the inverse when not WINDOWSNT. This isolates the fn_* business into the WINDOWSNT-specific section of the code, which makes it easier to maintain the generic code. * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN): * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): * xml.c (DEF_XML2_FN, LOAD_XML2_FN): Remove. All uses replaced by DEF_DLL_FN. * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros. diff --git a/src/ChangeLog b/src/ChangeLog index bdd1882..9e3fb90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,19 @@ 2014-12-28 Paul Eggert + Wrap dll functions more simply + * decompress.c, gnutls.c, image.c, xml.c: + If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions, + rather than the inverse when not WINDOWSNT. This isolates the + fn_* business into the WINDOWSNT-specific section of the code, + which makes it easier to maintain the generic code. + * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN): + * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): + * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): + * xml.c (DEF_XML2_FN, LOAD_XML2_FN): + Remove. All uses replaced by DEF_DLL_FN. + * decompress.c (inflateInit2): Remove; no longer needed. + * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros. + Port memory-full checking to GnuTLS 3.3 Instead of using gnutls_global_set_mem_functions, check every call to a GnuTLS function that might return an indication of memory diff --git a/src/decompress.c b/src/decompress.c index 24ce852..f86aa6f 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -31,26 +31,14 @@ along with GNU Emacs. If not, see . */ static Lisp_Object Qzlib_dll; #ifdef WINDOWSNT -#include -#include "w32.h" +# include +# include "w32.h" -/* Macro for defining functions that will be loaded from the zlib DLL. */ -#define DEF_ZLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args - -/* Macro for loading zlib functions from the library. */ -#define LOAD_ZLIB_FN(lib,func) { \ - fn_##func = (void *) GetProcAddress (lib, #func); \ - if (!fn_##func) return false; \ - } - -DEF_ZLIB_FN (int, inflateInit2_, - (z_streamp strm, int windowBits, const char *version, int stream_size)); - -DEF_ZLIB_FN (int, inflate, - (z_streamp strm, int flush)); - -DEF_ZLIB_FN (int, inflateEnd, - (z_streamp strm)); +DEF_DLL_FN (int, inflateInit2_, + (z_streamp strm, int windowBits, const char *version, + int stream_size)); +DEF_DLL_FN (int, inflate, (z_streamp strm, int flush)); +DEF_DLL_FN (int, inflateEnd, (z_streamp strm)); static bool zlib_initialized; @@ -62,20 +50,19 @@ init_zlib_functions (void) if (!library) return false; - LOAD_ZLIB_FN (library, inflateInit2_); - LOAD_ZLIB_FN (library, inflate); - LOAD_ZLIB_FN (library, inflateEnd); + LOAD_DLL_FN (library, inflateInit2_); + LOAD_DLL_FN (library, inflate); + LOAD_DLL_FN (library, inflateEnd); return true; } -#define fn_inflateInit2(strm, windowBits) \ - fn_inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) - -#else /* !WINDOWSNT */ +# undef inflate +# undef inflateEnd +# undef inflateInit2_ -#define fn_inflateInit2 inflateInit2 -#define fn_inflate inflate -#define fn_inflateEnd inflateEnd +# define inflate fn_inflate +# define inflateEnd fn_inflateEnd +# define inflateInit2_ fn_inflateInit2_ #endif /* WINDOWSNT */ @@ -90,7 +77,7 @@ static void unwind_decompress (void *ddata) { struct decompress_unwind_data *data = ddata; - fn_inflateEnd (data->stream); + inflateEnd (data->stream); /* Delete any uncompressed data already inserted on error. */ if (data->start) @@ -167,7 +154,7 @@ This function can be called only in unibyte buffers. */) /* The magic number 32 apparently means "autodetect both the gzip and zlib formats" according to zlib.h. */ - if (fn_inflateInit2 (&stream, MAX_WBITS + 32) != Z_OK) + if (inflateInit2 (&stream, MAX_WBITS + 32) != Z_OK) return Qnil; unwind_data.start = iend; @@ -197,7 +184,7 @@ This function can be called only in unibyte buffers. */) stream.avail_in = avail_in; stream.next_out = GPT_ADDR; stream.avail_out = avail_out; - inflate_status = fn_inflate (&stream, Z_NO_FLUSH); + inflate_status = inflate (&stream, Z_NO_FLUSH); pos_byte += avail_in - stream.avail_in; decompressed = avail_out - stream.avail_out; insert_from_gap (decompressed, decompressed, 0); diff --git a/src/gnutls.c b/src/gnutls.c index d28dbd0..f945778 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -71,138 +71,129 @@ enum extra_peer_verification #ifdef WINDOWSNT -/* Macro for defining functions that will be loaded from the GnuTLS DLL. */ -#define DEF_GNUTLS_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args - -/* Macro for loading GnuTLS functions from the library. */ -#define LOAD_GNUTLS_FN(lib,func) { \ - fn_##func = (void *) GetProcAddress (lib, #func); \ - if (!fn_##func) return 0; \ - } - -DEF_GNUTLS_FN (gnutls_alert_description_t, gnutls_alert_get, - (gnutls_session_t)); -DEF_GNUTLS_FN (const char *, gnutls_alert_get_name, - (gnutls_alert_description_t)); -DEF_GNUTLS_FN (int, gnutls_alert_send_appropriate, (gnutls_session_t, int)); -DEF_GNUTLS_FN (int, gnutls_anon_allocate_client_credentials, - (gnutls_anon_client_credentials_t *)); -DEF_GNUTLS_FN (void, gnutls_anon_free_client_credentials, - (gnutls_anon_client_credentials_t)); -DEF_GNUTLS_FN (int, gnutls_bye, (gnutls_session_t, gnutls_close_request_t)); -DEF_GNUTLS_FN (int, gnutls_certificate_allocate_credentials, - (gnutls_certificate_credentials_t *)); -DEF_GNUTLS_FN (void, gnutls_certificate_free_credentials, - (gnutls_certificate_credentials_t)); -DEF_GNUTLS_FN (const gnutls_datum_t *, gnutls_certificate_get_peers, - (gnutls_session_t, unsigned int *)); -DEF_GNUTLS_FN (void, gnutls_certificate_set_verify_flags, - (gnutls_certificate_credentials_t, unsigned int)); -DEF_GNUTLS_FN (int, gnutls_certificate_set_x509_crl_file, - (gnutls_certificate_credentials_t, const char *, - gnutls_x509_crt_fmt_t)); -DEF_GNUTLS_FN (int, gnutls_certificate_set_x509_key_file, - (gnutls_certificate_credentials_t, const char *, const char *, - gnutls_x509_crt_fmt_t)); -#if GNUTLS_VERSION_MAJOR + \ - (GNUTLS_VERSION_MINOR > 0 || GNUTLS_VERSION_PATCH >= 20) > 3 -DEF_GNUTLS_FN (int, gnutls_certificate_set_x509_system_trust, - (gnutls_certificate_credentials_t)); -#endif -DEF_GNUTLS_FN (int, gnutls_certificate_set_x509_trust_file, - (gnutls_certificate_credentials_t, const char *, - gnutls_x509_crt_fmt_t)); -DEF_GNUTLS_FN (gnutls_certificate_type_t, gnutls_certificate_type_get, - (gnutls_session_t)); -DEF_GNUTLS_FN (int, gnutls_certificate_verify_peers2, - (gnutls_session_t, unsigned int *)); -DEF_GNUTLS_FN (int, gnutls_credentials_set, - (gnutls_session_t, gnutls_credentials_type_t, void *)); -DEF_GNUTLS_FN (void, gnutls_deinit, (gnutls_session_t)); -DEF_GNUTLS_FN (void, gnutls_dh_set_prime_bits, - (gnutls_session_t, unsigned int)); -DEF_GNUTLS_FN (int, gnutls_dh_get_prime_bits, (gnutls_session_t)); -DEF_GNUTLS_FN (int, gnutls_error_is_fatal, (int)); -DEF_GNUTLS_FN (int, gnutls_global_init, (void)); -DEF_GNUTLS_FN (void, gnutls_global_set_log_function, (gnutls_log_func)); -#ifdef HAVE_GNUTLS3 -DEF_GNUTLS_FN (void, gnutls_global_set_audit_log_function, (gnutls_audit_log_func)); -#endif -DEF_GNUTLS_FN (void, gnutls_global_set_log_level, (int)); -DEF_GNUTLS_FN (int, gnutls_handshake, (gnutls_session_t)); -DEF_GNUTLS_FN (int, gnutls_init, (gnutls_session_t *, unsigned int)); -DEF_GNUTLS_FN (int, gnutls_priority_set_direct, - (gnutls_session_t, const char *, const char **)); -DEF_GNUTLS_FN (size_t, gnutls_record_check_pending, (gnutls_session_t)); -DEF_GNUTLS_FN (ssize_t, gnutls_record_recv, (gnutls_session_t, void *, size_t)); -DEF_GNUTLS_FN (ssize_t, gnutls_record_send, - (gnutls_session_t, const void *, size_t)); -DEF_GNUTLS_FN (const char *, gnutls_strerror, (int)); -DEF_GNUTLS_FN (void, gnutls_transport_set_errno, (gnutls_session_t, int)); -DEF_GNUTLS_FN (const char *, gnutls_check_version, (const char *)); -DEF_GNUTLS_FN (void, gnutls_transport_set_lowat, (gnutls_session_t, int)); -DEF_GNUTLS_FN (void, gnutls_transport_set_ptr2, - (gnutls_session_t, gnutls_transport_ptr_t, - gnutls_transport_ptr_t)); -DEF_GNUTLS_FN (void, gnutls_transport_set_pull_function, - (gnutls_session_t, gnutls_pull_func)); -DEF_GNUTLS_FN (void, gnutls_transport_set_push_function, - (gnutls_session_t, gnutls_push_func)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_check_hostname, - (gnutls_x509_crt_t, const char *)); -DEF_GNUTLS_FN (void, gnutls_x509_crt_deinit, (gnutls_x509_crt_t)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_import, - (gnutls_x509_crt_t, const gnutls_datum_t *, - gnutls_x509_crt_fmt_t)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_init, (gnutls_x509_crt_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_fingerprint, - (gnutls_x509_crt_t, - gnutls_digest_algorithm_t, void *, size_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_version, - (gnutls_x509_crt_t)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_serial, - (gnutls_x509_crt_t, void *, size_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_issuer_dn, - (gnutls_x509_crt_t, char *, size_t *)); -DEF_GNUTLS_FN (time_t, gnutls_x509_crt_get_activation_time, - (gnutls_x509_crt_t)); -DEF_GNUTLS_FN (time_t, gnutls_x509_crt_get_expiration_time, - (gnutls_x509_crt_t)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_dn, - (gnutls_x509_crt_t, char *, size_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_pk_algorithm, - (gnutls_x509_crt_t, unsigned int *)); -DEF_GNUTLS_FN (const char*, gnutls_pk_algorithm_get_name, - (gnutls_pk_algorithm_t)); -DEF_GNUTLS_FN (int, gnutls_pk_bits_to_sec_param, - (gnutls_pk_algorithm_t, unsigned int)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_issuer_unique_id, - (gnutls_x509_crt_t, char *, size_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_subject_unique_id, - (gnutls_x509_crt_t, char *, size_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_signature_algorithm, - (gnutls_x509_crt_t)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_signature, - (gnutls_x509_crt_t, char *, size_t *)); -DEF_GNUTLS_FN (int, gnutls_x509_crt_get_key_id, - (gnutls_x509_crt_t, unsigned int, - unsigned char *, size_t *_size)); -DEF_GNUTLS_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t)); -DEF_GNUTLS_FN (const char*, gnutls_sign_get_name, (gnutls_sign_algorithm_t)); -DEF_GNUTLS_FN (int, gnutls_server_name_set, (gnutls_session_t, - gnutls_server_name_type_t, - const void *, size_t)); -DEF_GNUTLS_FN (gnutls_kx_algorithm_t, gnutls_kx_get, (gnutls_session_t)); -DEF_GNUTLS_FN (const char*, gnutls_kx_get_name, (gnutls_kx_algorithm_t)); -DEF_GNUTLS_FN (gnutls_protocol_t, gnutls_protocol_get_version, - (gnutls_session_t)); -DEF_GNUTLS_FN (const char*, gnutls_protocol_get_name, (gnutls_protocol_t)); -DEF_GNUTLS_FN (gnutls_cipher_algorithm_t, gnutls_cipher_get, - (gnutls_session_t)); -DEF_GNUTLS_FN (const char*, gnutls_cipher_get_name, - (gnutls_cipher_algorithm_t)); -DEF_GNUTLS_FN (gnutls_mac_algorithm_t, gnutls_mac_get, (gnutls_session_t)); -DEF_GNUTLS_FN (const char*, gnutls_mac_get_name, (gnutls_mac_algorithm_t)); +DEF_DLL_FN (gnutls_alert_description_t, gnutls_alert_get, + (gnutls_session_t)); +DEF_DLL_FN (const char *, gnutls_alert_get_name, + (gnutls_alert_description_t)); +DEF_DLL_FN (int, gnutls_alert_send_appropriate, (gnutls_session_t, int)); +DEF_DLL_FN (int, gnutls_anon_allocate_client_credentials, + (gnutls_anon_client_credentials_t *)); +DEF_DLL_FN (void, gnutls_anon_free_client_credentials, + (gnutls_anon_client_credentials_t)); +DEF_DLL_FN (int, gnutls_bye, (gnutls_session_t, gnutls_close_request_t)); +DEF_DLL_FN (int, gnutls_certificate_allocate_credentials, + (gnutls_certificate_credentials_t *)); +DEF_DLL_FN (void, gnutls_certificate_free_credentials, + (gnutls_certificate_credentials_t)); +DEF_DLL_FN (const gnutls_datum_t *, gnutls_certificate_get_peers, + (gnutls_session_t, unsigned int *)); +DEF_DLL_FN (void, gnutls_certificate_set_verify_flags, + (gnutls_certificate_credentials_t, unsigned int)); +DEF_DLL_FN (int, gnutls_certificate_set_x509_crl_file, + (gnutls_certificate_credentials_t, const char *, + gnutls_x509_crt_fmt_t)); +DEF_DLL_FN (int, gnutls_certificate_set_x509_key_file, + (gnutls_certificate_credentials_t, const char *, const char *, + gnutls_x509_crt_fmt_t)); +# if ((GNUTLS_VERSION_MAJOR \ + + (GNUTLS_VERSION_MINOR > 0 || GNUTLS_VERSION_PATCH >= 20)) \ + > 3) +DEF_DLL_FN (int, gnutls_certificate_set_x509_system_trust, + (gnutls_certificate_credentials_t)); +# endif +DEF_DLL_FN (int, gnutls_certificate_set_x509_trust_file, + (gnutls_certificate_credentials_t, const char *, + gnutls_x509_crt_fmt_t)); +DEF_DLL_FN (gnutls_certificate_type_t, gnutls_certificate_type_get, + (gnutls_session_t)); +DEF_DLL_FN (int, gnutls_certificate_verify_peers2, + (gnutls_session_t, unsigned int *)); +DEF_DLL_FN (int, gnutls_credentials_set, + (gnutls_session_t, gnutls_credentials_type_t, void *)); +DEF_DLL_FN (void, gnutls_deinit, (gnutls_session_t)); +DEF_DLL_FN (void, gnutls_dh_set_prime_bits, + (gnutls_session_t, unsigned int)); +DEF_DLL_FN (int, gnutls_dh_get_prime_bits, (gnutls_session_t)); +DEF_DLL_FN (int, gnutls_error_is_fatal, (int)); +DEF_DLL_FN (int, gnutls_global_init, (void)); +DEF_DLL_FN (void, gnutls_global_set_log_function, (gnutls_log_func)); +# ifdef HAVE_GNUTLS3 +DEF_DLL_FN (void, gnutls_global_set_audit_log_function, (gnutls_audit_log_func)); +# endif +DEF_DLL_FN (void, gnutls_global_set_log_level, (int)); +DEF_DLL_FN (int, gnutls_handshake, (gnutls_session_t)); +DEF_DLL_FN (int, gnutls_init, (gnutls_session_t *, unsigned int)); +DEF_DLL_FN (int, gnutls_priority_set_direct, + (gnutls_session_t, const char *, const char **)); +DEF_DLL_FN (size_t, gnutls_record_check_pending, (gnutls_session_t)); +DEF_DLL_FN (ssize_t, gnutls_record_recv, (gnutls_session_t, void *, size_t)); +DEF_DLL_FN (ssize_t, gnutls_record_send, + (gnutls_session_t, const void *, size_t)); +DEF_DLL_FN (const char *, gnutls_strerror, (int)); +DEF_DLL_FN (void, gnutls_transport_set_errno, (gnutls_session_t, int)); +DEF_DLL_FN (const char *, gnutls_check_version, (const char *)); +DEF_DLL_FN (void, gnutls_transport_set_lowat, (gnutls_session_t, int)); +DEF_DLL_FN (void, gnutls_transport_set_ptr2, + (gnutls_session_t, gnutls_transport_ptr_t, + gnutls_transport_ptr_t)); +DEF_DLL_FN (void, gnutls_transport_set_pull_function, + (gnutls_session_t, gnutls_pull_func)); +DEF_DLL_FN (void, gnutls_transport_set_push_function, + (gnutls_session_t, gnutls_push_func)); +DEF_DLL_FN (int, gnutls_x509_crt_check_hostname, + (gnutls_x509_crt_t, const char *)); +DEF_DLL_FN (void, gnutls_x509_crt_deinit, (gnutls_x509_crt_t)); +DEF_DLL_FN (int, gnutls_x509_crt_import, + (gnutls_x509_crt_t, const gnutls_datum_t *, + gnutls_x509_crt_fmt_t)); +DEF_DLL_FN (int, gnutls_x509_crt_init, (gnutls_x509_crt_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_fingerprint, + (gnutls_x509_crt_t, + gnutls_digest_algorithm_t, void *, size_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_version, + (gnutls_x509_crt_t)); +DEF_DLL_FN (int, gnutls_x509_crt_get_serial, + (gnutls_x509_crt_t, void *, size_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_issuer_dn, + (gnutls_x509_crt_t, char *, size_t *)); +DEF_DLL_FN (time_t, gnutls_x509_crt_get_activation_time, + (gnutls_x509_crt_t)); +DEF_DLL_FN (time_t, gnutls_x509_crt_get_expiration_time, + (gnutls_x509_crt_t)); +DEF_DLL_FN (int, gnutls_x509_crt_get_dn, + (gnutls_x509_crt_t, char *, size_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_pk_algorithm, + (gnutls_x509_crt_t, unsigned int *)); +DEF_DLL_FN (const char*, gnutls_pk_algorithm_get_name, + (gnutls_pk_algorithm_t)); +DEF_DLL_FN (int, gnutls_pk_bits_to_sec_param, + (gnutls_pk_algorithm_t, unsigned int)); +DEF_DLL_FN (int, gnutls_x509_crt_get_issuer_unique_id, + (gnutls_x509_crt_t, char *, size_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_subject_unique_id, + (gnutls_x509_crt_t, char *, size_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_signature_algorithm, + (gnutls_x509_crt_t)); +DEF_DLL_FN (int, gnutls_x509_crt_get_signature, + (gnutls_x509_crt_t, char *, size_t *)); +DEF_DLL_FN (int, gnutls_x509_crt_get_key_id, + (gnutls_x509_crt_t, unsigned int, unsigned char *, size_t *_size)); +DEF_DLL_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t)); +DEF_DLL_FN (const char*, gnutls_sign_get_name, (gnutls_sign_algorithm_t)); +DEF_DLL_FN (int, gnutls_server_name_set, + (gnutls_session_t, gnutls_server_name_type_t, + const void *, size_t)); +DEF_DLL_FN (gnutls_kx_algorithm_t, gnutls_kx_get, (gnutls_session_t)); +DEF_DLL_FN (const char*, gnutls_kx_get_name, (gnutls_kx_algorithm_t)); +DEF_DLL_FN (gnutls_protocol_t, gnutls_protocol_get_version, + (gnutls_session_t)); +DEF_DLL_FN (const char*, gnutls_protocol_get_name, (gnutls_protocol_t)); +DEF_DLL_FN (gnutls_cipher_algorithm_t, gnutls_cipher_get, + (gnutls_session_t)); +DEF_DLL_FN (const char*, gnutls_cipher_get_name, + (gnutls_cipher_algorithm_t)); +DEF_DLL_FN (gnutls_mac_algorithm_t, gnutls_mac_get, (gnutls_session_t)); +DEF_DLL_FN (const char*, gnutls_mac_get_name, (gnutls_mac_algorithm_t)); static bool @@ -217,82 +208,83 @@ init_gnutls_functions (void) return 0; } - LOAD_GNUTLS_FN (library, gnutls_alert_get); - LOAD_GNUTLS_FN (library, gnutls_alert_get_name); - LOAD_GNUTLS_FN (library, gnutls_alert_send_appropriate); - LOAD_GNUTLS_FN (library, gnutls_anon_allocate_client_credentials); - LOAD_GNUTLS_FN (library, gnutls_anon_free_client_credentials); - LOAD_GNUTLS_FN (library, gnutls_bye); - LOAD_GNUTLS_FN (library, gnutls_certificate_allocate_credentials); - LOAD_GNUTLS_FN (library, gnutls_certificate_free_credentials); - LOAD_GNUTLS_FN (library, gnutls_certificate_get_peers); - LOAD_GNUTLS_FN (library, gnutls_certificate_set_verify_flags); - LOAD_GNUTLS_FN (library, gnutls_certificate_set_x509_crl_file); - LOAD_GNUTLS_FN (library, gnutls_certificate_set_x509_key_file); -#if GNUTLS_VERSION_MAJOR + \ - (GNUTLS_VERSION_MINOR > 0 || GNUTLS_VERSION_PATCH >= 20) > 3 - LOAD_GNUTLS_FN (library, gnutls_certificate_set_x509_system_trust); -#endif - LOAD_GNUTLS_FN (library, gnutls_certificate_set_x509_trust_file); - LOAD_GNUTLS_FN (library, gnutls_certificate_type_get); - LOAD_GNUTLS_FN (library, gnutls_certificate_verify_peers2); - LOAD_GNUTLS_FN (library, gnutls_credentials_set); - LOAD_GNUTLS_FN (library, gnutls_deinit); - LOAD_GNUTLS_FN (library, gnutls_dh_set_prime_bits); - LOAD_GNUTLS_FN (library, gnutls_dh_get_prime_bits); - LOAD_GNUTLS_FN (library, gnutls_error_is_fatal); - LOAD_GNUTLS_FN (library, gnutls_global_init); - LOAD_GNUTLS_FN (library, gnutls_global_set_log_function); -#ifdef HAVE_GNUTLS3 - LOAD_GNUTLS_FN (library, gnutls_global_set_audit_log_function); -#endif - LOAD_GNUTLS_FN (library, gnutls_global_set_log_level); - LOAD_GNUTLS_FN (library, gnutls_handshake); - LOAD_GNUTLS_FN (library, gnutls_init); - LOAD_GNUTLS_FN (library, gnutls_priority_set_direct); - LOAD_GNUTLS_FN (library, gnutls_record_check_pending); - LOAD_GNUTLS_FN (library, gnutls_record_recv); - LOAD_GNUTLS_FN (library, gnutls_record_send); - LOAD_GNUTLS_FN (library, gnutls_strerror); - LOAD_GNUTLS_FN (library, gnutls_transport_set_errno); - LOAD_GNUTLS_FN (library, gnutls_check_version); + LOAD_DLL_FN (library, gnutls_alert_get); + LOAD_DLL_FN (library, gnutls_alert_get_name); + LOAD_DLL_FN (library, gnutls_alert_send_appropriate); + LOAD_DLL_FN (library, gnutls_anon_allocate_client_credentials); + LOAD_DLL_FN (library, gnutls_anon_free_client_credentials); + LOAD_DLL_FN (library, gnutls_bye); + LOAD_DLL_FN (library, gnutls_certificate_allocate_credentials); + LOAD_DLL_FN (library, gnutls_certificate_free_credentials); + LOAD_DLL_FN (library, gnutls_certificate_get_peers); + LOAD_DLL_FN (library, gnutls_certificate_set_verify_flags); + LOAD_DLL_FN (library, gnutls_certificate_set_x509_crl_file); + LOAD_DLL_FN (library, gnutls_certificate_set_x509_key_file); +# if ((GNUTLS_VERSION_MAJOR \ + + (GNUTLS_VERSION_MINOR > 0 || GNUTLS_VERSION_PATCH >= 20)) \ + > 3) + LOAD_DLL_FN (library, gnutls_certificate_set_x509_system_trust); +# endif + LOAD_DLL_FN (library, gnutls_certificate_set_x509_trust_file); + LOAD_DLL_FN (library, gnutls_certificate_type_get); + LOAD_DLL_FN (library, gnutls_certificate_verify_peers2); + LOAD_DLL_FN (library, gnutls_credentials_set); + LOAD_DLL_FN (library, gnutls_deinit); + LOAD_DLL_FN (library, gnutls_dh_set_prime_bits); + LOAD_DLL_FN (library, gnutls_dh_get_prime_bits); + LOAD_DLL_FN (library, gnutls_error_is_fatal); + LOAD_DLL_FN (library, gnutls_global_init); + LOAD_DLL_FN (library, gnutls_global_set_log_function); +# ifdef HAVE_GNUTLS3 + LOAD_DLL_FN (library, gnutls_global_set_audit_log_function); +# endif + LOAD_DLL_FN (library, gnutls_global_set_log_level); + LOAD_DLL_FN (library, gnutls_handshake); + LOAD_DLL_FN (library, gnutls_init); + LOAD_DLL_FN (library, gnutls_priority_set_direct); + LOAD_DLL_FN (library, gnutls_record_check_pending); + LOAD_DLL_FN (library, gnutls_record_recv); + LOAD_DLL_FN (library, gnutls_record_send); + LOAD_DLL_FN (library, gnutls_strerror); + LOAD_DLL_FN (library, gnutls_transport_set_errno); + LOAD_DLL_FN (library, gnutls_check_version); /* We don't need to call gnutls_transport_set_lowat in GnuTLS 2.11.1 and later, and the function was removed entirely in 3.0.0. */ if (!fn_gnutls_check_version ("2.11.1")) - LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat); - LOAD_GNUTLS_FN (library, gnutls_transport_set_ptr2); - LOAD_GNUTLS_FN (library, gnutls_transport_set_pull_function); - LOAD_GNUTLS_FN (library, gnutls_transport_set_push_function); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_check_hostname); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_deinit); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_fingerprint); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_version); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_serial); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_issuer_dn); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_activation_time); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_expiration_time); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_dn); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_pk_algorithm); - LOAD_GNUTLS_FN (library, gnutls_pk_algorithm_get_name); - LOAD_GNUTLS_FN (library, gnutls_pk_bits_to_sec_param); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_issuer_unique_id); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_subject_unique_id); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_signature_algorithm); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_signature); - LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_key_id); - LOAD_GNUTLS_FN (library, gnutls_sec_param_get_name); - LOAD_GNUTLS_FN (library, gnutls_sign_get_name); - LOAD_GNUTLS_FN (library, gnutls_server_name_set); - LOAD_GNUTLS_FN (library, gnutls_kx_get); - LOAD_GNUTLS_FN (library, gnutls_kx_get_name); - LOAD_GNUTLS_FN (library, gnutls_protocol_get_version); - LOAD_GNUTLS_FN (library, gnutls_protocol_get_name); - LOAD_GNUTLS_FN (library, gnutls_cipher_get); - LOAD_GNUTLS_FN (library, gnutls_cipher_get_name); - LOAD_GNUTLS_FN (library, gnutls_mac_get); - LOAD_GNUTLS_FN (library, gnutls_mac_get_name); + LOAD_DLL_FN (library, gnutls_transport_set_lowat); + LOAD_DLL_FN (library, gnutls_transport_set_ptr2); + LOAD_DLL_FN (library, gnutls_transport_set_pull_function); + LOAD_DLL_FN (library, gnutls_transport_set_push_function); + LOAD_DLL_FN (library, gnutls_x509_crt_check_hostname); + LOAD_DLL_FN (library, gnutls_x509_crt_deinit); + LOAD_DLL_FN (library, gnutls_x509_crt_import); + LOAD_DLL_FN (library, gnutls_x509_crt_init); + LOAD_DLL_FN (library, gnutls_x509_crt_get_fingerprint); + LOAD_DLL_FN (library, gnutls_x509_crt_get_version); + LOAD_DLL_FN (library, gnutls_x509_crt_get_serial); + LOAD_DLL_FN (library, gnutls_x509_crt_get_issuer_dn); + LOAD_DLL_FN (library, gnutls_x509_crt_get_activation_time); + LOAD_DLL_FN (library, gnutls_x509_crt_get_expiration_time); + LOAD_DLL_FN (library, gnutls_x509_crt_get_dn); + LOAD_DLL_FN (library, gnutls_x509_crt_get_pk_algorithm); + LOAD_DLL_FN (library, gnutls_pk_algorithm_get_name); + LOAD_DLL_FN (library, gnutls_pk_bits_to_sec_param); + LOAD_DLL_FN (library, gnutls_x509_crt_get_issuer_unique_id); + LOAD_DLL_FN (library, gnutls_x509_crt_get_subject_unique_id); + LOAD_DLL_FN (library, gnutls_x509_crt_get_signature_algorithm); + LOAD_DLL_FN (library, gnutls_x509_crt_get_signature); + LOAD_DLL_FN (library, gnutls_x509_crt_get_key_id); + LOAD_DLL_FN (library, gnutls_sec_param_get_name); + LOAD_DLL_FN (library, gnutls_sign_get_name); + LOAD_DLL_FN (library, gnutls_server_name_set); + LOAD_DLL_FN (library, gnutls_kx_get); + LOAD_DLL_FN (library, gnutls_kx_get_name); + LOAD_DLL_FN (library, gnutls_protocol_get_version); + LOAD_DLL_FN (library, gnutls_protocol_get_name); + LOAD_DLL_FN (library, gnutls_cipher_get); + LOAD_DLL_FN (library, gnutls_cipher_get_name); + LOAD_DLL_FN (library, gnutls_mac_get); + LOAD_DLL_FN (library, gnutls_mac_get_name); max_log_level = global_gnutls_log_level; @@ -305,77 +297,76 @@ init_gnutls_functions (void) return 1; } -#else /* !WINDOWSNT */ - -#define fn_gnutls_alert_get gnutls_alert_get -#define fn_gnutls_alert_get_name gnutls_alert_get_name -#define fn_gnutls_alert_send_appropriate gnutls_alert_send_appropriate -#define fn_gnutls_anon_allocate_client_credentials gnutls_anon_allocate_client_credentials -#define fn_gnutls_anon_free_client_credentials gnutls_anon_free_client_credentials -#define fn_gnutls_bye gnutls_bye -#define fn_gnutls_certificate_allocate_credentials gnutls_certificate_allocate_credentials -#define fn_gnutls_certificate_free_credentials gnutls_certificate_free_credentials -#define fn_gnutls_certificate_get_peers gnutls_certificate_get_peers -#define fn_gnutls_certificate_set_verify_flags gnutls_certificate_set_verify_flags -#define fn_gnutls_certificate_set_x509_crl_file gnutls_certificate_set_x509_crl_file -#define fn_gnutls_certificate_set_x509_key_file gnutls_certificate_set_x509_key_file -#if GNUTLS_VERSION_MAJOR + \ - (GNUTLS_VERSION_MINOR > 0 || GNUTLS_VERSION_PATCH >= 20) > 3 -#define fn_gnutls_certificate_set_x509_system_trust gnutls_certificate_set_x509_system_trust -#endif -#define fn_gnutls_certificate_set_x509_trust_file gnutls_certificate_set_x509_trust_file -#define fn_gnutls_certificate_type_get gnutls_certificate_type_get -#define fn_gnutls_certificate_verify_peers2 gnutls_certificate_verify_peers2 -#define fn_gnutls_cipher_get gnutls_cipher_get -#define fn_gnutls_cipher_get_name gnutls_cipher_get_name -#define fn_gnutls_credentials_set gnutls_credentials_set -#define fn_gnutls_deinit gnutls_deinit -#define fn_gnutls_dh_get_prime_bits gnutls_dh_get_prime_bits -#define fn_gnutls_dh_set_prime_bits gnutls_dh_set_prime_bits -#define fn_gnutls_error_is_fatal gnutls_error_is_fatal -#define fn_gnutls_global_init gnutls_global_init -#ifdef HAVE_GNUTLS3 -#define fn_gnutls_global_set_audit_log_function gnutls_global_set_audit_log_function +# define gnutls_alert_get fn_gnutls_alert_get +# define gnutls_alert_get_name fn_gnutls_alert_get_name +# define gnutls_alert_send_appropriate fn_gnutls_alert_send_appropriate +# define gnutls_anon_allocate_client_credentials fn_gnutls_anon_allocate_client_credentials +# define gnutls_anon_free_client_credentials fn_gnutls_anon_free_client_credentials +# define gnutls_bye fn_gnutls_bye +# define gnutls_certificate_allocate_credentials fn_gnutls_certificate_allocate_credentials +# define gnutls_certificate_free_credentials fn_gnutls_certificate_free_credentials +# define gnutls_certificate_get_peers fn_gnutls_certificate_get_peers +# define gnutls_certificate_set_verify_flags fn_gnutls_certificate_set_verify_flags +# define gnutls_certificate_set_x509_crl_file fn_gnutls_certificate_set_x509_crl_file +# define gnutls_certificate_set_x509_key_file fn_gnutls_certificate_set_x509_key_file +# define gnutls_certificate_set_x509_system_trust fn_gnutls_certificate_set_x509_system_trust +# define gnutls_certificate_set_x509_trust_file fn_gnutls_certificate_set_x509_trust_file +# define gnutls_certificate_type_get fn_gnutls_certificate_type_get +# define gnutls_certificate_verify_peers2 fn_gnutls_certificate_verify_peers2 +# define gnutls_check_version fn_gnutls_check_version +# define gnutls_cipher_get fn_gnutls_cipher_get +# define gnutls_cipher_get_name fn_gnutls_cipher_get_name +# define gnutls_credentials_set fn_gnutls_credentials_set +# define gnutls_deinit fn_gnutls_deinit +# define gnutls_dh_get_prime_bits fn_gnutls_dh_get_prime_bits +# define gnutls_dh_set_prime_bits fn_gnutls_dh_set_prime_bits +# define gnutls_error_is_fatal fn_gnutls_error_is_fatal +# define gnutls_global_init fn_gnutls_global_init +# define gnutls_global_set_audit_log_function fn_gnutls_global_set_audit_log_function +# define gnutls_global_set_log_function fn_gnutls_global_set_log_function +# define gnutls_global_set_log_level fn_gnutls_global_set_log_level +# define gnutls_handshake fn_gnutls_handshake +# define gnutls_init fn_gnutls_init +# define gnutls_kx_get fn_gnutls_kx_get +# define gnutls_kx_get_name fn_gnutls_kx_get_name +# define gnutls_mac_get fn_gnutls_mac_get +# define gnutls_mac_get_name fn_gnutls_mac_get_name +# define gnutls_pk_algorithm_get_name fn_gnutls_pk_algorithm_get_name +# define gnutls_pk_bits_to_sec_param fn_gnutls_pk_bits_to_sec_param +# define gnutls_priority_set_direct fn_gnutls_priority_set_direct +# define gnutls_protocol_get_name fn_gnutls_protocol_get_name +# define gnutls_protocol_get_version fn_gnutls_protocol_get_version +# define gnutls_record_check_pending fn_gnutls_record_check_pending +# define gnutls_record_recv fn_gnutls_record_recv +# define gnutls_record_send fn_gnutls_record_send +# define gnutls_sec_param_get_name fn_gnutls_sec_param_get_name +# define gnutls_server_name_set fn_gnutls_server_name_set +# define gnutls_sign_get_name fn_gnutls_sign_get_name +# define gnutls_strerror fn_gnutls_strerror +# define gnutls_transport_set_errno fn_gnutls_transport_set_errno +# define gnutls_transport_set_lowat fn_gnutls_transport_set_lowat +# define gnutls_transport_set_ptr2 fn_gnutls_transport_set_ptr2 +# define gnutls_transport_set_pull_function fn_gnutls_transport_set_pull_function +# define gnutls_transport_set_push_function fn_gnutls_transport_set_push_function +# define gnutls_x509_crt_check_hostname fn_gnutls_x509_crt_check_hostname +# define gnutls_x509_crt_deinit fn_gnutls_x509_crt_deinit +# define gnutls_x509_crt_get_activation_time fn_gnutls_x509_crt_get_activation_time +# define gnutls_x509_crt_get_dn fn_gnutls_x509_crt_get_dn +# define gnutls_x509_crt_get_expiration_time fn_gnutls_x509_crt_get_expiration_time +# define gnutls_x509_crt_get_fingerprint fn_gnutls_x509_crt_get_fingerprint +# define gnutls_x509_crt_get_issuer_dn fn_gnutls_x509_crt_get_issuer_dn +# define gnutls_x509_crt_get_issuer_unique_id fn_gnutls_x509_crt_get_issuer_unique_id +# define gnutls_x509_crt_get_key_id fn_gnutls_x509_crt_get_key_id +# define gnutls_x509_crt_get_pk_algorithm fn_gnutls_x509_crt_get_pk_algorithm +# define gnutls_x509_crt_get_serial fn_gnutls_x509_crt_get_serial +# define gnutls_x509_crt_get_signature fn_gnutls_x509_crt_get_signature +# define gnutls_x509_crt_get_signature_algorithm fn_gnutls_x509_crt_get_signature_algorithm +# define gnutls_x509_crt_get_subject_unique_id fn_gnutls_x509_crt_get_subject_unique_id +# define gnutls_x509_crt_get_version fn_gnutls_x509_crt_get_version +# define gnutls_x509_crt_import fn_gnutls_x509_crt_import +# define gnutls_x509_crt_init fn_gnutls_x509_crt_init + #endif -#define fn_gnutls_global_set_log_function gnutls_global_set_log_function -#define fn_gnutls_global_set_log_level gnutls_global_set_log_level -#define fn_gnutls_handshake gnutls_handshake -#define fn_gnutls_init gnutls_init -#define fn_gnutls_kx_get gnutls_kx_get -#define fn_gnutls_kx_get_name gnutls_kx_get_name -#define fn_gnutls_mac_get gnutls_mac_get -#define fn_gnutls_mac_get_name gnutls_mac_get_name -#define fn_gnutls_pk_algorithm_get_name gnutls_pk_algorithm_get_name -#define fn_gnutls_pk_bits_to_sec_param gnutls_pk_bits_to_sec_param -#define fn_gnutls_priority_set_direct gnutls_priority_set_direct -#define fn_gnutls_protocol_get_name gnutls_protocol_get_name -#define fn_gnutls_protocol_get_version gnutls_protocol_get_version -#define fn_gnutls_record_check_pending gnutls_record_check_pending -#define fn_gnutls_record_recv gnutls_record_recv -#define fn_gnutls_record_send gnutls_record_send -#define fn_gnutls_sec_param_get_name gnutls_sec_param_get_name -#define fn_gnutls_server_name_set gnutls_server_name_set -#define fn_gnutls_sign_get_name gnutls_sign_get_name -#define fn_gnutls_strerror gnutls_strerror -#define fn_gnutls_transport_set_ptr2 gnutls_transport_set_ptr2 -#define fn_gnutls_x509_crt_check_hostname gnutls_x509_crt_check_hostname -#define fn_gnutls_x509_crt_deinit gnutls_x509_crt_deinit -#define fn_gnutls_x509_crt_get_activation_time gnutls_x509_crt_get_activation_time -#define fn_gnutls_x509_crt_get_dn gnutls_x509_crt_get_dn -#define fn_gnutls_x509_crt_get_expiration_time gnutls_x509_crt_get_expiration_time -#define fn_gnutls_x509_crt_get_fingerprint gnutls_x509_crt_get_fingerprint -#define fn_gnutls_x509_crt_get_issuer_dn gnutls_x509_crt_get_issuer_dn -#define fn_gnutls_x509_crt_get_issuer_unique_id gnutls_x509_crt_get_issuer_unique_id -#define fn_gnutls_x509_crt_get_key_id gnutls_x509_crt_get_key_id -#define fn_gnutls_x509_crt_get_pk_algorithm gnutls_x509_crt_get_pk_algorithm -#define fn_gnutls_x509_crt_get_serial gnutls_x509_crt_get_serial -#define fn_gnutls_x509_crt_get_signature_algorithm gnutls_x509_crt_get_signature_algorithm -#define fn_gnutls_x509_crt_get_subject_unique_id gnutls_x509_crt_get_subject_unique_id -#define fn_gnutls_x509_crt_get_version gnutls_x509_crt_get_version -#define fn_gnutls_x509_crt_import gnutls_x509_crt_import -#define fn_gnutls_x509_crt_init gnutls_x509_crt_init - -#endif /* !WINDOWSNT */ /* Report memory exhaustion if ERR is an out-of-memory indication. */ @@ -437,11 +428,11 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) /* On W32 we cannot transfer socket handles between different runtime libraries, so we tell GnuTLS to use our special push/pull functions. */ - fn_gnutls_transport_set_ptr2 (state, - (gnutls_transport_ptr_t) proc, - (gnutls_transport_ptr_t) proc); - fn_gnutls_transport_set_push_function (state, &emacs_gnutls_push); - fn_gnutls_transport_set_pull_function (state, &emacs_gnutls_pull); + gnutls_transport_set_ptr2 (state, + (gnutls_transport_ptr_t) proc, + (gnutls_transport_ptr_t) proc); + gnutls_transport_set_push_function (state, &emacs_gnutls_push); + gnutls_transport_set_pull_function (state, &emacs_gnutls_pull); /* For non blocking sockets or other custom made pull/push functions the gnutls_transport_set_lowat must be called, with @@ -454,15 +445,15 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) zero by default in version 2.11.1, and the function gnutls_transport_set_lowat was removed from the library in version 2.99.0. */ - if (!fn_gnutls_check_version ("2.11.1")) - fn_gnutls_transport_set_lowat (state, 0); + if (!gnutls_check_version ("2.11.1")) + gnutls_transport_set_lowat (state, 0); #else /* This is how GnuTLS takes sockets: as file descriptors passed in. For an Emacs process socket, infd and outfd are the same but we use this two-argument version for clarity. */ - fn_gnutls_transport_set_ptr2 (state, - (void *) (intptr_t) proc->infd, - (void *) (intptr_t) proc->outfd); + gnutls_transport_set_ptr2 (state, + (void *) (intptr_t) proc->infd, + (void *) (intptr_t) proc->outfd); #endif proc->gnutls_initstage = GNUTLS_STAGE_TRANSPORT_POINTERS_SET; @@ -470,11 +461,11 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) do { - ret = fn_gnutls_handshake (state); + ret = gnutls_handshake (state); emacs_gnutls_handle_error (state, ret); QUIT; } - while (ret < 0 && fn_gnutls_error_is_fatal (ret) == 0); + while (ret < 0 && gnutls_error_is_fatal (ret) == 0); proc->gnutls_initstage = GNUTLS_STAGE_HANDSHAKE_TRIED; @@ -485,7 +476,7 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) } else { - check_memory_full (fn_gnutls_alert_send_appropriate (state, ret)); + check_memory_full (gnutls_alert_send_appropriate (state, ret)); } return ret; } @@ -493,14 +484,14 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) ptrdiff_t emacs_gnutls_record_check_pending (gnutls_session_t state) { - return fn_gnutls_record_check_pending (state); + return gnutls_record_check_pending (state); } #ifdef WINDOWSNT void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err) { - fn_gnutls_transport_set_errno (state, err); + gnutls_transport_set_errno (state, err); } #endif @@ -521,7 +512,7 @@ emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte) while (nbyte > 0) { - rtnval = fn_gnutls_record_send (state, buf, nbyte); + rtnval = gnutls_record_send (state, buf, nbyte); if (rtnval < 0) { @@ -573,7 +564,7 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte) proc->gnutls_handshakes_tried = 0; return 0; } - rtnval = fn_gnutls_record_recv (state, buf, nbyte); + rtnval = gnutls_record_recv (state, buf, nbyte); if (rtnval >= 0) return rtnval; else if (rtnval == GNUTLS_E_UNEXPECTED_PACKET_LENGTH) @@ -608,11 +599,11 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ - str = fn_gnutls_strerror (err); + str = gnutls_strerror (err); if (!str) str = "unknown"; - if (fn_gnutls_error_is_fatal (err)) + if (gnutls_error_is_fatal (err)) { ret = 0; GNUTLS_LOG2 (1, max_log_level, "fatal error:", str); @@ -639,9 +630,9 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) if (err == GNUTLS_E_WARNING_ALERT_RECEIVED || err == GNUTLS_E_FATAL_ALERT_RECEIVED) { - int alert = fn_gnutls_alert_get (session); + int alert = gnutls_alert_get (session); int level = (err == GNUTLS_E_FATAL_ALERT_RECEIVED) ? 0 : 1; - str = fn_gnutls_alert_get_name (alert); + str = gnutls_alert_get_name (alert); if (!str) str = "unknown"; @@ -688,20 +679,20 @@ emacs_gnutls_deinit (Lisp_Object proc) if (XPROCESS (proc)->gnutls_x509_cred) { GNUTLS_LOG (2, log_level, "Deallocating x509 credentials"); - fn_gnutls_certificate_free_credentials (XPROCESS (proc)->gnutls_x509_cred); + gnutls_certificate_free_credentials (XPROCESS (proc)->gnutls_x509_cred); XPROCESS (proc)->gnutls_x509_cred = NULL; } if (XPROCESS (proc)->gnutls_anon_cred) { GNUTLS_LOG (2, log_level, "Deallocating anon credentials"); - fn_gnutls_anon_free_client_credentials (XPROCESS (proc)->gnutls_anon_cred); + gnutls_anon_free_client_credentials (XPROCESS (proc)->gnutls_anon_cred); XPROCESS (proc)->gnutls_anon_cred = NULL; } if (XPROCESS (proc)->gnutls_state) { - fn_gnutls_deinit (XPROCESS (proc)->gnutls_state); + gnutls_deinit (XPROCESS (proc)->gnutls_state); XPROCESS (proc)->gnutls_state = NULL; if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT) GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT - 1; @@ -758,7 +749,7 @@ Usage: (gnutls-error-fatalp ERROR) */) if (! TYPE_RANGED_INTEGERP (int, err)) error ("Not an error symbol or code"); - if (0 == fn_gnutls_error_is_fatal (XINT (err))) + if (0 == gnutls_error_is_fatal (XINT (err))) return Qnil; return Qt; @@ -790,7 +781,7 @@ usage: (gnutls-error-string ERROR) */) if (! TYPE_RANGED_INTEGERP (int, err)) return build_string ("Not an error symbol or code"); - return build_string (fn_gnutls_strerror (XINT (err))); + return build_string (gnutls_strerror (XINT (err))); } DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0, @@ -829,7 +820,7 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) /* Version. */ { - int version = fn_gnutls_x509_crt_get_version (cert); + int version = gnutls_x509_crt_get_version (cert); check_memory_full (version); if (version >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":version"), @@ -838,12 +829,12 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) /* Serial. */ buf_size = 0; - err = fn_gnutls_x509_crt_get_serial (cert, NULL, &buf_size); + err = gnutls_x509_crt_get_serial (cert, NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { void *serial = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_serial (cert, serial, &buf_size); + err = gnutls_x509_crt_get_serial (cert, serial, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":serial-number"), @@ -853,12 +844,12 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) /* Issuer. */ buf_size = 0; - err = fn_gnutls_x509_crt_get_issuer_dn (cert, NULL, &buf_size); + err = gnutls_x509_crt_get_issuer_dn (cert, NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { char *dn = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_issuer_dn (cert, dn, &buf_size); + err = gnutls_x509_crt_get_issuer_dn (cert, dn, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":issuer"), @@ -872,24 +863,24 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) that might add 1 to the year length. */ char buf[INT_STRLEN_BOUND (int) + 1 + sizeof "-12-31"]; struct tm t; - time_t tim = fn_gnutls_x509_crt_get_activation_time (cert); + time_t tim = gnutls_x509_crt_get_activation_time (cert); if (gmtime_r (&tim, &t) && strftime (buf, sizeof buf, "%Y-%m-%d", &t)) res = nconc2 (res, list2 (intern (":valid-from"), build_string (buf))); - tim = fn_gnutls_x509_crt_get_expiration_time (cert); + tim = gnutls_x509_crt_get_expiration_time (cert); if (gmtime_r (&tim, &t) && strftime (buf, sizeof buf, "%Y-%m-%d", &t)) res = nconc2 (res, list2 (intern (":valid-to"), build_string (buf))); } /* Subject. */ buf_size = 0; - err = fn_gnutls_x509_crt_get_dn (cert, NULL, &buf_size); + err = gnutls_x509_crt_get_dn (cert, NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { char *dn = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_dn (cert, dn, &buf_size); + err = gnutls_x509_crt_get_dn (cert, dn, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":subject"), @@ -903,17 +894,17 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) { unsigned int bits; - err = fn_gnutls_x509_crt_get_pk_algorithm (cert, &bits); + err = gnutls_x509_crt_get_pk_algorithm (cert, &bits); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) { - const char *name = fn_gnutls_pk_algorithm_get_name (err); + const char *name = gnutls_pk_algorithm_get_name (err); if (name) res = nconc2 (res, list2 (intern (":public-key-algorithm"), build_string (name))); - name = fn_gnutls_sec_param_get_name (fn_gnutls_pk_bits_to_sec_param - (err, bits)); + name = gnutls_sec_param_get_name (gnutls_pk_bits_to_sec_param + (err, bits)); res = nconc2 (res, list2 (intern (":certificate-security-level"), build_string (name))); } @@ -921,12 +912,12 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) /* Unique IDs. */ buf_size = 0; - err = fn_gnutls_x509_crt_get_issuer_unique_id (cert, NULL, &buf_size); + err = gnutls_x509_crt_get_issuer_unique_id (cert, NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { char *buf = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_issuer_unique_id (cert, buf, &buf_size); + err = gnutls_x509_crt_get_issuer_unique_id (cert, buf, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":issuer-unique-id"), @@ -935,12 +926,12 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) } buf_size = 0; - err = fn_gnutls_x509_crt_get_subject_unique_id (cert, NULL, &buf_size); + err = gnutls_x509_crt_get_subject_unique_id (cert, NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { char *buf = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_subject_unique_id (cert, buf, &buf_size); + err = gnutls_x509_crt_get_subject_unique_id (cert, buf, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":subject-unique-id"), @@ -950,11 +941,11 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) #endif /* Signature. */ - err = fn_gnutls_x509_crt_get_signature_algorithm (cert); + err = gnutls_x509_crt_get_signature_algorithm (cert); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) { - const char *name = fn_gnutls_sign_get_name (err); + const char *name = gnutls_sign_get_name (err); if (name) res = nconc2 (res, list2 (intern (":signature-algorithm"), build_string (name))); @@ -962,12 +953,12 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) /* Public key ID. */ buf_size = 0; - err = fn_gnutls_x509_crt_get_key_id (cert, 0, NULL, &buf_size); + err = gnutls_x509_crt_get_key_id (cert, 0, NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { void *buf = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_key_id (cert, 0, buf, &buf_size); + err = gnutls_x509_crt_get_key_id (cert, 0, buf, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":public-key-id"), @@ -977,14 +968,14 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) /* Certificate fingerprint. */ buf_size = 0; - err = fn_gnutls_x509_crt_get_fingerprint (cert, GNUTLS_DIG_SHA1, - NULL, &buf_size); + err = gnutls_x509_crt_get_fingerprint (cert, GNUTLS_DIG_SHA1, + NULL, &buf_size); check_memory_full (err); if (err == GNUTLS_E_SHORT_MEMORY_BUFFER) { void *buf = xmalloc (buf_size); - err = fn_gnutls_x509_crt_get_fingerprint (cert, GNUTLS_DIG_SHA1, - buf, &buf_size); + err = gnutls_x509_crt_get_fingerprint (cert, GNUTLS_DIG_SHA1, + buf, &buf_size); check_memory_full (err); if (err >= GNUTLS_E_SUCCESS) res = nconc2 (res, list2 (intern (":certificate-id"), @@ -1086,7 +1077,7 @@ The return value is a property list with top-level keys :warnings and /* Diffie-Hellman prime bits. */ { - int bits = fn_gnutls_dh_get_prime_bits (state); + int bits = gnutls_dh_get_prime_bits (state); check_memory_full (bits); if (bits > 0) result = nconc2 (result, list2 (intern (":diffie-hellman-prime-bits"), @@ -1096,26 +1087,26 @@ The return value is a property list with top-level keys :warnings and /* Key exchange. */ result = nconc2 (result, list2 (intern (":key-exchange"), - build_string (fn_gnutls_kx_get_name - (fn_gnutls_kx_get (state))))); + build_string (gnutls_kx_get_name + (gnutls_kx_get (state))))); /* Protocol name. */ result = nconc2 (result, list2 (intern (":protocol"), - build_string (fn_gnutls_protocol_get_name - (fn_gnutls_protocol_get_version (state))))); + build_string (gnutls_protocol_get_name + (gnutls_protocol_get_version (state))))); /* Cipher name. */ result = nconc2 (result, list2 (intern (":cipher"), - build_string (fn_gnutls_cipher_get_name - (fn_gnutls_cipher_get (state))))); + build_string (gnutls_cipher_get_name + (gnutls_cipher_get (state))))); /* MAC name. */ result = nconc2 (result, list2 (intern (":mac"), - build_string (fn_gnutls_mac_get_name - (fn_gnutls_mac_get (state))))); + build_string (gnutls_mac_get_name + (gnutls_mac_get (state))))); return result; @@ -1130,7 +1121,7 @@ emacs_gnutls_global_init (void) int ret = GNUTLS_E_SUCCESS; if (!gnutls_global_initialized) - ret = fn_gnutls_global_init (); + ret = gnutls_global_init (); gnutls_global_initialized = 1; @@ -1280,11 +1271,11 @@ one trustfile (usually a CA bundle). */) if (TYPE_RANGED_INTEGERP (int, loglevel)) { - fn_gnutls_global_set_log_function (gnutls_log_function); + gnutls_global_set_log_function (gnutls_log_function); #ifdef HAVE_GNUTLS3 - fn_gnutls_global_set_audit_log_function (gnutls_audit_log_function); + gnutls_global_set_audit_log_function (gnutls_audit_log_function); #endif - fn_gnutls_global_set_log_level (XINT (loglevel)); + gnutls_global_set_log_level (XINT (loglevel)); max_log_level = XINT (loglevel); XPROCESS (proc)->gnutls_log_level = max_log_level; } @@ -1314,8 +1305,7 @@ one trustfile (usually a CA bundle). */) unsigned int gnutls_verify_flags = GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT; GNUTLS_LOG (2, max_log_level, "allocating x509 credentials"); - check_memory_full ((fn_gnutls_certificate_allocate_credentials - (&x509_cred))); + check_memory_full (gnutls_certificate_allocate_credentials (&x509_cred)); XPROCESS (proc)->gnutls_x509_cred = x509_cred; verify_flags = Fplist_get (proplist, QCgnutls_bootprop_verify_flags); @@ -1329,13 +1319,12 @@ one trustfile (usually a CA bundle). */) else GNUTLS_LOG (2, max_log_level, "ignoring invalid verify-flags"); - fn_gnutls_certificate_set_verify_flags (x509_cred, gnutls_verify_flags); + gnutls_certificate_set_verify_flags (x509_cred, gnutls_verify_flags); } else /* Qgnutls_anon: */ { GNUTLS_LOG (2, max_log_level, "allocating anon credentials"); - check_memory_full ((fn_gnutls_anon_allocate_client_credentials - (&anon_cred))); + check_memory_full (gnutls_anon_allocate_client_credentials (&anon_cred)); XPROCESS (proc)->gnutls_anon_cred = anon_cred; } @@ -1349,7 +1338,7 @@ one trustfile (usually a CA bundle). */) #if GNUTLS_VERSION_MAJOR + \ (GNUTLS_VERSION_MINOR > 0 || GNUTLS_VERSION_PATCH >= 20) > 3 - ret = fn_gnutls_certificate_set_x509_system_trust (x509_cred); + ret = gnutls_certificate_set_x509_system_trust (x509_cred); if (ret < GNUTLS_E_SUCCESS) { check_memory_full (ret); @@ -1372,7 +1361,7 @@ one trustfile (usually a CA bundle). */) name using the current ANSI codepage. */ trustfile = ansi_encode_filename (trustfile); #endif - ret = fn_gnutls_certificate_set_x509_trust_file + ret = gnutls_certificate_set_x509_trust_file (x509_cred, SSDATA (trustfile), file_format); @@ -1398,7 +1387,7 @@ one trustfile (usually a CA bundle). */) #ifdef WINDOWSNT crlfile = ansi_encode_filename (crlfile); #endif - ret = fn_gnutls_certificate_set_x509_crl_file + ret = gnutls_certificate_set_x509_crl_file (x509_cred, SSDATA (crlfile), file_format); if (ret < GNUTLS_E_SUCCESS) @@ -1427,7 +1416,7 @@ one trustfile (usually a CA bundle). */) keyfile = ansi_encode_filename (keyfile); certfile = ansi_encode_filename (certfile); #endif - ret = fn_gnutls_certificate_set_x509_key_file + ret = gnutls_certificate_set_x509_key_file (x509_cred, SSDATA (certfile), SSDATA (keyfile), file_format); if (ret < GNUTLS_E_SUCCESS) @@ -1449,7 +1438,7 @@ one trustfile (usually a CA bundle). */) /* Call gnutls_init here: */ GNUTLS_LOG (1, max_log_level, "gnutls_init"); - ret = fn_gnutls_init (&state, GNUTLS_CLIENT); + ret = gnutls_init (&state, GNUTLS_CLIENT); XPROCESS (proc)->gnutls_state = state; if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); @@ -1468,27 +1457,25 @@ one trustfile (usually a CA bundle). */) } GNUTLS_LOG (1, max_log_level, "setting the priority string"); - ret = fn_gnutls_priority_set_direct (state, - priority_string_ptr, - NULL); + ret = gnutls_priority_set_direct (state, priority_string_ptr, NULL); if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY; if (INTEGERP (prime_bits)) - fn_gnutls_dh_set_prime_bits (state, XUINT (prime_bits)); + gnutls_dh_set_prime_bits (state, XUINT (prime_bits)); ret = EQ (type, Qgnutls_x509pki) - ? fn_gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred) - : fn_gnutls_credentials_set (state, GNUTLS_CRD_ANON, anon_cred); + ? gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred) + : gnutls_credentials_set (state, GNUTLS_CRD_ANON, anon_cred); if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); if (!gnutls_ip_address_p (c_hostname)) { - ret = fn_gnutls_server_name_set (state, GNUTLS_NAME_DNS, c_hostname, - strlen (c_hostname)); + ret = gnutls_server_name_set (state, GNUTLS_NAME_DNS, c_hostname, + strlen (c_hostname)); if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); } @@ -1504,7 +1491,7 @@ one trustfile (usually a CA bundle). */) check of the certificate's hostname with gnutls_x509_crt_check_hostname against :hostname. */ - ret = fn_gnutls_certificate_verify_peers2 (state, &peer_verification); + ret = gnutls_certificate_verify_peers2 (state, &peer_verification); if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); @@ -1542,41 +1529,41 @@ one trustfile (usually a CA bundle). */) /* Up to here the process is the same for X.509 certificates and OpenPGP keys. From now on X.509 certificates are assumed. This can be easily extended to work with openpgp keys as well. */ - if (fn_gnutls_certificate_type_get (state) == GNUTLS_CRT_X509) + if (gnutls_certificate_type_get (state) == GNUTLS_CRT_X509) { gnutls_x509_crt_t gnutls_verify_cert; const gnutls_datum_t *gnutls_verify_cert_list; unsigned int gnutls_verify_cert_list_size; - ret = fn_gnutls_x509_crt_init (&gnutls_verify_cert); + ret = gnutls_x509_crt_init (&gnutls_verify_cert); if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); gnutls_verify_cert_list = - fn_gnutls_certificate_get_peers (state, &gnutls_verify_cert_list_size); + gnutls_certificate_get_peers (state, &gnutls_verify_cert_list_size); if (gnutls_verify_cert_list == NULL) { - fn_gnutls_x509_crt_deinit (gnutls_verify_cert); + gnutls_x509_crt_deinit (gnutls_verify_cert); emacs_gnutls_deinit (proc); error ("No x509 certificate was found\n"); } /* We only check the first certificate in the given chain. */ - ret = fn_gnutls_x509_crt_import (gnutls_verify_cert, + ret = gnutls_x509_crt_import (gnutls_verify_cert, &gnutls_verify_cert_list[0], GNUTLS_X509_FMT_DER); if (ret < GNUTLS_E_SUCCESS) { - fn_gnutls_x509_crt_deinit (gnutls_verify_cert); + gnutls_x509_crt_deinit (gnutls_verify_cert); return gnutls_make_error (ret); } XPROCESS (proc)->gnutls_certificate = gnutls_verify_cert; - int err - = fn_gnutls_x509_crt_check_hostname (gnutls_verify_cert, c_hostname); + int err = gnutls_x509_crt_check_hostname (gnutls_verify_cert, + c_hostname); check_memory_full (err); if (!err) { @@ -1585,7 +1572,7 @@ one trustfile (usually a CA bundle). */) if (verify_error_all || !NILP (Fmember (QCgnutls_bootprop_hostname, verify_error))) { - fn_gnutls_x509_crt_deinit (gnutls_verify_cert); + gnutls_x509_crt_deinit (gnutls_verify_cert); emacs_gnutls_deinit (proc); error ("The x509 certificate does not match \"%s\"", c_hostname); } @@ -1626,10 +1613,9 @@ This function may also return `gnutls-e-again', or state = XPROCESS (proc)->gnutls_state; - fn_gnutls_x509_crt_deinit (XPROCESS (proc)->gnutls_certificate); + gnutls_x509_crt_deinit (XPROCESS (proc)->gnutls_certificate); - ret = fn_gnutls_bye (state, - NILP (cont) ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR); + ret = gnutls_bye (state, NILP (cont) ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR); return gnutls_make_error (ret); } diff --git a/src/image.c b/src/image.c index a73a725..4cba886 100644 --- a/src/image.c +++ b/src/image.c @@ -1859,19 +1859,6 @@ mark_image_cache (struct image_cache *c) X / NS / W32 support code ***********************************************************************/ -#ifdef WINDOWSNT - -/* Macro for defining functions that will be loaded from image DLLs. */ -#define DEF_IMGLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args - -/* Macro for loading those image functions from the library. */ -#define LOAD_IMGLIB_FN(lib,func) { \ - fn_##func = (void *) GetProcAddress (lib, #func); \ - if (!fn_##func) return 0; \ - } - -#endif /* WINDOWSNT */ - /* Return true if XIMG's size WIDTH x HEIGHT doesn't break the windowing system. WIDTH and HEIGHT must both be positive. @@ -3377,12 +3364,14 @@ xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void * /* XPM library details. */ -DEF_IMGLIB_FN (void, XpmFreeAttributes, (XpmAttributes *)); -DEF_IMGLIB_FN (int, XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **, - xpm_XImage **, XpmAttributes *)); -DEF_IMGLIB_FN (int, XpmReadFileToImage, (Display *, char *, xpm_XImage **, - xpm_XImage **, XpmAttributes *)); -DEF_IMGLIB_FN (void, XImageFree, (xpm_XImage *)); +DEF_DLL_FN (void, XpmFreeAttributes, (XpmAttributes *)); +DEF_DLL_FN (int, XpmCreateImageFromBuffer, + (Display *, char *, xpm_XImage **, + xpm_XImage **, XpmAttributes *)); +DEF_DLL_FN (int, XpmReadFileToImage, + (Display *, char *, xpm_XImage **, + xpm_XImage **, XpmAttributes *)); +DEF_DLL_FN (void, XImageFree, (xpm_XImage *)); static bool init_xpm_functions (void) @@ -3392,22 +3381,24 @@ init_xpm_functions (void) if (!(library = w32_delayed_load (Qxpm))) return 0; - LOAD_IMGLIB_FN (library, XpmFreeAttributes); - LOAD_IMGLIB_FN (library, XpmCreateImageFromBuffer); - LOAD_IMGLIB_FN (library, XpmReadFileToImage); - LOAD_IMGLIB_FN (library, XImageFree); + LOAD_DLL_FN (library, XpmFreeAttributes); + LOAD_DLL_FN (library, XpmCreateImageFromBuffer); + LOAD_DLL_FN (library, XpmReadFileToImage); + LOAD_DLL_FN (library, XImageFree); return 1; } -#endif /* WINDOWSNT */ +# undef XImageFree +# undef XpmCreateImageFromBuffer +# undef XpmFreeAttributes +# undef XpmReadFileToImage -#if defined HAVE_NTGUI && !defined WINDOWSNT -/* Glue for code below */ -#define fn_XpmReadFileToImage XpmReadFileToImage -#define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer -#define fn_XImageFree XImageFree -#define fn_XpmFreeAttributes XpmFreeAttributes -#endif /* HAVE_NTGUI && !WINDOWSNT */ +# define XImageFree fn_XImageFree +# define XpmCreateImageFromBuffer fn_XpmCreateImageFromBuffer +# define XpmFreeAttributes fn_XpmFreeAttributes +# define XpmReadFileToImage fn_XpmReadFileToImage + +#endif /* WINDOWSNT */ /* Value is true if COLOR_SYMBOLS is a valid color symbols list for XPM images. Such a list must consist of conses whose car and @@ -3624,9 +3615,9 @@ xpm_load (struct frame *f, struct image *img) #endif /* XpmReadFileToPixmap is not available in the Windows port of libxpm. But XpmReadFileToImage almost does what we want. */ - rc = fn_XpmReadFileToImage (&hdc, SDATA (file), - &xpm_image, &xpm_mask, - &attrs); + rc = XpmReadFileToImage (&hdc, SDATA (file), + &xpm_image, &xpm_mask, + &attrs); #else rc = XpmReadFileToImage (FRAME_X_DISPLAY (f), SSDATA (file), &img->ximg, &img->mask_img, @@ -3648,9 +3639,9 @@ xpm_load (struct frame *f, struct image *img) #ifdef HAVE_NTGUI /* XpmCreatePixmapFromBuffer is not available in the Windows port of libxpm. But XpmCreateImageFromBuffer almost does what we want. */ - rc = fn_XpmCreateImageFromBuffer (&hdc, SDATA (buffer), - &xpm_image, &xpm_mask, - &attrs); + rc = XpmCreateImageFromBuffer (&hdc, SDATA (buffer), + &xpm_image, &xpm_mask, + &attrs); #else rc = XpmCreateImageFromBuffer (FRAME_X_DISPLAY (f), SSDATA (buffer), &img->ximg, &img->mask_img, @@ -3699,7 +3690,7 @@ xpm_load (struct frame *f, struct image *img) img->pixmap = xpm_image->bitmap; /* XImageFree in libXpm frees XImage struct without destroying the bitmap, which is what we want. */ - fn_XImageFree (xpm_image); + XImageFree (xpm_image); } if (xpm_mask && xpm_mask->bitmap) { @@ -3713,7 +3704,7 @@ xpm_load (struct frame *f, struct image *img) SelectObject (hdc, old_obj); img->mask = xpm_mask->bitmap; - fn_XImageFree (xpm_mask); + XImageFree (xpm_mask); DeleteDC (hdc); } @@ -3737,11 +3728,7 @@ xpm_load (struct frame *f, struct image *img) eassert (img->width > 0 && img->height > 0); /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ -#ifdef HAVE_NTGUI - fn_XpmFreeAttributes (&attrs); -#else XpmFreeAttributes (&attrs); -#endif /* HAVE_NTGUI */ #ifdef HAVE_X_WINDOWS /* Maybe fill in the background field while we have ximg handy. */ @@ -5535,39 +5522,42 @@ png_image_p (Lisp_Object object) #if defined HAVE_PNG && !defined HAVE_NS -#ifdef WINDOWSNT +# ifdef WINDOWSNT /* PNG library details. */ -DEF_IMGLIB_FN (png_voidp, png_get_io_ptr, (png_structp)); -DEF_IMGLIB_FN (int, png_sig_cmp, (png_bytep, png_size_t, png_size_t)); -DEF_IMGLIB_FN (png_structp, png_create_read_struct, (png_const_charp, png_voidp, - png_error_ptr, png_error_ptr)); -DEF_IMGLIB_FN (png_infop, png_create_info_struct, (png_structp)); -DEF_IMGLIB_FN (void, png_destroy_read_struct, (png_structpp, png_infopp, png_infopp)); -DEF_IMGLIB_FN (void, png_set_read_fn, (png_structp, png_voidp, png_rw_ptr)); -DEF_IMGLIB_FN (void, png_set_sig_bytes, (png_structp, int)); -DEF_IMGLIB_FN (void, png_read_info, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_uint_32, png_get_IHDR, (png_structp, png_infop, - png_uint_32 *, png_uint_32 *, - int *, int *, int *, int *, int *)); -DEF_IMGLIB_FN (png_uint_32, png_get_valid, (png_structp, png_infop, png_uint_32)); -DEF_IMGLIB_FN (void, png_set_strip_16, (png_structp)); -DEF_IMGLIB_FN (void, png_set_expand, (png_structp)); -DEF_IMGLIB_FN (void, png_set_gray_to_rgb, (png_structp)); -DEF_IMGLIB_FN (void, png_set_background, (png_structp, png_color_16p, - int, int, double)); -DEF_IMGLIB_FN (png_uint_32, png_get_bKGD, (png_structp, png_infop, png_color_16p *)); -DEF_IMGLIB_FN (void, png_read_update_info, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_byte, png_get_channels, (png_structp, png_infop)); -DEF_IMGLIB_FN (png_size_t, png_get_rowbytes, (png_structp, png_infop)); -DEF_IMGLIB_FN (void, png_read_image, (png_structp, png_bytepp)); -DEF_IMGLIB_FN (void, png_read_end, (png_structp, png_infop)); -DEF_IMGLIB_FN (void, png_error, (png_structp, png_const_charp)); - -#if (PNG_LIBPNG_VER >= 10500) -DEF_IMGLIB_FN (void, png_longjmp, (png_structp, int)) PNG_NORETURN; -DEF_IMGLIB_FN (jmp_buf *, png_set_longjmp_fn, (png_structp, png_longjmp_ptr, size_t)); -#endif /* libpng version >= 1.5 */ +DEF_DLL_FN (png_voidp, png_get_io_ptr, (png_structp)); +DEF_DLL_FN (int, png_sig_cmp, (png_bytep, png_size_t, png_size_t)); +DEF_DLL_FN (png_structp, png_create_read_struct, + (png_const_charp, png_voidp, png_error_ptr, png_error_ptr)); +DEF_DLL_FN (png_infop, png_create_info_struct, (png_structp)); +DEF_DLL_FN (void, png_destroy_read_struct, + (png_structpp, png_infopp, png_infopp)); +DEF_DLL_FN (void, png_set_read_fn, (png_structp, png_voidp, png_rw_ptr)); +DEF_DLL_FN (void, png_set_sig_bytes, (png_structp, int)); +DEF_DLL_FN (void, png_read_info, (png_structp, png_infop)); +DEF_DLL_FN (png_uint_32, png_get_IHDR, + (png_structp, png_infop, png_uint_32 *, png_uint_32 *, + int *, int *, int *, int *, int *)); +DEF_DLL_FN (png_uint_32, png_get_valid, (png_structp, png_infop, png_uint_32)); +DEF_DLL_FN (void, png_set_strip_16, (png_structp)); +DEF_DLL_FN (void, png_set_expand, (png_structp)); +DEF_DLL_FN (void, png_set_gray_to_rgb, (png_structp)); +DEF_DLL_FN (void, png_set_background, + (png_structp, png_color_16p, int, int, double)); +DEF_DLL_FN (png_uint_32, png_get_bKGD, + (png_structp, png_infop, png_color_16p *)); +DEF_DLL_FN (void, png_read_update_info, (png_structp, png_infop)); +DEF_DLL_FN (png_byte, png_get_channels, (png_structp, png_infop)); +DEF_DLL_FN (png_size_t, png_get_rowbytes, (png_structp, png_infop)); +DEF_DLL_FN (void, png_read_image, (png_structp, png_bytepp)); +DEF_DLL_FN (void, png_read_end, (png_structp, png_infop)); +DEF_DLL_FN (void, png_error, (png_structp, png_const_charp)); + +# if (PNG_LIBPNG_VER >= 10500) +DEF_DLL_FN (void, png_longjmp, (png_structp, int)) PNG_NORETURN; +DEF_DLL_FN (jmp_buf *, png_set_longjmp_fn, + (png_structp, png_longjmp_ptr, size_t)); +# endif /* libpng version >= 1.5 */ static bool init_png_functions (void) @@ -5577,87 +5567,107 @@ init_png_functions (void) if (!(library = w32_delayed_load (Qpng))) return 0; - LOAD_IMGLIB_FN (library, png_get_io_ptr); - LOAD_IMGLIB_FN (library, png_sig_cmp); - LOAD_IMGLIB_FN (library, png_create_read_struct); - LOAD_IMGLIB_FN (library, png_create_info_struct); - LOAD_IMGLIB_FN (library, png_destroy_read_struct); - LOAD_IMGLIB_FN (library, png_set_read_fn); - LOAD_IMGLIB_FN (library, png_set_sig_bytes); - LOAD_IMGLIB_FN (library, png_read_info); - LOAD_IMGLIB_FN (library, png_get_IHDR); - LOAD_IMGLIB_FN (library, png_get_valid); - LOAD_IMGLIB_FN (library, png_set_strip_16); - LOAD_IMGLIB_FN (library, png_set_expand); - LOAD_IMGLIB_FN (library, png_set_gray_to_rgb); - LOAD_IMGLIB_FN (library, png_set_background); - LOAD_IMGLIB_FN (library, png_get_bKGD); - LOAD_IMGLIB_FN (library, png_read_update_info); - LOAD_IMGLIB_FN (library, png_get_channels); - LOAD_IMGLIB_FN (library, png_get_rowbytes); - LOAD_IMGLIB_FN (library, png_read_image); - LOAD_IMGLIB_FN (library, png_read_end); - LOAD_IMGLIB_FN (library, png_error); - -#if (PNG_LIBPNG_VER >= 10500) - LOAD_IMGLIB_FN (library, png_longjmp); - LOAD_IMGLIB_FN (library, png_set_longjmp_fn); -#endif /* libpng version >= 1.5 */ + LOAD_DLL_FN (library, png_get_io_ptr); + LOAD_DLL_FN (library, png_sig_cmp); + LOAD_DLL_FN (library, png_create_read_struct); + LOAD_DLL_FN (library, png_create_info_struct); + LOAD_DLL_FN (library, png_destroy_read_struct); + LOAD_DLL_FN (library, png_set_read_fn); + LOAD_DLL_FN (library, png_set_sig_bytes); + LOAD_DLL_FN (library, png_read_info); + LOAD_DLL_FN (library, png_get_IHDR); + LOAD_DLL_FN (library, png_get_valid); + LOAD_DLL_FN (library, png_set_strip_16); + LOAD_DLL_FN (library, png_set_expand); + LOAD_DLL_FN (library, png_set_gray_to_rgb); + LOAD_DLL_FN (library, png_set_background); + LOAD_DLL_FN (library, png_get_bKGD); + LOAD_DLL_FN (library, png_read_update_info); + LOAD_DLL_FN (library, png_get_channels); + LOAD_DLL_FN (library, png_get_rowbytes); + LOAD_DLL_FN (library, png_read_image); + LOAD_DLL_FN (library, png_read_end); + LOAD_DLL_FN (library, png_error); + +# if (PNG_LIBPNG_VER >= 10500) + LOAD_DLL_FN (library, png_longjmp); + LOAD_DLL_FN (library, png_set_longjmp_fn); +# endif /* libpng version >= 1.5 */ return 1; } -#else - -#define fn_png_get_io_ptr png_get_io_ptr -#define fn_png_sig_cmp png_sig_cmp -#define fn_png_create_read_struct png_create_read_struct -#define fn_png_create_info_struct png_create_info_struct -#define fn_png_destroy_read_struct png_destroy_read_struct -#define fn_png_set_read_fn png_set_read_fn -#define fn_png_set_sig_bytes png_set_sig_bytes -#define fn_png_read_info png_read_info -#define fn_png_get_IHDR png_get_IHDR -#define fn_png_get_valid png_get_valid -#define fn_png_set_strip_16 png_set_strip_16 -#define fn_png_set_expand png_set_expand -#define fn_png_set_gray_to_rgb png_set_gray_to_rgb -#define fn_png_set_background png_set_background -#define fn_png_get_bKGD png_get_bKGD -#define fn_png_read_update_info png_read_update_info -#define fn_png_get_channels png_get_channels -#define fn_png_get_rowbytes png_get_rowbytes -#define fn_png_read_image png_read_image -#define fn_png_read_end png_read_end -#define fn_png_error png_error - -#if (PNG_LIBPNG_VER >= 10500) -#define fn_png_longjmp png_longjmp -#define fn_png_set_longjmp_fn png_set_longjmp_fn -#endif /* libpng version >= 1.5 */ -#endif /* WINDOWSNT */ +# undef png_create_info_struct +# undef png_create_read_struct +# undef png_destroy_read_struct +# undef png_error +# undef png_get_bKGD +# undef png_get_channels +# undef png_get_IHDR +# undef png_get_io_ptr +# undef png_get_rowbytes +# undef png_get_valid +# undef png_longjmp +# undef png_read_end +# undef png_read_image +# undef png_read_info +# undef png_read_update_info +# undef png_set_background +# undef png_set_expand +# undef png_set_gray_to_rgb +# undef png_set_longjmp_fn +# undef png_set_read_fn +# undef png_set_sig_bytes +# undef png_set_strip_16 +# undef png_sig_cmp + +# define png_create_info_struct fn_png_create_info_struct +# define png_create_read_struct fn_png_create_read_struct +# define png_destroy_read_struct fn_png_destroy_read_struct +# define png_error fn_png_error +# define png_get_bKGD fn_png_get_bKGD +# define png_get_channels fn_png_get_channels +# define png_get_IHDR fn_png_get_IHDR +# define png_get_io_ptr fn_png_get_io_ptr +# define png_get_rowbytes fn_png_get_rowbytes +# define png_get_valid fn_png_get_valid +# define png_longjmp fn_png_longjmp +# define png_read_end fn_png_read_end +# define png_read_image fn_png_read_image +# define png_read_info fn_png_read_info +# define png_read_update_info fn_png_read_update_info +# define png_set_background fn_png_set_background +# define png_set_expand fn_png_set_expand +# define png_set_gray_to_rgb fn_png_set_gray_to_rgb +# define png_set_longjmp_fn fn_png_set_longjmp_fn +# define png_set_read_fn fn_png_set_read_fn +# define png_set_sig_bytes fn_png_set_sig_bytes +# define png_set_strip_16 fn_png_set_strip_16 +# define png_sig_cmp fn_png_sig_cmp + +# endif /* WINDOWSNT */ /* Fast implementations of setjmp and longjmp. Although setjmp and longjmp will do, POSIX _setjmp and _longjmp (if available) are often faster. Do not use sys_setjmp, as PNG supports only jmp_buf. It's OK if the longjmp substitute restores the signal mask. */ -#ifdef HAVE__SETJMP -# define FAST_SETJMP(j) _setjmp (j) -# define FAST_LONGJMP _longjmp -#else -# define FAST_SETJMP(j) setjmp (j) -# define FAST_LONGJMP longjmp -#endif - -#if PNG_LIBPNG_VER < 10500 -#define PNG_LONGJMP(ptr) FAST_LONGJMP ((ptr)->jmpbuf, 1) -#define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) -#else +# ifdef HAVE__SETJMP +# define FAST_SETJMP(j) _setjmp (j) +# define FAST_LONGJMP _longjmp +# else +# define FAST_SETJMP(j) setjmp (j) +# define FAST_LONGJMP longjmp +# endif + +# if PNG_LIBPNG_VER < 10500 +# define PNG_LONGJMP(ptr) FAST_LONGJMP ((ptr)->jmpbuf, 1) +# define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) +# else /* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ -#define PNG_LONGJMP(ptr) fn_png_longjmp (ptr, 1) -#define PNG_JMPBUF(ptr) \ - (*fn_png_set_longjmp_fn (ptr, FAST_LONGJMP, sizeof (jmp_buf))) -#endif +# define PNG_LONGJMP(ptr) png_longjmp (ptr, 1) +# define PNG_JMPBUF(ptr) \ + (*png_set_longjmp_fn (ptr, FAST_LONGJMP, sizeof (jmp_buf))) +# endif /* Error and warning handlers installed when the PNG library is initialized. */ @@ -5697,10 +5707,10 @@ struct png_memory_storage static void png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length) { - struct png_memory_storage *tbr = fn_png_get_io_ptr (png_ptr); + struct png_memory_storage *tbr = png_get_io_ptr (png_ptr); if (length > tbr->len - tbr->index) - fn_png_error (png_ptr, "Read error"); + png_error (png_ptr, "Read error"); memcpy (data, tbr->bytes + tbr->index, length); tbr->index = tbr->index + length; @@ -5714,10 +5724,10 @@ png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length) static void png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length) { - FILE *fp = fn_png_get_io_ptr (png_ptr); + FILE *fp = png_get_io_ptr (png_ptr); if (fread (data, 1, length, fp) < length) - fn_png_error (png_ptr, "Read error"); + png_error (png_ptr, "Read error"); } @@ -5779,7 +5789,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) /* Check PNG signature. */ if (fread (sig, 1, sizeof sig, fp) != sizeof sig - || fn_png_sig_cmp (sig, 0, sizeof sig)) + || png_sig_cmp (sig, 0, sizeof sig)) { fclose (fp); image_error ("Not a PNG file: `%s'", file, Qnil); @@ -5801,7 +5811,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) /* Check PNG signature. */ if (tbr.len < sizeof sig - || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig)) + || png_sig_cmp (tbr.bytes, 0, sizeof sig)) { image_error ("Not a PNG image: `%s'", img->spec, Qnil); return 0; @@ -5812,13 +5822,13 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) } /* Initialize read and info structs for PNG lib. */ - png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, my_png_error, my_png_warning); if (png_ptr) { - info_ptr = fn_png_create_info_struct (png_ptr); - end_info = fn_png_create_info_struct (png_ptr); + info_ptr = png_create_info_struct (png_ptr); + end_info = png_create_info_struct (png_ptr); } c->png_ptr = png_ptr; @@ -5830,7 +5840,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) if (! (info_ptr && end_info)) { - fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); + png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); png_ptr = 0; } if (! png_ptr) @@ -5845,7 +5855,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) { error: if (c->png_ptr) - fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); + png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); xfree (c->pixels); xfree (c->rows); if (c->fp) @@ -5858,14 +5868,14 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) /* Read image info. */ if (!NILP (specified_data)) - fn_png_set_read_fn (png_ptr, &tbr, png_read_from_memory); + png_set_read_fn (png_ptr, &tbr, png_read_from_memory); else - fn_png_set_read_fn (png_ptr, fp, png_read_from_file); + png_set_read_fn (png_ptr, fp, png_read_from_file); - fn_png_set_sig_bytes (png_ptr, sizeof sig); - fn_png_read_info (png_ptr, info_ptr); - fn_png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); + png_set_sig_bytes (png_ptr, sizeof sig); + png_read_info (png_ptr, info_ptr); + png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + &interlace_type, NULL, NULL); if (! (width <= INT_MAX && height <= INT_MAX && check_image_size (f, width, height))) @@ -5881,7 +5891,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) /* If image contains simply transparency data, we prefer to construct a clipping mask. */ - if (fn_png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) + if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) transparent_p = 1; else transparent_p = 0; @@ -5892,16 +5902,16 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) /* Strip more than 8 bits per channel. */ if (bit_depth == 16) - fn_png_set_strip_16 (png_ptr); + png_set_strip_16 (png_ptr); /* Expand data to 24 bit RGB, or 8 bit grayscale, with alpha channel if available. */ - fn_png_set_expand (png_ptr); + png_set_expand (png_ptr); /* Convert grayscale images to RGB. */ if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - fn_png_set_gray_to_rgb (png_ptr); + png_set_gray_to_rgb (png_ptr); /* Handle alpha channel by combining the image with a background color. Do this only if a real alpha channel is supplied. For @@ -5927,24 +5937,24 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) bg.green = color.green >> shift; bg.blue = color.blue >> shift; - fn_png_set_background (png_ptr, &bg, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + png_set_background (png_ptr, &bg, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); } } /* Update info structure. */ - fn_png_read_update_info (png_ptr, info_ptr); + png_read_update_info (png_ptr, info_ptr); /* Get number of channels. Valid values are 1 for grayscale images and images with a palette, 2 for grayscale images with transparency information (alpha channel), 3 for RGB images, and 4 for RGB images with alpha channel, i.e. RGBA. If conversions above were sufficient we should only have 3 or 4 channels here. */ - channels = fn_png_get_channels (png_ptr, info_ptr); + channels = png_get_channels (png_ptr, info_ptr); eassert (channels == 3 || channels == 4); /* Number of bytes needed for one row of the image. */ - row_bytes = fn_png_get_rowbytes (png_ptr, info_ptr); + row_bytes = png_get_rowbytes (png_ptr, info_ptr); /* Allocate memory for the image. */ if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows < height @@ -5956,8 +5966,8 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) rows[i] = pixels + i * row_bytes; /* Read the entire image. */ - fn_png_read_image (png_ptr, rows); - fn_png_read_end (png_ptr, info_ptr); + png_read_image (png_ptr, rows); + png_read_end (png_ptr, info_ptr); if (fp) { fclose (fp); @@ -6021,21 +6031,21 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) overrode it. */ { png_color_16 *bg; - if (fn_png_get_bKGD (png_ptr, info_ptr, &bg)) + if (png_get_bKGD (png_ptr, info_ptr, &bg)) { img->background = lookup_rgb_color (f, bg->red, bg->green, bg->blue); img->background_valid = 1; } } -#ifdef COLOR_TABLE_SUPPORT +# ifdef COLOR_TABLE_SUPPORT /* Remember colors allocated for this image. */ img->colors = colors_in_color_table (&img->ncolors); free_color_table (); -#endif /* COLOR_TABLE_SUPPORT */ +# endif /* COLOR_TABLE_SUPPORT */ /* Clean up. */ - fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); + png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); xfree (rows); xfree (pixels); @@ -6170,15 +6180,15 @@ jpeg_image_p (Lisp_Object object) /* Work around a warning about HAVE_STDLIB_H being redefined in jconfig.h. */ -#ifdef HAVE_STDLIB_H -#undef HAVE_STDLIB_H -#endif /* HAVE_STLIB_H */ +# ifdef HAVE_STDLIB_H +# undef HAVE_STDLIB_H +# endif -#if defined (HAVE_NTGUI) && !defined (__WIN32__) +# if defined (HAVE_NTGUI) && !defined (__WIN32__) /* In older releases of the jpeg library, jpeglib.h will define boolean differently depending on __WIN32__, so make sure it is defined. */ -#define __WIN32__ 1 -#endif +# define __WIN32__ 1 +# endif /* rpcndr.h (via windows.h) and jpeglib.h both define boolean types. Some versions of jpeglib try to detect whether rpcndr.h is loaded, @@ -6194,23 +6204,25 @@ jpeg_image_p (Lisp_Object object) different name. This name, jpeg_boolean, remains in effect through the rest of image.c. */ -#if defined CYGWIN && defined HAVE_NTGUI -#define boolean jpeg_boolean -#endif -#include -#include +# if defined CYGWIN && defined HAVE_NTGUI +# define boolean jpeg_boolean +# endif +# include +# include -#ifdef WINDOWSNT +# ifdef WINDOWSNT /* JPEG library details. */ -DEF_IMGLIB_FN (void, jpeg_CreateDecompress, (j_decompress_ptr, int, size_t)); -DEF_IMGLIB_FN (boolean, jpeg_start_decompress, (j_decompress_ptr)); -DEF_IMGLIB_FN (boolean, jpeg_finish_decompress, (j_decompress_ptr)); -DEF_IMGLIB_FN (void, jpeg_destroy_decompress, (j_decompress_ptr)); -DEF_IMGLIB_FN (int, jpeg_read_header, (j_decompress_ptr, boolean)); -DEF_IMGLIB_FN (JDIMENSION, jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, JDIMENSION)); -DEF_IMGLIB_FN (struct jpeg_error_mgr *, jpeg_std_error, (struct jpeg_error_mgr *)); -DEF_IMGLIB_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int)); +DEF_DLL_FN (void, jpeg_CreateDecompress, (j_decompress_ptr, int, size_t)); +DEF_DLL_FN (boolean, jpeg_start_decompress, (j_decompress_ptr)); +DEF_DLL_FN (boolean, jpeg_finish_decompress, (j_decompress_ptr)); +DEF_DLL_FN (void, jpeg_destroy_decompress, (j_decompress_ptr)); +DEF_DLL_FN (int, jpeg_read_header, (j_decompress_ptr, boolean)); +DEF_DLL_FN (JDIMENSION, jpeg_read_scanlines, + (j_decompress_ptr, JSAMPARRAY, JDIMENSION)); +DEF_DLL_FN (struct jpeg_error_mgr *, jpeg_std_error, + (struct jpeg_error_mgr *)); +DEF_DLL_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int)); static bool init_jpeg_functions (void) @@ -6220,37 +6232,46 @@ init_jpeg_functions (void) if (!(library = w32_delayed_load (Qjpeg))) return 0; - LOAD_IMGLIB_FN (library, jpeg_finish_decompress); - LOAD_IMGLIB_FN (library, jpeg_read_scanlines); - LOAD_IMGLIB_FN (library, jpeg_start_decompress); - LOAD_IMGLIB_FN (library, jpeg_read_header); - LOAD_IMGLIB_FN (library, jpeg_CreateDecompress); - LOAD_IMGLIB_FN (library, jpeg_destroy_decompress); - LOAD_IMGLIB_FN (library, jpeg_std_error); - LOAD_IMGLIB_FN (library, jpeg_resync_to_restart); + LOAD_DLL_FN (library, jpeg_finish_decompress); + LOAD_DLL_FN (library, jpeg_read_scanlines); + LOAD_DLL_FN (library, jpeg_start_decompress); + LOAD_DLL_FN (library, jpeg_read_header); + LOAD_DLL_FN (library, jpeg_CreateDecompress); + LOAD_DLL_FN (library, jpeg_destroy_decompress); + LOAD_DLL_FN (library, jpeg_std_error); + LOAD_DLL_FN (library, jpeg_resync_to_restart); return 1; } +# undef jpeg_CreateDecompress +# undef jpeg_destroy_decompress +# undef jpeg_finish_decompress +# undef jpeg_read_header +# undef jpeg_read_scanlines +# undef jpeg_resync_to_restart +# undef jpeg_start_decompress +# undef jpeg_std_error + +# define jpeg_CreateDecompress fn_jpeg_CreateDecompress +# define jpeg_destroy_decompress fn_jpeg_destroy_decompress +# define jpeg_finish_decompress fn_jpeg_finish_decompress +# define jpeg_read_header fn_jpeg_read_header +# define jpeg_read_scanlines fn_jpeg_read_scanlines +# define jpeg_resync_to_restart fn_jpeg_resync_to_restart +# define jpeg_start_decompress fn_jpeg_start_decompress +# define jpeg_std_error fn_jpeg_std_error + /* Wrapper since we can't directly assign the function pointer to another function pointer that was declared more completely easily. */ static boolean jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired) { - return fn_jpeg_resync_to_restart (cinfo, desired); + return jpeg_resync_to_restart (cinfo, desired); } +# undef jpeg_resync_to_restart +# define jpeg_resync_to_restart jpeg_resync_to_restart_wrapper -#else - -#define fn_jpeg_CreateDecompress(a,b,c) jpeg_create_decompress (a) -#define fn_jpeg_start_decompress jpeg_start_decompress -#define fn_jpeg_finish_decompress jpeg_finish_decompress -#define fn_jpeg_destroy_decompress jpeg_destroy_decompress -#define fn_jpeg_read_header jpeg_read_header -#define fn_jpeg_read_scanlines jpeg_read_scanlines -#define fn_jpeg_std_error jpeg_std_error -#define jpeg_resync_to_restart_wrapper jpeg_resync_to_restart - -#endif /* WINDOWSNT */ +# endif /* WINDOWSNT */ struct my_jpeg_error_mgr { @@ -6358,7 +6379,7 @@ jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, ptrdiff_t len) src->init_source = our_common_init_source; src->fill_input_buffer = our_memory_fill_input_buffer; src->skip_input_data = our_memory_skip_input_data; - src->resync_to_restart = jpeg_resync_to_restart_wrapper; /* Use default method. */ + src->resync_to_restart = jpeg_resync_to_restart; /* Use default method. */ src->term_source = our_common_term_source; src->bytes_in_buffer = len; src->next_input_byte = data; @@ -6464,7 +6485,7 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp) src->mgr.init_source = our_common_init_source; src->mgr.fill_input_buffer = our_stdio_fill_input_buffer; src->mgr.skip_input_data = our_stdio_skip_input_data; - src->mgr.resync_to_restart = jpeg_resync_to_restart_wrapper; /* Use default method. */ + src->mgr.resync_to_restart = jpeg_resync_to_restart; /* Use default. */ src->mgr.term_source = our_common_term_source; src->mgr.bytes_in_buffer = 0; src->mgr.next_input_byte = NULL; @@ -6515,7 +6536,7 @@ jpeg_load_body (struct frame *f, struct image *img, /* Customize libjpeg's error handling to call my_error_exit when an error is detected. This function will perform a longjmp. */ - mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); + mgr->cinfo.err = jpeg_std_error (&mgr->pub); mgr->pub.error_exit = my_error_exit; if (sys_setjmp (mgr->setjmp_buffer)) { @@ -6541,7 +6562,7 @@ jpeg_load_body (struct frame *f, struct image *img, /* Close the input file and destroy the JPEG object. */ if (fp) fclose (fp); - fn_jpeg_destroy_decompress (&mgr->cinfo); + jpeg_destroy_decompress (&mgr->cinfo); /* If we already have an XImage, free that. */ x_destroy_x_image (ximg); @@ -6553,7 +6574,7 @@ jpeg_load_body (struct frame *f, struct image *img, /* Create the JPEG decompression object. Let it read from fp. Read the JPEG image header. */ - fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); + jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); if (NILP (specified_data)) jpeg_file_src (&mgr->cinfo, fp); @@ -6561,12 +6582,12 @@ jpeg_load_body (struct frame *f, struct image *img, jpeg_memory_src (&mgr->cinfo, SDATA (specified_data), SBYTES (specified_data)); - fn_jpeg_read_header (&mgr->cinfo, 1); + jpeg_read_header (&mgr->cinfo, 1); /* Customize decompression so that color quantization will be used. Start decompression. */ mgr->cinfo.quantize_colors = 1; - fn_jpeg_start_decompress (&mgr->cinfo); + jpeg_start_decompress (&mgr->cinfo); width = img->width = mgr->cinfo.output_width; height = img->height = mgr->cinfo.output_height; @@ -6629,14 +6650,14 @@ jpeg_load_body (struct frame *f, struct image *img, JPOOL_IMAGE, row_stride, 1); for (y = 0; y < height; ++y) { - fn_jpeg_read_scanlines (&mgr->cinfo, buffer, 1); + jpeg_read_scanlines (&mgr->cinfo, buffer, 1); for (x = 0; x < mgr->cinfo.output_width; ++x) XPutPixel (ximg, x, y, colors[buffer[0][x]]); } /* Clean up. */ - fn_jpeg_finish_decompress (&mgr->cinfo); - fn_jpeg_destroy_decompress (&mgr->cinfo); + jpeg_finish_decompress (&mgr->cinfo); + jpeg_destroy_decompress (&mgr->cinfo); if (fp) fclose (fp); @@ -6760,22 +6781,22 @@ tiff_image_p (Lisp_Object object) #ifdef HAVE_TIFF -#include +# include -#ifdef WINDOWSNT +# ifdef WINDOWSNT /* TIFF library details. */ -DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetErrorHandler, (TIFFErrorHandler)); -DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetWarningHandler, (TIFFErrorHandler)); -DEF_IMGLIB_FN (TIFF *, TIFFOpen, (const char *, const char *)); -DEF_IMGLIB_FN (TIFF *, TIFFClientOpen, (const char *, const char *, thandle_t, - TIFFReadWriteProc, TIFFReadWriteProc, - TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, - TIFFMapFileProc, TIFFUnmapFileProc)); -DEF_IMGLIB_FN (int, TIFFGetField, (TIFF *, ttag_t, ...)); -DEF_IMGLIB_FN (int, TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int)); -DEF_IMGLIB_FN (void, TIFFClose, (TIFF *)); -DEF_IMGLIB_FN (int, TIFFSetDirectory, (TIFF *, tdir_t)); +DEF_DLL_FN (TIFFErrorHandler, TIFFSetErrorHandler, (TIFFErrorHandler)); +DEF_DLL_FN (TIFFErrorHandler, TIFFSetWarningHandler, (TIFFErrorHandler)); +DEF_DLL_FN (TIFF *, TIFFOpen, (const char *, const char *)); +DEF_DLL_FN (TIFF *, TIFFClientOpen, + (const char *, const char *, thandle_t, TIFFReadWriteProc, + TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, + TIFFMapFileProc, TIFFUnmapFileProc)); +DEF_DLL_FN (int, TIFFGetField, (TIFF *, ttag_t, ...)); +DEF_DLL_FN (int, TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int)); +DEF_DLL_FN (void, TIFFClose, (TIFF *)); +DEF_DLL_FN (int, TIFFSetDirectory, (TIFF *, tdir_t)); static bool init_tiff_functions (void) @@ -6785,28 +6806,36 @@ init_tiff_functions (void) if (!(library = w32_delayed_load (Qtiff))) return 0; - LOAD_IMGLIB_FN (library, TIFFSetErrorHandler); - LOAD_IMGLIB_FN (library, TIFFSetWarningHandler); - LOAD_IMGLIB_FN (library, TIFFOpen); - LOAD_IMGLIB_FN (library, TIFFClientOpen); - LOAD_IMGLIB_FN (library, TIFFGetField); - LOAD_IMGLIB_FN (library, TIFFReadRGBAImage); - LOAD_IMGLIB_FN (library, TIFFClose); - LOAD_IMGLIB_FN (library, TIFFSetDirectory); + LOAD_DLL_FN (library, TIFFSetErrorHandler); + LOAD_DLL_FN (library, TIFFSetWarningHandler); + LOAD_DLL_FN (library, TIFFOpen); + LOAD_DLL_FN (library, TIFFClientOpen); + LOAD_DLL_FN (library, TIFFGetField); + LOAD_DLL_FN (library, TIFFReadRGBAImage); + LOAD_DLL_FN (library, TIFFClose); + LOAD_DLL_FN (library, TIFFSetDirectory); return 1; } -#else +# undef TIFFClientOpen +# undef TIFFClose +# undef TIFFGetField +# undef TIFFOpen +# undef TIFFReadRGBAImage +# undef TIFFSetDirectory +# undef TIFFSetErrorHandler +# undef TIFFSetWarningHandler -#define fn_TIFFSetErrorHandler TIFFSetErrorHandler -#define fn_TIFFSetWarningHandler TIFFSetWarningHandler -#define fn_TIFFOpen TIFFOpen -#define fn_TIFFClientOpen TIFFClientOpen -#define fn_TIFFGetField TIFFGetField -#define fn_TIFFReadRGBAImage TIFFReadRGBAImage -#define fn_TIFFClose TIFFClose -#define fn_TIFFSetDirectory TIFFSetDirectory -#endif /* WINDOWSNT */ +# define TIFFClientOpen fn_TIFFClientOpen +# define TIFFClose fn_TIFFClose +# define TIFFGetField fn_TIFFGetField +# define TIFFOpen fn_TIFFOpen +# define TIFFReadRGBAImage fn_TIFFReadRGBAImage +# define TIFFSetDirectory fn_TIFFSetDirectory +# define TIFFSetErrorHandler fn_TIFFSetErrorHandler +# define TIFFSetWarningHandler fn_TIFFSetWarningHandler + +# endif /* WINDOWSNT */ /* Reading from a memory buffer for TIFF images Based on the PNG @@ -6904,11 +6933,11 @@ tiff_size_of_memory (thandle_t data) compiler error compiling tiff_handler, see Bugzilla bug #17406 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17406). Declaring this function as external works around that problem. */ -#if defined (__MINGW32__) && __GNUC__ == 3 -# define MINGW_STATIC -#else -# define MINGW_STATIC static -#endif +# if defined (__MINGW32__) && __GNUC__ == 3 +# define MINGW_STATIC +# else +# define MINGW_STATIC static +# endif MINGW_STATIC void tiff_handler (const char *, const char *, const char *, va_list) @@ -6927,7 +6956,7 @@ tiff_handler (const char *log_format, const char *title, add_to_log (log_format, build_string (title), make_string (buf, max (0, min (len, sizeof buf - 1)))); } -#undef MINGW_STATIC +# undef MINGW_STATIC static void tiff_error_handler (const char *, const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (2, 0); @@ -6966,8 +6995,8 @@ tiff_load (struct frame *f, struct image *img) specified_file = image_spec_value (img->spec, QCfile, NULL); specified_data = image_spec_value (img->spec, QCdata, NULL); - fn_TIFFSetErrorHandler ((TIFFErrorHandler) tiff_error_handler); - fn_TIFFSetWarningHandler ((TIFFErrorHandler) tiff_warning_handler); + TIFFSetErrorHandler ((TIFFErrorHandler) tiff_error_handler); + TIFFSetWarningHandler ((TIFFErrorHandler) tiff_warning_handler); if (NILP (specified_data)) { @@ -6978,12 +7007,12 @@ tiff_load (struct frame *f, struct image *img) image_error ("Cannot find image file `%s'", specified_file, Qnil); return 0; } -#ifdef WINDOWSNT +# ifdef WINDOWSNT file = ansi_encode_filename (file); -#endif +# endif /* Try to open the image file. */ - tiff = fn_TIFFOpen (SSDATA (file), "r"); + tiff = TIFFOpen (SSDATA (file), "r"); if (tiff == NULL) { image_error ("Cannot open `%s'", file, Qnil); @@ -7003,14 +7032,14 @@ tiff_load (struct frame *f, struct image *img) memsrc.len = SBYTES (specified_data); memsrc.index = 0; - tiff = fn_TIFFClientOpen ("memory_source", "r", (thandle_t)&memsrc, - tiff_read_from_memory, - tiff_write_from_memory, - tiff_seek_in_memory, - tiff_close_memory, - tiff_size_of_memory, - tiff_mmap_memory, - tiff_unmap_memory); + tiff = TIFFClientOpen ("memory_source", "r", (thandle_t)&memsrc, + tiff_read_from_memory, + tiff_write_from_memory, + tiff_seek_in_memory, + tiff_close_memory, + tiff_size_of_memory, + tiff_mmap_memory, + tiff_unmap_memory); if (!tiff) { @@ -7024,24 +7053,24 @@ tiff_load (struct frame *f, struct image *img) { EMACS_INT ino = XFASTINT (image); if (! (TYPE_MINIMUM (tdir_t) <= ino && ino <= TYPE_MAXIMUM (tdir_t) - && fn_TIFFSetDirectory (tiff, ino))) + && TIFFSetDirectory (tiff, ino))) { image_error ("Invalid image number `%s' in image `%s'", image, img->spec); - fn_TIFFClose (tiff); + TIFFClose (tiff); return 0; } } /* Get width and height of the image, and allocate a raster buffer of width x height 32-bit values. */ - fn_TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width); - fn_TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height); + TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width); + TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height); if (!check_image_size (f, width, height)) { image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); - fn_TIFFClose (tiff); + TIFFClose (tiff); return 0; } @@ -7050,16 +7079,16 @@ tiff_load (struct frame *f, struct image *img) && image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0))) { - fn_TIFFClose (tiff); + TIFFClose (tiff); return 0; } buf = xmalloc (sizeof *buf * width * height); - rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); + rc = TIFFReadRGBAImage (tiff, width, height, buf, 0); /* Count the number of images in the file. */ - for (count = 1; fn_TIFFSetDirectory (tiff, count); count++) + for (count = 1; TIFFSetDirectory (tiff, count); count++) continue; if (count > 1) @@ -7067,7 +7096,7 @@ tiff_load (struct frame *f, struct image *img) Fcons (make_number (count), img->lisp_data)); - fn_TIFFClose (tiff); + TIFFClose (tiff); if (!rc) { image_error ("Error reading TIFF image `%s'", img->spec, Qnil); @@ -7093,11 +7122,11 @@ tiff_load (struct frame *f, struct image *img) } } -#ifdef COLOR_TABLE_SUPPORT +# ifdef COLOR_TABLE_SUPPORT /* Remember the colors allocated for the image. Free the color table. */ img->colors = colors_in_color_table (&img->ncolors); free_color_table (); -#endif /* COLOR_TABLE_SUPPORT */ +# endif /* COLOR_TABLE_SUPPORT */ img->width = width; img->height = height; @@ -7114,9 +7143,8 @@ tiff_load (struct frame *f, struct image *img) return 1; } -#else /* HAVE_TIFF */ +#elif defined HAVE_NS -#ifdef HAVE_NS static bool tiff_load (struct frame *f, struct image *img) { @@ -7124,9 +7152,8 @@ tiff_load (struct frame *f, struct image *img) image_spec_value (img->spec, QCfile, NULL), image_spec_value (img->spec, QCdata, NULL)); } -#endif /* HAVE_NS */ -#endif /* !HAVE_TIFF */ +#endif @@ -7226,54 +7253,54 @@ gif_image_p (Lisp_Object object) #ifdef HAVE_GIF -#if defined (HAVE_NTGUI) +# ifdef HAVE_NTGUI /* winuser.h might define DrawText to DrawTextA or DrawTextW. Undefine before redefining to avoid a preprocessor warning. */ -#ifdef DrawText -#undef DrawText -#endif +# ifdef DrawText +# undef DrawText +# endif /* avoid conflict with QuickdrawText.h */ -#define DrawText gif_DrawText -#include -#undef DrawText +# define DrawText gif_DrawText +# include +# undef DrawText /* Giflib before 5.0 didn't define these macros (used only if HAVE_NTGUI). */ -#ifndef GIFLIB_MINOR -#define GIFLIB_MINOR 0 -#endif -#ifndef GIFLIB_RELEASE -#define GIFLIB_RELEASE 0 -#endif +# ifndef GIFLIB_MINOR +# define GIFLIB_MINOR 0 +# endif +# ifndef GIFLIB_RELEASE +# define GIFLIB_RELEASE 0 +# endif -#else /* HAVE_NTGUI */ +# else /* HAVE_NTGUI */ -#include +# include -#endif /* HAVE_NTGUI */ +# endif /* HAVE_NTGUI */ /* Giflib before 5.0 didn't define these macros. */ -#ifndef GIFLIB_MAJOR -#define GIFLIB_MAJOR 4 -#endif +# ifndef GIFLIB_MAJOR +# define GIFLIB_MAJOR 4 +# endif -#ifdef WINDOWSNT +# ifdef WINDOWSNT /* GIF library details. */ -#if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR) -DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *, int *)); -#else -DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *)); -#endif -DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *)); -#if GIFLIB_MAJOR < 5 -DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc)); -DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *)); -#else -DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *)); -DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *, int *)); -DEF_IMGLIB_FN (char *, GifErrorString, (int)); -#endif +# if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR) +DEF_DLL_FN (int, DGifCloseFile, (GifFileType *, int *)); +# else +DEF_DLL_FN (int, DGifCloseFile, (GifFileType *)); +# endif +DEF_DLL_FN (int, DGifSlurp, (GifFileType *)); +# if GIFLIB_MAJOR < 5 +DEF_DLL_FN (GifFileType *, DGifOpen, (void *, InputFunc)); +DEF_DLL_FN (GifFileType *, DGifOpenFileName, (const char *)); +# else +DEF_DLL_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *)); +DEF_DLL_FN (GifFileType *, DGifOpenFileName, (const char *, int *)); +DEF_DLL_FN (char *, GifErrorString, (int)); +# endif static bool init_gif_functions (void) @@ -7283,27 +7310,29 @@ init_gif_functions (void) if (!(library = w32_delayed_load (Qgif))) return 0; - LOAD_IMGLIB_FN (library, DGifCloseFile); - LOAD_IMGLIB_FN (library, DGifSlurp); - LOAD_IMGLIB_FN (library, DGifOpen); - LOAD_IMGLIB_FN (library, DGifOpenFileName); -#if GIFLIB_MAJOR >= 5 - LOAD_IMGLIB_FN (library, GifErrorString); -#endif + LOAD_DLL_FN (library, DGifCloseFile); + LOAD_DLL_FN (library, DGifSlurp); + LOAD_DLL_FN (library, DGifOpen); + LOAD_DLL_FN (library, DGifOpenFileName); +# if GIFLIB_MAJOR >= 5 + LOAD_DLL_FN (library, GifErrorString); +# endif return 1; } -#else +# undef DGifCloseFile +# undef DGifOpen +# undef DGifOpenFileName +# undef DGifSlurp +# undef GifErrorString -#define fn_DGifCloseFile DGifCloseFile -#define fn_DGifSlurp DGifSlurp -#define fn_DGifOpen DGifOpen -#define fn_DGifOpenFileName DGifOpenFileName -#if 5 <= GIFLIB_MAJOR -# define fn_GifErrorString GifErrorString -#endif +# define DGifCloseFile fn_DGifCloseFile +# define DGifOpen fn_DGifOpen +# define DGifOpenFileName fn_DGifOpenFileName +# define DGifSlurp fn_DGifSlurp +# define GifErrorString fn_GifErrorString -#endif /* WINDOWSNT */ +# endif /* WINDOWSNT */ /* Reading a GIF image from memory Based on the PNG memory stuff to a certain extent. */ @@ -7340,9 +7369,9 @@ gif_close (GifFileType *gif, int *err) int retval; #if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR) - retval = fn_DGifCloseFile (gif, err); + retval = DGifCloseFile (gif, err); #else - retval = fn_DGifCloseFile (gif); + retval = DGifCloseFile (gif); #if GIFLIB_MAJOR >= 5 if (err) *err = gif->Error; @@ -7390,18 +7419,18 @@ gif_load (struct frame *f, struct image *img) /* Open the GIF file. */ #if GIFLIB_MAJOR < 5 - gif = fn_DGifOpenFileName (SSDATA (file)); + gif = DGifOpenFileName (SSDATA (file)); if (gif == NULL) { image_error ("Cannot open `%s'", file, Qnil); return 0; } #else - gif = fn_DGifOpenFileName (SSDATA (file), &gif_err); + gif = DGifOpenFileName (SSDATA (file), &gif_err); if (gif == NULL) { image_error ("Cannot open `%s': %s", - file, build_string (fn_GifErrorString (gif_err))); + file, build_string (GifErrorString (gif_err))); return 0; } #endif @@ -7421,18 +7450,18 @@ gif_load (struct frame *f, struct image *img) memsrc.index = 0; #if GIFLIB_MAJOR < 5 - gif = fn_DGifOpen (&memsrc, gif_read_from_memory); + gif = DGifOpen (&memsrc, gif_read_from_memory); if (!gif) { image_error ("Cannot open memory source `%s'", img->spec, Qnil); return 0; } #else - gif = fn_DGifOpen (&memsrc, gif_read_from_memory, &gif_err); + gif = DGifOpen (&memsrc, gif_read_from_memory, &gif_err); if (!gif) { image_error ("Cannot open memory source `%s': %s", - img->spec, build_string (fn_GifErrorString (gif_err))); + img->spec, build_string (GifErrorString (gif_err))); return 0; } #endif @@ -7447,7 +7476,7 @@ gif_load (struct frame *f, struct image *img) } /* Read entire contents. */ - rc = fn_DGifSlurp (gif); + rc = DGifSlurp (gif); if (rc == GIF_ERROR || gif->ImageCount <= 0) { image_error ("Error reading `%s'", img->spec, Qnil); @@ -7681,7 +7710,7 @@ gif_load (struct frame *f, struct image *img) if (gif_close (gif, &gif_err) == GIF_ERROR) { #if 5 <= GIFLIB_MAJOR - char *error_text = fn_GifErrorString (gif_err); + char *error_text = GifErrorString (gif_err); if (error_text) image_error ("Error closing `%s': %s", @@ -8593,7 +8622,7 @@ and `imagemagick-types-inhibit'. */) SVG ***********************************************************************/ -#if defined (HAVE_RSVG) +#ifdef HAVE_RSVG /* Function prototypes. */ @@ -8641,11 +8670,11 @@ static const struct image_keyword svg_format[SVG_LAST] = {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; -#if defined HAVE_NTGUI && defined WINDOWSNT +# if defined HAVE_NTGUI && defined WINDOWSNT static bool init_svg_functions (void); -#else +# else #define init_svg_functions NULL -#endif +# endif /* Structure describing the image type `svg'. Its the same type of structure defined for all image formats, handled by emacs image @@ -8679,32 +8708,34 @@ svg_image_p (Lisp_Object object) return fmt[SVG_FILE].count + fmt[SVG_DATA].count == 1; } -#include +# include -#ifdef WINDOWSNT +# ifdef WINDOWSNT /* SVG library functions. */ -DEF_IMGLIB_FN (RsvgHandle *, rsvg_handle_new, (void)); -DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions, (RsvgHandle *, RsvgDimensionData *)); -DEF_IMGLIB_FN (gboolean, rsvg_handle_write, (RsvgHandle *, const guchar *, gsize, GError **)); -DEF_IMGLIB_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **)); -DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); -DEF_IMGLIB_FN (void, rsvg_handle_set_base_uri, (RsvgHandle *, const char *)); - -DEF_IMGLIB_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); -DEF_IMGLIB_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_rowstride, (const GdkPixbuf *)); -DEF_IMGLIB_FN (GdkColorspace, gdk_pixbuf_get_colorspace, (const GdkPixbuf *)); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels, (const GdkPixbuf *)); -DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha, (const GdkPixbuf *)); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample, (const GdkPixbuf *)); - -#if ! GLIB_CHECK_VERSION (2, 36, 0) -DEF_IMGLIB_FN (void, g_type_init, (void)); -#endif -DEF_IMGLIB_FN (void, g_object_unref, (gpointer)); -DEF_IMGLIB_FN (void, g_error_free, (GError *)); +DEF_DLL_FN (RsvgHandle *, rsvg_handle_new, (void)); +DEF_DLL_FN (void, rsvg_handle_get_dimensions, + (RsvgHandle *, RsvgDimensionData *)); +DEF_DLL_FN (gboolean, rsvg_handle_write, + (RsvgHandle *, const guchar *, gsize, GError **)); +DEF_DLL_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **)); +DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); +DEF_DLL_FN (void, rsvg_handle_set_base_uri, (RsvgHandle *, const char *)); + +DEF_DLL_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); +DEF_DLL_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); +DEF_DLL_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); +DEF_DLL_FN (int, gdk_pixbuf_get_rowstride, (const GdkPixbuf *)); +DEF_DLL_FN (GdkColorspace, gdk_pixbuf_get_colorspace, (const GdkPixbuf *)); +DEF_DLL_FN (int, gdk_pixbuf_get_n_channels, (const GdkPixbuf *)); +DEF_DLL_FN (gboolean, gdk_pixbuf_get_has_alpha, (const GdkPixbuf *)); +DEF_DLL_FN (int, gdk_pixbuf_get_bits_per_sample, (const GdkPixbuf *)); + +# if ! GLIB_CHECK_VERSION (2, 36, 0) +DEF_DLL_FN (void, g_type_init, (void)); +# endif +DEF_DLL_FN (void, g_object_unref, (gpointer)); +DEF_DLL_FN (void, g_error_free, (GError *)); Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; @@ -8724,56 +8755,71 @@ init_svg_functions (void) return 0; } - LOAD_IMGLIB_FN (library, rsvg_handle_new); - LOAD_IMGLIB_FN (library, rsvg_handle_get_dimensions); - LOAD_IMGLIB_FN (library, rsvg_handle_write); - LOAD_IMGLIB_FN (library, rsvg_handle_close); - LOAD_IMGLIB_FN (library, rsvg_handle_get_pixbuf); - LOAD_IMGLIB_FN (library, rsvg_handle_set_base_uri); - - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_width); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_height); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_pixels); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_rowstride); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_colorspace); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_n_channels); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_has_alpha); - LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_bits_per_sample); - -#if ! GLIB_CHECK_VERSION (2, 36, 0) - LOAD_IMGLIB_FN (gobject, g_type_init); -#endif - LOAD_IMGLIB_FN (gobject, g_object_unref); - LOAD_IMGLIB_FN (glib, g_error_free); + LOAD_DLL_FN (library, rsvg_handle_new); + LOAD_DLL_FN (library, rsvg_handle_get_dimensions); + LOAD_DLL_FN (library, rsvg_handle_write); + LOAD_DLL_FN (library, rsvg_handle_close); + LOAD_DLL_FN (library, rsvg_handle_get_pixbuf); + LOAD_DLL_FN (library, rsvg_handle_set_base_uri); + + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_width); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_height); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_pixels); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_rowstride); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_colorspace); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_n_channels); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_has_alpha); + LOAD_DLL_FN (gdklib, gdk_pixbuf_get_bits_per_sample); + +# if ! GLIB_CHECK_VERSION (2, 36, 0) + LOAD_DLL_FN (gobject, g_type_init); +# endif + LOAD_DLL_FN (gobject, g_object_unref); + LOAD_DLL_FN (glib, g_error_free); return 1; } -#else /* The following aliases for library functions allow dynamic loading to be used on some platforms. */ -#define fn_rsvg_handle_new rsvg_handle_new -#define fn_rsvg_handle_get_dimensions rsvg_handle_get_dimensions -#define fn_rsvg_handle_write rsvg_handle_write -#define fn_rsvg_handle_close rsvg_handle_close -#define fn_rsvg_handle_get_pixbuf rsvg_handle_get_pixbuf -#define fn_rsvg_handle_set_base_uri rsvg_handle_set_base_uri - -#define fn_gdk_pixbuf_get_width gdk_pixbuf_get_width -#define fn_gdk_pixbuf_get_height gdk_pixbuf_get_height -#define fn_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels -#define fn_gdk_pixbuf_get_rowstride gdk_pixbuf_get_rowstride -#define fn_gdk_pixbuf_get_colorspace gdk_pixbuf_get_colorspace -#define fn_gdk_pixbuf_get_n_channels gdk_pixbuf_get_n_channels -#define fn_gdk_pixbuf_get_has_alpha gdk_pixbuf_get_has_alpha -#define fn_gdk_pixbuf_get_bits_per_sample gdk_pixbuf_get_bits_per_sample -#if ! GLIB_CHECK_VERSION (2, 36, 0) -#define fn_g_type_init g_type_init -#endif -#define fn_g_object_unref g_object_unref -#define fn_g_error_free g_error_free -#endif /* !WINDOWSNT */ +# undef gdk_pixbuf_get_bits_per_sample +# undef gdk_pixbuf_get_colorspace +# undef gdk_pixbuf_get_has_alpha +# undef gdk_pixbuf_get_height +# undef gdk_pixbuf_get_n_channels +# undef gdk_pixbuf_get_pixels +# undef gdk_pixbuf_get_rowstride +# undef gdk_pixbuf_get_width +# undef g_error_free +# undef g_object_unref +# undef g_type_init +# undef rsvg_handle_close +# undef rsvg_handle_get_dimensions +# undef rsvg_handle_get_pixbuf +# undef rsvg_handle_new +# undef rsvg_handle_set_base_uri +# undef rsvg_handle_write + +# define gdk_pixbuf_get_bits_per_sample fn_gdk_pixbuf_get_bits_per_sample +# define gdk_pixbuf_get_colorspace fn_gdk_pixbuf_get_colorspace +# define gdk_pixbuf_get_has_alpha fn_gdk_pixbuf_get_has_alpha +# define gdk_pixbuf_get_height fn_gdk_pixbuf_get_height +# define gdk_pixbuf_get_n_channels fn_gdk_pixbuf_get_n_channels +# define gdk_pixbuf_get_pixels fn_gdk_pixbuf_get_pixels +# define gdk_pixbuf_get_rowstride fn_gdk_pixbuf_get_rowstride +# define gdk_pixbuf_get_width fn_gdk_pixbuf_get_width +# define g_error_free fn_g_error_free +# define g_object_unref fn_g_object_unref +# define g_type_init fn_g_type_init +# define rsvg_handle_close fn_rsvg_handle_close +# define rsvg_handle_get_dimensions fn_rsvg_handle_get_dimensions +# define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf +# define rsvg_handle_new fn_rsvg_handle_new +# define rsvg_handle_set_base_uri fn_rsvg_handle_set_base_uri +# define rsvg_handle_write fn_rsvg_handle_write + +# endif /* !WINDOWSNT */ /* Load SVG image IMG for use on frame F. Value is true if successful. */ @@ -8862,28 +8908,28 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * #if ! GLIB_CHECK_VERSION (2, 36, 0) /* g_type_init is a glib function that must be called prior to using gnome type library functions (obsolete since 2.36.0). */ - fn_g_type_init (); + g_type_init (); #endif /* Make a handle to a new rsvg object. */ - rsvg_handle = fn_rsvg_handle_new (); + rsvg_handle = rsvg_handle_new (); /* Set base_uri for properly handling referenced images (via 'href'). See rsvg bug 596114 - "image refs are relative to curdir, not .svg file" (https://bugzilla.gnome.org/show_bug.cgi?id=596114). */ if (filename) - fn_rsvg_handle_set_base_uri(rsvg_handle, filename); + rsvg_handle_set_base_uri(rsvg_handle, filename); /* Parse the contents argument and fill in the rsvg_handle. */ - fn_rsvg_handle_write (rsvg_handle, contents, size, &err); + rsvg_handle_write (rsvg_handle, contents, size, &err); if (err) goto rsvg_error; /* The parsing is complete, rsvg_handle is ready to used, close it for further writes. */ - fn_rsvg_handle_close (rsvg_handle, &err); + rsvg_handle_close (rsvg_handle, &err); if (err) goto rsvg_error; - fn_rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); + rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); if (! check_image_size (f, dimension_data.width, dimension_data.height)) { image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); @@ -8892,26 +8938,26 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * /* We can now get a valid pixel buffer from the svg file, if all went ok. */ - pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle); + pixbuf = rsvg_handle_get_pixbuf (rsvg_handle); if (!pixbuf) goto rsvg_error; - fn_g_object_unref (rsvg_handle); + g_object_unref (rsvg_handle); /* Extract some meta data from the svg handle. */ - width = fn_gdk_pixbuf_get_width (pixbuf); - height = fn_gdk_pixbuf_get_height (pixbuf); - pixels = fn_gdk_pixbuf_get_pixels (pixbuf); - rowstride = fn_gdk_pixbuf_get_rowstride (pixbuf); + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf); + pixels = gdk_pixbuf_get_pixels (pixbuf); + rowstride = gdk_pixbuf_get_rowstride (pixbuf); /* Validate the svg meta data. */ - eassert (fn_gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB); - eassert (fn_gdk_pixbuf_get_n_channels (pixbuf) == 4); - eassert (fn_gdk_pixbuf_get_has_alpha (pixbuf)); - eassert (fn_gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); + eassert (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB); + eassert (gdk_pixbuf_get_n_channels (pixbuf) == 4); + eassert (gdk_pixbuf_get_has_alpha (pixbuf)); + eassert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); /* Try to create a x pixmap to hold the svg pixmap. */ if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0)) { - fn_g_object_unref (pixbuf); + g_object_unref (pixbuf); return 0; } @@ -8968,7 +9014,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * free_color_table (); #endif /* COLOR_TABLE_SUPPORT */ - fn_g_object_unref (pixbuf); + g_object_unref (pixbuf); img->width = width; img->height = height; @@ -8983,11 +9029,11 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * return 1; rsvg_error: - fn_g_object_unref (rsvg_handle); + g_object_unref (rsvg_handle); /* FIXME: Use error->message so the user knows what is the actual problem with the image. */ image_error ("Error parsing SVG image `%s'", img->spec, Qnil); - fn_g_error_free (err); + g_error_free (err); return 0; } diff --git a/src/w32.h b/src/w32.h index e0aedcb..18e12b2 100644 --- a/src/w32.h +++ b/src/w32.h @@ -225,4 +225,17 @@ extern ssize_t emacs_gnutls_push (gnutls_transport_ptr_t p, const void* buf, size_t sz); #endif /* HAVE_GNUTLS */ +/* Definine a function that will be loaded from a DLL. */ +#define DEF_DLL_FN(type, func, args) static type (FAR CDECL *fn_##func) args + +/* Load a function from the DLL. */ +#define LOAD_DLL_FN(lib, func) \ + do \ + { \ + fn_##func = (void *) GetProcAddress (lib, #func); \ + if (!fn_##func) \ + return false; \ + } \ + while (false) + #endif /* EMACS_W32_H */ diff --git a/src/xml.c b/src/xml.c index d418202..6be3bc7 100644 --- a/src/xml.c +++ b/src/xml.c @@ -33,26 +33,17 @@ static Lisp_Object Qlibxml2_dll; #ifdef WINDOWSNT -#include -#include "w32.h" +# include +# include "w32.h" -/* Macro for defining functions that will be loaded from the libxml2 DLL. */ -#define DEF_XML2_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args - -/* Macro for loading libxml2 functions from the library. */ -#define LOAD_XML2_FN(lib,func) { \ - fn_##func = (void *) GetProcAddress (lib, #func); \ - if (!fn_##func) goto bad_library; \ - } - -DEF_XML2_FN (htmlDocPtr, htmlReadMemory, +DEF_DLL_FN (htmlDocPtr, htmlReadMemory, (const char *, int, const char *, const char *, int)); -DEF_XML2_FN (xmlDocPtr, xmlReadMemory, +DEF_DLL_FN (xmlDocPtr, xmlReadMemory, (const char *, int, const char *, const char *, int)); -DEF_XML2_FN (xmlNodePtr, xmlDocGetRootElement, (xmlDocPtr)); -DEF_XML2_FN (void, xmlFreeDoc, (xmlDocPtr)); -DEF_XML2_FN (void, xmlCleanupParser, (void)); -DEF_XML2_FN (void, xmlCheckVersion, (int)); +DEF_DLL_FN (xmlNodePtr, xmlDocGetRootElement, (xmlDocPtr)); +DEF_DLL_FN (void, xmlFreeDoc, (xmlDocPtr)); +DEF_DLL_FN (void, xmlCleanupParser, (void)); +DEF_DLL_FN (void, xmlCheckVersion, (int)); static int libxml2_loaded_p (void) @@ -64,14 +55,33 @@ libxml2_loaded_p (void) return 0; } -#else /* !WINDOWSNT */ +# undef htmlReadMemory +# undef xmlCheckVersion +# undef xmlCleanupParser +# undef xmlDocGetRootElement +# undef xmlFreeDoc +# undef xmlReadMemory + +# define htmlReadMemory fn_htmlReadMemory +# define xmlCheckVersion fn_xmlCheckVersion +# define xmlCleanupParser fn_xmlCleanupParser +# define xmlDocGetRootElement fn_xmlDocGetRootElement +# define xmlFreeDoc fn_xmlFreeDoc +# define xmlReadMemory fn_xmlReadMemory + +static bool +load_dll_functions (HMODULE library) +{ + LOAD_DLL_FN (library, htmlReadMemory); + LOAD_DLL_FN (library, xmlReadMemory); + LOAD_DLL_FN (library, xmlDocGetRootElement); + LOAD_DLL_FN (library, xmlFreeDoc); + LOAD_DLL_FN (library, xmlCleanupParser); + LOAD_DLL_FN (library, xmlCheckVersion); + return true; +} -#define fn_htmlReadMemory htmlReadMemory -#define fn_xmlReadMemory xmlReadMemory -#define fn_xmlDocGetRootElement xmlDocGetRootElement -#define fn_xmlFreeDoc xmlFreeDoc -#define fn_xmlCleanupParser xmlCleanupParser -#define fn_xmlCheckVersion xmlCheckVersion +#else /* !WINDOWSNT */ static int libxml2_loaded_p (void) @@ -97,14 +107,8 @@ init_libxml2_functions (void) return 0; } - /* LOAD_XML2_FN jumps to bad_library if it fails to find the - named function. */ - LOAD_XML2_FN (library, htmlReadMemory); - LOAD_XML2_FN (library, xmlReadMemory); - LOAD_XML2_FN (library, xmlDocGetRootElement); - LOAD_XML2_FN (library, xmlFreeDoc); - LOAD_XML2_FN (library, xmlCleanupParser); - LOAD_XML2_FN (library, xmlCheckVersion); + if (! load_dll_functions (library)) + goto bad_library; Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qt), Vlibrary_cache); return 1; @@ -182,7 +186,7 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Obj const char *burl = ""; ptrdiff_t istart, iend, istart_byte, iend_byte; - fn_xmlCheckVersion (LIBXML_VERSION); + xmlCheckVersion (LIBXML_VERSION); validate_region (&start, &end); @@ -201,16 +205,16 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Obj } if (htmlp) - doc = fn_htmlReadMemory ((char *) BYTE_POS_ADDR (istart_byte), - iend_byte - istart_byte, burl, "utf-8", - HTML_PARSE_RECOVER|HTML_PARSE_NONET| - HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| - HTML_PARSE_NOBLANKS); + doc = htmlReadMemory ((char *) BYTE_POS_ADDR (istart_byte), + iend_byte - istart_byte, burl, "utf-8", + HTML_PARSE_RECOVER|HTML_PARSE_NONET| + HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| + HTML_PARSE_NOBLANKS); else - doc = fn_xmlReadMemory ((char *) BYTE_POS_ADDR (istart_byte), - iend_byte - istart_byte, burl, "utf-8", - XML_PARSE_NONET|XML_PARSE_NOWARNING| - XML_PARSE_NOBLANKS |XML_PARSE_NOERROR); + doc = xmlReadMemory ((char *) BYTE_POS_ADDR (istart_byte), + iend_byte - istart_byte, burl, "utf-8", + XML_PARSE_NONET|XML_PARSE_NOWARNING| + XML_PARSE_NOBLANKS |XML_PARSE_NOERROR); if (doc != NULL) { @@ -232,14 +236,14 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, Lisp_Obj if (NILP (result)) { /* The document doesn't have toplevel comments or we discarded them. Get the tree the proper way. */ - xmlNode *node = fn_xmlDocGetRootElement (doc); + xmlNode *node = xmlDocGetRootElement (doc); if (node != NULL) result = make_dom (node); } else result = Fcons (intern ("top"), Fcons (Qnil, Fnreverse (Fcons (r, result)))); - fn_xmlFreeDoc (doc); + xmlFreeDoc (doc); } return result; @@ -249,7 +253,7 @@ void xml_cleanup_parser (void) { if (libxml2_loaded_p ()) - fn_xmlCleanupParser (); + xmlCleanupParser (); } DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, commit 1505643bb70ce66e86d6c72902fe7e9199e93606 Merge: 9bb10cb b54f572 Author: Paul Eggert Date: Sun Dec 28 00:07:00 2014 -0800 Merge from origin/emacs-24 b54f572 Port memory-full checking to GnuTLS 3.3 Conflicts: src/ChangeLog src/gnutls.c commit b54f5721bfb6bf21cac5402cf34a8130e11bfb70 Author: Paul Eggert Date: Sat Dec 27 23:44:25 2014 -0800 Port memory-full checking to GnuTLS 3.3 Instead of using gnutls_global_set_mem_functions, check every call to a GnuTLS function that might return an indication of memory exhaustion. Suggested by Dmitry Antipov in: http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html * src/gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove. (init_gnutls_functions): Do not load gnutls_global_set_mem_functions. (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove. All uses removed. (check_memory_full): New function. (emacs_gnutls_handshake, emacs_gnutls_handle_error) (gnutls_make_error, Fgnutls_boot): Use it. (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions. diff --git a/src/ChangeLog b/src/ChangeLog index 2df8308..3ea6057 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2014-12-28 Paul Eggert + + Port memory-full checking to GnuTLS 3.3 + Instead of using gnutls_global_set_mem_functions, check every call + to a GnuTLS function that might return an indication of memory + exhaustion. Suggested by Dmitry Antipov in: + http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html + * gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove. + (init_gnutls_functions): Do not load gnutls_global_set_mem_functions. + (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove. + All uses removed. + (check_memory_full): New function. + (emacs_gnutls_handshake, emacs_gnutls_handle_error) + (gnutls_make_error, Fgnutls_boot): Use it. + (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions. + 2014-12-25 Eli Zaretskii * xdisp.c (set_iterator_to_next) : Limit search in diff --git a/src/gnutls.c b/src/gnutls.c index ffa3c98..f093568 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -116,10 +116,6 @@ DEF_GNUTLS_FN (void, gnutls_global_set_log_function, (gnutls_log_func)); DEF_GNUTLS_FN (void, gnutls_global_set_audit_log_function, (gnutls_audit_log_func)); #endif DEF_GNUTLS_FN (void, gnutls_global_set_log_level, (int)); -DEF_GNUTLS_FN (void, gnutls_global_set_mem_functions, - (gnutls_alloc_function, gnutls_alloc_function, - gnutls_is_secure_function, gnutls_realloc_function, - gnutls_free_function)); DEF_GNUTLS_FN (int, gnutls_handshake, (gnutls_session_t)); DEF_GNUTLS_FN (int, gnutls_init, (gnutls_session_t *, unsigned int)); DEF_GNUTLS_FN (int, gnutls_priority_set_direct, @@ -184,7 +180,6 @@ init_gnutls_functions (void) LOAD_GNUTLS_FN (library, gnutls_global_set_audit_log_function); #endif LOAD_GNUTLS_FN (library, gnutls_global_set_log_level); - LOAD_GNUTLS_FN (library, gnutls_global_set_mem_functions); LOAD_GNUTLS_FN (library, gnutls_handshake); LOAD_GNUTLS_FN (library, gnutls_init); LOAD_GNUTLS_FN (library, gnutls_priority_set_direct); @@ -244,7 +239,6 @@ init_gnutls_functions (void) #define fn_gnutls_global_set_audit_log_function gnutls_global_set_audit_log_function #endif #define fn_gnutls_global_set_log_level gnutls_global_set_log_level -#define fn_gnutls_global_set_mem_functions gnutls_global_set_mem_functions #define fn_gnutls_handshake gnutls_handshake #define fn_gnutls_init gnutls_init #define fn_gnutls_priority_set_direct gnutls_priority_set_direct @@ -264,6 +258,17 @@ init_gnutls_functions (void) #endif /* !WINDOWSNT */ +/* Report memory exhaustion if ERR is an out-of-memory indication. */ +static void +check_memory_full (int err) +{ + /* When GnuTLS exhausts memory, it doesn't say how much memory it + asked for, so tell the Emacs allocator that GnuTLS asked for no + bytes. This isn't accurate, but it's good enough. */ + if (err == GNUTLS_E_MEMORY_ERROR) + memory_full (0); +} + #ifdef HAVE_GNUTLS3 /* Function to log a simple audit message. */ static void @@ -360,7 +365,7 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) } else { - fn_gnutls_alert_send_appropriate (state, ret); + check_memory_full (fn_gnutls_alert_send_appropriate (state, ret)); } return ret; } @@ -477,6 +482,8 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) if (err >= 0) return 1; + check_memory_full (err); + max_log_level = global_gnutls_log_level; /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ @@ -542,6 +549,7 @@ gnutls_make_error (int err) return Qgnutls_e_invalid_session; } + check_memory_full (err); return make_number (err); } @@ -682,11 +690,8 @@ emacs_gnutls_global_init (void) int ret = GNUTLS_E_SUCCESS; if (!gnutls_global_initialized) - { - fn_gnutls_global_set_mem_functions (xmalloc, xmalloc, NULL, - xrealloc, xfree); - ret = fn_gnutls_global_init (); - } + ret = fn_gnutls_global_init (); + gnutls_global_initialized = 1; return gnutls_make_error (ret); @@ -854,7 +859,8 @@ one trustfile (usually a CA bundle). */) unsigned int gnutls_verify_flags = GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT; GNUTLS_LOG (2, max_log_level, "allocating x509 credentials"); - fn_gnutls_certificate_allocate_credentials (&x509_cred); + check_memory_full ((fn_gnutls_certificate_allocate_credentials + (&x509_cred))); XPROCESS (proc)->gnutls_x509_cred = x509_cred; verify_flags = Fplist_get (proplist, QCgnutls_bootprop_verify_flags); @@ -873,7 +879,8 @@ one trustfile (usually a CA bundle). */) else /* Qgnutls_anon: */ { GNUTLS_LOG (2, max_log_level, "allocating anon credentials"); - fn_gnutls_anon_allocate_client_credentials (&anon_cred); + check_memory_full ((fn_gnutls_anon_allocate_client_credentials + (&anon_cred))); XPROCESS (proc)->gnutls_anon_cred = anon_cred; } @@ -1105,7 +1112,10 @@ one trustfile (usually a CA bundle). */) return gnutls_make_error (ret); } - if (!fn_gnutls_x509_crt_check_hostname (gnutls_verify_cert, c_hostname)) + int err + = fn_gnutls_x509_crt_check_hostname (gnutls_verify_cert, c_hostname); + check_memory_full (err); + if (!err) { if (verify_error_all || !NILP (Fmember (QCgnutls_bootprop_hostname, verify_error))) commit 9bb10cbdc59486c2131cea9b5399e9cbdc0418ab Author: Juri Linkov Date: Sun Dec 28 02:52:50 2014 +0200 Avoid compilation warning in saveplace.el for dired-current-directory diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 18e34cf..985a52a 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -138,6 +138,8 @@ disabled, i.e., the position is recorded for all files." :version "24.1" :type 'regexp :group 'save-place) +(declare-function dired-current-directory "dired" (&optional localp)) + (defun toggle-save-place (&optional parg) "Toggle whether to save your place in this file between sessions. If this mode is enabled, point is recorded when you kill the buffer commit d143df5a4ecff352470f09019364310ec8e2202b Author: Juri Linkov Date: Sun Dec 28 02:48:05 2014 +0200 Use diff faces for compare-windows * lisp/vc/compare-w.el: Require diff-mode for diff faces. (compare-windows-removed, compare-windows-added): New faces inheriting from diff faces. (compare-windows): Define obsolete face alias. (compare-windows-highlight): Replace face `compare-windows' with new faces `compare-windows-added' and `compare-windows-removed'. (compare-windows-get-recent-window): Signal an error when no other window is found. Fixes: debbugs:19451 diff --git a/etc/NEWS b/etc/NEWS index 14933aa..4d63278 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -401,10 +401,13 @@ and comments. the color range from `vc-annotate-color-map' is applied to the background or to the foreground. -*** compare-windows now compares text with the most recently used window +*** `compare-windows' now compares text with the most recently used window instead of the next window. The new option `compare-windows-get-window-function' allows to customize this. +*** Two new faces `compare-windows-removed' and `compare-windows-added' +replace the obsolete face `compare-windows'. + ** Calculator: decimal display mode uses "," groups, so it's more fitting for use in money calculations; factorial works with non-integer inputs. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57103be..bfe2dfb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2014-12-28 Juri Linkov + + * vc/compare-w.el: Require diff-mode for diff faces. + (compare-windows-removed, compare-windows-added): New faces + inheriting from diff faces. + (compare-windows): Define obsolete face alias. + (compare-windows-highlight): Replace face `compare-windows' with + new faces `compare-windows-added' and `compare-windows-removed' + (bug#19451). + (compare-windows-get-recent-window): Signal an error when + no other window is found (bug#19170). + 2014-12-27 Dmitry Gutov * progmodes/elisp-mode.el (elisp--xref-identifier-file): diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 3b8293c..454139e 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -30,6 +30,8 @@ ;;; Code: +(require 'diff-mode) ; For diff faces. + (defgroup compare-windows nil "Compare text between windows." :prefix "compare-" @@ -128,11 +130,19 @@ out all highlighting later with the command `compare-windows-dehighlight'." :group 'compare-windows :version "22.1") -(defface compare-windows - '((t :inherit lazy-highlight)) - "Face for highlighting of compare-windows difference regions." +(defface compare-windows-removed + '((t :inherit diff-removed)) + "Face for highlighting of compare-windows removed regions." :group 'compare-windows - :version "22.1") + :version "25.1") + +(defface compare-windows-added + '((t :inherit diff-added)) + "Face for highlighting of compare-windows added regions." + :group 'compare-windows + :version "25.1") + +(define-obsolete-face-alias 'compare-windows 'compare-windows-added "25.1") (defvar compare-windows-overlay1 nil) (defvar compare-windows-overlay2 nil) @@ -158,7 +168,8 @@ then try to get a window on an iconified frame, and finally consider all existing frames." (or (get-mru-window 'visible t t) (get-mru-window 0 t t) - (get-mru-window t t t))) + (get-mru-window t t t) + (error "No other window"))) (defun compare-windows-get-next-window () "Return the window next in the cyclic ordering of windows. @@ -393,13 +404,13 @@ on third call it again advances points to the next difference and so on." (if compare-windows-overlay1 (move-overlay compare-windows-overlay1 beg1 end1 b1) (setq compare-windows-overlay1 (make-overlay beg1 end1 b1)) - (overlay-put compare-windows-overlay1 'face 'compare-windows) + (overlay-put compare-windows-overlay1 'face 'compare-windows-added) (overlay-put compare-windows-overlay1 'priority 1000)) (overlay-put compare-windows-overlay1 'window w1) (if compare-windows-overlay2 (move-overlay compare-windows-overlay2 beg2 end2 b2) (setq compare-windows-overlay2 (make-overlay beg2 end2 b2)) - (overlay-put compare-windows-overlay2 'face 'compare-windows) + (overlay-put compare-windows-overlay2 'face 'compare-windows-removed) (overlay-put compare-windows-overlay2 'priority 1000)) (overlay-put compare-windows-overlay2 'window w2) (if (not (eq compare-windows-highlight 'persistent)) commit 2cb7592275bce47e44916134223b994a75e4b861 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 20:58:45 2014 -0300 python.el: Native readline completion. This commit adds native readline completion that fallbacks to the old mechanism when it cannot be used for the current interpreter. * lisp/progmodes/python.el (python-shell-completion-native-disabled-interpreters) (python-shell-completion-native-enable) (python-shell-completion-native-output-timeout): New defcustoms. (python-shell-completion-native-interpreter-disabled-p) (python-shell-completion-native-try) (python-shell-completion-native-setup) (python-shell-completion-native-turn-off) (python-shell-completion-native-turn-on) (python-shell-completion-native-turn-on-maybe) (python-shell-completion-native-turn-on-maybe-with-msg) (python-shell-completion-native-toggle): New functions. (python-shell-completion-native-get-completions): New function. (python-shell-completion-at-point): Use it. * test/automated/python-tests.el (python-shell-completion-native-interpreter-disabled-p-1): New test. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7678116..57103be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,24 @@ 2014-12-27 Fabián Ezequiel Gallina + python.el: Native readline completion. + + * progmodes/python.el (python-shell-completion-native-disabled-interpreters) + (python-shell-completion-native-enable) + (python-shell-completion-native-output-timeout): New defcustoms. + (python-shell-completion-native-interpreter-disabled-p) + (python-shell-completion-native-try) + (python-shell-completion-native-setup) + (python-shell-completion-native-turn-off) + (python-shell-completion-native-turn-on) + (python-shell-completion-native-turn-on-maybe) + (python-shell-completion-native-turn-on-maybe-with-msg) + (python-shell-completion-native-toggle): New functions. + (python-shell-completion-native-get-completions): New function. + (python-shell-completion-at-point): Use it. + +2014-12-27 Fabián Ezequiel Gallina + python.el: Enhance shell user interaction and deprecate python-shell-get-or-create-process. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 8a85763..c46c5d6 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -69,7 +69,7 @@ ;; Besides that only the standard CPython (2.x and 3.x) shell and ;; IPython are officially supported out of the box, the interaction ;; should support any other readline based Python shells as well -;; (e.g. Jython and Pypy have been reported to work). You can change +;; (e.g. Jython and PyPy have been reported to work). You can change ;; your default interpreter and commandline arguments by setting the ;; `python-shell-interpreter' and `python-shell-interpreter-args' ;; variables. This example enables IPython globally: @@ -119,18 +119,24 @@ ;; modify its behavior. ;; Shell completion: hitting tab will try to complete the current -;; word. Shell completion is implemented in such way that if you -;; change the `python-shell-interpreter' it should be possible to -;; integrate custom logic to calculate completions. To achieve this -;; you just need to set `python-shell-completion-setup-code' and -;; `python-shell-completion-string-code'. The default provided code, -;; enables autocompletion for both CPython and IPython (and ideally -;; any readline based Python shell). This code depends on the -;; readline module, so if you are using some Operating System that -;; bundles Python without it (like Windows), installing pyreadline -;; from URL `http://ipython.scipy.org/moin/PyReadline/Intro' should -;; suffice. To troubleshoot why you are not getting any completions -;; you can try the following in your Python shell: +;; word. The two built-in mechanisms depend on Python's readline +;; module: the "native" completion is tried first and is activated +;; when `python-shell-completion-native-enable' is non-nil, the +;; current `python-shell-interpreter' is not a member of the +;; `python-shell-completion-native-disabled-interpreters' variable and +;; `python-shell-completion-native-setup' succeeds; the "fallback" or +;; "legacy" mechanism works by executing Python code in the background +;; and enables auto-completion for shells that do not support +;; receiving escape sequences (with some limitations, i.e. completion +;; in blocks does not work). The code executed for the "fallback" +;; completion can be found in `python-shell-completion-setup-code' and +;; `python-shell-completion-string-code' variables. Their default +;; values enable completion for both CPython and IPython, and probably +;; any readline based shell (it's known to work with PyPy). If your +;; Python installation lacks readline (like CPython for Windows), +;; installing pyreadline (URL `http://ipython.org/pyreadline.html') +;; should suffice. To troubleshoot why you are not getting any +;; completions, you can try the following in your Python shell: ;; >>> import readline, rlcompleter @@ -256,6 +262,7 @@ (defvar outline-heading-end-regexp) (autoload 'comint-mode "comint") +(autoload 'help-function-arglist "help-fns") ;;;###autoload (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) @@ -2997,6 +3004,194 @@ the full statement in the case of imports." "25.1" "Completion string code must work for (i)pdb.") +(defcustom python-shell-completion-native-disabled-interpreters + ;; PyPy's readline cannot handle some escape sequences yet. + (list "pypy") + "List of disabled interpreters. +When a match is found, native completion is disabled." + :type '(repeat string)) + +(defcustom python-shell-completion-native-enable t + "Enable readline based native completion." + :type 'boolean) + +(defcustom python-shell-completion-native-output-timeout 0.01 + "Time in seconds to wait for completion output before giving up." + :type 'float) + +(defvar python-shell-completion-native-redirect-buffer + " *Python completions redirect*" + "Buffer to be used to redirect output of readline commands.") + +(defun python-shell-completion-native-interpreter-disabled-p () + "Return non-nil if interpreter has native completion disabled." + (when python-shell-completion-native-disabled-interpreters + (string-match + (regexp-opt python-shell-completion-native-disabled-interpreters) + (file-name-nondirectory python-shell-interpreter)))) + +(defun python-shell-completion-native-try () + "Return non-nil if can trigger native completion." + (let ((python-shell-completion-native-enable t)) + (python-shell-completion-native-get-completions + (get-buffer-process (current-buffer)) + nil "int"))) + +(defun python-shell-completion-native-setup () + "Try to setup native completion, return non-nil on success." + (let ((process (python-shell-get-process))) + (python-shell-send-string + (funcall + 'mapconcat + #'identity + (list + "try:" + " import readline, rlcompleter" + ;; Remove parens on callables as it breaks completion on + ;; arguments (e.g. str(Ari)). + " class Completer(rlcompleter.Completer):" + " def _callable_postfix(self, val, word):" + " return word" + " readline.set_completer(Completer().complete)" + " if readline.__doc__ and 'libedit' in readline.__doc__:" + " readline.parse_and_bind('bind ^I rl_complete')" + " else:" + " readline.parse_and_bind('tab: complete')" + " print ('python.el: readline is available')" + "except:" + " print ('python.el: readline not available')") + "\n") + process) + (python-shell-accept-process-output process) + (when (save-excursion + (re-search-backward + (regexp-quote "python.el: readline is available") nil t 1)) + (python-shell-completion-native-try)))) + +(defun python-shell-completion-native-turn-off (&optional msg) + "Turn off shell native completions. +With argument MSG show deactivation message." + (interactive "p") + (python-shell-with-shell-buffer + (set (make-local-variable 'python-shell-completion-native-enable) nil) + (when msg + (message "Shell native completion is disabled, using fallback")))) + +(defun python-shell-completion-native-turn-on (&optional msg) + "Turn on shell native completions. +With argument MSG show deactivation message." + (interactive "p") + (python-shell-with-shell-buffer + (set (make-local-variable 'python-shell-completion-native-enable) t) + (python-shell-completion-native-turn-on-maybe msg))) + +(defun python-shell-completion-native-turn-on-maybe (&optional msg) + "Turn on native completions if enabled and available. +With argument MSG show activation/deactivation message." + (interactive "p") + (python-shell-with-shell-buffer + (when python-shell-completion-native-enable + (cond + ((python-shell-completion-native-interpreter-disabled-p) + (python-shell-completion-native-turn-off msg)) + ((python-shell-completion-native-setup) + (when msg + (message "Shell native completion is enabled."))) + (t (lwarn + '(python python-shell-completion-native-turn-on-maybe) + :warning + (concat + "Your `python-shell-interpreter' doesn't seem to " + "support readline, yet `python-shell-completion-native' " + (format "was `t' and %S is not part of the " + (file-name-nondirectory python-shell-interpreter)) + "`python-shell-completion-native-disabled-interpreters' " + "list. Native completions have been disabled locally. ")) + (python-shell-completion-native-turn-off msg)))))) + +(defun python-shell-completion-native-turn-on-maybe-with-msg () + "Like `python-shell-completion-native-turn-on-maybe' but force messages." + (python-shell-completion-native-turn-on-maybe t)) + +(add-hook 'inferior-python-mode-hook + #'python-shell-completion-native-turn-on-maybe-with-msg) + +(defun python-shell-completion-native-toggle (&optional msg) + "Toggle shell native completion. +With argument MSG show activation/deactivation message." + (interactive "p") + (python-shell-with-shell-buffer + (if python-shell-completion-native-enable + (python-shell-completion-native-turn-off msg) + (python-shell-completion-native-turn-on msg)) + python-shell-completion-native-enable)) + +(defun python-shell-completion-native-get-completions (process import input) + "Get completions using native readline for PROCESS. +When IMPORT is non-nil takes precedence over INPUT for +completion." + (when (and python-shell-completion-native-enable + (python-util-comint-last-prompt) + (>= (point) (cdr (python-util-comint-last-prompt)))) + (let* ((input (or import input)) + (original-filter-fn (process-filter process)) + (redirect-buffer (get-buffer-create + python-shell-completion-native-redirect-buffer)) + (separators (python-rx + (or whitespace open-paren close-paren))) + (trigger "\t\t\t") + (new-input (concat input trigger)) + (input-length + (save-excursion + (+ (- (point-max) (comint-bol)) (length new-input)))) + (delete-line-command (make-string input-length ?\b)) + (input-to-send (concat new-input delete-line-command))) + ;; Ensure restoring the process filter, even if the user quits + ;; or there's some other error. + (unwind-protect + (with-current-buffer redirect-buffer + ;; Cleanup the redirect buffer + (delete-region (point-min) (point-max)) + ;; Mimic `comint-redirect-send-command', unfortunately it + ;; can't be used here because it expects a newline in the + ;; command and that's exactly what we are trying to avoid. + (let ((comint-redirect-echo-input nil) + (comint-redirect-verbose nil) + (comint-redirect-perform-sanity-check nil) + (comint-redirect-insert-matching-regexp nil) + ;; Feed it some regex that will never match. + (comint-redirect-finished-regexp "^\\'$") + (comint-redirect-output-buffer redirect-buffer)) + ;; Compatibility with Emacs 24.x. Comint changed and + ;; now `comint-redirect-filter' gets 3 args. This + ;; checks which version of `comint-redirect-filter' is + ;; in use based on its args and uses `apply-partially' + ;; to make it up for the 3 args case. + (if (= (length + (help-function-arglist 'comint-redirect-filter)) 3) + (set-process-filter + process (apply-partially + #'comint-redirect-filter original-filter-fn)) + (set-process-filter process #'comint-redirect-filter)) + (process-send-string process input-to-send) + (accept-process-output + process + python-shell-completion-native-output-timeout) + ;; XXX: can't use `python-shell-accept-process-output' + ;; here because there are no guarantees on how output + ;; ends. The workaround here is to call + ;; `accept-process-output' until we don't find anything + ;; else to accept. + (while (accept-process-output + process + python-shell-completion-native-output-timeout)) + (cl-remove-duplicates + (split-string + (buffer-substring-no-properties + (point-min) (point-max)) + separators t)))) + (set-process-filter process original-filter-fn))))) + (defun python-shell-completion-get-completions (process import input) "Do completion at point using PROCESS for IMPORT or INPUT. When IMPORT is non-nil takes precedence over INPUT for @@ -3054,11 +3249,15 @@ using that one instead of current buffer's process." last-prompt-end (forward-char (length (match-string-no-properties 0))) (point)))) - (end (point))) + (end (point)) + (completion-fn + (if python-shell-completion-native-enable + #'python-shell-completion-native-get-completions + #'python-shell-completion-get-completions))) (list start end (completion-table-dynamic (apply-partially - #'python-shell-completion-get-completions + completion-fn process import-statement))))) (define-obsolete-function-alias diff --git a/test/ChangeLog b/test/ChangeLog index 79354f2..2ea3254 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -4,6 +4,12 @@ 2014-12-27 Fabián Ezequiel Gallina + * automated/python-tests.el + (python-shell-completion-native-interpreter-disabled-p-1): New + test. + +2014-12-27 Fabián Ezequiel Gallina + * automated/python-tests.el (python-shell-get-or-create-process-1) (python-shell-get-or-create-process-2) (python-shell-get-or-create-process-3): Remove tests. diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 90fa79e..ca43c45 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -2584,6 +2584,13 @@ class Foo(models.Model): ;;; Shell completion +(ert-deftest python-shell-completion-native-interpreter-disabled-p-1 () + (let* ((python-shell-completion-native-disabled-interpreters (list "pypy")) + (python-shell-interpreter "/some/path/to/bin/pypy")) + (should (python-shell-completion-native-interpreter-disabled-p)))) + + + ;;; PDB Track integration commit 968d096203fd900c8497ed455cd2682f9875448f Author: Dmitry Gutov Date: Sun Dec 28 01:54:43 2014 +0200 (elisp--xref-identifier-file): Skip features that have no sources * lisp/progmodes/elisp-mode.el (elisp--xref-identifier-file): Skip features that have no sources. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c5a9c4..7678116 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-12-27 Dmitry Gutov + * progmodes/elisp-mode.el (elisp--xref-identifier-file): + Skip features that have no sources. + * simple.el (execute-extended-command): When `suggest-key-bindings' is nil, don't. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 347560a..ac216d9 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -578,7 +578,8 @@ It can be quoted, or be inside a quoted form." (or (symbol-file sym 'defvar) (help-C-file-name sym 'var)))) (`feature (when (featurep sym) - (find-library-name (symbol-name sym)))) + (ignore-errors + (find-library-name (symbol-name sym))))) (`defface (when (facep sym) (symbol-file sym 'defface))))) commit ee01a8c05b646c6adcce6c5d6c7ab1ce5494ed99 Author: Glenn Morris Date: Sat Dec 27 15:33:08 2014 -0800 * test/automated/let-alist.el: Load dependency. diff --git a/test/ChangeLog b/test/ChangeLog index b786165..79354f2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2014-12-27 Glenn Morris + + * automated/let-alist.el: Load dependency. + 2014-12-27 Fabián Ezequiel Gallina * automated/python-tests.el (python-shell-get-or-create-process-1) diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el index 6f58908..a45864e 100644 --- a/test/automated/let-alist.el +++ b/test/automated/let-alist.el @@ -21,6 +21,7 @@ (require 'ert) (require 'cl-lib) +(require 'let-alist) (ert-deftest let-alist-surface-test () "Tests basic macro expansion for `let-alist'." commit 43f6eca04631515fe23cd311483cb4e13d65032d Author: Dmitry Gutov Date: Sun Dec 28 01:24:17 2014 +0200 Handle nil value of suggest-key-bindings * lisp/simple.el (execute-extended-command): When `suggest-key-bindings' is nil, don't. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b01988a..2c5a9c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-27 Dmitry Gutov + + * simple.el (execute-extended-command): + When `suggest-key-bindings' is nil, don't. + 2014-12-27 Fabián Ezequiel Gallina python.el: Enhance shell user interaction and deprecate diff --git a/lisp/simple.el b/lisp/simple.el index 0fcd5db..b436dd7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1667,7 +1667,6 @@ invoking, give a prefix argument to `execute-extended-command'." (let ((prefix-arg prefixarg)) (command-execute function 'record)) ;; If enabled, show which key runs this command. - ;; (when binding ;; But first wait, and skip the message if there is input. (let* ((waited ;; If this command displayed something in the echo area; @@ -1675,10 +1674,11 @@ invoking, give a prefix argument to `execute-extended-command'." ;; FIXME: Wait *after* running post-command-hook! ;; FIXME: Don't wait if execute-extended-command--shorter won't ;; find a better answer anyway! - (sit-for (cond - ((zerop (length (current-message))) 0) - ((numberp suggest-key-bindings) suggest-key-bindings) - (t 2))))) + (when suggest-key-bindings + (sit-for (cond + ((zerop (length (current-message))) 0) + ((numberp suggest-key-bindings) suggest-key-bindings) + (t 2)))))) (when (and waited (not (consp unread-command-events))) (unless (or binding executing-kbd-macro (not (symbolp function)) (<= (length (symbol-name function)) 2)) commit 7d1e62d51b51be27b11a67d7828b77f2df9e1eb1 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 20:12:00 2014 -0300 python.el: Enhance shell user interaction and deprecate python-shell-get-or-create-process. * lisp/progmodes/python.el (python-shell-get-process-or-error): New function. (python-shell-with-shell-buffer): Use it. (python-shell-send-string, python-shell-send-region) (python-shell-send-buffer, python-shell-send-defun) (python-shell-send-file, python-shell-switch-to-shell): Use it. Add argument MSG to display user-friendly message when no process is running. (python-shell-switch-to-shell): Call pop-to-buffer with NORECORD. (python-shell-make-comint): Rename argument SHOW from POP. Use display-buffer instead of pop-to-buffer. (run-python): Doc fix. Return process. (python-shell-get-or-create-process): Make obsolete. * test/automated/python-tests.el (python-shell-get-or-create-process-1) (python-shell-get-or-create-process-2) (python-shell-get-or-create-process-3): Remove tests. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 151d9ac..b01988a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,24 @@ 2014-12-27 Fabián Ezequiel Gallina + python.el: Enhance shell user interaction and deprecate + python-shell-get-or-create-process. + + * progmodes/python.el + (python-shell-get-process-or-error): New function. + (python-shell-with-shell-buffer): Use it. + (python-shell-send-string, python-shell-send-region) + (python-shell-send-buffer, python-shell-send-defun) + (python-shell-send-file, python-shell-switch-to-shell): Use it. + Add argument MSG to display user-friendly message when no process + is running. + (python-shell-switch-to-shell): Call pop-to-buffer with NORECORD. + (python-shell-make-comint): Rename argument SHOW from POP. Use + display-buffer instead of pop-to-buffer. + (run-python): Doc fix. Return process. + (python-shell-get-or-create-process): Make obsolete. + +2014-12-27 Fabián Ezequiel Gallina + * progmodes/python.el (python-shell-buffer-substring): Handle cornercase when region sent starts at point-min. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0b7d916..8a85763 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2255,11 +2255,9 @@ Avoids `recenter' calls until OUTPUT is completely sent." "Execute the forms in BODY with the shell buffer temporarily current. Signals an error if no shell buffer is available for current buffer." (declare (indent 0) (debug t)) - (let ((shell-buffer (make-symbol "shell-buffer"))) - `(let ((,shell-buffer (python-shell-get-buffer))) - (when (not ,shell-buffer) - (error "No inferior Python buffer available.")) - (with-current-buffer ,shell-buffer + (let ((shell-process (make-symbol "shell-process"))) + `(let ((,shell-process (python-shell-get-process-or-error))) + (with-current-buffer (process-buffer ,shell-process) ,@body)))) (defvar python-shell--font-lock-buffer nil) @@ -2471,12 +2469,12 @@ variable. (python-shell-accept-process-output (get-buffer-process (current-buffer)))) -(defun python-shell-make-comint (cmd proc-name &optional pop internal) +(defun python-shell-make-comint (cmd proc-name &optional show internal) "Create a Python shell comint buffer. CMD is the Python command to be executed and PROC-NAME is the process name the comint buffer will get. After the comint buffer is created the `inferior-python-mode' is activated. When -optional argument POP is non-nil the buffer is shown. When +optional argument SHOW is non-nil the buffer is shown. When optional argument INTERNAL is non-nil this process is run on a buffer with a name that starts with a space, following the Emacs convention for temporary/internal buffers, and also makes sure @@ -2505,16 +2503,13 @@ killed." (mapconcat #'identity args " "))) (with-current-buffer buffer (inferior-python-mode)) - (and pop (pop-to-buffer buffer t)) + (when show (display-buffer buffer)) (and internal (set-process-query-on-exit-flag process nil)))) proc-buffer-name))) ;;;###autoload (defun run-python (&optional cmd dedicated show) "Run an inferior Python process. -Input and output via buffer named after -`python-shell-buffer-name'. If there is a process already -running in that buffer, just switch to it. Argument CMD defaults to `python-shell-calculate-command' return value. When called interactively with `prefix-arg', it allows @@ -2522,6 +2517,11 @@ the user to edit such value and choose whether the interpreter should be DEDICATED for the current buffer. When numeric prefix arg is other than 0 or 4 do not SHOW. +For a given buffer and same values of DEDICATED, if a process is +already running for it, it will do nothing. This means that if +the current buffer is using a global process, the user is still +able to switch it to use a dedicated one. + Runs the hook `inferior-python-mode-hook' after `comint-mode-hook' is run. (Type \\[describe-mode] in the process buffer for a list of commands.)" @@ -2532,10 +2532,10 @@ process buffer for a list of commands.)" (y-or-n-p "Make dedicated process? ") (= (prefix-numeric-value current-prefix-arg) 4)) (list (python-shell-calculate-command) nil t))) - (python-shell-make-comint - (or cmd (python-shell-calculate-command)) - (python-shell-get-process-name dedicated) show) - dedicated) + (get-buffer-process + (python-shell-make-comint + (or cmd (python-shell-calculate-command)) + (python-shell-get-process-name dedicated) show))) (defun run-python-internal () "Run an inferior Internal Python process. @@ -2578,6 +2578,21 @@ If current buffer is in `inferior-python-mode', return it." "Return inferior Python process for current buffer." (get-buffer-process (python-shell-get-buffer))) +(defun python-shell-get-process-or-error (&optional interactivep) + "Return inferior Python process for current buffer or signal error. +When argument INTERACTIVEP is non-nil, use `user-error' instead +of `error' with a user-friendly message." + (or (python-shell-get-process) + (if interactivep + (user-error + "Start a Python process first with `M-x run-python' or `%s'." + ;; Get the binding. + (key-description + (where-is-internal + #'run-python overriding-local-map t))) + (error + "No inferior Python process running.")))) + (defun python-shell-get-or-create-process (&optional cmd dedicated show) "Get or create an inferior Python process for current buffer and return it. Arguments CMD, DEDICATED and SHOW are those of `run-python' and @@ -2593,6 +2608,11 @@ be asked for their values." (run-python cmd dedicated show))) (or shell-process (python-shell-get-process)))) +(make-obsolete + #'python-shell-get-or-create-process + "Instead call `python-shell-get-process' and create one if returns nil." + "25.1") + (defvar python-shell-internal-buffer nil "Current internal shell buffer for the current buffer. This is really not necessary at all for the code to work but it's @@ -2631,10 +2651,14 @@ there for compatibility with CEDET.") (delete-trailing-whitespace)) temp-file-name)) -(defun python-shell-send-string (string &optional process) - "Send STRING to inferior Python PROCESS." - (interactive "sPython command: ") - (let ((process (or process (python-shell-get-or-create-process)))) +(defun python-shell-send-string (string &optional process msg) + "Send STRING to inferior Python PROCESS. +When optional argument MSG is non-nil, forces display of a +user-friendly message if there's no process running; defaults to +t when called interactively." + (interactive + (list (read-string "Python command: ") nil t)) + (let ((process (or process (python-shell-get-process-or-error msg)))) (if (string-match ".\n+." string) ;Multiline. (let* ((temp-file-name (python-shell--save-temp-file string)) (file-name (or (buffer-file-name) temp-file-name))) @@ -2677,7 +2701,7 @@ detecting a prompt at the end of the buffer." (defun python-shell-send-string-no-output (string &optional process) "Send STRING to PROCESS and inhibit output. Return the output." - (let ((process (or process (python-shell-get-or-create-process))) + (let ((process (or process (python-shell-get-process-or-error))) (comint-preoutput-filter-functions '(python-shell-output-filter)) (python-shell-output-filter-in-progress t) @@ -2781,35 +2805,43 @@ the python shell: (line-beginning-position) (line-end-position)))) (buffer-substring-no-properties (point-min) (point-max))))) -(defun python-shell-send-region (start end &optional send-main) +(defun python-shell-send-region (start end &optional send-main msg) "Send the region delimited by START and END to inferior Python process. When optional argument SEND-MAIN is non-nil, allow execution of code inside blocks delimited by \"if __name__== '__main__':\". When called interactively SEND-MAIN defaults to nil, unless it's -called with prefix argument." - (interactive "r\nP") +called with prefix argument. When optional argument MSG is +non-nil, forces display of a user-friendly message if there's no +process running; defaults to t when called interactively." + (interactive + (list (region-beginning) (region-end) current-prefix-arg t)) (let* ((string (python-shell-buffer-substring start end (not send-main))) - (process (python-shell-get-or-create-process)) + (process (python-shell-get-process-or-error msg)) (original-string (buffer-substring-no-properties start end)) (_ (string-match "\\`\n*\\(.*\\)" original-string))) (message "Sent: %s..." (match-string 1 original-string)) (python-shell-send-string string process))) -(defun python-shell-send-buffer (&optional send-main) +(defun python-shell-send-buffer (&optional send-main msg) "Send the entire buffer to inferior Python process. When optional argument SEND-MAIN is non-nil, allow execution of code inside blocks delimited by \"if __name__== '__main__':\". When called interactively SEND-MAIN defaults to nil, unless it's -called with prefix argument." - (interactive "P") +called with prefix argument. When optional argument MSG is +non-nil, forces display of a user-friendly message if there's no +process running; defaults to t when called interactively." + (interactive (list current-prefix-arg t)) (save-restriction (widen) - (python-shell-send-region (point-min) (point-max) send-main))) + (python-shell-send-region (point-min) (point-max) send-main msg))) -(defun python-shell-send-defun (arg) +(defun python-shell-send-defun (&optional arg msg) "Send the current defun to inferior Python process. -When argument ARG is non-nil do not include decorators." - (interactive "P") +When argument ARG is non-nil do not include decorators. When +optional argument MSG is non-nil, forces display of a +user-friendly message if there's no process running; defaults to +t when called interactively." + (interactive (list current-prefix-arg t)) (save-excursion (python-shell-send-region (progn @@ -2825,17 +2857,28 @@ When argument ARG is non-nil do not include decorators." (progn (or (python-nav-end-of-defun) (end-of-line 1)) - (point-marker))))) + (point-marker)) + nil ;; noop + msg))) (defun python-shell-send-file (file-name &optional process temp-file-name - delete) + delete msg) "Send FILE-NAME to inferior Python PROCESS. If TEMP-FILE-NAME is passed then that file is used for processing instead, while internally the shell will continue to use FILE-NAME. If TEMP-FILE-NAME and DELETE are non-nil, then -TEMP-FILE-NAME is deleted after evaluation is performed." - (interactive "fFile to send: ") - (let* ((process (or process (python-shell-get-or-create-process))) +TEMP-FILE-NAME is deleted after evaluation is performed. When +optional argument MSG is non-nil, forces display of a +user-friendly message if there's no process running; defaults to +t when called interactively." + (interactive + (list + (read-file-name "File to send: ") ; file-name + nil ; process + nil ; temp-file-name + nil ; delete + t)) ; msg + (let* ((process (or process (python-shell-get-process-or-error msg))) (encoding (with-temp-buffer (insert-file-contents (or temp-file-name file-name)) @@ -2860,10 +2903,14 @@ TEMP-FILE-NAME is deleted after evaluation is performed." (or temp-file-name file-name) encoding encoding file-name) process))) -(defun python-shell-switch-to-shell () - "Switch to inferior Python process buffer." - (interactive) - (pop-to-buffer (process-buffer (python-shell-get-or-create-process)) t)) +(defun python-shell-switch-to-shell (&optional msg) + "Switch to inferior Python process buffer. +When optional argument MSG is non-nil, forces display of a +user-friendly message if there's no process running; defaults to +t when called interactively." + (interactive "p") + (pop-to-buffer + (process-buffer (python-shell-get-process-or-error msg)) nil t)) (defun python-shell-send-setup-code () "Send all setup code for shell. diff --git a/test/ChangeLog b/test/ChangeLog index d541910..b786165 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,11 @@ 2014-12-27 Fabián Ezequiel Gallina + * automated/python-tests.el (python-shell-get-or-create-process-1) + (python-shell-get-or-create-process-2) + (python-shell-get-or-create-process-3): Remove tests. + +2014-12-27 Fabián Ezequiel Gallina + (python-shell-buffer-substring-9): New test. 2014-12-27 Fabián Ezequiel Gallina diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index a6ed680..90fa79e 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -2083,84 +2083,6 @@ and `python-shell-interpreter-args' in the new shell buffer." (ignore-errors (kill-buffer global-shell-buffer)) (ignore-errors (kill-buffer dedicated-shell-buffer)))))) -(ert-deftest python-shell-get-or-create-process-1 () - "Check shell dedicated process creation." - (skip-unless (executable-find python-tests-shell-interpreter)) - (python-tests-with-temp-file - "" - (let* ((cmd - (concat (executable-find python-tests-shell-interpreter) " -i")) - (use-dialog-box) - (dedicated-process-name (python-shell-get-process-name t)) - (dedicated-process (python-shell-get-or-create-process cmd t)) - (dedicated-shell-buffer (process-buffer dedicated-process))) - (unwind-protect - (progn - (set-process-query-on-exit-flag dedicated-process nil) - ;; should be dedicated. - (should (equal (process-name dedicated-process) - dedicated-process-name)) - (kill-buffer dedicated-shell-buffer) - ;; Check there are no processes for current buffer. - (should (not (python-shell-get-process)))) - (ignore-errors (kill-buffer dedicated-shell-buffer)))))) - -(ert-deftest python-shell-get-or-create-process-2 () - "Check shell global process creation." - (skip-unless (executable-find python-tests-shell-interpreter)) - (python-tests-with-temp-file - "" - (let* ((cmd - (concat (executable-find python-tests-shell-interpreter) " -i")) - (use-dialog-box) - (process-name (python-shell-get-process-name nil)) - (process (python-shell-get-or-create-process cmd)) - (shell-buffer (process-buffer process))) - (unwind-protect - (progn - (set-process-query-on-exit-flag process nil) - ;; should be global. - (should (equal (process-name process) process-name)) - (kill-buffer shell-buffer) - ;; Check there are no processes for current buffer. - (should (not (python-shell-get-process)))) - (ignore-errors (kill-buffer shell-buffer)))))) - -(ert-deftest python-shell-get-or-create-process-3 () - "Check shell dedicated/global process preference." - (skip-unless (executable-find python-tests-shell-interpreter)) - (python-tests-with-temp-file - "" - (let* ((cmd - (concat (executable-find python-tests-shell-interpreter) " -i")) - (python-shell-interpreter python-tests-shell-interpreter) - (use-dialog-box) - (dedicated-process-name (python-shell-get-process-name t)) - (global-process) - (dedicated-process)) - (progn - ;; Create global process - (run-python cmd nil) - (setq global-process (get-buffer-process "*Python*")) - (should global-process) - (set-process-query-on-exit-flag global-process nil) - ;; Create dedicated process - (run-python cmd t) - (setq dedicated-process (get-process dedicated-process-name)) - (should dedicated-process) - (set-process-query-on-exit-flag dedicated-process nil) - ;; Prefer dedicated. - (should (equal (python-shell-get-or-create-process) - dedicated-process)) - ;; Kill the dedicated so the global takes over. - (kill-buffer (process-buffer dedicated-process)) - ;; Detect global. - (should (equal (python-shell-get-or-create-process) global-process)) - ;; Kill the global. - (kill-buffer (process-buffer global-process)) - ;; Check there are no processes for current buffer. - (should (not (python-shell-get-process))))))) - (ert-deftest python-shell-internal-get-or-create-process-1 () "Check internal shell process creation fallback." (skip-unless (executable-find python-tests-shell-interpreter)) commit 996ad1b846a0865245df008bdb551093278b3c30 Merge: 3d1afd1 433af0a Author: Fabián Ezequiel Gallina Date: Sat Dec 27 20:09:32 2014 -0300 Merge from origin/emacs-24 433af0a * lisp/progmodes/python.el (python-shell-buffer-substring): Handle cornercase when region sent starts at point-min. commit 433af0a06089885f5a57ef0f3e7d6283e8d51bd5 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 17:22:29 2014 -0300 * lisp/progmodes/python.el (python-shell-buffer-substring): Handle cornercase when region sent starts at point-min. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf866fa..4b8f8f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-27 Fabián Ezequiel Gallina + + * progmodes/python.el (python-shell-buffer-substring): Handle + cornercase when region sent starts at point-min. + 2014-12-27 Eli Zaretskii * language/misc-lang.el (composition-function-table): Add Syriac diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4a4e320..0d80110 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2523,17 +2523,16 @@ the python shell: 4. Wraps indented regions under an \"if True:\" block so the interpreter evaluates them correctly." (let* ((substring (buffer-substring-no-properties start end)) - (buffer-substring-p (save-restriction - (widen) - (not (equal (list (point-min) (point-max)) - (list start end))))) + (starts-at-point-min-p (save-restriction + (widen) + (= (point-min) start))) (encoding (python-info-encoding)) - (fillstr (concat - (when buffer-substring-p - (format "# -*- coding: %s -*-\n" encoding)) - (make-string - (- (line-number-at-pos start) - (if buffer-substring-p 2 1)) ?\n))) + (fillstr (when (not starts-at-point-min-p) + (concat + (format "# -*- coding: %s -*-\n" encoding) + (make-string + ;; Substract 2 because of the coding cookie. + (- (line-number-at-pos start) 2) ?\n)))) (toplevel-block-p (save-excursion (goto-char start) (or (zerop (line-number-at-pos start)) diff --git a/test/ChangeLog b/test/ChangeLog index 101e9d9..74d4677 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,9 @@ 2014-12-27 Fabián Ezequiel Gallina + (python-shell-buffer-substring-9): New test. + +2014-12-27 Fabián Ezequiel Gallina + * automated/python-tests.el (python-shell-buffer-substring-1) (python-shell-buffer-substring-2, python-shell-buffer-substring-3) (python-shell-buffer-substring-4, python-shell-buffer-substring-5) diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 8fcda58..a494857 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -2651,6 +2651,27 @@ class Foo(models.Model): pass ")))) +(ert-deftest python-shell-buffer-substring-9 () + "Check substring starting from `point-min'." + (python-tests-with-temp-buffer + "# coding: utf-8 + +class Foo(models.Model): + pass + +class Bar(models.Model): + pass +" + (should (string= (python-shell-buffer-substring + (point-min) + (python-tests-look-at "class Bar(models.Model):")) + "# coding: utf-8 + +class Foo(models.Model): + pass + +")))) + ;;; Shell completion commit 3d1afd119e3cdb96178dd838ef833414b894d8d8 Author: Paul Eggert Date: Sat Dec 27 12:00:29 2014 -0800 Fix parse_settings to match internal documentation * xsettings.c (parse_settings): Return the number of settings seen. Count the settings changes accurately. (read_settings): Don't confuse number of settings changes with the return code from XGetWindowProperty. diff --git a/src/ChangeLog b/src/ChangeLog index c32b120..d78e7a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2014-12-27 Paul Eggert + + Fix parse_settings to match internal documentation + * xsettings.c (parse_settings): Return the number of settings seen. + Count the settings changes accurately. + (read_settings): Don't confuse number of settings changes with + the return code from XGetWindowProperty. + 2014-12-27 Eli Zaretskii * xdisp.c (set_iterator_to_next) : Limit search in diff --git a/src/xsettings.c b/src/xsettings.c index afdeab9..066f426 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -404,7 +404,7 @@ parse_settings (unsigned char *prop, /* First 4 bytes is a serial number, skip that. */ - if (bytes < 12) return BadLength; + if (bytes < 12) return settings_seen; memcpy (&n_settings, prop+8, 4); if (my_bo != that_bo) n_settings = bswap_32 (n_settings); bytes_parsed = 12; @@ -429,8 +429,8 @@ parse_settings (unsigned char *prop, memcpy (&nlen, prop+bytes_parsed, 2); bytes_parsed += 2; if (my_bo != that_bo) nlen = bswap_16 (nlen); - if (bytes_parsed+nlen > bytes) return BadLength; - to_cpy = nlen > 127 ? 127 : nlen; + if (bytes_parsed + nlen > bytes) return settings_seen; + to_cpy = min (nlen, sizeof name - 1); memcpy (name, prop+bytes_parsed, to_cpy); name[to_cpy] = '\0'; @@ -438,20 +438,19 @@ parse_settings (unsigned char *prop, bytes_parsed = PAD (bytes_parsed); bytes_parsed += 4; /* Skip serial for this value */ - if (bytes_parsed > bytes) return BadLength; + if (bytes_parsed > bytes) return settings_seen; - want_this = + want_this = strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0; #ifdef HAVE_XFT - (nlen > 6 && strncmp (name, "Xft/", 4) == 0) - || strcmp (XSETTINGS_FONT_NAME, name) == 0 - || + if ((nlen > 6 && memcmp (name, "Xft/", 4) == 0) + || strcmp (XSETTINGS_FONT_NAME, name) == 0) + want_this = true; #endif - strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0; switch (type) { case 0: /* Integer */ - if (bytes_parsed+4 > bytes) return BadLength; + if (bytes_parsed + 4 > bytes) return settings_seen; if (want_this) { memcpy (&ival, prop+bytes_parsed, 4); @@ -461,13 +460,13 @@ parse_settings (unsigned char *prop, break; case 1: /* String */ - if (bytes_parsed+4 > bytes) return BadLength; + if (bytes_parsed + 4 > bytes) return settings_seen; memcpy (&vlen, prop+bytes_parsed, 4); bytes_parsed += 4; if (my_bo != that_bo) vlen = bswap_32 (vlen); if (want_this) { - to_cpy = vlen > 127 ? 127 : vlen; + to_cpy = min (vlen, sizeof sval - 1); memcpy (sval, prop+bytes_parsed, to_cpy); sval[to_cpy] = '\0'; } @@ -477,17 +476,16 @@ parse_settings (unsigned char *prop, case 2: /* RGB value */ /* No need to parse this */ - if (bytes_parsed+8 > bytes) return BadLength; + if (bytes_parsed + 8 > bytes) return settings_seen; bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */ break; default: /* Parse Error */ - return BadValue; + return settings_seen; } if (want_this) { - ++settings_seen; if (strcmp (name, XSETTINGS_TOOL_BAR_STYLE) == 0) { dupstring (&settings->tb_style, sval); @@ -557,6 +555,9 @@ parse_settings (unsigned char *prop, settings->seen &= ~SEEN_LCDFILTER; } #endif /* HAVE_XFT */ + else + want_this = false; + settings_seen += want_this; } } @@ -576,6 +577,7 @@ read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) unsigned char *prop = NULL; Display *dpy = dpyinfo->display; int rc; + bool got_settings = false; x_catch_errors (dpy); rc = XGetWindowProperty (dpy, @@ -587,13 +589,13 @@ read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) if (rc == Success && prop != NULL && act_form == 8 && nitems > 0 && act_type == dpyinfo->Xatom_xsettings_prop) - rc = parse_settings (prop, nitems, settings); + got_settings = parse_settings (prop, nitems, settings) != 0; XFree (prop); x_uncatch_errors (); - return rc != 0; + return got_settings; } /* Apply Xft settings in SETTINGS to the Xft library. commit 0db7db3090df8d5afd5fda176511fea8656f1930 Author: Eli Zaretskii Date: Sat Dec 27 21:46:03 2014 +0200 Fix compilation of lib-src executables on MS-Windows. lib-src/Makefile.in (etags_libs, ebrowse${EXEEXT}, profile${EXEEXT}) (make-docfile${EXEEXT}, movemail${EXEEXT}) (update-game-score${EXEEXT}): Put $(NTLIB) before $(LOADLIBES), since GCC sometimes calls stpcpy when it sees strcpy, under optimization switches. Reported by Dani Moncayo . diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 600cc67..07a72ec 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,11 @@ +2014-12-27 Eli Zaretskii + + * Makefile.in (etags_libs, ebrowse${EXEEXT}, profile${EXEEXT}) + (make-docfile${EXEEXT}, movemail${EXEEXT}) + (update-game-score${EXEEXT}): Put $(NTLIB) before $(LOADLIBES), + since GCC sometimes calls stpcpy when it sees strcpy, under + optimization switches. + 2014-12-14 Paul Eggert * etags.c (analyze_regex): Rename from analyse_regex. diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index cae0898..13a7a05 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -321,7 +321,7 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) etags_deps = ${srcdir}/etags.c regex.o $(NTLIB) $(config_h) etags_cflags = -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" -o $@ -etags_libs = regex.o $(LOADLIBES) $(NTLIB) +etags_libs = regex.o $(NTLIB) $(LOADLIBES) etags${EXEEXT}: ${etags_deps} $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(etags_cflags) $< $(etags_libs) @@ -336,18 +336,18 @@ ctags${EXEEXT}: ${srcdir}/ctags.c ${etags_deps} ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \ $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ - $< $(LOADLIBES) $(NTLIB) -o $@ + $< $(NTLIB) $(LOADLIBES) -o $@ profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< \ - $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o $@ + $(NTLIB) $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o $@ make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h) - $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) $(NTLIB) -o $@ + $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(NTLIB) $(LOADLIBES) -o $@ movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} $< pop.o \ - $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o $@ + $(NTLIB) $(LOADLIBES) $(LIBS_MOVE) -o $@ pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h) $(AM_V_CC)$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} $< @@ -378,7 +378,7 @@ hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h) update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} \ -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ - $< $(LOADLIBES) $(NTLIB) -o $@ + $< $(NTLIB) $(LOADLIBES) -o $@ emacsclient.res: ../nt/emacsclient.rc $(NTINC)/../icons/emacs.ico $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $< commit 848343f3467fdb14d407865babb9c71683128618 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 14:15:05 2014 -0300 Sanitize ChangeLog entries for previous merges. diff --git a/ChangeLog b/ChangeLog index dd0875e..65a112d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,6 @@ * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit to 78. -2014-12-27 Paul Eggert 2014-12-25 Paul Eggert Prefer stpcpy to strcat diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b9ca8b3..0016ee0 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -2,7 +2,6 @@ * buffers.texi (Kill Buffer): Improve indexing. -2014-12-27 Paul Eggert 2014-12-24 Stephen Leake * trouble.texi: Move user-level information from CONTRIBUTE here. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index feafee8..ad9af13 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -5,7 +5,6 @@ * modes.texi (Defining Minor Modes, SMIE Lexer): Markup fixes. 2014-12-27 Eli Zaretskii -2014-12-27 Eli Zaretskii * windows.texi (Recombining Windows): Index subject of sections. @@ -106,7 +105,6 @@ * os.texi (Time of Day, Time Conversion, Time Parsing) (Time Calculations, Idle Timers): Index subject of sections. -2014-12-27 Stefan Monnier 2014-12-25 Martin Rudalics * windows.texi (Windows): Resync @menu order with @node order. @@ -146,6 +144,12 @@ * display.texi (Low-Level Font): Document font-info and query-font. +2014-12-18 Stefan Monnier + + * display.texi (Forcing Redisplay): Remove references to + redisplay-dont-pause and redisplay-preemption-period (which doesn't + even exist). + 2014-12-16 Nicolas Petton * sequences.texi (Seq Library): Add documentation for seq.el. diff --git a/etc/ChangeLog b/etc/ChangeLog index f94db9a..ee0958f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -2,7 +2,6 @@ * tutorials/TUTORIAL.es: Improve style consistency. Spelling fixes. -2014-12-27 Paul Eggert 2014-12-25 Karl Fogel * NEWS: Mention new buffer display behavior for `shell'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2e1f9e6..9319229 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -34,7 +34,6 @@ (python-info-encoding): New functions. 2014-12-27 Michael Albinus -2014-12-27 Michael Albinus * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust. @@ -79,18 +78,14 @@ Set `find-file-not-found-functions' in case of errors. (Bug#18623) 2014-12-27 Michael Albinus -2014-12-27 Michael Albinus * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it. 2014-12-27 Stefan Monnier -2014-12-27 Michael Albinus - * net/tramp-sh.el (tramp-send-command-and-read): New optional - arg MARKER. - (tramp-get-remote-path): Use it. + * lisp/subr.el (redisplay-dont-pause): Mark as obsolete. 2014-12-27 Michael Albinus @@ -121,7 +116,6 @@ * textmodes/tex-mode.el (tex-insert-quote): Consider and respect `electric-pair-mode' (bug#19356). -2014-12-27 Michael Albinus 2014-12-27 Dmitry Gutov elisp-xref-find: Don't create buffers eagerly. diff --git a/src/ChangeLog b/src/ChangeLog index 2d9408b..c32b120 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -19,6 +19,7 @@ set (Bug#19133). (setPixmapData): Rename local variable bmRep to avoid compiler warning. + 2014-12-27 Jan Djärv * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert commit 35e1f9d9fcbaab51808e05f514e63927f959ae51 Merge: f315b69 a5f38fa Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:31:20 2014 -0300 Merge from origin/emacs-24 a5f38fa Fix ChangeLog typo c6400e1 Fix composition of characters from Syriac and Arabis scripts. 7e9dfde python.el: Fix message when sending region. 800260c python.el: Cleanup temp files even with eval errors. ed65b91 Fix for previous commit 2dd5163 python.el: Handle file encoding for shell. 7aa506e Spelling fixes 4cd6d77 * automated/tramp-tests.el (tramp-test17-insert-directory): Do not expect a given order of "." and "..". a41d07b Fix rendering of composed caharacters on the mode line. (Bug#19435) b70977c Small doc markup fixes 73c050c * doc/lispref/modes.texi (Defining Minor Modes, SMIE Lexer): Markup fixes. 1783e6c ChangeLog fix c741b1b TUTORIAL.es: Improve style consistency f89efea TUTORIAL.es: spelling fixes 0d48826 Avoid compiler warning. Conflicts: doc/lispref/ChangeLog doc/lispref/control.texi etc/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog commit f315b69922db769f3358e15616aa76c965be8a89 Merge: 4b72b4f 5fc8210 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:27:15 2014 -0300 Merge from origin/emacs-24 The following commit was skipped: 5fc8210 Backport: Memory leak fix and 19133 fix. commit 4b72b4f91122704b805e2696b2e9342226359de0 Merge: 938d651 bef46ba Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:26:58 2014 -0300 Merge from origin/emacs-24 bef46ba Fix bad bug number reference, shall be 19427. Conflicts: src/ChangeLog commit 938d65136b6d8c4ea91313216c873d2084be4240 Merge: 411c1c6 2566f38 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:21:17 2014 -0300 Merge from origin/emacs-24 The following commit was skipped: 2566f38 Backport: Don't cache images in nsimage.m (Bug#18918). commit 411c1c65313aa4e22730ba9762e073881f4e299a Merge: c3c51ec 216c6aa Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:21:17 2014 -0300 Merge from origin/emacs-24 216c6aa * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust. 20cfd24 Improve indexing on the chapter/section/subsection levels. 14c3739 * lisp/progmodes/js.el (js-syntax-propertize): "return" can't be divided. ea78112 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" as end-of-line delimeter for passwords, when running on MS Windows. 012479a * lisp/progmodes/sh-script.el: Don't set global indent-line-function 75e114f Fix line numbers on Python shell. d0fd23c doc/emacs/buffers.texi (Kill Buffer): Improve indexing. 8e818d1 Keep maximized when going fullscreen. 749813e python.el: Fix electric colon behavior 936d5e5 Fix last patch. 74d3b20 Fixes: debbugs:18623 Conflicts: doc/emacs/ChangeLog doc/lispref/ChangeLog doc/lispref/functions.texi lisp/ChangeLog src/ChangeLog src/xterm.c test/ChangeLog commit c3c51ec274f423cf8044cd5b9bc0bbc5bda1f6aa Merge: 6e66744 48a9d9f Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:17:18 2014 -0300 Merge from origin/emacs-24 The following commit was skipped: 48a9d9f Merge branch 'emacs-24' of git.sv.gnu.org:/srv/git/emacs into emacs-24 commit 6e66744d4c4bd94bb7e34f4243de0213334a31c5 Merge: cd1ed48 230c010 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:16:44 2014 -0300 Merge from origin/emacs-24 230c010 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it. Conflicts: lisp/ChangeLog commit cd1ed48ddbbb487a40bbf2ecc55ca1d8377c1819 Merge: 3a12f2e 09ab6fe Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:15:55 2014 -0300 Merge from origin/emacs-24 The following commit was skipped: 09ab6fe Merge branch 'emacs-24' of git.sv.gnu.org:/srv/git/emacs into emacs-24 commit 3a12f2ed99734eff668f83f630c7108000e0b399 Merge: 6d14e0d 2616307 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:15:55 2014 -0300 Merge from origin/emacs-24 2616307 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it. c773edc * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in wrong debug buffer. (tramp-gw-open-connection): Set process coding system 'binary. (tramp-gw-open-network-stream): Handle HTTP error 403. 8032fc1 * .gitignore: Ignore /conftest*. fb420e7 * lisp/subr.el (sit-for): Tweak docstring. 061db13 Fix vc-git-dir-status-files WRT up-to-date vs edited bb57c94 Consider electric-pair-mode in tex-mode. 7b94572 * test/automated/flymake/warnpred/test.pl: Tweak earlier change. 59c218f ChangeLog fix db2a768 * test/automated/flymake/warnpred/test.pl: Tweak format d9005dd src/gnutls.c (gnutls_init): Fix deprecation warning from GCC. Conflicts: ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog commit a5f38fa1cc8eafe13f2073ebfaa8205b5e919d17 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 13:10:44 2014 -0300 Fix ChangeLog typo diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2fabe02..cf866fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -10,8 +10,8 @@ python.el: Fix message when sending region. * progmodes/python.el (python-shell-send-region): Rename argument - send-name from nomain. Fix message. - (python-shell-send-buffer): Rename argument send-name from arg. + send-main from nomain. Fix message. + (python-shell-send-buffer): Rename argument send-main from arg. 2014-12-27 Fabián Ezequiel Gallina commit 6d14e0d361cfb3589874fe1b559e30b4fd3eb284 Author: Dmitry Gutov Date: Sat Dec 27 16:06:37 2014 +0200 elisp-xref-find: Don't create buffers eagerly * lisp/emacs-lisp/find-func.el (find-function-library): New function, extracted from `find-function-noselect'. * lisp/progmodes/elisp-mode.el (elisp--identifier-location): Fold back into `elisp--company-location'. (elisp--identifier-completion-table): Rename to `elisp--identifier-completion-table', and do not include just any symbols with a property list. (elisp-completion-at-point): Revert the 2014-12-25 change. (elisp--xref-identifier-file): New function. (elisp--xref-find-definitions): Use it. * lisp/progmodes/xref.el (xref-elisp-location): New class. (xref-make-elisp-location): New function. (xref-location-marker): New implementation. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a42e50..5829ec2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2014-12-27 Dmitry Gutov + + elisp-xref-find: Don't create buffers eagerly. + + * progmodes/elisp-mode.el (elisp--identifier-location): Fold back + into `elisp--company-location'. + (elisp--identifier-completion-table): Rename to + `elisp--identifier-completion-table', and do not include just any + symbols with a property list. + (elisp-completion-at-point): Revert the 2014-12-25 change. + (elisp--xref-identifier-file): New function. + (elisp--xref-find-definitions): Use it. + + * emacs-lisp/find-func.el (find-function-library): New function, + extracted from `find-function-noselect'. + + * progmodes/xref.el (xref-elisp-location): New class. + (xref-make-elisp-location): New function. + (xref-location-marker): New implementation. + 2014-12-27 Juri Linkov * minibuffer.el (minibuffer-completion-help): diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index c372117..e1586a9 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -311,6 +311,39 @@ The search is done in the source for library LIBRARY." (cons (current-buffer) (point))) (cons (current-buffer) nil)))))))) +(defun find-function-library (function &optional lisp-only verbose) + "Return the library FUNCTION is defined in. + +If FUNCTION is a built-in function and LISP-ONLY is non-nil, +signal an error. + +If VERBOSE is non-nil, and FUNCTION is an alias, display a +message about the whole chain of aliases." + (let ((def (symbol-function (find-function-advised-original function))) + aliases) + ;; FIXME for completeness, it might be nice to print something like: + ;; foo (which is advised), which is an alias for bar (which is advised). + (while (symbolp def) + (or (eq def function) + (not verbose) + (if aliases + (setq aliases (concat aliases + (format ", which is an alias for `%s'" + (symbol-name def)))) + (setq aliases (format "`%s' is an alias for `%s'" + function (symbol-name def))))) + (setq function (symbol-function (find-function-advised-original function)) + def (symbol-function (find-function-advised-original function)))) + (if aliases + (message "%s" aliases)) + (cond + ((autoloadp def) (nth 1 def)) + ((subrp def) + (if lisp-only + (error "%s is a built-in function" function)) + (help-C-file-name def 'subr)) + ((symbol-file function 'defun))))) + ;;;###autoload (defun find-function-noselect (function &optional lisp-only) "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. @@ -329,30 +362,8 @@ searched for in `find-function-source-path' if non-nil, otherwise in `load-path'." (if (not function) (error "You didn't specify a function")) - (let ((def (symbol-function (find-function-advised-original function))) - aliases) - ;; FIXME for completeness, it might be nice to print something like: - ;; foo (which is advised), which is an alias for bar (which is advised). - (while (symbolp def) - (or (eq def function) - (if aliases - (setq aliases (concat aliases - (format ", which is an alias for `%s'" - (symbol-name def)))) - (setq aliases (format "`%s' is an alias for `%s'" - function (symbol-name def))))) - (setq function (symbol-function (find-function-advised-original function)) - def (symbol-function (find-function-advised-original function)))) - (if aliases - (message "%s" aliases)) - (let ((library - (cond ((autoloadp def) (nth 1 def)) - ((subrp def) - (if lisp-only - (error "%s is a built-in function" function)) - (help-C-file-name def 'subr)) - ((symbol-file function 'defun))))) - (find-function-search-for-symbol function nil library)))) + (let ((library (find-function-library function lisp-only t))) + (find-function-search-for-symbol function nil library))) (defun find-function-read (&optional type) "Read and return an interned symbol, defaulting to the one near point. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ef619f0..347560a 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -418,40 +418,19 @@ It can be quoted, or be inside a quoted form." (match-string 0 doc)))) (declare-function find-library-name "find-func" (library)) - -(defvar elisp--identifier-types '(defun defvar feature defface)) - -(defun elisp--identifier-location (type sym) - (pcase (cons type sym) - (`(defun . ,(pred fboundp)) - (find-definition-noselect sym nil)) - (`(defvar . ,(pred boundp)) - (find-definition-noselect sym 'defvar)) - (`(defface . ,(pred facep)) - (find-definition-noselect sym 'defface)) - (`(feature . ,(pred featurep)) - (require 'find-func) - (cons (find-file-noselect (find-library-name - (symbol-name sym))) - 1)))) +(declare-function find-function-library "find-func" (function &optional l-o v)) (defun elisp--company-location (str) - (catch 'res - (let ((sym (intern-soft str))) - (when sym - (dolist (type elisp--identifier-types) - (let ((loc (elisp--identifier-location type sym))) - (and loc (throw 'res loc)))))))) - -(defvar elisp--identifier-completion-table - (apply-partially #'completion-table-with-predicate - obarray - (lambda (sym) - (or (boundp sym) - (fboundp sym) - (featurep sym) - (symbol-plist sym))) - 'strict)) + (let ((sym (intern-soft str))) + (cond + ((fboundp sym) (find-definition-noselect sym nil)) + ((boundp sym) (find-definition-noselect sym 'defvar)) + ((featurep sym) + (require 'find-func) + (cons (find-file-noselect (find-library-name + (symbol-name sym))) + 0)) + ((facep sym) (find-definition-noselect sym 'defface))))) (defun elisp-completion-at-point () "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." @@ -493,8 +472,13 @@ It can be quoted, or be inside a quoted form." :company-docsig #'elisp--company-doc-string :company-location #'elisp--company-location)) ((elisp--form-quoted-p beg) - ;; Don't include all symbols (bug#16646). - (list nil elisp--identifier-completion-table + (list nil obarray + ;; Don't include all symbols (bug#16646). + :predicate (lambda (sym) + (or (boundp sym) + (fboundp sym) + (featurep sym) + (symbol-plist sym))) :annotation-function (lambda (str) (if (fboundp (intern-soft str)) " ")) :company-doc-buffer #'elisp--company-doc-buffer @@ -572,11 +556,12 @@ It can be quoted, or be inside a quoted form." ;;; Xref backend -(declare-function xref-make-buffer-location "xref" (buffer position)) +(declare-function xref-make-elisp-location "xref" (symbol type file)) (declare-function xref-make-bogus-location "xref" (message)) (declare-function xref-make "xref" (description location)) (defun elisp-xref-find (action id) + (require 'find-func) (pcase action (`definitions (let ((sym (intern-soft id))) @@ -585,16 +570,29 @@ It can be quoted, or be inside a quoted form." (`apropos (elisp--xref-find-apropos id)))) +(defun elisp--xref-identifier-file (type sym) + (pcase type + (`defun (when (fboundp sym) + (find-function-library sym))) + (`defvar (when (boundp sym) + (or (symbol-file sym 'defvar) + (help-C-file-name sym 'var)))) + (`feature (when (featurep sym) + (find-library-name (symbol-name sym)))) + (`defface (when (facep sym) + (symbol-file sym 'defface))))) + (defun elisp--xref-find-definitions (symbol) (save-excursion (let (lst) - (dolist (type elisp--identifier-types) + (dolist (type '(feature defface defvar defun)) (let ((loc (condition-case err - (let ((buf-pos (elisp--identifier-location type symbol))) - (when buf-pos - (xref-make-buffer-location (car buf-pos) - (or (cdr buf-pos) 1)))) + (let ((file (elisp--xref-identifier-file type symbol))) + (when file + (when (string-match-p "\\.elc\\'" file) + (setq file (substring file 0 -1))) + (xref-make-elisp-location symbol type file))) (error (xref-make-bogus-location (error-message-string err)))))) (when loc @@ -611,8 +609,18 @@ It can be quoted, or be inside a quoted form." (push (elisp--xref-find-definitions sym) lst)) (nreverse lst)))) +(defvar elisp--xref-identifier-completion-table + (apply-partially #'completion-table-with-predicate + obarray + (lambda (sym) + (or (boundp sym) + (fboundp sym) + (featurep sym) + (facep sym))) + 'strict)) + (defun elisp--xref-identifier-completion-table () - elisp--identifier-completion-table) + elisp--xref-identifier-completion-table) ;;; Elisp Interaction mode diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 21c0d6a..8221aeb 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -136,6 +136,31 @@ actual location is not known.") (defmethod xref-location-group ((_ xref-bogus-location)) "(No location)") +;; This should be in elisp-mode.el, but it's preloaded, and we can't +;; preload defclass and defmethod (at least, not yet). +(defclass xref-elisp-location (xref-location) + ((symbol :type symbol :initarg :symbol) + (type :type symbol :initarg :type) + (file :type string :initarg :file + :reader xref-location-group)) + :documentation "Location of an Emacs Lisp symbol definition.") + +(defun xref-make-elisp-location (symbol type file) + (make-instance 'xref-elisp-location :symbol symbol :type type :file file)) + +(defmethod xref-location-marker ((l xref-elisp-location)) + (with-slots (symbol type file) l + (let ((buffer-point + (pcase type + (`defun (find-function-search-for-symbol symbol nil file)) + ((or `defvar `defface) + (find-function-search-for-symbol symbol type file)) + (`feature + (cons (find-file-noselect file) 1))))) + (with-current-buffer (car buffer-point) + (goto-char (or (cdr buffer-point) (point-min))) + (point-marker))))) + ;;; Cross-reference commit c6400e17e75391479a1c8d9e3bca5f0fe2b968bb Author: Eli Zaretskii Date: Sat Dec 27 14:07:06 2014 +0200 Fix composition of characters from Syriac and Arabis scripts. lisp/language/misc-lang.el (composition-function-table): Add Syriac characters and also ZWJ/ZWNJ. See http://lists.gnu.org/archive/html/help-gnu-emacs/2014-12/msg00248.html for the details. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30697ec..2fabe02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-12-27 Eli Zaretskii + + * language/misc-lang.el (composition-function-table): Add Syriac + characters and also ZWJ/ZWNJ. See + http://lists.gnu.org/archive/html/help-gnu-emacs/2014-12/msg00248.html + for the details. + 2014-12-27 Fabián Ezequiel Gallina python.el: Fix message when sending region. diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el index ee06e34..b56d31f 100644 --- a/lisp/language/misc-lang.el +++ b/lisp/language/misc-lang.el @@ -78,7 +78,8 @@ and Italian."))) (set-char-table-range composition-function-table '(#x600 . #x6FF) - (list ["[\u0600-\u06FF]+" 0 font-shape-gstring])) + (list ["\u200D?[\u0600-\u074F]+[\u200D\u200C]*[\u0600-\u074F]+\u200D?" + 0 font-shape-gstring])) (provide 'misc-lang) commit 09d2e8477aa64308447395a0f01cfe5414619811 Author: Glenn Morris Date: Sat Dec 27 06:17:50 2014 -0500 Auto-commit of loaddefs files. diff --git a/lisp/dired.el b/lisp/dired.el index 909ba22..7f7251f 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3884,7 +3884,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;; Start of automatically extracted autoloads. -;;;### (autoloads nil "dired-aux" "dired-aux.el" "1448837b5f3e2b9ad63f723361f1e32e") +;;;### (autoloads nil "dired-aux" "dired-aux.el" "73269f48e7fe2fd0ac580fd69252b33a") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ commit 7e9dfded9314a1bedc339a7b7807341a2371f235 Author: Fabián Ezequiel Gallina Date: Sat Dec 27 04:01:32 2014 -0300 python.el: Fix message when sending region. * lisp/progmodes/python.el (python-shell-send-region): Rename argument send-name from nomain. Fix message. (python-shell-send-buffer): Rename argument send-name from arg. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c5dae1..30697ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2014-12-27 Fabián Ezequiel Gallina + python.el: Fix message when sending region. + + * progmodes/python.el (python-shell-send-region): Rename argument + send-name from nomain. Fix message. + (python-shell-send-buffer): Rename argument send-name from arg. + +2014-12-27 Fabián Ezequiel Gallina + python.el: Cleanup temp files even with eval errors. * progmodes/python.el (python-shell-send-file): Make file-name diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d9422e5..4a4e320 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2577,23 +2577,30 @@ the python shell: (line-beginning-position) (line-end-position)))) (buffer-substring-no-properties (point-min) (point-max))))) -(defun python-shell-send-region (start end &optional nomain) - "Send the region delimited by START and END to inferior Python process." - (interactive "r") - (let* ((string (python-shell-buffer-substring start end nomain)) +(defun python-shell-send-region (start end &optional send-main) + "Send the region delimited by START and END to inferior Python process. +When optional argument SEND-MAIN is non-nil, allow execution of +code inside blocks delimited by \"if __name__== '__main__':\". +When called interactively SEND-MAIN defaults to nil, unless it's +called with prefix argument." + (interactive "r\nP") + (let* ((string (python-shell-buffer-substring start end (not send-main))) (process (python-shell-get-or-create-process)) - (_ (string-match "\\`\n*\\(.*\\)" string))) - (message "Sent: %s..." (match-string 1 string)) + (original-string (buffer-substring-no-properties start end)) + (_ (string-match "\\`\n*\\(.*\\)" original-string))) + (message "Sent: %s..." (match-string 1 original-string)) (python-shell-send-string string process))) -(defun python-shell-send-buffer (&optional arg) +(defun python-shell-send-buffer (&optional send-main) "Send the entire buffer to inferior Python process. -With prefix ARG allow execution of code inside blocks delimited -by \"if __name__== '__main__':\"." +When optional argument SEND-MAIN is non-nil, allow execution of +code inside blocks delimited by \"if __name__== '__main__':\". +When called interactively SEND-MAIN defaults to nil, unless it's +called with prefix argument." (interactive "P") (save-restriction (widen) - (python-shell-send-region (point-min) (point-max) (not arg)))) + (python-shell-send-region (point-min) (point-max) send-main))) (defun python-shell-send-defun (arg) "Send the current defun to inferior Python process. commit 800260c4eb1e0ce2cc0a9a172c99f17ff47e0a6a Author: Fabián Ezequiel Gallina Date: Sat Dec 27 03:38:32 2014 -0300 python.el: Cleanup temp files even with eval errors. * lisp/progmodes/python.el (python-shell-send-file): Make file-name mandatory. Fix temp file removal in the majority of cases. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b73732a..5c5dae1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2014-12-27 Fabián Ezequiel Gallina + python.el: Cleanup temp files even with eval errors. + + * progmodes/python.el (python-shell-send-file): Make file-name + mandatory. Fix temp file removal in the majority of cases. + +2014-12-27 Fabián Ezequiel Gallina + python.el: Handle file encoding for shell. * progmodes/python.el (python-rx-constituents): Add coding-cookie. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 8bbbd69..d9422e5 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2620,35 +2620,33 @@ When argument ARG is non-nil do not include decorators." delete) "Send FILE-NAME to inferior Python PROCESS. If TEMP-FILE-NAME is passed then that file is used for processing -instead, while internally the shell will continue to use FILE-NAME. -If DELETE is non-nil, delete the file afterwards." +instead, while internally the shell will continue to use +FILE-NAME. If TEMP-FILE-NAME and DELETE are non-nil, then +TEMP-FILE-NAME is deleted after evaluation is performed." (interactive "fFile to send: ") (let* ((process (or process (python-shell-get-or-create-process))) (encoding (with-temp-buffer (insert-file-contents (or temp-file-name file-name)) (python-info-encoding))) + (file-name (expand-file-name + (or (file-remote-p file-name 'localname) + file-name))) (temp-file-name (when temp-file-name (expand-file-name (or (file-remote-p temp-file-name 'localname) - temp-file-name)))) - (file-name (or (when file-name - (expand-file-name - (or (file-remote-p file-name 'localname) - file-name))) - temp-file-name))) - (when (not file-name) - (error "If FILE-NAME is nil then TEMP-FILE-NAME must be non-nil")) + temp-file-name))))) (python-shell-send-string (format (concat - "import codecs; __pyfile = codecs.open('''%s''', encoding='''%s''');" - "exec(compile(__pyfile.read().encode('''%s'''), '''%s''', 'exec'));" - "__pyfile.close()%s") - (or temp-file-name file-name) encoding encoding file-name - (if delete (format "; import os; os.remove('''%s''')" - (or temp-file-name file-name)) - "")) + "import codecs, os;" + "__pyfile = codecs.open('''%s''', encoding='''%s''');" + "__code = __pyfile.read().encode('''%s''');" + "__pyfile.close();" + (when (and delete temp-file-name) + (format "os.remove('''%s''');" temp-file-name)) + "exec(compile(__code, '''%s''', 'exec'));") + (or temp-file-name file-name) encoding encoding file-name) process))) (defun python-shell-switch-to-shell () commit ed65b91571572b73a5c0f8834f94f670390247bd Author: Fabián Ezequiel Gallina Date: Sat Dec 27 03:32:01 2014 -0300 Fix for previous commit diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 02d0cbe..8bbbd69 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2624,6 +2624,10 @@ instead, while internally the shell will continue to use FILE-NAME. If DELETE is non-nil, delete the file afterwards." (interactive "fFile to send: ") (let* ((process (or process (python-shell-get-or-create-process))) + (encoding (with-temp-buffer + (insert-file-contents + (or temp-file-name file-name)) + (python-info-encoding))) (temp-file-name (when temp-file-name (expand-file-name (or (file-remote-p temp-file-name 'localname) @@ -2632,12 +2636,7 @@ If DELETE is non-nil, delete the file afterwards." (expand-file-name (or (file-remote-p file-name 'localname) file-name))) - temp-file-name)) - (encoding - (with-temp-buffer - (insert-file-contents - (or temp-file-name file-name)) - (python-info-encoding)))) + temp-file-name))) (when (not file-name) (error "If FILE-NAME is nil then TEMP-FILE-NAME must be non-nil")) (python-shell-send-string commit 2dd5163d764f395eb31a2306dba385d123af4aba Author: Fabián Ezequiel Gallina Date: Sat Dec 27 01:30:21 2014 -0300 python.el: Handle file encoding for shell. * lisp/progmodes/python.el (python-rx-constituents): Add coding-cookie. (python-shell--save-temp-file): Write file with proper encoding. (python-shell-buffer-substring): Add coding cookie for detected encoding to generated content. Fix blank lines when removing if-name-main block. (python-shell-send-file): Handle file encoding. (python-info-encoding-from-cookie) (python-info-encoding): New functions. * test/automated/python-tests.el (python-shell-buffer-substring-1) (python-shell-buffer-substring-2, python-shell-buffer-substring-3) (python-shell-buffer-substring-4, python-shell-buffer-substring-5) (python-shell-buffer-substring-6, python-shell-buffer-substring-7) (python-shell-buffer-substring-8) (python-info-encoding-from-cookie-1) (python-info-encoding-from-cookie-2) (python-info-encoding-from-cookie-3) (python-info-encoding-from-cookie-4) (python-info-encoding-from-cookie-5) (python-info-encoding-from-cookie-6) (python-info-encoding-from-cookie-7, python-info-encoding-1) (python-info-encoding-2): New tests. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2272812..b73732a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2014-12-27 Fabián Ezequiel Gallina + + python.el: Handle file encoding for shell. + + * progmodes/python.el (python-rx-constituents): Add coding-cookie. + (python-shell--save-temp-file): Write file with proper encoding. + (python-shell-buffer-substring): Add coding cookie for detected + encoding to generated content. Fix blank lines when removing + if-name-main block. + (python-shell-send-file): Handle file encoding. + (python-info-encoding-from-cookie) + (python-info-encoding): New functions. + 2014-12-24 Michael Albinus * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 632659c..02d0cbe 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -386,7 +386,18 @@ (* ?\\ ?\\) (any ?\' ?\"))) (* ?\\ ?\\) ;; Match single or triple quotes of any kind. - (group (or "\"" "\"\"\"" "'" "'''")))))) + (group (or "\"" "\"\"\"" "'" "'''"))))) + (coding-cookie . ,(rx line-start ?# (* space) + (or + ;; # coding= + (: "coding" (or ?: ?=) (* space) (group-n 1 (+ (or word ?-)))) + ;; # -*- coding: -*- + (: "-*-" (* space) "coding:" (* space) + (group-n 1 (+ (or word ?-))) (* space) "-*-") + ;; # vim: set fileencoding= : + (: "vim:" (* space) "set" (+ space) + "fileencoding" (* space) ?= (* space) + (group-n 1 (+ (or word ?-))) (* space) ":"))))) "Additional Python specific sexps for `python-rx'") (defmacro python-rx (&rest regexps) @@ -2400,11 +2411,7 @@ there for compatibility with CEDET.") (concat (file-remote-p default-directory) "/tmp") temporary-file-directory)) (temp-file-name (make-temp-file "py")) - ;; XXX: Python's built-in compile function accepts utf-8 as - ;; input so there's no need to enforce a coding cookie. In - ;; the future making `coding-system-for-write' match the - ;; current buffer's coding may be a good idea. - (coding-system-for-write 'utf-8)) + (coding-system-for-write (python-info-encoding))) (with-temp-file temp-file-name (insert string) (delete-trailing-whitespace)) @@ -2511,16 +2518,28 @@ the python shell: \"if __name__ == '__main__'\" block will be removed. 2. When a subregion of the buffer is sent, it takes care of appending extra empty lines so tracebacks are correct. - 3. Wraps indented regions under an \"if True:\" block so the + 3. When the region sent is a substring of the current buffer, a + coding cookie is added. + 4. Wraps indented regions under an \"if True:\" block so the interpreter evaluates them correctly." - (let ((substring (buffer-substring-no-properties start end)) - (fillstr (make-string (1- (line-number-at-pos start)) ?\n)) - (toplevel-block-p (save-excursion - (goto-char start) - (or (zerop (line-number-at-pos start)) - (progn - (python-util-forward-comment 1) - (zerop (current-indentation))))))) + (let* ((substring (buffer-substring-no-properties start end)) + (buffer-substring-p (save-restriction + (widen) + (not (equal (list (point-min) (point-max)) + (list start end))))) + (encoding (python-info-encoding)) + (fillstr (concat + (when buffer-substring-p + (format "# -*- coding: %s -*-\n" encoding)) + (make-string + (- (line-number-at-pos start) + (if buffer-substring-p 2 1)) ?\n))) + (toplevel-block-p (save-excursion + (goto-char start) + (or (zerop (line-number-at-pos start)) + (progn + (python-util-forward-comment 1) + (zerop (current-indentation))))))) (with-temp-buffer (python-mode) (if fillstr (insert fillstr)) @@ -2536,17 +2555,26 @@ the python shell: (when (python-nav-if-name-main) (cons (point) (progn (python-nav-forward-sexp-safe) + ;; Include ending newline + (forward-line 1) (point))))))) ;; Oh destructuring bind, how I miss you. (if-name-main-start (car if-name-main-start-end)) - (if-name-main-end (cdr if-name-main-start-end))) + (if-name-main-end (cdr if-name-main-start-end)) + (fillstr (make-string + (- (line-number-at-pos if-name-main-end) + (line-number-at-pos if-name-main-start)) ?\n))) (when if-name-main-start-end (goto-char if-name-main-start) (delete-region if-name-main-start if-name-main-end) - (insert - (make-string - (- (line-number-at-pos if-name-main-end) - (line-number-at-pos if-name-main-start)) ?\n))))) + (insert fillstr)))) + ;; Ensure there's only one coding cookie in the generated string. + (goto-char (point-min)) + (when (looking-at-p (python-rx coding-cookie)) + (forward-line 1) + (when (looking-at-p (python-rx coding-cookie)) + (delete-region + (line-beginning-position) (line-end-position)))) (buffer-substring-no-properties (point-min) (point-max))))) (defun python-shell-send-region (start end &optional nomain) @@ -2604,15 +2632,21 @@ If DELETE is non-nil, delete the file afterwards." (expand-file-name (or (file-remote-p file-name 'localname) file-name))) - temp-file-name))) + temp-file-name)) + (encoding + (with-temp-buffer + (insert-file-contents + (or temp-file-name file-name)) + (python-info-encoding)))) (when (not file-name) (error "If FILE-NAME is nil then TEMP-FILE-NAME must be non-nil")) (python-shell-send-string (format - (concat "__pyfile = open('''%s''');" - "exec(compile(__pyfile.read(), '''%s''', 'exec'));" - "__pyfile.close()%s") - (or temp-file-name file-name) file-name + (concat + "import codecs; __pyfile = codecs.open('''%s''', encoding='''%s''');" + "exec(compile(__pyfile.read().encode('''%s'''), '''%s''', 'exec'));" + "__pyfile.close()%s") + (or temp-file-name file-name) encoding encoding file-name (if delete (format "; import os; os.remove('''%s''')" (or temp-file-name file-name)) "")) @@ -3912,6 +3946,32 @@ operator." (* whitespace) line-end)) (string-equal "" (match-string-no-properties 1)))) +(defun python-info-encoding-from-cookie () + "Detect current buffer's encoding from its coding cookie. +Returns the enconding as a symbol." + (let ((first-two-lines + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (forward-line 2) + (buffer-substring-no-properties + (point) + (point-min)))))) + (when (string-match (python-rx coding-cookie) first-two-lines) + (intern (match-string-no-properties 1 first-two-lines))))) + +(defun python-info-encoding () + "Return encoding for file. +Try `python-info-encoding-from-cookie', if none is found then +default to utf-8." + ;; If no enconding is defined, then it's safe to use UTF-8: Python 2 + ;; uses ASCII as default while Python 3 uses UTF-8. This means that + ;; in the worst case escenario python.el will make things work for + ;; Python 2 files with unicode data and no encoding defined. + (or (python-info-encoding-from-cookie) + 'utf-8)) + ;;; Utility functions diff --git a/test/ChangeLog b/test/ChangeLog index 14780c0..101e9d9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,19 @@ +2014-12-27 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-shell-buffer-substring-1) + (python-shell-buffer-substring-2, python-shell-buffer-substring-3) + (python-shell-buffer-substring-4, python-shell-buffer-substring-5) + (python-shell-buffer-substring-6, python-shell-buffer-substring-7) + (python-shell-buffer-substring-8) + (python-info-encoding-from-cookie-1) + (python-info-encoding-from-cookie-2) + (python-info-encoding-from-cookie-3) + (python-info-encoding-from-cookie-4) + (python-info-encoding-from-cookie-5) + (python-info-encoding-from-cookie-6) + (python-info-encoding-from-cookie-7, python-info-encoding-1) + (python-info-encoding-2): New tests. + 2014-12-25 Michael Albinus * automated/tramp-tests.el (tramp-test17-insert-directory): Do not diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index d1713ac..8fcda58 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -2459,6 +2459,198 @@ and `python-shell-interpreter-args' in the new shell buffer." "^\\(o\\.t \\|\\)"))) (ignore-errors (delete-file startup-file))))) +(ert-deftest python-shell-buffer-substring-1 () + "Selecting a substring of the whole buffer must match its contents." + (python-tests-with-temp-buffer + " +class Foo(models.Model): + pass + + +class Bar(models.Model): + pass +" + (should (string= (buffer-string) + (python-shell-buffer-substring (point-min) (point-max)))))) + +(ert-deftest python-shell-buffer-substring-2 () + "Main block should be removed if NOMAIN is non-nil." + (python-tests-with-temp-buffer + " +class Foo(models.Model): + pass + +class Bar(models.Model): + pass + +if __name__ == \"__main__\": + foo = Foo() + print (foo) +" + (should (string= (python-shell-buffer-substring (point-min) (point-max) t) + " +class Foo(models.Model): + pass + +class Bar(models.Model): + pass + + + + +")))) + +(ert-deftest python-shell-buffer-substring-3 () + "Main block should be removed if NOMAIN is non-nil." + (python-tests-with-temp-buffer + " +class Foo(models.Model): + pass + +if __name__ == \"__main__\": + foo = Foo() + print (foo) + +class Bar(models.Model): + pass +" + (should (string= (python-shell-buffer-substring (point-min) (point-max) t) + " +class Foo(models.Model): + pass + + + + + +class Bar(models.Model): + pass +")))) + +(ert-deftest python-shell-buffer-substring-4 () + "Coding cookie should be added for substrings." + (python-tests-with-temp-buffer + "# coding: latin-1 + +class Foo(models.Model): + pass + +if __name__ == \"__main__\": + foo = Foo() + print (foo) + +class Bar(models.Model): + pass +" + (should (string= (python-shell-buffer-substring + (python-tests-look-at "class Foo(models.Model):") + (progn (python-nav-forward-sexp) (point))) + "# -*- coding: latin-1 -*- + +class Foo(models.Model): + pass")))) + +(ert-deftest python-shell-buffer-substring-5 () + "The proper amount of blank lines is added for a substring." + (python-tests-with-temp-buffer + "# coding: latin-1 + +class Foo(models.Model): + pass + +if __name__ == \"__main__\": + foo = Foo() + print (foo) + +class Bar(models.Model): + pass +" + (should (string= (python-shell-buffer-substring + (python-tests-look-at "class Bar(models.Model):") + (progn (python-nav-forward-sexp) (point))) + "# -*- coding: latin-1 -*- + + + + + + + + +class Bar(models.Model): + pass")))) + +(ert-deftest python-shell-buffer-substring-6 () + "Handle substring with coding cookie in the second line." + (python-tests-with-temp-buffer + " +# coding: latin-1 + +class Foo(models.Model): + pass + +if __name__ == \"__main__\": + foo = Foo() + print (foo) + +class Bar(models.Model): + pass +" + (should (string= (python-shell-buffer-substring + (python-tests-look-at "# coding: latin-1") + (python-tests-look-at "if __name__ == \"__main__\":")) + "# -*- coding: latin-1 -*- + + +class Foo(models.Model): + pass + +")))) + +(ert-deftest python-shell-buffer-substring-7 () + "Ensure first coding cookie gets precedence." + (python-tests-with-temp-buffer + "# coding: utf-8 +# coding: latin-1 + +class Foo(models.Model): + pass + +if __name__ == \"__main__\": + foo = Foo() + print (foo) + +class Bar(models.Model): + pass +" + (should (string= (python-shell-buffer-substring + (python-tests-look-at "# coding: latin-1") + (python-tests-look-at "if __name__ == \"__main__\":")) + "# -*- coding: utf-8 -*- + + +class Foo(models.Model): + pass + +")))) + +(ert-deftest python-shell-buffer-substring-8 () + "Ensure first coding cookie gets precedence when sending whole buffer." + (python-tests-with-temp-buffer + "# coding: utf-8 +# coding: latin-1 + +class Foo(models.Model): + pass +" + (should (string= (python-shell-buffer-substring (point-min) (point-max)) + "# coding: utf-8 + + +class Foo(models.Model): + pass +")))) + ;;; Shell completion @@ -3773,6 +3965,85 @@ foo = True # another comment (forward-line 1) (should (python-info-current-line-empty-p)))) +(ert-deftest python-info-encoding-from-cookie-1 () + "Should detect it on first line." + (python-tests-with-temp-buffer + "# coding=latin-1 + +foo = True # another comment +" + (should (eq (python-info-encoding-from-cookie) 'latin-1)))) + +(ert-deftest python-info-encoding-from-cookie-2 () + "Should detect it on second line." + (python-tests-with-temp-buffer + " +# coding=latin-1 + +foo = True # another comment +" + (should (eq (python-info-encoding-from-cookie) 'latin-1)))) + +(ert-deftest python-info-encoding-from-cookie-3 () + "Should not be detected on third line (and following ones)." + (python-tests-with-temp-buffer + " + +# coding=latin-1 +foo = True # another comment +" + (should (not (python-info-encoding-from-cookie))))) + +(ert-deftest python-info-encoding-from-cookie-4 () + "Should detect Emacs style." + (python-tests-with-temp-buffer + "# -*- coding: latin-1 -*- + +foo = True # another comment" + (should (eq (python-info-encoding-from-cookie) 'latin-1)))) + +(ert-deftest python-info-encoding-from-cookie-5 () + "Should detect Vim style." + (python-tests-with-temp-buffer + "# vim: set fileencoding=latin-1 : + +foo = True # another comment" + (should (eq (python-info-encoding-from-cookie) 'latin-1)))) + +(ert-deftest python-info-encoding-from-cookie-6 () + "First cookie wins." + (python-tests-with-temp-buffer + "# -*- coding: iso-8859-1 -*- +# vim: set fileencoding=latin-1 : + +foo = True # another comment" + (should (eq (python-info-encoding-from-cookie) 'iso-8859-1)))) + +(ert-deftest python-info-encoding-from-cookie-7 () + "First cookie wins." + (python-tests-with-temp-buffer + "# vim: set fileencoding=latin-1 : +# -*- coding: iso-8859-1 -*- + +foo = True # another comment" + (should (eq (python-info-encoding-from-cookie) 'latin-1)))) + +(ert-deftest python-info-encoding-1 () + "Should return the detected encoding from cookie." + (python-tests-with-temp-buffer + "# vim: set fileencoding=latin-1 : + +foo = True # another comment" + (should (eq (python-info-encoding) 'latin-1)))) + +(ert-deftest python-info-encoding-2 () + "Should default to utf-8." + (python-tests-with-temp-buffer + "# No encoding for you + +foo = True # another comment" + (should (eq (python-info-encoding) 'utf-8)))) + ;;; Utility functions commit 162660c3639a68a7b71439bdd713d54f940274b8 Author: Juri Linkov Date: Sat Dec 27 02:54:56 2014 +0200 Avoid duplicate calls of window-height in with-displayed-buffer-window * lisp/minibuffer.el (minibuffer-completion-help): Use shrink-window-if-larger-than-buffer in window-height when temp-buffer-resize-mode is nil. * lisp/window.el (with-displayed-buffer-window): Remove window-height from the action alist in the temp-buffer-window-show call when window-height is handled explicitly afterwards. Fixes: debbugs:19355 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c32173..5a42e50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,15 @@ 2014-12-27 Juri Linkov + * minibuffer.el (minibuffer-completion-help): + Use shrink-window-if-larger-than-buffer in window-height + when temp-buffer-resize-mode is nil. + + * window.el (with-displayed-buffer-window): Remove window-height + from the action alist in the temp-buffer-window-show call + when window-height is handled explicitly afterwards (bug#19355). + +2014-12-27 Juri Linkov + Support subdirectories when saving places in dired. * saveplace.el (toggle-save-place, save-place-to-alist) (save-places-to-alist, save-place-dired-hook): diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e1e6b0e..9198901 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1818,8 +1818,9 @@ variables.") ,(if (eq (selected-window) (minibuffer-window)) 'display-buffer-at-bottom 'display-buffer-below-selected)) - ,(when temp-buffer-resize-mode - '(window-height . resize-temp-buffer-window)) + ,(if temp-buffer-resize-mode + '(window-height . resize-temp-buffer-window) + '(window-height . shrink-window-if-larger-than-buffer)) ,(when temp-buffer-resize-mode '(preserve-size . (nil . t)))) nil diff --git a/lisp/window.el b/lisp/window.el index 2b593c3..21bd2c5 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -237,7 +237,12 @@ displays the buffer specified by BUFFER-OR-NAME before running BODY." (standard-output ,buffer) ,window ,value) (with-current-buffer ,buffer - (setq ,window (temp-buffer-window-show ,buffer ,vaction))) + (setq ,window (temp-buffer-window-show + ,buffer + ;; Remove window-height when it's handled below. + (if (functionp (cdr (assq 'window-height (cdr ,vaction)))) + (assq-delete-all 'window-height (copy-sequence ,vaction)) + ,vaction)))) (let ((inhibit-read-only t) (inhibit-modification-hooks t)) commit d51459246bf54316f3a22694bf9eda0bfcc18a6a Author: Juri Linkov Date: Sat Dec 27 02:38:34 2014 +0200 Support subdirectories when saving places in dired. * lisp/saveplace.el (toggle-save-place, save-place-to-alist) (save-places-to-alist, save-place-dired-hook): Use dired-current-directory instead of dired-directory. (save-place-dired-hook): Add check for alist to make the new format future-proof to allow other possible formats. Fixes: debbugs:19436 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 52146e4..0c32173 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2014-12-27 Juri Linkov + + Support subdirectories when saving places in dired. + * saveplace.el (toggle-save-place, save-place-to-alist) + (save-places-to-alist, save-place-dired-hook): + Use dired-current-directory instead of dired-directory (bug#19436). + (save-place-dired-hook): Add check for alist to make the new + format future-proof to allow other possible formats. + 2014-12-26 Fabián Ezequiel Gallina python.el: Generate clearer shell buffer names. diff --git a/lisp/saveplace.el b/lisp/saveplace.el index a25dba2..18e34cf 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -153,7 +153,7 @@ file: \(setq-default save-place t)" (interactive "P") (if (not (or buffer-file-name (and (derived-mode-p 'dired-mode) - dired-directory))) + (dired-current-directory)))) (message "Buffer `%s' not visiting a file or directory" (buffer-name)) (setq save-place (if parg (> (prefix-numeric-value parg) 0) @@ -172,12 +172,13 @@ file: ;; file. If not, do so, then feel free to modify the alist. It ;; will be saved again when Emacs is killed. (or save-place-loaded (load-save-place-alist-from-file)) - (let ((item (or buffer-file-name - (and (derived-mode-p 'dired-mode) - dired-directory - (expand-file-name (if (consp dired-directory) - (car dired-directory) - dired-directory)))))) + (let* ((directory (and (derived-mode-p 'dired-mode) + (dired-current-directory))) + (item (or buffer-file-name + (and directory + (expand-file-name (if (consp directory) + (car directory) + directory)))))) (when (and item (or (not save-place-ignore-files-regexp) (not (string-match save-place-ignore-files-regexp @@ -186,8 +187,7 @@ file: (position (cond ((eq major-mode 'hexl-mode) (with-no-warnings (1+ (hexl-current-address)))) - ((and (derived-mode-p 'dired-mode) - dired-directory) + ((and (derived-mode-p 'dired-mode) directory) (let ((filename (dired-get-filename nil t))) (if filename `((dired-filename . ,filename)) @@ -305,7 +305,7 @@ may have changed) back to `save-place-alist'." ;; save-place checks buffer-file-name too, but we can avoid ;; overhead of function call by checking here too. (and (or buffer-file-name (and (derived-mode-p 'dired-mode) - dired-directory)) + (dired-current-directory))) (save-place-to-alist)) (setq buf-list (cdr buf-list)))))) @@ -325,19 +325,21 @@ may have changed) back to `save-place-alist'." (defun save-place-dired-hook () "Position the point in a Dired buffer." (or save-place-loaded (load-save-place-alist-from-file)) - (let ((cell (assoc (and (derived-mode-p 'dired-mode) - dired-directory - (expand-file-name (if (consp dired-directory) - (car dired-directory) - dired-directory))) - save-place-alist))) + (let* ((directory (and (derived-mode-p 'dired-mode) + (dired-current-directory))) + (cell (assoc (and directory + (expand-file-name (if (consp directory) + (car directory) + directory))) + save-place-alist))) (if cell (progn (or revert-buffer-in-progress-p - (if (integerp (cdr cell)) - (goto-char (cdr cell)) - (and (assq 'dired-filename (cdr cell)) - (dired-goto-file (cdr (assq 'dired-filename (cdr cell))))))) + (cond + ((integerp (cdr cell)) + (goto-char (cdr cell))) + ((and (listp (cdr cell)) (assq 'dired-filename (cdr cell))) + (dired-goto-file (cdr (assq 'dired-filename (cdr cell))))))) ;; and make sure it will be saved again for later (setq save-place t))))) commit c5ac00f08cd0d54848e6cbc02565836e1a423c19 Author: Filipp Gunbin Date: Sat Dec 27 03:25:59 2014 +0300 Fix ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 755499b..52146e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -17,6 +17,11 @@ * progmodes/xref.el (xref--show-xrefs): Use `user-error'. +2014-12-25 Filipp Gunbin + + * dired-aux.el (dired-maybe-insert-subdir): Make + dired-maybe-insert-subdir always skip trivial files. + 2014-12-25 Helmut Eller Dmitry Gutov commit 7a305f8bb5d777caf68702212ef85e7b3cbf765b Author: Paul Eggert Date: Fri Dec 26 13:43:00 2014 -0800 Use bool for boolean in xselect.c, xsettings.c * xselect.c (x_get_local_selection, struct selection_data) (x_selection_request_lisp_error, struct prop_location) (x_handle_selection_request, x_convert_selection) (waiting_for_other_props_on_window, expect_property_change) (wait_for_property_change, x_handle_property_notify) (x_get_foreign_selection, x_get_window_property) (receive_incremental_selection) (x_get_window_property_as_lisp_data) (lisp_data_to_selection_data, Fx_get_selection_internal) (x_send_client_event): * xselect.c, xterm.h (x_handle_dnd_message): * xsettings.c (dpyinfo_valid, parse_settings, read_settings) (apply_xft_settings, read_and_apply_settings) (xft_settings_event, init_gsettings, init_xsettings) (syms_of_xsettings): Use bool for boolean. * xselect.c (x_get_window_property): Omit last arg, which was an unused boolean. * xsettings.c (apply_xft_settings): Remove 2nd arg, which was always true. All callers changed. diff --git a/src/ChangeLog b/src/ChangeLog index 72601fe..e8428ab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2014-12-26 Paul Eggert + + Use bool for boolean in xselect.c, xsettings.c + * xselect.c (x_get_local_selection, struct selection_data) + (x_selection_request_lisp_error, struct prop_location) + (x_handle_selection_request, x_convert_selection) + (waiting_for_other_props_on_window, expect_property_change) + (wait_for_property_change, x_handle_property_notify) + (x_get_foreign_selection, x_get_window_property) + (receive_incremental_selection) + (x_get_window_property_as_lisp_data) + (lisp_data_to_selection_data, Fx_get_selection_internal) + (x_send_client_event): + * xselect.c, xterm.h (x_handle_dnd_message): + * xsettings.c (dpyinfo_valid, parse_settings, read_settings) + (apply_xft_settings, read_and_apply_settings) + (xft_settings_event, init_gsettings, init_xsettings) + (syms_of_xsettings): + Use bool for boolean. + * xselect.c (x_get_window_property): Omit last arg, which was an + unused boolean. + * xsettings.c (apply_xft_settings): Remove 2nd arg, which was + always true. All callers changed. + 2014-12-26 Eli Zaretskii * w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead diff --git a/src/xselect.c b/src/xselect.c index 92e8982..3f8a132 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -46,9 +46,10 @@ struct prop_location; struct selection_data; static void x_decline_selection_request (struct input_event *); -static int x_convert_selection (struct input_event *, Lisp_Object, Lisp_Object, - Atom, int, struct x_display_info *); -static int waiting_for_other_props_on_window (Display *, Window); +static bool x_convert_selection (struct input_event *, Lisp_Object, + Lisp_Object, Atom, bool, + struct x_display_info *); +static bool waiting_for_other_props_on_window (Display *, Window); static struct prop_location *expect_property_change (Display *, Window, Atom, int); static void unexpect_property_change (struct prop_location *); @@ -360,7 +361,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, static Lisp_Object x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, - int local_request, struct x_display_info *dpyinfo) + bool local_request, struct x_display_info *dpyinfo) { Lisp_Object local_value; Lisp_Object handler_fn, value, check; @@ -470,7 +471,7 @@ struct selection_data ptrdiff_t size; int format; Atom type; - int nofree; + bool nofree; Atom property; /* This can be set to non-NULL during x_reply_selection_request, if the selection is waiting for an INCR transfer to complete. Don't @@ -498,7 +499,7 @@ x_selection_request_lisp_error (void) for (cs = converted_selections; cs; cs = next) { next = cs->next; - if (cs->nofree == 0 && cs->data) + if (! cs->nofree && cs->data) xfree (cs->data); xfree (cs); } @@ -531,7 +532,7 @@ struct prop_location Window window; Atom property; int desired_state; - int arrived; + bool arrived; struct prop_location *next; }; @@ -747,7 +748,7 @@ x_handle_selection_request (struct input_event *event) Lisp_Object target_symbol = x_atom_to_symbol (dpyinfo, target); Atom property = SELECTION_EVENT_PROPERTY (event); Lisp_Object local_selection_data; - int success = 0; + bool success = false; ptrdiff_t count = SPECPDL_INDEX (); GCPRO2 (local_selection_data, target_symbol); @@ -805,9 +806,9 @@ x_handle_selection_request (struct input_event *event) if (subproperty != None) x_convert_selection (event, selection_symbol, subtarget, - subproperty, 1, dpyinfo); + subproperty, true, dpyinfo); } - success = 1; + success = true; } else { @@ -815,7 +816,7 @@ x_handle_selection_request (struct input_event *event) property = SELECTION_EVENT_TARGET (event); success = x_convert_selection (event, selection_symbol, target_symbol, property, - 0, dpyinfo); + false, dpyinfo); } DONE: @@ -844,15 +845,15 @@ x_handle_selection_request (struct input_event *event) /* Perform the requested selection conversion, and write the data to the converted_selections linked list, where it can be accessed by - x_reply_selection_request. If FOR_MULTIPLE is non-zero, write out + x_reply_selection_request. If FOR_MULTIPLE, write out the data even if conversion fails, using conversion_fail_tag. - Return 0 if the selection failed to convert, 1 otherwise. */ + Return true iff successful. */ -static int +static bool x_convert_selection (struct input_event *event, Lisp_Object selection_symbol, Lisp_Object target_symbol, Atom property, - int for_multiple, struct x_display_info *dpyinfo) + bool for_multiple, struct x_display_info *dpyinfo) { struct gcpro gcpro1; Lisp_Object lisp_selection; @@ -861,7 +862,7 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol, lisp_selection = x_get_local_selection (selection_symbol, target_symbol, - 0, dpyinfo); + false, dpyinfo); /* A nil return value means we can't perform the conversion. */ if (NILP (lisp_selection) @@ -874,7 +875,7 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol, cs->size = 1; cs->format = 32; cs->type = XA_ATOM; - cs->nofree = 1; + cs->nofree = true; cs->property = property; cs->wait_object = NULL; cs->next = converted_selections; @@ -882,20 +883,20 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol, } UNGCPRO; - return 0; + return false; } /* Otherwise, record the converted selection to binary. */ cs = xmalloc (sizeof *cs); cs->data = NULL; - cs->nofree = 1; + cs->nofree = true; cs->property = property; cs->wait_object = NULL; cs->next = converted_selections; converted_selections = cs; lisp_data_to_selection_data (dpyinfo, lisp_selection, cs); UNGCPRO; - return 1; + return true; } /* Handle a SelectionClear event EVENT, which indicates that some @@ -1012,19 +1013,16 @@ x_clear_frame_selections (struct frame *f) } } -/* Nonzero if any properties for DISPLAY and WINDOW +/* True if any properties for DISPLAY and WINDOW are on the list of what we are waiting for. */ -static int +static bool waiting_for_other_props_on_window (Display *display, Window window) { - struct prop_location *rest = property_change_wait_list; - while (rest) - if (rest->display == display && rest->window == window) - return 1; - else - rest = rest->next; - return 0; + for (struct prop_location *p = property_change_wait_list; p; p = p->next) + if (p->display == display && p->window == window) + return true; + return false; } /* Add an entry to the list of property changes we are waiting for. @@ -1043,7 +1041,7 @@ expect_property_change (Display *display, Window window, pl->property = property; pl->desired_state = state; pl->next = property_change_wait_list; - pl->arrived = 0; + pl->arrived = false; property_change_wait_list = pl; return pl; } @@ -1106,7 +1104,7 @@ wait_for_property_change (struct prop_location *location) EMACS_INT secs = timeout / 1000; int nsecs = (timeout % 1000) * 1000000; TRACE2 (" Waiting %"pI"d secs, %d nsecs", secs, nsecs); - wait_reading_process_output (secs, nsecs, 0, 0, + wait_reading_process_output (secs, nsecs, 0, false, property_change_reply, NULL, 0); if (NILP (XCAR (property_change_reply))) @@ -1138,7 +1136,7 @@ x_handle_property_notify (const XPropertyEvent *event) (event->state == PropertyDelete ? "deletion" : "change"), XGetAtomName (event->display, event->atom)); - rest->arrived = 1; + rest->arrived = true; /* If this is the one wait_for_property_change is waiting for, tell it to wake up. */ @@ -1204,7 +1202,7 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type, during this time. In fact, the SAVE_TARGETS mechanism requires us to handle a clipboard manager's requests before it returns SelectionNotify. */ -#if 0 +#if false x_start_queuing_selection_requests (); record_unwind_protect_void (x_stop_queuing_selection_requests); #endif @@ -1216,7 +1214,7 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type, secs = timeout / 1000; nsecs = (timeout % 1000) * 1000000; TRACE1 (" Start waiting %"pI"d secs for SelectionNotify", secs); - wait_reading_process_output (secs, nsecs, 0, 0, + wait_reading_process_output (secs, nsecs, 0, false, reading_selection_reply, NULL, 0); TRACE1 (" Got event = %d", !NILP (XCAR (reading_selection_reply))); @@ -1240,7 +1238,7 @@ static void x_get_window_property (Display *display, Window window, Atom property, unsigned char **data_ret, ptrdiff_t *bytes_ret, Atom *actual_type_ret, int *actual_format_ret, - unsigned long *actual_size_ret, int delete_p) + unsigned long *actual_size_ret) { ptrdiff_t total_size; unsigned long bytes_remaining; @@ -1413,7 +1411,7 @@ receive_incremental_selection (struct x_display_info *dpyinfo, XFlush (display); unblock_input (); - while (1) + while (true) { unsigned char *tmp_data; ptrdiff_t tmp_size_bytes; @@ -1427,7 +1425,7 @@ receive_incremental_selection (struct x_display_info *dpyinfo, TRACE0 (" Get property value"); x_get_window_property (display, window, property, &tmp_data, &tmp_size_bytes, - type_ret, format_ret, size_ret, 1); + type_ret, format_ret, size_ret); TRACE1 (" Read increment of %"pD"d bytes", tmp_size_bytes); @@ -1488,13 +1486,12 @@ x_get_window_property_as_lisp_data (struct x_display_info *dpyinfo, TRACE0 ("Reading selection data"); x_get_window_property (display, window, property, &data, &bytes, - &actual_type, &actual_format, &actual_size, 1); + &actual_type, &actual_format, &actual_size); if (! data) { - int there_is_a_selection_owner; block_input (); - there_is_a_selection_owner - = XGetSelectionOwner (display, selection_atom); + bool there_is_a_selection_owner + = XGetSelectionOwner (display, selection_atom) != 0; unblock_input (); if (there_is_a_selection_owner) signal_error ("Selection owner couldn't convert", @@ -1687,7 +1684,7 @@ lisp_data_to_selection_data (struct x_display_info *dpyinfo, Lisp_Object type = Qnil; eassert (cs != NULL); - cs->nofree = 0; + cs->nofree = false; if (CONSP (obj) && SYMBOLP (XCAR (obj))) { @@ -1714,7 +1711,7 @@ lisp_data_to_selection_data (struct x_display_info *dpyinfo, cs->format = 8; cs->size = SBYTES (obj); cs->data = SDATA (obj); - cs->nofree = 1; + cs->nofree = true; } else if (SYMBOLP (obj)) { @@ -1981,7 +1978,7 @@ On Nextstep, TIME-STAMP and TERMINAL are unused. */) if (!f) error ("X selection unavailable for this frame"); - val = x_get_local_selection (selection_symbol, target_type, 1, + val = x_get_local_selection (selection_symbol, target_type, true, FRAME_DISPLAY_INFO (f)); if (NILP (val) && FRAME_LIVE_P (f)) @@ -2432,7 +2429,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */) /* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ -int +bool x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp) { @@ -2448,7 +2445,7 @@ x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event, for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) if (dpyinfo->x_dnd_atoms[i] == event->message_type) break; - if (i == dpyinfo->x_dnd_atoms_length) return 0; + if (i == dpyinfo->x_dnd_atoms_length) return false; XSETFRAME (frame, f); @@ -2484,7 +2481,7 @@ x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event, bufp->arg = vec; bufp->modifiers = 0; - return 1; + return true; } DEFUN ("x-send-client-message", Fx_send_client_message, @@ -2535,7 +2532,7 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Window wdest; XEvent event; struct frame *f = decode_window_system_frame (from); - int to_root; + bool to_root; CHECK_NUMBER (format); CHECK_CONS (values); @@ -2592,7 +2589,7 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, event then goes to clients selecting for events on the root window. */ x_catch_errors (dpyinfo->display); { - int propagate = to_root ? False : True; + bool propagate = !to_root; long mask = to_root ? 0xffffff : 0; XSendEvent (dpyinfo->display, wdest, propagate, mask, &event); diff --git a/src/xsettings.c b/src/xsettings.c index 5f4275d..afdeab9 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -68,11 +68,11 @@ store_config_changed_event (Lisp_Object arg, Lisp_Object display_name) kbd_buffer_store_event (&event); } -/* Return non-zero if DPYINFO is still valid. */ -static int +/* Return true if DPYINFO is still valid. */ +static bool dpyinfo_valid (struct x_display_info *dpyinfo) { - int found = 0; + bool found = false; if (dpyinfo != NULL) { struct x_display_info *d; @@ -419,7 +419,7 @@ parse_settings (unsigned char *prop, CARD32 vlen, ival = 0; char name[128]; /* The names we are looking for are not this long. */ char sval[128]; /* The values we are looking for are not this long. */ - int want_this; + bool want_this; int to_cpy; sval[0] = '\0'; @@ -565,9 +565,9 @@ parse_settings (unsigned char *prop, /* Read settings from the XSettings property window on display for DPYINFO. Store settings read in SETTINGS. - Return non-zero if successful, zero if not. */ + Return true iff successful. */ -static int +static bool read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) { Atom act_type; @@ -597,17 +597,16 @@ read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) } /* Apply Xft settings in SETTINGS to the Xft library. - If SEND_EVENT_P is non-zero store a Lisp event that Xft settings changed. */ + Store a Lisp event that Xft settings changed. */ static void apply_xft_settings (struct x_display_info *dpyinfo, - int send_event_p, struct xsettings *settings) { #ifdef HAVE_XFT FcPattern *pat; struct xsettings oldsettings; - int changed = 0; + bool changed = false; memset (&oldsettings, 0, sizeof (oldsettings)); pat = FcPatternCreate (); @@ -627,7 +626,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, { FcPatternDel (pat, FC_ANTIALIAS); FcPatternAddBool (pat, FC_ANTIALIAS, settings->aa); - ++changed; + changed = true; oldsettings.aa = settings->aa; } @@ -636,7 +635,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, { FcPatternDel (pat, FC_HINTING); FcPatternAddBool (pat, FC_HINTING, settings->hinting); - ++changed; + changed = true; oldsettings.hinting = settings->hinting; } if ((settings->seen & SEEN_RGBA) != 0 && oldsettings.rgba != settings->rgba) @@ -644,7 +643,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, FcPatternDel (pat, FC_RGBA); FcPatternAddInteger (pat, FC_RGBA, settings->rgba); oldsettings.rgba = settings->rgba; - ++changed; + changed = true; } /* Older fontconfig versions don't have FC_LCD_FILTER. */ @@ -653,7 +652,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, { FcPatternDel (pat, FC_LCD_FILTER); FcPatternAddInteger (pat, FC_LCD_FILTER, settings->lcdfilter); - ++changed; + changed = true; oldsettings.lcdfilter = settings->lcdfilter; } @@ -663,7 +662,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, { FcPatternDel (pat, FC_HINT_STYLE); FcPatternAddInteger (pat, FC_HINT_STYLE, settings->hintstyle); - ++changed; + changed = true; oldsettings.hintstyle = settings->hintstyle; } #endif @@ -673,7 +672,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, { FcPatternDel (pat, FC_DPI); FcPatternAddDouble (pat, FC_DPI, settings->dpi); - ++changed; + changed = true; oldsettings.dpi = settings->dpi; /* Changing the DPI on this display affects all frames on it. @@ -699,9 +698,8 @@ apply_xft_settings (struct x_display_info *dpyinfo, char buf[sizeof format + d_formats * d_growth + lf_formats * lf_growth]; XftDefaultSet (dpyinfo->display, pat); - if (send_event_p) - store_config_changed_event (Qfont_render, - XCAR (dpyinfo->name_list_element)); + store_config_changed_event (Qfont_render, + XCAR (dpyinfo->name_list_element)); Vxft_settings = make_formatted_string (buf, format, oldsettings.aa, oldsettings.hinting, @@ -715,17 +713,17 @@ apply_xft_settings (struct x_display_info *dpyinfo, } /* Read XSettings from the display for DPYINFO. - If SEND_EVENT_P is non-zero store a Lisp event settings that changed. */ + If SEND_EVENT_P store a Lisp event settings that changed. */ static void -read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p) +read_and_apply_settings (struct x_display_info *dpyinfo, bool send_event_p) { struct xsettings settings; if (!read_settings (dpyinfo, &settings)) return; - apply_xft_settings (dpyinfo, True, &settings); + apply_xft_settings (dpyinfo, &settings); if (settings.seen & SEEN_TB_STYLE) { if (send_event_p) @@ -751,27 +749,27 @@ read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p) void xft_settings_event (struct x_display_info *dpyinfo, const XEvent *event) { - bool check_window_p = 0, apply_settings_p = 0; + bool check_window_p = false, apply_settings_p = false; switch (event->type) { case DestroyNotify: if (dpyinfo->xsettings_window == event->xany.window) - check_window_p = 1; + check_window_p = true; break; case ClientMessage: if (event->xclient.message_type == dpyinfo->Xatom_xsettings_mgr && event->xclient.data.l[1] == dpyinfo->Xatom_xsettings_sel && event->xclient.window == dpyinfo->root_window) - check_window_p = 1; + check_window_p = true; break; case PropertyNotify: if (event->xproperty.window == dpyinfo->xsettings_window && event->xproperty.state == PropertyNewValue && event->xproperty.atom == dpyinfo->Xatom_xsettings_prop) - apply_settings_p = 1; + apply_settings_p = true; break; } @@ -781,11 +779,11 @@ xft_settings_event (struct x_display_info *dpyinfo, const XEvent *event) dpyinfo->xsettings_window = None; get_prop_window (dpyinfo); if (dpyinfo->xsettings_window != None) - apply_settings_p = 1; + apply_settings_p = true; } if (apply_settings_p) - read_and_apply_settings (dpyinfo, True); + read_and_apply_settings (dpyinfo, true); } /* Initialize GSettings and read startup values. */ @@ -795,7 +793,7 @@ init_gsettings (void) { #ifdef HAVE_GSETTINGS GVariant *val; - int schema_found = 0; + bool schema_found = false; #if ! GLIB_CHECK_VERSION (2, 36, 0) g_type_init (); @@ -937,7 +935,7 @@ init_xsettings (struct x_display_info *dpyinfo) get_prop_window (dpyinfo); if (dpyinfo->xsettings_window != None) - read_and_apply_settings (dpyinfo, False); + read_and_apply_settings (dpyinfo, false); unblock_input (); } @@ -1030,7 +1028,7 @@ syms_of_xsettings (void) When this is non-nil and the system defined fixed width font changes, we update frames dynamically. If this variable is nil, Emacs ignores system font changes. */); - use_system_font = 0; + use_system_font = false; DEFVAR_LISP ("xft-settings", Vxft_settings, doc: /* Font settings applied to Xft. */); diff --git a/src/xterm.h b/src/xterm.h index 84bb58c..13877d3 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1049,10 +1049,10 @@ extern void x_send_client_event (Lisp_Object display, Lisp_Object format, Lisp_Object values); -extern int x_handle_dnd_message (struct frame *, - const XClientMessageEvent *, - struct x_display_info *, - struct input_event *); +extern bool x_handle_dnd_message (struct frame *, + const XClientMessageEvent *, + struct x_display_info *, + struct input_event *); extern int x_check_property_data (Lisp_Object); extern void x_fill_property_data (Display *, Lisp_Object, commit 7284a174abc03c9ccf45aa43c939585beea351b7 Author: Fabián Ezequiel Gallina Date: Fri Dec 26 17:59:33 2014 -0300 python.el: Generate clearer shell buffer names. * lisp/progmodes/python.el (python-shell-get-process-name) (python-shell-internal-get-process-name): Use `buffer-name`. (python-shell-internal-get-or-create-process): Simplify. * test/automated/python-tests.el (python-shell-get-process-name-1) (python-shell-internal-get-process-name-1): Cleanup. (python-shell-get-process-name-2) (python-shell-internal-get-process-name-2): New tests. (python-shell-calculate-command-1) (python-shell-calculate-process-environment-3) (python-shell-calculate-exec-path-2, python-shell-make-comint-1) (python-shell-make-comint-2, python-shell-make-comint-4) (python-shell-get-process-1, python-util-clone-local-variables-1): Replace obsolete function and variable references with current. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d231a4..755499b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2014-12-26 Fabián Ezequiel Gallina + + python.el: Generate clearer shell buffer names. + + * progmodes/python.el (python-shell-get-process-name) + (python-shell-internal-get-process-name): Use `buffer-name`. + (python-shell-internal-get-or-create-process): Simplify. + 2014-12-26 Dmitry Gutov Add basic xref apropos implementation to elisp-mode. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 47c6a90..bd8c734 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2087,36 +2087,18 @@ and `python-shell-output-prompt-regexp' using the values from (defun python-shell-get-process-name (dedicated) "Calculate the appropriate process name for inferior Python process. -If DEDICATED is t and the variable `buffer-file-name' is non-nil -returns a string with the form -`python-shell-buffer-name'[variable `buffer-file-name'] else -returns the value of `python-shell-buffer-name'." - (let ((process-name - (if (and dedicated - buffer-file-name) - (format "%s[%s]" python-shell-buffer-name buffer-file-name) - (format "%s" python-shell-buffer-name)))) - process-name)) +If DEDICATED is t returns a string with the form +`python-shell-buffer-name'[`buffer-name'] else returns the value +of `python-shell-buffer-name'." + (if dedicated + (format "%s[%s]" python-shell-buffer-name (buffer-name)) + python-shell-buffer-name)) (defun python-shell-internal-get-process-name () "Calculate the appropriate process name for Internal Python process. The name is calculated from `python-shell-global-buffer-name' and -a hash of all relevant global shell settings in order to ensure -uniqueness for different types of configurations." - (format "%s [%s]" - python-shell-internal-buffer-name - (md5 - (concat - python-shell-interpreter - python-shell-interpreter-args - python-shell--prompt-calculated-input-regexp - python-shell--prompt-calculated-output-regexp - (mapconcat #'symbol-value python-shell-setup-codes "") - (mapconcat #'identity python-shell-process-environment "") - (mapconcat #'identity python-shell-extra-pythonpaths "") - (mapconcat #'identity python-shell-exec-path "") - (or python-shell-virtualenv-root "") - (mapconcat #'identity python-shell-exec-path ""))))) +the `buffer-name'." + (format "%s[%s]" python-shell-internal-buffer-name (buffer-name))) (defun python-shell-calculate-command () "Calculate the string used to execute the inferior Python process." @@ -2606,12 +2588,10 @@ there for compatibility with CEDET.") (defun python-shell-internal-get-or-create-process () "Get or create an inferior Internal Python process." - (let* ((proc-name (python-shell-internal-get-process-name)) - (proc-buffer-name (format " *%s*" proc-name))) - (when (not (process-live-p proc-name)) - (run-python-internal) - (setq python-shell-internal-buffer proc-buffer-name)) - (get-buffer-process proc-buffer-name))) + (let ((proc-name (python-shell-internal-get-process-name))) + (if (process-live-p proc-name) + (get-process proc-name) + (run-python-internal)))) (define-obsolete-function-alias 'python-proc 'python-shell-internal-get-or-create-process "24.3") diff --git a/test/ChangeLog b/test/ChangeLog index 7d33014..fda30d9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,16 @@ +2014-12-26 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-shell-get-process-name-1) + (python-shell-internal-get-process-name-1): Cleanup. + (python-shell-get-process-name-2) + (python-shell-internal-get-process-name-2): New tests. + (python-shell-calculate-command-1) + (python-shell-calculate-process-environment-3) + (python-shell-calculate-exec-path-2, python-shell-make-comint-1) + (python-shell-make-comint-2, python-shell-make-comint-4) + (python-shell-get-process-1, python-util-clone-local-variables-1): + Replace obsolete function and variable references with current. + 2014-12-19 Artur Malabarba * automated/let-alist.el: require `cl-lib' diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index de20a80..fd42794 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -1775,52 +1775,41 @@ def f(): (defvar python-tests-shell-interpreter "python") (ert-deftest python-shell-get-process-name-1 () - "Check process name calculation on different scenarios." + "Check process name calculation sans `buffer-file-name'." (python-tests-with-temp-buffer - "" - (should (string= (python-shell-get-process-name nil) - python-shell-buffer-name)) - ;; When the `current-buffer' doesn't have `buffer-file-name', even - ;; if dedicated flag is non-nil should not include its name. - (should (string= (python-shell-get-process-name t) - python-shell-buffer-name))) + "" + (should (string= (python-shell-get-process-name nil) + python-shell-buffer-name)) + (should (string= (python-shell-get-process-name t) + (format "%s[%s]" python-shell-buffer-name (buffer-name)))))) + +(ert-deftest python-shell-get-process-name-2 () + "Check process name calculation with `buffer-file-name'." (python-tests-with-temp-file - "" - ;; `buffer-file-name' is non-nil but the dedicated flag is nil and - ;; should be respected. - (should (string= (python-shell-get-process-name nil) - python-shell-buffer-name)) - (should (string= - (python-shell-get-process-name t) - (format "%s[%s]" python-shell-buffer-name buffer-file-name))))) + "" + ;; `buffer-file-name' is non-nil but the dedicated flag is nil and + ;; should be respected. + (should (string= (python-shell-get-process-name nil) + python-shell-buffer-name)) + (should (string= + (python-shell-get-process-name t) + (format "%s[%s]" python-shell-buffer-name (buffer-name)))))) (ert-deftest python-shell-internal-get-process-name-1 () - "Check the internal process name is config-unique." - (let* ((python-shell-interpreter python-tests-shell-interpreter) - (python-shell-interpreter-args "") - (python-shell-prompt-regexp ">>> ") - (python-shell-prompt-block-regexp "[.][.][.] ") - (python-shell-setup-codes "") - (python-shell-process-environment "") - (python-shell-extra-pythonpaths "") - (python-shell-exec-path "") - (python-shell-virtualenv-path "") - (expected (python-tests-with-temp-buffer - "" (python-shell-internal-get-process-name)))) - ;; Same configurations should match. - (should - (string= expected - (python-tests-with-temp-buffer - "" (python-shell-internal-get-process-name)))) - (let ((python-shell-interpreter-args "-B")) - ;; A minimal change should generate different names. - (should - (not (string= - expected - (python-tests-with-temp-buffer - "" (python-shell-internal-get-process-name)))))))) - -(ert-deftest python-shell-parse-command-1 () + "Check the internal process name is buffer-unique sans `buffer-file-name'." + (python-tests-with-temp-buffer + "" + (should (string= (python-shell-internal-get-process-name) + (format "%s[%s]" python-shell-internal-buffer-name (buffer-name)))))) + +(ert-deftest python-shell-internal-get-process-name-2 () + "Check the internal process name is buffer-unique with `buffer-file-name'." + (python-tests-with-temp-file + "" + (should (string= (python-shell-internal-get-process-name) + (format "%s[%s]" python-shell-internal-buffer-name (buffer-name)))))) + +(ert-deftest python-shell-calculate-command-1 () "Check the command to execute is calculated correctly. Using `python-shell-interpreter' and `python-shell-interpreter-args'." @@ -1832,7 +1821,7 @@ Using `python-shell-interpreter' and (format "%s %s" python-shell-interpreter python-shell-interpreter-args) - (python-shell-parse-command))))) + (python-shell-calculate-command))))) (ert-deftest python-shell-calculate-process-environment-1 () "Test `python-shell-process-environment' modification." @@ -1857,17 +1846,17 @@ Using `python-shell-interpreter' and path-separator original-pythonpath))))) (ert-deftest python-shell-calculate-process-environment-3 () - "Test `python-shell-virtualenv-path' modification." + "Test `python-shell-virtualenv-root' modification." (let* ((original-path (or (getenv "PATH") "")) - (python-shell-virtualenv-path + (python-shell-virtualenv-root (directory-file-name user-emacs-directory)) (process-environment (python-shell-calculate-process-environment))) (should (not (getenv "PYTHONHOME"))) - (should (string= (getenv "VIRTUAL_ENV") python-shell-virtualenv-path)) + (should (string= (getenv "VIRTUAL_ENV") python-shell-virtualenv-root)) (should (equal (getenv "PATH") (format "%s/bin%s%s" - python-shell-virtualenv-path + python-shell-virtualenv-root path-separator original-path))))) (ert-deftest python-shell-calculate-process-environment-4 () @@ -1900,13 +1889,13 @@ Using `python-shell-interpreter' and (ert-deftest python-shell-calculate-exec-path-2 () "Test `python-shell-exec-path' modification." (let* ((original-exec-path exec-path) - (python-shell-virtualenv-path + (python-shell-virtualenv-root (directory-file-name (expand-file-name user-emacs-directory))) (exec-path (python-shell-calculate-exec-path))) (should (equal exec-path (append (cons - (format "%s/bin" python-shell-virtualenv-path) + (format "%s/bin" python-shell-virtualenv-root) original-exec-path)))))) (ert-deftest python-shell-make-comint-1 () @@ -1922,7 +1911,7 @@ Using `python-shell-interpreter' and (shell-buffer (python-tests-with-temp-buffer "" (python-shell-make-comint - (python-shell-parse-command) proc-name))) + (python-shell-calculate-command) proc-name))) (process (get-buffer-process shell-buffer))) (unwind-protect (progn @@ -1943,7 +1932,7 @@ Using `python-shell-interpreter' and (shell-buffer (python-tests-with-temp-buffer "" (python-shell-make-comint - (python-shell-parse-command) proc-name nil t))) + (python-shell-calculate-command) proc-name nil t))) (process (get-buffer-process shell-buffer))) (unwind-protect (progn @@ -2010,7 +1999,7 @@ and `python-shell-interpreter-args' in the new shell buffer." (setenv "PYTHONSTARTUP" startup-file) (python-tests-with-temp-buffer "" (python-shell-make-comint - (python-shell-parse-command) proc-name nil)))) + (python-shell-calculate-command) proc-name nil)))) (process (get-buffer-process shell-buffer))) (unwind-protect (progn @@ -2040,10 +2029,10 @@ and `python-shell-interpreter-args' in the new shell buffer." (dedicated-proc-name (python-shell-get-process-name t)) (global-shell-buffer (python-shell-make-comint - (python-shell-parse-command) global-proc-name)) + (python-shell-calculate-command) global-proc-name)) (dedicated-shell-buffer (python-shell-make-comint - (python-shell-parse-command) dedicated-proc-name)) + (python-shell-calculate-command) dedicated-proc-name)) (global-process (get-buffer-process global-shell-buffer)) (dedicated-process (get-buffer-process dedicated-shell-buffer))) (unwind-protect @@ -3767,7 +3756,7 @@ def foo(a, b, c): . "from IPython.core.completerlib import module_completion") (python-shell-completion-string-code . "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") - (python-shell-virtualenv-path + (python-shell-virtualenv-root . "/home/user/.virtualenvs/project")))) (with-current-buffer buffer (kill-all-local-variables) commit 8cf42182b8da79bb4a2f2f704fa0d627304f5165 Author: Fabián Ezequiel Gallina Date: Fri Dec 26 17:14:18 2014 -0300 Revert "Prevent Python process shell buffer to pop twice." This reverts commit 4256626a7ac486446f4dea9c12df3057053825a7. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c6b23d..8d231a4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4645,12 +4645,6 @@ 2014-07-28 Fabián Ezequiel Gallina - Prevent Python process shell buffer to pop twice. - * progmodes/python.el (python-shell-switch-to-shell): Do not call - pop-to-buffer. - -2014-07-28 Fabián Ezequiel Gallina - * progmodes/python.el (python-shell-with-shell-buffer): New macro. (python-shell-font-lock-get-or-create-buffer) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 35e24e1..47c6a90 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2860,7 +2860,7 @@ If DELETE is non-nil, delete the file afterwards." (defun python-shell-switch-to-shell () "Switch to inferior Python process buffer." (interactive) - (process-buffer (python-shell-get-or-create-process)) t) + (pop-to-buffer (process-buffer (python-shell-get-or-create-process)) t)) (defun python-shell-send-setup-code () "Send all setup code for shell. commit 807c3413c478be964f24b5ecc44712ce3358001e Author: Dmitry Gutov Date: Fri Dec 26 18:34:47 2014 +0200 Add basic xref apropos implementation to elisp-mode * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Filter out nil results. (elisp--xref-find-apropos): New function. (elisp-xref-find): Use it. * lisp/progmodes/xref.el (xref--show-xrefs): Use `user-error'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2bee14..4c6b23d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2014-12-26 Dmitry Gutov + + Add basic xref apropos implementation to elisp-mode. + + * progmodes/elisp-mode.el (elisp--xref-find-definitions): + Filter out nil results. + (elisp--xref-find-apropos): New function. + (elisp-xref-find): Use it. + + * progmodes/xref.el (xref--show-xrefs): Use `user-error'. + 2014-12-25 Helmut Eller Dmitry Gutov diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index e73c20d..ef619f0 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -577,27 +577,39 @@ It can be quoted, or be inside a quoted form." (declare-function xref-make "xref" (description location)) (defun elisp-xref-find (action id) - (when (eq action 'definitions) - (let ((sym (intern-soft id))) - (when sym - (remove nil (elisp--xref-find-definitions sym)))))) + (pcase action + (`definitions + (let ((sym (intern-soft id))) + (when sym + (elisp--xref-find-definitions sym)))) + (`apropos + (elisp--xref-find-apropos id)))) (defun elisp--xref-find-definitions (symbol) (save-excursion - (mapcar - (lambda (type) - (let ((loc - (condition-case err - (let ((buf-pos (elisp--identifier-location type symbol))) - (when buf-pos - (xref-make-buffer-location (car buf-pos) - (or (cdr buf-pos) 1)))) - (error - (xref-make-bogus-location (error-message-string err)))))) - (when loc - (xref-make (format "(%s %s)" type symbol) - loc)))) - elisp--identifier-types))) + (let (lst) + (dolist (type elisp--identifier-types) + (let ((loc + (condition-case err + (let ((buf-pos (elisp--identifier-location type symbol))) + (when buf-pos + (xref-make-buffer-location (car buf-pos) + (or (cdr buf-pos) 1)))) + (error + (xref-make-bogus-location (error-message-string err)))))) + (when loc + (push + (xref-make (format "(%s %s)" type symbol) + loc) + lst)))) + lst))) + +(defun elisp--xref-find-apropos (regexp) + (apply #'nconc + (let (lst) + (dolist (sym (apropos-internal regexp)) + (push (elisp--xref-find-definitions sym) lst)) + (nreverse lst)))) (defun elisp--xref-identifier-completion-table () elisp--identifier-completion-table) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 02e02de..21c0d6a 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -414,7 +414,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defun xref--show-xrefs (id kind xrefs window) (cond ((null xrefs) - (error "No known %s for: %s" kind id)) + (user-error "No known %s for: %s" kind id)) ((not (cdr xrefs)) (xref-push-marker-stack) (xref--pop-to-location (xref--xref-location (car xrefs)) window)) commit f4a6345114b02fb725192aa548f2e84096fbaae6 Author: Filipp Gunbin Date: Thu Dec 25 21:17:43 2014 +0300 make dired-maybe-insert-subdir always skip trivial files diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index bb93cce..acc7e76 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2062,7 +2062,10 @@ See Info node `(emacs)Subdir switches' for more details." ;; inserted *after* opoint. (setq dirname (file-name-as-directory dirname)) (or (and (not switches) - (dired-goto-subdir dirname)) + (when (dired-goto-subdir dirname) + (unless (dired-subdir-hidden-p dirname) + (dired-initial-position dirname)) + t)) (dired-insert-subdir dirname switches no-error-if-not-dir-p)) ;; Push mark so that it's easy to find back. Do this after the ;; insert message so that the user sees the `Mark set' message. commit d65526283d517e0b97b0c74af75bb2e869db4dae Author: Eli Zaretskii Date: Fri Dec 26 11:52:24 2014 +0200 MS-Windows followup to stpcpy changes. src/w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead of strcat. src/w32menu.c (add_menu_item): Use stpcpy instead of strcat. src/w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of strcat. nt/gnulib.mk (stpcpy, string): Sync with the latest change in lib/gnulib.mk. diff --git a/nt/ChangeLog b/nt/ChangeLog index 1edfda0..2467e64 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2014-12-26 Eli Zaretskii + + * gnulib.mk (stpcpy, string): Sync with the latest change in + lib/gnulib.mk. + 2014-12-13 Eli Zaretskii * gnulib.mk (stddef.h): Sync with the latest change in lib/gnulib.mk. diff --git a/nt/gnulib.mk b/nt/gnulib.mk index 273f522..a5dca96 100644 --- a/nt/gnulib.mk +++ b/nt/gnulib.mk @@ -43,7 +43,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --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=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=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --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 intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --dir=. --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=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=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --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 intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings MOSTLYCLEANFILES += core *.stackdump @@ -771,6 +771,15 @@ EXTRA_DIST += stdint.in.h ## end gnulib module stdint +## begin gnulib module stpcpy + + +EXTRA_DIST += stpcpy.c + +EXTRA_libgnu_a_SOURCES += stpcpy.c + +## end gnulib module stpcpy + ## begin gnulib module strftime libgnu_a_SOURCES += strftime.c @@ -779,6 +788,106 @@ EXTRA_DIST += strftime.h ## end gnulib module strftime +## begin gnulib module string + +BUILT_SOURCES += string.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ + -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ + -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ + -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ + -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ + -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ + -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ + -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ + -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ + -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ + -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ + -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ + -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ + -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ + -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ + -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ + -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ + -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ + -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ + -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ + -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ + -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ + -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ + -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ + -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ + -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ + -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ + -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ + -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ + -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ + -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ + -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ + -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ + -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ + -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ + -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ + -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ + < $(srcdir)/string.in.h | \ + sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ + -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ + -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ + -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ + -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ + -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ + -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ + -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ + -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ + -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ + -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ + -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ + -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ + -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ + -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ + -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ + -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ + -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ + -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ + -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ + -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ + -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ + -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ + -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ + -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ + -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ + -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ + -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ + -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + < $(srcdir)/string.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += string.h string.h-t + +EXTRA_DIST += string.in.h + +## end gnulib module string + ## begin gnulib module strtoimax diff --git a/src/ChangeLog b/src/ChangeLog index f3bc9fd..72601fe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2014-12-26 Eli Zaretskii + + * w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead + of strcat. + + * w32menu.c (add_menu_item): Use stpcpy instead of strcat. + + * w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of + strcat. + 2014-12-26 Paul Eggert Use bool for boolean in xsmfns.c diff --git a/src/w32.c b/src/w32.c index 8d8f536..6dea0c2 100644 --- a/src/w32.c +++ b/src/w32.c @@ -3405,10 +3405,10 @@ sys_readdir (DIR *dirp) int ln; strcpy (filename, dir_pathname); - ln = strlen (filename) - 1; - if (!IS_DIRECTORY_SEP (filename[ln])) - strcat (filename, "\\"); - strcat (filename, "*"); + ln = strlen (filename); + if (!IS_DIRECTORY_SEP (filename[ln - 1])) + filename[ln++] = '\\'; + strcpy (filename + ln, "*"); /* Note: No need to resolve symlinks in FILENAME, because FindFirst opens the directory that is the target of a @@ -4969,7 +4969,7 @@ stat_worker (const char * path, struct stat * buf, int follow_symlinks) { /* Make sure root directories end in a slash. */ if (!IS_DIRECTORY_SEP (name[len-1])) - strcat (name, "\\"); + strcpy (name + len, "\\"); if (GetDriveType (name) < 2) { errno = ENOENT; @@ -5438,8 +5438,7 @@ symlink (char const *filename, char const *linkname) p--; if (p > linkfn) strncpy (tem, linkfn, p - linkfn); - tem[p - linkfn] = '\0'; - strcat (tem, filename); + strcpy (tem + (p - linkfn), filename); dir_access = faccessat (AT_FDCWD, tem, D_OK, AT_EACCESS); } else diff --git a/src/w32menu.c b/src/w32menu.c index 6633ffd..287062c 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1256,9 +1256,9 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) if (wv->key != NULL) { out_string = SAFE_ALLOCA (strlen (wv->name) + strlen (wv->key) + 2); - strcpy (out_string, wv->name); - strcat (out_string, "\t"); - strcat (out_string, wv->key); + p = stpcpy (out_string, wv->name); + p = stpcpy (p, "\t"); + strcpy (p, wv->key); } else out_string = (char *)wv->name; diff --git a/src/w32proc.c b/src/w32proc.c index 09e0c05..c571726 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -1665,10 +1665,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) if (egetenv ("CMDPROXY")) strcpy (cmdname, egetenv ("CMDPROXY")); else - { - lispstpcpy (cmdname, Vinvocation_directory); - strcat (cmdname, "cmdproxy.exe"); - } + strcpy (lispstpcpy (cmdname, Vinvocation_directory), "cmdproxy.exe"); /* Can't use unixtodos_filename here, since that needs its file name argument encoded in UTF-8. */ @@ -3183,18 +3180,20 @@ get_lcid_callback (LPTSTR locale_num_str) if (GetLocaleInfo (try_lcid, LOCALE_SABBREVLANGNAME, locval, LOCALE_NAME_MAX_LENGTH)) { + size_t locval_len; + /* This is for when they only specify the language, as in "ENU". */ if (stricmp (locval, lname) == 0) { found_lcid = try_lcid; return FALSE; } - strcat (locval, "_"); + locval_len = strlen (locval); + strcpy (locval + locval_len, "_"); if (GetLocaleInfo (try_lcid, LOCALE_SABBREVCTRYNAME, - locval + strlen (locval), LOCALE_NAME_MAX_LENGTH)) + locval + locval_len + 1, LOCALE_NAME_MAX_LENGTH)) { - size_t locval_len = strlen (locval); - + locval_len = strlen (locval); if (strnicmp (locval, lname, locval_len) == 0 && (lname[locval_len] == '.' || lname[locval_len] == '\0')) commit f76956645ddf3bde4105b50e9bd1e3a1cc2da39c Author: Paul Eggert Date: Thu Dec 25 18:42:51 2014 -0800 Use bool for boolean in xsmfns.c * xsmfns.c, xterm.h (x_session_have_connection): * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session): Use bool for boolean. (x_session_initialize, Fhandle_save_session): Prefer NILP (x) to EQ (x, Qnil). diff --git a/src/ChangeLog b/src/ChangeLog index b5fb351..f3bc9fd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2014-12-26 Paul Eggert + + Use bool for boolean in xsmfns.c + * xsmfns.c, xterm.h (x_session_have_connection): + * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session): + Use bool for boolean. + (x_session_initialize, Fhandle_save_session): + Prefer NILP (x) to EQ (x, Qnil). + 2014-12-23 Didier Verna (tiny change). * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a diff --git a/src/xsmfns.c b/src/xsmfns.c index 8a835cf..a6c6985 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -53,7 +53,7 @@ static int ice_fd = -1; /* A flag that says if we are in shutdown interactions or not. */ -static int doing_interact; +static bool doing_interact; /* The session manager object for the session manager connection. */ @@ -123,9 +123,9 @@ x_session_check_input (int fd, void *data) kbd_buffer_store_event (&emacs_event); } -/* Return non-zero if we have a connection to a session manager. */ +/* Return true if we have a connection to a session manager. */ -int +bool x_session_have_connection (void) { return ice_fd != -1; @@ -138,7 +138,7 @@ x_session_have_connection (void) static void smc_interact_CB (SmcConn smcConn, SmPointer clientData) { - doing_interact = True; + doing_interact = true; emacs_event.kind = SAVE_SESSION_EVENT; emacs_event.arg = Qnil; } @@ -398,15 +398,15 @@ x_session_initialize (struct x_display_info *dpyinfo) ptrdiff_t name_len = 0; ice_fd = -1; - doing_interact = False; + doing_interact = false; /* Check if we where started by the session manager. If so, we will have a previous id. */ - if (! EQ (Vx_session_previous_id, Qnil) && STRINGP (Vx_session_previous_id)) + if (! NILP (Vx_session_previous_id) && STRINGP (Vx_session_previous_id)) previous_id = SSDATA (Vx_session_previous_id); /* Construct the path to the Emacs program. */ - if (! EQ (Vinvocation_directory, Qnil)) + if (! NILP (Vinvocation_directory)) name_len += SBYTES (Vinvocation_directory); name_len += SBYTES (Vinvocation_name); @@ -415,7 +415,7 @@ x_session_initialize (struct x_display_info *dpyinfo) emacs_program = xmalloc (name_len + 1); char *z = emacs_program; - if (! EQ (Vinvocation_directory, Qnil)) + if (! NILP (Vinvocation_directory)) z = lispstpcpy (z, Vinvocation_directory); lispstpcpy (z, Vinvocation_name); @@ -489,21 +489,19 @@ is told to abort the window system shutdown. Do not call this function yourself. */) (Lisp_Object event) { - int kill_emacs = CONSP (event) && CONSP (XCDR (event)) - && EQ (Qt, XCAR (XCDR (event))); + bool kill_emacs = (CONSP (event) && CONSP (XCDR (event)) + && EQ (Qt, XCAR (XCDR (event)))); /* Check doing_interact so that we don't do anything if someone called this at the wrong time. */ if (doing_interact && ! kill_emacs) { - Bool cancel_shutdown = False; - - cancel_shutdown = ! EQ (call0 (intern ("emacs-session-save")), Qnil); + bool cancel_shutdown = ! NILP (call0 (intern ("emacs-session-save"))); SmcInteractDone (smc_conn, cancel_shutdown); SmcSaveYourselfDone (smc_conn, True); - doing_interact = False; + doing_interact = false; } else if (kill_emacs) { @@ -511,7 +509,7 @@ Do not call this function yourself. */) prevent. Fix this in next version. */ Fkill_emacs (Qnil); -#if 0 +#if false /* This will not be reached, but we want kill-emacs-hook to be run. */ SmcCloseConnection (smc_conn, 0, 0); ice_connection_closed (); diff --git a/src/xterm.h b/src/xterm.h index 31c3261..84bb58c 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1107,7 +1107,7 @@ extern void initialize_frame_menubar (struct frame *); /* Defined in xsmfns.c */ #ifdef HAVE_X_SM extern void x_session_initialize (struct x_display_info *dpyinfo); -extern int x_session_have_connection (void); +extern bool x_session_have_connection (void); extern void x_session_close (void); #endif commit b3946c9b9a4a5fcd49e1a5e75d9dc2c369a6bd29 Author: Paul Eggert Date: Thu Dec 25 18:18:42 2014 -0800 Spelling fixes diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index bae9cad..13d5cbd 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1231,7 +1231,7 @@ fix existing bug reports @url{http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs}. @item -@c etc/TOOD not in WWW_GNU_ORG +@c etc/TODO not in WWW_GNU_ORG implement a feature listed in the @file{etc/TODO} file in the Emacs distribution, and submit a patch. diff --git a/etc/NEWS b/etc/NEWS index 37806a7..14933aa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -440,7 +440,7 @@ and move to definitions, as well as pop back to the original location. *** New key bindings `xref-find-definitions' replaces `find-tag' and provides an interface -to pick one destination among several. Hence, `tags-toop-continue' is +to pick one destination among several. Hence, `tags-loop-continue' is unbound. `xref-pop-marker-stack' replaces `pop-tag-mark', but uses an easier binding, which is now unoccupied (`M-,'). `xref-find-definitions-other-window' replaces `find-tag-other-window'. diff --git a/lisp/let-alist.el b/lisp/let-alist.el index 7271e39..d214528 100644 --- a/lisp/let-alist.el +++ b/lisp/let-alist.el @@ -77,7 +77,7 @@ symbol, and each cdr is the same symbol without the `.'." (mapcar #'let-alist--deep-dot-search data))))) (defun let-alist--access-sexp (symbol variable) - "Return a sexp used to acess SYMBOL inside VARIABLE." + "Return a sexp used to access SYMBOL inside VARIABLE." (let* ((clean (let-alist--remove-dot symbol)) (name (symbol-name clean))) (if (string-match "\\`\\." name) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index c6a421a..0be9979 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2063,7 +2063,7 @@ for \\[find-tag] (which see)." ;;; Xref backend ;; Stop searching if we find more than xref-limit matches, as the xref -;; infrastracture is not designed to handle very long lists. +;; infrastructure is not designed to handle very long lists. ;; Switching to some kind of lazy list might be better, but hopefully ;; we hit the limit rarely. (defconst etags--xref-limit 1000) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 30d28ff..02e02de 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -187,7 +187,7 @@ To create an xref object, call `xref-make'.") The return value must be a string or nil. nil means no identifier at point found. -If it's hard to determinte the identifier precisely (e.g. because +If it's hard to determine the identifier precisely (e.g., because it's a method call on unknown type), the implementation can return a simple string (such as symbol at point) marked with a special text property which `xref-find-function' would recognize @@ -348,7 +348,7 @@ WINDOW controls how the buffer is displayed: (xref--pop-to-location loc window))) (define-derived-mode xref--xref-buffer-mode fundamental-mode "XREF" - "Mode for displaying cross-refenences." + "Mode for displaying cross-references." (setq buffer-read-only t)) (let ((map xref--xref-buffer-mode-map)) diff --git a/lisp/window.el b/lisp/window.el index cb9f1ed..2b593c3 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7870,7 +7870,7 @@ is active. This function is run by `mouse-autoselect-window-timer'." ((or (eq mouse-autoselect-window-state 'suspend) ;; When the mouse is at its first recorded position, restart ;; delayed autoselection. This works around a scenario with - ;; two two-window frames with identic dimensions: Select the + ;; two two-window frames with identical dimensions: select the ;; first window of the first frame, switch to the second ;; frame, move the mouse to its second window, minimize the ;; second frame. Now the second window of the first frame diff --git a/src/keyboard.c b/src/keyboard.c index d76a8fc..5b66050 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -276,7 +276,7 @@ bool input_pending; /* True if more input was available last time we read an event. Since redisplay can take a significant amount of time and is not - indispensible to perform the user's commands, when input arrives + indispensable to perform the user's commands, when input arrives "too fast", Emacs skips redisplay. More specifically, if the next command has already been input when we finish the previous command, we skip the intermediate redisplay. diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el index c43e6a0..6f58908 100644 --- a/test/automated/let-alist.el +++ b/test/automated/let-alist.el @@ -62,7 +62,7 @@ '(nil 1 1 2 nil))))) (ert-deftest let-alist-remove-dot () - "Remove firt dot from symbol." + "Remove first dot from symbol." (should (equal (let-alist--remove-dot 'hi) 'hi)) (should (equal (let-alist--remove-dot '.hi) 'hi)) (should (equal (let-alist--remove-dot '..hi) '.hi))) commit 7aa506eed8881788485a9774165454404bac2623 Author: Paul Eggert Date: Thu Dec 25 18:07:15 2014 -0800 Spelling fixes diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index e0ed11f..e1993e5 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1358,7 +1358,7 @@ searches through each directory in the Emacs Lisp load path, trying to find a file matching that library name. If the library name is @samp{@var{foo}}, it tries looking for files named @file{@var{foo}.elc}, @file{@var{foo}.el}, and @file{@var{foo}}. The -default behaviour is to load the first file found. This command +default behavior is to load the first file found. This command prefers @file{.elc} files over @file{.el} files because compiled files load and run faster. If it finds that @file{@var{lib}.el} is newer than @file{@var{lib}.elc}, it issues a warning, in case someone made diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 66c9508..ce0745c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3614,7 +3614,7 @@ for process communication also." (with-current-buffer (process-buffer proc) ;; FIXME: If there is a gateway process, we need communication ;; between several processes. Too complicate to implement, so we - ;; read output from all proceeses. + ;; read output from all processes. (let ((p (if (tramp-get-connection-property proc "gateway" nil) nil proc)) buffer-read-only last-coding-system-used) ;; Under Windows XP, accept-process-output doesn't return diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 41775bd..faf543b 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -63,19 +63,19 @@ ;; with the same name as the link; then, if unsuccessful, ask the user if ;; he/she wants to rebuild the 'TAGS' database and try again; then ask if ;; the user wishes to append 'tag' as a new toplevel heading at the end of -;; the buffer; and finally, defer to org's default behaviour which is to +;; the buffer; and finally, defer to org's default behavior which is to ;; search the entire text of the current buffer for 'tag'. ;; -;; This behaviour can be modified by changing the value of +;; This behavior can be modified by changing the value of ;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my -;; .emacs, which describes the same behaviour as the above paragraph with +;; .emacs, which describes the same behavior as the above paragraph with ;; one difference: ;; ;; (setq org-ctags-open-link-functions ;; '(org-ctags-find-tag ;; org-ctags-ask-rebuild-tags-file-then-find-tag ;; org-ctags-ask-append-topic -;; org-ctags-fail-silently)) ; <-- prevents org default behaviour +;; org-ctags-fail-silently)) ; <-- prevents org default behavior ;; ;; ;; Usage diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 23498b2..454061d 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -581,7 +581,7 @@ The function must accept two parameters: The function should return the string to be exported. For example, the variable could be set to the following function -in order to mimic default behaviour: +in order to mimic default behavior: The default value simply returns the value of CONTENTS." :group 'org-export-html diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index 2c71f7d..f6f3b22 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -589,7 +589,7 @@ The function must accept six parameters: The function should return the string to be exported. For example, the variable could be set to the following function -in order to mimic default behaviour: +in order to mimic default behavior: \(defun org-latex-format-inlinetask \(todo type priority name tags contents\) \"Format an inline task element for LaTeX export.\" diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index efc70d2..b33ba45 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -228,7 +228,7 @@ If you create a site-map file, adjust the sorting like this: `:sitemap-sort-files' The site map is normally sorted alphabetically. You can - change this behaviour setting this to `anti-chronologically', + change this behavior setting this to `anti-chronologically', `chronologically', or nil. `:sitemap-ignore-case' diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 1327ae4..2b0978d 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -493,7 +493,7 @@ t Allow export of math snippets." "The last level which is still exported as a headline. Inferior levels will usually produce itemize or enumerate lists -when exported, but back-end behaviour may differ. +when exported, but back-end behavior may differ. This option can also be set with the OPTIONS keyword, e.g. \"H:2\"." @@ -1736,13 +1736,13 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored." (t ;; Options in `org-export-options-alist'. (dolist (property (funcall find-properties key)) - (let ((behaviour (nth 4 (assq property options)))) + (let ((behavior (nth 4 (assq property options)))) (setq plist (plist-put plist property ;; Handle value depending on specified ;; BEHAVIOR. - (case behaviour + (case behavior (space (if (not (plist-get plist property)) (org-trim val) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index cb8f2ee..fad9047 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1281,7 +1281,7 @@ inserts \" characters." ;; (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) (eq (get-text-property (point) 'face) 'tex-verbatim) - ;; Discover if a preceding occurance of `tex-open-quote' + ;; Discover if a preceding occurrence of `tex-open-quote' ;; should be morphed to a normal double quote. ;; (and (>= (point) (+ (point-min) (length tex-open-quote))) @@ -1298,7 +1298,7 @@ inserts \" characters." ;; (self-insert-command (prefix-numeric-value arg)) ;; We'll be inserting fancy TeX quotes, but consider and imitate - ;; `electric-pair-mode''s two behaviours: pair-insertion and + ;; `electric-pair-mode''s two behaviors: pair-insertion and ;; region wrapping. ;; (if (and electric-pair-mode (use-region-p)) commit 1e6879dbdb0832427f5c588c89a53a8a80768a00 Author: Paul Eggert Date: Thu Dec 25 04:19:17 2014 -0800 Prefer stpcpy to strcat * admin/merge-gnulib (GNULIB_MODULES): Add stpcpy. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/stpcpy.c, m4/stpcpy.m4: New files, from gnulib. * lib-src/ebrowse.c (sym_scope_1, operator_name, open_file): * lib-src/emacsclient.c (get_server_config, set_local_socket) (start_daemon_and_retry_set_socket): * lib-src/etags.c (main, C_entries, relative_filename): * lib-src/pop.c (sendline): * lib-src/update-game-score.c (main): * lwlib/xlwmenu.c (resource_widget_value): * src/callproc.c (child_setup): * src/dbusbind.c (xd_signature_cat): * src/doc.c (get_doc_string, Fsnarf_documentation): * src/editfns.c (Fuser_full_name): * src/frame.c (xrdb_get_resource): * src/gtkutil.c (xg_get_file_with_chooser): * src/tparam.c (tparam1): * src/xfns.c (xic_create_fontsetname): * src/xrdb.c (gethomedir, get_user_db, get_environ_db): * src/xsmfns.c (smc_save_yourself_CB): Rewrite to avoid the need for strcat, typically by using stpcpy and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms. * src/doc.c (sibling_etc): * src/xrdb.c (xdefaults): Now a top-level static constant. diff --git a/ChangeLog b/ChangeLog index 425984a..90d7c0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2014-12-25 Paul Eggert + + Prefer stpcpy to strcat + * admin/merge-gnulib (GNULIB_MODULES): Add stpcpy. + * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. + * lib/stpcpy.c, m4/stpcpy.m4: New files, from gnulib. + * lib-src/ebrowse.c (sym_scope_1, operator_name, open_file): + * lib-src/emacsclient.c (get_server_config, set_local_socket) + (start_daemon_and_retry_set_socket): + * lib-src/etags.c (main, C_entries, relative_filename): + * lib-src/pop.c (sendline): + * lib-src/update-game-score.c (main): + * lwlib/xlwmenu.c (resource_widget_value): + * src/callproc.c (child_setup): + * src/dbusbind.c (xd_signature_cat): + * src/doc.c (get_doc_string, Fsnarf_documentation): + * src/editfns.c (Fuser_full_name): + * src/frame.c (xrdb_get_resource): + * src/gtkutil.c (xg_get_file_with_chooser): + * src/tparam.c (tparam1): + * src/xfns.c (xic_create_fontsetname): + * src/xrdb.c (gethomedir, get_user_db, get_environ_db): + * src/xsmfns.c (smc_save_yourself_CB): + Rewrite to avoid the need for strcat, typically by using stpcpy + and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms. + * src/doc.c (sibling_etc): + * src/xrdb.c (xdefaults): + Now a top-level static constant. + 2014-12-24 Stephen Leake * CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi. diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 64514f7..84c6ebf 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -36,7 +36,7 @@ GNULIB_MODULES=' manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio - strftime strtoimax strtoumax symlink sys_stat + stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 29a88e8..b743159 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -1150,19 +1150,19 @@ sym_scope_1 (struct sym *p) if (*scope_buffer) { ensure_scope_buffer_room (3); - strcat (scope_buffer, "::"); + strcpy (scope_buffer + scope_buffer_len, "::"); scope_buffer_len += 2; } len = strlen (p->name); ensure_scope_buffer_room (len + 1); - strcat (scope_buffer, p->name); + strcpy (scope_buffer + scope_buffer_len, p->name); scope_buffer_len += len; if (HAS_FLAG (p->flags, F_TEMPLATE)) { ensure_scope_buffer_room (3); - strcat (scope_buffer, "<>"); + strcpy (scope_buffer + scope_buffer_len, "<>"); scope_buffer_len += 2; } @@ -2797,24 +2797,25 @@ operator_name (int *sc) s = token_string (LA1); MATCH (); - len = strlen (s) + 10; + ptrdiff_t slen = strlen (s); + len = slen + 10; if (len > id_size) { size_t new_size = max (len, 2 * id_size); id = (char *) xrealloc (id, new_size); id_size = new_size; } - strcpy (id, s); + char *z = stpcpy (id, s); /* Vector new or delete? */ if (LOOKING_AT ('[')) { - strcat (id, "["); + z = stpcpy (z, "["); MATCH (); if (LOOKING_AT (']')) { - strcat (id, "]"); + strcpy (z, "]"); MATCH (); } } @@ -2830,7 +2831,7 @@ operator_name (int *sc) id = (char *) xrealloc (id, new_size); id_size = new_size; } - strcpy (id, "operator"); + char *z = stpcpy (id, "operator"); /* Beware access declarations of the form "X::f;" Beware of `operator () ()'. Yet another difficulty is found in @@ -2842,14 +2843,16 @@ operator_name (int *sc) len += strlen (s) + 2; if (len > id_size) { + ptrdiff_t idlen = z - id; size_t new_size = max (len, 2 * id_size); id = (char *) xrealloc (id, new_size); id_size = new_size; + z = id + idlen; } if (*s != ')' && *s != ']') - strcat (id, " "); - strcat (id, s); + *z++ = ' '; + z = stpcpy (z, s); MATCH (); /* If this is a simple operator like `+', stop now. */ @@ -3462,9 +3465,9 @@ open_file (char *file) buffer = (char *) xrealloc (buffer, buffer_size); } - strcpy (buffer, path->path); - strcat (buffer, "/"); - strcat (buffer, file); + char *z = stpcpy (buffer, path->path); + *z++ = '/'; + strcpy (z, file); fp = fopen (buffer, "r"); } diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index ddc1b6d..cfc321a 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -905,9 +905,9 @@ get_server_config (const char *config_file, struct sockaddr_in *server, { char *path = xmalloc (strlen (home) + strlen (config_file) + EXTRA_SPACE); - strcpy (path, home); - strcat (path, "/.emacs.d/server/"); - strcat (path, config_file); + char *z = stpcpy (path, home); + z = stpcpy (z, "/.emacs.d/server/"); + strcpy (z, config_file); config = fopen (path, "rb"); free (path); } @@ -916,9 +916,9 @@ get_server_config (const char *config_file, struct sockaddr_in *server, { char *path = xmalloc (strlen (home) + strlen (config_file) + EXTRA_SPACE); - strcpy (path, home); - strcat (path, "/.emacs.d/server/"); - strcat (path, config_file); + char *z = stpcpy (path, home); + z = stpcpy (z, "/.emacs.d/server/"); + strcpy (z, config_file); config = fopen (path, "rb"); free (path); } @@ -1193,7 +1193,6 @@ set_local_socket (const char *local_socket_name) { /* socket_name is a file name component. */ long uid = geteuid (); - ptrdiff_t tmpdirlen; use_tmpdir = 1; tmpdir = egetenv ("TMPDIR"); if (!tmpdir) @@ -1212,12 +1211,11 @@ set_local_socket (const char *local_socket_name) #endif tmpdir = "/tmp"; } - tmpdirlen = strlen (tmpdir); socket_name_storage = - xmalloc (tmpdirlen + strlen (server_name) + EXTRA_SPACE); - strcpy (socket_name_storage, tmpdir); - sprintf (socket_name_storage + tmpdirlen, "/emacs%ld/", uid); - strcat (socket_name_storage + tmpdirlen, server_name); + xmalloc (strlen (tmpdir) + strlen (server_name) + EXTRA_SPACE); + char *z = stpcpy (socket_name_storage, tmpdir); + z += sprintf (z, "/emacs%ld/", uid); + strcpy (z, server_name); local_socket_name = socket_name_storage; } @@ -1253,12 +1251,12 @@ set_local_socket (const char *local_socket_name) { /* We're running under su, apparently. */ long uid = pw->pw_uid; - ptrdiff_t tmpdirlen = strlen (tmpdir); char *user_socket_name - = xmalloc (tmpdirlen + strlen (server_name) + EXTRA_SPACE); - strcpy (user_socket_name, tmpdir); - sprintf (user_socket_name + tmpdirlen, "/emacs%ld/", uid); - strcat (user_socket_name + tmpdirlen, server_name); + = xmalloc (strlen (tmpdir) + strlen (server_name) + + EXTRA_SPACE); + char *z = stpcpy (user_socket_name, tmpdir); + z += sprintf (z, "/emacs%ld/", uid); + strcpy (z, server_name); if (strlen (user_socket_name) < sizeof (server.sun_path)) strcpy (server.sun_path, user_socket_name); @@ -1507,8 +1505,7 @@ start_daemon_and_retry_set_socket (void) const char *deq = "--daemon="; char *daemon_arg = xmalloc (strlen (deq) + strlen (socket_name) + 1); - strcpy (daemon_arg, deq); - strcat (daemon_arg, socket_name); + strcpy (stpcpy (daemon_arg, deq), socket_name); d_argv[1] = daemon_arg; } execvp ("emacs", d_argv); diff --git a/lib-src/etags.c b/lib-src/etags.c index 6639ac4..78b3fed 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1277,13 +1277,13 @@ main (int argc, char **argv) default: continue; /* the for loop */ } - strcpy (cmd, "mv "); - strcat (cmd, tagfile); - strcat (cmd, " OTAGS;fgrep -v '\t"); - strcat (cmd, argbuffer[i].what); - strcat (cmd, "\t' OTAGS >"); - strcat (cmd, tagfile); - strcat (cmd, ";rm OTAGS"); + char *z = stpcpy (cmd, "mv "); + z = stpcpy (z, tagfile); + z = stpcpy (z, " OTAGS;fgrep -v '\t"); + z = stpcpy (z, argbuffer[i].what); + z = stpcpy (z, "\t' OTAGS >"); + z = stpcpy (z, tagfile); + strcpy (z, ";rm OTAGS"); if (system (cmd) != EXIT_SUCCESS) fatal ("failed to execute shell command", (char *)NULL); } @@ -1307,10 +1307,10 @@ main (int argc, char **argv) /* Maybe these should be used: setenv ("LC_COLLATE", "C", 1); setenv ("LC_ALL", "C", 1); */ - strcpy (cmd, "sort -u -o "); - strcat (cmd, tagfile); - strcat (cmd, " "); - strcat (cmd, tagfile); + char *z = stpcpy (cmd, "sort -u -o "); + z = stpcpy (z, tagfile); + *z++ = ' '; + strcpy (z, tagfile); exit (system (cmd)); } return EXIT_SUCCESS; @@ -3427,8 +3427,9 @@ C_entries (int c_ext, FILE *inf) case omethodtag: case omethodparm: objdef = omethodcolon; - linebuffer_setlen (&token_name, token_name.len + 1); - strcat (token_name.buffer, ":"); + int toklen = token_name.len; + linebuffer_setlen (&token_name, toklen + 1); + strcpy (token_name.buffer + toklen, ":"); break; } if (structdef == stagseen) @@ -6362,12 +6363,12 @@ relative_filename (char *file, char *dir) while ((dp = strchr (dp + 1, '/')) != NULL) i += 1; res = xnew (3*i + strlen (fp + 1) + 1, char); - res[0] = '\0'; + char *z = res; while (i-- > 0) - strcat (res, "../"); + z = stpcpy (z, "../"); /* Add the file name relative to the common root of file and dir. */ - strcat (res, fp + 1); + strcpy (z, fp + 1); free (afn); return res; diff --git a/lib-src/pop.c b/lib-src/pop.c index ffe16c5..7001150 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1397,8 +1397,7 @@ sendline (popserver server, const char *line) over a few dozen messages, and is a big chunk of the time we spend fetching mail from a server close by. */ buf = alloca (strlen (line) + 3); - strcpy (buf, line); - strcat (buf, "\r\n"); + strcpy (stpcpy (buf, line), "\r\n"); ret = fullwrite (server->file, buf, strlen (buf)); if (ret < 0) diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 7a64cd0..b311001 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -221,9 +221,9 @@ main (int argc, char **argv) if (!scorefile) lose_syserr ("Couldn't allocate score file"); - strcpy (scorefile, prefix); - strcat (scorefile, "/"); - strcat (scorefile, argv[optind]); + char *z = stpcpy (scorefile, prefix); + *z++ = '/'; + strcpy (z, argv[optind]); newscore.score = normalize_integer (argv[optind + 1]); if (! newscore.score) @@ -430,8 +430,7 @@ write_scores (const char *filename, const struct score_entry *scores, char *tempfile = malloc (strlen (filename) + strlen (".tempXXXXXX") + 1); if (!tempfile) return -1; - strcpy (tempfile, filename); - strcat (tempfile, ".tempXXXXXX"); + strcpy (stpcpy (tempfile, filename), ".tempXXXXXX"); fd = mkostemp (tempfile, 0); if (fd < 0) return -1; @@ -462,8 +461,7 @@ lock_file (const char *filename, void **state) char *lockpath = malloc (strlen (filename) + strlen (lockext) + 60); if (!lockpath) return -1; - strcpy (lockpath, filename); - strcat (lockpath, lockext); + strcpy (stpcpy (lockpath, filename), lockext); *state = lockpath; while ((fd = open (lockpath, O_CREAT | O_EXCL, 0600)) < 0) diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 740ebb1..27a5964 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 --dir=. --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=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=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --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 intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio strftime strtoimax strtoumax symlink sys_stat sys_time time time_r timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --dir=. --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=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=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --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 intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings MOSTLYCLEANFILES += core *.stackdump @@ -1214,6 +1214,15 @@ EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib +## begin gnulib module stpcpy + + +EXTRA_DIST += stpcpy.c + +EXTRA_libgnu_a_SOURCES += stpcpy.c + +## end gnulib module stpcpy + ## begin gnulib module strftime libgnu_a_SOURCES += strftime.c diff --git a/lib/stpcpy.c b/lib/stpcpy.c new file mode 100644 index 0000000..880a706 --- /dev/null +++ b/lib/stpcpy.c @@ -0,0 +1,49 @@ +/* stpcpy.c -- copy a string and return pointer to end of new string + Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2014 Free Software + Foundation, Inc. + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@prep.ai.mit.edu. + + 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 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 . */ + +#include + +#include + +#undef __stpcpy +#ifdef _LIBC +# undef stpcpy +#endif + +#ifndef weak_alias +# define __stpcpy stpcpy +#endif + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ +char * +__stpcpy (char *dest, const char *src) +{ + register char *d = dest; + register const char *s = src; + + do + *d++ = *s; + while (*s++ != '\0'); + + return d - 1; +} +#ifdef weak_alias +weak_alias (__stpcpy, stpcpy) +#endif diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 6f4db56..2d2d409 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -439,10 +439,9 @@ resource_widget_value (XlwMenuWidget mw, widget_value *val) int complete_length = strlen (resourced_name) + strlen (val->value) + 2; complete_name = XtMalloc (complete_length); - *complete_name = 0; - strcat (complete_name, resourced_name); - strcat (complete_name, " "); - strcat (complete_name, val->value); + char *z = stpcpy (complete_name, resourced_name); + *z++ = ' '; + strcpy (z, val->value); } val->toolkit_data = complete_name; diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 39ec8ae..49fdf5e 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -123,6 +123,7 @@ AC_DEFUN([gl_EARLY], # Code from module stdint: # Code from module stdio: # Code from module stdlib: + # Code from module stpcpy: # Code from module strftime: # Code from module string: # Code from module strtoimax: @@ -341,6 +342,12 @@ AC_DEFUN([gl_INIT], gl_STDINT_H gl_STDIO_H gl_STDLIB_H + gl_FUNC_STPCPY + if test $HAVE_STPCPY = 0; then + AC_LIBOBJ([stpcpy]) + gl_PREREQ_STPCPY + fi + gl_STRING_MODULE_INDICATOR([stpcpy]) gl_FUNC_GNU_STRFTIME gl_HEADER_STRING_H gl_FUNC_STRTOIMAX @@ -889,6 +896,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/stdint.in.h lib/stdio.in.h lib/stdlib.in.h + lib/stpcpy.c lib/strftime.c lib/strftime.h lib/string.in.h @@ -995,6 +1003,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/stdint.m4 m4/stdio_h.m4 m4/stdlib_h.m4 + m4/stpcpy.m4 m4/strftime.m4 m4/string_h.m4 m4/strtoimax.m4 diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4 new file mode 100644 index 0000000..966ba95 --- /dev/null +++ b/m4/stpcpy.m4 @@ -0,0 +1,25 @@ +# stpcpy.m4 serial 8 +dnl Copyright (C) 2002, 2007, 2009-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_STPCPY], +[ + dnl Persuade glibc to declare stpcpy(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([stpcpy]) + if test $ac_cv_func_stpcpy = no; then + HAVE_STPCPY=0 + fi +]) + +# Prerequisites of lib/stpcpy.c. +AC_DEFUN([gl_PREREQ_STPCPY], [ + : +]) diff --git a/src/callproc.c b/src/callproc.c index a677334..f40ed32 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1315,13 +1315,10 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, if (STRINGP (display)) { - char *vdata; - if (MAX_ALLOCA - sizeof "DISPLAY=" < SBYTES (display)) exec_failed (new_argv[0], ENOMEM); - vdata = alloca (sizeof "DISPLAY=" + SBYTES (display)); - strcpy (vdata, "DISPLAY="); - strcat (vdata, SSDATA (display)); + char *vdata = alloca (sizeof "DISPLAY=" + SBYTES (display)); + lispstpcpy (stpcpy (vdata, "DISPLAY="), display); new_env = add_env (env, new_env, vdata); } diff --git a/src/dbusbind.c b/src/dbusbind.c index 4852739..983b05c 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -357,7 +357,7 @@ xd_signature_cat (char *signature, char const *x) ptrdiff_t xlen = strlen (x); if (DBUS_MAXIMUM_SIGNATURE_LENGTH - xlen <= siglen) string_overflow (); - strcat (signature, x); + strcpy (signature + siglen, x); } /* Compute SIGNATURE of OBJECT. It must have a form that it can be diff --git a/src/doc.c b/src/doc.c index 1b87c23..1d9c330 100644 --- a/src/doc.c +++ b/src/doc.c @@ -42,6 +42,8 @@ static ptrdiff_t get_doc_string_buffer_size; static unsigned char *read_bytecode_pointer; +static char const sibling_etc[] = "../etc/"; + /* `readchar' in lread.c calls back here to fetch the next byte. If UNREADFLAG is 1, we unread a byte. */ @@ -80,7 +82,6 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) { char *from, *to, *name, *p, *p1; int fd; - ptrdiff_t minsize; int offset; EMACS_INT position; Lisp_Object file, tem, pos; @@ -113,21 +114,14 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) tem = Ffile_name_absolute_p (file); file = ENCODE_FILE (file); - if (NILP (tem)) - { - Lisp_Object docdir = ENCODE_FILE (Vdoc_directory); - minsize = SCHARS (docdir); - /* sizeof ("../etc/") == 8 */ - if (minsize < 8) - minsize = 8; - name = SAFE_ALLOCA (minsize + SCHARS (file) + 8); - char *z = lispstpcpy (name, docdir); - strcpy (z, SSDATA (file)); - } - else - { - name = SSDATA (file); - } + Lisp_Object docdir + = NILP (tem) ? ENCODE_FILE (Vdoc_directory) : empty_unibyte_string; + ptrdiff_t docdir_sizemax = SBYTES (docdir) + 1; +#ifndef CANNOT_DUMP + docdir_sizemax = max (docdir_sizemax, sizeof sibling_etc); +#endif + name = SAFE_ALLOCA (docdir_sizemax + SBYTES (file)); + lispstpcpy (lispstpcpy (name, docdir), file); fd = emacs_open (name, O_RDONLY, 0); if (fd < 0) @@ -137,8 +131,7 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) { /* Preparing to dump; DOC file is probably not installed. So check in ../etc. */ - strcpy (name, "../etc/"); - strcat (name, SSDATA (file)); + lispstpcpy (stpcpy (name, sibling_etc), file); fd = emacs_open (name, O_RDONLY, 0); } @@ -580,7 +573,6 @@ the same file name is found in the `doc-directory'. */) (0) #endif /* CANNOT_DUMP */ { - static char const sibling_etc[] = "../etc/"; dirname = sibling_etc; dirlen = sizeof sibling_etc - 1; } @@ -594,8 +586,7 @@ the same file name is found in the `doc-directory'. */) count = SPECPDL_INDEX (); USE_SAFE_ALLOCA; name = SAFE_ALLOCA (dirlen + SBYTES (filename) + 1); - strcpy (name, dirname); - strcat (name, SSDATA (filename)); /*** Add this line ***/ + lispstpcpy (stpcpy (name, dirname), filename); /*** Add this line ***/ /* Vbuild_files is nil when temacs is run, and non-nil after that. */ if (NILP (Vbuild_files)) diff --git a/src/editfns.c b/src/editfns.c index 0a07886..430c4c9 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1350,10 +1350,9 @@ name, or nil if there is no such user. */) USE_SAFE_ALLOCA; char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1); memcpy (r, p, q - p); - r[q - p] = 0; - strcat (r, SSDATA (login)); + char *s = lispstpcpy (&r[q - p], login); r[q - p] = upcase ((unsigned char) r[q - p]); - strcat (r, q + 1); + strcpy (s, q + 1); full = build_string (r); SAFE_FREE (); } diff --git a/src/frame.c b/src/frame.c index 3127366..2ad1c1b5 100644 --- a/src/frame.c +++ b/src/frame.c @@ -4076,23 +4076,23 @@ xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Li /* Start with emacs.FRAMENAME for the name (the specific one) and with `Emacs' for the class key (the general one). */ - lispstpcpy (name_key, Vx_resource_name); - lispstpcpy (class_key, Vx_resource_class); + char *nz = lispstpcpy (name_key, Vx_resource_name); + char *cz = lispstpcpy (class_key, Vx_resource_class); - strcat (class_key, "."); - strcat (class_key, SSDATA (class)); + *cz++ = '.'; + cz = lispstpcpy (cz, class); if (!NILP (component)) { - strcat (class_key, "."); - strcat (class_key, SSDATA (subclass)); + *cz++ = '.'; + lispstpcpy (cz, subclass); - strcat (name_key, "."); - strcat (name_key, SSDATA (component)); + *nz++ = '.'; + nz = lispstpcpy (nz, component); } - strcat (name_key, "."); - strcat (name_key, SSDATA (attribute)); + *nz++ = '.'; + lispstpcpy (nz, attribute); char *value = x_get_string_resource (rdb, name_key, class_key); SAFE_FREE(); diff --git a/src/gtkutil.c b/src/gtkutil.c index 9465d54..f61cbc2 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1839,12 +1839,12 @@ xg_get_file_with_chooser (struct frame *f, if (x_gtk_file_dialog_help_text) { - msgbuf[0] = '\0'; + char *z = msgbuf; /* Gtk+ 2.10 has the file name text entry box integrated in the dialog. Show the C-l help text only for versions < 2.10. */ if (gtk_check_version (2, 10, 0) && action != GTK_FILE_CHOOSER_ACTION_SAVE) - strcat (msgbuf, "\nType C-l to display a file name text entry box.\n"); - strcat (msgbuf, "\nIf you don't like this file selector, use the " + z = stpcpy (z, "\nType C-l to display a file name text entry box.\n"); + strcpy (z, "\nIf you don't like this file selector, use the " "corresponding\nkey binding or customize " "use-file-dialog to turn it off."); diff --git a/src/tparam.c b/src/tparam.c index e02cea3..b0cd004 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -255,9 +255,9 @@ tparam1 (const char *string, char *outstring, int len, } *op = 0; while (doup-- > 0) - strcat (op, up); + op = stpcpy (op, up); while (doleft-- > 0) - strcat (op, left); + op = stpcpy (op, left); return outstring; } diff --git a/src/xfns.c b/src/xfns.c index 1b17311..ba2601d 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1710,13 +1710,14 @@ xic_create_fontsetname (const char *base_fontname, int motif) { const char *sep = motif ? ";" : ","; char *fontsetname; + char *z; /* Make a fontset name from the base font name. */ if (xic_default_fontset == base_fontname) { /* There is no base font name, use the default. */ fontsetname = xmalloc (strlen (base_fontname) + 2); - strcpy (fontsetname, base_fontname); + z = stpcpy (fontsetname, base_fontname); } else { @@ -1737,9 +1738,9 @@ xic_create_fontsetname (const char *base_fontname, int motif) Use the specified font plus the default. */ fontsetname = xmalloc (strlen (base_fontname) + strlen (xic_default_fontset) + 3); - strcpy (fontsetname, base_fontname); - strcat (fontsetname, sep); - strcat (fontsetname, xic_default_fontset); + z = stpcpy (fontsetname, base_fontname); + z = stpcpy (z, sep); + z = stpcpy (z, xic_default_fontset); } else { @@ -1800,27 +1801,26 @@ xic_create_fontsetname (const char *base_fontname, int motif) /* Build the font spec that matches all. */ len = p - p2 + strlen (allcs) + strlen (all) + strlen (allfamilies) + 1; font_all = alloca (len); - strcpy (font_all, allfamilies); - strcat (font_all, all); - memcpy (font_all + strlen (all) + strlen (allfamilies), p2, p - p2); - strcpy (font_all + strlen (all) + strlen (allfamilies) + (p - p2), - allcs); + z = stpcpy (font_all, allfamilies); + z = stpcpy (z, all); + memcpy (z, p2, p - p2); + strcpy (z + (p - p2), allcs); /* Build the actual font set name. */ len = strlen (base_fontname) + strlen (font_allcs) + strlen (font_allfamilies) + strlen (font_all) + 5; fontsetname = xmalloc (len); - strcpy (fontsetname, base_fontname); - strcat (fontsetname, sep); - strcat (fontsetname, font_allcs); - strcat (fontsetname, sep); - strcat (fontsetname, font_allfamilies); - strcat (fontsetname, sep); - strcat (fontsetname, font_all); + z = stpcpy (fontsetname, base_fontname); + z = stpcpy (z, sep); + z = stpcpy (z, font_allcs); + z = stpcpy (z, sep); + z = stpcpy (z, font_allfamilies); + z = stpcpy (z, sep); + z = stpcpy (z, font_all); } } if (motif) - return strcat (fontsetname, ":"); + strcpy (z, ":"); return fontsetname; } #endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */ diff --git a/src/xrdb.c b/src/xrdb.c index 32ad3c7..e21206d 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -232,9 +232,10 @@ gethomedir (void) if (ptr == NULL) return xstrdup ("/"); - copy = xmalloc (strlen (ptr) + 2); - strcpy (copy, ptr); - return strcat (copy, "/"); + ptrdiff_t len = strlen (ptr); + copy = xmalloc (len + 2); + strcpy (copy + len, "/"); + return memcpy (copy, ptr, len); } @@ -334,6 +335,7 @@ get_user_app (const char *class) return db; } +static char const xdefaults[] = ".Xdefaults"; static XrmDatabase get_user_db (Display *display) @@ -351,16 +353,12 @@ get_user_db (Display *display) db = XrmGetStringDatabase (xdefs); else { - char *home; - char *xdefault; - - home = gethomedir (); - xdefault = xmalloc (strlen (home) + sizeof ".Xdefaults"); - strcpy (xdefault, home); - strcat (xdefault, ".Xdefaults"); - db = XrmGetFileDatabase (xdefault); - xfree (home); - xfree (xdefault); + char *home = gethomedir (); + ptrdiff_t homelen = strlen (home); + char *filename = xrealloc (home, homelen + sizeof xdefaults); + strcpy (filename + homelen, xdefaults); + db = XrmGetFileDatabase (filename); + xfree (filename); } #ifdef HAVE_XSCREENRESOURCESTRING @@ -380,24 +378,22 @@ static XrmDatabase get_environ_db (void) { XrmDatabase db; - char *p; - char *path = 0; + char *p = getenv ("XENVIRONMENT"); + char *filename = 0; - if ((p = getenv ("XENVIRONMENT")) == NULL) + if (!p) { - static char const xdefaults[] = ".Xdefaults-"; char *home = gethomedir (); - char const *host = SSDATA (Vsystem_name); - ptrdiff_t pathsize = (strlen (home) + sizeof xdefaults - + SBYTES (Vsystem_name)); - path = xrealloc (home, pathsize); - strcat (strcat (path, xdefaults), host); - p = path; + ptrdiff_t homelen = strlen (home); + ptrdiff_t filenamesize = (homelen + sizeof xdefaults + + SBYTES (Vsystem_name)); + p = filename = xrealloc (home, filenamesize); + lispstpcpy (stpcpy (filename + homelen, xdefaults), Vsystem_name); } db = XrmGetFileDatabase (p); - xfree (path); + xfree (filename); return db; } diff --git a/src/xsmfns.c b/src/xsmfns.c index cd4f9ce..8a835cf 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -230,8 +230,7 @@ smc_save_yourself_CB (SmcConn smcConn, props[props_idx]->vals[vp_idx++].value = emacs_program; smid_opt = xmalloc (strlen (SMID_OPT) + strlen (client_id) + 1); - strcpy (smid_opt, SMID_OPT); - strcat (smid_opt, client_id); + strcpy (stpcpy (smid_opt, SMID_OPT), client_id); props[props_idx]->vals[vp_idx].length = strlen (smid_opt); props[props_idx]->vals[vp_idx++].value = smid_opt; @@ -242,8 +241,7 @@ smc_save_yourself_CB (SmcConn smcConn, if (cwd) { chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1); - strcpy (chdir_opt, CHDIR_OPT); - strcat (chdir_opt, cwd); + strcpy (stpcpy (chdir_opt, CHDIR_OPT), cwd); props[props_idx]->vals[vp_idx].length = strlen (chdir_opt); props[props_idx]->vals[vp_idx++].value = chdir_opt; commit 4cd6d77375ef9adeaa53fd05b12283195d99d74c Author: Michael Albinus Date: Thu Dec 25 22:00:08 2014 +0100 * automated/tramp-tests.el (tramp-test17-insert-directory): Do not expect a given order of "." and "..". diff --git a/test/ChangeLog b/test/ChangeLog index a91392d..14780c0 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2014-12-25 Michael Albinus + + * automated/tramp-tests.el (tramp-test17-insert-directory): Do not + expect a given order of "." and "..". + 2014-12-22 Fabián Ezequiel Gallina * automated/python-tests.el (python-indent-electric-colon-2) diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 864a43d..317ce12 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -953,7 +953,12 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." (goto-char (point-min)) (should (looking-at-p - "\\(total.+[[:digit:]]+\n\\)?.+ \\.\n.+ \\.\\.\n.+ foo$")))) + (concat + ;; There might be a summary line. + "\\(total.+[[:digit:]]+\n\\)?" + ;; We don't know in which order "." and ".." appear. + "\\(.+ \\.?\\.\n\\)\\{2\\}" + ".+ foo$"))))) (ignore-errors (delete-directory tmp-name1 'recursive))))) (ert-deftest tramp-test18-file-attributes () commit 8dba53d239f5ac00e930f13b73f59cb5b53ffbd1 Author: Dmitry Gutov Date: Thu Dec 25 22:18:36 2014 +0200 Regenerate ldefs-boot.el diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 4157922..92933b6 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -3,7 +3,7 @@ ;;; Code: -;;;### (autoloads nil "5x5" "play/5x5.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "5x5" "play/5x5.el" (21604 48550 301934 225000)) ;;; Generated autoloads from play/5x5.el (autoload '5x5 "5x5" "\ @@ -65,8 +65,8 @@ should return a grid vector array that is the new solution. ;;;*** -;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (21604 48550 +;;;;;; 313934 225000)) ;;; Generated autoloads from progmodes/ada-mode.el (autoload 'ada-add-extensions "ada-mode" "\ @@ -85,8 +85,8 @@ Ada mode is the major mode for editing Ada code. ;;;*** -;;;### (autoloads nil "ada-stmt" "progmodes/ada-stmt.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ada-stmt" "progmodes/ada-stmt.el" (21604 48550 +;;;;;; 313934 225000)) ;;; Generated autoloads from progmodes/ada-stmt.el (autoload 'ada-header "ada-stmt" "\ @@ -96,8 +96,8 @@ Insert a descriptive header at the top of the file. ;;;*** -;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21604 48550 +;;;;;; 313934 225000)) ;;; Generated autoloads from progmodes/ada-xref.el (autoload 'ada-find-file "ada-xref" "\ @@ -108,8 +108,8 @@ Completion is available. ;;;*** -;;;### (autoloads nil "add-log" "vc/add-log.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "add-log" "vc/add-log.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from vc/add-log.el (put 'change-log-default-name 'safe-local-variable 'string-or-null-p) @@ -238,8 +238,8 @@ old-style time formats for entries are supported. ;;;*** -;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21604 48550 +;;;;;; 1934 214000)) ;;; Generated autoloads from emacs-lisp/advice.el (defvar ad-redefinition-action 'warn "\ @@ -374,7 +374,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) ;;;*** -;;;### (autoloads nil "align" "align.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "align" "align.el" (21604 48549 921934 211000)) ;;; Generated autoloads from align.el (autoload 'align "align" "\ @@ -477,7 +477,7 @@ A replacement function for `newline-and-indent', aligning as it goes. ;;;*** -;;;### (autoloads nil "allout" "allout.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "allout" "allout.el" (21604 48549 925934 211000)) ;;; Generated autoloads from allout.el (push (purecopy '(allout 2 3)) package--builtin-versions) @@ -837,8 +837,8 @@ for details on preparing Emacs for automatic allout activation. ;;;*** -;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (21609 -;;;;;; 55608 852266 580000)) +;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (21631 +;;;;;; 35966 795121 865000)) ;;; Generated autoloads from allout-widgets.el (push (purecopy '(allout-widgets 1 0)) package--builtin-versions) @@ -896,8 +896,8 @@ outline hot-spot navigation (see `allout-mode'). ;;;*** -;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21640 32530 974334 +;;;;;; 457000)) ;;; Generated autoloads from net/ange-ftp.el (defalias 'ange-ftp-re-read-dir 'ange-ftp-reread-dir) @@ -918,8 +918,8 @@ directory, so that Emacs will know its current contents. ;;;*** -;;;### (autoloads nil "animate" "play/animate.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "animate" "play/animate.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from play/animate.el (autoload 'animate-string "animate" "\ @@ -951,8 +951,8 @@ the buffer *Birthday-Present-for-Name*. ;;;*** -;;;### (autoloads nil "ansi-color" "ansi-color.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "ansi-color" "ansi-color.el" (21604 48549 925934 +;;;;;; 211000)) ;;; Generated autoloads from ansi-color.el (push (purecopy '(ansi-color 3 4 2)) package--builtin-versions) @@ -978,8 +978,8 @@ This is a good function to put in `comint-output-filter-functions'. ;;;*** -;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21604 +;;;;;; 48550 313934 225000)) ;;; Generated autoloads from progmodes/antlr-mode.el (push (purecopy '(antlr-mode 2 2 3)) package--builtin-versions) @@ -1015,8 +1015,8 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. ;;;*** -;;;### (autoloads nil "appt" "calendar/appt.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "appt" "calendar/appt.el" (21604 48549 945934 +;;;;;; 212000)) ;;; Generated autoloads from calendar/appt.el (autoload 'appt-add "appt" "\ @@ -1037,8 +1037,8 @@ ARG is positive, otherwise off. ;;;*** -;;;### (autoloads nil "apropos" "apropos.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "apropos" "apropos.el" (21604 48549 925934 +;;;;;; 211000)) ;;; Generated autoloads from apropos.el (autoload 'apropos-read-pattern "apropos" "\ @@ -1153,8 +1153,8 @@ Returns list of symbols and documentation found. ;;;*** -;;;### (autoloads nil "arc-mode" "arc-mode.el" (21621 7062 810116 -;;;;;; 332000)) +;;;### (autoloads nil "arc-mode" "arc-mode.el" (21631 35966 799121 +;;;;;; 866000)) ;;; Generated autoloads from arc-mode.el (autoload 'archive-mode "arc-mode" "\ @@ -1174,7 +1174,7 @@ archive. ;;;*** -;;;### (autoloads nil "array" "array.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "array" "array.el" (21604 48549 925934 211000)) ;;; Generated autoloads from array.el (autoload 'array-mode "array" "\ @@ -1245,8 +1245,8 @@ Entering array mode calls the function `array-mode-hook'. ;;;*** -;;;### (autoloads nil "artist" "textmodes/artist.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "artist" "textmodes/artist.el" (21604 48550 +;;;;;; 393934 228000)) ;;; Generated autoloads from textmodes/artist.el (push (purecopy '(artist 1 2 6)) package--builtin-versions) @@ -1452,8 +1452,8 @@ Keymap summary ;;;*** -;;;### (autoloads nil "asm-mode" "progmodes/asm-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "asm-mode" "progmodes/asm-mode.el" (21604 48550 +;;;;;; 313934 225000)) ;;; Generated autoloads from progmodes/asm-mode.el (autoload 'asm-mode "asm-mode" "\ @@ -1480,8 +1480,8 @@ Special commands: ;;;*** -;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (21625 -;;;;;; 43838 483701 627000)) +;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (21631 +;;;;;; 35966 847121 867000)) ;;; Generated autoloads from gnus/auth-source.el (defvar auth-source-cache-expiry 7200 "\ @@ -1493,8 +1493,8 @@ let-binding.") ;;;*** -;;;### (autoloads nil "autoarg" "autoarg.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "autoarg" "autoarg.el" (21604 48549 925934 +;;;;;; 211000)) ;;; Generated autoloads from autoarg.el (defvar autoarg-mode nil "\ @@ -1554,8 +1554,8 @@ This is similar to `autoarg-mode' but rebinds the keypad keys ;;;*** -;;;### (autoloads nil "autoconf" "progmodes/autoconf.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "autoconf" "progmodes/autoconf.el" (21604 48550 +;;;;;; 313934 225000)) ;;; Generated autoloads from progmodes/autoconf.el (autoload 'autoconf-mode "autoconf" "\ @@ -1565,8 +1565,8 @@ Major mode for editing Autoconf configure.ac files. ;;;*** -;;;### (autoloads nil "autoinsert" "autoinsert.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "autoinsert" "autoinsert.el" (21637 50476 651217 +;;;;;; 120000)) ;;; Generated autoloads from autoinsert.el (autoload 'auto-insert "autoinsert" "\ @@ -1604,8 +1604,8 @@ insert a template for the file depending on the mode of the buffer. ;;;*** -;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21628 -;;;;;; 43483 380149 771000)) +;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21631 +;;;;;; 35966 819121 866000)) ;;; Generated autoloads from emacs-lisp/autoload.el (put 'generated-autoload-file 'safe-local-variable 'stringp) @@ -1656,8 +1656,8 @@ should be non-nil). ;;;*** -;;;### (autoloads nil "autorevert" "autorevert.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "autorevert" "autorevert.el" (21604 48549 929934 +;;;;;; 211000)) ;;; Generated autoloads from autorevert.el (autoload 'auto-revert-mode "autorevert" "\ @@ -1745,7 +1745,7 @@ specifies in the mode line. ;;;*** -;;;### (autoloads nil "avoid" "avoid.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "avoid" "avoid.el" (21604 48549 929934 211000)) ;;; Generated autoloads from avoid.el (defvar mouse-avoidance-mode nil "\ @@ -1783,8 +1783,8 @@ definition of \"random distance\".) ;;;*** -;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21604 48550 +;;;;;; 313934 225000)) ;;; Generated autoloads from progmodes/bat-mode.el (add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode)) @@ -1802,8 +1802,8 @@ Run script using `bat-run' and `bat-run-args'. ;;;*** -;;;### (autoloads nil "battery" "battery.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "battery" "battery.el" (21604 48549 929934 +;;;;;; 211000)) ;;; Generated autoloads from battery.el (put 'battery-mode-line-string 'risky-local-variable t) @@ -1838,8 +1838,8 @@ seconds. ;;;*** -;;;### (autoloads nil "benchmark" "emacs-lisp/benchmark.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "benchmark" "emacs-lisp/benchmark.el" (21604 +;;;;;; 48550 1934 214000)) ;;; Generated autoloads from emacs-lisp/benchmark.el (autoload 'benchmark-run "benchmark" "\ @@ -1875,8 +1875,8 @@ For non-interactive use see also `benchmark-run' and ;;;*** -;;;### (autoloads nil "bibtex" "textmodes/bibtex.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "bibtex" "textmodes/bibtex.el" (21604 48550 +;;;;;; 393934 228000)) ;;; Generated autoloads from textmodes/bibtex.el (autoload 'bibtex-initialize "bibtex" "\ @@ -1968,7 +1968,7 @@ A prefix arg negates the value of `bibtex-search-entry-globally'. ;;;*** ;;;### (autoloads nil "bibtex-style" "textmodes/bibtex-style.el" -;;;;;; (21607 54478 800121 42000)) +;;;;;; (21604 48550 393934 228000)) ;;; Generated autoloads from textmodes/bibtex-style.el (autoload 'bibtex-style-mode "bibtex-style" "\ @@ -1978,8 +1978,8 @@ Major mode for editing BibTeX style files. ;;;*** -;;;### (autoloads nil "binhex" "mail/binhex.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "binhex" "mail/binhex.el" (21604 48550 181934 +;;;;;; 220000)) ;;; Generated autoloads from mail/binhex.el (defconst binhex-begin-line "^:...............................................................$" "\ @@ -2003,8 +2003,8 @@ Binhex decode region between START and END. ;;;*** -;;;### (autoloads nil "blackbox" "play/blackbox.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "blackbox" "play/blackbox.el" (21604 48550 +;;;;;; 301934 225000)) ;;; Generated autoloads from play/blackbox.el (autoload 'blackbox "blackbox" "\ @@ -2123,8 +2123,8 @@ a reflection. ;;;*** -;;;### (autoloads nil "bookmark" "bookmark.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "bookmark" "bookmark.el" (21604 48549 929934 +;;;;;; 211000)) ;;; Generated autoloads from bookmark.el (define-key ctl-x-r-map "b" 'bookmark-jump) (define-key ctl-x-r-map "m" 'bookmark-set) @@ -2317,8 +2317,8 @@ Incremental search of bookmarks, hiding the non-matches as we go. ;;;*** -;;;### (autoloads nil "browse-url" "net/browse-url.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "browse-url" "net/browse-url.el" (21604 48550 +;;;;;; 213934 222000)) ;;; Generated autoloads from net/browse-url.el (defvar browse-url-browser-function 'browse-url-default-browser "\ @@ -2633,7 +2633,7 @@ from `browse-url-elinks-wrapper'. ;;;*** -;;;### (autoloads nil "bs" "bs.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "bs" "bs.el" (21604 48549 929934 211000)) ;;; Generated autoloads from bs.el (push (purecopy '(bs 1 17)) package--builtin-versions) @@ -2674,8 +2674,8 @@ name of buffer configuration. ;;;*** -;;;### (autoloads nil "bubbles" "play/bubbles.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "bubbles" "play/bubbles.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from play/bubbles.el (autoload 'bubbles "bubbles" "\ @@ -2697,7 +2697,7 @@ columns on its right towards the left. ;;;*** ;;;### (autoloads nil "bug-reference" "progmodes/bug-reference.el" -;;;;;; (21607 54478 800121 42000)) +;;;;;; (21604 48550 313934 225000)) ;;; Generated autoloads from progmodes/bug-reference.el (put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format))))) @@ -2717,8 +2717,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;*** -;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21645 +;;;;;; 25761 789186 828000)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -2838,8 +2838,8 @@ and corresponding effects. ;;;*** -;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21617 -;;;;;; 49721 420132 227000)) +;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21631 +;;;;;; 35966 799121 866000)) ;;; Generated autoloads from calendar/cal-china.el (put 'calendar-chinese-time-zone 'risky-local-variable t) @@ -2848,8 +2848,8 @@ and corresponding effects. ;;;*** -;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (21609 55608 -;;;;;; 852266 580000)) +;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (21631 35966 +;;;;;; 799121 866000)) ;;; Generated autoloads from calendar/cal-dst.el (put 'calendar-daylight-savings-starts 'risky-local-variable t) @@ -2860,8 +2860,8 @@ and corresponding effects. ;;;*** -;;;### (autoloads nil "cal-hebrew" "calendar/cal-hebrew.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "cal-hebrew" "calendar/cal-hebrew.el" (21604 +;;;;;; 48549 949934 212000)) ;;; Generated autoloads from calendar/cal-hebrew.el (autoload 'calendar-hebrew-list-yahrzeits "cal-hebrew" "\ @@ -2873,7 +2873,7 @@ from the cursor position. ;;;*** -;;;### (autoloads nil "calc" "calc/calc.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "calc" "calc/calc.el" (21604 48549 945934 212000)) ;;; Generated autoloads from calc/calc.el (define-key ctl-x-map "*" 'calc-dispatch) @@ -2959,8 +2959,8 @@ See Info node `(calc)Defining Functions'. ;;;*** -;;;### (autoloads nil "calc-undo" "calc/calc-undo.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "calc-undo" "calc/calc-undo.el" (21604 48549 +;;;;;; 941934 211000)) ;;; Generated autoloads from calc/calc-undo.el (autoload 'calc-undo "calc-undo" "\ @@ -2970,8 +2970,8 @@ See Info node `(calc)Defining Functions'. ;;;*** -;;;### (autoloads nil "calculator" "calculator.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "calculator" "calculator.el" (21604 48549 945934 +;;;;;; 212000)) ;;; Generated autoloads from calculator.el (autoload 'calculator "calculator" "\ @@ -2982,8 +2982,8 @@ See the documentation for `calculator-mode' for more information. ;;;*** -;;;### (autoloads nil "calendar" "calendar/calendar.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "calendar" "calendar/calendar.el" (21604 48549 +;;;;;; 953934 212000)) ;;; Generated autoloads from calendar/calendar.el (autoload 'calendar "calendar" "\ @@ -3026,8 +3026,8 @@ This function is suitable for execution in an init file. ;;;*** -;;;### (autoloads nil "canlock" "gnus/canlock.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "canlock" "gnus/canlock.el" (21604 48550 81934 +;;;;;; 217000)) ;;; Generated autoloads from gnus/canlock.el (autoload 'canlock-insert-header "canlock" "\ @@ -3044,8 +3044,8 @@ it fails. ;;;*** -;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21623 -;;;;;; 2108 292281 129000)) +;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21659 +;;;;;; 61733 214949 164000)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload 'c-guess-basic-syntax "cc-engine" "\ @@ -3055,8 +3055,8 @@ Return the syntactic context of the current line. ;;;*** -;;;### (autoloads nil "cc-guess" "progmodes/cc-guess.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "cc-guess" "progmodes/cc-guess.el" (21631 35966 +;;;;;; 903121 869000)) ;;; Generated autoloads from progmodes/cc-guess.el (defvar c-guess-guessed-offsets-alist nil "\ @@ -3154,8 +3154,8 @@ the absolute file name of the file if STYLE-NAME is nil. ;;;*** -;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21651 20707 +;;;;;; 184225 752000)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload 'c-initialize-cc-mode "cc-mode" "\ @@ -3312,8 +3312,8 @@ Key bindings: ;;;*** -;;;### (autoloads nil "cc-styles" "progmodes/cc-styles.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "cc-styles" "progmodes/cc-styles.el" (21631 +;;;;;; 35966 907121 870000)) ;;; Generated autoloads from progmodes/cc-styles.el (autoload 'c-set-style "cc-styles" "\ @@ -3364,8 +3364,8 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (21631 35966 +;;;;;; 907121 870000)) ;;; Generated autoloads from progmodes/cc-vars.el (put 'c-basic-offset 'safe-local-variable 'integerp) (put 'c-backslash-column 'safe-local-variable 'integerp) @@ -3373,8 +3373,8 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "ccl" "international/ccl.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "ccl" "international/ccl.el" (21604 48550 133934 +;;;;;; 219000)) ;;; Generated autoloads from international/ccl.el (autoload 'ccl-compile "ccl" "\ @@ -3634,8 +3634,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program. ;;;*** -;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21645 25761 +;;;;;; 789186 828000)) ;;; Generated autoloads from emacs-lisp/cconv.el (autoload 'cconv-closure-convert "cconv" "\ @@ -3654,15 +3654,15 @@ Add the warnings that closure conversion would encounter. ;;;*** -;;;### (autoloads nil "cedet" "cedet/cedet.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "cedet" "cedet/cedet.el" (21604 48549 957934 +;;;;;; 212000)) ;;; Generated autoloads from cedet/cedet.el (push (purecopy '(cedet 2 0)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (21604 48550 +;;;;;; 321934 226000)) ;;; Generated autoloads from progmodes/cfengine.el (push (purecopy '(cfengine 1 3)) package--builtin-versions) @@ -3691,15 +3691,15 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer contents. ;;;*** -;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21604 48550 +;;;;;; 5934 214000)) ;;; Generated autoloads from emacs-lisp/chart.el (push (purecopy '(chart 0 2)) package--builtin-versions) ;;;*** ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el" -;;;;;; (21607 54477 800124 118000)) +;;;;;; (21604 48550 5934 214000)) ;;; Generated autoloads from emacs-lisp/check-declare.el (autoload 'check-declare-file "check-declare" "\ @@ -3716,8 +3716,8 @@ Returns non-nil if any false statements are found. ;;;*** -;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21604 +;;;;;; 48550 9934 214000)) ;;; Generated autoloads from emacs-lisp/checkdoc.el (push (purecopy '(checkdoc 0 6 2)) package--builtin-versions) (put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp) @@ -3917,8 +3917,8 @@ checking of documentation strings. ;;;*** -;;;### (autoloads nil "china-util" "language/china-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "china-util" "language/china-util.el" (21604 +;;;;;; 48550 145934 219000)) ;;; Generated autoloads from language/china-util.el (autoload 'decode-hz-region "china-util" "\ @@ -3955,8 +3955,8 @@ Encode the text in the current buffer to HZ. ;;;*** -;;;### (autoloads nil "chistory" "chistory.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "chistory" "chistory.el" (21604 48549 985934 +;;;;;; 213000)) ;;; Generated autoloads from chistory.el (autoload 'repeat-matching-complex-command "chistory" "\ @@ -3995,8 +3995,8 @@ and runs the normal hook `command-history-hook'. ;;;*** -;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21604 +;;;;;; 48550 9934 214000)) ;;; Generated autoloads from emacs-lisp/cl-indent.el (autoload 'common-lisp-indent-function "cl-indent" "\ @@ -4079,8 +4079,8 @@ instead. ;;;*** -;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21619 26501 -;;;;;; 970129 581000)) +;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21631 35966 +;;;;;; 823121 866000)) ;;; Generated autoloads from emacs-lisp/cl-lib.el (push (purecopy '(cl-lib 1 0)) package--builtin-versions) @@ -4110,8 +4110,8 @@ a future Emacs interpreter will be able to use it.") ;;;*** -;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21604 48550 +;;;;;; 325934 226000)) ;;; Generated autoloads from progmodes/cmacexp.el (autoload 'c-macro-expand "cmacexp" "\ @@ -4131,8 +4131,8 @@ For use inside Lisp programs, see also `c-macro-expansion'. ;;;*** -;;;### (autoloads nil "cmuscheme" "cmuscheme.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "cmuscheme" "cmuscheme.el" (21604 48549 985934 +;;;;;; 213000)) ;;; Generated autoloads from cmuscheme.el (autoload 'run-scheme "cmuscheme" "\ @@ -4152,7 +4152,7 @@ is run). ;;;*** -;;;### (autoloads nil "color" "color.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "color" "color.el" (21604 48549 985934 213000)) ;;; Generated autoloads from color.el (autoload 'color-name-to-rgb "color" "\ @@ -4171,7 +4171,7 @@ If FRAME cannot display COLOR, return nil. ;;;*** -;;;### (autoloads nil "comint" "comint.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "comint" "comint.el" (21637 50476 651217 120000)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ @@ -4272,12 +4272,15 @@ REGEXP-GROUP is the regular expression group in REGEXP to use. ;;;*** -;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21637 50476 +;;;;;; 683217 122000)) ;;; Generated autoloads from vc/compare-w.el (autoload 'compare-windows "compare-w" "\ -Compare text in current window with text in next window. +Compare text in current window with text in another window. +The option `compare-windows-get-window-function' defines how +to get another window. + Compares the text starting at point in each window, moving over text in each one as far as they match. @@ -4306,8 +4309,8 @@ on third call it again advances points to the next difference and so on. ;;;*** -;;;### (autoloads nil "compile" "progmodes/compile.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "compile" "progmodes/compile.el" (21604 48550 +;;;;;; 325934 226000)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ @@ -4488,8 +4491,8 @@ This is the value of `next-error-function' in Compilation buffers. ;;;*** -;;;### (autoloads nil "completion" "completion.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "completion" "completion.el" (21659 61733 206949 +;;;;;; 164000)) ;;; Generated autoloads from completion.el (defvar dynamic-completion-mode nil "\ @@ -4511,8 +4514,8 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "conf-mode" "textmodes/conf-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "conf-mode" "textmodes/conf-mode.el" (21604 +;;;;;; 48550 393934 228000)) ;;; Generated autoloads from textmodes/conf-mode.el (autoload 'conf-mode "conf-mode" "\ @@ -4667,8 +4670,8 @@ For details see `conf-mode'. Example: ;;;*** -;;;### (autoloads nil "cookie1" "play/cookie1.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "cookie1" "play/cookie1.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from play/cookie1.el (autoload 'cookie "cookie1" "\ @@ -4696,8 +4699,8 @@ and subsequent calls on the same file won't go to disk. ;;;*** -;;;### (autoloads nil "copyright" "emacs-lisp/copyright.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "copyright" "emacs-lisp/copyright.el" (21604 +;;;;;; 48550 9934 214000)) ;;; Generated autoloads from emacs-lisp/copyright.el (put 'copyright-at-end-flag 'safe-local-variable 'booleanp) (put 'copyright-names-regexp 'safe-local-variable 'stringp) @@ -4735,8 +4738,8 @@ If FIX is non-nil, run `copyright-fix-years' instead. ;;;*** -;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21604 +;;;;;; 48550 325934 226000)) ;;; Generated autoloads from progmodes/cperl-mode.el (put 'cperl-indent-level 'safe-local-variable 'integerp) (put 'cperl-brace-offset 'safe-local-variable 'integerp) @@ -4934,8 +4937,8 @@ Run a `perldoc' on the word around point. ;;;*** -;;;### (autoloads nil "cpp" "progmodes/cpp.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "cpp" "progmodes/cpp.el" (21604 48550 329934 +;;;;;; 226000)) ;;; Generated autoloads from progmodes/cpp.el (autoload 'cpp-highlight-buffer "cpp" "\ @@ -4953,8 +4956,8 @@ Edit display information for cpp conditionals. ;;;*** -;;;### (autoloads nil "crm" "emacs-lisp/crm.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "crm" "emacs-lisp/crm.el" (21604 48550 9934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/crm.el (autoload 'completing-read-multiple "crm" "\ @@ -4980,8 +4983,8 @@ with empty strings removed. ;;;*** -;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21604 48550 +;;;;;; 393934 228000)) ;;; Generated autoloads from textmodes/css-mode.el (autoload 'css-mode "css-mode" "\ @@ -4997,8 +5000,8 @@ Major mode to edit \"Sassy CSS\" files. ;;;*** -;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (21604 48550 +;;;;;; 25934 215000)) ;;; Generated autoloads from emulation/cua-base.el (defvar cua-mode nil "\ @@ -5043,8 +5046,8 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. ;;;*** -;;;### (autoloads nil "cua-rect" "emulation/cua-rect.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "cua-rect" "emulation/cua-rect.el" (21604 48550 +;;;;;; 29934 215000)) ;;; Generated autoloads from emulation/cua-rect.el (autoload 'cua-rectangle-mark-mode "cua-rect" "\ @@ -5055,8 +5058,8 @@ Activates the region if needed. Only lasts until the region is deactivated. ;;;*** -;;;### (autoloads nil "cus-edit" "cus-edit.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "cus-edit" "cus-edit.el" (21645 38383 209524 +;;;;;; 819000)) ;;; Generated autoloads from cus-edit.el (defvar custom-browse-sort-alphabetically nil "\ @@ -5282,6 +5285,13 @@ Customize all loaded groups matching REGEXP. \(fn REGEXP)" t nil) +(autoload 'custom-prompt-customize-unsaved-options "cus-edit" "\ +Prompt user to customize any unsaved customization options. +Return non-nil if user chooses to customize, for use in +`kill-emacs-query-functions'. + +\(fn)" nil nil) + (autoload 'custom-buffer-create "cus-edit" "\ Create a buffer containing OPTIONS. Optional NAME is the name of the buffer. @@ -5368,8 +5378,8 @@ The format is suitable for use with `easy-menu-define'. ;;;*** -;;;### (autoloads nil "cus-theme" "cus-theme.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "cus-theme" "cus-theme.el" (21604 48549 993934 +;;;;;; 213000)) ;;; Generated autoloads from cus-theme.el (autoload 'customize-create-theme "cus-theme" "\ @@ -5402,8 +5412,8 @@ omitted, a buffer named *Custom Themes* is used. ;;;*** -;;;### (autoloads nil "cvs-status" "vc/cvs-status.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "cvs-status" "vc/cvs-status.el" (21604 48550 +;;;;;; 421934 229000)) ;;; Generated autoloads from vc/cvs-status.el (autoload 'cvs-status-mode "cvs-status" "\ @@ -5413,8 +5423,8 @@ Mode used for cvs status output. ;;;*** -;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (21604 48550 329934 +;;;;;; 226000)) ;;; Generated autoloads from progmodes/cwarn.el (push (purecopy '(cwarn 1 3 1)) package--builtin-versions) @@ -5458,8 +5468,8 @@ See `cwarn-mode' for more information on Cwarn mode. ;;;*** -;;;### (autoloads nil "cyril-util" "language/cyril-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "cyril-util" "language/cyril-util.el" (21604 +;;;;;; 48550 145934 219000)) ;;; Generated autoloads from language/cyril-util.el (autoload 'cyrillic-encode-koi8-r-char "cyril-util" "\ @@ -5487,8 +5497,8 @@ If the argument is nil, we return the display table to its standard state. ;;;*** -;;;### (autoloads nil "dabbrev" "dabbrev.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "dabbrev" "dabbrev.el" (21604 48549 993934 +;;;;;; 213000)) ;;; Generated autoloads from dabbrev.el (put 'dabbrev-case-fold-search 'risky-local-variable t) (put 'dabbrev-case-replace 'risky-local-variable t) @@ -5534,8 +5544,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. ;;;*** -;;;### (autoloads nil "data-debug" "cedet/data-debug.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "data-debug" "cedet/data-debug.el" (21604 48549 +;;;;;; 961934 212000)) ;;; Generated autoloads from cedet/data-debug.el (autoload 'data-debug-new-buffer "data-debug" "\ @@ -5545,7 +5555,7 @@ Create a new data-debug buffer with NAME. ;;;*** -;;;### (autoloads nil "dbus" "net/dbus.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "dbus" "net/dbus.el" (21604 48550 213934 222000)) ;;; Generated autoloads from net/dbus.el (autoload 'dbus-handle-event "dbus" "\ @@ -5558,8 +5568,8 @@ If the HANDLER returns a `dbus-error', it is propagated as return message. ;;;*** -;;;### (autoloads nil "dcl-mode" "progmodes/dcl-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "dcl-mode" "progmodes/dcl-mode.el" (21604 48550 +;;;;;; 329934 226000)) ;;; Generated autoloads from progmodes/dcl-mode.el (autoload 'dcl-mode "dcl-mode" "\ @@ -5685,8 +5695,8 @@ There is some minimal font-lock support (see vars ;;;*** -;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21604 48550 +;;;;;; 9934 214000)) ;;; Generated autoloads from emacs-lisp/debug.el (setq debugger 'debug) @@ -5729,8 +5739,8 @@ To specify a nil argument interactively, exit with an empty minibuffer. ;;;*** -;;;### (autoloads nil "decipher" "play/decipher.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "decipher" "play/decipher.el" (21604 48550 +;;;;;; 301934 225000)) ;;; Generated autoloads from play/decipher.el (autoload 'decipher "decipher" "\ @@ -5758,8 +5768,8 @@ The most useful commands are: ;;;*** -;;;### (autoloads nil "delim-col" "delim-col.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "delim-col" "delim-col.el" (21604 48549 993934 +;;;;;; 213000)) ;;; Generated autoloads from delim-col.el (push (purecopy '(delim-col 2 1)) package--builtin-versions) @@ -5784,7 +5794,7 @@ START and END delimits the corners of text rectangle. ;;;*** -;;;### (autoloads nil "delsel" "delsel.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "delsel" "delsel.el" (21604 48549 993934 213000)) ;;; Generated autoloads from delsel.el (defalias 'pending-delete-mode 'delete-selection-mode) @@ -5812,8 +5822,8 @@ point regardless of any selection. ;;;*** -;;;### (autoloads nil "derived" "emacs-lisp/derived.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "derived" "emacs-lisp/derived.el" (21604 48550 +;;;;;; 9934 214000)) ;;; Generated autoloads from emacs-lisp/derived.el (autoload 'define-derived-mode "derived" "\ @@ -5879,8 +5889,8 @@ the first time the mode is used. ;;;*** -;;;### (autoloads nil "descr-text" "descr-text.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "descr-text" "descr-text.el" (21604 48549 993934 +;;;;;; 213000)) ;;; Generated autoloads from descr-text.el (autoload 'describe-text-properties "descr-text" "\ @@ -5914,7 +5924,8 @@ relevant to POS. ;;;*** -;;;### (autoloads nil "desktop" "desktop.el" (21616 28857 81577 239000)) +;;;### (autoloads nil "desktop" "desktop.el" (21631 35966 815121 +;;;;;; 866000)) ;;; Generated autoloads from desktop.el (defvar desktop-save-mode nil "\ @@ -6119,8 +6130,8 @@ Revert to the last loaded desktop. ;;;*** -;;;### (autoloads nil "deuglify" "gnus/deuglify.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "deuglify" "gnus/deuglify.el" (21604 48550 +;;;;;; 81934 217000)) ;;; Generated autoloads from gnus/deuglify.el (autoload 'gnus-article-outlook-unwrap-lines "deuglify" "\ @@ -6152,8 +6163,8 @@ Deuglify broken Outlook (Express) articles and redisplay. ;;;*** -;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21625 -;;;;;; 43838 483701 627000)) +;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21631 +;;;;;; 35966 803121 866000)) ;;; Generated autoloads from calendar/diary-lib.el (autoload 'diary "diary-lib" "\ @@ -6195,7 +6206,7 @@ Major mode for editing the diary file. ;;;*** -;;;### (autoloads nil "diff" "vc/diff.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "diff" "vc/diff.el" (21604 48550 421934 229000)) ;;; Generated autoloads from vc/diff.el (defvar diff-switches (purecopy "-c") "\ @@ -6243,8 +6254,8 @@ This requires the external program `diff' to be in your `exec-path'. ;;;*** -;;;### (autoloads nil "diff-mode" "vc/diff-mode.el" (21628 45530 -;;;;;; 160140 360000)) +;;;### (autoloads nil "diff-mode" "vc/diff-mode.el" (21631 35966 +;;;;;; 923121 870000)) ;;; Generated autoloads from vc/diff-mode.el (autoload 'diff-mode "diff-mode" "\ @@ -6276,7 +6287,7 @@ the mode if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "dig" "net/dig.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "dig" "net/dig.el" (21604 48550 213934 222000)) ;;; Generated autoloads from net/dig.el (autoload 'dig "dig" "\ @@ -6287,7 +6298,7 @@ Optional arguments are passed to `dig-invoke'. ;;;*** -;;;### (autoloads nil "dired" "dired.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "dired" "dired.el" (21651 20707 164225 751000)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -6407,8 +6418,8 @@ Keybindings: ;;;*** -;;;### (autoloads nil "dirtrack" "dirtrack.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "dirtrack" "dirtrack.el" (21604 48549 997934 +;;;;;; 214000)) ;;; Generated autoloads from dirtrack.el (autoload 'dirtrack-mode "dirtrack" "\ @@ -6438,8 +6449,8 @@ from `default-directory'. ;;;*** -;;;### (autoloads nil "disass" "emacs-lisp/disass.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "disass" "emacs-lisp/disass.el" (21604 48550 +;;;;;; 13934 214000)) ;;; Generated autoloads from emacs-lisp/disass.el (autoload 'disassemble "disass" "\ @@ -6453,8 +6464,8 @@ redefine OBJECT if it is a symbol. ;;;*** -;;;### (autoloads nil "disp-table" "disp-table.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "disp-table" "disp-table.el" (21604 48549 997934 +;;;;;; 214000)) ;;; Generated autoloads from disp-table.el (autoload 'make-display-table "disp-table" "\ @@ -6575,8 +6586,8 @@ in `.emacs'. ;;;*** -;;;### (autoloads nil "dissociate" "play/dissociate.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "dissociate" "play/dissociate.el" (21604 48550 +;;;;;; 301934 225000)) ;;; Generated autoloads from play/dissociate.el (autoload 'dissociated-press "dissociate" "\ @@ -6592,7 +6603,7 @@ Default is 2. ;;;*** -;;;### (autoloads nil "dnd" "dnd.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "dnd" "dnd.el" (21604 48549 997934 214000)) ;;; Generated autoloads from dnd.el (defvar dnd-protocol-alist `((,(purecopy "^file:///") . dnd-open-local-file) (,(purecopy "^file://") . dnd-open-file) (,(purecopy "^file:") . dnd-open-local-file) (,(purecopy "^\\(https?\\|ftp\\|file\\|nfs\\)://") . dnd-open-file)) "\ @@ -6612,8 +6623,8 @@ if some action was made, or nil if the URL is ignored.") ;;;*** -;;;### (autoloads nil "dns-mode" "textmodes/dns-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "dns-mode" "textmodes/dns-mode.el" (21604 48550 +;;;;;; 393934 228000)) ;;; Generated autoloads from textmodes/dns-mode.el (autoload 'dns-mode "dns-mode" "\ @@ -6636,8 +6647,8 @@ Locate SOA record and increment the serial field. ;;;*** -;;;### (autoloads nil "doc-view" "doc-view.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "doc-view" "doc-view.el" (21604 48549 997934 +;;;;;; 214000)) ;;; Generated autoloads from doc-view.el (autoload 'doc-view-mode-p "doc-view" "\ @@ -6683,8 +6694,8 @@ See the command `doc-view-mode' for more information on this mode. ;;;*** -;;;### (autoloads nil "doctor" "play/doctor.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "doctor" "play/doctor.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from play/doctor.el (autoload 'doctor "doctor" "\ @@ -6694,7 +6705,7 @@ Switch to *doctor* buffer and start giving psychotherapy. ;;;*** -;;;### (autoloads nil "double" "double.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "double" "double.el" (21604 48549 997934 214000)) ;;; Generated autoloads from double.el (autoload 'double-mode "double" "\ @@ -6710,8 +6721,8 @@ strings when pressed twice. See `double-map' for details. ;;;*** -;;;### (autoloads nil "dunnet" "play/dunnet.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "dunnet" "play/dunnet.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/dunnet.el (push (purecopy '(dunnet 2 1)) package--builtin-versions) @@ -6722,8 +6733,8 @@ Switch to *dungeon* buffer and start game. ;;;*** -;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21604 +;;;;;; 48550 13934 214000)) ;;; Generated autoloads from emacs-lisp/easy-mmode.el (defalias 'easy-mmode-define-minor-mode 'define-minor-mode) @@ -6862,8 +6873,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX). ;;;*** -;;;### (autoloads nil "easymenu" "emacs-lisp/easymenu.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "easymenu" "emacs-lisp/easymenu.el" (21604 +;;;;;; 48550 13934 214000)) ;;; Generated autoloads from emacs-lisp/easymenu.el (autoload 'easy-menu-define "easymenu" "\ @@ -7001,8 +7012,8 @@ To implement dynamic menus, either call this from ;;;*** -;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (21604 48550 +;;;;;; 329934 226000)) ;;; Generated autoloads from progmodes/ebnf2ps.el (push (purecopy '(ebnf2ps 4 4)) package--builtin-versions) @@ -7267,8 +7278,8 @@ See `ebnf-style-database' documentation. ;;;*** -;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (21604 48550 +;;;;;; 333934 226000)) ;;; Generated autoloads from progmodes/ebrowse.el (autoload 'ebrowse-tree-mode "ebrowse" "\ @@ -7416,8 +7427,8 @@ Display statistics for a class tree. ;;;*** -;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (21604 48549 997934 +;;;;;; 214000)) ;;; Generated autoloads from ebuff-menu.el (autoload 'electric-buffer-list "ebuff-menu" "\ @@ -7449,8 +7460,8 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry. ;;;*** -;;;### (autoloads nil "echistory" "echistory.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "echistory" "echistory.el" (21604 48549 997934 +;;;;;; 214000)) ;;; Generated autoloads from echistory.el (autoload 'Electric-command-history-redo-expression "echistory" "\ @@ -7461,8 +7472,8 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** -;;;### (autoloads nil "ecomplete" "gnus/ecomplete.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "ecomplete" "gnus/ecomplete.el" (21604 48550 +;;;;;; 81934 217000)) ;;; Generated autoloads from gnus/ecomplete.el (autoload 'ecomplete-setup "ecomplete" "\ @@ -7472,7 +7483,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** -;;;### (autoloads nil "ede" "cedet/ede.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "ede" "cedet/ede.el" (21604 48549 961934 212000)) ;;; Generated autoloads from cedet/ede.el (push (purecopy '(ede 1 2)) package--builtin-versions) @@ -7498,8 +7509,8 @@ an EDE controlled project. ;;;*** -;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21604 48550 +;;;;;; 13934 214000)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -7563,7 +7574,7 @@ Toggle edebugging of all forms. ;;;*** -;;;### (autoloads nil "ediff" "vc/ediff.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "ediff" "vc/ediff.el" (21604 48550 429934 230000)) ;;; Generated autoloads from vc/ediff.el (push (purecopy '(ediff 2 81 4)) package--builtin-versions) @@ -7835,8 +7846,8 @@ With optional NODE, goes to that node. ;;;*** -;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21604 48550 +;;;;;; 425934 230000)) ;;; Generated autoloads from vc/ediff-help.el (autoload 'ediff-customize "ediff-help" "\ @@ -7846,8 +7857,8 @@ With optional NODE, goes to that node. ;;;*** -;;;### (autoloads nil "ediff-mult" "vc/ediff-mult.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ediff-mult" "vc/ediff-mult.el" (21604 48550 +;;;;;; 425934 230000)) ;;; Generated autoloads from vc/ediff-mult.el (autoload 'ediff-show-registry "ediff-mult" "\ @@ -7859,8 +7870,8 @@ Display Ediff's registry. ;;;*** -;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (21604 48550 +;;;;;; 425934 230000)) ;;; Generated autoloads from vc/ediff-util.el (autoload 'ediff-toggle-multiframe "ediff-util" "\ @@ -7879,8 +7890,8 @@ To change the default, set the variable `ediff-use-toolbar-p', which see. ;;;*** -;;;### (autoloads nil "edmacro" "edmacro.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "edmacro" "edmacro.el" (21604 48549 997934 +;;;;;; 214000)) ;;; Generated autoloads from edmacro.el (push (purecopy '(edmacro 2 1)) package--builtin-versions) @@ -7929,8 +7940,8 @@ or nil, use a compact 80-column format. ;;;*** -;;;### (autoloads nil "edt" "emulation/edt.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "edt" "emulation/edt.el" (21604 48550 29934 +;;;;;; 215000)) ;;; Generated autoloads from emulation/edt.el (autoload 'edt-set-scroll-margins "edt" "\ @@ -7947,7 +7958,7 @@ Turn on EDT Emulation. ;;;*** -;;;### (autoloads nil "ehelp" "ehelp.el" (21607 54477 800124 118000)) +;;;### (autoloads nil "ehelp" "ehelp.el" (21604 48549 997934 214000)) ;;; Generated autoloads from ehelp.el (autoload 'with-electric-help "ehelp" "\ @@ -7983,15 +7994,15 @@ BUFFER is put back into its original major mode. ;;;*** -;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21604 48550 +;;;;;; 17934 214000)) ;;; Generated autoloads from emacs-lisp/eieio.el (push (purecopy '(eieio 1 4)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21637 +;;;;;; 50476 655217 121000)) ;;; Generated autoloads from emacs-lisp/eieio-core.el (push (purecopy '(eieio-core 1 4)) package--builtin-versions) @@ -8007,8 +8018,8 @@ It creates an autoload function for CNAME's constructor. ;;;*** -;;;### (autoloads nil "elec-pair" "elec-pair.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "elec-pair" "elec-pair.el" (21604 48550 1934 +;;;;;; 214000)) ;;; Generated autoloads from elec-pair.el (defvar electric-pair-text-pairs '((34 . 34)) "\ @@ -8043,8 +8054,8 @@ closing parenthesis. (Likewise for brackets, etc.). ;;;*** -;;;### (autoloads nil "elide-head" "elide-head.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "elide-head" "elide-head.el" (21604 48550 1934 +;;;;;; 214000)) ;;; Generated autoloads from elide-head.el (autoload 'elide-head "elide-head" "\ @@ -8059,8 +8070,8 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks. ;;;*** -;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21604 48550 +;;;;;; 17934 214000)) ;;; Generated autoloads from emacs-lisp/elint.el (autoload 'elint-file "elint" "\ @@ -8095,8 +8106,8 @@ optional prefix argument REINIT is non-nil. ;;;*** -;;;### (autoloads nil "elp" "emacs-lisp/elp.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "elp" "emacs-lisp/elp.el" (21604 48550 17934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/elp.el (autoload 'elp-instrument-function "elp" "\ @@ -8130,8 +8141,8 @@ displayed. ;;;*** -;;;### (autoloads nil "emacs-lock" "emacs-lock.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "emacs-lock" "emacs-lock.el" (21604 48550 25934 +;;;;;; 215000)) ;;; Generated autoloads from emacs-lock.el (autoload 'emacs-lock-mode "emacs-lock" "\ @@ -8158,8 +8169,8 @@ Other values are interpreted as usual. ;;;*** -;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (21608 34742 -;;;;;; 2253 811000)) +;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (21631 35966 +;;;;;; 875121 868000)) ;;; Generated autoloads from mail/emacsbug.el (autoload 'report-emacs-bug "emacsbug" "\ @@ -8172,8 +8183,8 @@ Prompts for bug subject. Leaves you in a mail buffer. ;;;*** -;;;### (autoloads nil "emerge" "vc/emerge.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "emerge" "vc/emerge.el" (21604 48550 429934 +;;;;;; 230000)) ;;; Generated autoloads from vc/emerge.el (autoload 'emerge-files "emerge" "\ @@ -8233,8 +8244,8 @@ Emerge two RCS revisions of a file, with another revision as ancestor. ;;;*** -;;;### (autoloads nil "enriched" "textmodes/enriched.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "enriched" "textmodes/enriched.el" (21604 48550 +;;;;;; 393934 228000)) ;;; Generated autoloads from textmodes/enriched.el (autoload 'enriched-mode "enriched" "\ @@ -8269,7 +8280,7 @@ Commands: ;;;*** -;;;### (autoloads nil "epa" "epa.el" (21624 22971 140149 848000)) +;;;### (autoloads nil "epa" "epa.el" (21631 35966 827121 867000)) ;;; Generated autoloads from epa.el (autoload 'epa-list-keys "epa" "\ @@ -8457,8 +8468,8 @@ Insert selected KEYS after the point. ;;;*** -;;;### (autoloads nil "epa-dired" "epa-dired.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "epa-dired" "epa-dired.el" (21604 48550 33934 +;;;;;; 215000)) ;;; Generated autoloads from epa-dired.el (autoload 'epa-dired-do-decrypt "epa-dired" "\ @@ -8483,8 +8494,8 @@ Encrypt marked files. ;;;*** -;;;### (autoloads nil "epa-file" "epa-file.el" (21611 10937 700236 -;;;;;; 3000)) +;;;### (autoloads nil "epa-file" "epa-file.el" (21631 35966 827121 +;;;;;; 867000)) ;;; Generated autoloads from epa-file.el (autoload 'epa-file-handler "epa-file" "\ @@ -8504,8 +8515,8 @@ Encrypt marked files. ;;;*** -;;;### (autoloads nil "epa-mail" "epa-mail.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "epa-mail" "epa-mail.el" (21604 48550 33934 +;;;;;; 215000)) ;;; Generated autoloads from epa-mail.el (autoload 'epa-mail-mode "epa-mail" "\ @@ -8582,7 +8593,7 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "epg" "epg.el" (21611 10937 700236 3000)) +;;;### (autoloads nil "epg" "epg.el" (21631 35966 827121 867000)) ;;; Generated autoloads from epg.el (push (purecopy '(epg 1 0 0)) package--builtin-versions) @@ -8593,8 +8604,8 @@ Return a context object. ;;;*** -;;;### (autoloads nil "epg-config" "epg-config.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "epg-config" "epg-config.el" (21604 48550 33934 +;;;;;; 215000)) ;;; Generated autoloads from epg-config.el (autoload 'epg-configuration "epg-config" "\ @@ -8614,7 +8625,7 @@ Look at CONFIG and try to expand GROUP. ;;;*** -;;;### (autoloads nil "erc" "erc/erc.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "erc" "erc/erc.el" (21604 48550 49934 215000)) ;;; Generated autoloads from erc/erc.el (autoload 'erc-select-read-args "erc" "\ @@ -8643,7 +8654,7 @@ then the server and full-name will be set to those values, whereas `erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will be invoked for the values of the other parameters. -\(fn &key (server (erc-compute-server)) (port (erc-compute-port)) (nick (erc-compute-nick)) PASSWORD (full-name (erc-compute-full-name)))" t nil) +\(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) PASSWORD (FULL-NAME (erc-compute-full-name)))" t nil) (defalias 'erc-select 'erc) @@ -8662,36 +8673,36 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. ;;;*** -;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (21604 +;;;;;; 48550 37934 215000)) ;;; Generated autoloads from erc/erc-autoaway.el (autoload 'erc-autoaway-mode "erc-autoaway") ;;;*** -;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21604 48550 +;;;;;; 37934 215000)) ;;; Generated autoloads from erc/erc-button.el (autoload 'erc-button-mode "erc-button" nil t) ;;;*** -;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (21604 48550 +;;;;;; 41934 215000)) ;;; Generated autoloads from erc/erc-capab.el (autoload 'erc-capab-identify-mode "erc-capab" nil t) ;;;*** -;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (21604 48550 +;;;;;; 41934 215000)) ;;; Generated autoloads from erc/erc-compat.el (autoload 'erc-define-minor-mode "erc-compat") ;;;*** -;;;### (autoloads nil "erc-dcc" "erc/erc-dcc.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-dcc" "erc/erc-dcc.el" (21604 48550 41934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-dcc.el (autoload 'erc-dcc-mode "erc-dcc") @@ -8721,14 +8732,14 @@ that subcommand. ;;;*** ;;;### (autoloads nil "erc-desktop-notifications" "erc/erc-desktop-notifications.el" -;;;;;; (21617 49721 420132 227000)) +;;;;;; (21631 35966 831121 867000)) ;;; Generated autoloads from erc/erc-desktop-notifications.el (autoload 'erc-notifications-mode "erc-desktop-notifications" "" t) ;;;*** -;;;### (autoloads nil "erc-ezbounce" "erc/erc-ezbounce.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-ezbounce" "erc/erc-ezbounce.el" (21604 +;;;;;; 48550 41934 215000)) ;;; Generated autoloads from erc/erc-ezbounce.el (autoload 'erc-cmd-ezb "erc-ezbounce" "\ @@ -8790,8 +8801,8 @@ Add EZBouncer convenience functions to ERC. ;;;*** -;;;### (autoloads nil "erc-fill" "erc/erc-fill.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-fill" "erc/erc-fill.el" (21604 48550 41934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-fill.el (autoload 'erc-fill-mode "erc-fill" nil t) @@ -8803,8 +8814,8 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'. ;;;*** -;;;### (autoloads nil "erc-identd" "erc/erc-identd.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-identd" "erc/erc-identd.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-identd.el (autoload 'erc-identd-mode "erc-identd") @@ -8825,8 +8836,8 @@ system. ;;;*** -;;;### (autoloads nil "erc-imenu" "erc/erc-imenu.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-imenu" "erc/erc-imenu.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-imenu.el (autoload 'erc-create-imenu-index "erc-imenu" "\ @@ -8836,22 +8847,22 @@ system. ;;;*** -;;;### (autoloads nil "erc-join" "erc/erc-join.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-join" "erc/erc-join.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-join.el (autoload 'erc-autojoin-mode "erc-join" nil t) ;;;*** -;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-list.el (autoload 'erc-list-mode "erc-list") ;;;*** -;;;### (autoloads nil "erc-log" "erc/erc-log.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-log" "erc/erc-log.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-log.el (autoload 'erc-log-mode "erc-log" nil t) @@ -8880,8 +8891,8 @@ You can save every individual message by putting this function on ;;;*** -;;;### (autoloads nil "erc-match" "erc/erc-match.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-match" "erc/erc-match.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-match.el (autoload 'erc-match-mode "erc-match") @@ -8927,15 +8938,15 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'. ;;;*** -;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-menu.el (autoload 'erc-menu-mode "erc-menu" nil t) ;;;*** -;;;### (autoloads nil "erc-netsplit" "erc/erc-netsplit.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-netsplit" "erc/erc-netsplit.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-netsplit.el (autoload 'erc-netsplit-mode "erc-netsplit") @@ -8946,8 +8957,8 @@ Show who's gone. ;;;*** -;;;### (autoloads nil "erc-networks" "erc/erc-networks.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-networks" "erc/erc-networks.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-networks.el (autoload 'erc-determine-network "erc-networks" "\ @@ -8964,8 +8975,8 @@ Interactively select a server to connect to using `erc-server-alist'. ;;;*** -;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-notify.el (autoload 'erc-notify-mode "erc-notify" nil t) @@ -8983,36 +8994,36 @@ with args, toggle notify status of people. ;;;*** -;;;### (autoloads nil "erc-page" "erc/erc-page.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-page" "erc/erc-page.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-page.el (autoload 'erc-page-mode "erc-page") ;;;*** -;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-pcomplete.el (autoload 'erc-completion-mode "erc-pcomplete" nil t) ;;;*** -;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-replace.el (autoload 'erc-replace-mode "erc-replace") ;;;*** -;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-ring.el (autoload 'erc-ring-mode "erc-ring" nil t) ;;;*** -;;;### (autoloads nil "erc-services" "erc/erc-services.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-services" "erc/erc-services.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-services.el (autoload 'erc-services-mode "erc-services" nil t) @@ -9029,15 +9040,15 @@ When called interactively, read the password using `read-passwd'. ;;;*** -;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-sound.el (autoload 'erc-sound-mode "erc-sound") ;;;*** -;;;### (autoloads nil "erc-speedbar" "erc/erc-speedbar.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-speedbar" "erc/erc-speedbar.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-speedbar.el (autoload 'erc-speedbar-browser "erc-speedbar" "\ @@ -9048,22 +9059,22 @@ This will add a speedbar major display mode. ;;;*** -;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-spelling.el (autoload 'erc-spelling-mode "erc-spelling" nil t) ;;;*** -;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-stamp.el (autoload 'erc-timestamp-mode "erc-stamp" nil t) ;;;*** -;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21604 48550 +;;;;;; 45934 215000)) ;;; Generated autoloads from erc/erc-track.el (defvar erc-track-minor-mode nil "\ @@ -9088,8 +9099,8 @@ keybindings will not do anything useful. ;;;*** -;;;### (autoloads nil "erc-truncate" "erc/erc-truncate.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "erc-truncate" "erc/erc-truncate.el" (21604 +;;;;;; 48550 45934 215000)) ;;; Generated autoloads from erc/erc-truncate.el (autoload 'erc-truncate-mode "erc-truncate" nil t) @@ -9108,8 +9119,8 @@ Meant to be used in hooks, like `erc-insert-post-hook'. ;;;*** -;;;### (autoloads nil "erc-xdcc" "erc/erc-xdcc.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "erc-xdcc" "erc/erc-xdcc.el" (21604 48550 45934 +;;;;;; 215000)) ;;; Generated autoloads from erc/erc-xdcc.el (autoload 'erc-xdcc-mode "erc-xdcc") @@ -9120,8 +9131,8 @@ Add a file to `erc-xdcc-files'. ;;;*** -;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21604 48550 17934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/ert.el (autoload 'ert-deftest "ert" "\ @@ -9139,7 +9150,11 @@ Tests that are expected to fail can be marked as such using :expected-result. See `ert-test-result-type-p' for a description of valid values for RESULT-TYPE. -\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags '(TAG...)] BODY...)" nil (quote macro)) +\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags '(TAG...)] BODY...)" nil t) + +(function-put 'ert-deftest 'doc-string-elt '3) + +(function-put 'ert-deftest 'lisp-indent-function '2) (put 'ert-deftest 'lisp-indent-function 2) @@ -9186,8 +9201,8 @@ Display the documentation for TEST-OR-TEST-NAME (a symbol or ert-test). ;;;*** -;;;### (autoloads nil "ert-x" "emacs-lisp/ert-x.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "ert-x" "emacs-lisp/ert-x.el" (21604 48550 +;;;;;; 17934 214000)) ;;; Generated autoloads from emacs-lisp/ert-x.el (put 'ert-with-test-buffer 'lisp-indent-function 1) @@ -9199,8 +9214,8 @@ Kill all test buffers that are still live. ;;;*** -;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21604 48550 +;;;;;; 53934 216000)) ;;; Generated autoloads from eshell/esh-mode.el (autoload 'eshell-mode "esh-mode" "\ @@ -9210,8 +9225,8 @@ Emacs shell interactive mode. ;;;*** -;;;### (autoloads nil "eshell" "eshell/eshell.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "eshell" "eshell/eshell.el" (21604 48550 53934 +;;;;;; 216000)) ;;; Generated autoloads from eshell/eshell.el (push (purecopy '(eshell 2 4 2)) package--builtin-versions) @@ -9246,8 +9261,8 @@ corresponding to a successful execution. ;;;*** -;;;### (autoloads nil "etags" "progmodes/etags.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "etags" "progmodes/etags.el" (21660 25453 16850 +;;;;;; 17000)) ;;; Generated autoloads from progmodes/etags.el (defvar tags-file-name nil "\ @@ -9340,6 +9355,11 @@ as they appeared in the `etags' command that created the table, usually without directory names. \(fn)" nil nil) + +(autoload 'tags-lazy-completion-table "etags" "\ + + +\(fn)" nil nil) (defun tags-completion-at-point-function () (if (or tags-table-list tags-file-name) (progn @@ -9388,7 +9408,6 @@ Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'. \(fn TAGNAME &optional NEXT-P REGEXP-P)" t nil) - (define-key esc-map "." 'find-tag) (autoload 'find-tag-other-window "etags" "\ Find tag (in current tags table) whose name contains TAGNAME. @@ -9411,7 +9430,6 @@ Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'. \(fn TAGNAME &optional NEXT-P REGEXP-P)" t nil) - (define-key ctl-x-4-map "." 'find-tag-other-window) (autoload 'find-tag-other-frame "etags" "\ Find tag (in current tags table) whose name contains TAGNAME. @@ -9434,7 +9452,6 @@ Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'. \(fn TAGNAME &optional NEXT-P)" t nil) - (define-key ctl-x-5-map "." 'find-tag-other-frame) (autoload 'find-tag-regexp "etags" "\ Find tag (in current tags table) whose name matches REGEXP. @@ -9455,17 +9472,8 @@ Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'. \(fn REGEXP &optional NEXT-P OTHER-WINDOW)" t nil) - (define-key esc-map [?\C-.] 'find-tag-regexp) - (define-key esc-map "*" 'pop-tag-mark) -(autoload 'pop-tag-mark "etags" "\ -Pop back to where \\[find-tag] was last invoked. - -This is distinct from invoking \\[find-tag] with a negative argument -since that pops a stack of markers at which tags were found, not from -where they were found. - -\(fn)" t nil) +(defalias 'pop-tag-mark 'xref-pop-marker-stack) (autoload 'next-file "etags" "\ Select next file among files in current tags table. @@ -9494,7 +9502,6 @@ evaluate to operate on an interesting file. If the latter evaluates to nil, we exit; otherwise we scan the next file. \(fn &optional FIRST-TIME)" t nil) - (define-key esc-map "," 'tags-loop-continue) (autoload 'tags-search "etags" "\ Search through all files listed in tags table for match for REGEXP. @@ -9553,10 +9560,15 @@ for \\[find-tag] (which see). \(fn)" t nil) +(autoload 'etags-xref-find "etags" "\ + + +\(fn ACTION ID)" nil nil) + ;;;*** -;;;### (autoloads nil "ethio-util" "language/ethio-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "ethio-util" "language/ethio-util.el" (21604 +;;;;;; 48550 145934 219000)) ;;; Generated autoloads from language/ethio-util.el (autoload 'setup-ethiopic-environment-internal "ethio-util" "\ @@ -9724,7 +9736,7 @@ With ARG, insert that many delimiters. ;;;*** -;;;### (autoloads nil "eudc" "net/eudc.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "eudc" "net/eudc.el" (21604 48550 213934 222000)) ;;; Generated autoloads from net/eudc.el (autoload 'eudc-set-server "eudc" "\ @@ -9778,8 +9790,8 @@ This does nothing except loading eudc by autoload side-effect. ;;;*** -;;;### (autoloads nil "eudc-bob" "net/eudc-bob.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "eudc-bob" "net/eudc-bob.el" (21604 48550 213934 +;;;;;; 222000)) ;;; Generated autoloads from net/eudc-bob.el (autoload 'eudc-display-generic-binary "eudc-bob" "\ @@ -9814,8 +9826,8 @@ Display a button for the JPEG DATA. ;;;*** -;;;### (autoloads nil "eudc-export" "net/eudc-export.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "eudc-export" "net/eudc-export.el" (21604 48550 +;;;;;; 213934 222000)) ;;; Generated autoloads from net/eudc-export.el (autoload 'eudc-insert-record-at-point-into-bbdb "eudc-export" "\ @@ -9831,8 +9843,8 @@ Call `eudc-insert-record-at-point-into-bbdb' if on a record. ;;;*** -;;;### (autoloads nil "eudc-hotlist" "net/eudc-hotlist.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "eudc-hotlist" "net/eudc-hotlist.el" (21604 +;;;;;; 48550 213934 222000)) ;;; Generated autoloads from net/eudc-hotlist.el (autoload 'eudc-edit-hotlist "eudc-hotlist" "\ @@ -9842,8 +9854,8 @@ Edit the hotlist of directory servers in a specialized buffer. ;;;*** -;;;### (autoloads nil "ewoc" "emacs-lisp/ewoc.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "ewoc" "emacs-lisp/ewoc.el" (21604 48550 17934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/ewoc.el (autoload 'ewoc-create "ewoc" "\ @@ -9869,7 +9881,7 @@ fourth arg NOSEP non-nil inhibits this. ;;;*** -;;;### (autoloads nil "eww" "net/eww.el" (21628 44513 720130 219000)) +;;;### (autoloads nil "eww" "net/eww.el" (21640 32530 974334 457000)) ;;; Generated autoloads from net/eww.el (autoload 'eww "eww" "\ @@ -9903,8 +9915,8 @@ Display the bookmarks. ;;;*** -;;;### (autoloads nil "executable" "progmodes/executable.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "executable" "progmodes/executable.el" (21604 +;;;;;; 48550 333934 226000)) ;;; Generated autoloads from progmodes/executable.el (autoload 'executable-command-find-posix-p "executable" "\ @@ -9945,7 +9957,7 @@ file modes. ;;;*** -;;;### (autoloads nil "expand" "expand.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "expand" "expand.el" (21604 48550 53934 216000)) ;;; Generated autoloads from expand.el (autoload 'expand-add-abbrevs "expand" "\ @@ -9994,8 +10006,8 @@ This is used only in conjunction with `expand-add-abbrevs'. ;;;*** -;;;### (autoloads nil "f90" "progmodes/f90.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "f90" "progmodes/f90.el" (21604 48550 333934 +;;;;;; 226000)) ;;; Generated autoloads from progmodes/f90.el (autoload 'f90-mode "f90" "\ @@ -10062,8 +10074,8 @@ with no args, if that value is non-nil. ;;;*** -;;;### (autoloads nil "face-remap" "face-remap.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "face-remap" "face-remap.el" (21604 48550 53934 +;;;;;; 216000)) ;;; Generated autoloads from face-remap.el (autoload 'face-remap-add-relative "face-remap" "\ @@ -10222,8 +10234,8 @@ Besides the choice of face, it is the same as `buffer-face-mode'. ;;;*** -;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/feedmail.el (push (purecopy '(feedmail 11)) package--builtin-versions) @@ -10277,7 +10289,7 @@ you can set `feedmail-queue-reminder-alist' to nil. ;;;*** -;;;### (autoloads nil "ffap" "ffap.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "ffap" "ffap.el" (21604 48550 57934 216000)) ;;; Generated autoloads from ffap.el (autoload 'ffap-next "ffap" "\ @@ -10340,8 +10352,8 @@ Evaluate the forms in variable `ffap-bindings'. ;;;*** -;;;### (autoloads nil "filecache" "filecache.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "filecache" "filecache.el" (21604 48550 57934 +;;;;;; 216000)) ;;; Generated autoloads from filecache.el (autoload 'file-cache-add-directory "filecache" "\ @@ -10398,8 +10410,8 @@ the name is considered already unique; only the second substitution ;;;*** -;;;### (autoloads nil "filenotify" "filenotify.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "filenotify" "filenotify.el" (21604 48550 57934 +;;;;;; 216000)) ;;; Generated autoloads from filenotify.el (autoload 'file-notify-handle-event "filenotify" "\ @@ -10411,8 +10423,7 @@ Otherwise, signal a `file-notify-error'. ;;;*** -;;;### (autoloads nil "files-x" "files-x.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "files-x" "files-x.el" (21604 48550 57934 216000)) ;;; Generated autoloads from files-x.el (autoload 'add-file-local-variable "files-x" "\ @@ -10477,8 +10488,8 @@ Copy directory-local variables to the -*- line. ;;;*** -;;;### (autoloads nil "filesets" "filesets.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "filesets" "filesets.el" (21604 48550 61934 +;;;;;; 216000)) ;;; Generated autoloads from filesets.el (autoload 'filesets-init "filesets" "\ @@ -10489,8 +10500,8 @@ Set up hooks, load the cache file -- if existing -- and build the menu. ;;;*** -;;;### (autoloads nil "find-cmd" "find-cmd.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "find-cmd" "find-cmd.el" (21604 48550 61934 +;;;;;; 216000)) ;;; Generated autoloads from find-cmd.el (push (purecopy '(find-cmd 0 6)) package--builtin-versions) @@ -10510,8 +10521,8 @@ result is a string that should be ready for the command line. ;;;*** -;;;### (autoloads nil "find-dired" "find-dired.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "find-dired" "find-dired.el" (21604 48550 61934 +;;;;;; 216000)) ;;; Generated autoloads from find-dired.el (autoload 'find-dired "find-dired" "\ @@ -10551,8 +10562,8 @@ use in place of \"-ls\" as the final argument. ;;;*** -;;;### (autoloads nil "find-file" "find-file.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "find-file" "find-file.el" (21604 48550 61934 +;;;;;; 216000)) ;;; Generated autoloads from find-file.el (defvar ff-special-constructs `((,(purecopy "^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") lambda nil (buffer-substring (match-beginning 2) (match-end 2)))) "\ @@ -10642,8 +10653,8 @@ Visit the file you click on in another window. ;;;*** -;;;### (autoloads nil "find-func" "emacs-lisp/find-func.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "find-func" "emacs-lisp/find-func.el" (21640 +;;;;;; 60472 610520 813000)) ;;; Generated autoloads from emacs-lisp/find-func.el (autoload 'find-library "find-func" "\ @@ -10801,8 +10812,8 @@ Define some key bindings for the find-function family of functions. ;;;*** -;;;### (autoloads nil "find-lisp" "find-lisp.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "find-lisp" "find-lisp.el" (21604 48550 61934 +;;;;;; 216000)) ;;; Generated autoloads from find-lisp.el (autoload 'find-lisp-find-dired "find-lisp" "\ @@ -10822,7 +10833,7 @@ Change the filter on a `find-lisp-find-dired' buffer to REGEXP. ;;;*** -;;;### (autoloads nil "finder" "finder.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "finder" "finder.el" (21604 48550 61934 216000)) ;;; Generated autoloads from finder.el (push (purecopy '(finder 1 0)) package--builtin-versions) @@ -10844,8 +10855,8 @@ Find packages matching a given keyword. ;;;*** -;;;### (autoloads nil "flow-ctrl" "flow-ctrl.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "flow-ctrl" "flow-ctrl.el" (21604 48550 61934 +;;;;;; 216000)) ;;; Generated autoloads from flow-ctrl.el (autoload 'enable-flow-control "flow-ctrl" "\ @@ -10866,8 +10877,8 @@ to get the effect of a C-q. ;;;*** -;;;### (autoloads nil "flow-fill" "gnus/flow-fill.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "flow-fill" "gnus/flow-fill.el" (21604 48550 +;;;;;; 81934 217000)) ;;; Generated autoloads from gnus/flow-fill.el (autoload 'fill-flowed-encode "flow-fill" "\ @@ -10882,8 +10893,8 @@ to get the effect of a C-q. ;;;*** -;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21604 48550 +;;;;;; 333934 226000)) ;;; Generated autoloads from progmodes/flymake.el (push (purecopy '(flymake 0 3)) package--builtin-versions) @@ -10913,8 +10924,8 @@ Turn flymake mode off. ;;;*** -;;;### (autoloads nil "flyspell" "textmodes/flyspell.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "flyspell" "textmodes/flyspell.el" (21604 48550 +;;;;;; 397934 228000)) ;;; Generated autoloads from textmodes/flyspell.el (autoload 'flyspell-prog-mode "flyspell" "\ @@ -10984,14 +10995,13 @@ Flyspell whole buffer. ;;;*** -;;;### (autoloads nil "foldout" "foldout.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "foldout" "foldout.el" (21604 48550 61934 216000)) ;;; Generated autoloads from foldout.el (push (purecopy '(foldout 1 10)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "follow" "follow.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "follow" "follow.el" (21604 48550 61934 216000)) ;;; Generated autoloads from follow.el (autoload 'turn-on-follow-mode "follow" "\ @@ -11059,8 +11069,8 @@ selected if the original window is the first one in the frame. ;;;*** -;;;### (autoloads nil "footnote" "mail/footnote.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "footnote" "mail/footnote.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/footnote.el (push (purecopy '(footnote 0 19)) package--builtin-versions) @@ -11079,7 +11089,7 @@ play around with the following keys: ;;;*** -;;;### (autoloads nil "forms" "forms.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "forms" "forms.el" (21604 48550 65934 216000)) ;;; Generated autoloads from forms.el (autoload 'forms-mode "forms" "\ @@ -11115,8 +11125,8 @@ Visit a file in Forms mode in other window. ;;;*** -;;;### (autoloads nil "fortran" "progmodes/fortran.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "fortran" "progmodes/fortran.el" (21604 48550 +;;;;;; 337934 226000)) ;;; Generated autoloads from progmodes/fortran.el (autoload 'fortran-mode "fortran" "\ @@ -11193,8 +11203,8 @@ with no args, if that value is non-nil. ;;;*** -;;;### (autoloads nil "fortune" "play/fortune.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "fortune" "play/fortune.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/fortune.el (autoload 'fortune-add-fortune "fortune" "\ @@ -11242,8 +11252,8 @@ and choose the directory as the fortune-file. ;;;*** -;;;### (autoloads nil "frameset" "frameset.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "frameset" "frameset.el" (21604 48550 65934 +;;;;;; 216000)) ;;; Generated autoloads from frameset.el (defvar frameset-session-filter-alist '((name . :never) (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "\ @@ -11429,15 +11439,15 @@ Interactively, reads the register using `register-read-with-preview'. ;;;*** -;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (21604 48550 +;;;;;; 305934 225000)) ;;; Generated autoloads from play/gamegrid.el (push (purecopy '(gamegrid 1 2)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21604 48550 +;;;;;; 337934 226000)) ;;; Generated autoloads from progmodes/gdb-mi.el (defvar gdb-enable-debug nil "\ @@ -11514,8 +11524,8 @@ detailed description of this mode. ;;;*** -;;;### (autoloads nil "generic" "emacs-lisp/generic.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "generic" "emacs-lisp/generic.el" (21604 48550 +;;;;;; 17934 214000)) ;;; Generated autoloads from emacs-lisp/generic.el (defvar generic-mode-list nil "\ @@ -11595,8 +11605,8 @@ regular expression that can be used as an element of ;;;*** -;;;### (autoloads nil "glasses" "progmodes/glasses.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "glasses" "progmodes/glasses.el" (21604 48550 +;;;;;; 337934 226000)) ;;; Generated autoloads from progmodes/glasses.el (autoload 'glasses-mode "glasses" "\ @@ -11610,8 +11620,8 @@ add virtual separators (like underscores) at places they belong to. ;;;*** -;;;### (autoloads nil "gmm-utils" "gnus/gmm-utils.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gmm-utils" "gnus/gmm-utils.el" (21604 48550 +;;;;;; 81934 217000)) ;;; Generated autoloads from gnus/gmm-utils.el (autoload 'gmm-regexp-concat "gmm-utils" "\ @@ -11665,7 +11675,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST. ;;;*** -;;;### (autoloads nil "gnus" "gnus/gnus.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "gnus" "gnus/gnus.el" (21604 48550 101934 217000)) ;;; Generated autoloads from gnus/gnus.el (push (purecopy '(gnus 5 13)) package--builtin-versions) (when (fboundp 'custom-autoload) @@ -11715,8 +11725,8 @@ prompt the user for the name of an NNTP server to use. ;;;*** -;;;### (autoloads nil "gnus-agent" "gnus/gnus-agent.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-agent" "gnus/gnus-agent.el" (21604 48550 +;;;;;; 85934 217000)) ;;; Generated autoloads from gnus/gnus-agent.el (autoload 'gnus-unplugged "gnus-agent" "\ @@ -11806,8 +11816,8 @@ CLEAN is obsolete and ignored. ;;;*** -;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21623 2108 292281 -;;;;;; 129000)) +;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21651 20707 +;;;;;; 176225 752000)) ;;; Generated autoloads from gnus/gnus-art.el (autoload 'gnus-article-prepare-display "gnus-art" "\ @@ -11817,8 +11827,8 @@ Make the current buffer look like a nice article. ;;;*** -;;;### (autoloads nil "gnus-bookmark" "gnus/gnus-bookmark.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "gnus-bookmark" "gnus/gnus-bookmark.el" (21645 +;;;;;; 25761 793186 828000)) ;;; Generated autoloads from gnus/gnus-bookmark.el (autoload 'gnus-bookmark-set "gnus-bookmark" "\ @@ -11841,8 +11851,8 @@ deletion, or > if it is flagged for displaying. ;;;*** -;;;### (autoloads nil "gnus-cache" "gnus/gnus-cache.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-cache" "gnus/gnus-cache.el" (21604 48550 +;;;;;; 85934 217000)) ;;; Generated autoloads from gnus/gnus-cache.el (autoload 'gnus-jog-cache "gnus-cache" "\ @@ -11883,8 +11893,8 @@ supported. ;;;*** -;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-delay.el (autoload 'gnus-delay-article "gnus-delay" "\ @@ -11919,8 +11929,8 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil. ;;;*** -;;;### (autoloads nil "gnus-diary" "gnus/gnus-diary.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-diary" "gnus/gnus-diary.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-diary.el (autoload 'gnus-user-format-function-d "gnus-diary" "\ @@ -11935,8 +11945,8 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil. ;;;*** -;;;### (autoloads nil "gnus-dired" "gnus/gnus-dired.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-dired" "gnus/gnus-dired.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-dired.el (autoload 'turn-on-gnus-dired-mode "gnus-dired" "\ @@ -11946,8 +11956,8 @@ Convenience method to turn on gnus-dired-mode. ;;;*** -;;;### (autoloads nil "gnus-draft" "gnus/gnus-draft.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-draft" "gnus/gnus-draft.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-draft.el (autoload 'gnus-draft-reminder "gnus-draft" "\ @@ -11957,8 +11967,8 @@ Reminder user if there are unsent drafts. ;;;*** -;;;### (autoloads nil "gnus-fun" "gnus/gnus-fun.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-fun" "gnus/gnus-fun.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-fun.el (autoload 'gnus--random-face-with-type "gnus-fun" "\ @@ -12023,8 +12033,8 @@ Insert a random Face header from `gnus-face-directory'. ;;;*** -;;;### (autoloads nil "gnus-gravatar" "gnus/gnus-gravatar.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "gnus-gravatar" "gnus/gnus-gravatar.el" (21604 +;;;;;; 48550 89934 217000)) ;;; Generated autoloads from gnus/gnus-gravatar.el (autoload 'gnus-treat-from-gravatar "gnus-gravatar" "\ @@ -12041,8 +12051,8 @@ If gravatars are already displayed, remove them. ;;;*** -;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-group.el (autoload 'gnus-fetch-group "gnus-group" "\ @@ -12059,8 +12069,8 @@ Pop up a frame and enter GROUP. ;;;*** -;;;### (autoloads nil "gnus-html" "gnus/gnus-html.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-html" "gnus/gnus-html.el" (21604 48550 +;;;;;; 89934 217000)) ;;; Generated autoloads from gnus/gnus-html.el (autoload 'gnus-article-html "gnus-html" "\ @@ -12075,8 +12085,8 @@ Pop up a frame and enter GROUP. ;;;*** -;;;### (autoloads nil "gnus-kill" "gnus/gnus-kill.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-kill" "gnus/gnus-kill.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-kill.el (defalias 'gnus-batch-kill 'gnus-batch-score) @@ -12089,8 +12099,8 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score ;;;*** -;;;### (autoloads nil "gnus-ml" "gnus/gnus-ml.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "gnus-ml" "gnus/gnus-ml.el" (21604 48550 93934 +;;;;;; 217000)) ;;; Generated autoloads from gnus/gnus-ml.el (autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" "\ @@ -12113,8 +12123,8 @@ Minor mode for providing mailing-list commands. ;;;*** -;;;### (autoloads nil "gnus-mlspl" "gnus/gnus-mlspl.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-mlspl" "gnus/gnus-mlspl.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-mlspl.el (autoload 'gnus-group-split-setup "gnus-mlspl" "\ @@ -12214,8 +12224,8 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: ;;;*** -;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload 'gnus-msg-mail "gnus-msg" "\ @@ -12242,7 +12252,7 @@ Like `message-reply'. ;;;*** ;;;### (autoloads nil "gnus-notifications" "gnus/gnus-notifications.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21631 35966 851121 868000)) ;;; Generated autoloads from gnus/gnus-notifications.el (autoload 'gnus-notifications "gnus-notifications" "\ @@ -12258,8 +12268,8 @@ This is typically a function to add in ;;;*** -;;;### (autoloads nil "gnus-picon" "gnus/gnus-picon.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-picon" "gnus/gnus-picon.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-picon.el (autoload 'gnus-treat-from-picon "gnus-picon" "\ @@ -12282,8 +12292,8 @@ If picons are already displayed, remove them. ;;;*** -;;;### (autoloads nil "gnus-range" "gnus/gnus-range.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-range" "gnus/gnus-range.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-range.el (autoload 'gnus-sorted-difference "gnus-range" "\ @@ -12350,8 +12360,8 @@ Add NUM into sorted LIST by side effect. ;;;*** -;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (21650 +;;;;;; 56624 523745 975000)) ;;; Generated autoloads from gnus/gnus-registry.el (autoload 'gnus-registry-initialize "gnus-registry" "\ @@ -12366,8 +12376,8 @@ Install the registry hooks. ;;;*** -;;;### (autoloads nil "gnus-sieve" "gnus/gnus-sieve.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-sieve" "gnus/gnus-sieve.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-sieve.el (autoload 'gnus-sieve-update "gnus-sieve" "\ @@ -12394,8 +12404,8 @@ See the documentation for these variables and functions for details. ;;;*** -;;;### (autoloads nil "gnus-spec" "gnus/gnus-spec.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-spec" "gnus/gnus-spec.el" (21604 48550 +;;;;;; 93934 217000)) ;;; Generated autoloads from gnus/gnus-spec.el (autoload 'gnus-update-format "gnus-spec" "\ @@ -12405,8 +12415,8 @@ Update the format specification near point. ;;;*** -;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (21620 25920 -;;;;;; 601566 783000)) +;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (21631 35966 +;;;;;; 851121 868000)) ;;; Generated autoloads from gnus/gnus-start.el (autoload 'gnus-declare-backend "gnus-start" "\ @@ -12416,8 +12426,8 @@ Declare back end NAME with ABILITIES as a Gnus back end. ;;;*** -;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21623 2108 292281 -;;;;;; 129000)) +;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21631 35966 +;;;;;; 855121 868000)) ;;; Generated autoloads from gnus/gnus-sum.el (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ @@ -12428,8 +12438,8 @@ BOOKMARK is a bookmark name or a bookmark record. ;;;*** -;;;### (autoloads nil "gnus-sync" "gnus/gnus-sync.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-sync" "gnus/gnus-sync.el" (21604 48550 +;;;;;; 101934 217000)) ;;; Generated autoloads from gnus/gnus-sync.el (autoload 'gnus-sync-initialize "gnus-sync" "\ @@ -12444,8 +12454,8 @@ Install the sync hooks. ;;;*** -;;;### (autoloads nil "gnus-win" "gnus/gnus-win.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gnus-win" "gnus/gnus-win.el" (21604 48550 +;;;;;; 101934 217000)) ;;; Generated autoloads from gnus/gnus-win.el (autoload 'gnus-add-configuration "gnus-win" "\ @@ -12455,8 +12465,8 @@ Add the window configuration CONF to `gnus-buffer-configuration'. ;;;*** -;;;### (autoloads nil "gnutls" "net/gnutls.el" (21620 46140 530123 -;;;;;; 341000)) +;;;### (autoloads nil "gnutls" "net/gnutls.el" (21640 32530 974334 +;;;;;; 457000)) ;;; Generated autoloads from net/gnutls.el (defvar gnutls-min-prime-bits 256 "\ @@ -12472,8 +12482,8 @@ A value of nil says to use the default GnuTLS value.") ;;;*** -;;;### (autoloads nil "gomoku" "play/gomoku.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "gomoku" "play/gomoku.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/gomoku.el (autoload 'gomoku "gomoku" "\ @@ -12499,8 +12509,8 @@ Use \\[describe-mode] for more info. ;;;*** -;;;### (autoloads nil "goto-addr" "net/goto-addr.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "goto-addr" "net/goto-addr.el" (21604 48550 +;;;;;; 217934 222000)) ;;; Generated autoloads from net/goto-addr.el (define-obsolete-function-alias 'goto-address-at-mouse 'goto-address-at-point "22.1") @@ -12541,8 +12551,8 @@ Like `goto-address-mode', but only for comments and strings. ;;;*** -;;;### (autoloads nil "gravatar" "gnus/gravatar.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "gravatar" "gnus/gravatar.el" (21604 48550 +;;;;;; 101934 217000)) ;;; Generated autoloads from gnus/gravatar.el (autoload 'gravatar-retrieve "gravatar" "\ @@ -12558,8 +12568,8 @@ Retrieve MAIL-ADDRESS gravatar and returns it. ;;;*** -;;;### (autoloads nil "grep" "progmodes/grep.el" (21612 31801 50825 -;;;;;; 711000)) +;;;### (autoloads nil "grep" "progmodes/grep.el" (21631 35966 907121 +;;;;;; 870000)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@ -12723,7 +12733,7 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'. ;;;*** -;;;### (autoloads nil "gs" "gs.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "gs" "gs.el" (21604 48550 121934 218000)) ;;; Generated autoloads from gs.el (autoload 'gs-load-image "gs" "\ @@ -12736,8 +12746,8 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** -;;;### (autoloads nil "gud" "progmodes/gud.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "gud" "progmodes/gud.el" (21640 32530 986334 +;;;;;; 458000)) ;;; Generated autoloads from progmodes/gud.el (autoload 'gud-gdb "gud" "\ @@ -12832,8 +12842,8 @@ it if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21604 48550 17934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/gv.el (autoload 'gv-get "gv" "\ @@ -12935,8 +12945,8 @@ binding mode. ;;;*** -;;;### (autoloads nil "handwrite" "play/handwrite.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "handwrite" "play/handwrite.el" (21604 48550 +;;;;;; 305934 225000)) ;;; Generated autoloads from play/handwrite.el (autoload 'handwrite "handwrite" "\ @@ -12953,8 +12963,8 @@ Variables: `handwrite-linespace' (default 12) ;;;*** -;;;### (autoloads nil "hanoi" "play/hanoi.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "hanoi" "play/hanoi.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/hanoi.el (autoload 'hanoi "hanoi" "\ @@ -12981,8 +12991,8 @@ to be updated. ;;;*** -;;;### (autoloads nil "hashcash" "mail/hashcash.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "hashcash" "mail/hashcash.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/hashcash.el (autoload 'hashcash-insert-payment "hashcash" "\ @@ -13024,8 +13034,8 @@ Prefix arg sets default accept amount temporarily. ;;;*** -;;;### (autoloads nil "help-at-pt" "help-at-pt.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "help-at-pt" "help-at-pt.el" (21604 48550 121934 +;;;;;; 218000)) ;;; Generated autoloads from help-at-pt.el (autoload 'help-at-pt-string "help-at-pt" "\ @@ -13152,8 +13162,8 @@ different regions. With numeric argument ARG, behaves like ;;;*** -;;;### (autoloads nil "help-fns" "help-fns.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "help-fns" "help-fns.el" (21604 48550 121934 +;;;;;; 218000)) ;;; Generated autoloads from help-fns.el (autoload 'describe-function "help-fns" "\ @@ -13232,8 +13242,8 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file. ;;;*** -;;;### (autoloads nil "help-macro" "help-macro.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "help-macro" "help-macro.el" (21604 48550 121934 +;;;;;; 218000)) ;;; Generated autoloads from help-macro.el (defvar three-step-help nil "\ @@ -13247,8 +13257,8 @@ gives the window that lists the options.") ;;;*** -;;;### (autoloads nil "help-mode" "help-mode.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "help-mode" "help-mode.el" (21604 48550 121934 +;;;;;; 218000)) ;;; Generated autoloads from help-mode.el (autoload 'help-mode "help-mode" "\ @@ -13347,8 +13357,8 @@ BOOKMARK is a bookmark name or a bookmark record. ;;;*** -;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (21604 48550 +;;;;;; 17934 214000)) ;;; Generated autoloads from emacs-lisp/helper.el (autoload 'Helper-describe-bindings "helper" "\ @@ -13363,7 +13373,7 @@ Provide help for current mode. ;;;*** -;;;### (autoloads nil "hexl" "hexl.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "hexl" "hexl.el" (21604 48550 125934 218000)) ;;; Generated autoloads from hexl.el (autoload 'hexl-mode "hexl" "\ @@ -13457,8 +13467,8 @@ This discards the buffer's undo information. ;;;*** -;;;### (autoloads nil "hi-lock" "hi-lock.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "hi-lock" "hi-lock.el" (21604 48550 125934 +;;;;;; 218000)) ;;; Generated autoloads from hi-lock.el (autoload 'hi-lock-mode "hi-lock" "\ @@ -13625,8 +13635,8 @@ be found in variable `hi-lock-interactive-patterns'. ;;;*** -;;;### (autoloads nil "hideif" "progmodes/hideif.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "hideif" "progmodes/hideif.el" (21604 48550 +;;;;;; 337934 226000)) ;;; Generated autoloads from progmodes/hideif.el (autoload 'hide-ifdef-mode "hideif" "\ @@ -13673,8 +13683,8 @@ Several variables affect how the hiding is done: ;;;*** -;;;### (autoloads nil "hideshow" "progmodes/hideshow.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "hideshow" "progmodes/hideshow.el" (21604 48550 +;;;;;; 341934 226000)) ;;; Generated autoloads from progmodes/hideshow.el (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\ @@ -13736,8 +13746,8 @@ Unconditionally turn off `hs-minor-mode'. ;;;*** -;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (21604 48550 125934 +;;;;;; 218000)) ;;; Generated autoloads from hilit-chg.el (autoload 'highlight-changes-mode "hilit-chg" "\ @@ -13868,8 +13878,8 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode. ;;;*** -;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (21604 48550 125934 +;;;;;; 218000)) ;;; Generated autoloads from hippie-exp.el (push (purecopy '(hippie-exp 1 6)) package--builtin-versions) @@ -13901,8 +13911,8 @@ argument VERBOSE non-nil makes the function verbose. ;;;*** -;;;### (autoloads nil "hl-line" "hl-line.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "hl-line" "hl-line.el" (21604 48550 125934 +;;;;;; 218000)) ;;; Generated autoloads from hl-line.el (autoload 'hl-line-mode "hl-line" "\ @@ -13951,8 +13961,8 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and ;;;*** -;;;### (autoloads nil "holidays" "calendar/holidays.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "holidays" "calendar/holidays.el" (21604 48549 +;;;;;; 953934 212000)) ;;; Generated autoloads from calendar/holidays.el (defvar holiday-general-holidays (mapcar 'purecopy '((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Groundhog Day") (holiday-fixed 2 14 "Valentine's Day") (holiday-float 2 1 3 "President's Day") (holiday-fixed 3 17 "St. Patrick's Day") (holiday-fixed 4 1 "April Fools' Day") (holiday-float 5 0 2 "Mother's Day") (holiday-float 5 1 -1 "Memorial Day") (holiday-fixed 6 14 "Flag Day") (holiday-float 6 0 3 "Father's Day") (holiday-fixed 7 4 "Independence Day") (holiday-float 9 1 1 "Labor Day") (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") (holiday-float 11 4 4 "Thanksgiving"))) "\ @@ -14062,8 +14072,8 @@ The optional LABEL is used to label the buffer created. ;;;*** -;;;### (autoloads nil "html2text" "gnus/html2text.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "html2text" "gnus/html2text.el" (21604 48550 +;;;;;; 101934 217000)) ;;; Generated autoloads from gnus/html2text.el (autoload 'html2text "html2text" "\ @@ -14073,8 +14083,8 @@ Convert HTML to plain text in the current buffer. ;;;*** -;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (21604 48550 +;;;;;; 125934 218000)) ;;; Generated autoloads from htmlfontify.el (push (purecopy '(htmlfontify 0 21)) package--builtin-versions) @@ -14107,8 +14117,8 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'. ;;;*** -;;;### (autoloads nil "ibuf-macs" "ibuf-macs.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "ibuf-macs" "ibuf-macs.el" (21604 48550 125934 +;;;;;; 218000)) ;;; Generated autoloads from ibuf-macs.el (autoload 'define-ibuffer-column "ibuf-macs" "\ @@ -14134,7 +14144,9 @@ inlined into the compiled format versions. This means that if you change its definition, you should explicitly call `ibuffer-recompile-formats'. -\(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil (quote macro)) +\(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t) + +(function-put 'define-ibuffer-column 'lisp-indent-function 'defun) (autoload 'define-ibuffer-sorter "ibuf-macs" "\ Define a method of sorting named NAME. @@ -14146,7 +14158,11 @@ For sorting, the forms in BODY will be evaluated with `a' bound to one buffer object, and `b' bound to another. BODY should return a non-nil value if and only if `a' is \"less than\" `b'. -\(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil (quote macro)) +\(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t) + +(function-put 'define-ibuffer-sorter 'lisp-indent-function '1) + +(function-put 'define-ibuffer-sorter 'doc-string-elt '2) (autoload 'define-ibuffer-op "ibuf-macs" "\ Generate a function which operates on a buffer. @@ -14179,7 +14195,11 @@ confirmation message, in the form: COMPLEX means this function is special; see the source code of this macro for exactly what it does. -\(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING COMPLEX) &rest BODY)" nil (quote macro)) +\(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING COMPLEX) &rest BODY)" nil t) + +(function-put 'define-ibuffer-op 'lisp-indent-function '2) + +(function-put 'define-ibuffer-op 'doc-string-elt '3) (autoload 'define-ibuffer-filter "ibuf-macs" "\ Define a filter named NAME. @@ -14192,12 +14212,16 @@ not a particular buffer should be displayed or not. The forms in BODY will be evaluated with BUF bound to the buffer object, and QUALIFIER bound to the current value of the filter. -\(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil (quote macro)) +\(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t) + +(function-put 'define-ibuffer-filter 'lisp-indent-function '2) + +(function-put 'define-ibuffer-filter 'doc-string-elt '2) ;;;*** -;;;### (autoloads nil "ibuffer" "ibuffer.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "ibuffer" "ibuffer.el" (21604 48550 129934 +;;;;;; 218000)) ;;; Generated autoloads from ibuffer.el (autoload 'ibuffer-list-buffers "ibuffer" "\ @@ -14236,8 +14260,8 @@ FORMATS is the value to use for `ibuffer-formats'. ;;;*** -;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (21611 -;;;;;; 10937 700236 3000)) +;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (21631 +;;;;;; 35966 803121 866000)) ;;; Generated autoloads from calendar/icalendar.el (push (purecopy '(icalendar 0 19)) package--builtin-versions) @@ -14290,8 +14314,8 @@ buffer `*icalendar-errors*'. ;;;*** -;;;### (autoloads nil "icomplete" "icomplete.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "icomplete" "icomplete.el" (21604 48550 129934 +;;;;;; 218000)) ;;; Generated autoloads from icomplete.el (defvar icomplete-mode nil "\ @@ -14330,8 +14354,8 @@ completions: ;;;*** -;;;### (autoloads nil "icon" "progmodes/icon.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "icon" "progmodes/icon.el" (21604 48550 341934 +;;;;;; 226000)) ;;; Generated autoloads from progmodes/icon.el (autoload 'icon-mode "icon" "\ @@ -14371,8 +14395,8 @@ with no args, if that value is non-nil. ;;;*** -;;;### (autoloads nil "idlw-shell" "progmodes/idlw-shell.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "idlw-shell" "progmodes/idlw-shell.el" (21604 +;;;;;; 48550 341934 226000)) ;;; Generated autoloads from progmodes/idlw-shell.el (autoload 'idlwave-shell "idlw-shell" "\ @@ -14397,8 +14421,8 @@ See also the variable `idlwave-shell-prompt-pattern'. ;;;*** -;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (21645 25761 +;;;;;; 805186 828000)) ;;; Generated autoloads from progmodes/idlwave.el (push (purecopy '(idlwave 6 1 22)) package--builtin-versions) @@ -14527,7 +14551,7 @@ The main features of this mode are ;;;*** -;;;### (autoloads nil "ido" "ido.el" (21612 31801 50825 711000)) +;;;### (autoloads nil "ido" "ido.el" (21631 35966 863121 868000)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -14789,7 +14813,7 @@ DEF, if non-nil, is the default value. ;;;*** -;;;### (autoloads nil "ielm" "ielm.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "ielm" "ielm.el" (21604 48550 129934 218000)) ;;; Generated autoloads from ielm.el (autoload 'ielm "ielm" "\ @@ -14801,7 +14825,7 @@ See `inferior-emacs-lisp-mode' for details. ;;;*** -;;;### (autoloads nil "iimage" "iimage.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "iimage" "iimage.el" (21604 48550 129934 218000)) ;;; Generated autoloads from iimage.el (define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1") @@ -14817,7 +14841,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. ;;;*** -;;;### (autoloads nil "image" "image.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "image" "image.el" (21604 48550 133934 219000)) ;;; Generated autoloads from image.el (autoload 'image-type-from-data "image" "\ @@ -15010,8 +15034,8 @@ If Emacs is compiled without ImageMagick support, this does nothing. ;;;*** -;;;### (autoloads nil "image-dired" "image-dired.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "image-dired" "image-dired.el" (21604 48550 +;;;;;; 129934 218000)) ;;; Generated autoloads from image-dired.el (push (purecopy '(image-dired 0 4 11)) package--builtin-versions) @@ -15148,8 +15172,8 @@ easy-to-use form. ;;;*** -;;;### (autoloads nil "image-file" "image-file.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "image-file" "image-file.el" (21604 48550 129934 +;;;;;; 218000)) ;;; Generated autoloads from image-file.el (defvar image-file-name-extensions (purecopy '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg")) "\ @@ -15211,8 +15235,8 @@ An image file is one whose name has an extension in ;;;*** -;;;### (autoloads nil "image-mode" "image-mode.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "image-mode" "image-mode.el" (21604 48550 129934 +;;;;;; 218000)) ;;; Generated autoloads from image-mode.el (autoload 'image-mode "image-mode" "\ @@ -15259,7 +15283,7 @@ on these modes. ;;;*** -;;;### (autoloads nil "imenu" "imenu.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "imenu" "imenu.el" (21604 48550 133934 219000)) ;;; Generated autoloads from imenu.el (defvar imenu-sort-function nil "\ @@ -15397,8 +15421,8 @@ for more information. ;;;*** -;;;### (autoloads nil "ind-util" "language/ind-util.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "ind-util" "language/ind-util.el" (21604 48550 +;;;;;; 153934 219000)) ;;; Generated autoloads from language/ind-util.el (autoload 'indian-compose-region "ind-util" "\ @@ -15428,8 +15452,8 @@ Convert old Emacs Devanagari characters to UCS. ;;;*** -;;;### (autoloads nil "inf-lisp" "progmodes/inf-lisp.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "inf-lisp" "progmodes/inf-lisp.el" (21604 48550 +;;;;;; 345934 227000)) ;;; Generated autoloads from progmodes/inf-lisp.el (autoload 'inferior-lisp "inf-lisp" "\ @@ -15447,7 +15471,7 @@ of `inferior-lisp-program'). Runs the hooks from ;;;*** -;;;### (autoloads nil "info" "info.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "info" "info.el" (21640 32530 970334 457000)) ;;; Generated autoloads from info.el (defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\ @@ -15657,8 +15681,8 @@ Otherwise, visit the manual in a new Info buffer. ;;;*** -;;;### (autoloads nil "info-look" "info-look.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "info-look" "info-look.el" (21604 48550 133934 +;;;;;; 219000)) ;;; Generated autoloads from info-look.el (autoload 'info-lookup-reset "info-look" "\ @@ -15705,8 +15729,8 @@ Perform completion on file preceding point. ;;;*** -;;;### (autoloads nil "info-xref" "info-xref.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "info-xref" "info-xref.el" (21604 48550 133934 +;;;;;; 219000)) ;;; Generated autoloads from info-xref.el (push (purecopy '(info-xref 3)) package--builtin-versions) @@ -15789,8 +15813,8 @@ the sources handy. ;;;*** -;;;### (autoloads nil "informat" "informat.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "informat" "informat.el" (21604 48550 133934 +;;;;;; 219000)) ;;; Generated autoloads from informat.el (autoload 'Info-tagify "informat" "\ @@ -15835,8 +15859,8 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" ;;;*** -;;;### (autoloads nil "inline" "emacs-lisp/inline.el" (21628 43483 -;;;;;; 380149 771000)) +;;;### (autoloads nil "inline" "emacs-lisp/inline.el" (21631 35966 +;;;;;; 827121 867000)) ;;; Generated autoloads from emacs-lisp/inline.el (autoload 'define-inline "inline" "\ @@ -15850,8 +15874,8 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" ;;;*** -;;;### (autoloads nil "inversion" "cedet/inversion.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "inversion" "cedet/inversion.el" (21604 48549 +;;;;;; 965934 212000)) ;;; Generated autoloads from cedet/inversion.el (push (purecopy '(inversion 1 3)) package--builtin-versions) @@ -15863,8 +15887,8 @@ Only checks one based on which kind of Emacs is being run. ;;;*** -;;;### (autoloads nil "isearch-x" "international/isearch-x.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "isearch-x" "international/isearch-x.el" (21604 +;;;;;; 48550 137934 219000)) ;;; Generated autoloads from international/isearch-x.el (autoload 'isearch-toggle-specified-input-method "isearch-x" "\ @@ -15884,8 +15908,8 @@ Toggle input method in interactive search. ;;;*** -;;;### (autoloads nil "isearchb" "isearchb.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "isearchb" "isearchb.el" (21604 48550 145934 +;;;;;; 219000)) ;;; Generated autoloads from isearchb.el (push (purecopy '(isearchb 1 5)) package--builtin-versions) @@ -15899,8 +15923,8 @@ accessed via isearchb. ;;;*** -;;;### (autoloads nil "iso-cvt" "international/iso-cvt.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "iso-cvt" "international/iso-cvt.el" (21604 +;;;;;; 48550 137934 219000)) ;;; Generated autoloads from international/iso-cvt.el (autoload 'iso-spanish "iso-cvt" "\ @@ -15991,15 +16015,15 @@ Add submenus to the File menu, to convert to and from various formats. ;;;*** ;;;### (autoloads nil "iso-transl" "international/iso-transl.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21604 48550 137934 219000)) ;;; Generated autoloads from international/iso-transl.el (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap) ;;;*** -;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21659 61733 +;;;;;; 226949 164000)) ;;; Generated autoloads from textmodes/ispell.el (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) @@ -16232,8 +16256,8 @@ You can bind this to the key C-c i in GNUS or mail by adding to ;;;*** -;;;### (autoloads nil "japan-util" "language/japan-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "japan-util" "language/japan-util.el" (21604 +;;;;;; 48550 153934 219000)) ;;; Generated autoloads from language/japan-util.el (autoload 'setup-japanese-environment-internal "japan-util" "\ @@ -16310,8 +16334,8 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading. ;;;*** -;;;### (autoloads nil "jka-compr" "jka-compr.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "jka-compr" "jka-compr.el" (21604 48550 145934 +;;;;;; 219000)) ;;; Generated autoloads from jka-compr.el (defvar jka-compr-inhibit nil "\ @@ -16334,7 +16358,8 @@ by `jka-compr-installed'. ;;;*** -;;;### (autoloads nil "js" "progmodes/js.el" (21623 2108 292281 129000)) +;;;### (autoloads nil "js" "progmodes/js.el" (21659 61733 222949 +;;;;;; 164000)) ;;; Generated autoloads from progmodes/js.el (push (purecopy '(js 9)) package--builtin-versions) @@ -16348,14 +16373,14 @@ Major mode for editing JavaScript. ;;;*** -;;;### (autoloads nil "json" "json.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "json" "json.el" (21604 48550 145934 219000)) ;;; Generated autoloads from json.el (push (purecopy '(json 1 4)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "keypad" "emulation/keypad.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "keypad" "emulation/keypad.el" (21604 48550 +;;;;;; 29934 215000)) ;;; Generated autoloads from emulation/keypad.el (defvar keypad-setup nil "\ @@ -16410,8 +16435,8 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.' ;;;*** -;;;### (autoloads nil "kinsoku" "international/kinsoku.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "kinsoku" "international/kinsoku.el" (21604 +;;;;;; 48550 137934 219000)) ;;; Generated autoloads from international/kinsoku.el (autoload 'kinsoku "kinsoku" "\ @@ -16432,8 +16457,8 @@ the context of text formatting. ;;;*** -;;;### (autoloads nil "kkc" "international/kkc.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "kkc" "international/kkc.el" (21604 48550 137934 +;;;;;; 219000)) ;;; Generated autoloads from international/kkc.el (defvar kkc-after-update-conversion-functions nil "\ @@ -16455,7 +16480,7 @@ and the return value is the length of the conversion. ;;;*** -;;;### (autoloads nil "kmacro" "kmacro.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "kmacro" "kmacro.el" (21604 48550 145934 219000)) ;;; Generated autoloads from kmacro.el (global-set-key "\C-x(" 'kmacro-start-macro) (global-set-key "\C-x)" 'kmacro-end-macro) @@ -16567,8 +16592,8 @@ If kbd macro currently being defined end it before activating it. ;;;*** -;;;### (autoloads nil "korea-util" "language/korea-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "korea-util" "language/korea-util.el" (21604 +;;;;;; 48550 153934 219000)) ;;; Generated autoloads from language/korea-util.el (defvar default-korean-keyboard (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "")) "\ @@ -16582,8 +16607,8 @@ The kind of Korean keyboard for Korean input method. ;;;*** -;;;### (autoloads nil "landmark" "play/landmark.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "landmark" "play/landmark.el" (21604 48550 +;;;;;; 305934 225000)) ;;; Generated autoloads from play/landmark.el (push (purecopy '(landmark 1 0)) package--builtin-versions) @@ -16614,8 +16639,8 @@ Use \\[describe-mode] for more info. ;;;*** -;;;### (autoloads nil "lao-util" "language/lao-util.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "lao-util" "language/lao-util.el" (21604 48550 +;;;;;; 153934 219000)) ;;; Generated autoloads from language/lao-util.el (autoload 'lao-compose-string "lao-util" "\ @@ -16652,8 +16677,8 @@ Transcribe Romanized Lao string STR to Lao character string. ;;;*** -;;;### (autoloads nil "latexenc" "international/latexenc.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "latexenc" "international/latexenc.el" (21604 +;;;;;; 48550 137934 219000)) ;;; Generated autoloads from international/latexenc.el (defvar latex-inputenc-coding-alist (purecopy '(("ansinew" . windows-1252) ("applemac" . mac-roman) ("ascii" . us-ascii) ("cp1250" . windows-1250) ("cp1252" . windows-1252) ("cp1257" . cp1257) ("cp437de" . cp437) ("cp437" . cp437) ("cp850" . cp850) ("cp852" . cp852) ("cp858" . cp858) ("cp865" . cp865) ("latin1" . iso-8859-1) ("latin2" . iso-8859-2) ("latin3" . iso-8859-3) ("latin4" . iso-8859-4) ("latin5" . iso-8859-5) ("latin9" . iso-8859-15) ("next" . next) ("utf8" . utf-8) ("utf8x" . utf-8))) "\ @@ -16685,7 +16710,7 @@ coding system names is determined from `latex-inputenc-coding-alist'. ;;;*** ;;;### (autoloads nil "latin1-disp" "international/latin1-disp.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21604 48550 137934 219000)) ;;; Generated autoloads from international/latin1-disp.el (defvar latin1-display nil "\ @@ -16726,8 +16751,8 @@ use either \\[customize] or the function `latin1-display'.") ;;;*** -;;;### (autoloads nil "ld-script" "progmodes/ld-script.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "ld-script" "progmodes/ld-script.el" (21604 +;;;;;; 48550 345934 227000)) ;;; Generated autoloads from progmodes/ld-script.el (autoload 'ld-script-mode "ld-script" "\ @@ -16737,7 +16762,47 @@ A major mode to edit GNU ld script files ;;;*** -;;;### (autoloads nil "life" "play/life.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "let-alist" "let-alist.el" (21659 61733 206949 +;;;;;; 164000)) +;;; Generated autoloads from let-alist.el +(push (purecopy '(let-alist 1 0 3)) package--builtin-versions) + +(autoload 'let-alist "let-alist" "\ +Let-bind dotted symbols to their cdrs in ALIST and execute BODY. +Dotted symbol is any symbol starting with a `.'. Only those present +in BODY are let-bound and this search is done at compile time. + +For instance, the following code + + (let-alist alist + (if (and .title .body) + .body + .site + .site.contents)) + +essentially expands to + + (let ((.title (cdr (assq 'title alist))) + (.body (cdr (assq 'body alist))) + (.site (cdr (assq 'site alist))) + (.site.contents (cdr (assq 'contents (cdr (assq 'site alist)))))) + (if (and .title .body) + .body + .site + .site.contents)) + +If you nest `let-alist' invocations, the inner one can't access +the variables of the outer one. You can, however, access alists +inside the original alist by using dots inside the symbol, as +displayed in the example above. + +\(fn ALIST &rest BODY)" nil t) + +(function-put 'let-alist 'lisp-indent-function '1) + +;;;*** + +;;;### (autoloads nil "life" "play/life.el" (21604 48550 305934 225000)) ;;; Generated autoloads from play/life.el (autoload 'life "life" "\ @@ -16750,7 +16815,7 @@ generations (this defaults to 1). ;;;*** -;;;### (autoloads nil "linum" "linum.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "linum" "linum.el" (21651 20707 180225 752000)) ;;; Generated autoloads from linum.el (push (purecopy '(linum 0 9 24)) package--builtin-versions) @@ -16787,8 +16852,8 @@ See `linum-mode' for more information on Linum mode. ;;;*** -;;;### (autoloads nil "loadhist" "loadhist.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "loadhist" "loadhist.el" (21604 48550 177934 +;;;;;; 220000)) ;;; Generated autoloads from loadhist.el (autoload 'unload-feature "loadhist" "\ @@ -16819,7 +16884,7 @@ something strange, such as redefining an Emacs function. ;;;*** -;;;### (autoloads nil "locate" "locate.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "locate" "locate.el" (21604 48550 177934 220000)) ;;; Generated autoloads from locate.el (defvar locate-ls-subdir-switches (purecopy "-al") "\ @@ -16871,8 +16936,8 @@ except that FILTER is not optional. ;;;*** -;;;### (autoloads nil "log-edit" "vc/log-edit.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "log-edit" "vc/log-edit.el" (21604 48550 429934 +;;;;;; 230000)) ;;; Generated autoloads from vc/log-edit.el (autoload 'log-edit "log-edit" "\ @@ -16903,8 +16968,8 @@ done. Otherwise, it uses the current buffer. ;;;*** -;;;### (autoloads nil "log-view" "vc/log-view.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "log-view" "vc/log-view.el" (21604 48550 429934 +;;;;;; 230000)) ;;; Generated autoloads from vc/log-view.el (autoload 'log-view-mode "log-view" "\ @@ -16914,7 +16979,7 @@ Major mode for browsing CVS log output. ;;;*** -;;;### (autoloads nil "lpr" "lpr.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "lpr" "lpr.el" (21604 48550 181934 220000)) ;;; Generated autoloads from lpr.el (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\ @@ -17009,8 +17074,8 @@ for further customization of the printer command. ;;;*** -;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21604 48550 181934 +;;;;;; 220000)) ;;; Generated autoloads from ls-lisp.el (defvar ls-lisp-support-shell-wildcards t "\ @@ -17021,8 +17086,8 @@ Otherwise they are treated as Emacs regexps (for backward compatibility).") ;;;*** -;;;### (autoloads nil "lunar" "calendar/lunar.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "lunar" "calendar/lunar.el" (21604 48549 953934 +;;;;;; 212000)) ;;; Generated autoloads from calendar/lunar.el (autoload 'lunar-phases "lunar" "\ @@ -17034,8 +17099,8 @@ This function is suitable for execution in an init file. ;;;*** -;;;### (autoloads nil "m4-mode" "progmodes/m4-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "m4-mode" "progmodes/m4-mode.el" (21604 48550 +;;;;;; 345934 227000)) ;;; Generated autoloads from progmodes/m4-mode.el (autoload 'm4-mode "m4-mode" "\ @@ -17045,7 +17110,7 @@ A major mode to edit m4 macro files. ;;;*** -;;;### (autoloads nil "macros" "macros.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "macros" "macros.el" (21604 48550 181934 220000)) ;;; Generated autoloads from macros.el (autoload 'name-last-kbd-macro "macros" "\ @@ -17134,8 +17199,8 @@ and then select the region of un-tablified names and use ;;;*** -;;;### (autoloads nil "mail-extr" "mail/mail-extr.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mail-extr" "mail/mail-extr.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/mail-extr.el (autoload 'mail-extract-address-components "mail-extr" "\ @@ -17165,8 +17230,8 @@ Convert mail domain DOMAIN to the country it corresponds to. ;;;*** -;;;### (autoloads nil "mail-hist" "mail/mail-hist.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mail-hist" "mail/mail-hist.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/mail-hist.el (autoload 'mail-hist-define-keys "mail-hist" "\ @@ -17195,8 +17260,8 @@ This function normally would be called when the message is sent. ;;;*** -;;;### (autoloads nil "mail-utils" "mail/mail-utils.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mail-utils" "mail/mail-utils.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/mail-utils.el (defvar mail-use-rfc822 nil "\ @@ -17270,8 +17335,8 @@ matches may be returned from the message body. ;;;*** -;;;### (autoloads nil "mailabbrev" "mail/mailabbrev.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mailabbrev" "mail/mailabbrev.el" (21604 48550 +;;;;;; 181934 220000)) ;;; Generated autoloads from mail/mailabbrev.el (defvar mail-abbrevs-mode nil "\ @@ -17320,8 +17385,8 @@ double-quotes. ;;;*** -;;;### (autoloads nil "mailalias" "mail/mailalias.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mailalias" "mail/mailalias.el" (21604 48550 +;;;;;; 185934 221000)) ;;; Generated autoloads from mail/mailalias.el (defvar mail-complete-style 'angles "\ @@ -17374,8 +17439,8 @@ current header, calls `mail-complete-function' and passes prefix ARG if any. ;;;*** -;;;### (autoloads nil "mailclient" "mail/mailclient.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mailclient" "mail/mailclient.el" (21604 48550 +;;;;;; 185934 221000)) ;;; Generated autoloads from mail/mailclient.el (autoload 'mailclient-send-it "mailclient" "\ @@ -17387,8 +17452,8 @@ The mail client is taken to be the handler of mailto URLs. ;;;*** -;;;### (autoloads nil "make-mode" "progmodes/make-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "make-mode" "progmodes/make-mode.el" (21604 +;;;;;; 48550 349934 227000)) ;;; Generated autoloads from progmodes/make-mode.el (autoload 'makefile-mode "make-mode" "\ @@ -17505,8 +17570,8 @@ An adapted `makefile-mode' that knows about imake. ;;;*** -;;;### (autoloads nil "makesum" "makesum.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "makesum" "makesum.el" (21604 48550 189934 +;;;;;; 221000)) ;;; Generated autoloads from makesum.el (autoload 'make-command-summary "makesum" "\ @@ -17517,7 +17582,7 @@ Previous contents of that buffer are killed first. ;;;*** -;;;### (autoloads nil "man" "man.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "man" "man.el" (21604 48550 189934 221000)) ;;; Generated autoloads from man.el (defalias 'manual-entry 'man) @@ -17573,7 +17638,7 @@ Default bookmark handler for Man buffers. ;;;*** -;;;### (autoloads nil "master" "master.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "master" "master.el" (21604 48550 193934 221000)) ;;; Generated autoloads from master.el (push (purecopy '(master 1 0 2)) package--builtin-versions) @@ -17596,8 +17661,8 @@ yourself the value of `master-of' by calling `master-show-slave'. ;;;*** -;;;### (autoloads nil "mb-depth" "mb-depth.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mb-depth" "mb-depth.el" (21604 48550 193934 +;;;;;; 221000)) ;;; Generated autoloads from mb-depth.el (defvar minibuffer-depth-indicate-mode nil "\ @@ -17624,14 +17689,14 @@ recursion depth in the minibuffer prompt. This is only useful if ;;;*** -;;;### (autoloads nil "md4" "md4.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "md4" "md4.el" (21604 48550 193934 221000)) ;;; Generated autoloads from md4.el (push (purecopy '(md4 1 0)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "message" "gnus/message.el" (21623 2108 292281 -;;;;;; 129000)) +;;;### (autoloads nil "message" "gnus/message.el" (21637 50476 671217 +;;;;;; 121000)) ;;; Generated autoloads from gnus/message.el (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) @@ -17796,8 +17861,8 @@ which specify the range to operate on. ;;;*** -;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (21604 +;;;;;; 48550 349934 227000)) ;;; Generated autoloads from progmodes/meta-mode.el (push (purecopy '(meta-mode 1 0)) package--builtin-versions) @@ -17813,8 +17878,8 @@ Major mode for editing MetaPost sources. ;;;*** -;;;### (autoloads nil "metamail" "mail/metamail.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "metamail" "mail/metamail.el" (21604 48550 +;;;;;; 185934 221000)) ;;; Generated autoloads from mail/metamail.el (autoload 'metamail-interpret-header "metamail" "\ @@ -17857,8 +17922,8 @@ redisplayed as output is inserted. ;;;*** -;;;### (autoloads nil "mh-comp" "mh-e/mh-comp.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mh-comp" "mh-e/mh-comp.el" (21604 48550 197934 +;;;;;; 221000)) ;;; Generated autoloads from mh-e/mh-comp.el (autoload 'mh-smail "mh-comp" "\ @@ -17948,7 +18013,7 @@ delete the draft message. ;;;*** -;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (21604 48550 197934 221000)) ;;; Generated autoloads from mh-e/mh-e.el (push (purecopy '(mh-e 8 6)) package--builtin-versions) @@ -17965,8 +18030,8 @@ Display version information about MH-E and the MH mail handling system. ;;;*** -;;;### (autoloads nil "mh-folder" "mh-e/mh-folder.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mh-folder" "mh-e/mh-folder.el" (21604 48550 +;;;;;; 201934 221000)) ;;; Generated autoloads from mh-e/mh-folder.el (autoload 'mh-rmail "mh-folder" "\ @@ -18047,8 +18112,8 @@ perform the operation on all messages in that region. ;;;*** -;;;### (autoloads nil "midnight" "midnight.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "midnight" "midnight.el" (21604 48550 205934 +;;;;;; 221000)) ;;; Generated autoloads from midnight.el (autoload 'clean-buffer-list "midnight" "\ @@ -18074,8 +18139,8 @@ to its second argument TM. ;;;*** -;;;### (autoloads nil "minibuf-eldef" "minibuf-eldef.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "minibuf-eldef" "minibuf-eldef.el" (21604 48550 +;;;;;; 205934 221000)) ;;; Generated autoloads from minibuf-eldef.el (defvar minibuffer-electric-default-mode nil "\ @@ -18104,7 +18169,7 @@ is modified to remove the default indication. ;;;*** -;;;### (autoloads nil "misc" "misc.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "misc" "misc.el" (21604 48550 209934 221000)) ;;; Generated autoloads from misc.el (autoload 'butterfly "misc" "\ @@ -18132,8 +18197,8 @@ The return value is always nil. ;;;*** -;;;### (autoloads nil "misearch" "misearch.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "misearch" "misearch.el" (21604 48550 209934 +;;;;;; 221000)) ;;; Generated autoloads from misearch.el (add-hook 'isearch-mode-hook 'multi-isearch-setup) @@ -18218,8 +18283,8 @@ whose file names match the specified wildcard. ;;;*** -;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21604 +;;;;;; 48550 349934 227000)) ;;; Generated autoloads from progmodes/mixal-mode.el (push (purecopy '(mixal-mode 0 1)) package--builtin-versions) @@ -18230,8 +18295,8 @@ Major mode for the mixal asm language. ;;;*** -;;;### (autoloads nil "mm-encode" "gnus/mm-encode.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mm-encode" "gnus/mm-encode.el" (21604 48550 +;;;;;; 105934 218000)) ;;; Generated autoloads from gnus/mm-encode.el (autoload 'mm-default-file-encoding "mm-encode" "\ @@ -18241,8 +18306,8 @@ Return a default encoding for FILE. ;;;*** -;;;### (autoloads nil "mm-extern" "gnus/mm-extern.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mm-extern" "gnus/mm-extern.el" (21604 48550 +;;;;;; 105934 218000)) ;;; Generated autoloads from gnus/mm-extern.el (autoload 'mm-extern-cache-contents "mm-extern" "\ @@ -18260,8 +18325,8 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** -;;;### (autoloads nil "mm-partial" "gnus/mm-partial.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "mm-partial" "gnus/mm-partial.el" (21604 48550 +;;;;;; 105934 218000)) ;;; Generated autoloads from gnus/mm-partial.el (autoload 'mm-inline-partial "mm-partial" "\ @@ -18274,8 +18339,8 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** -;;;### (autoloads nil "mm-url" "gnus/mm-url.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mm-url" "gnus/mm-url.el" (21604 48550 109934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/mm-url.el (autoload 'mm-url-insert-file-contents "mm-url" "\ @@ -18291,8 +18356,8 @@ Insert file contents of URL using `mm-url-program'. ;;;*** -;;;### (autoloads nil "mm-uu" "gnus/mm-uu.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mm-uu" "gnus/mm-uu.el" (21604 48550 109934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/mm-uu.el (autoload 'mm-uu-dissect "mm-uu" "\ @@ -18311,7 +18376,7 @@ Assume text has been decoded if DECODED is non-nil. ;;;*** -;;;### (autoloads nil "mml" "gnus/mml.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "mml" "gnus/mml.el" (21604 48550 109934 218000)) ;;; Generated autoloads from gnus/mml.el (autoload 'mml-to-mime "mml" "\ @@ -18336,8 +18401,8 @@ body) or \"attachment\" (separate from the body). ;;;*** -;;;### (autoloads nil "mml1991" "gnus/mml1991.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mml1991" "gnus/mml1991.el" (21604 48550 109934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/mml1991.el (autoload 'mml1991-encrypt "mml1991" "\ @@ -18352,8 +18417,8 @@ body) or \"attachment\" (separate from the body). ;;;*** -;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (21604 48550 109934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/mml2015.el (autoload 'mml2015-decrypt "mml2015" "\ @@ -18393,16 +18458,16 @@ body) or \"attachment\" (separate from the body). ;;;*** -;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21604 48549 +;;;;;; 965934 212000)) ;;; Generated autoloads from cedet/mode-local.el (put 'define-overloadable-function 'doc-string-elt 3) ;;;*** -;;;### (autoloads nil "modula2" "progmodes/modula2.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "modula2" "progmodes/modula2.el" (21604 48550 +;;;;;; 349934 227000)) ;;; Generated autoloads from progmodes/modula2.el (defalias 'modula-2-mode 'm2-mode) @@ -18435,8 +18500,8 @@ followed by the first character of the construct. ;;;*** -;;;### (autoloads nil "morse" "play/morse.el" (21616 28857 81577 -;;;;;; 239000)) +;;;### (autoloads nil "morse" "play/morse.el" (21631 35966 895121 +;;;;;; 869000)) ;;; Generated autoloads from play/morse.el (autoload 'morse-region "morse" "\ @@ -18461,8 +18526,8 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text. ;;;*** -;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (21604 48550 209934 +;;;;;; 221000)) ;;; Generated autoloads from mouse-drag.el (autoload 'mouse-drag-throw "mouse-drag" "\ @@ -18509,7 +18574,7 @@ To test this function, evaluate: ;;;*** -;;;### (autoloads nil "mpc" "mpc.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "mpc" "mpc.el" (21604 48550 209934 221000)) ;;; Generated autoloads from mpc.el (autoload 'mpc "mpc" "\ @@ -18519,7 +18584,7 @@ Main entry point for MPC. ;;;*** -;;;### (autoloads nil "mpuz" "play/mpuz.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "mpuz" "play/mpuz.el" (21604 48550 305934 225000)) ;;; Generated autoloads from play/mpuz.el (autoload 'mpuz "mpuz" "\ @@ -18529,7 +18594,7 @@ Multiplication puzzle with GNU Emacs. ;;;*** -;;;### (autoloads nil "msb" "msb.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "msb" "msb.el" (21604 48550 209934 221000)) ;;; Generated autoloads from msb.el (defvar msb-mode nil "\ @@ -18554,8 +18619,8 @@ different buffer menu using the function `msb'. ;;;*** -;;;### (autoloads nil "mule-diag" "international/mule-diag.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "mule-diag" "international/mule-diag.el" (21651 +;;;;;; 20707 180225 752000)) ;;; Generated autoloads from international/mule-diag.el (autoload 'list-character-sets "mule-diag" "\ @@ -18687,8 +18752,8 @@ The default is 20. If LIMIT is negative, do not limit the listing. ;;;*** -;;;### (autoloads nil "mule-util" "international/mule-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "mule-util" "international/mule-util.el" (21604 +;;;;;; 48550 141934 219000)) ;;; Generated autoloads from international/mule-util.el (defsubst string-to-list (string) "\ @@ -18819,8 +18884,8 @@ per-character basis, this may not be accurate. ;;;*** -;;;### (autoloads nil "net-utils" "net/net-utils.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "net-utils" "net/net-utils.el" (21604 48550 +;;;;;; 217934 222000)) ;;; Generated autoloads from net/net-utils.el (autoload 'ifconfig "net-utils" "\ @@ -18914,8 +18979,8 @@ Open a network connection to HOST on PORT. ;;;*** -;;;### (autoloads nil "netrc" "net/netrc.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "netrc" "net/netrc.el" (21604 48550 217934 +;;;;;; 222000)) ;;; Generated autoloads from net/netrc.el (autoload 'netrc-credentials "netrc" "\ @@ -18927,8 +18992,8 @@ listed in the PORTS list. ;;;*** -;;;### (autoloads nil "network-stream" "net/network-stream.el" (21619 -;;;;;; 5051 260148 536000)) +;;;### (autoloads nil "network-stream" "net/network-stream.el" (21645 +;;;;;; 25761 793186 828000)) ;;; Generated autoloads from net/network-stream.el (autoload 'open-network-stream "network-stream" "\ @@ -19024,8 +19089,8 @@ asynchronously, if possible. ;;;*** -;;;### (autoloads nil "newst-backend" "net/newst-backend.el" (21628 -;;;;;; 45530 160140 360000)) +;;;### (autoloads nil "newst-backend" "net/newst-backend.el" (21631 +;;;;;; 35966 879121 869000)) ;;; Generated autoloads from net/newst-backend.el (autoload 'newsticker-running-p "newst-backend" "\ @@ -19047,7 +19112,7 @@ Run `newsticker-start-hook' if newsticker was not running already. ;;;*** ;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21604 48550 217934 222000)) ;;; Generated autoloads from net/newst-plainview.el (autoload 'newsticker-plainview "newst-plainview" "\ @@ -19057,8 +19122,8 @@ Start newsticker plainview. ;;;*** -;;;### (autoloads nil "newst-reader" "net/newst-reader.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "newst-reader" "net/newst-reader.el" (21604 +;;;;;; 48550 217934 222000)) ;;; Generated autoloads from net/newst-reader.el (autoload 'newsticker-show-news "newst-reader" "\ @@ -19068,8 +19133,8 @@ Start reading news. You may want to bind this to a key. ;;;*** -;;;### (autoloads nil "newst-ticker" "net/newst-ticker.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "newst-ticker" "net/newst-ticker.el" (21604 +;;;;;; 48550 221934 222000)) ;;; Generated autoloads from net/newst-ticker.el (autoload 'newsticker-ticker-running-p "newst-ticker" "\ @@ -19089,8 +19154,8 @@ running already. ;;;*** -;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21628 -;;;;;; 45530 160140 360000)) +;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21637 +;;;;;; 50476 675217 121000)) ;;; Generated autoloads from net/newst-treeview.el (autoload 'newsticker-treeview "newst-treeview" "\ @@ -19100,8 +19165,8 @@ Start newsticker treeview. ;;;*** -;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (21604 48550 109934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/nndiary.el (autoload 'nndiary-generate-nov-databases "nndiary" "\ @@ -19111,8 +19176,8 @@ Generate NOV databases in all nndiary directories. ;;;*** -;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (21604 48550 109934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/nndoc.el (autoload 'nndoc-add-type "nndoc" "\ @@ -19126,8 +19191,8 @@ symbol in the alist. ;;;*** -;;;### (autoloads nil "nnfolder" "gnus/nnfolder.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "nnfolder" "gnus/nnfolder.el" (21604 48550 +;;;;;; 113934 218000)) ;;; Generated autoloads from gnus/nnfolder.el (autoload 'nnfolder-generate-active-file "nnfolder" "\ @@ -19138,7 +19203,7 @@ This command does not work if you use short group names. ;;;*** -;;;### (autoloads nil "nnml" "gnus/nnml.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "nnml" "gnus/nnml.el" (21604 48550 117934 218000)) ;;; Generated autoloads from gnus/nnml.el (autoload 'nnml-generate-nov-databases "nnml" "\ @@ -19148,7 +19213,7 @@ Generate NOV databases in all nnml directories. ;;;*** -;;;### (autoloads nil "novice" "novice.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "novice" "novice.el" (21604 48550 237934 223000)) ;;; Generated autoloads from novice.el (define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1") @@ -19180,8 +19245,8 @@ future sessions. ;;;*** -;;;### (autoloads nil "nroff-mode" "textmodes/nroff-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "nroff-mode" "textmodes/nroff-mode.el" (21604 +;;;;;; 48550 397934 228000)) ;;; Generated autoloads from textmodes/nroff-mode.el (autoload 'nroff-mode "nroff-mode" "\ @@ -19195,14 +19260,14 @@ closing requests for requests that are used in matched pairs. ;;;*** -;;;### (autoloads nil "ntlm" "net/ntlm.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "ntlm" "net/ntlm.el" (21604 48550 221934 222000)) ;;; Generated autoloads from net/ntlm.el (push (purecopy '(ntlm 1 0)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (21604 48550 +;;;;;; 237934 223000)) ;;; Generated autoloads from nxml/nxml-glyph.el (autoload 'nxml-glyph-display-string "nxml-glyph" "\ @@ -19214,8 +19279,8 @@ Return nil if the face cannot display a glyph for N. ;;;*** -;;;### (autoloads nil "nxml-mode" "nxml/nxml-mode.el" (21611 10937 -;;;;;; 700236 3000)) +;;;### (autoloads nil "nxml-mode" "nxml/nxml-mode.el" (21631 35966 +;;;;;; 887121 869000)) ;;; Generated autoloads from nxml/nxml-mode.el (autoload 'nxml-mode "nxml-mode" "\ @@ -19275,8 +19340,8 @@ Many aspects this mode can be customized using ;;;*** -;;;### (autoloads nil "nxml-uchnm" "nxml/nxml-uchnm.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "nxml-uchnm" "nxml/nxml-uchnm.el" (21604 48550 +;;;;;; 237934 223000)) ;;; Generated autoloads from nxml/nxml-uchnm.el (autoload 'nxml-enable-unicode-char-name-sets "nxml-uchnm" "\ @@ -19288,8 +19353,8 @@ the variable `nxml-enabled-unicode-blocks'. ;;;*** -;;;### (autoloads nil "octave" "progmodes/octave.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "octave" "progmodes/octave.el" (21631 35966 +;;;;;; 907121 870000)) ;;; Generated autoloads from progmodes/octave.el (autoload 'octave-mode "octave" "\ @@ -19326,8 +19391,8 @@ startup file, `~/.emacs-octave'. ;;;*** -;;;### (autoloads nil "opascal" "progmodes/opascal.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "opascal" "progmodes/opascal.el" (21604 48550 +;;;;;; 349934 227000)) ;;; Generated autoloads from progmodes/opascal.el (define-obsolete-function-alias 'delphi-mode 'opascal-mode "24.4") @@ -19362,7 +19427,7 @@ Coloring: ;;;*** -;;;### (autoloads nil "org" "org/org.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "org" "org/org.el" (21645 25761 805186 828000)) ;;; Generated autoloads from org/org.el (autoload 'org-babel-do-load-languages "org" "\ @@ -19583,8 +19648,8 @@ Call the customize function with org as argument. ;;;*** -;;;### (autoloads nil "org-agenda" "org/org-agenda.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "org-agenda" "org/org-agenda.el" (21604 48550 +;;;;;; 269934 224000)) ;;; Generated autoloads from org/org-agenda.el (autoload 'org-toggle-sticky-agenda "org-agenda" "\ @@ -19857,8 +19922,8 @@ to override `appt-message-warning-time'. ;;;*** -;;;### (autoloads nil "org-capture" "org/org-capture.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "org-capture" "org/org-capture.el" (21604 48550 +;;;;;; 273934 224000)) ;;; Generated autoloads from org/org-capture.el (autoload 'org-capture-string "org-capture" "\ @@ -19900,8 +19965,8 @@ Set `org-capture-templates' to be similar to `org-remember-templates'. ;;;*** -;;;### (autoloads nil "org-colview" "org/org-colview.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "org-colview" "org/org-colview.el" (21604 48550 +;;;;;; 273934 224000)) ;;; Generated autoloads from org/org-colview.el (autoload 'org-columns-remove-overlays "org-colview" "\ @@ -19964,8 +20029,8 @@ Turn on or update column view in the agenda. ;;;*** -;;;### (autoloads nil "org-compat" "org/org-compat.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "org-compat" "org/org-compat.el" (21604 48550 +;;;;;; 273934 224000)) ;;; Generated autoloads from org/org-compat.el (autoload 'org-check-version "org-compat" "\ @@ -19975,8 +20040,8 @@ Try very hard to provide sensible version strings. ;;;*** -;;;### (autoloads nil "org-macs" "org/org-macs.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "org-macs" "org/org-macs.el" (21604 48550 277934 +;;;;;; 224000)) ;;; Generated autoloads from org/org-macs.el (autoload 'org-load-noerror-mustsuffix "org-macs" "\ @@ -19986,8 +20051,8 @@ Load FILE with optional arguments NOERROR and MUSTSUFFIX. Drop the MUSTSUFFIX a ;;;*** -;;;### (autoloads nil "org-version" "org/org-version.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "org-version" "org/org-version.el" (21604 48550 +;;;;;; 281934 224000)) ;;; Generated autoloads from org/org-version.el (autoload 'org-release "org-version" "\ @@ -20004,8 +20069,8 @@ The Git version of org-mode. ;;;*** -;;;### (autoloads nil "outline" "outline.el" (21626 64704 823711 -;;;;;; 579000)) +;;;### (autoloads nil "outline" "outline.el" (21631 35966 895121 +;;;;;; 869000)) ;;; Generated autoloads from outline.el (put 'outline-regexp 'safe-local-variable 'stringp) (put 'outline-heading-end-regexp 'safe-local-variable 'stringp) @@ -20066,8 +20131,8 @@ See the command `outline-mode' for more information on this mode. ;;;*** -;;;### (autoloads nil "package" "emacs-lisp/package.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "package" "emacs-lisp/package.el" (21651 20707 +;;;;;; 168225 752000)) ;;; Generated autoloads from emacs-lisp/package.el (push (purecopy '(package 1 0 1)) package--builtin-versions) @@ -20139,7 +20204,7 @@ The list is displayed in a buffer named `*Packages*'. ;;;*** -;;;### (autoloads nil "paren" "paren.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "paren" "paren.el" (21604 48550 301934 225000)) ;;; Generated autoloads from paren.el (defvar show-paren-mode nil "\ @@ -20165,8 +20230,8 @@ matching parenthesis is highlighted in `show-paren-style' after ;;;*** -;;;### (autoloads nil "parse-time" "calendar/parse-time.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "parse-time" "calendar/parse-time.el" (21604 +;;;;;; 48549 953934 212000)) ;;; Generated autoloads from calendar/parse-time.el (put 'parse-time-rules 'risky-local-variable t) @@ -20179,8 +20244,8 @@ unknown are returned as nil. ;;;*** -;;;### (autoloads nil "pascal" "progmodes/pascal.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "pascal" "progmodes/pascal.el" (21604 48550 +;;;;;; 349934 227000)) ;;; Generated autoloads from progmodes/pascal.el (autoload 'pascal-mode "pascal" "\ @@ -20229,8 +20294,8 @@ See also the user variables `pascal-type-keywords', `pascal-start-keywords' and ;;;*** -;;;### (autoloads nil "password-cache" "password-cache.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "password-cache" "password-cache.el" (21604 +;;;;;; 48550 301934 225000)) ;;; Generated autoloads from password-cache.el (defvar password-cache t "\ @@ -20251,8 +20316,8 @@ Check if KEY is in the cache. ;;;*** -;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21604 48550 +;;;;;; 21934 214000)) ;;; Generated autoloads from emacs-lisp/pcase.el (autoload 'pcase "pcase" "\ @@ -20334,8 +20399,8 @@ Define a pcase UPattern macro. ;;;*** -;;;### (autoloads nil "pcmpl-cvs" "pcmpl-cvs.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "pcmpl-cvs" "pcmpl-cvs.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from pcmpl-cvs.el (autoload 'pcomplete/cvs "pcmpl-cvs" "\ @@ -20345,8 +20410,8 @@ Completion rules for the `cvs' command. ;;;*** -;;;### (autoloads nil "pcmpl-gnu" "pcmpl-gnu.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "pcmpl-gnu" "pcmpl-gnu.el" (21631 35966 895121 +;;;;;; 869000)) ;;; Generated autoloads from pcmpl-gnu.el (autoload 'pcomplete/gzip "pcmpl-gnu" "\ @@ -20373,8 +20438,8 @@ Completion for the GNU tar utility. ;;;*** -;;;### (autoloads nil "pcmpl-linux" "pcmpl-linux.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "pcmpl-linux" "pcmpl-linux.el" (21604 48550 +;;;;;; 301934 225000)) ;;; Generated autoloads from pcmpl-linux.el (autoload 'pcomplete/kill "pcmpl-linux" "\ @@ -20394,8 +20459,8 @@ Completion for GNU/Linux `mount'. ;;;*** -;;;### (autoloads nil "pcmpl-rpm" "pcmpl-rpm.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "pcmpl-rpm" "pcmpl-rpm.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from pcmpl-rpm.el (autoload 'pcomplete/rpm "pcmpl-rpm" "\ @@ -20405,8 +20470,8 @@ Completion for the `rpm' command. ;;;*** -;;;### (autoloads nil "pcmpl-unix" "pcmpl-unix.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "pcmpl-unix" "pcmpl-unix.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from pcmpl-unix.el (autoload 'pcomplete/cd "pcmpl-unix" "\ @@ -20461,8 +20526,8 @@ Includes files as well as host names followed by a colon. ;;;*** -;;;### (autoloads nil "pcmpl-x" "pcmpl-x.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "pcmpl-x" "pcmpl-x.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from pcmpl-x.el (autoload 'pcomplete/tlmgr "pcmpl-x" "\ @@ -20486,8 +20551,8 @@ Completion for the `ag' command. ;;;*** -;;;### (autoloads nil "pcomplete" "pcomplete.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "pcomplete" "pcomplete.el" (21604 48550 301934 +;;;;;; 225000)) ;;; Generated autoloads from pcomplete.el (autoload 'pcomplete "pcomplete" "\ @@ -20544,7 +20609,7 @@ Setup `shell-mode' to use pcomplete. ;;;*** -;;;### (autoloads nil "pcvs" "vc/pcvs.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "pcvs" "vc/pcvs.el" (21604 48550 429934 230000)) ;;; Generated autoloads from vc/pcvs.el (autoload 'cvs-checkout "pcvs" "\ @@ -20619,8 +20684,8 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** -;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (21604 48550 +;;;;;; 429934 230000)) ;;; Generated autoloads from vc/pcvs-defs.el (defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] `(menu-item ,(purecopy "Directory Status") cvs-status :help ,(purecopy "A more verbose status of a workarea"))) (define-key m [checkout] `(menu-item ,(purecopy "Checkout Module") cvs-checkout :help ,(purecopy "Check out a module from the repository"))) (define-key m [update] `(menu-item ,(purecopy "Update Directory") cvs-update :help ,(purecopy "Fetch updates from the repository"))) (define-key m [examine] `(menu-item ,(purecopy "Examine Directory") cvs-examine :help ,(purecopy "Examine the current state of a workarea"))) (fset 'cvs-global-menu m)) "\ @@ -20628,8 +20693,8 @@ Global menu used by PCL-CVS.") ;;;*** -;;;### (autoloads nil "perl-mode" "progmodes/perl-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "perl-mode" "progmodes/perl-mode.el" (21604 +;;;;;; 48550 353934 227000)) ;;; Generated autoloads from progmodes/perl-mode.el (put 'perl-indent-level 'safe-local-variable 'integerp) (put 'perl-continued-statement-offset 'safe-local-variable 'integerp) @@ -20690,8 +20755,8 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'. ;;;*** -;;;### (autoloads nil "picture" "textmodes/picture.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "picture" "textmodes/picture.el" (21604 48550 +;;;;;; 397934 228000)) ;;; Generated autoloads from textmodes/picture.el (autoload 'picture-mode "picture" "\ @@ -20771,8 +20836,8 @@ they are not by default assigned to keys. ;;;*** -;;;### (autoloads nil "plstore" "gnus/plstore.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "plstore" "gnus/plstore.el" (21604 48550 117934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/plstore.el (autoload 'plstore-open "plstore" "\ @@ -20787,8 +20852,8 @@ Major mode for editing PLSTORE files. ;;;*** -;;;### (autoloads nil "po" "textmodes/po.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "po" "textmodes/po.el" (21604 48550 397934 +;;;;;; 228000)) ;;; Generated autoloads from textmodes/po.el (autoload 'po-find-file-coding-system "po" "\ @@ -20799,7 +20864,7 @@ Called through `file-coding-system-alist', before the file is visited for real. ;;;*** -;;;### (autoloads nil "pong" "play/pong.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "pong" "play/pong.el" (21604 48550 305934 225000)) ;;; Generated autoloads from play/pong.el (autoload 'pong "pong" "\ @@ -20815,7 +20880,7 @@ pong-mode keybindings:\\ ;;;*** -;;;### (autoloads nil "pop3" "gnus/pop3.el" (21619 5051 260148 536000)) +;;;### (autoloads nil "pop3" "gnus/pop3.el" (21631 35966 859121 868000)) ;;; Generated autoloads from gnus/pop3.el (autoload 'pop3-movemail "pop3" "\ @@ -20826,8 +20891,8 @@ Use streaming commands. ;;;*** -;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21604 48550 21934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/pp.el (autoload 'pp-to-string "pp" "\ @@ -20877,8 +20942,8 @@ Ignores leading comment characters. ;;;*** -;;;### (autoloads nil "printing" "printing.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "printing" "printing.el" (21604 48550 309934 +;;;;;; 225000)) ;;; Generated autoloads from printing.el (push (purecopy '(printing 6 9 3)) package--builtin-versions) @@ -21466,7 +21531,7 @@ are both set to t. ;;;*** -;;;### (autoloads nil "proced" "proced.el" (21609 55608 852266 580000)) +;;;### (autoloads nil "proced" "proced.el" (21631 35966 895121 869000)) ;;; Generated autoloads from proced.el (autoload 'proced "proced" "\ @@ -21484,8 +21549,8 @@ Proced buffers. ;;;*** -;;;### (autoloads nil "profiler" "profiler.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "profiler" "profiler.el" (21604 48550 309934 +;;;;;; 225000)) ;;; Generated autoloads from profiler.el (autoload 'profiler-start "profiler" "\ @@ -21513,8 +21578,8 @@ Open profile FILENAME. ;;;*** -;;;### (autoloads nil "prolog" "progmodes/prolog.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "prolog" "progmodes/prolog.el" (21604 48550 +;;;;;; 353934 227000)) ;;; Generated autoloads from progmodes/prolog.el (autoload 'prolog-mode "prolog" "\ @@ -21547,7 +21612,7 @@ With prefix argument ARG, restart the Prolog process if running before. ;;;*** -;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (21604 48550 369934 227000)) ;;; Generated autoloads from ps-bdf.el (defvar bdf-directory-list (if (memq system-type '(ms-dos windows-nt)) (list (expand-file-name "fonts/bdf" installation-directory)) '("/usr/local/share/emacs/fonts/bdf")) "\ @@ -21558,8 +21623,8 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") ;;;*** -;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (21604 48550 +;;;;;; 353934 227000)) ;;; Generated autoloads from progmodes/ps-mode.el (push (purecopy '(ps-mode 1 1 9)) package--builtin-versions) @@ -21605,8 +21670,8 @@ Typing \\\\[ps-run-goto-error] when the cursor is at the number ;;;*** -;;;### (autoloads nil "ps-print" "ps-print.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "ps-print" "ps-print.el" (21604 48550 369934 +;;;;;; 227000)) ;;; Generated autoloads from ps-print.el (push (purecopy '(ps-print 7 3 5)) package--builtin-versions) @@ -21803,15 +21868,15 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** -;;;### (autoloads nil "pulse" "cedet/pulse.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "pulse" "cedet/pulse.el" (21640 32530 958334 +;;;;;; 457000)) ;;; Generated autoloads from cedet/pulse.el (push (purecopy '(pulse 1 0)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "python" "progmodes/python.el" (21625 43838 -;;;;;; 980113 968000)) +;;;### (autoloads nil "python" "progmodes/python.el" (21645 25761 +;;;;;; 809186 828000)) ;;; Generated autoloads from progmodes/python.el (push (purecopy '(python 0 24 4)) package--builtin-versions) @@ -21846,7 +21911,7 @@ Major mode for editing Python files. ;;;*** -;;;### (autoloads nil "qp" "gnus/qp.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "qp" "gnus/qp.el" (21604 48550 117934 218000)) ;;; Generated autoloads from gnus/qp.el (autoload 'quoted-printable-decode-region "qp" "\ @@ -21865,8 +21930,8 @@ them into characters should be done separately. ;;;*** -;;;### (autoloads nil "quail" "international/quail.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "quail" "international/quail.el" (21604 48550 +;;;;;; 141934 219000)) ;;; Generated autoloads from international/quail.el (autoload 'quail-title "quail" "\ @@ -22096,8 +22161,8 @@ of each directory. ;;;*** -;;;### (autoloads nil "quail/hangul" "leim/quail/hangul.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "quail/hangul" "leim/quail/hangul.el" (21604 +;;;;;; 48550 173934 220000)) ;;; Generated autoloads from leim/quail/hangul.el (autoload 'hangul-input-method-activate "quail/hangul" "\ @@ -22110,7 +22175,7 @@ HELP-TEXT is a text set in `hangul-input-method-help-text'. ;;;*** ;;;### (autoloads nil "quail/uni-input" "leim/quail/uni-input.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21604 48550 177934 220000)) ;;; Generated autoloads from leim/quail/uni-input.el (autoload 'ucs-input-activate "quail/uni-input" "\ @@ -22124,8 +22189,8 @@ While this input method is active, the variable ;;;*** -;;;### (autoloads nil "quickurl" "net/quickurl.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "quickurl" "net/quickurl.el" (21604 48550 221934 +;;;;;; 222000)) ;;; Generated autoloads from net/quickurl.el (defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))\n;; End:\n" "\ @@ -22196,8 +22261,8 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'. ;;;*** -;;;### (autoloads nil "rcirc" "net/rcirc.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "rcirc" "net/rcirc.el" (21604 48550 221934 +;;;;;; 222000)) ;;; Generated autoloads from net/rcirc.el (autoload 'rcirc "rcirc" "\ @@ -22235,8 +22300,8 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (21604 +;;;;;; 48550 21934 214000)) ;;; Generated autoloads from emacs-lisp/re-builder.el (defalias 'regexp-builder 're-builder) @@ -22254,8 +22319,8 @@ matching parts of the target buffer will be highlighted. ;;;*** -;;;### (autoloads nil "recentf" "recentf.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "recentf" "recentf.el" (21604 48550 369934 +;;;;;; 227000)) ;;; Generated autoloads from recentf.el (defvar recentf-mode nil "\ @@ -22281,7 +22346,7 @@ were operated on recently. ;;;*** -;;;### (autoloads nil "rect" "rect.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "rect" "rect.el" (21604 48550 369934 227000)) ;;; Generated autoloads from rect.el (autoload 'delete-rectangle "rect" "\ @@ -22421,8 +22486,8 @@ Activates the region if needed. Only lasts until the region is deactivated. ;;;*** -;;;### (autoloads nil "refill" "textmodes/refill.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "refill" "textmodes/refill.el" (21604 48550 +;;;;;; 401934 229000)) ;;; Generated autoloads from textmodes/refill.el (autoload 'refill-mode "refill" "\ @@ -22442,8 +22507,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead. ;;;*** -;;;### (autoloads nil "reftex" "textmodes/reftex.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "reftex" "textmodes/reftex.el" (21604 48550 +;;;;;; 405934 229000)) ;;; Generated autoloads from textmodes/reftex.el (autoload 'reftex-citation "reftex-cite" nil t) (autoload 'reftex-all-document-files "reftex-parse") @@ -22496,8 +22561,8 @@ This enforces rescanning the buffer on next use. ;;;*** -;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21604 +;;;;;; 48550 401934 229000)) ;;; Generated autoloads from textmodes/reftex-vars.el (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) @@ -22506,8 +22571,8 @@ This enforces rescanning the buffer on next use. ;;;*** -;;;### (autoloads nil "regexp-opt" "emacs-lisp/regexp-opt.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "regexp-opt" "emacs-lisp/regexp-opt.el" (21604 +;;;;;; 48550 21934 214000)) ;;; Generated autoloads from emacs-lisp/regexp-opt.el (autoload 'regexp-opt "regexp-opt" "\ @@ -22536,15 +22601,15 @@ This means the number of non-shy regexp grouping constructs ;;;*** -;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (21604 48550 21934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/regi.el (push (purecopy '(regi 1 8)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "remember" "textmodes/remember.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "remember" "textmodes/remember.el" (21604 48550 +;;;;;; 405934 229000)) ;;; Generated autoloads from textmodes/remember.el (push (purecopy '(remember 2 0)) package--builtin-versions) @@ -22598,7 +22663,7 @@ to turn the *scratch* buffer into your notes buffer. ;;;*** -;;;### (autoloads nil "repeat" "repeat.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "repeat" "repeat.el" (21604 48550 373934 228000)) ;;; Generated autoloads from repeat.el (push (purecopy '(repeat 0 51)) package--builtin-versions) @@ -22621,8 +22686,8 @@ recently executed command not bound to an input event\". ;;;*** -;;;### (autoloads nil "reporter" "mail/reporter.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "reporter" "mail/reporter.el" (21604 48550 +;;;;;; 185934 221000)) ;;; Generated autoloads from mail/reporter.el (autoload 'reporter-submit-bug-report "reporter" "\ @@ -22653,8 +22718,8 @@ mail-sending package is used for editing and sending the message. ;;;*** -;;;### (autoloads nil "reposition" "reposition.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "reposition" "reposition.el" (21604 48550 373934 +;;;;;; 228000)) ;;; Generated autoloads from reposition.el (autoload 'reposition-window "reposition" "\ @@ -22680,7 +22745,7 @@ first comment line visible (if point is in a comment). ;;;*** -;;;### (autoloads nil "reveal" "reveal.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "reveal" "reveal.el" (21604 48550 373934 228000)) ;;; Generated autoloads from reveal.el (autoload 'reveal-mode "reveal" "\ @@ -22715,8 +22780,8 @@ the mode if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "ring" "emacs-lisp/ring.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "ring" "emacs-lisp/ring.el" (21604 48550 21934 +;;;;;; 214000)) ;;; Generated autoloads from emacs-lisp/ring.el (autoload 'ring-p "ring" "\ @@ -22731,8 +22796,8 @@ Make a ring that can contain SIZE elements. ;;;*** -;;;### (autoloads nil "rlogin" "net/rlogin.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "rlogin" "net/rlogin.el" (21604 48550 221934 +;;;;;; 222000)) ;;; Generated autoloads from net/rlogin.el (autoload 'rlogin "rlogin" "\ @@ -22776,8 +22841,8 @@ variable. ;;;*** -;;;### (autoloads nil "rmail" "mail/rmail.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "rmail" "mail/rmail.el" (21604 48550 185934 +;;;;;; 221000)) ;;; Generated autoloads from mail/rmail.el (defvar rmail-file-name (purecopy "~/RMAIL") "\ @@ -22974,8 +23039,8 @@ Set PASSWORD to be used for retrieving mail from a POP or IMAP server. ;;;*** -;;;### (autoloads nil "rmailout" "mail/rmailout.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "rmailout" "mail/rmailout.el" (21604 48550 +;;;;;; 185934 221000)) ;;; Generated autoloads from mail/rmailout.el (put 'rmail-output-file-alist 'risky-local-variable t) @@ -23039,8 +23104,8 @@ than appending to it. Deletes the message after writing if ;;;*** -;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (21604 48550 +;;;;;; 237934 223000)) ;;; Generated autoloads from nxml/rng-cmpct.el (autoload 'rng-c-load-schema "rng-cmpct" "\ @@ -23051,8 +23116,8 @@ Return a pattern. ;;;*** -;;;### (autoloads nil "rng-nxml" "nxml/rng-nxml.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "rng-nxml" "nxml/rng-nxml.el" (21604 48550 +;;;;;; 241934 223000)) ;;; Generated autoloads from nxml/rng-nxml.el (autoload 'rng-nxml-mode-init "rng-nxml" "\ @@ -23064,8 +23129,8 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil. ;;;*** -;;;### (autoloads nil "rng-valid" "nxml/rng-valid.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "rng-valid" "nxml/rng-valid.el" (21604 48550 +;;;;;; 241934 223000)) ;;; Generated autoloads from nxml/rng-valid.el (autoload 'rng-validate-mode "rng-valid" "\ @@ -23095,8 +23160,8 @@ to use for finding the schema. ;;;*** -;;;### (autoloads nil "rng-xsd" "nxml/rng-xsd.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "rng-xsd" "nxml/rng-xsd.el" (21604 48550 241934 +;;;;;; 223000)) ;;; Generated autoloads from nxml/rng-xsd.el (put 'http://www\.w3\.org/2001/XMLSchema-datatypes 'rng-dt-compile 'rng-xsd-compile) @@ -23123,8 +23188,8 @@ must be equal. ;;;*** -;;;### (autoloads nil "robin" "international/robin.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "robin" "international/robin.el" (21604 48550 +;;;;;; 141934 219000)) ;;; Generated autoloads from international/robin.el (autoload 'robin-define-package "robin" "\ @@ -23156,7 +23221,7 @@ Start using robin package NAME, which is a string. ;;;*** -;;;### (autoloads nil "rot13" "rot13.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "rot13" "rot13.el" (21604 48550 373934 228000)) ;;; Generated autoloads from rot13.el (autoload 'rot13 "rot13" "\ @@ -23193,8 +23258,8 @@ Toggle the use of ROT13 encoding for the current window. ;;;*** -;;;### (autoloads nil "rst" "textmodes/rst.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "rst" "textmodes/rst.el" (21604 48550 405934 +;;;;;; 229000)) ;;; Generated autoloads from textmodes/rst.el (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) @@ -23224,8 +23289,8 @@ for modes derived from Text mode, like Mail mode. ;;;*** -;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21659 +;;;;;; 61733 222949 164000)) ;;; Generated autoloads from progmodes/ruby-mode.el (push (purecopy '(ruby-mode 1 2)) package--builtin-versions) @@ -23236,14 +23301,14 @@ Major mode for editing Ruby code. \(fn)" t nil) -(add-to-list 'auto-mode-alist (cons (purecopy (concat "\\(?:\\." "rb\\|ru\\|rake\\|thor" "\\|jbuilder\\|gemspec\\|podspec" "\\|/" "\\(?:Gem\\|Rake\\|Cap\\|Thor" "\\|Vagrant\\|Guard\\|Pod\\)file" "\\)\\'")) 'ruby-mode)) +(add-to-list 'auto-mode-alist (cons (purecopy (concat "\\(?:\\." "rb\\|ru\\|rake\\|thor" "\\|jbuilder\\|rabl\\|gemspec\\|podspec" "\\|/" "\\(?:Gem\\|Rake\\|Cap\\|Thor" "\\|Puppet\\|Berks" "\\|Vagrant\\|Guard\\|Pod\\)file" "\\)\\'")) 'ruby-mode)) (dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode))) ;;;*** -;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (21604 48550 373934 +;;;;;; 228000)) ;;; Generated autoloads from ruler-mode.el (push (purecopy '(ruler-mode 1 6)) package--builtin-versions) @@ -23261,8 +23326,8 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "rx" "emacs-lisp/rx.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "rx" "emacs-lisp/rx.el" (21604 48550 25934 +;;;;;; 215000)) ;;; Generated autoloads from emacs-lisp/rx.el (autoload 'rx-to-string "rx" "\ @@ -23573,15 +23638,15 @@ enclosed in `(and ...)'. ;;;*** -;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (21604 48550 +;;;;;; 221934 222000)) ;;; Generated autoloads from net/sasl-ntlm.el (push (purecopy '(sasl 1 0)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "savehist" "savehist.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "savehist" "savehist.el" (21604 48550 373934 +;;;;;; 228000)) ;;; Generated autoloads from savehist.el (push (purecopy '(savehist 24)) package--builtin-versions) @@ -23613,8 +23678,8 @@ histories, which is probably undesirable. ;;;*** -;;;### (autoloads nil "scheme" "progmodes/scheme.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "scheme" "progmodes/scheme.el" (21604 48550 +;;;;;; 353934 227000)) ;;; Generated autoloads from progmodes/scheme.el (autoload 'scheme-mode "scheme" "\ @@ -23653,8 +23718,8 @@ that variable's value is a string. ;;;*** -;;;### (autoloads nil "score-mode" "gnus/score-mode.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "score-mode" "gnus/score-mode.el" (21604 48550 +;;;;;; 121934 218000)) ;;; Generated autoloads from gnus/score-mode.el (autoload 'gnus-score-mode "score-mode" "\ @@ -23667,8 +23732,8 @@ This mode is an extended emacs-lisp mode. ;;;*** -;;;### (autoloads nil "scroll-all" "scroll-all.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "scroll-all" "scroll-all.el" (21604 48550 373934 +;;;;;; 228000)) ;;; Generated autoloads from scroll-all.el (defvar scroll-all-mode nil "\ @@ -23693,8 +23758,8 @@ one window apply to all visible windows in the same frame. ;;;*** -;;;### (autoloads nil "scroll-lock" "scroll-lock.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "scroll-lock" "scroll-lock.el" (21604 48550 +;;;;;; 373934 228000)) ;;; Generated autoloads from scroll-lock.el (autoload 'scroll-lock-mode "scroll-lock" "\ @@ -23710,16 +23775,16 @@ vertically fixed relative to window boundaries during scrolling. ;;;*** -;;;### (autoloads nil "secrets" "net/secrets.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "secrets" "net/secrets.el" (21604 48550 221934 +;;;;;; 222000)) ;;; Generated autoloads from net/secrets.el (when (featurep 'dbusbind) (autoload 'secrets-show-secrets "secrets" nil t)) ;;;*** -;;;### (autoloads nil "semantic" "cedet/semantic.el" (21609 55608 -;;;;;; 852266 580000)) +;;;### (autoloads nil "semantic" "cedet/semantic.el" (21645 25875 +;;;;;; 821189 881000)) ;;; Generated autoloads from cedet/semantic.el (push (purecopy '(semantic 2 2)) package--builtin-versions) @@ -23777,7 +23842,7 @@ Semantic mode. ;;;*** ;;;### (autoloads nil "semantic/bovine/grammar" "cedet/semantic/bovine/grammar.el" -;;;;;; (21607 54477 800124 118000)) +;;;;;; (21604 48549 969934 213000)) ;;; Generated autoloads from cedet/semantic/bovine/grammar.el (autoload 'bovine-grammar-mode "semantic/bovine/grammar" "\ @@ -23788,7 +23853,7 @@ Major mode for editing Bovine grammars. ;;;*** ;;;### (autoloads nil "semantic/wisent/grammar" "cedet/semantic/wisent/grammar.el" -;;;;;; (21607 54477 800124 118000)) +;;;;;; (21604 48549 981934 213000)) ;;; Generated autoloads from cedet/semantic/wisent/grammar.el (autoload 'wisent-grammar-mode "semantic/wisent/grammar" "\ @@ -23798,8 +23863,8 @@ Major mode for editing Wisent grammars. ;;;*** -;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21604 48550 +;;;;;; 189934 221000)) ;;; Generated autoloads from mail/sendmail.el (defvar mail-from-style 'default "\ @@ -24080,7 +24145,14 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** -;;;### (autoloads nil "server" "server.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21648 55877 412874 +;;;;;; 916000)) +;;; Generated autoloads from emacs-lisp/seq.el +(push (purecopy '(seq 1 0)) package--builtin-versions) + +;;;*** + +;;;### (autoloads nil "server" "server.el" (21604 48550 373934 228000)) ;;; Generated autoloads from server.el (put 'server-host 'risky-local-variable t) @@ -24147,7 +24219,7 @@ only these files will be asked to be saved. ;;;*** -;;;### (autoloads nil "ses" "ses.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "ses" "ses.el" (21604 48550 377934 228000)) ;;; Generated autoloads from ses.el (autoload 'ses-mode "ses" "\ @@ -24191,8 +24263,8 @@ formula: ;;;*** -;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21623 -;;;;;; 2108 292281 129000)) +;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21631 +;;;;;; 35966 915121 870000)) ;;; Generated autoloads from textmodes/sgml-mode.el (autoload 'sgml-mode "sgml-mode" "\ @@ -24257,8 +24329,8 @@ To work around that, do: ;;;*** -;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21637 +;;;;;; 50476 679217 121000)) ;;; Generated autoloads from progmodes/sh-script.el (push (purecopy '(sh-script 2 0 6)) package--builtin-versions) (put 'sh-shell 'safe-local-variable 'symbolp) @@ -24322,8 +24394,8 @@ with your script for an edit-interpret-debug cycle. ;;;*** -;;;### (autoloads nil "shadow" "emacs-lisp/shadow.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "shadow" "emacs-lisp/shadow.el" (21604 48550 +;;;;;; 25934 215000)) ;;; Generated autoloads from emacs-lisp/shadow.el (autoload 'list-load-path-shadows "shadow" "\ @@ -24372,8 +24444,8 @@ function, `load-path-shadows-find'. ;;;*** -;;;### (autoloads nil "shadowfile" "shadowfile.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "shadowfile" "shadowfile.el" (21604 48550 377934 +;;;;;; 228000)) ;;; Generated autoloads from shadowfile.el (autoload 'shadow-define-cluster "shadowfile" "\ @@ -24411,7 +24483,7 @@ Set up file shadowing. ;;;*** -;;;### (autoloads nil "shell" "shell.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "shell" "shell.el" (21659 61733 222949 164000)) ;;; Generated autoloads from shell.el (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\ @@ -24459,7 +24531,7 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** -;;;### (autoloads nil "shr" "net/shr.el" (21623 2108 292281 129000)) +;;;### (autoloads nil "shr" "net/shr.el" (21646 54881 267721 623000)) ;;; Generated autoloads from net/shr.el (autoload 'shr-render-region "shr" "\ @@ -24476,8 +24548,8 @@ DOM should be a parse tree as generated by ;;;*** -;;;### (autoloads nil "sieve" "gnus/sieve.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "sieve" "gnus/sieve.el" (21604 48550 121934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/sieve.el (autoload 'sieve-manage "sieve" "\ @@ -24502,8 +24574,8 @@ DOM should be a parse tree as generated by ;;;*** -;;;### (autoloads nil "sieve-mode" "gnus/sieve-mode.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "sieve-mode" "gnus/sieve-mode.el" (21604 48550 +;;;;;; 121934 218000)) ;;; Generated autoloads from gnus/sieve-mode.el (autoload 'sieve-mode "sieve-mode" "\ @@ -24518,8 +24590,8 @@ Turning on Sieve mode runs `sieve-mode-hook'. ;;;*** -;;;### (autoloads nil "simula" "progmodes/simula.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "simula" "progmodes/simula.el" (21604 48550 +;;;;;; 357934 227000)) ;;; Generated autoloads from progmodes/simula.el (autoload 'simula-mode "simula" "\ @@ -24567,8 +24639,8 @@ with no arguments, if that value is non-nil. ;;;*** -;;;### (autoloads nil "skeleton" "skeleton.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "skeleton" "skeleton.el" (21604 48550 377934 +;;;;;; 228000)) ;;; Generated autoloads from skeleton.el (defvar skeleton-filter-function 'identity "\ @@ -24686,8 +24758,8 @@ symmetrical ones, and the same character twice for the others. ;;;*** -;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21628 45530 -;;;;;; 160140 360000)) +;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21631 35966 +;;;;;; 923121 870000)) ;;; Generated autoloads from vc/smerge-mode.el (autoload 'smerge-ediff "smerge-mode" "\ @@ -24714,8 +24786,8 @@ If no conflict maker is found, turn off `smerge-mode'. ;;;*** -;;;### (autoloads nil "smiley" "gnus/smiley.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "smiley" "gnus/smiley.el" (21604 48550 121934 +;;;;;; 218000)) ;;; Generated autoloads from gnus/smiley.el (autoload 'smiley-region "smiley" "\ @@ -24732,8 +24804,8 @@ interactively. If there's no argument, do it at the current buffer. ;;;*** -;;;### (autoloads nil "smtpmail" "mail/smtpmail.el" (21619 5051 260148 -;;;;;; 536000)) +;;;### (autoloads nil "smtpmail" "mail/smtpmail.el" (21631 35966 +;;;;;; 875121 868000)) ;;; Generated autoloads from mail/smtpmail.el (autoload 'smtpmail-send-it "smtpmail" "\ @@ -24748,8 +24820,8 @@ Send mail that was queued as a result of setting `smtpmail-queue-mail'. ;;;*** -;;;### (autoloads nil "snake" "play/snake.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "snake" "play/snake.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/snake.el (autoload 'snake "snake" "\ @@ -24772,8 +24844,8 @@ Snake mode keybindings: ;;;*** -;;;### (autoloads nil "snmp-mode" "net/snmp-mode.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "snmp-mode" "net/snmp-mode.el" (21604 48550 +;;;;;; 225934 222000)) ;;; Generated autoloads from net/snmp-mode.el (autoload 'snmp-mode "snmp-mode" "\ @@ -24802,8 +24874,8 @@ then `snmpv2-mode-hook'. ;;;*** -;;;### (autoloads nil "solar" "calendar/solar.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "solar" "calendar/solar.el" (21604 48549 953934 +;;;;;; 212000)) ;;; Generated autoloads from calendar/solar.el (autoload 'sunrise-sunset "solar" "\ @@ -24818,8 +24890,8 @@ This function is suitable for execution in an init file. ;;;*** -;;;### (autoloads nil "solitaire" "play/solitaire.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "solitaire" "play/solitaire.el" (21604 48550 +;;;;;; 305934 225000)) ;;; Generated autoloads from play/solitaire.el (autoload 'solitaire "solitaire" "\ @@ -24894,7 +24966,7 @@ Pick your favorite shortcuts: ;;;*** -;;;### (autoloads nil "sort" "sort.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "sort" "sort.el" (21604 48550 377934 228000)) ;;; Generated autoloads from sort.el (put 'sort-fold-case 'safe-local-variable 'booleanp) @@ -25069,7 +25141,7 @@ is non-nil, it also prints a message describing the number of deletions. ;;;*** -;;;### (autoloads nil "spam" "gnus/spam.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "spam" "gnus/spam.el" (21604 48550 121934 218000)) ;;; Generated autoloads from gnus/spam.el (autoload 'spam-initialize "spam" "\ @@ -25083,8 +25155,8 @@ installed through `spam-necessary-extra-headers'. ;;;*** -;;;### (autoloads nil "spam-report" "gnus/spam-report.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "spam-report" "gnus/spam-report.el" (21604 +;;;;;; 48550 121934 218000)) ;;; Generated autoloads from gnus/spam-report.el (autoload 'spam-report-process-queue "spam-report" "\ @@ -25126,8 +25198,8 @@ Spam reports will be queued with the method used when ;;;*** -;;;### (autoloads nil "speedbar" "speedbar.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "speedbar" "speedbar.el" (21604 48550 381934 +;;;;;; 228000)) ;;; Generated autoloads from speedbar.el (defalias 'speedbar 'speedbar-frame-mode) @@ -25151,8 +25223,8 @@ selected. If the speedbar frame is active, then select the attached frame. ;;;*** -;;;### (autoloads nil "spook" "play/spook.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "spook" "play/spook.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/spook.el (autoload 'spook "spook" "\ @@ -25167,8 +25239,8 @@ Return a vector containing the lines from `spook-phrases-file'. ;;;*** -;;;### (autoloads nil "sql" "progmodes/sql.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "sql" "progmodes/sql.el" (21604 48550 357934 +;;;;;; 227000)) ;;; Generated autoloads from progmodes/sql.el (push (purecopy '(sql 3 4)) package--builtin-versions) @@ -25634,15 +25706,15 @@ Run vsql as an inferior process. ;;;*** -;;;### (autoloads nil "srecode" "cedet/srecode.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "srecode" "cedet/srecode.el" (21604 48549 981934 +;;;;;; 213000)) ;;; Generated autoloads from cedet/srecode.el (push (purecopy '(srecode 1 2)) package--builtin-versions) ;;;*** ;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el" -;;;;;; (21607 54477 800124 118000)) +;;;;;; (21659 61733 202949 164000)) ;;; Generated autoloads from cedet/srecode/srt-mode.el (autoload 'srecode-template-mode "srecode/srt-mode" "\ @@ -25654,8 +25726,8 @@ Major-mode for writing SRecode macros. ;;;*** -;;;### (autoloads nil "starttls" "gnus/starttls.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "starttls" "gnus/starttls.el" (21604 48550 +;;;;;; 121934 218000)) ;;; Generated autoloads from gnus/starttls.el (autoload 'starttls-open-stream "starttls" "\ @@ -25678,8 +25750,8 @@ GnuTLS requires a port number. ;;;*** -;;;### (autoloads nil "strokes" "strokes.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "strokes" "strokes.el" (21604 48550 381934 +;;;;;; 228000)) ;;; Generated autoloads from strokes.el (autoload 'strokes-global-set-stroke "strokes" "\ @@ -25792,8 +25864,8 @@ Read a complex stroke and insert its glyph into the current buffer. ;;;*** -;;;### (autoloads nil "studly" "play/studly.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "studly" "play/studly.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/studly.el (autoload 'studlify-region "studly" "\ @@ -25813,8 +25885,8 @@ Studlify-case the current buffer. ;;;*** -;;;### (autoloads nil "subword" "progmodes/subword.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "subword" "progmodes/subword.el" (21604 48550 +;;;;;; 357934 227000)) ;;; Generated autoloads from progmodes/subword.el (define-obsolete-function-alias 'capitalized-words-mode 'subword-mode "25.1") @@ -25906,8 +25978,8 @@ See `superword-mode' for more information on Superword mode. ;;;*** -;;;### (autoloads nil "supercite" "mail/supercite.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "supercite" "mail/supercite.el" (21604 48550 +;;;;;; 189934 221000)) ;;; Generated autoloads from mail/supercite.el (autoload 'sc-cite-original "supercite" "\ @@ -25939,8 +26011,8 @@ and `sc-post-hook' is run after the guts of this function. ;;;*** -;;;### (autoloads nil "t-mouse" "t-mouse.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "t-mouse" "t-mouse.el" (21604 48550 385934 +;;;;;; 228000)) ;;; Generated autoloads from t-mouse.el (define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1") @@ -25968,7 +26040,7 @@ It relies on the `gpm' daemon being activated. ;;;*** -;;;### (autoloads nil "tabify" "tabify.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "tabify" "tabify.el" (21604 48550 385934 228000)) ;;; Generated autoloads from tabify.el (autoload 'untabify "tabify" "\ @@ -25997,8 +26069,8 @@ The variable `tab-width' controls the spacing of tab stops. ;;;*** -;;;### (autoloads nil "table" "textmodes/table.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "table" "textmodes/table.el" (21604 48550 409934 +;;;;;; 229000)) ;;; Generated autoloads from textmodes/table.el (defvar table-cell-map-hook nil "\ @@ -26590,7 +26662,7 @@ converts a table into plain text without frames. It is a companion to ;;;*** -;;;### (autoloads nil "talk" "talk.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "talk" "talk.el" (21604 48550 385934 228000)) ;;; Generated autoloads from talk.el (autoload 'talk-connect "talk" "\ @@ -26605,8 +26677,8 @@ Connect to the Emacs talk group from the current X display or tty frame. ;;;*** -;;;### (autoloads nil "tar-mode" "tar-mode.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "tar-mode" "tar-mode.el" (21604 48550 385934 +;;;;;; 228000)) ;;; Generated autoloads from tar-mode.el (autoload 'tar-mode "tar-mode" "\ @@ -26629,8 +26701,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. ;;;*** -;;;### (autoloads nil "tcl" "progmodes/tcl.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "tcl" "progmodes/tcl.el" (21604 48550 357934 +;;;;;; 227000)) ;;; Generated autoloads from progmodes/tcl.el (autoload 'tcl-mode "tcl" "\ @@ -26678,8 +26750,8 @@ Prefix argument means invert sense of `tcl-use-smart-word-finder'. ;;;*** -;;;### (autoloads nil "telnet" "net/telnet.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "telnet" "net/telnet.el" (21604 48550 225934 +;;;;;; 222000)) ;;; Generated autoloads from net/telnet.el (autoload 'telnet "telnet" "\ @@ -26704,7 +26776,7 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** -;;;### (autoloads nil "term" "term.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "term" "term.el" (21604 48550 385934 228000)) ;;; Generated autoloads from term.el (autoload 'make-term "term" "\ @@ -26746,8 +26818,8 @@ use in that buffer. ;;;*** -;;;### (autoloads nil "testcover" "emacs-lisp/testcover.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "testcover" "emacs-lisp/testcover.el" (21604 +;;;;;; 48550 25934 215000)) ;;; Generated autoloads from emacs-lisp/testcover.el (autoload 'testcover-this-defun "testcover" "\ @@ -26757,8 +26829,8 @@ Start coverage on function under point. ;;;*** -;;;### (autoloads nil "tetris" "play/tetris.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "tetris" "play/tetris.el" (21604 48550 305934 +;;;;;; 225000)) ;;; Generated autoloads from play/tetris.el (push (purecopy '(tetris 2 1)) package--builtin-versions) @@ -26783,8 +26855,8 @@ tetris-mode keybindings: ;;;*** -;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (21611 10938 -;;;;;; 204397 226000)) +;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (21647 39327 +;;;;;; 896553 751000)) ;;; Generated autoloads from textmodes/tex-mode.el (defvar tex-shell-file-name nil "\ @@ -27085,8 +27157,8 @@ Major mode to edit DocTeX files. ;;;*** -;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21604 48550 +;;;;;; 409934 229000)) ;;; Generated autoloads from textmodes/texinfmt.el (autoload 'texinfo-format-buffer "texinfmt" "\ @@ -27125,8 +27197,8 @@ if large. You can use `Info-split' to do this manually. ;;;*** -;;;### (autoloads nil "texinfo" "textmodes/texinfo.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "texinfo" "textmodes/texinfo.el" (21604 48550 +;;;;;; 409934 229000)) ;;; Generated autoloads from textmodes/texinfo.el (defvar texinfo-open-quote (purecopy "``") "\ @@ -27210,8 +27282,8 @@ value of `texinfo-mode-hook'. ;;;*** -;;;### (autoloads nil "thai-util" "language/thai-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "thai-util" "language/thai-util.el" (21604 +;;;;;; 48550 153934 219000)) ;;; Generated autoloads from language/thai-util.el (autoload 'thai-compose-region "thai-util" "\ @@ -27238,8 +27310,8 @@ Compose Thai characters in the current buffer. ;;;*** -;;;### (autoloads nil "thingatpt" "thingatpt.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "thingatpt" "thingatpt.el" (21604 48550 413934 +;;;;;; 229000)) ;;; Generated autoloads from thingatpt.el (autoload 'forward-thing "thingatpt" "\ @@ -27303,7 +27375,7 @@ Return the Lisp list at point, or nil if none is found. ;;;*** -;;;### (autoloads nil "thumbs" "thumbs.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "thumbs" "thumbs.el" (21604 48550 413934 229000)) ;;; Generated autoloads from thumbs.el (autoload 'thumbs-find-thumb "thumbs" "\ @@ -27337,8 +27409,8 @@ In dired, call the setroot program on the image at point. ;;;*** -;;;### (autoloads nil "tibet-util" "language/tibet-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "tibet-util" "language/tibet-util.el" (21604 +;;;;;; 48550 157934 220000)) ;;; Generated autoloads from language/tibet-util.el (autoload 'tibetan-char-p "tibet-util" "\ @@ -27411,8 +27483,8 @@ See also docstring of the function tibetan-compose-region. ;;;*** -;;;### (autoloads nil "tildify" "textmodes/tildify.el" (21611 10938 -;;;;;; 204397 226000)) +;;;### (autoloads nil "tildify" "textmodes/tildify.el" (21631 35966 +;;;;;; 919121 870000)) ;;; Generated autoloads from textmodes/tildify.el (push (purecopy '(tildify 4 5 7)) package--builtin-versions) @@ -27440,7 +27512,7 @@ won't be prompted for confirmation of each substitution. ;;;*** -;;;### (autoloads nil "time" "time.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "time" "time.el" (21604 48550 413934 229000)) ;;; Generated autoloads from time.el (defvar display-time-day-and-date nil "\ @@ -27502,8 +27574,8 @@ Return a string giving the duration of the Emacs initialization. ;;;*** -;;;### (autoloads nil "time-date" "calendar/time-date.el" (21611 -;;;;;; 10937 700236 3000)) +;;;### (autoloads nil "time-date" "calendar/time-date.el" (21631 +;;;;;; 35966 803121 866000)) ;;; Generated autoloads from calendar/time-date.el (autoload 'date-to-time "time-date" "\ @@ -27606,8 +27678,8 @@ Convert the time interval in seconds to a short string. ;;;*** -;;;### (autoloads nil "time-stamp" "time-stamp.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "time-stamp" "time-stamp.el" (21604 48550 413934 +;;;;;; 229000)) ;;; Generated autoloads from time-stamp.el (put 'time-stamp-format 'safe-local-variable 'stringp) (put 'time-stamp-time-zone 'safe-local-variable 'string-or-null-p) @@ -27647,8 +27719,8 @@ With ARG, turn time stamping on if and only if arg is positive. ;;;*** -;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21604 +;;;;;; 48549 957934 212000)) ;;; Generated autoloads from calendar/timeclock.el (push (purecopy '(timeclock 2 6 1)) package--builtin-versions) @@ -27758,7 +27830,7 @@ relative only to the time worked today, and not to past time. ;;;*** ;;;### (autoloads nil "titdic-cnv" "international/titdic-cnv.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21604 48550 141934 219000)) ;;; Generated autoloads from international/titdic-cnv.el (autoload 'titdic-convert "titdic-cnv" "\ @@ -27780,7 +27852,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\". ;;;*** -;;;### (autoloads nil "tmm" "tmm.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "tmm" "tmm.el" (21651 20707 188225 752000)) ;;; Generated autoloads from tmm.el (define-key global-map "\M-`" 'tmm-menubar) (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse) @@ -27822,8 +27894,8 @@ Its value should be an event that has a binding in MENU. ;;;*** -;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21625 -;;;;;; 43838 483701 627000)) +;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21631 +;;;;;; 35966 807121 866000)) ;;; Generated autoloads from calendar/todo-mode.el (autoload 'todo-show "todo-mode" "\ @@ -27890,8 +27962,8 @@ Mode for displaying and reprioritizing top priority Todo. ;;;*** -;;;### (autoloads nil "tool-bar" "tool-bar.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "tool-bar" "tool-bar.el" (21604 48550 413934 +;;;;;; 229000)) ;;; Generated autoloads from tool-bar.el (autoload 'toggle-tool-bar-mode-from-frame "tool-bar" "\ @@ -27961,8 +28033,8 @@ holds a keymap. ;;;*** -;;;### (autoloads nil "tq" "emacs-lisp/tq.el" (21607 54477 800124 -;;;;;; 118000)) +;;;### (autoloads nil "tq" "emacs-lisp/tq.el" (21604 48550 25934 +;;;;;; 215000)) ;;; Generated autoloads from emacs-lisp/tq.el (autoload 'tq-create "tq" "\ @@ -27975,8 +28047,8 @@ to a tcp server on another machine. ;;;*** -;;;### (autoloads nil "trace" "emacs-lisp/trace.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "trace" "emacs-lisp/trace.el" (21604 48550 +;;;;;; 25934 215000)) ;;; Generated autoloads from emacs-lisp/trace.el (defvar trace-buffer "*trace-output*" "\ @@ -28021,8 +28093,8 @@ the output buffer or changing the window configuration. ;;;*** -;;;### (autoloads nil "tramp" "net/tramp.el" (21625 43838 483701 -;;;;;; 627000)) +;;;### (autoloads nil "tramp" "net/tramp.el" (21640 32530 974334 +;;;;;; 457000)) ;;; Generated autoloads from net/tramp.el (defvar tramp-mode t "\ @@ -28137,8 +28209,8 @@ Discard Tramp from loading remote files. ;;;*** -;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21604 48550 +;;;;;; 225934 222000)) ;;; Generated autoloads from net/tramp-ftp.el (autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\ @@ -28148,8 +28220,8 @@ Discard Tramp from loading remote files. ;;;*** -;;;### (autoloads nil "tutorial" "tutorial.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "tutorial" "tutorial.el" (21604 48550 417934 +;;;;;; 229000)) ;;; Generated autoloads from tutorial.el (autoload 'help-with-tutorial "tutorial" "\ @@ -28173,8 +28245,8 @@ resumed later. ;;;*** -;;;### (autoloads nil "tv-util" "language/tv-util.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "tv-util" "language/tv-util.el" (21604 48550 +;;;;;; 157934 220000)) ;;; Generated autoloads from language/tv-util.el (autoload 'tai-viet-composition-function "tv-util" "\ @@ -28184,8 +28256,8 @@ resumed later. ;;;*** -;;;### (autoloads nil "two-column" "textmodes/two-column.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "two-column" "textmodes/two-column.el" (21604 +;;;;;; 48550 413934 229000)) ;;; Generated autoloads from textmodes/two-column.el (autoload '2C-command "two-column" () t 'keymap) (global-set-key "\C-x6" '2C-command) @@ -28232,8 +28304,8 @@ First column's text sSs Second column's text ;;;*** -;;;### (autoloads nil "type-break" "type-break.el" (21609 55608 852266 -;;;;;; 580000)) +;;;### (autoloads nil "type-break" "type-break.el" (21631 35966 919121 +;;;;;; 870000)) ;;; Generated autoloads from type-break.el (defvar type-break-mode nil "\ @@ -28365,7 +28437,7 @@ FRAC should be the inverse of the fractional value; for example, a value of ;;;*** -;;;### (autoloads nil "uce" "mail/uce.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "uce" "mail/uce.el" (21604 48550 189934 221000)) ;;; Generated autoloads from mail/uce.el (autoload 'uce-reply-to-uce "uce" "\ @@ -28379,7 +28451,7 @@ You might need to set `uce-mail-reader' before using this. ;;;*** ;;;### (autoloads nil "ucs-normalize" "international/ucs-normalize.el" -;;;;;; (21607 54478 300138 641000)) +;;;;;; (21604 48550 141934 219000)) ;;; Generated autoloads from international/ucs-normalize.el (autoload 'ucs-normalize-NFD-region "ucs-normalize" "\ @@ -28444,8 +28516,8 @@ Normalize the string STR by the Unicode NFC and Mac OS's HFS Plus. ;;;*** -;;;### (autoloads nil "underline" "textmodes/underline.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "underline" "textmodes/underline.el" (21604 +;;;;;; 48550 413934 229000)) ;;; Generated autoloads from textmodes/underline.el (autoload 'underline-region "underline" "\ @@ -28465,8 +28537,8 @@ which specify the range to operate on. ;;;*** -;;;### (autoloads nil "unrmail" "mail/unrmail.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "unrmail" "mail/unrmail.el" (21604 48550 189934 +;;;;;; 221000)) ;;; Generated autoloads from mail/unrmail.el (autoload 'batch-unrmail "unrmail" "\ @@ -28486,8 +28558,8 @@ The variable `unrmail-mbox-format' controls which mbox format to use. ;;;*** -;;;### (autoloads nil "unsafep" "emacs-lisp/unsafep.el" (21607 54477 -;;;;;; 800124 118000)) +;;;### (autoloads nil "unsafep" "emacs-lisp/unsafep.el" (21604 48550 +;;;;;; 25934 215000)) ;;; Generated autoloads from emacs-lisp/unsafep.el (autoload 'unsafep "unsafep" "\ @@ -28499,7 +28571,7 @@ UNSAFEP-VARS is a list of symbols with local bindings. ;;;*** -;;;### (autoloads nil "url" "url/url.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "url" "url/url.el" (21604 48550 421934 229000)) ;;; Generated autoloads from url/url.el (autoload 'url-retrieve "url" "\ @@ -28546,8 +28618,8 @@ no further processing). URL is either a string or a parsed URL. ;;;*** -;;;### (autoloads nil "url-auth" "url/url-auth.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-auth" "url/url-auth.el" (21604 48550 417934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-auth.el (autoload 'url-get-authentication "url-auth" "\ @@ -28588,8 +28660,8 @@ RATING a rating between 1 and 10 of the strength of the authentication. ;;;*** -;;;### (autoloads nil "url-cache" "url/url-cache.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "url-cache" "url/url-cache.el" (21604 48550 +;;;;;; 417934 229000)) ;;; Generated autoloads from url/url-cache.el (autoload 'url-store-in-cache "url-cache" "\ @@ -28610,8 +28682,8 @@ Extract FNAM from the local disk cache. ;;;*** -;;;### (autoloads nil "url-cid" "url/url-cid.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-cid" "url/url-cid.el" (21604 48550 417934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-cid.el (autoload 'url-cid "url-cid" "\ @@ -28621,8 +28693,8 @@ Extract FNAM from the local disk cache. ;;;*** -;;;### (autoloads nil "url-dav" "url/url-dav.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-dav" "url/url-dav.el" (21637 50476 683217 +;;;;;; 122000)) ;;; Generated autoloads from url/url-dav.el (autoload 'url-dav-supported-p "url-dav" "\ @@ -28656,8 +28728,8 @@ added to this list, so most requests can just pass in nil. ;;;*** -;;;### (autoloads nil "url-file" "url/url-file.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-file" "url/url-file.el" (21604 48550 417934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-file.el (autoload 'url-file "url-file" "\ @@ -28667,8 +28739,8 @@ Handle file: and ftp: URLs. ;;;*** -;;;### (autoloads nil "url-gw" "url/url-gw.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-gw" "url/url-gw.el" (21604 48550 417934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-gw.el (autoload 'url-gateway-nslookup-host "url-gw" "\ @@ -28689,8 +28761,8 @@ overriding the value of `url-gateway-method'. ;;;*** -;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21604 +;;;;;; 48550 417934 229000)) ;;; Generated autoloads from url/url-handlers.el (defvar url-handler-mode nil "\ @@ -28744,8 +28816,8 @@ accessible. ;;;*** -;;;### (autoloads nil "url-http" "url/url-http.el" (21619 5051 260148 -;;;;;; 536000)) +;;;### (autoloads nil "url-http" "url/url-http.el" (21640 32530 998334 +;;;;;; 458000)) ;;; Generated autoloads from url/url-http.el (autoload 'url-default-expander "url-expand") @@ -28757,8 +28829,8 @@ accessible. ;;;*** -;;;### (autoloads nil "url-irc" "url/url-irc.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-irc" "url/url-irc.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-irc.el (autoload 'url-irc "url-irc" "\ @@ -28768,8 +28840,8 @@ accessible. ;;;*** -;;;### (autoloads nil "url-ldap" "url/url-ldap.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-ldap" "url/url-ldap.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-ldap.el (autoload 'url-ldap "url-ldap" "\ @@ -28782,8 +28854,8 @@ URL can be a URL string, or a URL vector of the type returned by ;;;*** -;;;### (autoloads nil "url-mailto" "url/url-mailto.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "url-mailto" "url/url-mailto.el" (21604 48550 +;;;;;; 421934 229000)) ;;; Generated autoloads from url/url-mailto.el (autoload 'url-mail "url-mailto" "\ @@ -28798,8 +28870,8 @@ Handle the mailto: URL syntax. ;;;*** -;;;### (autoloads nil "url-misc" "url/url-misc.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-misc" "url/url-misc.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-misc.el (autoload 'url-man "url-misc" "\ @@ -28830,8 +28902,8 @@ Fetch a data URL (RFC 2397). ;;;*** -;;;### (autoloads nil "url-news" "url/url-news.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-news" "url/url-news.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-news.el (autoload 'url-news "url-news" "\ @@ -28846,8 +28918,8 @@ Fetch a data URL (RFC 2397). ;;;*** -;;;### (autoloads nil "url-ns" "url/url-ns.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-ns" "url/url-ns.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-ns.el (autoload 'isPlainHostName "url-ns" "\ @@ -28887,8 +28959,8 @@ Fetch a data URL (RFC 2397). ;;;*** -;;;### (autoloads nil "url-parse" "url/url-parse.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "url-parse" "url/url-parse.el" (21604 48550 +;;;;;; 421934 229000)) ;;; Generated autoloads from url/url-parse.el (autoload 'url-recreate-url "url-parse" "\ @@ -28939,8 +29011,8 @@ parses to ;;;*** -;;;### (autoloads nil "url-privacy" "url/url-privacy.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "url-privacy" "url/url-privacy.el" (21604 48550 +;;;;;; 421934 229000)) ;;; Generated autoloads from url/url-privacy.el (autoload 'url-setup-privacy-info "url-privacy" "\ @@ -28950,8 +29022,8 @@ Setup variables that expose info about you and your system. ;;;*** -;;;### (autoloads nil "url-queue" "url/url-queue.el" (21619 5051 -;;;;;; 260148 536000)) +;;;### (autoloads nil "url-queue" "url/url-queue.el" (21631 35966 +;;;;;; 919121 870000)) ;;; Generated autoloads from url/url-queue.el (autoload 'url-queue-retrieve "url-queue" "\ @@ -28965,8 +29037,8 @@ The variable `url-queue-timeout' sets a timeout. ;;;*** -;;;### (autoloads nil "url-tramp" "url/url-tramp.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "url-tramp" "url/url-tramp.el" (21604 48550 +;;;;;; 421934 229000)) ;;; Generated autoloads from url/url-tramp.el (defvar url-tramp-protocols '("ftp" "ssh" "scp" "rsync" "telnet") "\ @@ -28984,8 +29056,8 @@ would have been passed to OPERATION. ;;;*** -;;;### (autoloads nil "url-util" "url/url-util.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "url-util" "url/url-util.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from url/url-util.el (defvar url-debug nil "\ @@ -29153,8 +29225,8 @@ This uses `url-current-object', set locally to the buffer. ;;;*** -;;;### (autoloads nil "userlock" "userlock.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "userlock" "userlock.el" (21604 48550 421934 +;;;;;; 229000)) ;;; Generated autoloads from userlock.el (autoload 'ask-user-about-lock "userlock" "\ @@ -29182,8 +29254,8 @@ The buffer in question is current when this function is called. ;;;*** -;;;### (autoloads nil "utf-7" "international/utf-7.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "utf-7" "international/utf-7.el" (21604 48550 +;;;;;; 141934 219000)) ;;; Generated autoloads from international/utf-7.el (autoload 'utf-7-post-read-conversion "utf-7" "\ @@ -29208,7 +29280,7 @@ The buffer in question is current when this function is called. ;;;*** -;;;### (autoloads nil "utf7" "gnus/utf7.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "utf7" "gnus/utf7.el" (21604 48550 121934 218000)) ;;; Generated autoloads from gnus/utf7.el (autoload 'utf7-encode "utf7" "\ @@ -29218,8 +29290,8 @@ Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil. ;;;*** -;;;### (autoloads nil "uudecode" "mail/uudecode.el" (21607 54478 -;;;;;; 300138 641000)) +;;;### (autoloads nil "uudecode" "mail/uudecode.el" (21604 48550 +;;;;;; 189934 221000)) ;;; Generated autoloads from mail/uudecode.el (autoload 'uudecode-decode-region-external "uudecode" "\ @@ -29243,7 +29315,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;*** -;;;### (autoloads nil "vc" "vc/vc.el" (21628 45530 160140 360000)) +;;;### (autoloads nil "vc" "vc/vc.el" (21649 1806 157181 933000)) ;;; Generated autoloads from vc/vc.el (defvar vc-checkout-hook nil "\ @@ -29282,8 +29354,7 @@ For old-style locking-based version control systems, like RCS: If every file is registered and unlocked, check out (lock) the file(s) for editing. If every file is locked by you and has changes, pop up a - *vc-log* buffer to check in the changes. If the variable - `vc-keep-workfiles' is non-nil (the default), leave a + *vc-log* buffer to check in the changes. Leave a read-only copy of each changed file after checking in. If every file is locked by you and unchanged, unlock them. If every file is locked by someone else, offer to steal the lock. @@ -29453,13 +29524,6 @@ to the working revision (except for keyword expansion). \(fn)" t nil) -(autoload 'vc-rollback "vc" "\ -Roll back (remove) the most recent changeset committed to the repository. -This may be either a file-level or a repository-level operation, -depending on the underlying version-control system. - -\(fn)" t nil) - (define-obsolete-function-alias 'vc-revert-buffer 'vc-revert "23.1") (autoload 'vc-pull "vc" "\ @@ -29538,8 +29602,8 @@ Return the branch part of a revision number REV. ;;;*** -;;;### (autoloads nil "vc-annotate" "vc/vc-annotate.el" (21607 54478 -;;;;;; 800121 42000)) +;;;### (autoloads nil "vc-annotate" "vc/vc-annotate.el" (21604 48550 +;;;;;; 433934 230000)) ;;; Generated autoloads from vc/vc-annotate.el (autoload 'vc-annotate "vc-annotate" "\ @@ -29578,19 +29642,8 @@ should be applied to the background or to the foreground. ;;;*** -;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (21628 43483 380149 -;;;;;; 771000)) -;;; Generated autoloads from vc/vc-arch.el - (defun vc-arch-registered (file) - (if (vc-find-root file "{arch}/=tagging-method") - (progn - (load "vc-arch" nil t) - (vc-arch-registered file)))) - -;;;*** - -;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21645 25875 825189 +;;;;;; 881000)) ;;; Generated autoloads from vc/vc-bzr.el (defconst vc-bzr-admin-dirname ".bzr" "\ @@ -29606,8 +29659,8 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (21645 25875 825189 +;;;;;; 881000)) ;;; Generated autoloads from vc/vc-cvs.el (defun vc-cvs-registered (f) "Return non-nil if file F is registered with CVS." @@ -29618,8 +29671,8 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21645 25761 817186 +;;;;;; 828000)) ;;; Generated autoloads from vc/vc-dir.el (autoload 'vc-dir "vc-dir" "\ @@ -29643,8 +29696,8 @@ These are the commands available for use in the file status buffer: ;;;*** -;;;### (autoloads nil "vc-dispatcher" "vc/vc-dispatcher.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "vc-dispatcher" "vc/vc-dispatcher.el" (21645 +;;;;;; 25761 817186 828000)) ;;; Generated autoloads from vc/vc-dispatcher.el (autoload 'vc-do-command "vc-dispatcher" "\ @@ -29667,8 +29720,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21628 45530 160140 -;;;;;; 360000)) +;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21649 1521 25174 297000)) ;;; Generated autoloads from vc/vc-git.el (defun vc-git-registered (file) "Return non-nil if FILE is registered with git." @@ -29679,7 +29731,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21628 43483 380149 771000)) +;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21645 25875 841189 882000)) ;;; Generated autoloads from vc/vc-hg.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." @@ -29690,8 +29742,8 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (21645 25875 841189 +;;;;;; 882000)) ;;; Generated autoloads from vc/vc-mtn.el (defconst vc-mtn-admin-dir "_MTN" "\ @@ -29707,8 +29759,8 @@ Name of the monotone directory's format file.") ;;;*** -;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21645 25875 841189 +;;;;;; 882000)) ;;; Generated autoloads from vc/vc-rcs.el (defvar vc-rcs-master-templates (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\ @@ -29721,8 +29773,8 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** -;;;### (autoloads nil "vc-sccs" "vc/vc-sccs.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-sccs" "vc/vc-sccs.el" (21645 25875 837189 +;;;;;; 882000)) ;;; Generated autoloads from vc/vc-sccs.el (defvar vc-sccs-master-templates (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\ @@ -29740,8 +29792,8 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** -;;;### (autoloads nil "vc-src" "vc/vc-src.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-src" "vc/vc-src.el" (21645 25875 837189 +;;;;;; 882000)) ;;; Generated autoloads from vc/vc-src.el (defvar vc-src-master-templates (purecopy '("%s.src/%s,v")) "\ @@ -29754,8 +29806,8 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** -;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21628 43483 380149 -;;;;;; 771000)) +;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21650 56624 523745 +;;;;;; 975000)) ;;; Generated autoloads from vc/vc-svn.el (defun vc-svn-registered (f) (let ((admin-dir (cond ((and (eq system-type 'windows-nt) @@ -29768,8 +29820,8 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** -;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (21604 +;;;;;; 48550 361934 227000)) ;;; Generated autoloads from progmodes/vera-mode.el (push (purecopy '(vera-mode 2 28)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode)) @@ -29828,7 +29880,7 @@ Key bindings: ;;;*** ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el" -;;;;;; (21607 54478 800121 42000)) +;;;;;; (21645 25761 813186 828000)) ;;; Generated autoloads from progmodes/verilog-mode.el (autoload 'verilog-mode "verilog-mode" "\ @@ -29967,8 +30019,8 @@ Key bindings specific to `verilog-mode-map' are: ;;;*** -;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21640 +;;;;;; 32530 994334 458000)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload 'vhdl-mode "vhdl-mode" "\ @@ -30522,8 +30574,8 @@ Key bindings: ;;;*** -;;;### (autoloads nil "viet-util" "language/viet-util.el" (21607 -;;;;;; 54478 300138 641000)) +;;;### (autoloads nil "viet-util" "language/viet-util.el" (21604 +;;;;;; 48550 157934 220000)) ;;; Generated autoloads from language/viet-util.el (autoload 'viet-encode-viscii-char "viet-util" "\ @@ -30567,7 +30619,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics. ;;;*** -;;;### (autoloads nil "view" "view.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "view" "view.el" (21604 48550 437934 230000)) ;;; Generated autoloads from view.el (defvar view-remove-frame-by-deleting t "\ @@ -30823,8 +30875,8 @@ Exit View mode and make the current buffer editable. ;;;*** -;;;### (autoloads nil "viper" "emulation/viper.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "viper" "emulation/viper.el" (21604 48550 33934 +;;;;;; 215000)) ;;; Generated autoloads from emulation/viper.el (push (purecopy '(viper 3 14 1)) package--builtin-versions) @@ -30841,8 +30893,8 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'. ;;;*** -;;;### (autoloads nil "warnings" "emacs-lisp/warnings.el" (21607 -;;;;;; 54477 800124 118000)) +;;;### (autoloads nil "warnings" "emacs-lisp/warnings.el" (21604 +;;;;;; 48550 25934 215000)) ;;; Generated autoloads from emacs-lisp/warnings.el (defvar warning-prefix-function nil "\ @@ -30932,7 +30984,7 @@ this is equivalent to `display-warning', using ;;;*** -;;;### (autoloads nil "wdired" "wdired.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "wdired" "wdired.el" (21604 48550 441934 230000)) ;;; Generated autoloads from wdired.el (push (purecopy '(wdired 2 0)) package--builtin-versions) @@ -30950,8 +31002,8 @@ See `wdired-mode'. ;;;*** -;;;### (autoloads nil "webjump" "net/webjump.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "webjump" "net/webjump.el" (21604 48550 233934 +;;;;;; 222000)) ;;; Generated autoloads from net/webjump.el (autoload 'webjump "webjump" "\ @@ -30967,8 +31019,8 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ;;;*** -;;;### (autoloads nil "which-func" "progmodes/which-func.el" (21607 -;;;;;; 54478 800121 42000)) +;;;### (autoloads nil "which-func" "progmodes/which-func.el" (21604 +;;;;;; 48550 365934 227000)) ;;; Generated autoloads from progmodes/which-func.el (put 'which-func-format 'risky-local-variable t) (put 'which-func-current 'risky-local-variable t) @@ -30998,8 +31050,8 @@ in certain major modes. ;;;*** -;;;### (autoloads nil "whitespace" "whitespace.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "whitespace" "whitespace.el" (21631 35966 927121 +;;;;;; 870000)) ;;; Generated autoloads from whitespace.el (push (purecopy '(whitespace 13 2 2)) package--builtin-versions) @@ -31367,8 +31419,8 @@ cleaning up these problems. ;;;*** -;;;### (autoloads nil "wid-browse" "wid-browse.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "wid-browse" "wid-browse.el" (21604 48550 441934 +;;;;;; 230000)) ;;; Generated autoloads from wid-browse.el (autoload 'widget-browse-at "wid-browse" "\ @@ -31396,8 +31448,8 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "wid-edit" "wid-edit.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "wid-edit" "wid-edit.el" (21637 50476 687217 +;;;;;; 122000)) ;;; Generated autoloads from wid-edit.el (autoload 'widgetp "wid-edit" "\ @@ -31439,8 +31491,8 @@ Setup current buffer so editing string widgets works. ;;;*** -;;;### (autoloads nil "windmove" "windmove.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "windmove" "windmove.el" (21604 48550 441934 +;;;;;; 230000)) ;;; Generated autoloads from windmove.el (autoload 'windmove-left "windmove" "\ @@ -31492,7 +31544,7 @@ Default MODIFIER is 'shift. ;;;*** -;;;### (autoloads nil "winner" "winner.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "winner" "winner.el" (21604 48550 445934 230000)) ;;; Generated autoloads from winner.el (defvar winner-mode nil "\ @@ -31515,7 +31567,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. ;;;*** -;;;### (autoloads nil "woman" "woman.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "woman" "woman.el" (21604 48550 445934 230000)) ;;; Generated autoloads from woman.el (push (purecopy '(woman 0 551)) package--builtin-versions) @@ -31564,7 +31616,7 @@ Default bookmark handler for Woman buffers. ;;;*** -;;;### (autoloads nil "xml" "xml.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "xml" "xml.el" (21604 48550 445934 230000)) ;;; Generated autoloads from xml.el (autoload 'xml-parse-file "xml" "\ @@ -31620,8 +31672,8 @@ Both features can be combined by providing a cons cell ;;;*** -;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (21607 54478 300138 -;;;;;; 641000)) +;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (21604 48550 241934 +;;;;;; 223000)) ;;; Generated autoloads from nxml/xmltok.el (autoload 'xmltok-get-declared-encoding-position "xmltok" "\ @@ -31639,8 +31691,52 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT. ;;;*** -;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21607 54478 800121 -;;;;;; 42000)) +;;;### (autoloads nil "xref" "progmodes/xref.el" (21660 28432 372929 +;;;;;; 801000)) +;;; Generated autoloads from progmodes/xref.el + +(autoload 'xref-pop-marker-stack "xref" "\ +Pop back to where \\[xref-find-definitions] was last invoked. + +\(fn)" t nil) + +(autoload 'xref-find-definitions "xref" "\ +Find the definition of the identifier at point. +With prefix argument, prompt for the identifier. + +\(fn IDENTIFIER)" t nil) + +(autoload 'xref-find-definitions-other-window "xref" "\ +Like `xref-find-definitions' but switch to the other window. + +\(fn IDENTIFIER)" t nil) + +(autoload 'xref-find-definitions-other-frame "xref" "\ +Like `xref-find-definitions' but switch to the other frame. + +\(fn IDENTIFIER)" t nil) + +(autoload 'xref-find-references "xref" "\ +Find references to the identifier at point. +With prefix argument, prompt for the identifier. + +\(fn IDENTIFIER)" t nil) + +(autoload 'xref-find-apropos "xref" "\ +Find all meaningful symbols that match PATTERN. +The argument has the same meaning as in `apropos'. + +\(fn PATTERN)" t nil) + (define-key esc-map "." #'xref-find-definitions) + (define-key esc-map "," #'xref-pop-marker-stack) + (define-key esc-map [?\C-.] #'xref-find-apropos) + (define-key ctl-x-4-map "." #'xref-find-definitions-other-window) + (define-key ctl-x-5-map "." #'xref-find-definitions-other-frame) + +;;;*** + +;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21604 48550 445934 +;;;;;; 230000)) ;;; Generated autoloads from xt-mouse.el (defvar xterm-mouse-mode nil "\ @@ -31669,7 +31765,7 @@ down the SHIFT key while pressing the mouse button. ;;;*** -;;;### (autoloads nil "yenc" "gnus/yenc.el" (21607 54478 300138 641000)) +;;;### (autoloads nil "yenc" "gnus/yenc.el" (21604 48550 121934 218000)) ;;; Generated autoloads from gnus/yenc.el (autoload 'yenc-decode-region "yenc" "\ @@ -31684,7 +31780,7 @@ Extract file name from an yenc header. ;;;*** -;;;### (autoloads nil "zone" "play/zone.el" (21607 54478 800121 42000)) +;;;### (autoloads nil "zone" "play/zone.el" (21604 48550 309934 225000)) ;;; Generated autoloads from play/zone.el (autoload 'zone "zone" "\ @@ -31730,9 +31826,11 @@ Zone out, completely. ;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el" ;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el" ;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el" -;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" +;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el" +;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" ;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el" -;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm.el" +;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el" +;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el" ;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" ;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el" ;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" @@ -31755,38 +31853,41 @@ Zone out, completely. ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" -;;;;;; "cedet/semantic/wisent/python.el" "cedet/semantic/wisent/wisent.el" -;;;;;; "cedet/srecode/args.el" "cedet/srecode/compile.el" "cedet/srecode/cpp.el" -;;;;;; "cedet/srecode/ctxt.el" "cedet/srecode/dictionary.el" "cedet/srecode/document.el" +;;;;;; "cedet/semantic/wisent/javat-wy.el" "cedet/semantic/wisent/js-wy.el" +;;;;;; "cedet/semantic/wisent/python-wy.el" "cedet/semantic/wisent/python.el" +;;;;;; "cedet/semantic/wisent/wisent.el" "cedet/srecode/args.el" +;;;;;; "cedet/srecode/compile.el" "cedet/srecode/cpp.el" "cedet/srecode/ctxt.el" +;;;;;; "cedet/srecode/dictionary.el" "cedet/srecode/document.el" ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" ;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" -;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" -;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" -;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dom.el" "dos-fns.el" -;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/avl-tree.el" -;;;;;; "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" -;;;;;; "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" -;;;;;; "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-custom.el" -;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el" -;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" -;;;;;; "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" -;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/edt-lk201.el" -;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el" -;;;;;; "emulation/viper-cmd.el" "emulation/viper-ex.el" "emulation/viper-init.el" -;;;;;; "emulation/viper-keym.el" "emulation/viper-macs.el" "emulation/viper-mous.el" -;;;;;; "emulation/viper-util.el" "erc/erc-backend.el" "erc/erc-goodies.el" -;;;;;; "erc/erc-ibuffer.el" "erc/erc-lang.el" "eshell/em-alias.el" -;;;;;; "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el" -;;;;;; "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el" -;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el" -;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el" -;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" -;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" -;;;;;; "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el" -;;;;;; "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "format-spec.el" +;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" +;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el" +;;;;;; "cus-dep.el" "cus-load.el" "dframe.el" "dired-aux.el" "dired-x.el" +;;;;;; "dom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el" "dynamic-setting.el" +;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" +;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" +;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" +;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el" +;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el" +;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el" +;;;;;; "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" +;;;;;; "emulation/cua-gmrk.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el" +;;;;;; "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" +;;;;;; "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el" +;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" +;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" +;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" +;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" +;;;;;; "eshell/em-tramp.el" "eshell/em-unix.el" "eshell/em-xtra.el" +;;;;;; "eshell/esh-arg.el" "eshell/esh-cmd.el" "eshell/esh-ext.el" +;;;;;; "eshell/esh-groups.el" "eshell/esh-io.el" "eshell/esh-module.el" +;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el" +;;;;;; "eshell/esh-var.el" "ezimage.el" "finder-inf.el" "format-spec.el" ;;;;;; "fringe.el" "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" ;;;;;; "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cloud.el" ;;;;;; "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-dup.el" @@ -31810,28 +31911,42 @@ Zone out, completely. ;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" ;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el" ;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" -;;;;;; "international/ja-dic-utl.el" "international/ogonek.el" "kermit.el" -;;;;;; "language/hanja-util.el" "language/thai-word.el" "ldefs-boot.el" -;;;;;; "leim/quail/arabic.el" "leim/quail/croatian.el" "leim/quail/cyril-jis.el" -;;;;;; "leim/quail/cyrillic.el" "leim/quail/czech.el" "leim/quail/ethiopic.el" -;;;;;; "leim/quail/georgian.el" "leim/quail/greek.el" "leim/quail/hanja-jis.el" -;;;;;; "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el" -;;;;;; "leim/quail/indian.el" "leim/quail/ipa-praat.el" "leim/quail/ipa.el" -;;;;;; "leim/quail/japanese.el" "leim/quail/lao.el" "leim/quail/latin-alt.el" -;;;;;; "leim/quail/latin-ltx.el" "leim/quail/latin-post.el" "leim/quail/latin-pre.el" -;;;;;; "leim/quail/lrt.el" "leim/quail/persian.el" "leim/quail/py-punct.el" -;;;;;; "leim/quail/pypunct-b5.el" "leim/quail/rfc1345.el" "leim/quail/sgml-input.el" +;;;;;; "international/ja-dic-utl.el" "international/ogonek.el" "international/uni-bidi.el" +;;;;;; "international/uni-brackets.el" "international/uni-category.el" +;;;;;; "international/uni-combining.el" "international/uni-comment.el" +;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el" +;;;;;; "international/uni-digit.el" "international/uni-lowercase.el" +;;;;;; "international/uni-mirrored.el" "international/uni-name.el" +;;;;;; "international/uni-numeric.el" "international/uni-old-name.el" +;;;;;; "international/uni-titlecase.el" "international/uni-uppercase.el" +;;;;;; "kermit.el" "language/hanja-util.el" "language/thai-word.el" +;;;;;; "ldefs-boot.el" "leim/ja-dic/ja-dic.el" "leim/quail/4Corner.el" +;;;;;; "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el" "leim/quail/CTLau-b5.el" +;;;;;; "leim/quail/CTLau.el" "leim/quail/ECDICT.el" "leim/quail/ETZY.el" +;;;;;; "leim/quail/PY-b5.el" "leim/quail/PY.el" "leim/quail/Punct-b5.el" +;;;;;; "leim/quail/Punct.el" "leim/quail/QJ-b5.el" "leim/quail/QJ.el" +;;;;;; "leim/quail/SW.el" "leim/quail/TONEPY.el" "leim/quail/ZIRANMA.el" +;;;;;; "leim/quail/ZOZY.el" "leim/quail/arabic.el" "leim/quail/croatian.el" +;;;;;; "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" "leim/quail/czech.el" +;;;;;; "leim/quail/ethiopic.el" "leim/quail/georgian.el" "leim/quail/greek.el" +;;;;;; "leim/quail/hanja-jis.el" "leim/quail/hanja.el" "leim/quail/hanja3.el" +;;;;;; "leim/quail/hebrew.el" "leim/quail/indian.el" "leim/quail/ipa-praat.el" +;;;;;; "leim/quail/ipa.el" "leim/quail/japanese.el" "leim/quail/lao.el" +;;;;;; "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el" "leim/quail/latin-post.el" +;;;;;; "leim/quail/latin-pre.el" "leim/quail/lrt.el" "leim/quail/persian.el" +;;;;;; "leim/quail/py-punct.el" "leim/quail/pypunct-b5.el" "leim/quail/quick-b5.el" +;;;;;; "leim/quail/quick-cns.el" "leim/quail/rfc1345.el" "leim/quail/sgml-input.el" ;;;;;; "leim/quail/sisheng.el" "leim/quail/slovak.el" "leim/quail/symbol-ksc.el" -;;;;;; "leim/quail/thai.el" "leim/quail/tibetan.el" "leim/quail/viqr.el" -;;;;;; "leim/quail/vntelex.el" "leim/quail/vnvni.el" "leim/quail/welsh.el" -;;;;;; "loadup.el" "mail/blessmail.el" "mail/mailheader.el" "mail/mspools.el" -;;;;;; "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el" -;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el" -;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el" -;;;;;; "mail/undigest.el" "mh-e/mh-acros.el" "mh-e/mh-alias.el" -;;;;;; "mh-e/mh-buffers.el" "mh-e/mh-compat.el" "mh-e/mh-funcs.el" -;;;;;; "mh-e/mh-gnus.el" "mh-e/mh-identity.el" "mh-e/mh-inc.el" -;;;;;; "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el" +;;;;;; "leim/quail/thai.el" "leim/quail/tibetan.el" "leim/quail/tsang-b5.el" +;;;;;; "leim/quail/tsang-cns.el" "leim/quail/viqr.el" "leim/quail/vntelex.el" +;;;;;; "leim/quail/vnvni.el" "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el" +;;;;;; "mail/mailheader.el" "mail/mspools.el" "mail/rfc2368.el" +;;;;;; "mail/rfc822.el" "mail/rmail-spam-filter.el" "mail/rmailedit.el" +;;;;;; "mail/rmailkwd.el" "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el" +;;;;;; "mail/rmailsum.el" "mail/undigest.el" "mh-e/mh-acros.el" +;;;;;; "mh-e/mh-alias.el" "mh-e/mh-buffers.el" "mh-e/mh-compat.el" +;;;;;; "mh-e/mh-funcs.el" "mh-e/mh-gnus.el" "mh-e/mh-identity.el" +;;;;;; "mh-e/mh-inc.el" "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el" ;;;;;; "mh-e/mh-loaddefs.el" "mh-e/mh-mime.el" "mh-e/mh-print.el" ;;;;;; "mh-e/mh-scan.el" "mh-e/mh-search.el" "mh-e/mh-seq.el" "mh-e/mh-show.el" ;;;;;; "mh-e/mh-speed.el" "mh-e/mh-thread.el" "mh-e/mh-tool-bar.el" @@ -31900,8 +32015,8 @@ Zone out, completely. ;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" ;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" ;;;;;; "vc/vc-filewise.el" "vcursor.el" "vt-control.el" "vt100-led.el" -;;;;;; "w32-fns.el" "w32-vars.el" "x-dnd.el") (21628 46363 926675 -;;;;;; 999000)) +;;;;;; "w32-fns.el" "w32-vars.el" "x-dnd.el") (21660 28703 181624 +;;;;;; 391000)) ;;;*** commit 394ce9514f0f0b473e4e8974b8529d0389fb627e Author: Dmitry Gutov Date: Thu Dec 25 22:08:19 2014 +0200 Consolidate cross-referencing commands Move autoloaded bindings for `M-.', `M-,', `C-x 4 .' and `C-x 5 .' from etags.el to xref.el. * progmodes/xref.el: New file. * progmodes/elisp-mode.el (elisp--identifier-types): New variable. (elisp--identifier-location): New function, extracted from `elisp--company-location'. (elisp--company-location): Use it. (elisp--identifier-completion-table): New variable. (elisp-completion-at-point): Use it. (emacs-lisp-mode): Set the local values of `xref-find-function' and `xref-identifier-completion-table-function'. (elisp-xref-find, elisp--xref-find-definitions) (elisp--xref-identifier-completion-table): New functions. * progmodes/etags.el (find-tag-marker-ring): Mark obsolete in favor of `xref--marker-ring'. (tags-lazy-completion-table): Autoload. (tags-reset-tags-tables): Use `xref-clear-marker-stack'. (find-tag-noselect): Use `xref-push-marker-stack'. (pop-tag-mark): Make an alias for `xref-pop-marker-stack'. (etags--xref-limit): New constant. (etags-xref-find, etags--xref-find-definitions): New functions. diff --git a/etc/NEWS b/etc/NEWS index 16aa297..37806a7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -434,6 +434,25 @@ By default, 32 spaces and four TABs are considered to be too much but `tildify-ignored-environments-alist' variables (as well as a few helper functions) obsolete. +** xref +The new package provides generic framework and new commands to find +and move to definitions, as well as pop back to the original location. + +*** New key bindings +`xref-find-definitions' replaces `find-tag' and provides an interface +to pick one destination among several. Hence, `tags-toop-continue' is +unbound. `xref-pop-marker-stack' replaces `pop-tag-mark', but uses an +easier binding, which is now unoccupied (`M-,'). +`xref-find-definitions-other-window' replaces `find-tag-other-window'. +`xref-find-definitions-other-frame' replaces `find-tag-other-frame'. +`xref-find-apropos' replaces `find-tag-regexp'. + +*** New variables +`find-tag-marker-ring-length' is now an obsolete alias for +`xref-marker-ring-length'. `find-tag-marker-ring' is now an obsolete +alias for a private variable. `xref-push-marker-stack' and +`xref-pop-marker-stack' should be used to mutate it instead. + ** Obsolete packages --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b0f296..a2bee14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,33 @@ +2014-12-25 Helmut Eller + Dmitry Gutov + + Consolidate cross-referencing commands. + + Move autoloaded bindings for `M-.', `M-,', `C-x 4 .' and + `C-x 5 .' from etags.el to xref.el. + + * progmodes/xref.el: New file. + + * progmodes/elisp-mode.el (elisp--identifier-types): New variable. + (elisp--identifier-location): New function, extracted from + `elisp--company-location'. + (elisp--company-location): Use it. + (elisp--identifier-completion-table): New variable. + (elisp-completion-at-point): Use it. + (emacs-lisp-mode): Set the local values of `xref-find-function' + and `xref-identifier-completion-table-function'. + (elisp-xref-find, elisp--xref-find-definitions) + (elisp--xref-identifier-completion-table): New functions. + + * progmodes/etags.el (find-tag-marker-ring): Mark obsolete in + favor of `xref--marker-ring'. + (tags-lazy-completion-table): Autoload. + (tags-reset-tags-tables): Use `xref-clear-marker-stack'. + (find-tag-noselect): Use `xref-push-marker-stack'. + (pop-tag-mark): Make an alias for `xref-pop-marker-stack'. + (etags--xref-limit): New constant. + (etags-xref-find, etags--xref-find-definitions): New functions. + 2014-12-25 Martin Rudalics * cus-start.el (resize-mini-windows): Make it customizable. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ba70f90..e73c20d 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -227,10 +227,15 @@ Blank lines separate paragraphs. Semicolons start comments. \\{emacs-lisp-mode-map}" :group 'lisp + (defvar xref-find-function) + (defvar xref-identifier-completion-table-function) (lisp-mode-variables nil nil 'elisp) (setq imenu-case-fold-search nil) (setq-local eldoc-documentation-function #'elisp-eldoc-documentation-function) + (setq-local xref-find-function #'elisp-xref-find) + (setq-local xref-identifier-completion-table-function + #'elisp--xref-identifier-completion-table) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil 'local)) @@ -414,17 +419,39 @@ It can be quoted, or be inside a quoted form." (declare-function find-library-name "find-func" (library)) +(defvar elisp--identifier-types '(defun defvar feature defface)) + +(defun elisp--identifier-location (type sym) + (pcase (cons type sym) + (`(defun . ,(pred fboundp)) + (find-definition-noselect sym nil)) + (`(defvar . ,(pred boundp)) + (find-definition-noselect sym 'defvar)) + (`(defface . ,(pred facep)) + (find-definition-noselect sym 'defface)) + (`(feature . ,(pred featurep)) + (require 'find-func) + (cons (find-file-noselect (find-library-name + (symbol-name sym))) + 1)))) + (defun elisp--company-location (str) - (let ((sym (intern-soft str))) - (cond - ((fboundp sym) (find-definition-noselect sym nil)) - ((boundp sym) (find-definition-noselect sym 'defvar)) - ((featurep sym) - (require 'find-func) - (cons (find-file-noselect (find-library-name - (symbol-name sym))) - 0)) - ((facep sym) (find-definition-noselect sym 'defface))))) + (catch 'res + (let ((sym (intern-soft str))) + (when sym + (dolist (type elisp--identifier-types) + (let ((loc (elisp--identifier-location type sym))) + (and loc (throw 'res loc)))))))) + +(defvar elisp--identifier-completion-table + (apply-partially #'completion-table-with-predicate + obarray + (lambda (sym) + (or (boundp sym) + (fboundp sym) + (featurep sym) + (symbol-plist sym))) + 'strict)) (defun elisp-completion-at-point () "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." @@ -466,13 +493,8 @@ It can be quoted, or be inside a quoted form." :company-docsig #'elisp--company-doc-string :company-location #'elisp--company-location)) ((elisp--form-quoted-p beg) - (list nil obarray - ;; Don't include all symbols - ;; (bug#16646). - :predicate (lambda (sym) - (or (boundp sym) - (fboundp sym) - (symbol-plist sym))) + ;; Don't include all symbols (bug#16646). + (list nil elisp--identifier-completion-table :annotation-function (lambda (str) (if (fboundp (intern-soft str)) " ")) :company-doc-buffer #'elisp--company-doc-buffer @@ -548,6 +570,38 @@ It can be quoted, or be inside a quoted form." (define-obsolete-function-alias 'lisp-completion-at-point 'elisp-completion-at-point "25.1") +;;; Xref backend + +(declare-function xref-make-buffer-location "xref" (buffer position)) +(declare-function xref-make-bogus-location "xref" (message)) +(declare-function xref-make "xref" (description location)) + +(defun elisp-xref-find (action id) + (when (eq action 'definitions) + (let ((sym (intern-soft id))) + (when sym + (remove nil (elisp--xref-find-definitions sym)))))) + +(defun elisp--xref-find-definitions (symbol) + (save-excursion + (mapcar + (lambda (type) + (let ((loc + (condition-case err + (let ((buf-pos (elisp--identifier-location type symbol))) + (when buf-pos + (xref-make-buffer-location (car buf-pos) + (or (cdr buf-pos) 1)))) + (error + (xref-make-bogus-location (error-message-string err)))))) + (when loc + (xref-make (format "(%s %s)" type symbol) + loc)))) + elisp--identifier-types))) + +(defun elisp--xref-identifier-completion-table () + elisp--identifier-completion-table) + ;;; Elisp Interaction mode (defvar lisp-interaction-mode-map diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index b89b4cf..c6a421a 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -28,6 +28,7 @@ (require 'ring) (require 'button) +(require 'xref) ;;;###autoload (defvar tags-file-name nil @@ -141,11 +142,8 @@ Otherwise, `find-tag-default' is used." :group 'etags :type '(choice (const nil) function)) -(defcustom find-tag-marker-ring-length 16 - "Length of marker rings `find-tag-marker-ring' and `tags-location-ring'." - :group 'etags - :type 'integer - :version "20.3") +(define-obsolete-variable-alias 'find-tag-marker-ring-length + 'xref-marker-ring-length "25.1") (defcustom tags-tag-face 'default "Face for tags in the output of `tags-apropos'." @@ -182,15 +180,18 @@ Example value: (sexp :tag "Tags to search"))) :version "21.1") -(defvar find-tag-marker-ring (make-ring find-tag-marker-ring-length) - "Ring of markers which are locations from which \\[find-tag] was invoked.") +(defvaralias 'find-tag-marker-ring 'xref--marker-ring) +(make-obsolete-variable + 'find-tag-marker-ring + "use `xref-push-marker-stack' or `xref-pop-marker-stack' instead." + "25.1") (defvar default-tags-table-function nil "If non-nil, a function to choose a default tags file for a buffer. This function receives no arguments and should return the default tags table file to use for the current buffer.") -(defvar tags-location-ring (make-ring find-tag-marker-ring-length) +(defvar tags-location-ring (make-ring xref-marker-ring-length) "Ring of markers which are locations visited by \\[find-tag]. Pop back to the last location with \\[negative-argument] \\[find-tag].") @@ -713,15 +714,13 @@ Returns t if it visits a tags table, or nil if there are no more in the list." (interactive) ;; Clear out the markers we are throwing away. (let ((i 0)) - (while (< i find-tag-marker-ring-length) + (while (< i xref-marker-ring-length) (if (aref (cddr tags-location-ring) i) (set-marker (aref (cddr tags-location-ring) i) nil)) - (if (aref (cddr find-tag-marker-ring) i) - (set-marker (aref (cddr find-tag-marker-ring) i) nil)) (setq i (1+ i)))) + (xref-clear-marker-stack) (setq tags-file-name nil - tags-location-ring (make-ring find-tag-marker-ring-length) - find-tag-marker-ring (make-ring find-tag-marker-ring-length) + tags-location-ring (make-ring xref-marker-ring-length) tags-table-list nil tags-table-computed-list nil tags-table-computed-list-for nil @@ -780,6 +779,7 @@ tags table and its (recursively) included tags tables." (quit (message "Tags completion table construction aborted.") (setq tags-completion-table nil))))) +;;;###autoload (defun tags-lazy-completion-table () (let ((buf (current-buffer))) (lambda (string pred action) @@ -898,7 +898,7 @@ See documentation of variable `tags-file-name'." ;; Run the user's hook. Do we really want to do this for pop? (run-hooks 'local-find-tag-hook)))) ;; Record whence we came. - (ring-insert find-tag-marker-ring (point-marker)) + (xref-push-marker-stack) (if (and next-p last-tag) ;; Find the same table we last used. (visit-tags-table-buffer 'same) @@ -954,7 +954,6 @@ See documentation of variable `tags-file-name'." (switch-to-buffer buf) (error (pop-to-buffer buf))) (goto-char pos))) -;;;###autoload (define-key esc-map "." 'find-tag) ;;;###autoload (defun find-tag-other-window (tagname &optional next-p regexp-p) @@ -995,7 +994,6 @@ See documentation of variable `tags-file-name'." ;; the window's point from the buffer. (set-window-point (selected-window) tagpoint)) window-point))) -;;;###autoload (define-key ctl-x-4-map "." 'find-tag-other-window) ;;;###autoload (defun find-tag-other-frame (tagname &optional next-p) @@ -1020,7 +1018,6 @@ See documentation of variable `tags-file-name'." (interactive (find-tag-interactive "Find tag other frame: ")) (let ((pop-up-frames t)) (find-tag-other-window tagname next-p))) -;;;###autoload (define-key ctl-x-5-map "." 'find-tag-other-frame) ;;;###autoload (defun find-tag-regexp (regexp &optional next-p other-window) @@ -1044,25 +1041,10 @@ See documentation of variable `tags-file-name'." ;; We go through find-tag-other-window to do all the display hair there. (funcall (if other-window 'find-tag-other-window 'find-tag) regexp next-p t)) -;;;###autoload (define-key esc-map [?\C-.] 'find-tag-regexp) - -;;;###autoload (define-key esc-map "*" 'pop-tag-mark) ;;;###autoload -(defun pop-tag-mark () - "Pop back to where \\[find-tag] was last invoked. +(defalias 'pop-tag-mark 'xref-pop-marker-stack) -This is distinct from invoking \\[find-tag] with a negative argument -since that pops a stack of markers at which tags were found, not from -where they were found." - (interactive) - (if (ring-empty-p find-tag-marker-ring) - (error "No previous locations for find-tag invocation")) - (let ((marker (ring-remove find-tag-marker-ring 0))) - (switch-to-buffer (or (marker-buffer marker) - (error "The marked buffer has been deleted"))) - (goto-char (marker-position marker)) - (set-marker marker nil nil))) (defvar tag-lines-already-matched nil "Matches remembered between calls.") ; Doc string: calls to what? @@ -1859,7 +1841,6 @@ nil, we exit; otherwise we scan the next file." (and messaged (null tags-loop-operate) (message "Scanning file %s...found" buffer-file-name)))) -;;;###autoload (define-key esc-map "," 'tags-loop-continue) ;;;###autoload (defun tags-search (regexp &optional file-list-form) @@ -2077,6 +2058,54 @@ for \\[find-tag] (which see)." (completion-in-region (car comp-data) (cadr comp-data) (nth 2 comp-data) (plist-get (nthcdr 3 comp-data) :predicate))))) + + +;;; Xref backend + +;; Stop searching if we find more than xref-limit matches, as the xref +;; infrastracture is not designed to handle very long lists. +;; Switching to some kind of lazy list might be better, but hopefully +;; we hit the limit rarely. +(defconst etags--xref-limit 1000) + +;;;###autoload +(defun etags-xref-find (action id) + (pcase action + (`definitions (etags--xref-find-definitions id)) + (`apropos (etags--xref-find-definitions id t)))) + +(defun etags--xref-find-definitions (pattern &optional regexp?) + ;; This emulates the behaviour of `find-tag-in-order' but instead of + ;; returning one match at a time all matches are returned as list. + ;; NOTE: find-tag-tag-order is typically a buffer-local variable. + (let* ((xrefs '()) + (first-time t) + (search-fun (if regexp? #'re-search-forward #'search-forward)) + (marks (make-hash-table :test 'equal)) + (case-fold-search (if (memq tags-case-fold-search '(nil t)) + tags-case-fold-search + case-fold-search))) + (save-excursion + (while (visit-tags-table-buffer (not first-time)) + (setq first-time nil) + (dolist (order-fun (cond (regexp? find-tag-regexp-tag-order) + (t find-tag-tag-order))) + (goto-char (point-min)) + (while (and (funcall search-fun pattern nil t) + (< (hash-table-count marks) etags--xref-limit)) + (when (funcall order-fun pattern) + (beginning-of-line) + (cl-destructuring-bind (hint line &rest pos) (etags-snarf-tag) + (unless (eq hint t) ; hint==t if we are in a filename line + (let* ((file (file-of-tag)) + (mark-key (cons file line))) + (unless (gethash mark-key marks) + (let ((loc (xref-make-file-location + (expand-file-name file) line 0))) + (push (xref-make hint loc) xrefs) + (puthash mark-key t marks))))))))))) + (nreverse xrefs))) + (provide 'etags) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el new file mode 100644 index 0000000..30d28ff --- /dev/null +++ b/lisp/progmodes/xref.el @@ -0,0 +1,499 @@ +;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*- + +;; Copyright (C) 2014 Free Software Foundation, Inc. + +;; 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 file provides a somewhat generic infrastructure for cross +;; referencing commands, in particular "find-definition". +;; +;; Some part of the functionality must be implemented in a language +;; dependent way and that's done by defining `xref-find-function', +;; `xref-identifier-at-point-function' and +;; `xref-identifier-completion-table-function', which see. +;; +;; A major mode should make these variables buffer-local first. +;; +;; `xref-find-function' can be called in several ways, see its +;; description. It has to operate with "xref" and "location" values. +;; +;; One would usually call `make-xref' and `xref-make-file-location', +;; `xref-make-buffer-location' or `xref-make-bogus-location' to create +;; them. +;; +;; Each identifier must be represented as a string. Implementers can +;; use string properties to store additional information about the +;; identifier, but they should keep in mind that values returned from +;; `xref-identifier-completion-table-function' should still be +;; distinct, because the user can't see the properties when making the +;; choice. +;; +;; See the functions `etags-xref-find' and `elisp-xref-find' for full +;; examples. + +;;; Code: + +(require 'cl-lib) +(require 'eieio) +(require 'ring) + +(defgroup xref nil "Cross-referencing commands" + :group 'tools) + + +;;; Locations + +(defclass xref-location () () + :documentation "A location represents a position in a file or buffer.") + +;; If a backend decides to subclass xref-location it can provide +;; methods for some of the following functions: +(defgeneric xref-location-marker (location) + "Return the marker for LOCATION.") + +(defgeneric xref-location-group (location) + "Return a string used to group a set of locations. +This is typically the filename.") + +;;;; Commonly needed location classes are defined here: + +;; FIXME: might be useful to have an optional "hint" i.e. a string to +;; search for in case the line number is sightly out of date. +(defclass xref-file-location (xref-location) + ((file :type string :initarg :file) + (line :type fixnum :initarg :line) + (column :type fixnum :initarg :column)) + :documentation "A file location is a file/line/column triple. +Line numbers start from 1 and columns from 0.") + +(defun xref-make-file-location (file line column) + "Create and return a new xref-file-location." + (make-instance 'xref-file-location :file file :line line :column column)) + +(defmethod xref-location-marker ((l xref-file-location)) + (with-slots (file line column) l + (with-current-buffer + (or (get-file-buffer file) + (let ((find-file-suppress-same-file-warnings t)) + (find-file-noselect file))) + (save-restriction + (widen) + (save-excursion + (goto-char (point-min)) + (beginning-of-line line) + (move-to-column column) + (point-marker)))))) + +(defmethod xref-location-group ((l xref-file-location)) + (oref l :file)) + +(defclass xref-buffer-location (xref-location) + ((buffer :type buffer :initarg :buffer) + (position :type fixnum :initarg :position))) + +(defun xref-make-buffer-location (buffer position) + "Create and return a new xref-buffer-location." + (make-instance 'xref-buffer-location :buffer buffer :position position)) + +(defmethod xref-location-marker ((l xref-buffer-location)) + (with-slots (buffer position) l + (let ((m (make-marker))) + (move-marker m position buffer)))) + +(defmethod xref-location-group ((l xref-buffer-location)) + (with-slots (buffer) l + (or (buffer-file-name buffer) + (format "(buffer %s)" (buffer-name buffer))))) + +(defclass xref-bogus-location (xref-location) + ((message :type string :initarg :message + :reader xref-bogus-location-message)) + :documentation "Bogus locations are sometimes useful to +indicate errors, e.g. when we know that a function exists but the +actual location is not known.") + +(defun xref-make-bogus-location (message) + "Create and return a new xref-bogus-location." + (make-instance 'xref-bogus-location :message message)) + +(defmethod xref-location-marker ((l xref-bogus-location)) + (user-error "%s" (oref l :message))) + +(defmethod xref-location-group ((_ xref-bogus-location)) "(No location)") + + +;;; Cross-reference + +(defclass xref--xref () + ((description :type string :initarg :description + :reader xref--xref-description) + (location :type xref-location :initarg :location + :reader xref--xref-location)) + :comment "An xref is used to display and locate constructs like +variables or functions.") + +(defun xref-make (description location) + "Create and return a new xref. +DESCRIPTION is a short string to describe the xref. +LOCATION is an `xref-location'." + (make-instance 'xref--xref :description description :location location)) + + +;;; API + +(declare-function etags-xref-find "etags" (action id)) +(declare-function tags-lazy-completion-table "etags" ()) + +;; For now, make the etags backend the default. +(defvar xref-find-function #'etags-xref-find + "Function to look for cross-references. +It can be called in several ways: + + (definitions IDENTIFIER): Find definitions of IDENTIFIER. The +result must be a list of xref objects. If no definitions can be +found, return nil. + + (references IDENTIFIER): Find references of IDENTIFIER. The +result must be a list of xref objects. If no references can be +found, return nil. + + (apropos PATTERN): Find all symbols that match PATTERN. PATTERN +is a regexp. + +IDENTIFIER can be any string returned by +`xref-identifier-at-point-function', or from the table returned +by `xref-identifier-completion-table-function'. + +To create an xref object, call `xref-make'.") + +(defvar xref-identifier-at-point-function #'xref-default-identifier-at-point + "Function to get the relevant identifier at point. + +The return value must be a string or nil. nil means no +identifier at point found. + +If it's hard to determinte the identifier precisely (e.g. because +it's a method call on unknown type), the implementation can +return a simple string (such as symbol at point) marked with a +special text property which `xref-find-function' would recognize +and then delegate the work to an external process.") + +(defvar xref-identifier-completion-table-function #'tags-lazy-completion-table + "Function that returns the completion table for identifiers.") + +(defun xref-default-identifier-at-point () + (let ((thing (thing-at-point 'symbol))) + (and thing (substring-no-properties thing)))) + + +;;; misc utilities +(defun xref--alistify (list key test) + "Partition the elements of LIST into an alist. +KEY extracts the key from an element and TEST is used to compare +keys." + (let ((alist '())) + (dolist (e list) + (let* ((k (funcall key e)) + (probe (cl-assoc k alist :test test))) + (if probe + (setcdr probe (cons e (cdr probe))) + (push (cons k (list e)) alist)))) + ;; Put them back in order. + (cl-loop for (key . value) in (reverse alist) + collect (cons key (reverse value))))) + +(defun xref--insert-propertized (props &rest strings) + "Insert STRINGS with text properties PROPS." + (let ((start (point))) + (apply #'insert strings) + (add-text-properties start (point) props))) + +(defun xref--search-property (property &optional backward) + "Search the next text range where text property PROPERTY is non-nil. +Return the value of PROPERTY. If BACKWARD is non-nil, search +backward." + (let ((next (if backward + #'previous-single-char-property-change + #'next-single-char-property-change)) + (start (point)) + (value nil)) + (while (progn + (goto-char (funcall next (point) property)) + (not (or (setq value (get-text-property (point) property)) + (eobp) + (bobp))))) + (cond (value) + (t (goto-char start) nil)))) + + +;;; Marker stack (M-. pushes, M-, pops) + +(defcustom xref-marker-ring-length 16 + "Length of the xref marker ring." + :type 'integer + :version "25.1") + +(defvar xref--marker-ring (make-ring xref-marker-ring-length) + "Ring of markers to implement the marker stack.") + +(defun xref-push-marker-stack () + "Add point to the marker stack." + (ring-insert xref--marker-ring (point-marker))) + +;;;###autoload +(defun xref-pop-marker-stack () + "Pop back to where \\[xref-find-definitions] was last invoked." + (interactive) + (let ((ring xref--marker-ring)) + (when (ring-empty-p ring) + (error "Marker stack is empty")) + (let ((marker (ring-remove ring 0))) + (switch-to-buffer (or (marker-buffer marker) + (error "The marked buffer has been deleted"))) + (goto-char (marker-position marker)) + (set-marker marker nil nil)))) + +;; etags.el needs this +(defun xref-clear-marker-stack () + "Discard all markers from the marker stack." + (let ((ring xref--marker-ring)) + (while (not (ring-empty-p ring)) + (let ((marker (ring-remove ring))) + (set-marker marker nil nil))))) + + +(defun xref--goto-location (location) + "Set buffer and point according to xref-location LOCATION." + (let ((marker (xref-location-marker location))) + (set-buffer (marker-buffer marker)) + (cond ((and (<= (point-min) marker) (<= marker (point-max)))) + (widen-automatically (widen)) + (t (error "Location is outside accessible part of buffer"))) + (goto-char marker))) + +(defun xref--pop-to-location (location &optional window) + "Goto xref-location LOCATION and display the buffer. +WINDOW controls how the buffer is displayed: + nil -- switch-to-buffer + 'window -- pop-to-buffer (other window) + 'frame -- pop-to-buffer (other frame)" + (xref--goto-location location) + (cl-ecase window + ((nil) (switch-to-buffer (current-buffer))) + (window (pop-to-buffer (current-buffer) t)) + (frame (let ((pop-up-frames t)) (pop-to-buffer (current-buffer) t))))) + + +;;; XREF buffer (part of the UI) + +;; The xref buffer is used to display a set of xrefs. + +(defun xref--display-position (pos other-window recenter-arg) + ;; show the location, but don't hijack focus. + (with-selected-window (display-buffer (current-buffer) other-window) + (goto-char pos) + (recenter recenter-arg))) + +(defun xref--show-location (location) + (condition-case err + (progn + (xref--goto-location location) + (xref--display-position (point) t 1)) + (user-error (message (error-message-string err))))) + +(defun xref--next-line (backward) + (let ((loc (xref--search-property 'xref-location backward))) + (when loc + (save-window-excursion + (xref--show-location loc) + (sit-for most-positive-fixnum))))) + +(defun xref-next-line () + "Move to the next xref and display its source in the other window." + (interactive) + (xref--next-line nil)) + +(defun xref-prev-line () + "Move to the previous xref and display its source in the other window." + (interactive) + (xref--next-line t)) + +(defun xref--location-at-point () + (or (get-text-property (point) 'xref-location) + (error "No reference at point"))) + +(defvar-local xref--window nil) + +(defun xref-goto-xref () + "Jump to the xref at point and bury the xref buffer." + (interactive) + (let ((loc (xref--location-at-point)) + (window xref--window)) + (quit-window) + (xref--pop-to-location loc window))) + +(define-derived-mode xref--xref-buffer-mode fundamental-mode "XREF" + "Mode for displaying cross-refenences." + (setq buffer-read-only t)) + +(let ((map xref--xref-buffer-mode-map)) + (define-key map (kbd "q") #'quit-window) + (define-key map [remap next-line] #'xref-next-line) + (define-key map [remap previous-line] #'xref-prev-line) + (define-key map (kbd "RET") #'xref-goto-xref) + + ;; suggested by Johan Claesson "to further reduce finger movement": + (define-key map (kbd ".") #'xref-next-line) + (define-key map (kbd ",") #'xref-prev-line)) + +(defconst xref-buffer-name "*xref*" + "The name of the buffer to show xrefs.") + +(defun xref--insert-xrefs (xref-alist) + "Insert XREF-ALIST in the current-buffer. +XREF-ALIST is of the form ((GROUP . (XREF ...)) ...). Where +GROUP is a string for decoration purposes and XREF is an +`xref--xref' object." + (cl-loop for ((group . xrefs) . more1) on xref-alist do + (xref--insert-propertized '(face bold) group "\n") + (cl-loop for (xref . more2) on xrefs do + (insert " ") + (with-slots (description location) xref + (xref--insert-propertized + (list 'xref-location location + 'face 'font-lock-keyword-face) + description)) + (when (or more1 more2) + (insert "\n"))))) + +(defun xref--analyze (xrefs) + "Find common filenames in XREFS. +Return an alist of the form ((FILENAME . (XREF ...)) ...)." + (xref--alistify xrefs + (lambda (x) + (xref-location-group (xref--xref-location x))) + #'equal)) + +(defun xref--show-xref-buffer (xrefs window) + (let ((xref-alist (xref--analyze xrefs))) + (with-current-buffer (get-buffer-create xref-buffer-name) + (let ((inhibit-read-only t)) + (erase-buffer) + (xref--insert-xrefs xref-alist) + (xref--xref-buffer-mode) + (pop-to-buffer (current-buffer)) + (goto-char (point-min)) + (setq xref--window window) + (current-buffer))))) + + +;; This part of the UI seems fairly uncontroversial: it reads the +;; identifier and deals with the single definition case. +;; +;; The controversial multiple definitions case is handed off to +;; xref-show-xrefs-function. + +(defvar xref-show-xrefs-function 'xref--show-xref-buffer + "Function to display a list of xrefs.") + +(defun xref--show-xrefs (id kind xrefs window) + (cond + ((null xrefs) + (error "No known %s for: %s" kind id)) + ((not (cdr xrefs)) + (xref-push-marker-stack) + (xref--pop-to-location (xref--xref-location (car xrefs)) window)) + (t + (xref-push-marker-stack) + (funcall xref-show-xrefs-function xrefs window)))) + +(defun xref--read-identifier (prompt) + "Return the identifier at point or read it from the minibuffer." + (let ((id (funcall xref-identifier-at-point-function))) + (cond ((or current-prefix-arg (not id)) + (completing-read prompt + (funcall xref-identifier-completion-table-function) + nil t id)) + (t id)))) + + +;;; Commands + +(defun xref--find-definitions (id window) + (xref--show-xrefs id "definitions" + (funcall xref-find-function 'definitions id) + window)) + +;;;###autoload +(defun xref-find-definitions (identifier) + "Find the definition of the identifier at point. +With prefix argument, prompt for the identifier." + (interactive (list (xref--read-identifier "Find definitions of: "))) + (xref--find-definitions identifier nil)) + +;;;###autoload +(defun xref-find-definitions-other-window (identifier) + "Like `xref-find-definitions' but switch to the other window." + (interactive (list (xref--read-identifier "Find definitions of: "))) + (xref--find-definitions identifier 'window)) + +;;;###autoload +(defun xref-find-definitions-other-frame (identifier) + "Like `xref-find-definitions' but switch to the other frame." + (interactive (list (xref--read-identifier "Find definitions of: "))) + (xref--find-definitions identifier 'frame)) + +;;;###autoload +(defun xref-find-references (identifier) + "Find references to the identifier at point. +With prefix argument, prompt for the identifier." + (interactive (list (xref--read-identifier "Find references of: "))) + (xref--show-xrefs identifier "references" + (funcall xref-find-function 'references identifier) + nil)) + +;;;###autoload +(defun xref-find-apropos (pattern) + "Find all meaningful symbols that match PATTERN. +The argument has the same meaning as in `apropos'." + (interactive (list (read-from-minibuffer + "Search for pattern (word list or regexp): "))) + (require 'apropos) + (xref--show-xrefs pattern "apropos" + (funcall xref-find-function 'apropos + (apropos-parse-pattern + (if (string-equal (regexp-quote pattern) pattern) + ;; Split into words + (or (split-string pattern "[ \t]+" t) + (user-error "No word list given")) + pattern))) + nil)) + + +;;; Key bindings + +;;;###autoload (define-key esc-map "." #'xref-find-definitions) +;;;###autoload (define-key esc-map "," #'xref-pop-marker-stack) +;;;###autoload (define-key esc-map [?\C-.] #'xref-find-apropos) +;;;###autoload (define-key ctl-x-4-map "." #'xref-find-definitions-other-window) +;;;###autoload (define-key ctl-x-5-map "." #'xref-find-definitions-other-frame) + + +(provide 'xref) + +;;; xref.el ends here commit ac549019742bac11c249814d7744670a56671f97 Author: Karl Fogel Date: Thu Dec 25 13:28:51 2014 -0600 * etc/NEWS: Mention new buffer display behavior for `shell'. This follows up to Sam Steingold's change of 2014-12-23 in ../lisp/shell.el, in git commit e55a467ec0f758c311d3. diff --git a/etc/ChangeLog b/etc/ChangeLog index 10ebff1..814b94d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-25 Karl Fogel + + * NEWS: Mention new buffer display behavior for `shell'. + This follows up to Sam Steingold's change of 2014-12-23 + in ../lisp/shell.el, in git commit e55a467ec0f758c311d3. + 2014-12-15 Artur Malabarba * NEWS: Mention `let-alist. diff --git a/etc/NEWS b/etc/NEWS index 14a9176..16aa297 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -187,6 +187,14 @@ Unicode standards. * Changes in Specialized Modes and Packages in Emacs 25.1 +** Shell + +When you invoke `shell' interactively, the *shell* buffer will now +display in a new window. However, you can customize this behavior via +the new `shell-display-buffer-actions' variable. For example, to get +the old behavior -- *shell* buffer displays in current window -- use +(setq shell-display-buffer-actions '(display-buffer-same-window)). + ** ido *** New command `ido-bury-buffer-at-head' bound to C-S-b Bury the buffer at the head of `ido-matches', analogous to how C-k commit a41d07b329c034ad34e442bef93b6fcaeb556f9f Author: Eli Zaretskii Date: Thu Dec 25 17:38:15 2014 +0200 Fix rendering of composed caharacters on the mode line. (Bug#19435) src/xdisp.c (set_iterator_to_next) : Limit search in composition_compute_stop_pos to the number of characters in the string. : Simplify code. src/composite.c (composition_compute_stop_pos): If no composition was found in a string before ENDPOS, and ENDPOS is the string end, no need to back up to a safe point. src/dispextern.h (struct it) : Improve commentary. diff --git a/src/ChangeLog b/src/ChangeLog index 2840109..2df8308 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2014-12-25 Eli Zaretskii + + * xdisp.c (set_iterator_to_next) : Limit search in + composition_compute_stop_pos to the number of characters in the + string. (Bug#19435) + : Simplify code. + + * composite.c (composition_compute_stop_pos): If no composition + was found in a string before ENDPOS, and ENDPOS is the string end, + no need to back up to a safe point. + + * dispextern.h (struct it) : Improve commentary. + 2014-12-24 Jan Djärv * nsimage.m (allocInitFromFile:): Initialize bmRep. diff --git a/src/composite.c b/src/composite.c index fa88214..a128210 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1036,7 +1036,8 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos, } } } - if (charpos == endpos) + if (charpos == endpos + && !(STRINGP (string) && endpos == SCHARS (string))) { /* We couldn't find a composition point before ENDPOS. But, some character after ENDPOS may be composed with diff --git a/src/dispextern.h b/src/dispextern.h index 576f228..0e5a73a 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2222,7 +2222,10 @@ struct it ptrdiff_t base_level_stop; /* Maximum string or buffer position + 1. ZV when iterating over - current_buffer. */ + current_buffer. When iterating over a string in display_string, + this can be smaller or greater than the number of string + characters, depending on the values of PRECISION and FIELD_WIDTH + with which display_string was called. */ ptrdiff_t end_charpos; /* C string to iterate over. Non-null means get characters from diff --git a/src/xdisp.c b/src/xdisp.c index e3e0035..173df5d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7330,27 +7330,15 @@ set_iterator_to_next (struct it *it, int reseat_p) else if (it->cmp_it.id >= 0) { /* We are currently getting glyphs from a composition. */ - int i; - if (! it->bidi_p) { IT_CHARPOS (*it) += it->cmp_it.nchars; IT_BYTEPOS (*it) += it->cmp_it.nbytes; - if (it->cmp_it.to < it->cmp_it.nglyphs) - { - it->cmp_it.from = it->cmp_it.to; - } - else - { - it->cmp_it.id = -1; - composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), - IT_BYTEPOS (*it), - it->end_charpos, Qnil); - } } - else if (! it->cmp_it.reversed_p) + else { - /* Composition created while scanning forward. */ + int i; + /* Update IT's char/byte positions to point to the first character of the next grapheme cluster, or to the character visually after the current composition. */ @@ -7358,52 +7346,34 @@ set_iterator_to_next (struct it *it, int reseat_p) bidi_move_to_visually_next (&it->bidi_it); IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; + } - if (it->cmp_it.to < it->cmp_it.nglyphs) - { - /* Proceed to the next grapheme cluster. */ - it->cmp_it.from = it->cmp_it.to; - } - else - { - /* No more grapheme clusters in this composition. - Find the next stop position. */ - ptrdiff_t stop = it->end_charpos; - if (it->bidi_it.scan_dir < 0) - /* Now we are scanning backward and don't know - where to stop. */ - stop = -1; - composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), - IT_BYTEPOS (*it), stop, Qnil); - } + if ((! it->bidi_p || ! it->cmp_it.reversed_p) + && it->cmp_it.to < it->cmp_it.nglyphs) + { + /* Composition created while scanning forward. Proceed + to the next grapheme cluster. */ + it->cmp_it.from = it->cmp_it.to; + } + else if ((it->bidi_p && it->cmp_it.reversed_p) + && it->cmp_it.from > 0) + { + /* Composition created while scanning backward. Proceed + to the previous grapheme cluster. */ + it->cmp_it.to = it->cmp_it.from; } else { - /* Composition created while scanning backward. */ - /* Update IT's char/byte positions to point to the last - character of the previous grapheme cluster, or the - character visually after the current composition. */ - for (i = 0; i < it->cmp_it.nchars; i++) - bidi_move_to_visually_next (&it->bidi_it); - IT_BYTEPOS (*it) = it->bidi_it.bytepos; - IT_CHARPOS (*it) = it->bidi_it.charpos; - if (it->cmp_it.from > 0) - { - /* Proceed to the previous grapheme cluster. */ - it->cmp_it.to = it->cmp_it.from; - } - else - { - /* No more grapheme clusters in this composition. - Find the next stop position. */ - ptrdiff_t stop = it->end_charpos; - if (it->bidi_it.scan_dir < 0) - /* Now we are scanning backward and don't know - where to stop. */ - stop = -1; - composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), - IT_BYTEPOS (*it), stop, Qnil); - } + /* No more grapheme clusters in this composition. + Find the next stop position. */ + ptrdiff_t stop = it->end_charpos; + + if (it->bidi_it.scan_dir < 0) + /* Now we are scanning backward and don't know + where to stop. */ + stop = -1; + composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it), + IT_BYTEPOS (*it), stop, Qnil); } } else @@ -7532,61 +7502,63 @@ set_iterator_to_next (struct it *it, int reseat_p) } if (it->cmp_it.id >= 0) { - int i; - + /* We are delivering display elements from a composition. + Update the string position past the grapheme cluster + we've just processed. */ if (! it->bidi_p) { IT_STRING_CHARPOS (*it) += it->cmp_it.nchars; IT_STRING_BYTEPOS (*it) += it->cmp_it.nbytes; - if (it->cmp_it.to < it->cmp_it.nglyphs) - it->cmp_it.from = it->cmp_it.to; - else - { - it->cmp_it.id = -1; - composition_compute_stop_pos (&it->cmp_it, - IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it), - it->end_charpos, it->string); - } } - else if (! it->cmp_it.reversed_p) + else { + int i; + for (i = 0; i < it->cmp_it.nchars; i++) bidi_move_to_visually_next (&it->bidi_it); IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos; IT_STRING_CHARPOS (*it) = it->bidi_it.charpos; + } - if (it->cmp_it.to < it->cmp_it.nglyphs) - it->cmp_it.from = it->cmp_it.to; - else - { - ptrdiff_t stop = it->end_charpos; - if (it->bidi_it.scan_dir < 0) - stop = -1; - composition_compute_stop_pos (&it->cmp_it, - IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it), stop, - it->string); - } + /* Did we exhaust all the grapheme clusters of this + composition? */ + if ((! it->bidi_p || ! it->cmp_it.reversed_p) + && (it->cmp_it.to < it->cmp_it.nglyphs)) + { + /* Not all the grapheme clusters were processed yet; + advance to the next cluster. */ + it->cmp_it.from = it->cmp_it.to; + } + else if ((it->bidi_p && it->cmp_it.reversed_p) + && it->cmp_it.from > 0) + { + /* Likewise: advance to the next cluster, but going in + the reverse direction. */ + it->cmp_it.to = it->cmp_it.from; } else { - for (i = 0; i < it->cmp_it.nchars; i++) - bidi_move_to_visually_next (&it->bidi_it); - IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos; - IT_STRING_CHARPOS (*it) = it->bidi_it.charpos; - if (it->cmp_it.from > 0) - it->cmp_it.to = it->cmp_it.from; - else + /* This composition was fully processed; find the next + candidate place for checking for composed + characters. */ + /* Always limit string searches to the string length; + any padding spaces are not part of the string, and + there cannot be any compositions in that padding. */ + ptrdiff_t stop = SCHARS (it->string); + + if (it->bidi_p && it->bidi_it.scan_dir < 0) + stop = -1; + else if (it->end_charpos < stop) { - ptrdiff_t stop = it->end_charpos; - if (it->bidi_it.scan_dir < 0) - stop = -1; - composition_compute_stop_pos (&it->cmp_it, - IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it), stop, - it->string); + /* Cf. PRECISION in reseat_to_string: we might be + limited in how many of the string characters we + need to deliver. */ + stop = it->end_charpos; } + composition_compute_stop_pos (&it->cmp_it, + IT_STRING_CHARPOS (*it), + IT_STRING_BYTEPOS (*it), stop, + it->string); } } else @@ -7609,12 +7581,17 @@ set_iterator_to_next (struct it *it, int reseat_p) bidi_move_to_visually_next (&it->bidi_it); IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos; IT_STRING_CHARPOS (*it) = it->bidi_it.charpos; + /* If the scan direction changes, we may need to update + the place where to check for composed characters. */ if (prev_scan_dir != it->bidi_it.scan_dir) { - ptrdiff_t stop = it->end_charpos; + ptrdiff_t stop = SCHARS (it->string); if (it->bidi_it.scan_dir < 0) stop = -1; + else if (it->end_charpos < stop) + stop = it->end_charpos; + composition_compute_stop_pos (&it->cmp_it, IT_STRING_CHARPOS (*it), IT_STRING_BYTEPOS (*it), stop, commit 000bc54951fc2c8f502176755fca53ca2b8aa9a4 Author: Martin Rudalics Date: Thu Dec 25 14:13:26 2014 +0100 Make `resize-mini-windows' customizable and update documentation for it. * cus-start.el (resize-mini-windows): Make it customizable. * minibuf.texi (Minibuffer Windows): Add descriptions of `resize-mini-windows' and `max-mini-window-height'. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b74719c..2d964cf 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -2,6 +2,9 @@ * windows.texi (Windows): Resync @menu order with @node order. + * minibuf.texi (Minibuffer Windows): Add descriptions of + `resize-mini-windows' and `max-mini-window-height'. + 2014-12-25 Glenn Morris * windows.texi (Windows): Sync @menu order with @node order. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 1c6a74a..57ae0e9 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2218,8 +2218,8 @@ contents of the minibuffer before the point. @section Minibuffer Windows @cindex minibuffer windows - These functions access and select minibuffer windows -and test whether they are active. +These functions access and select minibuffer windows, test whether they +are active and control how they get resized. @defun active-minibuffer-window This function returns the currently active minibuffer window, or @@ -2260,6 +2260,29 @@ This function returns non-@code{nil} if @var{window} is the currently active minibuffer window. @end defun +The following two options control whether minibuffer windows are resized +automatically and how large they can get in the process. + +@defopt resize-mini-windows +This option specifies whether minibuffer windows are resized +automatically. The default value is @code{grow-only}, which means that +a minibuffer window by default expands automatically to accommodate the +text it displays and shrinks back to one line as soon as the minibuffer +gets empty. If the value is @code{t}, Emacs will always try to fit the +height of a minibuffer window to the text it displays (with a minimum of +one line). If the value is @code{nil}, a minibuffer window never +changes size automatically. In that case the window resizing commands +(@pxref{Resizing Windows}) can be used to adjust its height. +@end defopt + +@defopt max-mini-window-height +This option provides a maximum height for resizing minibuffer windows +automatically. A floating-point number specifies a fraction of the +frame's height; an integer specifies the maximum number of lines. The +default value is 0.25. +@end defopt + + @node Minibuffer Contents @section Minibuffer Contents diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c369c79..6b0f296 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-25 Martin Rudalics + + * cus-start.el (resize-mini-windows): Make it customizable. + 2014-12-24 Stephen Leake * startup.el (fancy-about-text): Change buttons for etc/CONTRIBUTE diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 4049974..5394a1c 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -520,7 +520,12 @@ since it could result in memory overflow and make Emacs crash." (const :tag "Hourglass" :value hourglass))) (display-hourglass cursor boolean) (hourglass-delay cursor number) - + (resize-mini-windows + windows (choice + (const :tag "Off (nil)" :value nil) + (const :tag "Fit (t)" :value t) + (const :tag "Grow only" :value grow-only)) + "25.1") ;; xfaces.c (scalable-fonts-allowed display boolean "22.1") ;; xfns.c commit 437854dc5d9a6146b7095392e750112819b7e8a6 Author: Martin Rudalics Date: Thu Dec 25 10:59:21 2014 +0100 Resync @menu order with @node order. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index c2e5ea0..b74719c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2014-12-25 Martin Rudalics + + * windows.texi (Windows): Resync @menu order with @node order. + 2014-12-25 Glenn Morris * windows.texi (Windows): Sync @menu order with @node order. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 20f5d6e..7c8d0b0 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -16,8 +16,8 @@ is displayed in windows. * Windows and Frames:: Relating windows to the frame they appear on. * Window Sizes:: Accessing a window's size. * Resizing Windows:: Changing the sizes of windows. -* Splitting Windows:: Creating a new window. * Preserving Window Sizes:: Preserving the size of windows. +* Splitting Windows:: Creating a new window. * Deleting Windows:: Removing a window from its frame. * Recombining Windows:: Preserving the frame layout when splitting and deleting windows. @@ -907,6 +907,98 @@ window. @end deffn +@node Preserving Window Sizes +@section Preserving Window Sizes +@cindex preserving window sizes + +A window can get resized explicitly by using one of the functions from +the preceding section or implicitly, for example, when resizing an +adjacent window, when splitting or deleting a window (@pxref{Splitting +Windows}, @pxref{Deleting Windows}) or when resizing the window's frame +(@pxref{Size and Position}). + + It is possible to avoid implicit resizing of a specific window when +there are one or more other resizable windows on the same frame. For +this purpose, Emacs must be advised to @dfn{preserve} the size of that +window. There are two basic ways to do that. + +@defvar window-size-fixed +If this buffer-local variable is non-@code{nil}, the size of any window +displaying the buffer cannot normally be changed. Deleting a window or +changing the frame's size may still change the window's size, if there +is no choice. + +If the value is @code{height}, then only the window's height is fixed; +if the value is @code{width}, then only the window's width is fixed. +Any other non-@code{nil} value fixes both the width and the height. + +If this variable is @code{nil}, this does not necessarily mean that any +window showing the buffer can be resized in the desired direction. To +determine that, use the function @code{window-resizable}. +@xref{Resizing Windows}. +@end defvar + +Often @code{window-size-fixed} is overly aggressive because it inhibits +any attempt to explicitly resize or split an affected window as well. +This may even happen after the window has been resized implicitly, for +example, when deleting an adjacent window or resizing the window's +frame. The following function tries hard to never disallow resizing +such a window explicitly: + +@defun window-preserve-size &optional window horizontal preserve +This function (un-)marks the height of window @var{window} as preserved +for future resize operations. @var{window} must be a live window and +defaults to the selected one. If the optional argument @var{horizontal} +is non-@code{nil}, it (un-)marks the width of @var{window} as preserved. + +If the optional argument @var{preserve} is @code{t}, this means to +preserve the current height/width of @var{window}'s body. The +height/width of @var{window} will change only if Emacs has no better +choice. Resizing a window whose height/width is preserved by this +function never throws an error. + +If @var{preserve} is @code{nil}, this means to stop preserving the +height/width of @var{window}, lifting any respective restraint induced +by a previous call of this function for @var{window}. Calling +@code{enlarge-window}, @code{shrink-window} or +@code{fit-window-to-buffer} with @var{window} as argument may also +remove the respective restraint. +@end defun + +@code{window-preserve-size} is currently invoked by the following +functions: + +@table @code +@item fit-window-to-buffer +If the optional argument @var{preserve-size} of that function +(@pxref{Resizing Windows}) is non-@code{nil}, the size established by +that function is preserved. + +@item display-buffer +If the @var{alist} argument of that function (@pxref{Choosing Window}) +contains a @code{preserve-size} entry, the size of the window produced +by that function is preserved. +@end table + + @code{window-preserve-size} installs a window parameter (@pxref{Window +Parameters}) called @code{preserved-size} which is consulted by the +window resizing functions. This parameter will not prevent resizing the +window when the window shows another buffer than the one when +@code{window-preserve-size} was invoked or if its size has changed since +then. + +The following function can be used to check whether the height of a +particular window is preserved: + +@defun window-preserved-size &optional window horizontal +This function returns the preserved height of window @var{window} in +pixels. @var{window} must be a live window and defaults to the selected +one. If the optional argument @var{horizontal} is non-@code{nil}, it +returns the preserved width of @var{window}. It returns @code{nil} if +the size of @var{window} is not preserved. +@end defun + + @node Splitting Windows @section Splitting Windows @cindex splitting windows @@ -1068,98 +1160,6 @@ function. @end defopt -@node Preserving Window Sizes -@section Preserving Window Sizes -@cindex preserving window sizes - -A window can get resized explicitly by using one of the functions from -the preceding section or implicitly, for example, when resizing an -adjacent window, when splitting or deleting a window (@pxref{Splitting -Windows}, @pxref{Deleting Windows}) or when resizing the window's frame -(@pxref{Size and Position}). - - It is possible to avoid implicit resizing of a specific window when -there are one or more other resizable windows on the same frame. For -this purpose, Emacs must be advised to @dfn{preserve} the size of that -window. There are two basic ways to do that. - -@defvar window-size-fixed -If this buffer-local variable is non-@code{nil}, the size of any window -displaying the buffer cannot normally be changed. Deleting a window or -changing the frame's size may still change the window's size, if there -is no choice. - -If the value is @code{height}, then only the window's height is fixed; -if the value is @code{width}, then only the window's width is fixed. -Any other non-@code{nil} value fixes both the width and the height. - -If this variable is @code{nil}, this does not necessarily mean that any -window showing the buffer can be resized in the desired direction. To -determine that, use the function @code{window-resizable}. -@xref{Resizing Windows}. -@end defvar - -Often @code{window-size-fixed} is overly aggressive because it inhibits -any attempt to explicitly resize or split an affected window as well. -This may even happen after the window has been resized implicitly, for -example, when deleting an adjacent window or resizing the window's -frame. The following function tries hard to never disallow resizing -such a window explicitly: - -@defun window-preserve-size &optional window horizontal preserve -This function (un-)marks the height of window @var{window} as preserved -for future resize operations. @var{window} must be a live window and -defaults to the selected one. If the optional argument @var{horizontal} -is non-@code{nil}, it (un-)marks the width of @var{window} as preserved. - -If the optional argument @var{preserve} is @code{t}, this means to -preserve the current height/width of @var{window}'s body. The -height/width of @var{window} will change only if Emacs has no better -choice. Resizing a window whose height/width is preserved by this -function never throws an error. - -If @var{preserve} is @code{nil}, this means to stop preserving the -height/width of @var{window}, lifting any respective restraint induced -by a previous call of this function for @var{window}. Calling -@code{enlarge-window}, @code{shrink-window} or -@code{fit-window-to-buffer} with @var{window} as argument may also -remove the respective restraint. -@end defun - -@code{window-preserve-size} is currently invoked by the following -functions: - -@table @code -@item fit-window-to-buffer -If the optional argument @var{preserve-size} of that function -(@pxref{Resizing Windows}) is non-@code{nil}, the size established by -that function is preserved. - -@item display-buffer -If the @var{alist} argument of that function (@pxref{Choosing Window}) -contains a @code{preserve-size} entry, the size of the window produced -by that function is preserved. -@end table - - @code{window-preserve-size} installs a window parameter (@pxref{Window -Parameters}) called @code{preserved-size} which is consulted by the -window resizing functions. This parameter will not prevent resizing the -window when the window shows another buffer than the one when -@code{window-preserve-size} was invoked or if its size has changed since -then. - -The following function can be used to check whether the height of a -particular window is preserved: - -@defun window-preserved-size &optional window horizontal -This function returns the preserved height of window @var{window} in -pixels. @var{window} must be a live window and defaults to the selected -one. If the optional argument @var{horizontal} is non-@code{nil}, it -returns the preserved width of @var{window}. It returns @code{nil} if -the size of @var{window} is not preserved. -@end defun - - @node Deleting Windows @section Deleting Windows @cindex deleting windows commit 57c9fb75337967aaa5476c7b9415cbe301b4535d Author: Glenn Morris Date: Wed Dec 24 17:10:21 2014 -0800 * doc/lispref/windows.texi (Windows): Sync @menu order with @node order. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 56a0730..c2e5ea0 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2014-12-25 Glenn Morris + * windows.texi (Windows): Sync @menu order with @node order. + * sequences.texi (Sequence Functions): Copyedits. * control.texi (Pattern matching case statement): diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index c54eb90..20f5d6e 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -16,8 +16,8 @@ is displayed in windows. * Windows and Frames:: Relating windows to the frame they appear on. * Window Sizes:: Accessing a window's size. * Resizing Windows:: Changing the sizes of windows. -* Preserving Window Sizes:: Preserving the size of windows. * Splitting Windows:: Creating a new window. +* Preserving Window Sizes:: Preserving the size of windows. * Deleting Windows:: Removing a window from its frame. * Recombining Windows:: Preserving the frame layout when splitting and deleting windows. commit 218520e97c52bf43b82e9be1709b3462bf6627aa Author: Glenn Morris Date: Wed Dec 24 16:55:57 2014 -0800 * doc/lispref/sequences.texi (Sequence Functions): Copyedits. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 8465438..56a0730 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2014-12-25 Glenn Morris + * sequences.texi (Sequence Functions): Copyedits. + * control.texi (Pattern matching case statement): * positions.texi (List Motion): * streams.texi (Output Functions): diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 8f8cfe7..b1e315c 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -217,14 +217,14 @@ y @result{} [foo (69 2)] @end example @end defun -@defun reverse seq +@defun reverse sequence @cindex string reverse @cindex list reverse @cindex vector reverse @cindex sequence reverse This function creates a new sequence whose elements are the elements -of @var{seq}, but in reverse order. The original argument @var{seq} -is @emph{not} altered. Note that char-table cannot be reversed. +of @var{sequence}, but in reverse order. The original argument @var{sequence} +is @emph{not} altered. Note that char-tables cannot be reversed. @example @group @@ -260,12 +260,12 @@ x @end example @end defun -@defun nreverse seq +@defun nreverse sequence @cindex reversing a string @cindex reversing a list @cindex reversing a vector - This function reverses the order of the elements of @var{seq}. -Unlike @code{reverse} the original @var{seq} may be modified. + This function reverses the order of the elements of @var{sequence}. +Unlike @code{reverse} the original @var{sequence} may be modified. For example: @@ -421,22 +421,20 @@ useful example of @code{sort}. @cindex sequence functions in seq @cindex seq library - The @file{seq} library provides the following additional sequence + The @file{seq.el} library provides the following additional sequence manipulation macros and functions, prefixed with @code{seq-}. To use -them, you need to load the @file{seq} library first. +them, you must first load the @file{seq} library. - All functions defined in the @code{seq} library are free of -side-effects, meaning that sequence(s) passed as argument(s) to -functions defined in @code{seq} are not modified. + All functions defined in this library are free of side-effects; +i.e., they do not modify any sequence (list, vector, or string) that +you pass as an argument. Unless otherwise stated, the result is a +sequence of the same type as the input. For those functions that take +a predicate, this should be a function of one argument. -@defun seq-drop seq n - This function returns a sequence of all but the first @var{n} -elements of the sequence @var{seq}. - -@var{seq} may be a list, vector or string and @var{n} must be an -integer. The result is the same type of sequence as @var{seq}. - -If @var{n} is a negative integer or zero, @var{seq} is returned. +@defun seq-drop sequence n + This function returns all but the first @var{n} (an integer) +elements of @var{sequence}. If @var{n} is negative or zero, +the result is @var{sequence}. @example @group @@ -450,14 +448,10 @@ If @var{n} is a negative integer or zero, @var{seq} is returned. @end example @end defun -@defun seq-take seq n - This function returns a sequence of the first @var{n} elements of -@var{seq}. - -@var{seq} may be a list, vector or string and @var{n} must be an -integer. The result is the same type of sequence as @var{seq}. - -If @var{n} is a negative integer or zero, an empty sequence is returned. +@defun seq-take sequence n + This function returns the first @var{n} (an integer) elements of +@var{sequence}. If @var{n} is negative or zero, the result +is @code{nil}. @example @group @@ -471,17 +465,9 @@ If @var{n} is a negative integer or zero, an empty sequence is returned. @end example @end defun -@defun seq-take-while pred seq - This function returns a sub-sequence of the successive elements of -@var{seq} for which calling @code{pred} with that element returns -non-nil. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. The result is the same type of sequence as -@var{seq}. - -If evaluating @var{pred} with the first element of @var{seq} as argument -returns @code{nil}, an empty sequence is returned. +@defun seq-take-while predicate sequence + This function returns the members of @var{sequence} in order, +stopping before the first one for which @var{predicate} returns @code{nil}. @example @group @@ -495,17 +481,9 @@ returns @code{nil}, an empty sequence is returned. @end example @end defun -@defun seq-drop-while pred seq - This function returns a sub-sequence of @var{seq} from the first -element for which calling @var{pred} with that element returns -@code{nil}. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. The result is the same type of sequence as -@var{seq}. - -If evaluating @var{pred} with every element of @var{seq} returns -@code{nil}, @var{seq} is returned. +@defun seq-drop-while predicate sequence + This function returns the members of @var{sequence} in order, +starting from the first one for which @var{predicate} returns @code{nil}. @example @group @@ -519,13 +497,10 @@ If evaluating @var{pred} with every element of @var{seq} returns @end example @end defun -@defun seq-filter pred seq +@defun seq-filter predicate sequence @cindex filtering sequences - This function returns a list of all the elements in @var{seq} for -which calling @var{pred} with that element returns non-nil. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. + This function returns a list of all the elements in @var{sequence} +for which @var{predicate} returns non-@code{nil}. @example @group @@ -539,13 +514,10 @@ list, vector or string. @end example @end defun -@defun seq-remove pred seq +@defun seq-remove predicate sequence @cindex removing from sequences - This function returns a list of all the elements in @var{seq} for -which calling @var{pred} with that element returns @code{nil}. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. + This function returns a list of all the elements in @var{sequence} +for which @var{predicate} returns @code{nil}. @example @group @@ -559,18 +531,15 @@ list, vector or string. @end example @end defun -@defun seq-reduce function seq initial-value +@defun seq-reduce function sequence initial-value @cindex reducing sequences This function returns the result of calling @var{function} with -@var{initial-value} and the first element of @var{seq}, then calling -@var{function} with that result and the second element of @var{seq}, -then with that result and the third element of @var{seq}, etc. - -@var{function} must be a two-arguments function and @var{seq} may be a -list, vector or string. - -If @var{seq} is empty, @var{initial-value} is returned and -@var{function} is not called. +@var{initial-value} and the first element of @var{sequence}, then calling +@var{function} with that result and the second element of @var{sequence}, +then with that result and the third element of @var{sequence}, etc. +@var{function} should be a function of two arguments. If +@var{sequence} is empty, this returns @var{initial-value} without +calling @var{function}. @example @group @@ -588,14 +557,9 @@ If @var{seq} is empty, @var{initial-value} is returned and @end example @end defun -@defun seq-some-p pred seq - This function returns any element in @var{seq} for which calling -@var{pred} with that element returns non-nil. If successively calling -@var{pred} with each element of @var{seq} always returns @code{nil}, -@code{nil} is returned. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. +@defun seq-some-p predicate sequence + This function returns the first member of sequence for which @var{predicate} +returns non-@code{nil}. @example @group @@ -609,12 +573,9 @@ list, vector or string. @end example @end defun -@defun seq-every-p pred seq - This function returns non-nil if successively calling @var{pred} with -each element of @var{seq} always returns non-nil, @code{nil} otherwise. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. +@defun seq-every-p predicate sequence + This function returns non-@code{nil} if applying @var{predicate} +to every element of @var{sequence} returns non-@code{nil}. @example @group @@ -628,11 +589,8 @@ list, vector or string. @end example @end defun -@defun seq-empty-p seq - This function returns non-nil if the sequence @var{seq} is empty, -@code{nil} otherwise. - -@var{seq} may be a list, vector or string. +@defun seq-empty-p sequence + This function returns non-@code{nil} if @var{sequence} is empty. @example @group @@ -646,12 +604,9 @@ list, vector or string. @end example @end defun -@defun seq-count pred seq - This function returns the number of elements in @var{seq} for which -calling @var{pred} with that element returns non-nil. - -@var{pred} must be a one-argument function and @var{seq} may be a -list, vector or string. +@defun seq-count predicate sequence + This function returns the number of elements in @var{sequence} for which +@var{predicate} returns non-@code{nil}. @example (seq-count (lambda (elt) (> elt 0)) [-1 2 0 3 -2]) @@ -659,27 +614,17 @@ list, vector or string. @end example @end defun -@defun seq-sort pred seq - This function returns a sorted sequence of the elements of -@var{seq}, comparing its elements with @var{pred}. Called with two -elements of @var{seq}, @var{pred} should return non-nil if the first -element should sort before the second. - -@var{pred} must be a two-arguments function, @var{seq} may be a list, -vector or string. - -The result is a sequence of the same type as SEQ. @cindex sorting sequences +@defun seq-sort function sequence + This function returns a copy of @var{sequence} that is sorted +according to @var{function}, a function of two arguments that returns +non-@code{nil} if the first argument should sort before the second. @end defun -@defun seq-contains-p seq elt testfn - This function returns the first element in @var{seq} that equals to -@var{elt}. - -Equality is defined by @var{testfn} if non-nil or by @code{equal} if -@code{nil}. - -@var{seq} may be a list, vector or string. +@defun seq-contains-p sequence elt &optional function + This function returns the first element in @var{sequence} that is equal to +@var{elt}. If the optional argument @var{function} is non-@code{nil}, +it is a function of two arguments to use instead of the default @code{equal}. @example @group @@ -694,13 +639,10 @@ Equality is defined by @var{testfn} if non-nil or by @code{equal} if @end defun -@defun seq-uniq seq testfn - This function returns a list of the elements of @var{seq} with -duplicates removed. @var{testfn} is used to compare elements, or -@code{equal} if @var{testfn} is @code{nil}. - -@var{testfn} must be a two-argument function or @code{nil} and -@var{seq} may be a list, vector or string. +@defun seq-uniq sequence &optional function + This function returns a list of the elements of @var{sequence} with +duplicates removed. If the optional argument @var{function} is non-@code{nil}, +it is a function of two arguments to use instead of the default @code{equal}. @example @group @@ -714,14 +656,11 @@ duplicates removed. @var{testfn} is used to compare elements, or @end example @end defun -@defun seq-subseq seq start &optional end - This function returns a sub-sequence of @var{seq} from @var{start} -to @var{end}. If @var{end} is omitted, it default to the length of -@var{seq}. If @var{start} or @var{end} is negative, it counts from -the end of @var{seq}. - -@var{seq} may be a list, vector or string. -The result is the same type of sequence as @var{seq}. +@defun seq-subseq sequence start &optional end + This function returns a subset of @var{sequence} from @var{start} +to @var{end}, both integers (@var{end} defaults to the last element). +If @var{start} or @var{end} is negative, it counts from the end of +@var{sequence}. @example @group @@ -739,11 +678,10 @@ The result is the same type of sequence as @var{seq}. @end example @end defun -@defun seq-concatenate type &rest seqs - This function returns a sequence made of the concatenation of -@var{seqs}. The result is a sequence of type @var{type}. @var{type} -may be one of the following symbols: @code{vector}, @code{list} or -@code{string}. +@defun seq-concatenate type &rest sequences + This function returns a sequence of type @var{type} made of the +concatenation of @var{sequences}. @var{type} may be: @code{vector}, +@code{list} or @code{string}. @example @group @@ -757,26 +695,11 @@ may be one of the following symbols: @code{vector}, @code{list} or @end example @end defun -@defmac seq-doseq (var seq [result]) body@dots{} +@defmac seq-doseq (var sequence [result]) body@dots{} @cindex sequence iteration -This macro is like @code{dolist}, except that @var{seq} can be a list, +This macro is like @code{dolist}, except that @var{sequence} can be a list, vector or string (@pxref{Iteration} for more information about the -@code{dolist} macro). - -@var{seq-doseq} is primarily useful for side-effects. - -@example -(seq-doseq (elt [1 2 3]) - (print (* 2 elt))) - @print{} - @print{} 2 - @print{} - @print{} 4 - @print{} - @print{} 6 - @result{} nil - -@end example +@code{dolist} macro). This is primarily useful for side-effects. @end defmac @node Arrays commit 5306baa97b39ad28664a97bcf1fae0246dbcc2ff Author: Glenn Morris Date: Wed Dec 24 16:54:55 2014 -0800 Markup fixes for doc/lispref * doc/lispref/control.texi (Pattern matching case statement): * doc/lispref/positions.texi (List Motion): * doc/lispref/streams.texi (Output Functions): * doc/lispref/strings.texi (Text Comparison): * doc/lispref/text.texi (Document Object Model): Markup fixes. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 3621c56..8465438 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,11 @@ +2014-12-25 Glenn Morris + + * control.texi (Pattern matching case statement): + * positions.texi (List Motion): + * streams.texi (Output Functions): + * strings.texi (Text Comparison): + * text.texi (Document Object Model): Markup fixes. + 2014-12-22 Paul Eggert Remove obsolete references to pre-C99 builds diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 5cf6368..ea21233 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -370,9 +370,9 @@ More specifically, a Q-pattern can take the following forms: @item (@var{qpattern1} . @var{qpattern2}) This pattern matches any cons cell whose @code{car} matches @var{QPATTERN1} and whose @code{cdr} matches @var{PATTERN2}. -@item [@var{qpattern1 qpattern2..qpatternm}] -This pattern matches a vector of length @code{M} whose 0..(M-1)th -elements match @var{QPATTERN1}, @var{QPATTERN2}..@var{QPATTERNm}, +@item [@var{qpattern1} @var{qpattern2} @dots{} @var{qpatternm}] +This pattern matches a vector of length @var{M} whose 0..(@var{M}-1)th +elements match @var{qpattern1}, @var{qpattern2} @dots{} @var{qpatternm}, respectively. @item @var{atom} This pattern matches any atom @code{equal} to @var{atom}. diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index e32f0ef..032baa9 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -654,9 +654,9 @@ quotes are ignored.) @deffn Command up-list &optional arg escape-strings no-syntax-crossing This function moves forward out of @var{arg} (default 1) levels of parentheses. A negative argument means move backward but still to a -less deep spot. If @var{escape-strings} is non-nil (as it is +less deep spot. If @var{escape-strings} is non-@code{nil} (as it is interactively), move out of enclosing strings as well. If -@var{no-syntax-crossing} is non-nil (as it is interactively), prefer +@var{no-syntax-crossing} is non-@code{nil} (as it is interactively), prefer to break out of any enclosing string instead of moving to the start of a list broken across multiple strings. On error, location of point is unspecified. diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index c287b61..b12adcf 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -618,7 +618,7 @@ spacing between calls. @defun terpri &optional stream ensure @cindex newline in print This function outputs a newline to @var{stream}. The name stands for -``terminate print''. If @var{ensure} is non-nil no newline is printed +``terminate print''. If @var{ensure} is non-@code{nil} no newline is printed if @var{stream} is already at the beginning of a line. Note in this case @var{stream} can not be a function and an error is signalled if it is. This function returns @code{t} if a newline is printed. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 5e0148b..1ecc567 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -483,17 +483,17 @@ dependent; a @var{locale} "en_US.UTF-8" is applicable on POSIX systems, while it would be, e.g., "enu_USA.1252" on MS-Windows systems. -If @var{IGNORE-CASE} is non-nil, characters are converted to lower-case +If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case before comparing them. To emulate Unicode-compliant collation on MS-Windows systems, -bind @code{w32-collate-ignore-punctuation} to a non-nil value, since +bind @code{w32-collate-ignore-punctuation} to a non-@code{nil} value, since the codeset part of the locale cannot be "UTF-8" on MS-Windows. If your system does not support a locale environment, this function behaves like @code{string-equal}. -Do NOT use this function to compare file names for equality, only +Do @emph{not} use this function to compare file names for equality, only for sorting them. @end defun @@ -602,11 +602,11 @@ behave like @code{string-lessp}: @end group @end example -If @var{IGNORE-CASE} is non-nil, characters are converted to lower-case +If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case before comparing them. To emulate Unicode-compliant collation on MS-Windows systems, -bind @code{w32-collate-ignore-punctuation} to a non-nil value, since +bind @code{w32-collate-ignore-punctuation} to a non-@code{nil} value, since the codeset part of the locale cannot be "UTF-8" on MS-Windows. If your system does not support a locale environment, this function diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 3ef565b..06d1381 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -4467,7 +4467,7 @@ Append @var{child} as the last child of @var{node}. @item dom-add-child-before @var{node} @var{child} @var{before} Add @var{child} to @var{node}'s child list before the @var{before} -node. If @var{before} is nil, make @var{child} the first child. +node. If @var{before} is @code{nil}, make @var{child} the first child. @item dom-set-attributes @var{node} @var{attributes} Replace all the attributes of the node with a new key/value list. commit b70977ce02432b1ded569215096402e2eee318a3 Author: Glenn Morris Date: Wed Dec 24 16:00:44 2014 -0800 Small doc markup fixes * doc/lispref/control.texi (Pattern matching case statement): * doc/lispref/os.texi (Desktop Notifications): Markup fixes. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 9ab84af..83aaf6e 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2014-12-24 Glenn Morris + * control.texi (Pattern matching case statement): + * os.texi (Desktop Notifications): * modes.texi (Defining Minor Modes, SMIE Lexer): Markup fixes. 2014-12-23 Eli Zaretskii diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 62c73dd..9511f68 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -370,8 +370,8 @@ that location. More specifically, a Q-pattern can take the following forms: @table @code @item (@var{qpattern1} . @var{qpattern2}) -This pattern matches any cons cell whose @code{car} matches @var{QPATTERN1} and -whose @code{cdr} matches @var{PATTERN2}. +This pattern matches any cons cell whose @code{car} matches @var{qpattern1} and +whose @code{cdr} matches @var{pattern2}. @item @var{atom} This pattern matches any atom @code{equal} to @var{atom}. @item ,@var{upattern} diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 88aed7a..2188c95 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2527,7 +2527,7 @@ The server's version number. The specification version the server is compliant with. @end table -If @var{SPEC_VERSION} is @code{nil}, the server supports a +If @var{spec_version} is @code{nil}, the server supports a specification prior to @samp{"1.0"}. @end defun commit 73c050cce729cd873aa1d4cdc6834c1e78a429b1 Author: Glenn Morris Date: Wed Dec 24 15:57:34 2014 -0800 * doc/lispref/modes.texi (Defining Minor Modes, SMIE Lexer): Markup fixes. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5bf23bc..9ab84af 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2014-12-24 Glenn Morris + + * modes.texi (Defining Minor Modes, SMIE Lexer): Markup fixes. + 2014-12-23 Eli Zaretskii * windows.texi (Recombining Windows): Index subject of sections. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index d67bac6..509982a 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1490,7 +1490,7 @@ A positive prefix argument enables the mode, any other prefix argument disables it. From Lisp, an argument of @code{toggle} toggles the mode, whereas an omitted or @code{nil} argument enables the mode. This makes it easy to enable the minor mode in a major mode hook, for example. -If @var{doc} is nil, the macro supplies a default documentation string +If @var{doc} is @code{nil}, the macro supplies a default documentation string explaining the above. By default, it also defines a variable named @var{mode}, which is set to @@ -3659,7 +3659,7 @@ For example: Notice how those lexers return the empty string when in front of parentheses. This is because SMIE automatically takes care of the parentheses defined in the syntax table. More specifically if the lexer -returns nil or an empty string, SMIE tries to handle the corresponding +returns @code{nil} or an empty string, SMIE tries to handle the corresponding text as a sexp according to syntax tables. @node SMIE Tricks commit 8f1b3e5bf1627c124dcb5a9ae4adb9cbd66b3e88 Author: Glenn Morris Date: Wed Dec 24 15:19:52 2014 -0800 authors.el updates * admin/authors.el (authors-obsolete-files-regexps) (authors-ignored-files, authors-valid-file-names) (authors-renamed-files-alist, authors-renamed-files-regexps): Additions. diff --git a/admin/ChangeLog b/admin/ChangeLog index 88ce145..b32d700 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,8 +1,14 @@ +2014-12-24 Glenn Morris + + * authors.el (authors-obsolete-files-regexps) + (authors-ignored-files, authors-valid-file-names) + (authors-renamed-files-alist, authors-renamed-files-regexps): + Additions. + 2014-12-14 Paul Eggert * notes/unicode: Track leim/quail file renames. - Correct coding system - of lisp/international/titdic-cnv.el. + Correct coding system of lisp/international/titdic-cnv.el. 2014-12-14 Glenn Morris diff --git a/admin/authors.el b/admin/authors.el index 42f3bcd..790e351 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -240,7 +240,7 @@ If REALNAME is nil, ignore that author.") (defvar authors-obsolete-files-regexps '(".*loaddefs.el$" ; not obsolete, but auto-generated - "\\.\\(cvs\\|git\\)ignore$" ; obsolete or uninteresting + "\\.\\(bzr\\|cvs\\|git\\)ignore$" ; obsolete or uninteresting "\\.arch-inventory$" "automated/data/" ; not interesting ;; TODO lib/? Matches other things? @@ -314,6 +314,7 @@ Changes to files matching one of the regexps in this list are not listed.") "CODINGS" "CHARSETS" "calc/INSTALL" "calc/Makefile" "calc/README.prev" "vms-pp.trans" "_emacs" "batcomp.com" "notes/cpp" ; admin/ + "notes/BRANCH" "notes/exit-value" "emacsver.texi.in" "vpath.sed" "Cocoa/Emacs.base/Contents/Info.plist" @@ -634,6 +635,7 @@ Changes to files in this list are not listed.") "images/page-down.xpm" "images/widen.pbm" "images/widen.xpm" "images/gnus/bar.xbm" "images/gnus/bar.xpm" "images/gnus/reverse-smile.xpm" + "notes/commits" "notes/changelogs" "revdiff" ; admin/ "vcdiff" "rcs-checkin" "tindex.pl" "mainmake" "sed1.inp" "sed2.inp" "sed3.inp" ; msdos/ @@ -661,6 +663,7 @@ Changes to files in this list are not listed.") "org-lparse.el" "org-special-blocks.el" "org-taskjuggler.el" "progmodes/cap-words.el" + "w32-common-fns.el" ;; gnus "nnwfm.el" "nnlistserv.el" "nnkiboze.el" "nndb.el" "nnsoup.el" "netrc.el" "password.el" "sasl-cram.el" "sasl-digest.el" "sasl-ntlm.el" @@ -691,7 +694,7 @@ Changes to files in this list are not listed.") "etags-vmslib.c" "fakemail.c" "getdate.c" "getopt.h" "getopt1.c" "getopt_.h" "getopt_int.h" "gettext.h" "leditcfns.c" "loadst.c" "make-path.c" "qsort.c" "sorted-doc.c" "tcp.c" "timer.c" "wakeup.c" - "yow.c" "grep-changelog" + "yow.c" "grep-changelog" "grep-changelog.1" ;; etc/ "emacsclient.c" "etags.c" "hexl.c" "make-docfile.c" "movemail.c" "test-distrib.c" "testfile" @@ -801,6 +804,7 @@ in the repository.") ;; The one in lisp is eshell/eshell.el. ("eshell.el" . "automated/eshell.el") ("eshell/esh-test.el" . "automated/eshell.el") + ("automated/cl-lib.el" . "automated/cl-lib-tests.el") ("automated/package-x-test.el" . "automated/package-test.el") ;; INSTALL-CVS -> .CVS -> .BZR -> .REPO ("INSTALL-CVS" . "INSTALL.REPO") @@ -867,6 +871,8 @@ in the repository.") ("grammars/wisent-grammar.el" . "wisent/grammar.el") ;; Moved from admin/nt/ to nt/. ("nt/README.W32" . "README.W32") + ("notes/BRANCH" . "notes/repo") + ("notes/bzr" . "notes/repo") ) "Alist of files which have been renamed during their lifetime. Elements are (OLDNAME . NEWNAME).") @@ -939,6 +945,8 @@ ediff\\|emerge\\|log-edit\\|log-view\\|pcvs\\|smerge-mode\\|vc\\)\\.el\\'" ("comint-testsuite.el" "automated/\\&") ("\\`\\(bytecomp\\|font-parse\\|icalendar\\|occur\\|newsticker\\)\ -testsuite\\.el" "automated/\\1-tests.el") + ("automated/flymake/warnpred/\\(Makefile\\|test\\.\\(?:c\\|pl\\)\\)\\'" + "automated/data/flymake/\\1") ;; NB lax rules should come last. ("^m/m-\\(.*\\.h\\)$" "m/\\1" t) ("^m-\\(.*\\.h\\)$" "\\1" t) commit 541f947b979755c7f17900e3963256126f107162 Author: Glenn Morris Date: Wed Dec 24 15:19:25 2014 -0800 ChangeLog fixes diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index cd8b7f3..95e6a1c 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -107,11 +107,11 @@ 2014-10-26 Eric S. Raymond - * efaq-w32.texi: Neutralized language specific to a repository type. + * efaq-w32.texi: Neutralize language specific to a repository type. 2014-10-25 Eric S. Raymond - * gnus-coding.txt: Neutralized language specific to a repository type. + * gnus-coding.texi: Neutralize language specific to a repository type. 2014-10-20 Glenn Morris diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 21d609d..c369c79 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -913,7 +913,7 @@ implemented as a trivial call to same. Fixes the failure mode described in bug#694. - * vc/vc.el and all backends: API simplification; init-revision is + * vc/vc.el: All backends: API simplification; init-revision is gone, and vc-registered functions no longer take an initial-revision argument. @@ -1644,7 +1644,7 @@ 2014-11-16 Oscar Fuentes Add faces for the VC modeline state indicator. - * lisp/vc/vc-hooks.el: + * vc/vc-hooks.el: (vc-state-faces, vc-state-base-face) (vc-up-to-date-state, vc-needs-update-state) (vc-locked-state, vc-locally-added-state) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 3d6c78e..0c9158d 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -220,7 +220,7 @@ (ede-project-autoload): Remove dirmatch entry - it is no longer needed. - * lisp/cedet/ede/proj.el (project-rescan): Replace direct + * ede/proj.el (project-rescan): Replace direct manipulation of `ede-projects' with equivalent and better functions. (ede-proj-load): Replace call to test if dir has project to @@ -272,11 +272,10 @@ 2014-11-09 David Engster - * lisp/cedet/ede/proj-elisp.el - (ede-proj-target-elisp::ede-proj-tweak-autoconf): Kill buffer - after saving modified elisp-comp script, as to avoid "file has - changed on disk; really edit the buffer" questions when script - gets rewritten. + * ede/proj-elisp.el (ede-proj-target-elisp::ede-proj-tweak-autoconf): + Kill buffer after saving modified elisp-comp script, so as to avoid + "file has changed on disk; really edit the buffer" questions when + script gets rewritten. 2014-10-29 Paul Eggert diff --git a/test/ChangeLog b/test/ChangeLog index 7d23b3e..7d33014 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -143,7 +143,7 @@ 2014-10-22 Noam Postavsky - * test/automated/process-tests.el (process-test-quoted-batfile): + * automated/process-tests.el (process-test-quoted-batfile): New test. 2014-10-20 Glenn Morris commit eb8a8164e8954a26ac44bba9216e626408d50997 Author: Glenn Morris Date: Wed Dec 24 15:02:41 2014 -0800 ChangeLog fixes diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfe9ab1..21d609d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -65,24 +65,21 @@ 2014-12-19 Alan Mackenzie - Make C++11 uniform init syntax work. New keywords "final" and "override" - + Make C++11 uniform init syntax work. + New keywords "final" and "override" * progmodes/cc-engine.el (c-back-over-member-initializer-braces): New function. (c-guess-basic-syntax): Set `containing-sex' and `lim' using the new function. - * progmodes/cc-fonts.el (c-font-lock-declarations): Check more carefully for "are we at a declarator?" using c-back-over-member-initializers. - - * progmodes/cc-langs.el (c-type-modifier-kwds): include "final" + * progmodes/cc-langs.el (c-type-modifier-kwds): Include "final" and "override" in the C++ value. 2014-12-19 Martin Rudalics - * textmodes/ispell.el (ispell-command-loop): Don't use - `next-window'. + * textmodes/ispell.el (ispell-command-loop): Don't use `next-window'. 2014-12-21 Lars Ingebrigtsen @@ -162,7 +159,7 @@ do the window handling. (ispell-adjusted-window-height, ispell-overlay-window): Remove. (ispell-display-buffer): New function to reuse, create and fit - window to ispell's buffers. (Bug#3413) + window to ispell's buffers. (Bug#3413) 2014-12-18 Dmitry Gutov @@ -359,12 +356,12 @@ 2014-12-12 Eric S. Raymond - * vc/vc-dav.el, vc/vc-git.el, vc/vc-hg.el, vc/vc-src.el, - vc/vc.el: latest-on-branch-p is no longer a public method. + * vc/vc-dav.el, vc/vc-git.el, vc/vc-hg.el, vc/vc-src.el: + * vc/vc.el: latest-on-branch-p is no longer a public method. - * vc/vc.el, vc/vc-hg.el, vc/vc-git.el, vc/vc-hooks.el, - vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc-src.el: Remove `rollback' - method, to be replaced in the future by uncommit. + * vc/vc.el, vc/vc-hg.el, vc/vc-git.el, vc/vc-hooks.el: + * vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc-src.el: + Remove `rollback' method, to be replaced in the future by uncommit. 2014-12-11 Michael Albinus @@ -382,10 +379,9 @@ 2014-12-10 Eric S. Raymond - * vc/vc-dispatcher.el, vc/vc-hooks.el, vc/vc-rcs.el, - vc/vc-sccs.el, vc/vc.el: Righteous featurectomy of - vc-keep-workfiles, it's a shoot-self-in-foot archaism. - Workfiles are always kept. + * vc/vc-dispatcher.el, vc/vc-hooks.el, vc/vc-rcs.el: + * vc/vc-sccs.el, vc/vc.el: Righteous featurectomy of vc-keep-workfiles, + it's a shoot-self-in-foot archaism. Workfiles are always kept. 2014-12-10 Rasmus Pank Roulund @@ -416,7 +412,7 @@ 2014-12-09 Eric S. Raymond * vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument - list, avoids problems witth names containing hyphens. + list, avoids problems witt names containing hyphens. 2014-12-09 Wilson Snyder @@ -536,7 +532,7 @@ 2014-12-08 Eric S. Raymond - * vc/vc-arch.el: Moved to obsolete directory so a test framework + * vc/vc-arch.el: Move to obsolete directory so a test framework won't trip over bit-rot in it. There has been no Arch snapshot for nine years. @@ -743,13 +739,13 @@ 2014-12-02 Eric S. Raymond - * subr.el (filter): New macro. Because it's just silly for a Lisp + * subr.el (filter): New macro. Because it's just silly for a Lisp not to have this in 2014. And VC needs it. - * vc.el, all backends: API simplification: Abolish dir-status. + * vc.el: All backends: API simplification: Abolish dir-status. It's replaced by dir-status-files. - * vc.el, all backends: API simplification: Remove 4th + * vc.el: All backends: API simplification: Remove 4th 'default-state' argument from vc-dir-status files and its backend methods - no backend method ever set it. It was used only in the fallback method to to set a default of 'up-to-date, though a @@ -760,17 +756,17 @@ * vc.el (vc-expand-dirs): Now takes a second BACKEND argument, improving behavior on directories using multiple file-oriented VCSes. - * vc/vc.el and all backends: API simplification; clear-headers + * vc/vc.el: All backends: API simplification; clear-headers is no longer a public method. It is now local to the one place it's used, in the RCS steal-lock method. 2014-12-01 Eric S. Raymond - * vc/vc.el and all backends: API simplification; could-register + * vc/vc.el: In all backends: API simplification; could-register is no longer a public method. (vc-cvs.el still has a private implementation.) - * vc/vc.el and all backends: API cleanup; the backend diff method + * vc/vc.el: In all backends: API cleanup; the backend diff method takes an explicit async flag. This eliminates a particularly ugly global. @@ -885,11 +881,11 @@ the back ends; this fixes a layering violation that caused bad behavior with SVN. - * vc/vc.el, vc-hooks.el, and all backends: API simplification; + * vc/vc.el, vc-hooks.el: All backends: API simplification; vc-stay-local-p and repository-hostname are no longer public methods. Only the CVS and SVN backends used these, and the SVN support was conditioned out because svn status -v is too slow. - The CVS back end retains this machibery and the vc-stay-local + The CVS back end retains this machinery and the vc-stay-local configuration variable now only affects it. 2014-12-01 Stefan Monnier @@ -898,23 +894,23 @@ 2014-12-01 Eric S. Raymond - * vc/vc.el, vc-hooks.el, and all backends: API simplification; + * vc/vc.el, vc-hooks.el: All backends: API simplification; vc-state-heuristic is no longer a public method, having been removed where it is redundant, unnecessary, or known buggy. This eliminated all backends except CVS. Eliminates bug#7850. * vc/vc-cvs.el, vc/vc-hooks.el, vc/vc-rcs.el, vc/vc-sccs.el: Eliminate vc-mistrust-permissions. It was only relevant to the - RCS and SCCS back ends and defaulted to t. Code now always + RCS and SCCS back ends and defaulted to t. Code now always mistrusts permissions - by actual measurement the effect on - performance is negligible. As a side effect bug#11490 is now + performance is negligible. As a side effect bug#11490 is now irrelevant. - * vc/vc.el, vc-hooks.el, and all backends: API simplification; + * vc/vc.el, vc-hooks.el: All backends: API simplification; vc-workfile-unchanged-p is no longer a public method (but the RCS and SCCS back ends retain it as a private method used in state - computation). This method was redundant with vc-state and usually - implemented as a trivial call to same. Fixes the failure mode + computation). This method was redundant with vc-state and usually + implemented as a trivial call to same. Fixes the failure mode described in bug#694. * vc/vc.el and all backends: API simplification; init-revision is @@ -1077,7 +1073,7 @@ string. (newsticker--treeview-load): Change wording of the questions the user is asked when `newsticker-groups-filename' is found to be - used and we offer to read and remove the groups file. (bug#19165) + used and we offer to read and remove the groups file. (Bug#19165) 2014-11-27 Lars Magne Ingebrigtsen @@ -1282,7 +1278,7 @@ 2014-11-22 Ulf Jasper * net/newst-backend.el (newsticker--sentinel-work): - Tell `libxml-parse-xml-region' to discard comments. Fixes bug#18787. + Tell `libxml-parse-xml-region' to discard comments. Fixes bug#18787. 2014-11-22 Michael Albinus @@ -1299,7 +1295,7 @@ live in vc.el and certainly not in vc-hooks.el. * vc/vc-hooks.el, vc-rcs.el, vc-sccs.el: vc-name -> vc-master-name. - This is preaparatory to isolating all the 'master' functions + This is preparatory to isolating all the 'master' functions used only by the file-oriented back ends. With this done first, the substantive diffs will be easier to read. @@ -2342,9 +2338,9 @@ * ses.el (macroexp): Add require for this package, so that function `ses--cell gets macroexp-quote. (ses--cell): Makes formula a macroexp-quote of value when formula - is nil. The rationale of this changr is to allow in the future + is nil. The rationale of this changr is to allow in the future shorter SES files, e.g. we could have only `(ses-cell A1 1.0)' - instead of `(ses-cell A1 1.0 1.0 nil REFLIST)'. In such a case + instead of `(ses-cell A1 1.0 1.0 nil REFLIST)'. In such a case reference list REFLIST would be re-computed after load --- thus trading off load time against file size. @@ -3349,7 +3345,7 @@ HTML code has become part of the xml parse tree. (newsticker--parse-rss-1.0, newsticker--parse-rss-2.0): Take care of possibly missing namespace prefixes. - (newsticker--parse-generic-items): Code formatting. Typo. + (newsticker--parse-generic-items): Code formatting. Typo. (newsticker--images-dir): Add trailing slash. (newsticker--image-get): Fix error message. @@ -3514,7 +3510,7 @@ * vc/add-log.el (change-log-next-buffer): Don't create an empty buffer "ChangeLog" when the current buffer doesn't match ChangeLog.[0-9]. Return the current buffer if no files match the default pattern - ChangeLog.[0-9]. Signal "end of multi" when file is nil. (Bug#18547) + ChangeLog.[0-9]. Signal "end of multi" when file is nil. (Bug#18547) 2014-09-25 Stefan Monnier @@ -3652,7 +3648,7 @@ * textmodes/reftex-sel.el (reftex-select-label-mode) (reftex-select-bib-mode, reftex-insert-docstruct): Derive modes from special-mode (instead of fundamental-mode) and propertize - with font-lock-face instead of just face. (Bug#18496) + with font-lock-face instead of just face. (Bug#18496) * textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto. @@ -4046,7 +4042,7 @@ of local overrides. (ibuffer): Don't store previous windows configuration. Let `quit-window' handle restoring. - (ibuffer-quit): Remove function. Use `quit-window' instead. + (ibuffer-quit): Remove function. Use `quit-window' instead. (ibuffer-restore-window-config-on-quit): Remove variable. (ibuffer-prev-window-config): Remove variable. @@ -4300,10 +4296,10 @@ 2014-08-11 Ulf Jasper - Newsticker: introduce `newsticker-treeview-date-format'. (Bug#17227) - + Newsticker: introduce `newsticker-treeview-date-format'. (Bug#17227) * net/newst-treeview.el (newsticker-treeview-date-format): New. - (newsticker--treeview-list-add-item): Use `newsticker-treeview-date-format'. + (newsticker--treeview-list-add-item): + Use `newsticker-treeview-date-format'. 2014-08-11 Glenn Morris @@ -4512,7 +4508,7 @@ 2014-07-30 Christophe Deleuze (tiny change) * calendar/icalendar.el (icalendar--decode-isodatetime): - Use actual current-time-zone when converting to local time. (Bug#15408) + Use actual current-time-zone when converting to local time. (Bug#15408) 2014-07-29 Martin Rudalics @@ -4901,7 +4897,7 @@ 2014-07-12 Fabián Ezequiel Gallina - Fix dedenters and electric colon handling. (Bug#15163) + Fix dedenters and electric colon handling. (Bug#15163) * progmodes/python.el (python-rx-constituents): Add dedenter and block-ender. (python-indent-dedenters, python-indent-block-enders): Delete. @@ -5149,7 +5145,7 @@ * progmodes/python.el (python-indent-post-self-insert-function): Enhancements to electric indentation behavior inside - parens. (Bug#17658) + parens. (Bug#17658) 2014-07-03 Stefan Monnier @@ -5940,7 +5936,7 @@ * help.el (help--key-binding-keymap): New function. (help--binding-locus): New function. (describe-key): Mention the keymap in which the binding was - found. (bug#13948) + found. (bug#13948) 2014-06-12 Stefan Monnier @@ -6621,7 +6617,7 @@ 2014-05-24 Daniel Colascione * progmodes/subword.el (subword-find-word-boundary): Move point to - correct spot before search. (Bug#17580) + correct spot before search. (Bug#17580) * emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid breaking the build. @@ -6650,7 +6646,7 @@ mksh. Improve custom spec; allow regular expressions. (sh-shell): Delegate name splitting to `sh-canonicalize-shell'. (sh-after-hack-local-variables): New function. - (sh-mode): Use it; respect file-local `sh-shell' variable. (bug#17333) + (sh-mode): Use it; respect file-local `sh-shell' variable. (Bug#17333) (sh-set-shell): Use `sh-canonicalize-shell' instead of open-coding the normalization. (sh-canonicalize-shell): Rewrite to support regexes. @@ -7638,7 +7634,7 @@ 2014-04-07 João Távora Fix `electric-pair-delete-adjacent-pairs' in modes binding - backspace. (bug#16981) + backspace. (Bug#16981) * elec-pair.el (electric-pair-backward-delete-char): Delete. (electric-pair-backward-delete-char-untabify): Delete. (electric-pair-mode-map): Bind backspace to a menu item filtering commit 52aebd664eed99ad32f07cafc560e090ce79c16f Author: Glenn Morris Date: Wed Dec 24 14:50:50 2014 -0800 ChangeLog fixes diff --git a/ChangeLog b/ChangeLog index d62ccf1..425984a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ -2014-12-23 Stephen Leake - - * CONTRIBUTE: add Savannah url, cleanup announcing freeze. +2014-12-24 Stephen Leake + + * CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi. + Add Savannah url, cleanup announcing freeze. + (commit messages): New, gathered from comments on emacs-devel. + (Changelog notes): Add reference to GNU coding standards section 5.2; + doc 'present tense', bug fix format. + (branches): Freeze announcements are made on info-gnu-emacs mailing + list. + (git vs rename): New. 2014-12-23 Paul Eggert @@ -10,37 +17,9 @@ 2014-12-16 stdalign: work around Apple GCC 4.0 bug * lib/stdalign.in.h, lib/utimens.c, m4/stdalign.m4: Update from gnulib. -2014-12-19 Stephen Leake - - Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi - - Fixes bug#19299 - - * CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi - (commit messages): new, gathered from comments on emacs-devel - (Changelog notes): add reference to GNU coding standards section 5.2; - doc 'present tense', bug fix format - (branches): freeze announcements are made on info-gnu-emacs mailing - list - (git vs rename): new - - * doc/emacs/trouble.texi: Move user-level information from CONTRIBUTE here - - * lisp/startup.el (fancy-about-text): change buttons for etc/CONTRIBUTE - to (info "(emacs)Contributing") - 2014-12-14 Paul Eggert - Spelling fixes - All uses changed. - * lib-src/etags.c (analyze_regex): Rename from analyse_regex. - * lisp/cedet/semantic/lex-spp.el: - (semantic-lex-spp-analyzer-do-replace): - Rename from semantic-lex-spp-anlyzer-do-replace. - * lisp/emacs-lisp/cconv.el (cconv--analyze-use): - Rename from cconv--analyse-use. - (cconv--analyze-function): Rename from cconv--analyse-function. - (cconv-analyze-form): Rename from cconv-analyse-form. + Spelling fixes. All uses changed. * src/regex.c (analyze_first): Rename from analyze_first. 2014-12-14 Glenn Morris diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index d2f7a34..7081c19 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2014-12-24 Stephen Leake + + * trouble.texi: Move user-level information from CONTRIBUTE here. + 2014-12-14 Alan Mackenzie * display.texi (Scrolling): fast-but-imprecise-scrolling. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 9b6c0da..600cc67 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2014-12-14 Paul Eggert + + * etags.c (analyze_regex): Rename from analyse_regex. + 2014-12-14 Glenn Morris * grep-changelog: Remove file. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42b2fc4..cfe9ab1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-24 Stephen Leake + + * startup.el (fancy-about-text): Change buttons for etc/CONTRIBUTE + to (info "(emacs)Contributing"). (Bug#19299) + 2014-12-24 Martin Rudalics * window.el (mouse-autoselect-window-position-1): New variable. @@ -281,6 +286,13 @@ * vc/vc-bzr.el (vc-bzr-diff): * obsolete/vc-arch.el (vc-arch-diff): Move ASYNC argument to the end. +2014-12-14 Paul Eggert + + * emacs-lisp/cconv.el (cconv--analyze-use): + Rename from cconv--analyse-use. + (cconv--analyze-function): Rename from cconv--analyse-function. + (cconv-analyze-form): Rename from cconv-analyse-form. + 2014-12-13 Andreas Schwab * net/shr.el (shr-next-link): Don't error out at eob. diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index a43e94c..3d6c78e 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -17,6 +17,11 @@ (semantic-analyze-nolongprefix-completion-at-point-function): Do nothing if the current buffer is not using Semantic (bug#19077). +2014-12-14 Paul Eggert + + * semantic/lex-spp.el (semantic-lex-spp-analyzer-do-replace): + Rename from semantic-lex-spp-anlyzer-do-replace. + 2014-12-08 Matt Curtis (tiny change) * pulse.el (pulse-momentary-highlight-one-line): Respect the POINT diff --git a/src/ChangeLog b/src/ChangeLog index b90471e..b5fb351 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -202,6 +202,10 @@ Call gnutls_certificate_set_x509_system_trust. Log an error message if it fails. +2014-12-14 Paul Eggert + + * regex.c (analyze_first): Rename from analyze_first. + 2014-12-13 Paul Eggert * alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of commit 1783e6cbb52bc0a9d31688fd11ad3a0e81473520 Author: Glenn Morris Date: Wed Dec 24 14:43:12 2014 -0800 ChangeLog fix diff --git a/etc/ChangeLog b/etc/ChangeLog index aebf771..cbfe1d6 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,10 +1,6 @@ -2014-12-24 Álvar Ibeas +2014-12-24 Álvar Ibeas (tiny change) - * tutorials/TUTORIAL.es: Improve style consistency. - -2014-12-24 Álvar Ibeas - - * tutorials/TUTORIAL.es: Spelling fixes. + * tutorials/TUTORIAL.es: Improve style consistency. Spelling fixes. 2014-11-19 Paul Eggert commit c741b1b5bff8dadc25bcef6953c1579817a923d9 Author: Álvar Ibeas Date: Wed Dec 24 20:15:05 2014 +0100 TUTORIAL.es: Improve style consistency * tutorials/TUTORIAL.es: Improve style consistency. diff --git a/etc/ChangeLog b/etc/ChangeLog index 1a39358..aebf771 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,5 +1,9 @@ 2014-12-24 Álvar Ibeas + * tutorials/TUTORIAL.es: Improve style consistency. + +2014-12-24 Álvar Ibeas + * tutorials/TUTORIAL.es: Spelling fixes. 2014-11-19 Paul Eggert diff --git a/etc/tutorials/TUTORIAL.es b/etc/tutorials/TUTORIAL.es index ff4d5f3..0983e5d 100644 --- a/etc/tutorials/TUTORIAL.es +++ b/etc/tutorials/TUTORIAL.es @@ -16,7 +16,7 @@ ocasión, usaremos las siguientes abreviaturas. Nota importante: para terminar la sesión de Emacs teclee C-x C-c (dos caracteres). Para cancelar un comando parcialmente introducido, teclee C-g. -Los caracteres ">>" en el margen izquierdo indican instrucciones para +Los caracteres «>>» en el margen izquierdo indican instrucciones para que usted trate de usar un comando. Por ejemplo: <> [Mitad de página en blanco para propósitos didácticos. El texto continúa abajo] @@ -111,7 +111,7 @@ C-f puede moverse a través de una nueva línea igual que C-b. Cuando pase el tope o el final de la pantalla, se mostrará el texto más allá del borde de la pantalla. Esto recibe el nombre de -"desplazamiento". Esto le permite a Emacs mover el cursor al lugar +«desplazamiento». Esto le permite a Emacs mover el cursor al lugar especificado en el texto sin moverlo fuera de la pantalla. >> Intente mover el cursor fuera del borde de la pantalla con C-n, y @@ -149,7 +149,7 @@ Vea cómo la repetición de C-a no hace nada, pero la repetición de M-a sigue moviendo una oración más. Aunque no son muy análogas, cada una parece natural. -La ubicación del cursor en el texto se llama también "punto". En +La ubicación del cursor en el texto se llama también «punto». En otras palabras, el cursor muestra sobre la pantalla donde está situado el punto dentro del texto. @@ -178,7 +178,7 @@ Otros dos comandos importantes de movimiento del cursor son M-< (META Menor que), el cual se mueve al comienzo del texto entero, y M-> (META Mayor que), el cual se mueve al final del texto entero. -En la mayoría de las terminales, el "<" está sobre la coma, por lo +En la mayoría de las terminales, el «<» está sobre la coma, por lo tanto tiene que usar la tecla shift para teclearlo. En estas terminales tendrá que usar la tecla shift también al teclear M-<; sin la tecla shift, usted estaría escribiendo M-coma. @@ -207,7 +207,7 @@ una tecla META (o EDIT o ALT), hay una manera alternativa para ingresar un argumento numérico: teclear los dígitos mientras presiona la tecla META. Recomendamos aprender el método C-u porque éste funciona en cualquier terminal. El argumento numérico es también -llamado un "argumento prefijo", porque usted teclea el argumento antes +llamado un «argumento prefijo», porque usted teclea el argumento antes del comando al que se aplica. Por ejemplo, C-u 8 C-f mueve hacia adelante ocho caracteres. @@ -253,7 +253,7 @@ comienzo de un comando que no quiere finalizar. >> Escriba C-u 100 para hacer un argumento numérico de 100, y luego pruebe C-g. - Ahora pruebe C-f. Esto deberá mover sólo un carácter, ya que + Ahora pruebe C-f. Esto deberá mover solo un carácter, ya que canceló el argumento con C-g. Si ha tecleado por error, puede desecharlo con un C-g. @@ -262,7 +262,7 @@ Si ha tecleado por error, puede desecharlo con un C-g. * COMANDOS DESACTIVADOS ----------------------- -Algunos comandos de Emacs están "desactivados" de manera que los +Algunos comandos de Emacs están «desactivados» de manera que los usuarios principiantes no puedan usarlos accidentalmente. Si teclea uno de los comandos desactivados, Emacs muestra un mensaje @@ -271,7 +271,7 @@ continuar y ejecutar el comando. Si realmente quiere intentar el comando, teclee Espacio como repuesta a la pregunta. Normalmente, si no quiere ejecutar el comando -desactivado, conteste la pregunta con "n". +desactivado, conteste la pregunta con «n». >> Escriba C-x C-l (que es un comando desactivado), a continuación escriba n para responder la pregunta. @@ -280,7 +280,7 @@ desactivado, conteste la pregunta con "n". * VENTANAS ---------- -Emacs puede tener varias "ventanas", cada una mostrando su propio texto. +Emacs puede tener varias «ventanas», cada una mostrando su propio texto. Explicaremos después cómo usar múltiples ventanas. Ahora mismo queremos explicar cómo deshacerse de ventanas adicionales y volver a la edición básica en una ventana. Es sencillo: @@ -310,15 +310,15 @@ cuatro caracteres. Si quiere insertar un texto, basta con que lo teclee. Los caracteres normales, como A, 7, *, etc. se insertan nada más teclearlos. Teclee - (la tecla "Enter" o "Intro") para insertar un carácter de + (la tecla «Enter» o «Intro») para insertar un carácter de nueva línea. Para borrar el carácter que precede al cursor, oprima . Es una -tecla alargada, normalmente etiquetada como "Backspace" o "Del", o con +tecla alargada, normalmente etiquetada como «Backspace» o «Del», o con una flecha apuntando a la izquierda; la misma que suele utilizar fuera de Emacs para borrar el último carácter introducido. -Puede haber otra tecla llamada "Del" o "Supr" en otra parte, pero ésa +Puede haber otra tecla llamada «Del» o «Supr» en otra parte, pero ésa no es . >> Haga esto ahora: teclee unos pocos caracteres, después bórrelos @@ -327,9 +327,9 @@ no es . personal de él. Cuando una línea de texto se hace muy grande para una sola línea de la -pantalla, la línea de texto "continúa" en una segunda línea en la +pantalla, la línea de texto «continúa» en una segunda línea en la pantalla. Si está usando un entorno gráfico, se mostrarán pequeñas -flechas curvas en las estrechas franjas vacías (los "márgenes" derecho +flechas curvas en las estrechas franjas vacías (los «márgenes» derecho e izquierdo) a cada lado del área de texto, para indicar que la línea continúa. Si está utilizando una terminal, la continuación se señala mediante una barra invertida («\») en la última columna de la derecha. @@ -357,13 +357,13 @@ circundante, puede además insertar espacio en blanco tras el carácter de fin de línea, de forma que, al seguir tecleando en la línea recién creada, el texto que tecleamos quede alineado con el de la línea anterior. Este comportamiento (que la pulsación de una tecla no solo -inserte el carácter correspondiente) se denomina "eléctrico". +inserte el carácter correspondiente) se denomina «eléctrico». ->> Veamos un ejemplo de comportamiento "eléctrico" de +>> Veamos un ejemplo de comportamiento «eléctrico» de Teclee al final de esta línea. Fíjese que, tras insertar el carácter de nueva línea, Emacs inserta -también espacios para que el cursor se sitúe bajo la "T" de "Teclee". +también espacios para que el cursor se sitúe bajo la «T» de «Teclee». Recuerde que a la mayoría de los comandos de Emacs se les puede dar un factor de repetición; esto incluye los caracteres de texto. Repetir @@ -375,7 +375,7 @@ Ya ha aprendido la manera más básica de teclear algo en Emacs y corregir errores. Puede borrar por palabras o por líneas. He aquí un resumen de las operaciones de borrado: - borra el carácter justo antes que el cursor + borra el carácter justo antes del cursor C-d borra el siguiente carácter después del cursor M- Elimina la palabra inmediatamente antes del @@ -389,29 +389,29 @@ Note que y C-d, comparados con M- y M-d, extienden el paralelismo iniciado por C-f y M-f (bien, no es realmente una tecla de control, pero no nos preocuparemos de eso ahora). C-k y M-k, en cierta forma, son como C-e y M-e, en que las líneas de unos -corresponden a sentencias en los otros. +corresponden a oraciones en los otros. También puede eliminar un segmento contiguo de texto con un método uniforme. Muévase a un extremo de ese segmento de texto, y teclee C-@ -o C-SPC (cualquiera de los dos). (SPC es la barra espaciadora.) +o C- (cualquiera de los dos). ( es la barra espaciadora.) Luego, mueva el cursor al otro extremo del texto que desea eliminar. Al hacerlo, Emacs resaltará el texto situado entre el cursor y la -posición en la que tecleó C-SPC. Finalmente, teclee C-w. Eso elimina +posición en la que tecleó C-. Finalmente, teclee C-w. Eso elimina todo el texto entre las dos posiciones. >> Mueva el cursor a la letra T del inicio del párrafo anterior. ->> Teclee C-SPC. Emacs debe mostrar el mensaje "Mark set" en la parte +>> Teclee C-. Emacs debe mostrar el mensaje «Mark set» en la parte de abajo de la pantalla. ->> Mueva el cursor a la x en "extremo", en la segunda línea del +>> Mueva el cursor a la x en «extremo», en la segunda línea del párrafo. >> Teclee C-w. Esto eliminará el texto que comienza desde la T, y termina justo antes de la x. -La diferencia entre "eliminar" y "borrar" es que el texto "eliminado" +La diferencia entre «eliminar» y «borrar» es que el texto «eliminado» puede ser reinsertado (en cualquier posición), mientras que las cosas -"borradas" no pueden ser reinsertadas (sin embargo, es posible +«borradas» no pueden ser reinsertadas (sin embargo, es posible deshacer el borrado; ver más abajo). La reinserción de texto -eliminado se llama "yanking" o "pegar". Generalmente, los comandos +eliminado se llama «yanking» o «pegar». Generalmente, los comandos que pueden quitar mucho texto lo eliminan (para que pueda pegarlo de nuevo) mientras que los comandos que quitan solo un carácter, o solo líneas en blanco y espacios, borran (y por tanto no se puede pegar lo @@ -430,13 +430,13 @@ especialmente: elimina ese número de líneas y TAMBIÉN sus contenidos. Esto no es una simple repetición. C-u 2 C-k elimina dos líneas y sus nuevas líneas, tecleando C-k dos veces no hace esto. -Reinsertar texto eliminado se denomina "yanking" o "pegar". (Piense +Reinsertar texto eliminado se denomina «yanking» o «pegar». (Piense en ello como pegar de nuevo, o traer de vuelta, algún texto que le fue quitado.) Puede pegar el texto eliminado, ya sea el lugar en que fue eliminado, o en otra parte del buffer, o hasta en un archivo diferente. Puede pegar el texto varias veces, lo que hace varias copias de él. Algunos editores se refieren a eliminar y reinsertar -como "cortar" y "pegar" (consulte el Glosario en el manual de Emacs). +como «cortar» y «pegar» (consulte el Glosario en el manual de Emacs). El comando para pegar es C-y. Reinserta el último texto eliminado, en la posición actual del cursor. @@ -460,7 +460,7 @@ Después de haber tecleado C-y para conseguir la eliminación más reciente, tecleando M-y reemplaza el texto pegado con la eliminación previa. Tecleando M-y una y otra vez traerá las eliminaciones anteriores. Cuando haya encontrado el texto que buscaba, no tiene que -hacer nada para conservarlo. Sólo siga con su edición, dejando el +hacer nada para conservarlo. Solo siga con su edición, dejando el texto pegado en donde está. Si teclea M-y suficientes veces, regresa al punto inicial (la @@ -513,29 +513,29 @@ si puede pegarlo con C-y; no hay diferencia alguna para deshacer. Para que pueda hacer permanente el texto que edite, lo debe colocar en un archivo. De otra manera, éste se perderá cuando cierre Emacs. -Para poder poner su texto en un archivo, debe "encontrar" el archivo -antes de ingresar el texto. (Esto se llama también "visitar" el +Para poder poner su texto en un archivo, debe «encontrar» el archivo +antes de ingresar el texto. (Esto se llama también «visitar» el archivo.) Encontrar un archivo significa que puede ver su contenido dentro de Emacs. En cierta forma, es como si estuviera editando el archivo mismo. Sin embargo los cambios que haga mediante Emacs no serán -permanentes hasta que "guarde" el archivo. Esto es para evitar dejar +permanentes hasta que «guarde» el archivo. Esto es para evitar dejar un archivo a medio cambiar en el sistema cuando no quiera. Incluso cuando guarde, Emacs dejará el archivo original bajo un nombre cambiado en caso de que luego decida que sus cambios fueron un error. Si mira cerca del final de la pantalla podrá ver una línea que -comienza con guiones, y empieza con " -:--- TUTORIAL.es" o algo así. +comienza con guiones, y empieza con « U:--- TUTORIAL.es» o algo así. Esta parte de la pantalla normalmente muestra el nombre del archivo que está visitando. En este momento está visitando su propia copia -del tutorial de Emacs, que se llama "TUTORIAL.es". Cuando encuentre +del tutorial de Emacs, que se llama «TUTORIAL.es». Cuando encuentre un archivo con Emacs, el nombre de ese archivo aparecerá en ese mismo punto. Una cosa especial acerca del comando para encontrar un archivo es que tendrá que decir qué nombre de archivo desea. Decimos que el comando -"lee un argumento" (en este caso, el argumento es el nombre del +«lee un argumento» (en este caso, el argumento es el nombre del archivo). Después de teclear el comando: C-x C-f Encontrar un archivo @@ -565,19 +565,19 @@ comando Esto copia el texto dentro de Emacs al archivo. La primera vez que haga esto, Emacs renombrará el archivo original con un nuevo nombre -para que éste no se pierda. El nuevo nombre se hace agregando "~" al +para que éste no se pierda. El nuevo nombre se hace agregando «~» al final del nombre del archivo original. Cuando guardar haya terminado, Emacs mostrará el nombre del archivo escrito. >> Teclee C-x C-s TUTORIAL.es Esto guardará el tutorial en un archivo llamado TUTORIAL.es, y - mostrará "Wrote ...TUTORIAL.es" al final de la pantalla. + mostrará «Wrote ...TUTORIAL.es» al final de la pantalla. Puede encontrar un archivo existente, para verlo o editarlo. También puede hacerlo con un archivo que no exista. Ésta es la forma de crear un archivo en Emacs: encuentre el archivo, que está inicialmente vacío, luego comience a insertar el texto para ese archivo. Cuando invoque -"guardar" el archivo, Emacs creará realmente el archivo con el texto +«guardar» el archivo, Emacs creará realmente el archivo con el texto que ha insertado. De ahí en adelante, puede considerar que está editando un archivo existente. @@ -591,7 +591,7 @@ C-f. De esta forma puede mantener un gran número de archivos dentro de Emacs. Emacs almacena cada texto del archivo dentro de un objeto llamado -"buffer". Al encontrar un archivo se crea un nuevo buffer dentro de +«buffer». Al encontrar un archivo se crea un nuevo buffer dentro de Emacs. Para mirar la lista de los buffers que existen actualmente, teclee: @@ -605,14 +605,14 @@ una ventana de Emacs es siempre parte de algún buffer. >> Teclee C-x 1 para deshacerse de la lista de buffers. -Cuando tenga varios buffers, solo uno de ellos es "actual" en algún +Cuando tenga varios buffers, solo uno de ellos es «actual» en algún momento. Ese buffer es el que actualmente edita. Si quiere editar -otro buffer, necesita "cambiar" a él. Si quiere cambiar a un buffer +otro buffer, necesita «cambiar» a él. Si quiere cambiar a un buffer que corresponde a un archivo, puede hacerlo visitando el archivo de nuevo con C-x C-f. Pero existe una manera más rápida: use el comando C-x b. En ese comando, necesita teclear el nombre de buffer. ->> Cree un archivo llamado "foo" tecleando C-x C-f foo . +>> Cree un archivo llamado «foo» tecleando C-x C-f foo . Después teclee C-x b TUTORIAL.es para regresar a este tutorial. @@ -622,12 +622,12 @@ esto no es así siempre. La lista de buffers que hace con C-x C-b muestra el nombre de cada buffer y de su archivo correspondiente. Algunos buffers no corresponden a un archivo. El buffer llamado -"*Buffer List*", que contiene la lista de buffers que ha creado con +«*Buffer List*», que contiene la lista de buffers que ha creado con C-x C-b, no tiene archivo. Este buffer TUTORIAL.es al principio no tenía archivo, pero ahora sí, porque en la sección anterior tecleó C-x C-s y lo guardó en un archivo. -El buffer llamado "*Messages*" tampoco tiene un archivo +El buffer llamado «*Messages*» tampoco tiene un archivo correspondiente. Este buffer contiene los mensajes que han aparecido en la línea de abajo durante su sesión de Emacs. @@ -649,7 +649,7 @@ guardado. Le pregunta, por cada buffer, si quiere guardarlo o no. >> Inserte una línea de texto, luego teclee C-x s. Debería preguntarle si desea guardar el buffer llamado TUTORIAL.es. - Conteste sí a la pregunta tecleando "y". + Conteste «sí» a la pregunta tecleando «y». * EXTENDER EL CONJUNTO DE COMANDOS @@ -675,14 +675,14 @@ Si está utilizando una pantalla gráfica, no necesita ningún comando especial para cambiar de Emacs a otra aplicación. Puede hacerlo con el ratón, o mediante el gestor de ventanas. Sin embargo, si está usando una terminal que solo puede mostrar una aplicación a la vez, -tendrá que "suspender" Emacs para poder acceder a otras aplicaciones. +tendrá que «suspender» Emacs para poder acceder a otras aplicaciones. C-z es el comando para salir de Emacs *temporalmente*: para que pueda regresar a la misma sesión de Emacs después. Cuando Emacs está -ejecutándose en una terminal, C-z "suspende" Emacs; esto es, se +ejecutándose en una terminal, C-z «suspende» Emacs; esto es, se regresa al intérprete de comandos pero no se destruye Emacs. En los intérpretes de comandos más comunes, puede reanudar Emacs con el -comando "fg" o con "%emacs". +comando «fg» o con «%emacs». El momento para usar C-x C-c es cuando está listo para salir del sistema. Es además el paso correcto para salir de un Emacs invocado @@ -706,7 +706,7 @@ con menos frecuencia, o únicamente en ciertos modos. Un ejemplo es el comando replace-string, el cual substituye una cadena de caracteres por otra en todo el buffer. Cuando teclea M-x, Emacs le pregunta al final de la pantalla con M-x y debe escribir el nombre del comando; en -este caso "replace-string". Solo teclee "repl s" y Emacs +este caso «replace-string». Solo teclee «repl s» y Emacs completará el nombre. ( es la tecla del tabulador, que habitualmenté está situada sobre la tecla de bloquear mayúsculas o la de shift, en el lado izquierdo del teclado.) Para aceptar el comando @@ -721,7 +721,7 @@ Debe terminar cada argumento con . M-x repl scambiadoalterado. Note cómo ha cambiado la línea: ha substituido la palabra - "cambiado" por "alterado" en cada ocurrencia, después de la + «cambiado» por «alterado» en cada ocurrencia, después de la posición inicial del cursor. @@ -730,10 +730,10 @@ Debe terminar cada argumento con . Si ha hecho cambios en un archivo, pero no los ha guardado, éstos podrían perderse si su computadora falla. Para protegerlo de esto, -Emacs periódicamente escribe un archivo "auto guardado" para cada +Emacs escribe periódicamente un archivo «auto guardado» para cada archivo que está editando. El nombre del archivo auto guardado tiene un # al principio y al final; por ejemplo, si su archivo se llama -"hola.c", su archivo auto guardado es "#hola.c#". Cuando guarda por +«hola.c», su archivo auto guardado es «#hola.c#». Cuando guarda por la vía normal, Emacs borra su archivo de auto guardado. Si la computadora falla, puede recuperar su edición de auto guardado @@ -748,16 +748,16 @@ para seguir adelante y recuperar la información de auto guardado. Si Emacs ve que usted está tecleando comandos de multicaracteres lentamente, se los muestra al final de la pantalla en un área llamada -"área de eco". El área de eco contiene la línea final de la pantalla. +«área de eco». El área de eco contiene la línea final de la pantalla. * LÍNEA DE MODO --------------- La línea inmediatamente encima del área de eco recibe el nombre de -"línea de modo" o "mode line". La línea de modo dice algo así: +«línea de modo» o «mode line». La línea de modo dice algo así: - -:**- TUTORIAL.es 63% L749 (Fundamental) + U:**- TUTORIAL.es 63% L749 (Fundamental) Esta línea da información útil acerca del estado de Emacs y del texto que está editando. @@ -766,9 +766,9 @@ Ya sabe qué significa el nombre del archivo: es el archivo que usted ha encontrado. NN% indica su posición actual en el texto; esto significa que NN por ciento del texto está encima de la parte superior de la pantalla. Si el principio del archivo está en la pantalla, éste -dirá "Top" en vez de " 0%". Si el final del texto está en la -pantalla, dirá "Bot". Si está mirando un texto tan pequeño que cabe -entero en la pantalla, el modo de línea dirá "All". +dirá «Top» en vez de « 0%». Si el final del texto está en la +pantalla, dirá «Bot». Si está mirando un texto tan pequeño que cabe +entero en la pantalla, el modo de línea dirá «All». La L y los dígitos señalan la posición de otra forma: indican el número de línea actual del punto. @@ -780,13 +780,13 @@ parte de la línea de modo no muestra asteriscos, solo guiones. La parte de la línea de modo dentro de los paréntesis es para indicarle en qué modo de edición está. El modo por omisión es Fundamental, el cual está usando ahora. Éste es un ejemplo de un -"modo mayor". +«modo mayor». Emacs tiene diferentes modos mayores. Algunos están hechos para editar diferentes lenguajes y/o clases de texto, tales como modo de Lisp, modo de Texto, etc. En cualquier momento uno y solo un modo mayor está activo, y su nombre siempre se puede encontrar en la línea -de modo, justo en donde "Fundamental" está ahora. +de modo, justo en donde «Fundamental» está ahora. Cada modo mayor hace que algunos comandos actúen diferente. Por ejemplo, hay comandos para crear comentarios en un programa, y como @@ -808,7 +808,7 @@ modo Fundamental, M-f y M-b trataban los apóstrofes como separadores de palabras. Los modos mayores normalmente hacen cambios sutiles como el anterior: -la mayoría de comandos hacen "el mismo trabajo" en cada modo mayor, +la mayoría de comandos hacen «el mismo trabajo» en cada modo mayor, pero funcionan de forma un poco diferente. Para ver la documentación del modo mayor actual, teclee C-h m. @@ -840,11 +840,11 @@ Puede activar el modo Auto Fill al hacer M-x auto-fill-mode . Cuando el modo esté activado, puede desactivarlo nuevamente usando M-x auto-fill-mode . Si el modo está desactivado, este comando lo activa, y si el modo está activado, este comando lo desactiva. -Decimos que el comando "cambia el modo". +Decimos que el comando «cambia el modo». >> teclee M-x auto-fill-mode ahora. Luego inserte una línea - de "asdf " repetidas veces hasta que la vea dividida en dos líneas. - Debe intercalar espacios porque Auto Fill sólo rompe líneas en los + de «asdf » repetidas veces hasta que la vea dividida en dos líneas. + Debe intercalar espacios porque Auto Fill solo rompe líneas en los espacios. El margen está normalmente puesto en 70 caracteres, pero puede @@ -867,48 +867,48 @@ ese párrafo. * BUSCAR -------- -Emacs puede hacer búsquedas de cadenas (una "cadena" es un grupo de +Emacs puede hacer búsquedas de cadenas (una «cadena» es un grupo de caracteres contiguos) hacia adelante a través del texto o hacia atrás en el mismo. La búsqueda de una cadena es un comando de movimiento de cursor; mueve el cursor al próximo lugar donde esa cadena aparece. -El comando de búsqueda de Emacs es "incremental". Esto significa que +El comando de búsqueda de Emacs es «incremental». Esto significa que la búsqueda ocurre mientras teclea la cadena para buscarla. El comando para iniciar una búsqueda es C-s para búsqueda hacia adelante, y C-r para la búsqueda hacia atrás. ¡PERO ESPERE! No los intente aún. -Cuando teclee C-s verá que la cadena "I-search" aparece como una +Cuando teclee C-s verá que la cadena «I-search» aparece como una petición en el área de eco. Esto le indica que Emacs está en lo que se conoce como búsqueda incremental, esperando que teclee lo que quiere buscar. termina una búsqueda. >> Ahora teclee C-s para comenzar la búsqueda. LENTAMENTE, una letra - a la vez, teclee la palabra "cursor", haciendo pausa después de + a la vez, teclee la palabra «cursor», haciendo pausa después de cada carácter para notar lo que pasa con el cursor. - Ahora ha buscado "cursor", una vez. + Ahora ha buscado «cursor», una vez. >> Teclee C-s de nuevo, para buscar la siguiente ocurrencia de - "cursor". + «cursor». >> Ahora teclee cuatro veces y vea como se mueve el cursor. >> Teclee para terminar la búsqueda. ¿Vio lo que ocurrió? Emacs, en una búsqueda incremental, trata de ir a la ocurrencia de la cadena que ha tecleado hasta el momento. Para -ir a la próxima ocurrencia de "cursor" solo teclee C-s de nuevo. Si +ir a la próxima ocurrencia de «cursor» solo teclee C-s de nuevo. Si tal ocurrencia no existe, Emacs pita y le dice que la búsqueda actual -está fallando ("failing"). C-g también termina la búsqueda. +está fallando («failing»). C-g también termina la búsqueda. Si se encuentra en medio de una búsqueda incremental y teclea , -la búsqueda "vuelve" a un punto anterior. Si teclea justo +la búsqueda «vuelve» a un punto anterior. Si teclea justo después de teclear C-s para avanzar hasta la siguiente ocurrencia de la cadena buscada, el cursor retrocede a una ocurrencia previa. Si no hay ocurrencias previas, borra el último carácter de la cadena -buscada. Por ejemplo, suponga que ha tecleado "c", para buscar la -primera ocurrencia de "c". Ahora, si teclea "u", el cursor se moverá -a la primera ocurrencia de "cu". Ahora teclee . Esto borra la -"u" de la cadena buscada, y el cursor vuelve a la primera ocurrencia -de "c". +buscada. Por ejemplo, suponga que ha tecleado «c», para buscar la +primera ocurrencia de «c». Ahora, si teclea «u», el cursor se moverá +a la primera ocurrencia de «cu». Ahora teclee . Esto borra la +«u» de la cadena buscada, y el cursor vuelve a la primera ocurrencia +de «c». Si está en medio de una búsqueda y teclea un carácter control o meta (con algunas pocas excepciones: los caracteres que son especiales en @@ -926,8 +926,8 @@ la búsqueda se invierte. Una de las características agradables de Emacs es que se puede mostrar más de una ventana en la pantalla al mismo tiempo. (Note que Emacs -usa el término "marcos", descrito en la siguiente sección, para -referirse a lo que otras aplicaciones llaman "ventanas". El manual de +usa el término «marcos», descrito en la siguiente sección, para +referirse a lo que otras aplicaciones llaman «ventanas». El manual de Emacs contiene un Glosario de términos.) >> Mueva el cursor a esta línea y teclee C-l C-l. @@ -939,7 +939,7 @@ Emacs contiene un Glosario de términos.) >> Teclee C-M-v para desplazar la ventana inferior. (Si no tiene una tecla META real, teclee ESC C-v.) ->> Teclee C-x o ("o" para "otro") para mover el cursor a la ventana +>> Teclee C-x o («o» para «otro») para mover el cursor a la ventana inferior. >> Use C-v y M-v en la ventana inferior para desplazarla. Siga leyendo estas direcciones en la ventana superior. @@ -949,7 +949,7 @@ Emacs contiene un Glosario de términos.) El cursor en la ventana superior está justo donde estaba antes. Puede continuar usando C-x o para cambiar entre las ventanas. La -"ventana seleccionada", donde tiene lugar casi toda la edición, es la +«ventana seleccionada», donde tiene lugar casi toda la edición, es la que tiene un cursor muy visible que parpadea cuando usted no está tecleando. Las otras ventanas tienen su propia posición del cursor; si está ejecutando Emacs en una pantalla gráfica, esos cursores se @@ -962,7 +962,7 @@ C-M-v. C-M-v es un ejemplo de un carácter CONTROL-META. Si tiene una tecla META (o Alt), puede teclear C-M-v pulsando a la vez CONTROL y META -mientras teclea v. No importa qué tecla "vaya primero", CONTROL o +mientras teclea v. No importa qué tecla «vaya primero», CONTROL o META, porque las dos teclas actúan modificando los caracteres que teclea. @@ -975,8 +975,8 @@ sí mismo, no es una tecla modificadora. ventana de abajo. (Si hubiera tecleado C-x 1 en la ventana inferior, esto eliminaría la -superior. Piense en este comando como "mantener sólo una -ventana --aquella en la cual estoy--".) +superior. Piense en este comando como «mantener solo una +ventana —aquella en la cual estoy—».) No tiene por qué mostrarse el mismo buffer en ambas ventanas. Si usa C-x C-f para encontrar un archivo en una ventana, la otra ventana no @@ -997,10 +997,10 @@ diferentes: * MÚLTIPLES MARCOS ------------------ -Emacs puede crear también múltiples "marcos". Marco es como +Emacs puede crear también múltiples «marcos». Marco es como denominamos a un grupo de ventanas, junto con sus menús, barras de desplazamiento, áreas de eco, etc. En entornos gráficos, lo que Emacs -denomina "marco" es lo que otras aplicaciones llaman "ventana". En +denomina «marco» es lo que otras aplicaciones llaman «ventana». En entornos gráficos, es posible mostrar varios marcos al mismo tiempo. En una terminal, solo se puede mostrar un marco a la vez. @@ -1015,7 +1015,7 @@ El primer marco no tiene nada de especial. También puede destruir un marco mediante el método normal que ofrezca el entorno gráfico (a menudo, pinchando con el ratón en un botón -etiquetado como "X" en alguna de las esquinas superiores del marco). +etiquetado como «X» en alguna de las esquinas superiores del marco). Si al hacer eso destruye el último marco de Emacs, la aplicación termina. @@ -1023,20 +1023,20 @@ termina. * NIVELES RECURSIVOS DE EDICIÓN -------------------------------- -Algunas veces entrará a lo que es llamado un "nivel recursivo de -edición". Esto se indica en la línea de modo mediante corchetes en la +Algunas veces entrará a lo que es llamado un «nivel recursivo de +edición». Esto se indica en la línea de modo mediante corchetes en la línea de modo, rodeando los paréntesis del nombre del modo mayor. Por ejemplo, probablemente vea [(Fundamental)] en vez de (Fundamental). Para salir de los niveles recursivos de edición, teclee ESC ESC ESC. -Éste es un comando de "salida" para todo propósito. También lo puede +Éste es un comando de «salida» para todo propósito. También lo puede usar para eliminar ventanas extras, y salir del minibuffer. >> Teclee M-x para entrar a un minibuffer; luego teclee ESC ESC ESC para salir. -No se puede usar C-g para salir de los "niveles recursivos de -edición". Esto es porque C-g es usado para cancelar comandos y +No se puede usar C-g para salir de los «niveles recursivos de +edición». Esto es porque C-g es usado para cancelar comandos y argumentos DENTRO del nivel recursivo de edición. @@ -1048,8 +1048,8 @@ que empiece a usar Emacs. Hay tanto disponible en Emacs que sería imposible explicar todo aquí. Sin embargo, quizá desee aprender más sobre Emacs, ya que tiene muchas otras características útiles. Emacs provee comandos para leer documentación acerca de los comandos de -Emacs. Todos estos comandos de "ayuda" comienzan con el carácter -Control-h, que es llamado "el carácter de Ayuda (Help)". +Emacs. Todos estos comandos de «ayuda» comienzan con el carácter +Control-h, que es llamado «el carácter de Ayuda (Help)». Para usar las funciones de ayuda, teclee el carácter C-h, y luego un carácter que especifica qué tipo de ayuda quiere. Si está REALMENTE @@ -1069,7 +1069,7 @@ una descripción muy breve del comando. C-p runs the command previous-line -Esto le dice el "nombre de la función". Ya que los nombres de las +Esto le dice el «nombre de la función». Ya que los nombres de las funciones se eligen para indicar lo que hace el comando, pueden servir como una breve documentación: suficiente para recordarle los comandos que ha aprendido. @@ -1113,7 +1113,7 @@ pregunte por ella. >> Teclee C-h a file . Esto muestra en otra ventana una lista de todos los comandos M-x con -la palabra "file" en sus nombres. Verá los comandos de caracteres +la palabra «file» en sus nombres. Verá los comandos de caracteres listados junto a los nombres de los comandos correspondientes (por ejemplo, C-x C-f junto a find-file). @@ -1123,7 +1123,7 @@ ejemplo, C-x C-f junto a find-file). >> Teclee C-x 1 para borrar la ventana de ayuda. C-h i Leer los manuales incluidos (alias Info). Este comando - lo pone en un buffer especial llamado "*info*" donde + lo pone en un buffer especial llamado «*info*» donde puede leer manuales de los paquetes instalados en su sistema. Teclee m emacs para leer el manual de Emacs. Si nunca ha usado Info, teclee ? y Emacs y @@ -1137,22 +1137,22 @@ ejemplo, C-x C-f junto a find-file). --------------------- Puede aprender más acerca de Emacs leyendo su manual, ya sea como -libro o en el propio Emacs (use el menú Ayuda, "Help", o teclee C-h +libro o en el propio Emacs (use el menú Ayuda, «Help», o teclee C-h r). Dos características que pueden gustarle son la completación, que ahorra teclear, y dired, que simplifica el manejo de archivos. La completación es una manera de ahorrar teclear innecesariamente. -Por ejemplo, si quiere cambiarse al buffer "*Messages*", puede teclear +Por ejemplo, si quiere cambiarse al buffer «*Messages*», puede teclear C-x b *M y Emacs encontrará el resto del nombre del buffer tan lejos como pueda determinar de lo que ya haya tecleado. La completación también funciona con nombres de comandos y de archivos. La completación se describe en el Info del manual de Emacs en el nodo -llamado "Completion". +llamado «Completion». Dired le permite listar los archivos en un directorio (y opcionalmente sus subdirectorios), moverse alrededor de esa lista, visitar, renombrar, borrar y aparte de eso operar en los archivos. Dired está -descrito en el manual de Emacs en el nodo llamado "Dired". +descrito en el manual de Emacs en el nodo llamado «Dired». El manual también describe otras características de Emacs. @@ -1200,7 +1200,7 @@ La versión en español ha sido actualizada por: Rafael Sepúlveda Juanma Barranquero -Por favor, en caso de duda, sólo es válido el original en inglés de la +Por favor, en caso de duda, solo es válido el original en inglés de la siguiente nota de derechos de reproducción (que puede encontrar en el archivo TUTORIAL). @@ -1220,7 +1220,7 @@ Copyright (C) 1985, 1996, 1998, 2001-2014 Free Software Foundation, Inc. Las condiciones para copiar Emacs mismo son más complejas, pero con el mismo espíritu. Por favor lea el archivo COPYING y luego distribuya copias de GNU Emacs a sus amigos. ¡Ayude a erradicar el -obstruccionismo del software ("propietariedad") usando, escribiendo, y +obstruccionismo del software («propietariedad») usando, escribiendo, y compartiendo software libre! --- end of TUTORIAL.es --- commit f89efeaba835116540b284bc6f760956c7d063bb Author: Álvar Ibeas Date: Wed Dec 24 20:09:46 2014 +0100 TUTORIAL.es: spelling fixes * tutorials/TUTORIAL.es: Spelling fixes. diff --git a/etc/ChangeLog b/etc/ChangeLog index a416c86..1a39358 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2014-12-24 Álvar Ibeas + + * tutorials/TUTORIAL.es: Spelling fixes. + 2014-11-19 Paul Eggert Lessen focus on ChangeLog files, as opposed to change log entries. diff --git a/etc/tutorials/TUTORIAL.es b/etc/tutorials/TUTORIAL.es index 604aaf7..ff4d5f3 100644 --- a/etc/tutorials/TUTORIAL.es +++ b/etc/tutorials/TUTORIAL.es @@ -67,11 +67,11 @@ Es útil moverse de una pantalla completa a otra pero, ¿cómo moverse a un lugar específico dentro del texto en la pantalla? Puede hacerlo de diversas formas. Puede usar las teclas de flechas, -pero es mas eficiente mantener las manos en la posición estándar y +pero es más eficiente mantener las manos en la posición estándar y usar los comandos C-p, C-b, C-f, y C-n. Estos caracteres son equivalentes a las cuatro teclas de flechas, de esta manera: - Línea anterior, C-P + Línea anterior, C-p : : Atrás, C-b.... Posición actual del cursor .... Adelante, C-f @@ -133,10 +133,10 @@ dirección opuesta. Note el paralelo entre C-f y C-b de un lado y M-f y M-b del otro. Muy frecuentemente los caracteres Meta se usan para operaciones -relacionadas, con las unidades definidas por el lenguaje (palabras, +relacionadas con las unidades definidas por el lenguaje (palabras, oraciones y párrafos), mientras los caracteres Control operan sobre unidades básicas que son independientes de lo que está editando -(caracteres, líneas, etc). +(caracteres, líneas, etc.). Este paralelo se aplica entre líneas y oraciones: C-a y C-e para moverse al comienzo o al final de la línea; y M-a y M-e para mover al @@ -426,7 +426,7 @@ borran. Con un argumento, eliminan. Note que al teclear C-k una sola vez elimina el contenido de la línea, y un segundo C-k elimina la línea misma, y hace que todas las otras líneas se muevan hacia arriba. C-k trata un argumento numérico -especialmente: Elimina ese número de líneas y TAMBIÉN sus +especialmente: elimina ese número de líneas y TAMBIÉN sus contenidos. Esto no es una simple repetición. C-u 2 C-k elimina dos líneas y sus nuevas líneas, tecleando C-k dos veces no hace esto. @@ -533,7 +533,7 @@ del tutorial de Emacs, que se llama "TUTORIAL.es". Cuando encuentre un archivo con Emacs, el nombre de ese archivo aparecerá en ese mismo punto. -Una cosa especial acerca del comando para encontrar un archivo, es que +Una cosa especial acerca del comando para encontrar un archivo es que tendrá que decir qué nombre de archivo desea. Decimos que el comando "lee un argumento" (en este caso, el argumento es el nombre del archivo). Después de teclear el comando: @@ -649,7 +649,7 @@ guardado. Le pregunta, por cada buffer, si quiere guardarlo o no. >> Inserte una línea de texto, luego teclee C-x s. Debería preguntarle si desea guardar el buffer llamado TUTORIAL.es. - Conteste si a la pregunta tecleando "y". + Conteste sí a la pregunta tecleando "y". * EXTENDER EL CONJUNTO DE COMANDOS @@ -893,7 +893,7 @@ quiere buscar. termina una búsqueda. >> Ahora teclee cuatro veces y vea como se mueve el cursor. >> Teclee para terminar la búsqueda. -¿Vió lo que ocurrió? Emacs, en una búsqueda incremental, trata de ir +¿Vio lo que ocurrió? Emacs, en una búsqueda incremental, trata de ir a la ocurrencia de la cadena que ha tecleado hasta el momento. Para ir a la próxima ocurrencia de "cursor" solo teclee C-s de nuevo. Si tal ocurrencia no existe, Emacs pita y le dice que la búsqueda actual @@ -976,7 +976,7 @@ sí mismo, no es una tecla modificadora. (Si hubiera tecleado C-x 1 en la ventana inferior, esto eliminaría la superior. Piense en este comando como "mantener sólo una -ventana--aquella en la cual estoy.") +ventana --aquella en la cual estoy--".) No tiene por qué mostrarse el mismo buffer en ambas ventanas. Si usa C-x C-f para encontrar un archivo en una ventana, la otra ventana no @@ -998,7 +998,7 @@ diferentes: ------------------ Emacs puede crear también múltiples "marcos". Marco es como -denominamos a un grupo de ventanas, junto con sus menus, barras de +denominamos a un grupo de ventanas, junto con sus menús, barras de desplazamiento, áreas de eco, etc. En entornos gráficos, lo que Emacs denomina "marco" es lo que otras aplicaciones llaman "ventana". En entornos gráficos, es posible mostrar varios marcos al mismo tiempo. @@ -1040,7 +1040,7 @@ edición". Esto es porque C-g es usado para cancelar comandos y argumentos DENTRO del nivel recursivo de edición. -* CONSEGUIR MAS AYUDA +* CONSEGUIR MÁS AYUDA --------------------- En este tutorial hemos tratado de ofrecer suficiente información para @@ -1074,7 +1074,7 @@ funciones se eligen para indicar lo que hace el comando, pueden servir como una breve documentación: suficiente para recordarle los comandos que ha aprendido. -Los comandos de múltiples caracteres tales como C-x C-s y (sí no tiene +Los comandos de múltiples caracteres tales como C-x C-s y (si no tiene las teclas META o EDIT o ALT) v también están permitidos después de C-h c. @@ -1164,7 +1164,7 @@ Para salir permanentemente de Emacs use C-x C-c. Este tutorial intenta ser comprensible para todos los usuarios nuevos, así que si encuentra algo que no esté claro, no se quede parado -culpándose a sí mismo: ¡Quéjese! +culpándose a sí mismo: ¡quéjese! * COPIA commit 350b30fa7ec0c374da6b015f4d8e31a62abe9fff Author: Martin Rudalics Date: Wed Dec 24 19:37:45 2014 +0100 Handle glitch in delayed autoselection of windows. * window.el (mouse-autoselect-window-position-1): New variable. (mouse-autoselect-window-cancel) (mouse-autoselect-window-select, handle-select-window): With delayed autoselection select window only if mouse moves after selecting its frame. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0882a51..42b2fc4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2014-12-24 Martin Rudalics + + * window.el (mouse-autoselect-window-position-1): New variable. + (mouse-autoselect-window-cancel) + (mouse-autoselect-window-select, handle-select-window): With + delayed autoselection select window only if mouse moves after + selecting its frame. + 2014-12-24 Michael Albinus * eshell/esh-ext.el (eshell-find-interpreter): Expand relative diff --git a/lisp/window.el b/lisp/window.el index c95b0d6..cb9f1ed 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7798,6 +7798,9 @@ With arg N, put point N/10 of the way from the true end." (defvar mouse-autoselect-window-timer nil "Timer used by delayed window autoselection.") +(defvar mouse-autoselect-window-position-1 nil + "First mouse position recorded by delayed window autoselection.") + (defvar mouse-autoselect-window-position nil "Last mouse position recorded by delayed window autoselection.") @@ -7822,6 +7825,7 @@ Optional argument FORCE means cancel unconditionally." (memq (nth 4 (event-end last-input-event)) '(handle end-scroll))))) (setq mouse-autoselect-window-state nil) + (setq mouse-autoselect-window-position-1 nil) (when (timerp mouse-autoselect-window-timer) (cancel-timer mouse-autoselect-window-timer)) (remove-hook 'pre-command-hook 'mouse-autoselect-window-cancel))) @@ -7863,21 +7867,32 @@ is active. This function is run by `mouse-autoselect-window-timer'." ;; A menu / popup dialog is active or the mouse is not on the ;; text region of WINDOW: Suspend autoselection temporarily. (mouse-autoselect-window-start mouse-position nil t)) - ((eq mouse-autoselect-window-state 'suspend) + ((or (eq mouse-autoselect-window-state 'suspend) + ;; When the mouse is at its first recorded position, restart + ;; delayed autoselection. This works around a scenario with + ;; two two-window frames with identic dimensions: Select the + ;; first window of the first frame, switch to the second + ;; frame, move the mouse to its second window, minimize the + ;; second frame. Now the second window of the first frame + ;; gets selected although the mouse never really "moved" into + ;; that window. + (and (numberp mouse-autoselect-window) + (equal (mouse-position) mouse-autoselect-window-position-1))) ;; Delayed autoselection was temporarily suspended, reenable it. (mouse-autoselect-window-start mouse-position)) ((and window (not (eq window (selected-window))) (or (not (numberp mouse-autoselect-window)) - (and (> mouse-autoselect-window 0) - ;; If `mouse-autoselect-window' is positive, select - ;; window if the window is the same as before. + (and (>= mouse-autoselect-window 0) + ;; If `mouse-autoselect-window' is non-negative, + ;; select window if it's the same as before. (eq window mouse-autoselect-window-window)) - ;; Otherwise select window if the mouse is at the same - ;; position as before. Observe that the first test after - ;; starting autoselection usually fails since the value of - ;; `mouse-autoselect-window-position' recorded there is the - ;; position where the mouse has entered the new window and - ;; not necessarily where the mouse has stopped moving. + ;; Otherwise select window iff the mouse is at the same + ;; position as before. Observe that the first test + ;; after starting autoselection usually fails since the + ;; value of `mouse-autoselect-window-position' recorded + ;; there is the position where the mouse has entered the + ;; new window and not necessarily where the mouse has + ;; stopped moving. (equal mouse-position mouse-autoselect-window-position)) ;; The minibuffer is a candidate window if it's active. (or (not (window-minibuffer-p window)) @@ -7921,14 +7936,14 @@ is active. This function is run by `mouse-autoselect-window-timer'." (not (minibuffer-window-active-p window))) ;; Don't switch when autoselection shall be delayed. (and (numberp mouse-autoselect-window) - (not (zerop mouse-autoselect-window)) (not (eq mouse-autoselect-window-state 'select)) - (progn + (let ((position (mouse-position))) ;; Cancel any delayed autoselection. (mouse-autoselect-window-cancel t) ;; Start delayed autoselection from current mouse ;; position and window. - (mouse-autoselect-window-start (mouse-position) window) + (setq mouse-autoselect-window-position-1 position) + (mouse-autoselect-window-start position window) ;; Executing a command cancels delayed autoselection. (add-hook 'pre-command-hook 'mouse-autoselect-window-cancel)))) commit f3be0025481f15717198befe557208614e513e92 Merge: b4161ac 882370e Author: Stephen Leake Date: Wed Dec 24 07:42:40 2014 -0600 resolve ChangeLog merge conflict commit 0d48826fd3c0836a110cd94ef7f7184272857eed Author: Jan D Date: Wed Dec 24 12:26:25 2014 +0100 Avoid compiler warning. * nsimage.m (setPixmapData): Rename local variable bmRep to avoid compiler warning. diff --git a/src/ChangeLog b/src/ChangeLog index 530b913..2840109 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ (dealloc): Release bmRep. (setPixmapData): Make bmRep local so class member is not set (Bug#19133). + (setPixmapData): Rename local variable bmRep to avoid compiler + warning. 2014-12-24 Jan Djärv diff --git a/src/nsimage.m b/src/nsimage.m index a625f20..cb3d82a 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -351,15 +351,15 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) { if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) { - NSBitmapImageRep *bmRep = (NSBitmapImageRep *) rep; + NSBitmapImageRep *bmr = (NSBitmapImageRep *) rep; - if ([bmRep numberOfPlanes] >= 3) - [bmRep getBitmapDataPlanes: pixmapData]; + if ([bmr numberOfPlanes] >= 3) + [bmr getBitmapDataPlanes: pixmapData]; /* The next two lines cause the DPI of the image to be ignored. This seems to be the behavior users expect. */ [self setScalesWhenResized: YES]; - [self setSize: NSMakeSize([bmRep pixelsWide], [bmRep pixelsHigh])]; + [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])]; break; } commit 5fc82109bab6f51d8be7134f1368f14c628794e9 Author: Jan D Date: Wed Dec 24 12:24:14 2014 +0100 Backport: Memory leak fix and 19133 fix. Fixes: debbugs:19133 * nsimage.m (allocInitFromFile:): Initialize bmRep. (dealloc): Release bmRep. (setPixmapData): Make bmRep local so class member is not set. diff --git a/src/ChangeLog b/src/ChangeLog index f98afd80..530b913 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,11 @@ -2014-11-02 Jan Djärv +2014-12-24 Jan Djärv + + * nsimage.m (allocInitFromFile:): Initialize bmRep. + (dealloc): Release bmRep. + (setPixmapData): Make bmRep local so class member is not + set (Bug#19133). + +2014-12-24 Jan Djärv * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference, imageListSetNext, imageListNext. diff --git a/src/nsimage.m b/src/nsimage.m index cb29bf1..a625f20 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -174,6 +174,7 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) image = [[EmacsImage alloc] initByReferencingFile: [NSString stringWithUTF8String: SSDATA (found)]]; + image->bmRep = nil; #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; #else @@ -199,6 +200,7 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) - (void)dealloc { [stippleMask release]; + [bmRep release]; [super dealloc]; } @@ -245,6 +247,7 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) if (s >= bits + length) { [bmRep release]; + bmRep = nil; return nil; } #define hexchar(x) ('0' <= (x) && (x) <= '9' ? (x) - '0' : (x) - 'a' + 10) @@ -348,7 +351,7 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) { if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) { - bmRep = (NSBitmapImageRep *) rep; + NSBitmapImageRep *bmRep = (NSBitmapImageRep *) rep; if ([bmRep numberOfPlanes] >= 3) [bmRep getBitmapDataPlanes: pixmapData]; commit bef46ba222e11e6f9942fae796b42e718317ec0e Author: Jan D Date: Wed Dec 24 12:12:19 2014 +0100 Fix bad bug number reference, shall be 19427. diff --git a/src/ChangeLog b/src/ChangeLog index 75545ac..f98afd80 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -12,7 +12,7 @@ 2014-12-22 Jan Djärv * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert - when going to fullscreen (Bug#0x180004f). + when going to fullscreen (Bug#19427). 2014-12-18 Eli Zaretskii commit 2566f386bf0ba1e652524aecb43667d9d8ebd929 Author: Jan D Date: Wed Dec 24 12:10:01 2014 +0100 Backport: Don't cache images in nsimage.m (Bug#18918). Fixes: Bug#18918 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference, imageListSetNext, imageListNext. * nsimage.m (ImageList, imageListNext, imageListSetNext:) (reference): Remove. (allocInitFromFile:): Remove searching ImageList and calling reference (Bug#18918). (dealloc): Remove handling if ImageList. diff --git a/src/ChangeLog b/src/ChangeLog index 9aeb8f2..75545ac 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2014-11-02 Jan Djärv + + * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference, + imageListSetNext, imageListNext. + + * nsimage.m (ImageList, imageListNext, imageListSetNext:) + (reference): Remove. + (allocInitFromFile:): Remove searching ImageList and calling + reference (Bug#18918). + (dealloc): Remove handling if ImageList. + 2014-12-22 Jan Djärv * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert diff --git a/src/nsimage.m b/src/nsimage.m index 6b68072..cb29bf1 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -160,25 +160,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) @implementation EmacsImage -static EmacsImage *ImageList = nil; - + allocInitFromFile: (Lisp_Object)file { - EmacsImage *image = ImageList; NSImageRep *imgRep; Lisp_Object found; - - /* look for an existing image of the same name */ - while (image != nil && - [[image name] compare: [NSString stringWithUTF8String: SSDATA (file)]] - != NSOrderedSame) - image = [image imageListNext]; - - if (image != nil) - { - [image reference]; - return image; - } + EmacsImage *image; /* Search bitmap-file-path for the file, if appropriate. */ found = x_find_image_file (file); @@ -205,54 +191,14 @@ static EmacsImage *ImageList = nil; [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])]; [image setName: [NSString stringWithUTF8String: SSDATA (file)]]; - [image reference]; - ImageList = [image imageListSetNext: ImageList]; return image; } -- reference -{ - refCount++; - return self; -} - - -- imageListSetNext: (id)arg -{ - imageListNext = arg; - return self; -} - - -- imageListNext -{ - return imageListNext; -} - - - (void)dealloc { - id list = ImageList; - - if (refCount > 1) - { - refCount--; - return; - } - [stippleMask release]; - - if (list == self) - ImageList = imageListNext; - else - { - while (list != nil && [list imageListNext] != self) - list = [list imageListNext]; - [list imageListSetNext: imageListNext]; - } - [super dealloc]; } diff --git a/src/nsterm.h b/src/nsterm.h index 115d7ac..aa23e20 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -358,16 +358,11 @@ typedef float EmacsCGFloat; @interface EmacsImage : NSImage { - id imageListNext; - int refCount; NSBitmapImageRep *bmRep; /* used for accessing pixel data */ unsigned char *pixmapData[5]; /* shortcut to access pixel data */ NSColor *stippleMask; } + allocInitFromFile: (Lisp_Object)file; -- reference; -- imageListSetNext: (id)arg; -- imageListNext; - (void)dealloc; - initFromXBM: (unsigned char *)bits width: (int)w height: (int)h flip: (BOOL)flip; commit 216c6aadf22bfb9d209b6ce9a469499fd6e1b78f Author: Michael Albinus Date: Wed Dec 24 09:58:49 2014 +0100 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 789f59e..2272812 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-24 Michael Albinus + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): + Use `tramp-rsh-end-of-line', it ought to be more robust. + 2014-12-23 Stefan Monnier * progmodes/js.el (js-syntax-propertize): "return" can't be divided diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index a78d101..444c9a7 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2456,11 +2456,9 @@ The method used must be an out-of-band method." (tramp-set-connection-property p "vector" orig-vec) (tramp-compat-set-process-query-on-exit-flag p nil) - ;; When `shell-file-name' is "cmdproxy", we must adapt - ;; `tramp-local-end-of-line' for sending the password. - (let ((tramp-local-end-of-line - (if (string-match "cmdproxy" shell-file-name) - "\n" tramp-local-end-of-line))) + ;; We must adapt `tramp-local-end-of-line' for + ;; sending the password. + (let ((tramp-local-end-of-line tramp-rsh-end-of-line)) (tramp-process-actions p v nil tramp-actions-copy-out-of-band)) commit 882370eaa4f7ad6a88396dfdc64f896c727f87f4 Author: Michael Albinus Date: Wed Dec 24 09:52:18 2014 +0100 eshell/esh-ext.el: Expand relative remote file names. Fixes: debbugs:18782 * eshell/esh-ext.el (eshell-find-interpreter): Expand relative remote file names. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b93d76..0882a51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-24 Michael Albinus + + * eshell/esh-ext.el (eshell-find-interpreter): Expand relative + remote file names. (Bug#18782) + 2014-12-23 Sam Steingold * shell.el (shell-display-buffer-actions): New user option. diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 2654bf2..d7fea47 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -296,6 +296,11 @@ line of the form #!." (let ((fullname (if (file-name-directory file) file (eshell-search-path file))) (suffixes eshell-binary-suffixes)) + (if (and fullname + (not (file-remote-p fullname)) + (file-remote-p default-directory)) + (setq fullname (expand-file-name + (concat "./" fullname) default-directory))) (if (and fullname (not (or eshell-force-execution (file-executable-p fullname)))) (while suffixes commit b4161ac70e4206cc00263e0c1f765b4cf95dfd33 Author: Stephen Leake Date: Tue Dec 23 17:38:57 2014 -0600 * CONTRIBUTE: add Savannah url, cleanup announcing freeze. diff --git a/CONTRIBUTE b/CONTRIBUTE index a190bd9..3bc49cf 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -8,7 +8,8 @@ http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html An "Emacs Developer" is someone who contributes a lot of code or documentation to the Emacs repository. Generally, they have write -access to the Emacs git repository on Savannah. +access to the Emacs git repository on Savannah +https://savannah.gnu.org/git/?group=emacs. ** Write access to the Emacs repository. @@ -123,15 +124,13 @@ Development is discussed on the emacs-devel mailing list. Sometime before the release of a new major version of Emacs a "feature freeze" is imposed on the trunk, to prepare for creating a release branch. No new features may be added to the trunk after this point, -until the release branch is created. This freeze is announced on the -emacs-devel mailing list, and not anywhere else. +until the release branch is created. Announcements about the freeze +(and other important events) are made on the info-gnu-emacs mailing +list, and not anywhere else. The trunk branch is named "master" in git; release branches are named "emacs-nn" where "nn" is the major version. -Announcements about the freeze (and other important events) are made -on the info-gnu-emacs mailing list. - If you are fixing a bug that exists in the current release, be sure to commit it to the release branch; it will be merged to the master branch later. diff --git a/ChangeLog b/ChangeLog index 30fae4d..a380abd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-23 Stephen Leake + + * CONTRIBUTE: add Savannah url, cleanup announcing freeze. + 2014-12-19 Stephen Leake Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi commit fcb978e24023e9af4e465ac98222543990c70ffc Author: Stephen Leake Date: Tue Dec 23 13:11:45 2014 -0600 Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi Fixes bug#19299 * CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi (commit messages): new, gathered from comments on emacs-devel (Changelog notes): add reference to GNU coding standards section 5.2; doc 'present tense', bug fix format (branches): freeze announcements are made on info-gnu-emacs mailing list (git vs rename): new * doc/emacs/trouble.texi: Move user-level information from CONTRIBUTE here * lisp/startup.el (fancy-about-text): change buttons for etc/CONTRIBUTE to (info "(emacs)Contributing") diff --git a/CONTRIBUTE b/CONTRIBUTE index dc6fd71..a190bd9 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -1,196 +1,14 @@ -Copyright (C) 2006-2014 Free Software Foundation, Inc. -See end for license conditions. +This file contains information on Emacs developer processes. +For information on contributing to Emacs as a non-developer, see +(info "(emacs)Contributing") or +http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html - Contributing to Emacs - -Emacs is a collaborative project and we encourage contributions from -anyone and everyone. If you want to contribute in the way that will -help us most, we recommend (1) fixing reported bugs and (2) -implementing the feature ideas in etc/TODO. However, if you think of -new features to add, please suggest them too -- we might like your -idea. Porting to new platforms is also useful, when there is a new -platform, but that is not common nowadays. - -For documentation on Emacs (to understand how to implement your -desired change), refer to: - -- the Emacs Manual - http://www.gnu.org/software/emacs/manual/emacs.html - (info "(Emacs)Top") - -- the Emacs Lisp Reference Manual - http://www.gnu.org/software/emacs/manual/elisp.html - (info "(elisp)Top") - -- http://www.gnu.org/software/emacs - -- http://www.emacswiki.org/ - -There are many ways to contribute to Emacs: - -- implement a new feature, and submit a patch (see "Submitting - Patches" below). - -- answer questions on the Emacs user mailing list - https://lists.gnu.org/mailman/listinfo/help-gnu-emacs - -- write documentation, either on the wiki, or in the Emacs source - repository (see "Submitting Patches" below) - -- find and report bugs; use M-x report-emacs-bug - -- check if existing bug reports are fixed in newer versions of Emacs - http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs - -- develop a package that works with Emacs, and publish it on your own - or in Gnu ELPA (see admin/notes/elpa). - -Here are some style and legal conventions for contributors to Emacs: - - -* Coding Standards - -Contributed code should follow the GNU Coding Standards -(http://www.gnu.org/prep/standards/ - may also be available in info on -your system). - -If it doesn't, we'll need to find someone to fix the code before we -can use it. - -Emacs has additional style and coding conventions: - -- the "Tips" Appendix in the Emacs Lisp Reference - http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html - (info "(elisp)Tips"). - -- Avoid using `defadvice' or `eval-after-load' for Lisp code to be - included in Emacs. - -- Remove all trailing whitespace in all source and text files. - -- Emacs has no convention on whether to use tabs in source code; - please don't change whitespace in the files you edit. - -- Use ?\s instead of ? in Lisp code for a space character. - -* Copyright Assignment - -The FSF (Free Software Foundation) is the copyright holder for GNU Emacs. -The FSF is a nonprofit with a worldwide mission to promote computer -user freedom and to defend the rights of all free software users. -For general information, see the website http://www.fsf.org/ . - -Generally speaking, for non-trivial contributions to GNU Emacs we -require that the copyright be assigned to the FSF. For the reasons -behind this, see: http://www.gnu.org/licenses/why-assign.html . - -Copyright assignment is a simple process. Residents of some countries -can do it entirely electronically. We can help you get started, and -answer any questions you may have (or point you to the people with the -answers), at the emacs-devel@gnu.org mailing list. - -(Please note: general discussion about why some GNU projects ask -for a copyright assignment is off-topic for emacs-devel. -See gnu-misc-discuss instead.) - -A copyright disclaimer is also a possibility, but we prefer an assignment. -Note that the disclaimer, like an assignment, involves you sending -signed paperwork to the FSF (simply saying "this is in the public domain" -is not enough). Also, a disclaimer cannot be applied to future work, it -has to be repeated each time you want to send something new. - -We can accept small changes (roughly, fewer than 15 lines) without -an assignment. This is a cumulative limit (e.g. three separate 5 line -patches) over all your contributions. - -* Getting the Source Code - -The current working version of the Emacs source code is stored in a -git repository on the Savannah web site -(http://savannah.gnu.org/projects/emacs). It is important to write -your patch based on the current working version. If you start from an -older version, your patch may be outdated (so that maintainers will -have a hard time applying it), or changes in Emacs may have made your -patch unnecessary. - -After you have downloaded the repository source, you should read the file -INSTALL.REPO for build instructions (they differ to some extent from a -normal build). - -* Submitting Patches - -Every patch must have several pieces of information before we -can properly evaluate it. - -When you have all these pieces, bundle them up in a mail message and -send it to the developers. Sending it to bug-gnu-emacs@gnu.org -(which is the bug/feature list) is recommended, because that list -is coupled to a tracking system that makes it easier to locate patches. -If your patch is not complete and you think it needs more discussion, -you might want to send it to emacs-devel@gnu.org instead. If you -revise your patch, send it as a followup to the initial topic. - -** Description - -For bug fixes, a description of the bug and how your patch fixes it. - -For new features, a description of the feature and your implementation. - -** ChangeLog - -A ChangeLog entry as plaintext (separate from the patch). - -See the existing ChangeLog files for format and content. Note that, -unlike some other projects, we do require ChangeLogs for -documentation, i.e. Texinfo files. - -Ref: "Change Log Concepts" node of the GNU Coding Standards Info -Manual, for how to write good log entries. -http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html - -When using git, commit messages should use ChangeLog format, with a -single short line explaining the change, then an empty line, then -unindented ChangeLog entries. (Essentially, a commit message should -be a duplicate of what the patch adds to the ChangeLog files. We are -planning to automate this better, to avoid the duplication.) You can -use the Emacs functions log-edit-add-to-changelog or -log-edit-insert-changelog to ease this process. - -** The patch itself. - -If you are accessing the Emacs repository, make sure your copy is -up-to-date (e.g. with 'git pull'). You can commit your changes -to a private branch and generate a patch from the master version -by using - git format-patch master -Or you can leave your changes uncommitted and use - git diff -With no repository, you can use - diff -u OLD NEW - -** Mail format. - -We prefer to get the patches as plain text, either inline (be careful -your mail client does not change line breaks) or as MIME attachments. - -** Please reread your patch before submitting it. - -** Do not mix changes. - -If you send several unrelated changes together, we will ask you to -separate them so we can consider each of the changes by itself. - -** Do not make formatting changes. - -Making cosmetic formatting changes (indentation, etc) makes it harder -to see what you have really changed. - - -* Supplemental information for Emacs Developers. +* Information for Emacs Developers. An "Emacs Developer" is someone who contributes a lot of code or -documentation to the Emacs repository. +documentation to the Emacs repository. Generally, they have write +access to the Emacs git repository on Savannah. ** Write access to the Emacs repository. @@ -213,6 +31,31 @@ entry in their name, not yours. git distinguishes between the author and the committer; use the --author option on the commit command to specify the actual author; the committer defaults to you. +** commit messages + +When using git, commit messages should use ChangeLog format, with the +following modifications: + +- Add a single short line explaining the change, then an empty line, + then unindented ChangeLog entries. + + You can use various Emacs functions to ease this process; see (info + "(emacs)Change Log Commands") or + http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. + +- The summary line is limited to 72 characters (enforced by a commit + hook). If you have trouble making that a good summary, add a + paragraph below it, before the individual file descriptions. + +- If only a single file is changed, the summary line can be the normal + file first line (starting with the asterisk). Then there is no + individual files section. + +- Explaining the rationale for a design choice is best done in comments + in the source code. However, sometimes it is useful to describe just + the rationale for a change; that can be done in the commit message + between the summary line and the file entries. + ** Changelog notes - Emacs generally follows the GNU coding standards when it comes to @@ -222,11 +65,25 @@ specify the actual author; the committer defaults to you. standards used to recommend) rather than 'like-this' (as they do now), because `...' is so widely used elsewhere in Emacs. +- Some of the rules in the GNU coding standards section 5.2 + "Commenting Your Work" also apply to Changelog entries: they must be + in English, and be complete sentences starting with a capital and + ending with a period (except the summary line should not end in a + period). + + It is tempting to relax this rule for commit messages, since they + are somewhat transient. However, they are preserved indefinitely, + and have a reasonable chance of being read in the future, so it's + better that they have good presentation. + - There are multiple ChangeLogs in the emacs source; roughly one per high-level directory. The ChangeLog entry for a commit belongs in the lowest ChangeLog that is higher than or at the same level as any file changed by the commit. +- Use the present tense; describe "what the change does", not "what + the change did". + - Preferred form for several entries with the same content: * help.el (view-lossage): @@ -235,7 +92,13 @@ specify the actual author; the committer defaults to you. (Rather than anything involving "ditto" and suchlike.) -- In ChangeLog files, there is no standard or recommended way to +- If the commit fixes a bug, add a separate line + + Fixes: bug#NNNN + + where NNNN is the bug number. + +- In ChangeLog entries, there is no standard or recommended way to identify revisions. One way to identify revisions is by quoting their summary line. @@ -244,7 +107,7 @@ specify the actual author; the committer defaults to you. "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit" will suffice. -- There is no need to make separate change log entries for files such +- There is no need to make separate ChangeLog entries for files such as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration of files such as 'configure'. "There is no need" means you don't have to, but you can if you want to. @@ -266,9 +129,8 @@ emacs-devel mailing list, and not anywhere else. The trunk branch is named "master" in git; release branches are named "emacs-nn" where "nn" is the major version. -You must follow emacs-devel to know exactly what kinds of changes are -allowed on what branch at any time. Announcements about the freeze -(and other important events) will contain "ANNOUNCE" in the subject. +Announcements about the freeze (and other important events) are made +on the info-gnu-emacs mailing list. If you are fixing a bug that exists in the current release, be sure to commit it to the release branch; it will be merged to the master @@ -287,6 +149,23 @@ then exclude that commit from the merge to trunk. See all the files in admin/notes/* . In particular, see admin/notes/newfile, see admin/notes/repo. +*** git vs rename + +git does not explicitly represent a file renaming; it uses a percent +changed heuristic to deduce that a file was renamed. So if you are +planning to make extensive changes to a file after renaming it (or +moving it to another directory), you should: + +- create a feature branch + +- commit the rename without any changes + +- make other changes + +- merge the feature branch to trunk, _not_ squashing the commits into + one. The commit message on this merge should summarize the renames + and all the changes. + ** Emacs Mailing lists. Discussion about Emacs development takes place on emacs-devel@gnu.org. diff --git a/ChangeLog b/ChangeLog index 718a958..30fae4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2014-12-19 Stephen Leake + + Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi + + Fixes bug#19299 + + * CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi + (commit messages): new, gathered from comments on emacs-devel + (Changelog notes): add reference to GNU coding standards section 5.2; + doc 'present tense', bug fix format + (branches): freeze announcements are made on info-gnu-emacs mailing + list + (git vs rename): new + + * doc/emacs/trouble.texi: Move user-level information from CONTRIBUTE here + + * lisp/startup.el (fancy-about-text): change buttons for etc/CONTRIBUTE + to (info "(emacs)Contributing") + 2014-12-14 Paul Eggert Spelling fixes diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 5f3cf92..bae9cad 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1060,19 +1060,44 @@ but using it will take extra work. Maintaining GNU Emacs is a lot of work in the best of circumstances, and we can't keep up unless you do your best to help. +Every patch must have several pieces of information before we +can properly evaluate it. + +When you have all these pieces, bundle them up in a mail message and +send it to the developers. Sending it to +@email{bug-gnu-emacs@@gnu.org} (which is the bug/feature list) is +recommended, because that list is coupled to a tracking system that +makes it easier to locate patches. If your patch is not complete and +you think it needs more discussion, you might want to send it to +@email{emacs-devel@@gnu@@gnu.org} instead. If you revise your patch, +send it as a followup to the initial topic. + +We prefer to get the patches as plain text, either inline (be careful +your mail client does not change line breaks) or as MIME attachments. + @itemize @bullet @item -Send an explanation with your changes of what problem they fix or what -improvement they bring about. For a fix for an existing bug, it is +Include an explanation with your changes of what problem they fix or what +improvement they bring about. + +@itemize +@item +For a fix for an existing bug, it is best to reply to the relevant discussion on the @samp{bug-gnu-emacs} list, or the bug entry in the GNU Bug Tracker at @url{http://debbugs.gnu.org}. Explain why your change fixes the bug. @item -Always include a proper bug report for the problem you think you have -fixed. We need to convince ourselves that the change is right before -installing it. Even if it is correct, we might have trouble -understanding it if we don't have a way to reproduce the problem. +For a new feature, include a description of the feature and your +implementation. + +@item +For a new bug, include a proper bug report for the problem you think +you have fixed. We need to convince ourselves that the change is +right before installing it. Even if it is correct, we might have +trouble understanding it if we don't have a way to reproduce the +problem. +@end itemize @item Include all the comments that are appropriate to help people reading the @@ -1104,6 +1129,8 @@ right away. That gives us the option of installing it immediately if it is important. @item +The patch itself. + Use @samp{diff -c} to make your diffs. Diffs without context are hard to install reliably. More than that, they are hard to study; we must always study a patch to decide whether we want to install it. Unidiff @@ -1114,6 +1141,12 @@ If you have GNU diff, use @samp{diff -c -F'^[_a-zA-Z0-9$]+ *('} when making diffs of C code. This shows the name of the function that each change occurs in. +If you are using the Emacs repository, make sure your copy is +up-to-date (e.g. with @code{git pull}). You can commit your changes +to a private branch and generate a patch from the master version by +using @code{git format-patch master}. Or you can leave your changes +uncommitted and use @code{git diff}. + @item Avoid any ambiguity as to which is the old version and which is the new. Please make the old version the first argument to diff, and the new @@ -1138,8 +1171,16 @@ feel that the purpose needs explaining, it probably does---but put the explanation in comments in the code. It will be more useful there. Please look at the change log entries of recent commits to see what -sorts of information to put in, and to learn the style that we use. -@xref{Change Log}. +sorts of information to put in, and to learn the style that we use. Note that, +unlike some other projects, we do require change logs for +documentation, i.e. Texinfo files. +@xref{Change Log}, +@ifset WWW_GNU_ORG +see +@url{http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html}, +@end ifset +@xref{Change Log Concepts, Change Log Concepts, +Change Log Concepts, gnu-coding-standards, GNU Coding Standards}. @item When you write the fix, keep in mind that we can't install a change that @@ -1160,11 +1201,52 @@ Please help us keep up with the workload by designing the patch in a form that is clearly safe to install. @end itemize -@c FIXME: Include the node above? @node Contributing @section Contributing to Emacs Development @cindex contributing to Emacs +Emacs is a collaborative project and we encourage contributions from +anyone and everyone. + +There are many ways to contribute to Emacs: + +@itemize +@item +find and report bugs; @xref{Bugs}. + +@item +answer questions on the Emacs user mailing list +@url{https://lists.gnu.org/mailman/listinfo/help-gnu-emacs}. + +@item +write documentation, either on the wiki, or in the Emacs source +repository (@pxref{Sending Patches}). + +@item +check if existing bug reports are fixed in newer versions of Emacs +@url{http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs}. + +@item +fix existing bug reports +@url{http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs}. + +@item +@c etc/TOOD not in WWW_GNU_ORG +implement a feature listed in the @file{etc/TODO} file in the Emacs +distribution, and submit a patch. + +@item +implement a new feature, and submit a patch. + +@item +develop a package that works with Emacs, and publish it on your own +or in Gnu ELPA (@url{https://elpa.gnu.org/}). + +@item +port Emacs to a new platform, but that is not common nowadays. + +@end itemize + If you would like to work on improving Emacs, please contact the maintainers at @ifnothtml @email{emacs-devel@@gnu.org}. @@ -1186,24 +1268,148 @@ you have not yet started work, it is useful to contact before you start; it might be possible to suggest ways to make your extension fit in better with the rest of Emacs. +When implementing a feature, please follow the Emacs coding standards; +@xref{Coding Standards}. In addition, non-trivial contributions +require a copyright assignment to the FSF; @xref{Copyright Assignment}. + The development version of Emacs can be downloaded from the repository where it is actively maintained by a group of developers. See the Emacs project page -@url{http://savannah.gnu.org/projects/emacs/} for details. +@url{http://savannah.gnu.org/projects/emacs/} for access details. + +It is important to write your patch based on the current working +version. If you start from an older version, your patch may be +outdated (so that maintainers will have a hard time applying it), or +changes in Emacs may have made your patch unnecessary. After you have +downloaded the repository source, you should read the file +@file{INSTALL.REPO} for build instructions (they differ to some extent +from a normal build). + +If you would like to make more extensive contributions, see the +@file{./CONTRIBUTE} file in the Emacs distribution for information on +how to be an Emacs developer. + +For documentation on Emacs (to understand how to implement your +desired change), refer to: + +@itemize +@item +@ifset WWW_GNU_ORG +@ifhtml +the Emacs Manual +@url{http://www.gnu.org/software/emacs/manual/emacs.html}. +@end ifhtml +@ifnothtml +@xref{Top, Emacs Manual,,emacs}. +@end ifnothtml +@end ifset +@ifclear WWW_GNU_ORG +@xref{Top, Emacs Manual,,emacs}. +@end ifclear + +@item +@ifset WWW_GNU_ORG +@ifhtml +the Emacs Lisp Reference Manual +@url{http://www.gnu.org/software/emacs/manual/elisp.html}. +@end ifhtml +@ifnothtml +@xref{Top, Emacs Lisp Reference Manual,,elisp}. +@end ifnothtml +@end ifset +@ifclear WWW_GNU_ORG +@xref{Top, Emacs Lisp Reference Manual,,elisp}. +@end ifclear + +@item +@url{http://www.gnu.org/software/emacs} + +@item +@url{http://www.emacswiki.org/} +@end itemize + +@menu +* Coding Standards:: Gnu Emacs coding standards +* Copyright Assignment:: assigning copyright to the FSF +@end menu -For more information on how to contribute, see the +@node Coding Standards +@subsection Coding Standards +@cindex coding standards + +Contributed code should follow the GNU Coding Standards +@url{http://www.gnu.org/prep/standards/}. This may also be available +in info on your system. + +If it doesn't, we'll need to find someone to fix the code before we +can use it. + +Emacs has additional style and coding conventions: + +@itemize +@item @ifset WWW_GNU_ORG @ifhtml -@url{http://gnu.org/software/emacs/CONTRIBUTE, etc/CONTRIBUTE} +the "Tips" Appendix in the Emacs Lisp Reference +@url{http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html}. @end ifhtml @ifnothtml -@file{etc/CONTRIBUTE} +@xref{Tips, "Tips" Appendix in the Emacs Lisp Reference, Tips +Appendix, elisp, Emacs Lisp Reference}. @end ifnothtml @end ifset @ifclear WWW_GNU_ORG -@file{etc/CONTRIBUTE} +@xref{Tips, "Tips" Appendix in the Emacs Lisp Reference, Tips +Appendix, elisp, Emacs Lisp Reference}. @end ifclear -file in the Emacs distribution. + +@item +Avoid using @code{defadvice} or @code{eval-after-load} for Lisp code +to be included in Emacs. + +@item +Remove all trailing whitespace in all source and text files. + +@item +Emacs has no convention on whether to use tabs in source code; please +don't change whitespace in the files you edit. + +@item +Use @code{?\s} instead of @code{? } in Lisp code for a space character. + +@end itemize + +@node Copyright Assignment +@subsection Copyright Assignment +@cindex copyright assignment + +The FSF (Free Software Foundation) is the copyright holder for GNU Emacs. +The FSF is a nonprofit with a worldwide mission to promote computer +user freedom and to defend the rights of all free software users. +For general information, see the website @url{http://www.fsf.org/}. + +Generally speaking, for non-trivial contributions to GNU Emacs we +require that the copyright be assigned to the FSF. For the reasons +behind this, see @url{http://www.gnu.org/licenses/why-assign.html}. + +Copyright assignment is a simple process. Residents of some countries +can do it entirely electronically. We can help you get started, and +answer any questions you may have (or point you to the people with the +answers), at the @email{emacs-devel@@gnu.org} mailing list. + +(Please note: general discussion about why some GNU projects ask +for a copyright assignment is off-topic for emacs-devel. +See gnu-misc-discuss instead.) + +A copyright disclaimer is also a possibility, but we prefer an assignment. +Note that the disclaimer, like an assignment, involves you sending +signed paperwork to the FSF (simply saying "this is in the public domain" +is not enough). Also, a disclaimer cannot be applied to future work, it +has to be repeated each time you want to send something new. + +We can accept small changes (roughly, fewer than 15 lines) without +an assignment. This is a cumulative limit (e.g. three separate 5 line +patches) over all your contributions. @node Service @section How To Get Help with GNU Emacs @@ -1211,8 +1417,8 @@ file in the Emacs distribution. @cindex help-gnu-emacs mailing list @cindex gnu.emacs.help newsgroup -If you need help installing, using or changing GNU Emacs, there are two -ways to find it: +If you need help installing, using or changing GNU Emacs, there are +two ways to find it: @itemize @bullet @item diff --git a/lisp/startup.el b/lisp/startup.el index c04b16c..8e981bb 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1463,9 +1463,7 @@ Each element in the list should be a list of strings or pairs (goto-char (point-min)))) "\tMany people have contributed code included in GNU Emacs\n" :link ("Contributing" - ,(lambda (_button) - (view-file (expand-file-name "CONTRIBUTE" data-directory)) - (goto-char (point-min)))) + ,(lambda (_button) (info "(emacs)Contributing"))) "\tHow to contribute improvements to Emacs\n" "\n" :link ("GNU and Freedom" ,(lambda (_button) (describe-gnu-project))) @@ -2039,9 +2037,7 @@ Type \\[describe-distribution] for information on ")) (insert-button "Contributing" 'action - (lambda (_button) - (view-file (expand-file-name "CONTRIBUTE" data-directory)) - (goto-char (point-min))) + (lambda (_button) (info "(emacs)Contributing")) 'follow-link t) (insert "\tHow to contribute improvements to Emacs\n\n") commit 20cfd2480d75679da33958ea258143a313911712 Author: Eli Zaretskii Date: Tue Dec 23 20:42:30 2014 +0200 Improve indexing on the chapter/section/subsection levels. doc/lispref/windows.texi (Recombining Windows): Index subject of sections. doc/lispref/variables.texi (Variables with Restricted Values) (Generalized Variables): Index subject of sections. doc/lispref/text.texi (Buffer Contents, Examining Properties) (Changing Properties, Property Search, Substitution): Index subject of sections. doc/lispref/syntax.texi (Motion and Syntax, Parsing Expressions) (Motion via Parsing, Position Parse, Control Parsing): Index subject of sections. doc/lispref/strings.texi (Predicates for Strings, Creating Strings) (Modifying Strings, Text Comparison): Index subject of sections. doc/lispref/searching.texi (Syntax of Regexps, Regexp Special) (Regexp Functions, Regexp Functions): Index subject of sections. doc/lispref/processes.texi (Subprocess Creation, Process Information): Index subject of sections. doc/lispref/positions.texi (Screen Lines): Index subject of sections. doc/lispref/nonascii.texi (Scanning Charsets, Specifying Coding Systems): Index subject of sections. doc/lispref/minibuf.texi (Text from Minibuffer, Object from Minibuffer) (Multiple Queries, Minibuffer Contents): Index subject of sections. doc/lispref/markers.texi (Predicates on Markers, Creating Markers) (Information from Markers, Moving Markers): Index subject of sections. doc/lispref/macros.texi (Defining Macros, Problems with Macros): Index subject of sections. doc/lispref/loading.texi (Loading Non-ASCII, Where Defined): Index subject of sections. doc/lispref/lists.texi (List-related Predicates, List Variables, Setcar) (Setcdr, Plist Access): Index subject of sections. doc/lispref/keymaps.texi (Controlling Active Maps, Scanning Keymaps) (Modifying Menus): Index subject of sections. doc/lispref/help.texi (Accessing Documentation, Help Functions): Index subject of sections. doc/lispref/hash.texi (Hash Access): Index subject of sections. doc/lispref/functions.texi (Core Advising Primitives) (Advising Named Functions, Porting old advices): Index subject of sections. doc/lispref/frames.texi (Creating Frames, Initial Parameters) (Position Parameters, Buffer Parameters, Minibuffers and Frames) (Pop-Up Menus, Drag and Drop): Index subject of sections. doc/lispref/files.texi (Visiting Functions, Kinds of Files) (Unique File Names): Index subject of sections. doc/lispref/display.texi (Refresh Screen, Echo Area Customization) (Warning Variables, Warning Options, Delayed Warnings) (Temporary Displays, Managing Overlays, Overlay Properties) (Finding Overlays, Size of Displayed Text, Defining Faces) (Attribute Functions, Displaying Faces, Face Remapping) (Basic Faces, Font Lookup, Fontsets, Replacing Specs) (Defining Images, Showing Images): Index subject of sections. doc/lispref/debugging.texi (Debugging, Explicit Debug) (Invoking the Debugger, Excess Open, Excess Close): Index subject of sections. doc/lispref/customize.texi (Defining New Types, Applying Customizations) (Custom Themes): Index subject of sections. doc/lispref/control.texi (Sequencing, Combining Conditions) (Processing of Errors, Cleanups): Index subject of sections. doc/lispref/compile.texi (Eval During Compile): Index subject of sections. doc/lispref/commands.texi (Using Interactive, Distinguish Interactive) (Command Loop Info, Classifying Events, Event Mod) (Invoking the Input Method): Index subject of sections. doc/lispref/buffers.texi (Buffer List, Buffer Gap): Index subject of sections. doc/lispref/backups.texi (Making Backups, Numbered Backups, Backup Names) (Reverting): Index subject of sections. doc/lispref/abbrevs.texi (Abbrev Tables, Defining Abbrevs, Abbrev Files) (Abbrev Expansion, Standard Abbrev Tables, Abbrev Properties) (Abbrev Table Properties): Index subject of sections. doc/lispref/os.texi (Time of Day, Time Conversion, Time Parsing) (Time Calculations, Idle Timers): Index subject of sections. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 12554dd..5bf23bc 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,104 @@ +2014-12-23 Eli Zaretskii + + * windows.texi (Recombining Windows): Index subject of sections. + + * variables.texi (Variables with Restricted Values) + (Generalized Variables): Index subject of sections. + + * text.texi (Buffer Contents, Examining Properties) + (Changing Properties, Property Search, Substitution): Index + subject of sections. + + * syntax.texi (Motion and Syntax, Parsing Expressions) + (Motion via Parsing, Position Parse, Control Parsing): Index + subject of sections. + + * strings.texi (Predicates for Strings, Creating Strings) + (Modifying Strings, Text Comparison): Index subject of sections. + + * searching.texi (Syntax of Regexps, Regexp Special) + (Regexp Functions, Regexp Functions): Index subject of sections. + + * processes.texi (Subprocess Creation, Process Information): Index + subject of sections. + + * positions.texi (Screen Lines): Index subject of sections. + + * nonascii.texi (Scanning Charsets, Specifying Coding Systems): + Index subject of sections. + + * minibuf.texi (Text from Minibuffer, Object from Minibuffer) + (Multiple Queries, Minibuffer Contents): Index subject of + sections. + + * markers.texi (Predicates on Markers, Creating Markers) + (Information from Markers, Moving Markers): Index subject of + sections. + + * macros.texi (Defining Macros, Problems with Macros): Index + subject of sections. + + * loading.texi (Loading Non-ASCII, Where Defined): Index subject + of sections. + + * lists.texi (List-related Predicates, List Variables, Setcar) + (Setcdr, Plist Access): Index subject of sections. + + * keymaps.texi (Controlling Active Maps, Scanning Keymaps) + (Modifying Menus): Index subject of sections. + + * help.texi (Accessing Documentation, Help Functions): Index + subject of sections. + + * hash.texi (Hash Access): Index subject of sections. + + * functions.texi (Core Advising Primitives) + (Advising Named Functions, Porting old advices): Index subject of + sections. + + * frames.texi (Creating Frames, Initial Parameters) + (Position Parameters, Buffer Parameters, Minibuffers and Frames) + (Pop-Up Menus, Drag and Drop): Index subject of sections. + + * files.texi (Visiting Functions, Kinds of Files) + (Unique File Names): Index subject of sections. + + * display.texi (Refresh Screen, Echo Area Customization) + (Warning Variables, Warning Options, Delayed Warnings) + (Temporary Displays, Managing Overlays, Overlay Properties) + (Finding Overlays, Size of Displayed Text, Defining Faces) + (Attribute Functions, Displaying Faces, Face Remapping) + (Basic Faces, Font Lookup, Fontsets, Replacing Specs) + (Defining Images, Showing Images): Index subject of sections. + + * debugging.texi (Debugging, Explicit Debug) + (Invoking the Debugger, Excess Open, Excess Close): Index subject + of sections. + + * customize.texi (Defining New Types, Applying Customizations) + (Custom Themes): Index subject of sections. + + * control.texi (Sequencing, Combining Conditions) + (Processing of Errors, Cleanups): Index subject of sections. + + * compile.texi (Eval During Compile): Index subject of sections. + + * commands.texi (Using Interactive, Distinguish Interactive) + (Command Loop Info, Classifying Events, Event Mod) + (Invoking the Input Method): Index subject of sections. + + * buffers.texi (Buffer List, Buffer Gap): Index subject of sections. + + * backups.texi (Making Backups, Numbered Backups, Backup Names) + (Reverting): Index subject of sections. + + * abbrevs.texi (Abbrev Tables, Defining Abbrevs, Abbrev Files) + (Abbrev Expansion, Standard Abbrev Tables, Abbrev Properties) + (Abbrev Table Properties): Index subject of sections. + + * os.texi (Time of Day, Time Conversion, Time Parsing) + (Time Calculations, Idle Timers): Index subject of sections. + 2014-12-18 Stefan Monnier * display.texi (Forcing Redisplay): Remove references to diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi index 73a3f5f..c00af61 100644 --- a/doc/lispref/abbrevs.texi +++ b/doc/lispref/abbrevs.texi @@ -59,6 +59,7 @@ expanded in the buffer. For the user-level commands for abbrevs, see @node Abbrev Tables @section Abbrev Tables +@cindex abbrev tables This section describes how to create and manipulate abbrev tables. @@ -126,6 +127,7 @@ to add these to @var{name} separately.) @node Defining Abbrevs @section Defining Abbrevs +@cindex defining abbrevs @code{define-abbrev} is the low-level basic function for defining an abbrev in an abbrev table. @@ -181,6 +183,7 @@ callers. @node Abbrev Files @section Saving Abbrevs in Files +@cindex save abbrevs in files A file of saved abbrev definitions is actually a file of Lisp code. The abbrevs are saved in the form of a Lisp program to define the same @@ -232,6 +235,9 @@ define the same abbrevs. If @var{filename} is @code{nil} or omitted, @node Abbrev Expansion @section Looking Up and Expanding Abbreviations +@cindex looking up abbrevs +@cindex expanding abbrevs +@cindex abbrevs, looking up and expanding Abbrevs are usually expanded by certain interactive commands, including @code{self-insert-command}. This section describes the @@ -367,6 +373,7 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}. @node Standard Abbrev Tables @section Standard Abbrev Tables +@cindex standard abbrev tables Here we list the variables that hold the abbrev tables for the preloaded major modes of Emacs. @@ -409,6 +416,7 @@ Properties}. @node Abbrev Properties @section Abbrev Properties +@cindex abbrev properties Abbrevs have properties, some of which influence the way they work. You can provide them as arguments to @code{define-abbrev}, and @@ -449,6 +457,7 @@ modifies the capitalization of the expansion. @node Abbrev Table Properties @section Abbrev Table Properties +@cindex abbrev table properties Like abbrevs, abbrev tables have properties, some of which influence the way they work. You can provide them as arguments to diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 63f8f22..ca30f3e 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -50,6 +50,7 @@ don't want them any more, or Emacs can delete them automatically. @node Making Backups @subsection Making Backup Files +@cindex making backup files @defun backup-buffer This function makes a backup of the file visited by the current @@ -238,6 +239,7 @@ The default is 200. @node Numbered Backups @subsection Making and Deleting Numbered Backup Files +@cindex numbered backups If a file's name is @file{foo}, the names of its numbered backup versions are @file{foo.~@var{v}~}, for various integers @var{v}, like @@ -299,6 +301,7 @@ file. The default is@tie{}2. @node Backup Names @subsection Naming Backup Files +@cindex naming backup files The functions in this section are documented mainly because you can customize the naming conventions for backup files by redefining them. @@ -668,6 +671,7 @@ not initialize @code{auto-save-list-file-name}. @node Reverting @section Reverting +@cindex reverting buffers If you have made extensive changes to a file and then change your mind about them, you can get rid of them by reading in the previous version diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 5ac2d67..7c4fb87 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -762,6 +762,7 @@ signal an error if the current buffer is read-only. @node Buffer List @section The Buffer List @cindex buffer list +@cindex listing all buffers The @dfn{buffer list} is a list of all live buffers. The order of the buffers in this list is based primarily on how recently each buffer has @@ -1215,6 +1216,7 @@ in the text it is swapped with will not interfere with auto-saving. @node Buffer Gap @section The Buffer Gap +@cindex buffer gap Emacs buffers are implemented using an invisible @dfn{gap} to make insertion and deletion faster. Insertion works by filling in part of diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 5e22941..45654cf 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -144,6 +144,7 @@ Lisp code. @node Using Interactive @subsection Using @code{interactive} @cindex arguments, interactive entry +@cindex interactive spec, using This section describes how to write the @code{interactive} form that makes a Lisp function an interactively-callable command, and how to @@ -744,6 +745,8 @@ part of the prompt. @node Distinguish Interactive @section Distinguish Interactive Calls +@cindex distinguish interactive calls +@cindex is this call interactive Sometimes a command should display additional visual feedback (such as an informative message in the echo area) for interactive calls @@ -832,6 +835,7 @@ Here is another example that contrasts direct and indirect calls to @node Command Loop Info @section Information from the Command Loop +@cindex command loop variables The editor command loop sets several Lisp variables to keep status records for itself and for commands that are run. With the exception of @@ -1855,6 +1859,7 @@ bind it to the @code{signal usr1} event sequence: @node Classifying Events @subsection Classifying Events @cindex event type +@cindex classifying events Every event has an @dfn{event type}, which classifies the event for key binding purposes. For a keyboard event, the event type equals the @@ -2580,6 +2585,9 @@ then continues to wait for a valid input character, or keyboard-quit. @node Event Mod @subsection Modifying and Translating Input Events +@cindex modifiers of events +@cindex translating input events +@cindex event translation Emacs modifies every event it reads according to @code{extra-keyboard-modifiers}, then translates it through @@ -2661,6 +2669,7 @@ at the level of @code{read-key-sequence}. @node Invoking the Input Method @subsection Invoking the Input Method +@cindex invoking input method The event-reading functions invoke the current input method, if any (@pxref{Input Methods}). If the value of @code{input-method-function} diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index fe492df..cb6cba9 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -347,6 +347,7 @@ it does nothing. It always returns @var{function}. @node Eval During Compile @section Evaluation During Compilation +@cindex eval during compilation These features permit you to write code to be evaluated during compilation of a program. diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 800e174..62c73dd 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -44,6 +44,8 @@ structure constructs (@pxref{Macros}). @node Sequencing @section Sequencing +@cindex sequencing +@cindex sequential execution Evaluating forms in the order they appear is the most common way control passes from one form to another. In some contexts, such as in a @@ -401,6 +403,7 @@ the variable @code{x}. @node Combining Conditions @section Constructs for Combining Conditions +@cindex combining conditions This section describes three constructs that are often used together with @code{if} and @code{cond} to express complicated conditions. The @@ -958,6 +961,7 @@ concept of continuable errors. @node Processing of Errors @subsubsection How Emacs Processes Errors +@cindex processing of errors When an error is signaled, @code{signal} searches for an active @dfn{handler} for the error. A handler is a sequence of Lisp @@ -1363,6 +1367,7 @@ and their conditions. @node Cleanups @subsection Cleaning Up from Nonlocal Exits +@cindex nonlocal exits, cleaning up The @code{unwind-protect} construct is essential whenever you temporarily put a data structure in an inconsistent state; it permits diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 0c6497f..cdf599b 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1227,6 +1227,8 @@ arguments, which will be used when creating the @code{radio-button} or @node Defining New Types @subsection Defining New Types +@cindex customization types, define new +@cindex define new customization types In the previous sections we have described how to construct elaborate type specifications for @code{defcustom}. In some cases you may want @@ -1296,6 +1298,7 @@ its @code{:type} argument only when needed. @node Applying Customizations @section Applying Customizations +@cindex applying customizations The following functions are responsible for installing the user's customization settings for variables and faces, respectively. When @@ -1353,6 +1356,7 @@ evaluated. @var{comment} is a string describing the customization. @node Custom Themes @section Custom Themes +@cindex custom themes @dfn{Custom themes} are collections of settings that can be enabled or disabled as a unit. @xref{Custom Themes,,, emacs, The GNU Emacs Manual}. Each Custom theme is defined by an Emacs Lisp source file, diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 66f12a0..0b3c47f 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -5,6 +5,7 @@ @c See the file elisp.texi for copying conditions. @node Debugging @chapter Debugging Lisp Programs +@cindex debugging lisp programs There are several ways to find and investigate problems in an Emacs Lisp program. @@ -284,6 +285,8 @@ not currently set up to break on entry. @node Explicit Debug @subsection Explicit Entry to the Debugger +@cindex debugger, explicit entry +@cindex force entry to debugger You can cause the debugger to be called at a certain point in your program by writing the expression @code{(debug)} at that point. To do @@ -456,6 +459,7 @@ Toggle the display of local variables of the current stack frame. @node Invoking the Debugger @subsection Invoking the Debugger +@cindex invoking lisp debugger Here we describe in full detail the function @code{debug} that is used to invoke the debugger. @@ -707,6 +711,7 @@ find the mismatch.) @node Excess Open @subsection Excess Open Parentheses +@cindex excess open parentheses The first step is to find the defun that is unbalanced. If there is an excess open parenthesis, the way to do this is to go to the end of @@ -741,6 +746,7 @@ anything. @node Excess Close @subsection Excess Close Parentheses +@cindex excess close parentheses To deal with an excess close parenthesis, first go to the beginning of the file, then type @kbd{C-u -1 C-M-u} to find the end of the first diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index c4753ec..5d3202e 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -39,6 +39,8 @@ that Emacs presents to the user. @node Refresh Screen @section Refreshing the Screen +@cindex refresh the screen +@cindex screen refresh The function @code{redraw-frame} clears and redisplays the entire contents of a given frame (@pxref{Frames}). This is useful if the @@ -509,6 +511,7 @@ are logged that share a common prefix ending in @samp{...}. @node Echo Area Customization @subsection Echo Area Customization +@cindex echo area customization These variables control details of how the echo area works. @@ -636,6 +639,7 @@ specify a specific warning type. @node Warning Variables @subsection Warning Variables +@cindex warning variables Programs can customize how their warnings appear by binding the variables described in this section. @@ -713,6 +717,7 @@ all. @node Warning Options @subsection Warning Options +@cindex warning options These variables are used by users to control what happens when a Lisp program reports a warning. @@ -746,6 +751,7 @@ that warning is not logged. @node Delayed Warnings @subsection Delayed Warnings +@cindex delayed warnings Sometimes, you may wish to avoid showing a warning while a command is running, and only show it only after the end of the command. You can @@ -1069,6 +1075,8 @@ You can use a display table to substitute other text for the ellipsis @node Temporary Displays @section Temporary Displays +@cindex temporary display +@cindex temporary buffer display Temporary displays are used by Lisp programs to put output into a buffer and then present it to the user for perusal rather than for @@ -1280,6 +1288,8 @@ inside the overlay or outside, and likewise for the end of the overlay. @node Managing Overlays @subsection Managing Overlays +@cindex managing overlays +@cindex overlays, managing This section describes the functions to create, delete and move overlays, and to examine their contents. Overlay changes are not @@ -1440,6 +1450,7 @@ faster if you do @code{(overlay-recenter (point-max))} first. @node Overlay Properties @subsection Overlay Properties +@cindex overlay properties Overlay properties are like text properties in that the properties that alter how a character is displayed can come from either source. But in @@ -1692,6 +1703,8 @@ Properties}. @node Finding Overlays @subsection Searching for Overlays +@cindex searching for overlays +@cindex overlays, searching for @defun overlays-at pos &optional sorted This function returns a list of all the overlays that cover the character at @@ -1759,6 +1772,8 @@ changes. @node Size of Displayed Text @section Size of Displayed Text +@cindex size of text on display +@cindex character width on display Since not all characters have the same width, these functions let you check the width of a character. @xref{Primitive Indent}, and @@ -2249,6 +2264,7 @@ suitable for use with @code{:stipple} (see above). It returns @node Defining Faces @subsection Defining Faces +@cindex defining faces @cindex face spec The usual way to define a face is through the @code{defface} macro. @@ -2423,6 +2439,7 @@ Any other value of @var{spec-type} is reserved for internal use. @node Attribute Functions @subsection Face Attribute Functions +@cindex face attributes, access and modification This section describes functions for directly accessing and modifying the attributes of a named face. @@ -2624,6 +2641,8 @@ a non-@code{nil} @code{:inverse-video} attribute. @node Displaying Faces @subsection Displaying Faces +@cindex displaying faces +@cindex face merging When Emacs displays a given piece of text, the visual appearance of the text may be determined by faces drawn from different sources. If @@ -2679,6 +2698,7 @@ at the next level of face merging. @node Face Remapping @subsection Face Remapping +@cindex face remapping The variable @code{face-remapping-alist} is used for buffer-local or global changes in the appearance of a face. For instance, it is used @@ -2876,6 +2896,7 @@ usually assign faces to around 400 to 600 characters at each call. @node Basic Faces @subsection Basic Faces +@cindex basic faces If your Emacs Lisp program needs to assign some faces to text, it is often a good idea to use certain existing faces or inherit from them, @@ -3042,6 +3063,8 @@ nominal heights and widths would suggest. @node Font Lookup @subsection Looking Up Fonts +@cindex font lookup +@cindex looking up fonts @defun x-list-fonts name &optional reference-face frame maximum width This function returns a list of available font names that match @@ -3099,6 +3122,7 @@ encoding of the font. @node Fontsets @subsection Fontsets +@cindex fontset A @dfn{fontset} is a list of fonts, each assigned to a range of character codes. An individual font cannot display the whole range of @@ -4032,6 +4056,7 @@ display specifications and what they mean. @node Replacing Specs @subsection Display Specs That Replace The Text +@cindex replacing display specs Some kinds of display specifications specify something to display instead of the text that has the property. These are called @@ -4908,6 +4933,7 @@ Supports the @code{:index} property. @xref{Multi-Frame Images}. @node Defining Images @subsection Defining Images +@cindex define image The functions @code{create-image}, @code{defimage} and @code{find-image} provide convenient ways to create image descriptors. @@ -5035,6 +5061,7 @@ Here is an example of using @code{image-load-path-for-library}: @node Showing Images @subsection Showing Images +@cindex show image You can use an image descriptor by setting up the @code{display} property yourself, but it is easier to use the functions in this diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index b071c6a..895ae42 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -81,6 +81,8 @@ computer program, however, it is good to keep the distinction in mind. @node Visiting Functions @subsection Functions for Visiting Files +@cindex visiting files, functions for +@cindex how to visit files This section describes the functions normally used to visit files. For historical reasons, these functions have names starting with @@ -948,6 +950,8 @@ Unix. These conventions are also followed by @code{file-attributes} @node Kinds of Files @subsection Distinguishing Kinds of Files +@cindex file classification +@cindex classification of file types This section describes how to distinguish various kinds of files, such as directories, symbolic links, and ordinary files. @@ -2285,6 +2289,8 @@ through the immediately preceding @samp{/}). @node Unique File Names @subsection Generating Unique File Names +@cindex unique file names +@cindex temporary files Some programs need to write temporary files. Here is the usual way to construct a name for such a file: diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index d5617ed..df8efee 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -106,6 +106,7 @@ for @code{framep} above. @node Creating Frames @section Creating Frames +@cindex frame creation To create a new frame, call the function @code{make-frame}. @@ -484,6 +485,7 @@ parameter values to frames that will be created henceforth. @node Initial Parameters @subsection Initial Frame Parameters +@cindex parameters of initial frame You can specify the parameters for the initial startup frame by setting @code{initial-frame-alist} in your init file (@pxref{Init @@ -623,6 +625,7 @@ named, this parameter will be @code{nil}. @node Position Parameters @subsubsection Position Parameters @cindex window position on display +@cindex frame position Position parameters' values are normally measured in pixels, but on text terminals they count characters or lines instead. @@ -839,6 +842,8 @@ integer). @xref{Line Height}, for more information. @node Buffer Parameters @subsubsection Buffer Parameters +@cindex frame, which buffers to display +@cindex buffers to display on frame These frame parameters, meaningful on all kinds of terminals, deal with which buffers have been, or should, be displayed in the frame. @@ -1526,6 +1531,7 @@ is used whenever that frame is selected. If the frame has a minibuffer, you can get it with @code{minibuffer-window} (@pxref{Definition of minibuffer-window}). +@cindex frame without a minibuffer However, you can also create a frame with no minibuffer. Such a frame must use the minibuffer window of some other frame. When you create the frame, you can explicitly specify the minibuffer window to use (in some @@ -1933,6 +1939,7 @@ allows to know if the pointer has been hidden. @node Pop-Up Menus @section Pop-Up Menus +@cindex menus, popup A Lisp program can pop up a menu so that the user can choose an alternative with the mouse. On a text terminal, if the mouse is not @@ -2197,6 +2204,7 @@ clipboard as empty. @node Drag and Drop @section Drag and Drop +@cindex drag and drop @vindex x-dnd-test-function @vindex x-dnd-known-types diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index f551a6c..d9477d2 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1215,6 +1215,7 @@ ways to do it. The added function is also called an @emph{advice}. @node Core Advising Primitives @subsection Primitives to manipulate advices +@cindex advice, add and remove @defmac add-function where place function &optional props This macro is the handy way to add the advice @var{function} to the function @@ -1313,6 +1314,7 @@ the current prefix argument. @node Advising Named Functions @subsection Advising Named Functions +@cindex advising named functions A common use of advice is for named functions and macros. You could just use @code{add-function} as in: @@ -1498,6 +1500,7 @@ More specifically, the composition of the two functions behaves like: @node Porting old advices @subsection Adapting code using the old defadvice +@cindex old advices, porting A lot of code uses the old @code{defadvice} mechanism, which is largely made obsolete by the new @code{advice-add}, whose implementation and semantics is diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi index 536777a..323a2ed 100644 --- a/doc/lispref/hash.texi +++ b/doc/lispref/hash.texi @@ -188,6 +188,8 @@ Such objects may be added to the hash table after it is created. @node Hash Access @section Hash Table Access +@cindex accessing hash tables +@cindex hash table access This section describes the functions for accessing and storing associations in a hash table. In general, any Lisp object can be used diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 20fb0e6..2e3b51e 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -90,6 +90,7 @@ hyperlinks in the @file{*Help*} buffer.) @node Accessing Documentation @section Access to Documentation Strings +@cindex accessing documentation strings @defun documentation-property symbol property &optional verbatim This function returns the documentation string recorded in @@ -507,6 +508,7 @@ non-@code{nil}, the return value is always a vector. @node Help Functions @section Help Functions +@cindex help functions Emacs provides a variety of built-in help functions, all accessible to the user as subcommands of the prefix @kbd{C-h}. For more information diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 7cc2b39..d429952 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -782,6 +782,7 @@ Lookup}. @node Controlling Active Maps @section Controlling the Active Keymaps +@cindex active keymap, controlling @defvar global-map This variable contains the default global keymap that maps Emacs @@ -1825,6 +1826,8 @@ local map. @node Scanning Keymaps @section Scanning Keymaps +@cindex scanning keymaps +@cindex keymaps, scanning This section describes functions used to scan all the current keymaps for the sake of printing help information. @@ -2794,6 +2797,7 @@ function keys. @node Modifying Menus @subsection Modifying Menus +@cindex menu modification When you insert a new item in an existing menu, you probably want to put it in a particular place among the menu's existing items. If you diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index cde7d9c..2e7b738 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -84,6 +84,8 @@ structure made out of cons cells as a @dfn{list structure}. @node List-related Predicates @section Predicates on Lists +@cindex predicates for lists +@cindex list predicates The following predicates test whether a Lisp object is an atom, whether it is a cons cell or is a list, or whether it is the @@ -681,6 +683,8 @@ Some examples: @node List Variables @section Modifying List Variables +@cindex modify a list +@cindex list modification These functions, and one macro, provide convenient ways to modify a list which is stored in a variable. @@ -837,6 +841,8 @@ new @sc{car} or @sc{cdr}. @node Setcar @subsection Altering List Elements with @code{setcar} +@cindex replace list element +@cindex list, replace element Changing the @sc{car} of a cons cell is done with @code{setcar}. When used on a list, @code{setcar} replaces one element of a list with a @@ -942,6 +948,7 @@ x2: | @node Setcdr @subsection Altering the CDR of a List +@cindex replace part of list The lowest-level primitive for modifying a @sc{cdr} is @code{setcdr}: @@ -1898,6 +1905,8 @@ and later discarded; this is not possible with a property list. @node Plist Access @subsection Property Lists Outside Symbols +@cindex plist access +@cindex accessing plist properties The following functions can be used to manipulate property lists. They all compare property names using @code{eq}. diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index a07c2e8..a0393c9 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -419,6 +419,8 @@ the shadowed files as a string. @node Loading Non-ASCII @section Loading Non-@acronym{ASCII} Characters +@cindex loading, and non-ASCII characters +@cindex non-ASCII characters in loaded files When Emacs Lisp programs contain string constants with non-@acronym{ASCII} characters, these can be represented within Emacs either as unibyte @@ -907,6 +909,8 @@ with a call to @code{provide}. The order of the elements in the @node Where Defined @section Which File Defined a Certain Symbol +@cindex symbol, where defined +@cindex where was a symbol defined @defun symbol-file symbol &optional type This function returns the name of the file that defined @var{symbol}. diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index 9be12fa..8a4741c 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi @@ -194,6 +194,8 @@ During Compile}). @node Defining Macros @section Defining Macros +@cindex defining macros +@cindex macro, how to define A Lisp macro object is a list whose @sc{car} is @code{macro}, and whose @sc{cdr} is a function. Expansion of the macro works @@ -253,6 +255,7 @@ Form}. @node Problems with Macros @section Common Problems Using Macros +@cindex macro caveats Macro expansion can have counterintuitive consequences. This section describes some important consequences that can lead to diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index 51b87ab..5902a3a 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi @@ -118,6 +118,8 @@ m1 @node Predicates on Markers @section Predicates on Markers +@cindex predicates for markers +@cindex markers, predicates for You can test an object to see whether it is a marker, or whether it is either an integer or a marker. The latter test is useful in connection @@ -141,6 +143,8 @@ integer or floating point) or a marker, @code{nil} otherwise. @node Creating Markers @section Functions that Create Markers +@cindex creating markers +@cindex marker creation When you create a new marker, you can make it point nowhere, or point to the present position of point, or to the beginning or end of the @@ -269,6 +273,7 @@ if they both point nowhere. @node Information from Markers @section Information from Markers +@cindex marker information This section describes the functions for accessing the components of a marker object. @@ -342,6 +347,8 @@ specify the insertion type, create them with insertion type @node Moving Markers @section Moving Marker Positions +@cindex moving markers +@cindex marker, how to move position This section describes how to change the position of an existing marker. When you do this, be sure you know whether the marker is used diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 4a94f41..cf36953 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -107,6 +107,7 @@ password hiding, etc.) are available in batch mode. @node Text from Minibuffer @section Reading Text Strings with the Minibuffer +@cindex minibuffer input, reading text strings The most basic primitive for minibuffer input is @code{read-from-minibuffer}, which can be used to read either a string @@ -390,6 +391,7 @@ following bindings, in addition to those of @code{minibuffer-local-map}: @node Object from Minibuffer @section Reading Lisp Objects with the Minibuffer +@cindex minibuffer input, reading lisp objects This section describes functions for reading Lisp objects with the minibuffer. @@ -2021,6 +2023,7 @@ Do you really want to remove everything? (yes or no) @node Multiple Queries @section Asking Multiple Y-or-N Questions +@cindex multiple yes-or-no questions When you have a series of similar questions to ask, such as ``Do you want to save this buffer'' for each buffer in turn, you should use @@ -2238,6 +2241,8 @@ active minibuffer window. @node Minibuffer Contents @section Minibuffer Contents +@cindex access minibuffer contents +@cindex minibuffer contents, accessing These functions access the minibuffer prompt and contents. diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index d5bfacc..d5fabe7 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -757,6 +757,8 @@ of them is @code{nil}, it defaults to the first or last codepoint of @node Scanning Charsets @section Scanning for Character Sets +@cindex scanning for character sets +@cindex character set, searching Sometimes it is useful to find out which character set a particular character belongs to. One use for this is in determining which coding @@ -1594,6 +1596,9 @@ contents (as it usually does), it should examine the contents of @node Specifying Coding Systems @subsection Specifying a Coding System for One Operation +@cindex specify coding system +@cindex force coding system for operation +@cindex coding system for operation You can specify the coding system for a specific operation by binding the variables @code{coding-system-for-read} and/or diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 3b63e08..88aed7a 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1198,6 +1198,7 @@ return value is @code{nil}. @node Time of Day @section Time of Day +@cindex time of day This section explains how to determine the current time and time zone. @@ -1305,6 +1306,7 @@ time zone. @node Time Conversion @section Time Conversion @cindex calendrical information +@cindex time conversion These functions convert time values (lists of two to four integers, as explained in the previous section) into calendrical information and @@ -1399,6 +1401,9 @@ on others, years as early as 1901 do work. @node Time Parsing @section Parsing and Formatting Times +@cindex time parsing +@cindex time formatting +@cindex formatting time values These functions convert time values to text in a string, and vice versa. Time values are lists of two to four integers (@pxref{Time of Day}). @@ -1631,6 +1636,9 @@ interactively, it prints the duration in the echo area. @node Time Calculations @section Time Calculations +@cindex time calculations +@cindex comparing time values +@cindex calendrical computations These functions perform calendrical computations using time values (the kind of list that @code{current-time} returns). @@ -1811,6 +1819,7 @@ cause anything special to happen. @node Idle Timers @section Idle Timers +@cindex idle timers Here is how to set up a timer that runs when Emacs is idle for a certain length of time. Aside from how to set them up, idle timers diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index fee36fa..b8608cc 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -465,6 +465,7 @@ beginning or end of a line. @node Screen Lines @subsection Motion by Screen Lines +@cindex screen lines, moving by The line functions in the previous section count text lines, delimited only by newline characters. By contrast, these functions count screen diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index c91afdf..798f211 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -63,6 +63,8 @@ Processes}. @node Subprocess Creation @section Functions that Create Subprocesses +@cindex create subprocess +@cindex process creation There are three primitives that create a new subprocess in which to run a program. One of them, @code{start-process}, creates an asynchronous @@ -734,6 +736,7 @@ happen sooner or later). @node Process Information @section Process Information +@cindex process information Several functions return information about processes. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 992ad00..19c515f 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -257,6 +257,8 @@ it easier to verify even very complex regexps. @node Syntax of Regexps @subsection Syntax of Regular Expressions +@cindex regexp syntax +@cindex syntax of regular expressions Regular expressions have a syntax in which a few characters are special constructs and the rest are @dfn{ordinary}. An ordinary @@ -294,6 +296,7 @@ need to use one of the special regular expression constructs. @node Regexp Special @subsubsection Special Characters in Regular Expressions +@cindex regexp, special characters in Here is a list of the characters that are special in a regular expression. @@ -894,6 +897,7 @@ beyond the minimum needed to end a sentence. These functions operate on regular expressions. +@cindex quote special characters in regexp @defun regexp-quote string This function returns a regular expression whose only exact match is @var{string}. Using this regular expression in @code{looking-at} will @@ -924,6 +928,7 @@ whitespace: @end example @end defun +@cindex optimize regexp @defun regexp-opt strings &optional paren This function returns an efficient regular expression that will match any of the strings in the list @var{strings}. This is useful when you diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index e6b00f0..0fd7fd1 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -92,6 +92,8 @@ representations and to encode and decode character codes. @node Predicates for Strings @section Predicates for Strings +@cindex predicates for strings +@cindex string predicates For more information about general sequence and array predicates, see @ref{Sequences Arrays Vectors}, and @ref{Arrays}. @@ -113,6 +115,8 @@ character (i.e., an integer), @code{nil} otherwise. @node Creating Strings @section Creating Strings +@cindex creating strings +@cindex string creation The following functions create strings, either from scratch, or by putting strings together, or by taking them apart. @@ -367,6 +371,8 @@ usual value is @w{@code{"[ \f\t\n\r\v]+"}}. @node Modifying Strings @section Modifying Strings +@cindex modifying strings +@cindex string modification The most basic way to alter the contents of an existing string is with @code{aset} (@pxref{Array Functions}). @code{(aset @var{string} @@ -400,6 +406,7 @@ zeros. It may also change @var{string}'s length. @node Text Comparison @section Comparison of Characters and Strings @cindex string equality +@cindex text comparison @defun char-equal character1 character2 This function returns @code{t} if the arguments represent the same diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 25e6089..33577e7 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -592,6 +592,8 @@ in turn, repeatedly, until they all return @code{nil}. @node Motion and Syntax @section Motion and Syntax +@cindex moving across syntax classes +@cindex skipping characters of certain syntax This section describes functions for moving across characters that have certain syntax classes. @@ -631,6 +633,8 @@ expression prefix syntax class, and characters with the @samp{p} flag. @node Parsing Expressions @section Parsing Expressions +@cindex parsing expressions +@cindex scanning expressions This section describes functions for parsing and scanning balanced expressions. We will refer to such expressions as @dfn{sexps}, @@ -673,6 +677,7 @@ result, Emacs treats them as four consecutive empty string constants. @node Motion via Parsing @subsection Motion Commands Based on Parsing +@cindex motion based on parsing This section describes simple point-motion functions that operate based on parsing expressions. @@ -738,6 +743,7 @@ cannot exceed that many. @node Position Parse @subsection Finding the Parse State for a Position +@cindex parse state for a position For syntactic analysis, such as in indentation, often the useful thing is to compute the syntactic state corresponding to a given buffer @@ -919,6 +925,7 @@ nicely. @node Control Parsing @subsection Parameters to Control Parsing +@cindex parsing, control parameters @defvar multibyte-syntax-as-symbol If this variable is non-@code{nil}, @code{scan-sexps} treats all diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 09dec56..27ea8bc 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -162,6 +162,7 @@ the end of a line. @node Buffer Contents @section Examining Buffer Contents +@cindex buffer portion as string This section describes functions that allow a Lisp program to convert any portion of the text in the buffer into a string. @@ -2673,6 +2674,8 @@ along with the characters; this includes such diverse functions as @node Examining Properties @subsection Examining Text Properties +@cindex examining text properties +@cindex text properties, examining The simplest way to examine text properties is to ask for the value of a particular property of a particular character. For that, use @@ -2764,6 +2767,8 @@ used instead. Here is an example: @node Changing Properties @subsection Changing Text Properties +@cindex changing text properties +@cindex text properties, changing The primitives for changing properties apply to a specified range of text in a buffer or string. The function @code{set-text-properties} @@ -2927,6 +2932,8 @@ buffer but does not copy its properties. @node Property Search @subsection Text Property Search Functions +@cindex searching text properties +@cindex text properties, searching In typical use of text properties, most of the time several or many consecutive characters have the same value for a property. Rather than @@ -3980,6 +3987,8 @@ coalesced whenever possible. @xref{Property Search}. @node Substitution @section Substituting for a Character Code +@cindex replace characters in region +@cindex substitute characters The following functions replace characters within a specified region based on their character codes. diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index e890dbc..b3466e6 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1951,6 +1951,7 @@ foo @node Variables with Restricted Values @section Variables with Restricted Values +@cindex lisp variables defined in C, restrictions Ordinary Lisp variables can be assigned any value that is a valid Lisp object. However, certain Lisp variables are not defined in Lisp, @@ -1987,6 +1988,8 @@ Attempting to assign them any other value will result in an error: @node Generalized Variables @section Generalized Variables +@cindex generalized variable +@cindex place form A @dfn{generalized variable} or @dfn{place form} is one of the many places in Lisp memory where values can be stored. The simplest place form is a regular Lisp variable. But the @sc{car}s and @sc{cdr}s of lists, elements diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 1e27d74..aa6ec2c 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1167,6 +1167,8 @@ are the opposite of what they are in those other functions. @node Recombining Windows @section Recombining Windows +@cindex recombining windows +@cindex windows, recombining When deleting the last sibling of a window @var{W}, its parent window is deleted too, with @var{W} replacing it in the window tree. This commit 9db3cdedae422ad8fe9012e16ac3510be15eb77c Author: Sam Steingold Date: Tue Dec 23 13:24:30 2014 -0500 fix bad merge diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b7c4596..0b93d76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,30 @@ (shell): Pass it to `pop-to-buffer' instead of hard-coding `pop-to-buffer-same-window'. +2014-12-23 Stefan Monnier + + * progmodes/js.el (js--syntax-propertize-regexp-syntax-table): New var. + (js-syntax-propertize-regexp): Use it to recognize "slash in + a character class" (bug#19397). + +2014-12-22 Stefan Monnier + + * completion.el: Use post-self-insert-hook (bug#19400). + (completion-separator-self-insert-command) + (completion-separator-self-insert-autofilling): Remove. + (completion-separator-chars): New var. + (completion-c-mode-hook, completion-setup-fortran-mode): Use it instead + of changing the keymap. + (completion--post-self-insert): New function. + (dynamic-completion-mode): Use it instead of rebinding keys. + (cmpl--completion-string): Rename from completion-string. + (add-completion-to-head, delete-completion): Let-bind it explicitly. + +2014-12-22 Bozhidar Batsov + + * progmodes/ruby-mode.el (ruby--string-region): Simplify code + by leveraging `syntax-ppss'. + 2014-12-22 Artur Malabarba * let-alist.el (let-alist): Use `make-symbol' instead of `gensym'. commit e55a467ec0f758c311d358ceb7d66a8a7d9482c3 Author: Sam Steingold Date: Tue Dec 23 11:44:45 2014 -0500 Use a new user option instead of hard-coding shell display. * lisp/shell.el (shell-display-buffer-actions): New user option. (shell): Pass it to `pop-to-buffer' instead of hard-coding `pop-to-buffer-same-window'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12430b6..b7c4596 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,26 +1,8 @@ -2014-12-23 Stefan Monnier +2014-12-23 Sam Steingold - * progmodes/js.el (js--syntax-propertize-regexp-syntax-table): New var. - (js-syntax-propertize-regexp): Use it to recognize "slash in - a character class" (bug#19397). - -2014-12-22 Stefan Monnier - - * completion.el: Use post-self-insert-hook (bug#19400). - (completion-separator-self-insert-command) - (completion-separator-self-insert-autofilling): Remove. - (completion-separator-chars): New var. - (completion-c-mode-hook, completion-setup-fortran-mode): Use it instead - of changing the keymap. - (completion--post-self-insert): New function. - (dynamic-completion-mode): Use it instead of rebinding keys. - (cmpl--completion-string): Rename from completion-string. - (add-completion-to-head, delete-completion): Let-bind it explicitly. - -2014-12-22 Bozhidar Batsov - - * progmodes/ruby-mode.el (ruby--string-region): Simplify code - by leveraging `syntax-ppss'. + * shell.el (shell-display-buffer-actions): New user option. + (shell): Pass it to `pop-to-buffer' instead of hard-coding + `pop-to-buffer-same-window'. 2014-12-22 Artur Malabarba diff --git a/lisp/shell.el b/lisp/shell.el index 506f944..480d04a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -308,6 +308,13 @@ for Shell mode only." (const :tag "on" t)) :group 'shell) +(defcustom shell-display-buffer-actions display-buffer-base-action + "The `display-buffer' actions for the `*shell*' buffer." + :type display-buffer--action-custom-type + :risky t + :version "25.1" + :group 'shell) + (defvar shell-dirstack nil "List of directories saved by pushd in this buffer's shell. Thus, this does not include the shell's current directory.") @@ -718,7 +725,7 @@ Otherwise, one argument `-i' is passed to the shell. ;; The buffer's window must be correctly set when we call comint (so ;; that comint sets the COLUMNS env var properly). - (pop-to-buffer-same-window buffer) + (pop-to-buffer buffer shell-display-buffer-actions) (unless (comint-check-proc buffer) (let* ((prog (or explicit-shell-file-name (getenv "ESHELL") shell-file-name)) commit 29c5e2cea22f909af7d33b290ca0eb23c5ad6c00 Author: Stefan Monnier Date: Tue Dec 23 11:17:55 2014 -0500 (js-syntax-propertize-regexp): Recognize "slash in a character class" Fixes: debbugs:19397 * lisp/progmodes/js.el (js--syntax-propertize-regexp-syntax-table): New var. (js-syntax-propertize-regexp): Use it to recognize "slash in a character class". diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8bb1c8..12430b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-23 Stefan Monnier + + * progmodes/js.el (js--syntax-propertize-regexp-syntax-table): New var. + (js-syntax-propertize-regexp): Use it to recognize "slash in + a character class" (bug#19397). + 2014-12-22 Stefan Monnier * completion.el: Use post-self-insert-hook (bug#19400). diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index c2c45aa..45074d3 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1637,12 +1637,29 @@ This performs fontification according to `js--class-styles'." js--font-lock-keywords-3) "Font lock keywords for `js-mode'. See `font-lock-keywords'.") +(defconst js--syntax-propertize-regexp-syntax-table + (let ((st (make-char-table 'syntax-table (string-to-syntax ".")))) + (modify-syntax-entry ?\[ "(]" st) + (modify-syntax-entry ?\] ")[" st) + (modify-syntax-entry ?\\ "\\" st) + st)) + (defun js-syntax-propertize-regexp (end) - (when (eq (nth 3 (syntax-ppss)) ?/) - ;; A /.../ regexp. - (when (re-search-forward "\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*/" end 'move) - (put-text-property (1- (point)) (point) - 'syntax-table (string-to-syntax "\"/"))))) + (let ((ppss (syntax-ppss))) + (when (eq (nth 3 ppss) ?/) + ;; A /.../ regexp. + (while + (when (re-search-forward "\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*/" + end 'move) + (if (nth 1 (with-syntax-table + js--syntax-propertize-regexp-syntax-table + (let ((parse-sexp-lookup-properties nil)) + (parse-partial-sexp (nth 8 ppss) (point))))) + ;; A / within a character class is not the end of a regexp. + t + (put-text-property (1- (point)) (point) + 'syntax-table (string-to-syntax "\"/")) + nil)))))) (defun js-syntax-propertize (start end) ;; Javascript allows immediate regular expression objects, written /.../. diff --git a/test/indent/js.js b/test/indent/js.js index 1924094..2d458e1 100644 --- a/test/indent/js.js +++ b/test/indent/js.js @@ -7,6 +7,11 @@ let c = 1, var e = 100500, + 1; +function test () +{ + return /[/]/.test ('/') // (bug#19397) +} + var f = bar('/protocols/') baz(); commit 14c3739040a60bfe6ed0a3ce0aa90a4758155e28 Author: Stefan Monnier Date: Tue Dec 23 10:50:36 2014 -0500 * lisp/progmodes/js.el (js-syntax-propertize): "return" can't be divided. Fixes: debbugs:19397 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9cae9b9..789f59e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-23 Stefan Monnier + + * progmodes/js.el (js-syntax-propertize): "return" can't be divided + (bug#19397). + 2014-12-23 Michael Albinus * net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 56569e1..0d81a0a 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1656,7 +1656,7 @@ This performs fontification according to `js--class-styles'." ;; We can probably just add +, -, !, <, >, %, ^, ~, |, &, ?, : at which ;; point I think only * and / would be missing which could also be added, ;; but need care to avoid affecting the // and */ comment markers. - ("\\(?:^\\|[=([{,:;]\\)\\(?:[ \t]\\)*\\(/\\)[^/*]" + ("\\(?:^\\|[=([{,:;]\\|\\_\\)\\(?:[ \t]\\)*\\(/\\)[^/*]" (1 (ignore (forward-char -1) (when (or (not (memq (char-after (match-beginning 0)) '(?\s ?\t))) commit ea78112b12a8584ef226622f49c4e455882b8fad Author: Michael Albinus Date: Tue Dec 23 14:17:00 2014 +0100 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" as end-of-line delimeter for passwords, when running on MS Windows. * net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f1346d..9cae9b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-12-23 Michael Albinus + + * net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'. + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" + as end-of-line delimeter for passwords, when running on MS Windows. + 2014-12-23 Stefan Monnier * progmodes/sh-script.el (sh-set-shell): Don't change the global value diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index dc78ace..a78d101 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2455,8 +2455,14 @@ The method used must be an out-of-band method." (mapconcat 'identity (process-command p) " ")) (tramp-set-connection-property p "vector" orig-vec) (tramp-compat-set-process-query-on-exit-flag p nil) - (tramp-process-actions - p v nil tramp-actions-copy-out-of-band) + + ;; When `shell-file-name' is "cmdproxy", we must adapt + ;; `tramp-local-end-of-line' for sending the password. + (let ((tramp-local-end-of-line + (if (string-match "cmdproxy" shell-file-name) + "\n" tramp-local-end-of-line))) + (tramp-process-actions + p v nil tramp-actions-copy-out-of-band)) ;; Check the return code. (goto-char (point-max)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 7c79595..66c9508 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4191,25 +4191,27 @@ Invokes `password-read' if available, `read-passwd' else." ;; it's bound. `auth-source-user-or-password' is an ;; obsoleted function, it has been replaced by ;; `auth-source-search'. - (and (boundp 'auth-sources) - (tramp-get-connection-property - v "first-password-request" nil) - ;; Try with Tramp's current method. - (if (fboundp 'auth-source-search) - (setq auth-info - (tramp-compat-funcall - 'auth-source-search - :max 1 - :user (or tramp-current-user t) - :host tramp-current-host - :port tramp-current-method) - auth-passwd (plist-get (nth 0 auth-info) :secret) - auth-passwd (if (functionp auth-passwd) - (funcall auth-passwd) - auth-passwd)) - (tramp-compat-funcall - 'auth-source-user-or-password - "password" tramp-current-host tramp-current-method))) + (ignore-errors + (and (boundp 'auth-sources) + (tramp-get-connection-property + v "first-password-request" nil) + ;; Try with Tramp's current method. + (if (fboundp 'auth-source-search) + (setq auth-info + (tramp-compat-funcall + 'auth-source-search + :max 1 + :user (or tramp-current-user t) + :host tramp-current-host + :port tramp-current-method) + auth-passwd (plist-get + (nth 0 auth-info) :secret) + auth-passwd (if (functionp auth-passwd) + (funcall auth-passwd) + auth-passwd)) + (tramp-compat-funcall + 'auth-source-user-or-password + "password" tramp-current-host tramp-current-method)))) ;; Try the password cache. (when (functionp 'password-read) (let ((password commit 46d40398fc0bebd8584636eddadb138a62bf32af Author: Didier Verna Date: Tue Dec 23 08:55:00 2014 +0100 Fixes: debbugs:19396 * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a C one. diff --git a/src/ChangeLog b/src/ChangeLog index f664782..b90471e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-12-23 Didier Verna (tiny change). + + * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a + C one (Bug#19396). + 2014-12-22 Jan Djärv * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which diff --git a/src/nsselect.m b/src/nsselect.m index 3b33a97..8863bd2 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -438,7 +438,8 @@ On Nextstep, TERMINAL is unused. */) if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; return ns_get_pb_change_count (selection) - == ns_get_our_change_count_for (selection); + == ns_get_our_change_count_for (selection) + ? Qt : Qnil; } commit 012479a7a6a9a2e49ba0218285b2b65b3c70b293 Author: Stefan Monnier Date: Mon Dec 22 23:22:20 2014 -0500 * lisp/progmodes/sh-script.el: Don't set global indent-line-function Fixes: debbugs:19433 (sh-set-shell): Don't change the global value of indent-line-function. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6307657..7f1346d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-23 Stefan Monnier + + * progmodes/sh-script.el (sh-set-shell): Don't change the global value + of indent-line-function (bug#19433). + 2014-12-23 Fabián Ezequiel Gallina Fix line numbers on Python shell. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 1165144..476c796 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -2350,7 +2350,7 @@ Calls the value of `sh-set-shell-hook' if set." (sh-make-vars-local)) (message "Indentation setup for shell type %s" sh-shell)) (message "No indentation for this shell type.") - (setq indent-line-function 'sh-basic-indent-line)) + (setq-local indent-line-function 'sh-basic-indent-line)) (when font-lock-mode (setq font-lock-set-defaults nil) (font-lock-set-defaults) commit 75e114fa3b0b45a6356ae3fb580e8c928b45c258 Author: Fabián Ezequiel Gallina Date: Tue Dec 23 00:45:22 2014 -0300 Fix line numbers on Python shell. * lisp/progmodes/python.el (python-shell--save-temp-file): Do not append coding cookie. (python-shell-send-string): Generalize for python-shell-send-region. (python--use-fake-loc): Delete var. (python-shell-buffer-substring): Cleanup fake-loc logic. (python-shell-send-region): Remove fake-loc logic, simplify. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c00d6bc..6307657 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2014-12-23 Fabián Ezequiel Gallina + + Fix line numbers on Python shell. + * progmodes/python.el (python-shell--save-temp-file): Do not + append coding cookie. + (python-shell-send-string): Generalize for + python-shell-send-region. + (python--use-fake-loc): Delete var. + (python-shell-buffer-substring): Cleanup fake-loc logic. + (python-shell-send-region): Remove fake-loc logic, simplify. + 2014-12-22 Fabián Ezequiel Gallina * progmodes/python.el (python-indent-post-self-insert-function): diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 6d3916c..632659c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2400,9 +2400,12 @@ there for compatibility with CEDET.") (concat (file-remote-p default-directory) "/tmp") temporary-file-directory)) (temp-file-name (make-temp-file "py")) + ;; XXX: Python's built-in compile function accepts utf-8 as + ;; input so there's no need to enforce a coding cookie. In + ;; the future making `coding-system-for-write' match the + ;; current buffer's coding may be a good idea. (coding-system-for-write 'utf-8)) (with-temp-file temp-file-name - (insert "# -*- coding: utf-8 -*-\n") ;Not needed for Python-3. (insert string) (delete-trailing-whitespace)) temp-file-name)) @@ -2412,8 +2415,9 @@ there for compatibility with CEDET.") (interactive "sPython command: ") (let ((process (or process (python-shell-get-or-create-process)))) (if (string-match ".\n+." string) ;Multiline. - (let* ((temp-file-name (python-shell--save-temp-file string))) - (python-shell-send-file temp-file-name process temp-file-name t)) + (let* ((temp-file-name (python-shell--save-temp-file string)) + (file-name (or (buffer-file-name) temp-file-name))) + (python-shell-send-file file-name process temp-file-name t)) (comint-send-string process string) (when (or (not (string-match "\n\\'" string)) (string-match "\n[ \t].*\n?\\'" string)) @@ -2498,12 +2502,6 @@ Returns the output. See `python-shell-send-string-no-output'." (define-obsolete-function-alias 'python-send-string 'python-shell-internal-send-string "24.3") -(defvar python--use-fake-loc nil - "If non-nil, use `compilation-fake-loc' to trace errors back to the buffer. -If nil, regions of text are prepended by the corresponding number of empty -lines and Python is told to output error messages referring to the whole -source file.") - (defun python-shell-buffer-substring (start end &optional nomain) "Send buffer substring from START to END formatted for shell. This is a wrapper over `buffer-substring' that takes care of @@ -2516,8 +2514,7 @@ the python shell: 3. Wraps indented regions under an \"if True:\" block so the interpreter evaluates them correctly." (let ((substring (buffer-substring-no-properties start end)) - (fillstr (unless python--use-fake-loc - (make-string (1- (line-number-at-pos start)) ?\n))) + (fillstr (make-string (1- (line-number-at-pos start)) ?\n)) (toplevel-block-p (save-excursion (goto-char start) (or (zerop (line-number-at-pos start)) @@ -2529,11 +2526,6 @@ the python shell: (if fillstr (insert fillstr)) (insert substring) (goto-char (point-min)) - (unless python--use-fake-loc - ;; python-shell--save-temp-file adds an extra coding line, which would - ;; throw off the line-counts, so let's try to compensate here. - (if (looking-at "[ \t]*[#\n]") - (delete-region (point) (line-beginning-position 2)))) (when (not toplevel-block-p) (insert "if True:") (delete-region (point) (line-end-position))) @@ -2557,26 +2549,14 @@ the python shell: (line-number-at-pos if-name-main-start)) ?\n))))) (buffer-substring-no-properties (point-min) (point-max))))) -(declare-function compilation-fake-loc "compile" - (marker file &optional line col)) - (defun python-shell-send-region (start end &optional nomain) "Send the region delimited by START and END to inferior Python process." (interactive "r") - (let* ((python--use-fake-loc - (or python--use-fake-loc (not buffer-file-name))) - (string (python-shell-buffer-substring start end nomain)) + (let* ((string (python-shell-buffer-substring start end nomain)) (process (python-shell-get-or-create-process)) (_ (string-match "\\`\n*\\(.*\\)" string))) (message "Sent: %s..." (match-string 1 string)) - (let* ((temp-file-name (python-shell--save-temp-file string)) - (file-name (or (buffer-file-name) temp-file-name))) - (python-shell-send-file file-name process temp-file-name t) - (unless python--use-fake-loc - (with-current-buffer (process-buffer process) - (compilation-fake-loc (copy-marker start) temp-file-name - 2)) ;; Not 1, because of the added coding line. - )))) + (python-shell-send-string string process))) (defun python-shell-send-buffer (&optional arg) "Send the entire buffer to inferior Python process. commit e3040f2aee768655198dd6f979a1ff3a72d17d16 Author: Paul Eggert Date: Mon Dec 22 18:42:50 2014 -0800 Merge from gnulib 2014-12-20 utimens: remove unnecessary assert 2014-12-16 stdalign: port better to HP compilers 2014-12-16 stdalign: work around Apple GCC 4.0 bug * lib/stdalign.in.h, lib/utimens.c, m4/stdalign.m4: Update from gnulib. diff --git a/ChangeLog b/ChangeLog index 718a958..7e68314 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-12-23 Paul Eggert + + Merge from gnulib + 2014-12-20 utimens: remove unnecessary assert + 2014-12-16 stdalign: port better to HP compilers + 2014-12-16 stdalign: work around Apple GCC 4.0 bug + * lib/stdalign.in.h, lib/utimens.c, m4/stdalign.m4: Update from gnulib. + 2014-12-14 Paul Eggert Spelling fixes diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index dcaab55..413936d 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -95,7 +95,10 @@ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 # if defined __cplusplus && 201103 <= __cplusplus # define _Alignas(a) alignas (a) -# elif (__GNUC__ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ +# elif ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ || __ICC || 0x5110 <= __SUNPRO_C) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <= _MSC_VER diff --git a/lib/utimens.c b/lib/utimens.c index dd3ec66..0444103 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -24,7 +24,6 @@ #define _GL_UTIMENS_INLINE _GL_EXTERN_INLINE #include "utimens.h" -#include #include #include #include @@ -87,7 +86,6 @@ validate_timespec (struct timespec timespec[2]) { int result = 0; int utime_omit_count = 0; - assert (timespec); if ((timespec[0].tv_nsec != UTIME_NOW && timespec[0].tv_nsec != UTIME_OMIT && ! (0 <= timespec[0].tv_nsec diff --git a/m4/stdalign.m4 b/m4/stdalign.m4 index 9efafe5..f60257f 100644 --- a/m4/stdalign.m4 +++ b/m4/stdalign.m4 @@ -32,8 +32,12 @@ AC_DEFUN([gl_STDALIGN_H], /* Test _Alignas only on platforms where gnulib can help. */ #if \ ((defined __cplusplus && 201103 <= __cplusplus) \ - || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ - || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + || (defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ + || __ICC || 0x5110 <= __SUNPRO_C \ + || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 ? 1 : -1]; commit d0fd23c552225314b7d0754a62fba670e3cfb9a4 Author: Eli Zaretskii Date: Mon Dec 22 20:23:06 2014 +0200 doc/emacs/buffers.texi (Kill Buffer): Improve indexing. diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index e307ff3..2d4263a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2014-12-22 Eli Zaretskii + + * buffers.texi (Kill Buffer): Improve indexing. + 2014-11-19 Paul Eggert Lessen focus on ChangeLog files, as opposed to change log entries. diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 54a8498..f036d85 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -269,11 +269,16 @@ can also be used to copy text from one buffer to another. @section Killing Buffers @cindex killing buffers +@cindex close buffer +@cindex close file If you continue an Emacs session for a while, you may accumulate a large number of buffers. You may then find it convenient to @dfn{kill} -the buffers you no longer need. On most operating systems, killing a -buffer releases its space back to the operating system so that other -programs can use it. Here are some commands for killing buffers: +the buffers you no longer need. (Some other editors call this +operation @dfn{close}, and talk about ``closing the buffer'' or +``closing the file'' visited in the buffer.) On most operating +systems, killing a buffer releases its space back to the operating +system so that other programs can use it. Here are some commands for +killing buffers: @table @kbd @item C-x k @var{bufname} @key{RET} commit b11d8924b565bd96939537b10a70bb3c26532bed Author: Stefan Monnier Date: Mon Dec 22 12:43:23 2014 -0500 * lisp/cedet: Reduce reliance on EIEIO internals. * lisp/cedet/ede/generic.el (ede-find-target): Prefer \` and \' to ^ and $. * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag): Prefer find-class over class-v. * lisp/cedet/semantic/db.el (semanticdb-cache-get): Prefer eieio-object-class over eieio--object-class. * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children. diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 46296d3..a43e94c 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,9 +1,21 @@ +2014-12-22 Stefan Monnier + + * srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children. + + * semantic/db.el (semanticdb-cache-get): Prefer eieio-object-class over + eieio--object-class. + + * semantic/db-el.el (semanticdb-elisp-sym->tag): Prefer find-class over + class-v. + + * ede/generic.el (ede-find-target): Prefer \` and \' to ^ and $. + 2014-12-14 Dmitry Gutov * semantic.el (semantic-analyze-completion-at-point-function) (semantic-analyze-notc-completion-at-point-function) - (semantic-analyze-nolongprefix-completion-at-point-function): Do - nothing if the current buffer is not using Semantic (bug#19077). + (semantic-analyze-nolongprefix-completion-at-point-function): + Do nothing if the current buffer is not using Semantic (bug#19077). 2014-12-08 Matt Curtis (tiny change) @@ -14,11 +26,11 @@ * semantic.el (semantic-mode): Add/remove 3 completion-at-point-functions. - (semantic-completion-at-point-function): Removed. + (semantic-completion-at-point-function): Remove. (semantic-analyze-completion-at-point-function) (semantic-analyze-notc-completion-at-point-function) - (semantic-analyze-nolongprefix-completion-at-point-function): New - completion at point functions. + (semantic-analyze-nolongprefix-completion-at-point-function): + New completion at point functions. * semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case when comment-end is empty string. @@ -62,18 +74,18 @@ assignee now must be of class variable. * semantic/analyze/complete.el - (semantic-analyze-possible-completions-default): Add - 'no-longprefix' flag. When used, the prefix and prefixtypes are + (semantic-analyze-possible-completions-default): + Add 'no-longprefix' flag. When used, the prefix and prefixtypes are shortened to just the last symbol. * semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from 'hideif', and push to the parser warning stack. (semantic-lex-cpp-define): When a comment is at the end of a - macro, do not subtract an extra 1 from the found position. Fixes - bug with: #define foo (a)/**/ adding an extra ')' to the stream. + macro, do not subtract an extra 1 from the found position. + Fixes bug with: #define foo (a)/**/ adding an extra ')' to the stream. - * semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow - symbols to be one char long. + * semantic/bovine/scm.el (semantic-lex-scheme-symbol): + Allow symbols to be one char long. * semantic/bovine/grammar.el (bovine-grammar-calculate-source-on-path): New. @@ -89,8 +101,8 @@ (ede-check-project-query-fcn): New variable (ede-check-project-directory): Use above when querying the user. Added to support unit testing of this security measure. - (ede-initialize-state-current-buffer): Use - `ede-directory-project-cons' instead of the -detect- fcn to take + (ede-initialize-state-current-buffer): + Use `ede-directory-project-cons' instead of the -detect- fcn to take advantage of the cache. Pass found project into `ede-load-project-file'. (ede-load-project-file): Add new input DETECTIN. @@ -103,18 +115,18 @@ (ede-global-list-sanity-check): New Testing fcn. (ede-parent-project): Replace old code with call to faster `ede-find-subproject-for-directory'. - (ede-load-project-file): Use - `ede-directory-get-toplevel-open-project' instead of above - deleted. Rename "pfc" to "autoloader". Use - `ede-directory-project-cons' to detect a project. Delete no + (ede-load-project-file): + Use `ede-directory-get-toplevel-open-project' instead of above + deleted. Rename "pfc" to "autoloader". + Use `ede-directory-project-cons' to detect a project. Delete no project found case where we search up the tree. - * ede/auto.el (ede-project-autoload): Fix doc typo. Add - `:root-only' slot. + * ede/auto.el (ede-project-autoload): Fix doc typo. + Add `:root-only' slot. (ede-auto-load-project): Doc update: warn to not use. - (ede-dir-to-projectfile): Deleted. - (ede-project-autoload-dirmatch): Add subdir-only slot. Make - configdatastash unbound by default. + (ede-dir-to-projectfile): Delete. + (ede-project-autoload-dirmatch): Add subdir-only slot. + Make configdatastash unbound by default. (ede-do-dirmatch): If subdir-only is true, then don't allow exact matches. Account for configdatastash as unbound. Assume value of nil means no tool installed. Make sure loaded path matches from @@ -122,7 +134,7 @@ (ede-project-class-files): Note that makefile and automake are not root only. (ede-auto-detect-in-dir): New (for use with `ede/detect.el'). - (ede-project-dirmatch-p): Deleted. + (ede-project-dirmatch-p): Delete. (ede-project-root-directory): Remove body, return nil. (ede-project-autoload): :proj-root-dirmatch can be null & doc fix. (ede-auto-detect-in-dir): If there is no :proj-file, check for a @@ -140,8 +152,8 @@ (ede-generic-config): Remove slots: c-include-path, c-preprocessor-table, c-preprocessor-files, classpath, build-command, debug-command, run command. Inherit from - ede-extra-config-build, ede-extra-config-program. Make - run-command :value match :custom so only strings are accepted. + ede-extra-config-build, ede-extra-config-program. + Make run-command :value match :custom so only strings are accepted. Add some more :group slot specifiers. (ede-generic-project): Add mixins `ede-project-with-config-c' and `ede-project-with-config-java'. Inherit from @@ -153,15 +165,15 @@ (ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'. (ede-generic-target-java): Add mixin `ede-target-with-config-java'. (ede-preprocessor-map, ede-system-include-path) - (edejava-classpath): Deleted, moved to config.el. + (edejava-classpath): Delete, moved to config.el. (project-compile-project, project-compile-target) - (project-debug-target, project-run-target): Deleted. + (project-debug-target, project-run-target): Delete. (ede-generic-get-configuration, ede-generic-setup-configuration) (ede-commit-project, project-rescan) (ede-generic-project::ede-customize) (ede-generic-target::ede-customize) (ede-generic-config::eieio-done-customizing) - (ede-generic-config::ede-commit): Deleted. Subsumed by new + (ede-generic-config::ede-commit): Delete. Subsumed by new baseclass. (ede-preprocessor-map, ede-system-include-path) (project-debug-target, project-run-target): Call new @@ -170,7 +182,7 @@ * ede/files.el (ede-find-project-root) (ede-files-find-existing) - (ede-directory-get-toplevel-open-project-new): Deleted. + (ede-directory-get-toplevel-open-project-new): Delete. (ede-project-root-directory): Use `ede-project-root' first. (ede-project-directory-remove-hash) (ede--directory-project-from-hash) @@ -186,20 +198,20 @@ projects. When doing directory name matching, save the 'short' version of an answer (non-exact match) and eventually select the shortest answer at the end. Expand the filename of tested - projects. Better support for when inodes are disabled. Add - 'exact' option so that it will return a project that is an exact + projects. Better support for when inodes are disabled. + Add 'exact' option so that it will return a project that is an exact match. (ede-find-subproject-for-directory): Small optimization to run `file-truename' less often. (ede-directory-project-p): Move content, then use - `ede-directory-project-cons'. Use - `ede-detect-directory-for-project', replacing old detection loop. + `ede-directory-project-cons'. + Use `ede-detect-directory-for-project', replacing old detection loop. (ede-directory-project-cons): New, from above. - (ede-toplevel-project): Toss old scanning code. Use - `ede-detect-directory-for-project' instead. + (ede-toplevel-project): Toss old scanning code. + Use `ede-detect-directory-for-project' instead. (ede-directory-get-toplevel-open-project-new): New. - * ede/linux.el (ede-linux-project-root): Deleted. + * ede/linux.el (ede-linux-project-root): Delete. (ede-project-autoload): Remove dirmatch entry - it is no longer needed. @@ -220,7 +232,7 @@ * ede/linux.el (ede-linux-load): Do not add to global list here. Don't check for existing anymore. (project-rescan): New. - (ede-linux-project-list, ede-linux-file-existing): Deleted. + (ede-linux-project-list, ede-linux-file-existing): Delete. (ede-linux-project-root): Delete body. Need symbol for autoloads for now. (ede-linux-project): No longer instance tracker. @@ -242,7 +254,7 @@ (ede-cpp-root-file-existing) (ede-cpp-root-project-file-for-dir) (ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load) - (ede-project-autoload cpp-root): Deleted. + (ede-project-autoload cpp-root): Delete. (ede-project-root-directory): Return :directory instead of calculating from :file. (project-rescan): New. diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index f0314cb..6d45353 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -232,7 +232,7 @@ If one doesn't exist, create a new one for this directory." (let* ((classsym (intern (car C))) (extreg (oref classsym extension))) (when (and (not (string= extreg "")) - (string-match (concat "^" extreg "$") ext)) + (string-match (concat "\\`\\(?:" extreg "\\)\\'") ext)) (setq cls classsym))))) (when (not cls) (setq cls 'ede-generic-target-misc)) ;; find a pre-existing matching target diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 7ff1538..f37aa07 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -223,7 +223,9 @@ TOKTYPE is a hint to the type of tag desired." (symbol-name sym) "class" (semantic-elisp-desymbolify - (eieio--class-public-a (class-v semanticdb-project-database))) ;; slots + ;; FIXME: This only gives the instance slots and ignores the + ;; class-allocated slots. + (eieio--class-public-a (find-class semanticdb-project-database))) ;; slots ;FIXME: eieio-- (semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents )) ((not toktype) diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 13e2d1b..0732f22 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -481,7 +481,7 @@ other than :table." (let ((cache (oref table cache)) (obj nil)) (while (and (not obj) cache) - (if (eq (eieio--object-class (car cache)) desired-class) + (if (eq (eieio-object-class (car cache)) desired-class) (setq obj (car cache))) (setq cache (cdr cache))) (if obj @@ -532,7 +532,7 @@ other than :table." (let ((cache (oref db cache)) (obj nil)) (while (and (not obj) cache) - (if (eq (eieio--object-class (car cache)) desired-class) + (if (eq (eieio-object-class (car cache)) desired-class) (setq obj (car cache))) (setq cache (cdr cache))) (if obj diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 48a4865..dfc1df8 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el @@ -233,7 +233,7 @@ we can tell font lock about them.") "Provide help for working with macros in a template." (interactive) (let* ((root 'srecode-template-inserter) - (chl (eieio--class-children (class-v root))) + (chl (eieio-class-children root)) (ess (srecode-template-get-escape-start)) (ees (srecode-template-get-escape-end)) ) @@ -249,7 +249,7 @@ we can tell font lock about them.") (showexample t) ) (setq chl (cdr chl)) - (setq chl (append (eieio--class-children (class-v C)) chl)) + (setq chl (append (eieio-class-children C) chl)) (catch 'skip (when (eq C 'srecode-template-inserter-section-end) commit b366b3bbf5ce0f6b47afec2eff0f7d27291e9a6f Author: Stefan Monnier Date: Mon Dec 22 12:35:29 2014 -0500 * lisp/completion.el: Use post-self-insert-hook. Fixes: debbugs:19400 (completion-separator-self-insert-command) (completion-separator-self-insert-autofilling): Remove. (completion-separator-chars): New var. (completion-c-mode-hook, completion-setup-fortran-mode): Use it instead of changing the keymap. (completion--post-self-insert): New function. (dynamic-completion-mode): Use it instead of rebinding keys. (cmpl--completion-string): Rename from completion-string. (add-completion-to-head, delete-completion): Let-bind it explicitly. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 484ac1a..d8bb1c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2014-12-22 Stefan Monnier + + * completion.el: Use post-self-insert-hook (bug#19400). + (completion-separator-self-insert-command) + (completion-separator-self-insert-autofilling): Remove. + (completion-separator-chars): New var. + (completion-c-mode-hook, completion-setup-fortran-mode): Use it instead + of changing the keymap. + (completion--post-self-insert): New function. + (dynamic-completion-mode): Use it instead of rebinding keys. + (cmpl--completion-string): Rename from completion-string. + (add-completion-to-head, delete-completion): Let-bind it explicitly. + 2014-12-22 Bozhidar Batsov * progmodes/ruby-mode.el (ruby--string-region): Simplify code diff --git a/lisp/completion.el b/lisp/completion.el index d2d94e7..c2a2005 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -373,7 +373,7 @@ Used to decide whether to save completions.") (defvar cmpl-preceding-syntax) -(defvar completion-string) +(defvar cmpl--completion-string) ;;--------------------------------------------------------------------------- ;; Low level tools @@ -1082,7 +1082,7 @@ Must be called after `find-exact-completion'." (cmpl-db-debug-p ;; not found, error if debug mode (error "Completion entry exists but not on prefix list - %s" - completion-string)) + cmpl--completion-string)) (inside-locate-completion-entry ;; recursive error: really scrod (locate-completion-db-error)) @@ -1149,73 +1149,75 @@ COMPLETION-STRING must be longer than `completion-prefix-min-length'. Updates the saved string with the supplied string. This must be very fast. Returns the completion entry." - ;; Handle pending acceptance - (if completion-to-accept (accept-completion)) - ;; test if already in database - (if (setq cmpl-db-entry (find-exact-completion completion-string)) - ;; found - (let* ((prefix-entry (find-cmpl-prefix-entry - (substring cmpl-db-downcase-string 0 - completion-prefix-min-length))) - (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry)) - (cmpl-ptr (cdr splice-ptr))) - ;; update entry - (set-completion-string cmpl-db-entry completion-string) - ;; move to head (if necessary) - (cond (splice-ptr - ;; These should all execute atomically but it is not fatal if - ;; they don't. - ;; splice it out - (or (setcdr splice-ptr (cdr cmpl-ptr)) - ;; fix up tail if necessary - (set-cmpl-prefix-entry-tail prefix-entry splice-ptr)) - ;; splice in at head - (setcdr cmpl-ptr (cmpl-prefix-entry-head prefix-entry)) - (set-cmpl-prefix-entry-head prefix-entry cmpl-ptr))) - cmpl-db-entry) - ;; not there - (let (;; create an entry - (entry (list (make-completion completion-string))) - ;; setup the prefix - (prefix-entry (find-cmpl-prefix-entry - (substring cmpl-db-downcase-string 0 - completion-prefix-min-length)))) - (cond (prefix-entry - ;; Splice in at head - (setcdr entry (cmpl-prefix-entry-head prefix-entry)) - (set-cmpl-prefix-entry-head prefix-entry entry)) - (t - ;; Start new prefix entry - (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) - ;; Add it to the symbol - (set cmpl-db-symbol (car entry))))) + (let ((cmpl--completion-string completion-string)) + ;; Handle pending acceptance + (if completion-to-accept (accept-completion)) + ;; test if already in database + (if (setq cmpl-db-entry (find-exact-completion completion-string)) + ;; found + (let* ((prefix-entry (find-cmpl-prefix-entry + (substring cmpl-db-downcase-string 0 + completion-prefix-min-length))) + (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry)) + (cmpl-ptr (cdr splice-ptr))) + ;; update entry + (set-completion-string cmpl-db-entry completion-string) + ;; move to head (if necessary) + (cond (splice-ptr + ;; These should all execute atomically but it is not fatal if + ;; they don't. + ;; splice it out + (or (setcdr splice-ptr (cdr cmpl-ptr)) + ;; fix up tail if necessary + (set-cmpl-prefix-entry-tail prefix-entry splice-ptr)) + ;; splice in at head + (setcdr cmpl-ptr (cmpl-prefix-entry-head prefix-entry)) + (set-cmpl-prefix-entry-head prefix-entry cmpl-ptr))) + cmpl-db-entry) + ;; not there + (let ( ;; create an entry + (entry (list (make-completion completion-string))) + ;; setup the prefix + (prefix-entry (find-cmpl-prefix-entry + (substring cmpl-db-downcase-string 0 + completion-prefix-min-length)))) + (cond (prefix-entry + ;; Splice in at head + (setcdr entry (cmpl-prefix-entry-head prefix-entry)) + (set-cmpl-prefix-entry-head prefix-entry entry)) + (t + ;; Start new prefix entry + (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) + ;; Add it to the symbol + (set cmpl-db-symbol (car entry)))))) (defun delete-completion (completion-string) "Delete the completion from the database. String must be longer than `completion-prefix-min-length'." ;; Handle pending acceptance - (if completion-to-accept (accept-completion)) - (if (setq cmpl-db-entry (find-exact-completion completion-string)) - ;; found - (let* ((prefix-entry (find-cmpl-prefix-entry - (substring cmpl-db-downcase-string 0 - completion-prefix-min-length))) - (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry))) - ;; delete symbol reference - (set cmpl-db-symbol nil) - ;; remove from prefix list - (cond (splice-ptr - ;; not at head - (or (setcdr splice-ptr (cdr (cdr splice-ptr))) - ;; fix up tail if necessary - (set-cmpl-prefix-entry-tail prefix-entry splice-ptr))) - (t - ;; at head - (or (set-cmpl-prefix-entry-head + (let ((cmpl--completion-string completion-string)) + (if completion-to-accept (accept-completion)) + (if (setq cmpl-db-entry (find-exact-completion completion-string)) + ;; found + (let* ((prefix-entry (find-cmpl-prefix-entry + (substring cmpl-db-downcase-string 0 + completion-prefix-min-length))) + (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry))) + ;; delete symbol reference + (set cmpl-db-symbol nil) + ;; remove from prefix list + (cond (splice-ptr + ;; not at head + (or (setcdr splice-ptr (cdr (cdr splice-ptr))) + ;; fix up tail if necessary + (set-cmpl-prefix-entry-tail prefix-entry splice-ptr))) + (t + ;; at head + (or (set-cmpl-prefix-entry-head prefix-entry (cdr (cmpl-prefix-entry-head prefix-entry))) - ;; List is now empty - (set cmpl-db-prefix-symbol nil))))) - (error "Unknown completion `%s'" completion-string))) + ;; List is now empty + (set cmpl-db-prefix-symbol nil))))) + (error "Unknown completion `%s'" completion-string)))) ;; Tests -- ;; - Add and Find - @@ -1311,7 +1313,7 @@ are specified." (delete-completion string)) (defun accept-completion () - "Accepts the pending completion in `completion-to-accept'. + "Accept the pending completion in `completion-to-accept'. This bumps num-uses. Called by `add-completion-to-head' and `completion-search-reset'." (let ((string completion-to-accept) @@ -2156,26 +2158,27 @@ Patched to remove the most recent completion." ;; to work) ;; All common separators (eg. space "(" ")" """) characters go through a -;; function to add new words to the list of words to complete from: -;; COMPLETION-SEPARATOR-SELF-INSERT-COMMAND (arg). +;; function to add new words to the list of words to complete from. ;; If the character before this was an alpha-numeric then this adds the ;; symbol before point to the completion list (using ADD-COMPLETION). -(defun completion-separator-self-insert-command (arg) - (interactive "p") - (if (command-remapping 'self-insert-command) - (funcall (command-remapping 'self-insert-command) arg) - (use-completion-before-separator) - (self-insert-command arg))) - -(defun completion-separator-self-insert-autofilling (arg) - (interactive "p") - (if (command-remapping 'self-insert-command) - (funcall (command-remapping 'self-insert-command) arg) - (use-completion-before-separator) - (self-insert-command arg) - (and auto-fill-function - (funcall auto-fill-function)))) +(defvar completion-separator-chars + (append " !%^&()=`|{}[];\\'#,?" + ;; We include period and colon even though they are symbol + ;; chars because : + ;; - in text we want to pick up the last word in a sentence. + ;; - in C pointer refs. we want to pick up the first symbol + ;; - it won't make a difference for lisp mode (package names + ;; are short) + ".:" nil)) + +(defun completion--post-self-insert () + (when (memq last-command-event completion-separator-chars) + (let ((after-pos (electric--after-char-pos))) + (when after-pos + (save-excursion + (goto-char (1- after-pos)) + (use-completion-before-separator)))))) ;;----------------------------------------------- ;; Wrapping Macro @@ -2244,9 +2247,8 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (completion-def-wrapper 'electric-c-semi :separator) (defun completion-c-mode-hook () (setq completion-syntax-table completion-c-syntax-table) - (local-set-key "+" 'completion-separator-self-insert-command) - (local-set-key "*" 'completion-separator-self-insert-command) - (local-set-key "/" 'completion-separator-self-insert-command)) + (setq-local completion-separator-chars + (append "+*/" completion-separator-chars))) ;; FORTRAN mode diffs. (these are defined when fortran is called) @@ -2259,10 +2261,8 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (defun completion-setup-fortran-mode () (setq completion-syntax-table completion-fortran-syntax-table) - (local-set-key "+" 'completion-separator-self-insert-command) - (local-set-key "-" 'completion-separator-self-insert-command) - (local-set-key "*" 'completion-separator-self-insert-command) - (local-set-key "/" 'completion-separator-self-insert-command)) + (setq-local completion-separator-chars + (append "+-*/" completion-separator-chars))) ;; Enable completion mode. @@ -2281,15 +2281,16 @@ if ARG is omitted or nil." ;; This is always good, not specific to dynamic-completion-mode. (define-key function-key-map [C-return] [?\C-\r]) - (dolist (x '((find-file-hook . completion-find-file-hook) - (pre-command-hook . completion-before-command) + (dolist (x `((find-file-hook . ,#'completion-find-file-hook) + (pre-command-hook . ,#'completion-before-command) ;; Save completions when killing Emacs. - (kill-emacs-hook . kill-emacs-save-completions) + (kill-emacs-hook . ,#'kill-emacs-save-completions) + (post-self-insert-hook . ,#'completion--post-self-insert) ;; Install the appropriate mode tables. - (lisp-mode-hook . completion-lisp-mode-hook) - (c-mode-hook . completion-c-mode-hook) - (fortran-mode-hook . completion-setup-fortran-mode))) + (lisp-mode-hook . ,#'completion-lisp-mode-hook) + (c-mode-hook . ,#'completion-c-mode-hook) + (fortran-mode-hook . ,#'completion-setup-fortran-mode))) (if dynamic-completion-mode (add-hook (car x) (cdr x)) (remove-hook (car x) (cdr x)))) @@ -2315,44 +2316,7 @@ if ARG is omitted or nil." ;; cumb ;; Patches to standard keymaps insert completions - ([remap kill-region] . completion-kill-region) - - ;; Separators - ;; We've used the completion syntax table given as a guide. - ;; - ;; Global separator chars. - ;; We left out because there are too many special - ;; cases for it. Also, in normal coding it's rarely typed - ;; after a word. - (" " . completion-separator-self-insert-autofilling) - ("!" . completion-separator-self-insert-command) - ("%" . completion-separator-self-insert-command) - ("^" . completion-separator-self-insert-command) - ("&" . completion-separator-self-insert-command) - ("(" . completion-separator-self-insert-command) - (")" . completion-separator-self-insert-command) - ("=" . completion-separator-self-insert-command) - ("`" . completion-separator-self-insert-command) - ("|" . completion-separator-self-insert-command) - ("{" . completion-separator-self-insert-command) - ("}" . completion-separator-self-insert-command) - ("[" . completion-separator-self-insert-command) - ("]" . completion-separator-self-insert-command) - (";" . completion-separator-self-insert-command) - ("\"". completion-separator-self-insert-command) - ("'" . completion-separator-self-insert-command) - ("#" . completion-separator-self-insert-command) - ("," . completion-separator-self-insert-command) - ("?" . completion-separator-self-insert-command) - - ;; We include period and colon even though they are symbol - ;; chars because : - ;; - in text we want to pick up the last word in a sentence. - ;; - in C pointer refs. we want to pick up the first symbol - ;; - it won't make a difference for lisp mode (package names - ;; are short) - ("." . completion-separator-self-insert-command) - (":" . completion-separator-self-insert-command))) + ([remap kill-region] . completion-kill-region))) (push (cons (car binding) (lookup-key global-map (car binding))) completion-saved-bindings) (global-set-key (car binding) (cdr binding))) commit fafba80d7353f4ab5c359df75798f8130599371a Author: Bozhidar Batsov Date: Mon Dec 22 17:03:32 2014 +0200 Simplify ruby--string-region * progmodes/ruby-mode.el (ruby--string-region): Simplify code by leveraging `syntax-ppss'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37fbc6a..484ac1a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-22 Bozhidar Batsov + + * progmodes/ruby-mode.el (ruby--string-region): Simplify code + by leveraging `syntax-ppss'. + 2014-12-22 Artur Malabarba * let-alist.el (let-alist): Use `make-symbol' instead of `gensym'. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 225f1f6..bf0884f 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1768,17 +1768,12 @@ If the result is do-end block, it will always be multiline." (defun ruby--string-region () "Return region for string at point." - (let ((orig-point (point)) (regex "'\\(\\(\\\\'\\)\\|[^']\\)*'\\|\"\\(\\(\\\\\"\\)\\|[^\"]\\)*\"") beg end) - (save-excursion - (goto-char (line-beginning-position)) - (while (and (re-search-forward regex (line-end-position) t) (not (and beg end))) - (let ((match-beg (match-beginning 0)) (match-end (match-end 0))) - (when (and - (> orig-point match-beg) - (< orig-point match-end)) - (setq beg match-beg) - (setq end match-end)))) - (and beg end (list beg end))))) + (let ((state (syntax-ppss))) + (when (memq (nth 3 state) '(?' ?\")) + (save-excursion + (goto-char (nth 8 state)) + (forward-sexp) + (list (nth 8 state) (point)))))) (defun ruby-string-at-point-p () "Check if cursor is at a string or not." commit 251463c60bfb49920bdaba828e650806682ddd63 Author: Artur Malabarba Date: Mon Dec 22 10:36:30 2014 -0200 let-alist.el (let-alist): Use `make-symbol' instead of `gensym'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 436ac16..37fbc6a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-22 Artur Malabarba + + * let-alist.el (let-alist): Use `make-symbol' instead of `gensym'. + 2014-12-20 Michael Albinus * net/tramp-sh.el (tramp-histfile-override): Add :version. diff --git a/lisp/let-alist.el b/lisp/let-alist.el index 692beba..7271e39 100644 --- a/lisp/let-alist.el +++ b/lisp/let-alist.el @@ -4,7 +4,7 @@ ;; Author: Artur Malabarba ;; Maintainer: Artur Malabarba -;; Version: 1.0.2 +;; Version: 1.0.3 ;; Keywords: extensions lisp ;; Prefix: let-alist ;; Separator: - @@ -131,7 +131,7 @@ the variables of the outer one. You can, however, access alists inside the original alist by using dots inside the symbol, as displayed in the example above." (declare (indent 1) (debug t)) - (let ((var (gensym "alist"))) + (let ((var (make-symbol "alist"))) `(let ((,var ,alist)) (let ,(mapcar (lambda (x) `(,(car x) ,(let-alist--access-sexp (car x) var))) (delete-dups (let-alist--deep-dot-search body))) diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el index 391ccb4..c43e6a0 100644 --- a/test/automated/let-alist.el +++ b/test/automated/let-alist.el @@ -30,7 +30,7 @@ (.test-two (cdr (assq 'test-two symbol)))) (list .test-one .test-two .test-two .test-two))) - (cl-letf (((symbol-function #'gensym) (lambda (x) 'symbol))) + (cl-letf (((symbol-function #'make-symbol) (lambda (x) 'symbol))) (macroexpand '(let-alist data (list .test-one .test-two .test-two .test-two)))))) commit 8e818d17d2bada8cc2f2eda438f70014fd40939f Author: Jan D Date: Mon Dec 22 11:04:24 2014 +0100 Keep maximized when going fullscreen. Author: Fixes: Bug#19427 * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert when going to fullscreen (Bug#19427). diff --git a/src/ChangeLog b/src/ChangeLog index d6de89a..9aeb8f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-12-22 Jan Djärv + + * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert + when going to fullscreen (Bug#0x180004f). + 2014-12-18 Eli Zaretskii * window.c (Fwindow_body_width): Doc fix. (Bug#19395) diff --git a/src/xterm.c b/src/xterm.c index b6430ad..ec1cad3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8371,11 +8371,9 @@ do_ewmh_fullscreen (struct frame *f) switch (f->want_fullscreen) { case FULLSCREEN_BOTH: - if (cur == FULLSCREEN_WIDTH || cur == FULLSCREEN_MAXIMIZED - || cur == FULLSCREEN_HEIGHT) - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_maximized_horz, - dpyinfo->Xatom_net_wm_state_maximized_vert); - set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_fullscreen, None); + if (cur != FULLSCREEN_BOTH) + set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_fullscreen, + None); break; case FULLSCREEN_WIDTH: if (cur == FULLSCREEN_BOTH || cur == FULLSCREEN_HEIGHT commit 6f3f6050607cf64cb5728af1ff871b8c5e994661 Author: Jan D Date: Mon Dec 22 09:19:37 2014 +0100 Fix setting icon for Gtk+ on non-initial frame. Fixes: debbugs:19403 * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which breaks icon setting for Gtk+ except for initial frame. diff --git a/src/ChangeLog b/src/ChangeLog index c857430..f664782 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-12-22 Jan Djärv + + * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which + breaks icon setting for Gtk+ except for initial frame (Bug#19403). + 2014-12-22 Paul Eggert Use bool for boolean in xterm.c diff --git a/src/xterm.c b/src/xterm.c index 8cc6475..0640208 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8234,8 +8234,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) #ifdef USE_GTK - if (FRAME_DISPLAY_INFO (f)->icon_bitmap_id == -2 - || xg_set_icon (f, xg_default_icon_file) + if (xg_set_icon (f, xg_default_icon_file) || xg_set_icon_from_xpm_data (f, gnu_xpm_bits)) { FRAME_DISPLAY_INFO (f)->icon_bitmap_id = -2; commit 749813e9d4a844384e0450f6f7f88484b15e348a Author: Fabián Ezequiel Gallina Date: Mon Dec 22 02:24:42 2014 -0300 python.el: Fix electric colon behavior * lisp/progmodes/python.el (python-indent-post-self-insert-function): Make colon to re-indent only for dedenters, handling multiline-statements gracefully. * test/automated/python-tests.el (python-indent-electric-colon-2) (python-indent-electric-colon-3): New tests. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4f620e..c00d6bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-22 Fabián Ezequiel Gallina + + * progmodes/python.el (python-indent-post-self-insert-function): + Make colon to re-indent only for dedenters, handling + multiline-statements gracefully. + 2014-12-21 Michael Albinus * net/tramp.el (tramp-handle-insert-file-contents): diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 357ca5b..6d3916c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1175,12 +1175,18 @@ the line will be re-indented automatically if needed." (eolp) ;; Avoid re-indenting on extra colon (not (equal ?: (char-before (1- (point))))) - (not (python-syntax-comment-or-string-p)) - ;; Never re-indent at beginning of defun - (not (save-excursion - (python-nav-beginning-of-statement) - (python-info-looking-at-beginning-of-defun)))) - (python-indent-line))))) + (not (python-syntax-comment-or-string-p))) + ;; Just re-indent dedenters + (let ((dedenter-pos (python-info-dedenter-statement-p)) + (current-pos (point))) + (when dedenter-pos + (save-excursion + (goto-char dedenter-pos) + (python-indent-line) + (unless (= (line-number-at-pos dedenter-pos) + (line-number-at-pos current-pos)) + ;; Reindent region if this is a multiline statement + (python-indent-region dedenter-pos current-pos))))))))) ;;; Navigation diff --git a/test/ChangeLog b/test/ChangeLog index a117834c..a91392d 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2014-12-22 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-indent-electric-colon-2) + (python-indent-electric-colon-3): New tests. + 2014-12-14 João Távora * automated/electric-tests.el (autowrapping-7): Tests for diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index f84ded8..d1713ac 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -740,6 +740,39 @@ def b() (python-tests-self-insert ":") (should (= (current-indentation) 0)))) +(ert-deftest python-indent-electric-colon-2 () + "Test indentation case for dedenter." + (python-tests-with-temp-buffer + " +if do: + something() + else +" + (python-tests-look-at "else") + (goto-char (line-end-position)) + (python-tests-self-insert ":") + (should (= (current-indentation) 0)))) + +(ert-deftest python-indent-electric-colon-3 () + "Test indentation case for multi-line dedenter." + (python-tests-with-temp-buffer + " +if do: + something() + elif (this + and + that) +" + (python-tests-look-at "that)") + (goto-char (line-end-position)) + (python-tests-self-insert ":") + (python-tests-look-at "elif" -1) + (should (= (current-indentation) 0)) + (python-tests-look-at "and") + (should (= (current-indentation) 6)) + (python-tests-look-at "that)") + (should (= (current-indentation) 6)))) + (ert-deftest python-indent-region-1 () "Test indentation case from Bug#18843." (let ((contents " commit 4dc78f64787d159667e81b29543445bc8ca40bbc Author: Paul Eggert Date: Sun Dec 21 20:03:09 2014 -0800 Remove obsolete references to pre-C99 builds * doc/lispref/internals.texi (C Integer Types): Don't mention pre-C99 compilers. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5b37506..3621c56 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2014-12-22 Paul Eggert + + Remove obsolete references to pre-C99 builds + * internals.texi (C Integer Types): Don't mention pre-C99 compilers. + 2014-12-19 Martin Rudalics * windows.texi (Resizing Windows): Describe new argument of diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index db6ed41..092ec00 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -1684,8 +1684,7 @@ using @code{int}. Although it is also OK to use @code{int}, @code{0} and @code{1}, this older style is gradually being phased out. When using @code{bool}, respect the limitations of the replacement implementation of @code{bool}, as documented in the source file -@file{lib/stdbool.in.h}, so that Emacs remains portable to pre-C99 -platforms. In particular, boolean bitfields should be of type +@file{lib/stdbool.in.h}. In particular, boolean bitfields should be of type @code{bool_bf}, not @code{bool}, so that they work correctly even when compiling Objective C with standard GCC. diff --git a/src/conf_post.h b/src/conf_post.h index 8667e25..90f4c6e 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -309,8 +309,8 @@ extern void _DebPrint (const char *fmt, ...); Other .c files should not define INLINE. C99 compilers compile functions like 'incr' as C99-style extern - inline functions. Pre-C99 GCCs do something similar with - GNU-specific keywords. Pre-C99 non-GCC compilers use static + inline functions. Buggy GCC implementations do something similar with + GNU-specific keywords. Buggy non-GCC compilers use static functions, which bloats the code but is good enough. */ #ifndef INLINE commit 455e54691f2e95ff1ec1e3e81f3e271775269af2 Author: Paul Eggert Date: Sun Dec 21 19:35:30 2014 -0800 Use bool for boolean in xterm.c * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c: (x_set_window_size, x_bitmap_icon): * nsterm.m (ns_frame_raise_lower, x_new_font): * termhooks.h (struct terminal.toggle_invisible_pointer_hook) (struct terminal.frame_raise_lower_hook): * w32term.c (w32_frame_raise_lower): * xterm.c, xterm.h (x_text_icon): * xterm.c (x_update_window_begin, x_update_window_end) (x_update_end, x_after_update_window_line) (x_set_glyph_string_gc, x_draw_glyph_string_background) (x_draw_glyph_string_foreground) (x_draw_composite_glyph_string_foreground) (x_alloc_lighter_color, x_draw_relief_rect) (x_draw_glyph_string_box, x_draw_image_relief) (x_draw_image_glyph_string, x_draw_stretch_glyph_string) (x_draw_underwave, x_draw_glyph_string, x_show_hourglass) (x_hide_hourglass): (XFillRectangle) [HAVE_GTK3]: (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight) (x_focus_changed, x_find_modifier_meanings, note_mouse_movement) (XTmouse_position, xt_action_hook, xt_horizontal_action_hook) (x_send_scroll_bar_event, xm_scroll_callback) (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback) (x_create_toolkit_scroll_bar) (x_create_horizontal_toolkit_scroll_bar) (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create) (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) (XTset_horizontal_scroll_bar, x_scroll_bar_expose) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) (x_scroll_bar_report_motion) (x_horizontal_scroll_bar_report_motion, x_net_wm_state) (handle_one_xevent, XTread_socket, x_draw_bar_cursor) (x_draw_window_cursor, x_clear_errors) (x_trace_wire, x_new_font, x_set_offset, wm_supports) (set_wm_state, x_set_sticky, get_current_wm_state) (do_ewmh_fullscreen, x_handle_net_wm_state) (x_check_expected_move, x_sync_with_move, x_wait_for_event) (x_set_window_size_1, XTframe_raise_lower) (x_make_frame_visible, x_iconify_frame) (x_timeout_atimer_activated_flag, same_x_server, x_display_ok) (x_term_init, x_process_timeouts, x_activate_timeout_atimer) (x_delete_terminal, x_initialize, syms_of_xterm): Use bool for boolean. diff --git a/src/ChangeLog b/src/ChangeLog index 51ab339..c857430 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,50 @@ +2014-12-22 Paul Eggert + + Use bool for boolean in xterm.c + * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c: + (x_set_window_size, x_bitmap_icon): + * nsterm.m (ns_frame_raise_lower, x_new_font): + * termhooks.h (struct terminal.toggle_invisible_pointer_hook) + (struct terminal.frame_raise_lower_hook): + * w32term.c (w32_frame_raise_lower): + * xterm.c, xterm.h (x_text_icon): + * xterm.c (x_update_window_begin, x_update_window_end) + (x_update_end, x_after_update_window_line) + (x_set_glyph_string_gc, x_draw_glyph_string_background) + (x_draw_glyph_string_foreground) + (x_draw_composite_glyph_string_foreground) + (x_alloc_lighter_color, x_draw_relief_rect) + (x_draw_glyph_string_box, x_draw_image_relief) + (x_draw_image_glyph_string, x_draw_stretch_glyph_string) + (x_draw_underwave, x_draw_glyph_string, x_show_hourglass) + (x_hide_hourglass): + (XFillRectangle) [HAVE_GTK3]: + (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight) + (x_focus_changed, x_find_modifier_meanings, note_mouse_movement) + (XTmouse_position, xt_action_hook, xt_horizontal_action_hook) + (x_send_scroll_bar_event, xm_scroll_callback) + (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback) + (x_create_toolkit_scroll_bar) + (x_create_horizontal_toolkit_scroll_bar) + (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create) + (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) + (XTset_horizontal_scroll_bar, x_scroll_bar_expose) + (x_scroll_bar_handle_click, x_scroll_bar_note_movement) + (x_scroll_bar_report_motion) + (x_horizontal_scroll_bar_report_motion, x_net_wm_state) + (handle_one_xevent, XTread_socket, x_draw_bar_cursor) + (x_draw_window_cursor, x_clear_errors) + (x_trace_wire, x_new_font, x_set_offset, wm_supports) + (set_wm_state, x_set_sticky, get_current_wm_state) + (do_ewmh_fullscreen, x_handle_net_wm_state) + (x_check_expected_move, x_sync_with_move, x_wait_for_event) + (x_set_window_size_1, XTframe_raise_lower) + (x_make_frame_visible, x_iconify_frame) + (x_timeout_atimer_activated_flag, same_x_server, x_display_ok) + (x_term_init, x_process_timeouts, x_activate_timeout_atimer) + (x_delete_terminal, x_initialize, syms_of_xterm): + Use bool for boolean. + 2014-12-20 Paul Eggert * composite.h (struct composition.width): Now int diff --git a/src/frame.h b/src/frame.h index 3fd1a6a..1aa8804 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1435,7 +1435,7 @@ extern Lisp_Object display_x_get_resource (Display_Info *, Lisp_Object subclass); extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p); -extern void x_set_window_size (struct frame *f, int change_grav, +extern void x_set_window_size (struct frame *f, bool change_gravity, int width, int height, bool pixelwise); extern Lisp_Object x_get_focus_frame (struct frame *); extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); @@ -1462,7 +1462,7 @@ extern void x_focus_frame (struct frame *); #ifndef HAVE_NS -extern int x_bitmap_icon (struct frame *, Lisp_Object); +extern bool x_bitmap_icon (struct frame *, Lisp_Object); /* Set F's bitmap icon, if specified among F's parameters. */ diff --git a/src/nsterm.m b/src/nsterm.m index f012528..7f4b8b2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1082,7 +1082,7 @@ ns_lower_frame (struct frame *f) static void -ns_frame_raise_lower (struct frame *f, int raise) +ns_frame_raise_lower (struct frame *f, bool raise) /* -------------------------------------------------------------------------- External (hook) -------------------------------------------------------------------------- */ @@ -1322,7 +1322,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) void x_set_window_size (struct frame *f, - int change_grav, + bool change_gravity, int width, int height, bool pixelwise) @@ -7622,8 +7622,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) /* Now make the frame display the given font. */ if (FRAME_NS_WINDOW (f) != 0 && ! [view isFullscreen]) - x_set_window_size (f, 0, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), - FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1); + x_set_window_size (f, false, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), + FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), true); return font_object; } diff --git a/src/termhooks.h b/src/termhooks.h index 9cab853..137e77a 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -451,7 +451,7 @@ struct terminal void (*delete_glyphs_hook) (struct frame *, int); void (*ring_bell_hook) (struct frame *f); - void (*toggle_invisible_pointer_hook) (struct frame *f, int invisible); + void (*toggle_invisible_pointer_hook) (struct frame *f, bool invisible); void (*reset_terminal_modes_hook) (struct terminal *); void (*set_terminal_modes_hook) (struct terminal *); @@ -496,10 +496,10 @@ struct terminal support overlapping frames, so there's no need to raise or lower anything. - If RAISE_FLAG is non-zero, F is brought to the front, before all other - windows. If RAISE_FLAG is zero, F is sent to the back, behind all other + If RAISE_FLAG, F is brought to the front, before all other + windows. If !RAISE_FLAG, F is sent to the back, behind all other windows. */ - void (*frame_raise_lower_hook) (struct frame *f, int raise_flag); + void (*frame_raise_lower_hook) (struct frame *f, bool raise_flag); /* If the value of the frame parameter changed, this hook is called. For example, if going from fullscreen to not fullscreen this hook diff --git a/src/w32term.c b/src/w32term.c index 94b332b..fb8648c 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -185,7 +185,7 @@ void x_lower_frame (struct frame *); void x_scroll_bar_clear (struct frame *); void x_wm_set_size_hint (struct frame *, long, bool); void x_raise_frame (struct frame *); -void x_set_window_size (struct frame *, int, int, int, bool); +void x_set_window_size (struct frame *, bool, int, int, bool); void x_wm_set_window_state (struct frame *, int); void x_wm_set_icon_pixmap (struct frame *, int); static void w32_initialize (void); @@ -5716,7 +5716,7 @@ w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, /* Icons. */ -int +bool x_bitmap_icon (struct frame *f, Lisp_Object icon) { HANDLE main_icon; @@ -6096,12 +6096,13 @@ w32fullscreen_hook (struct frame *f) } /* Call this to change the size of frame F's x-window. - If CHANGE_GRAVITY is 1, we change to top-left-corner window gravity + If CHANGE_GRAVITY, change to top-left-corner window gravity for this size change and subsequent size changes. Otherwise we leave the window gravity unchanged. */ void -x_set_window_size (struct frame *f, int change_gravity, int width, int height, bool pixelwise) +x_set_window_size (struct frame *f, bool change_gravity, + int width, int height, bool pixelwise) { int pixelwidth, pixelheight; RECT rect; @@ -6331,7 +6332,7 @@ x_lower_frame (struct frame *f) } static void -w32_frame_raise_lower (struct frame *f, int raise_flag) +w32_frame_raise_lower (struct frame *f, bool raise_flag) { if (! FRAME_W32_P (f)) return; diff --git a/src/w32term.h b/src/w32term.h index fb37550..f02d7ce 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -240,7 +240,7 @@ extern struct w32_display_info *w32_term_init (Lisp_Object, char *, char *); extern int w32_defined_color (struct frame *f, const char *color, XColor *color_def, int alloc); -extern void x_set_window_size (struct frame *f, int change_grav, +extern void x_set_window_size (struct frame *f, bool change_gravity, int width, int height, bool pixelwise); extern int x_display_pixel_height (struct w32_display_info *); extern int x_display_pixel_width (struct w32_display_info *); @@ -257,7 +257,7 @@ extern void x_set_internal_border_width (struct frame *f, Lisp_Object value, Lisp_Object oldval); extern void x_activate_menubar (struct frame *); -extern int x_bitmap_icon (struct frame *, Lisp_Object); +extern bool x_bitmap_icon (struct frame *, Lisp_Object); extern void initialize_frame_menubar (struct frame *); extern void x_free_frame_resources (struct frame *); extern void x_real_positions (struct frame *, int *, int *); diff --git a/src/xterm.c b/src/xterm.c index 1ccc38c..8cc6475 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -220,7 +220,7 @@ enum xembed_message }; static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *); -static void x_set_window_size_1 (struct frame *, int, int, int, bool); +static void x_set_window_size_1 (struct frame *, bool, int, int, bool); static void x_raise_frame (struct frame *); static void x_lower_frame (struct frame *); static const XColor *x_color_cells (Display *, int *); @@ -255,10 +255,10 @@ static void x_horizontal_scroll_bar_report_motion (struct frame **, Lisp_Object enum scroll_bar_part *, Lisp_Object *, Lisp_Object *, Time *); -static int x_handle_net_wm_state (struct frame *, const XPropertyEvent *); +static bool x_handle_net_wm_state (struct frame *, const XPropertyEvent *); static void x_check_fullscreen (struct frame *); static void x_check_expected_move (struct frame *, int, int); -static void x_sync_with_move (struct frame *, int, int, int); +static void x_sync_with_move (struct frame *, int, int, bool); static int handle_one_xevent (struct x_display_info *, const XEvent *, int *, struct input_event *); @@ -272,7 +272,7 @@ static void x_wm_set_window_state (struct frame *, int); static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t); static void x_initialize (void); -static int get_current_wm_state (struct frame *, Window, int *, int *); +static bool get_current_wm_state (struct frame *, Window, int *, bool *); /* Flush display of frame F. */ @@ -305,7 +305,7 @@ x_flush (struct frame *f) Debugging ***********************************************************************/ -#if 0 +#if false /* This is a function useful for recording debugging information about the sequence of occurrences in this file. */ @@ -331,7 +331,7 @@ record_event (char *locus, int type) event_record_index++; } -#endif /* 0 */ +#endif @@ -479,7 +479,7 @@ x_update_window_begin (struct window *w) if (f == hlinfo->mouse_face_mouse_frame) { /* Don't do highlighting for mouse motion during the update. */ - hlinfo->mouse_face_defer = 1; + hlinfo->mouse_face_defer = true; /* If F needs to be redrawn, simply forget about any prior mouse highlighting. */ @@ -583,11 +583,11 @@ x_update_window_end (struct window *w, bool cursor_on_p, block_input (); if (cursor_on_p) - display_and_set_cursor (w, 1, + display_and_set_cursor (w, true, w->output_cursor.hpos, w->output_cursor.vpos, w->output_cursor.x, w->output_cursor.y); - if (draw_window_fringes (w, 1)) + if (draw_window_fringes (w, true)) { if (WINDOW_RIGHT_DIVIDER_WIDTH (w)) x_draw_right_divider (w); @@ -618,7 +618,7 @@ static void x_update_end (struct frame *f) { /* Mouse highlight may be displayed again. */ - MOUSE_HL_INFO (f)->mouse_face_defer = 0; + MOUSE_HL_INFO (f)->mouse_face_defer = false; #ifndef XFlush block_input (); @@ -675,7 +675,7 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row) eassert (w); if (!desired_row->mode_line_p && !w->pseudo_window_p) - desired_row->redraw_fringe_bitmaps_p = 1; + desired_row->redraw_fringe_bitmaps_p = true; #ifdef USE_X_TOOLKIT /* When a window has disappeared, make sure that no rest of @@ -817,10 +817,10 @@ static void x_draw_image_foreground_1 (struct glyph_string *, Pixmap); static void x_clear_glyph_string_rect (struct glyph_string *, int, int, int, int); static void x_draw_relief_rect (struct frame *, int, int, int, int, - int, int, int, int, int, int, + int, bool, bool, bool, bool, bool, XRectangle *); static void x_draw_box_rect (struct glyph_string *, int, int, int, int, - int, int, int, XRectangle *); + int, bool, bool, XRectangle *); static void x_scroll_bar_clear (struct frame *); #ifdef GLYPH_DEBUG @@ -962,7 +962,7 @@ x_set_glyph_string_gc (struct glyph_string *s) else if (s->hl == DRAW_CURSOR) { x_set_cursor_gc (s); - s->stippled_p = 0; + s->stippled_p = false; } else if (s->hl == DRAW_MOUSE_FACE) { @@ -1094,7 +1094,7 @@ x_draw_glyph_string_background (struct glyph_string *s, bool force_p) s->background_width, s->height - 2 * box_line_width); XSetFillStyle (s->display, s->gc, FillSolid); - s->background_filled_p = 1; + s->background_filled_p = true; } else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width || s->font_not_found_p @@ -1104,7 +1104,7 @@ x_draw_glyph_string_background (struct glyph_string *s, bool force_p) x_clear_glyph_string_rect (s, s->x, s->y + box_line_width, s->background_width, s->height - 2 * box_line_width); - s->background_filled_p = 1; + s->background_filled_p = true; } } } @@ -1150,11 +1150,11 @@ x_draw_glyph_string_foreground (struct glyph_string *s) y = s->ybase - boff; if (s->for_overlaps || (s->background_filled_p && s->hl != DRAW_CURSOR)) - font->driver->draw (s, 0, s->nchars, x, y, 0); + font->driver->draw (s, 0, s->nchars, x, y, false); else - font->driver->draw (s, 0, s->nchars, x, y, 1); + font->driver->draw (s, 0, s->nchars, x, y, true); if (s->face->overstrike) - font->driver->draw (s, 0, s->nchars, x + 1, y, 0); + font->driver->draw (s, 0, s->nchars, x + 1, y, false); } } @@ -1199,9 +1199,9 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) int xx = x + s->cmp->offsets[j * 2]; int yy = y - s->cmp->offsets[j * 2 + 1]; - font->driver->draw (s, j, j + 1, xx, yy, 0); + font->driver->draw (s, j, j + 1, xx, yy, false); if (s->face->overstrike) - font->driver->draw (s, j, j + 1, xx + 1, yy, 0); + font->driver->draw (s, j, j + 1, xx + 1, yy, false); } } else @@ -1222,17 +1222,18 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) if (j < i) { - font->driver->draw (s, j, i, x, y, 0); + font->driver->draw (s, j, i, x, y, false); if (s->face->overstrike) - font->driver->draw (s, j, i, x + 1, y, 0); + font->driver->draw (s, j, i, x + 1, y, false); x += width; } xoff = LGLYPH_XOFF (glyph); yoff = LGLYPH_YOFF (glyph); wadjust = LGLYPH_WADJUST (glyph); - font->driver->draw (s, i, i + 1, x + xoff, y + yoff, 0); + font->driver->draw (s, i, i + 1, x + xoff, y + yoff, false); if (s->face->overstrike) - font->driver->draw (s, i, i + 1, x + xoff + 1, y + yoff, 0); + font->driver->draw (s, i, i + 1, x + xoff + 1, y + yoff, + false); x += wadjust; j = i + 1; width = 0; @@ -1240,9 +1241,9 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) } if (j < i) { - font->driver->draw (s, j, i, x, y, 0); + font->driver->draw (s, j, i, x, y, false); if (s->face->overstrike) - font->driver->draw (s, j, i, x + 1, y, 0); + font->driver->draw (s, j, i, x + 1, y, false); } } } @@ -1310,11 +1311,11 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) s->font->driver->draw (s, 0, upper_len, x + glyph->slice.glyphless.upper_xoff, s->ybase + glyph->slice.glyphless.upper_yoff, - 0); + false); s->font->driver->draw (s, upper_len, len, x + glyph->slice.glyphless.lower_xoff, s->ybase + glyph->slice.glyphless.lower_yoff, - 0); + false); } if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) XDrawRectangle (s->display, s->window, s->gc, @@ -1781,7 +1782,7 @@ x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, success_p = x_alloc_nearest_color (f, cmap, &new); } else - success_p = 1; + success_p = true; *pixel = new.pixel; } @@ -1876,16 +1877,17 @@ x_setup_relief_colors (struct glyph_string *s) /* Draw a relief on frame F inside the rectangle given by LEFT_X, TOP_Y, RIGHT_X, and BOTTOM_Y. WIDTH is the thickness of the relief - to draw, it must be >= 0. RAISED_P non-zero means draw a raised - relief. LEFT_P non-zero means draw a relief on the left side of - the rectangle. RIGHT_P non-zero means draw a relief on the right + to draw, it must be >= 0. RAISED_P means draw a raised + relief. LEFT_P means draw a relief on the left side of + the rectangle. RIGHT_P means draw a relief on the right side of the rectangle. CLIP_RECT is the clipping rectangle to use when drawing. */ static void x_draw_relief_rect (struct frame *f, - int left_x, int top_y, int right_x, int bottom_y, int width, - int raised_p, int top_p, int bot_p, int left_p, int right_p, + int left_x, int top_y, int right_x, int bottom_y, + int width, bool raised_p, bool top_p, bool bot_p, + bool left_p, bool right_p, XRectangle *clip_rect) { Display *dpy = FRAME_X_DISPLAY (f); @@ -1909,8 +1911,8 @@ x_draw_relief_rect (struct frame *f, { if (width == 1) XDrawLine (dpy, window, gc, - left_x + (left_p ? 1 : 0), top_y, - right_x + (right_p ? 0 : 1), top_y); + left_x + left_p, top_y, + right_x + !right_p, top_y); for (i = 1; i < width; ++i) XDrawLine (dpy, window, gc, @@ -1945,8 +1947,8 @@ x_draw_relief_rect (struct frame *f, /* Outermost top line. */ if (top_p) XDrawLine (dpy, window, gc, - left_x + (left_p ? 1 : 0), top_y, - right_x + (right_p ? 0 : 1), top_y); + left_x + left_p, top_y, + right_x + !right_p, top_y); /* Outermost left line. */ if (left_p) @@ -1957,8 +1959,8 @@ x_draw_relief_rect (struct frame *f, if (bot_p) { XDrawLine (dpy, window, gc, - left_x + (left_p ? 1 : 0), bottom_y, - right_x + (right_p ? 0 : 1), bottom_y); + left_x + left_p, bottom_y, + right_x + !right_p, bottom_y); for (i = 1; i < width; ++i) XDrawLine (dpy, window, gc, left_x + i * left_p, bottom_y - i, @@ -1982,15 +1984,15 @@ x_draw_relief_rect (struct frame *f, /* Draw a box on frame F inside the rectangle given by LEFT_X, TOP_Y, RIGHT_X, and BOTTOM_Y. WIDTH is the thickness of the lines to - draw, it must be >= 0. LEFT_P non-zero means draw a line on the - left side of the rectangle. RIGHT_P non-zero means draw a line + draw, it must be >= 0. LEFT_P means draw a line on the + left side of the rectangle. RIGHT_P means draw a line on the right side of the rectangle. CLIP_RECT is the clipping rectangle to use when drawing. */ static void x_draw_box_rect (struct glyph_string *s, int left_x, int top_y, int right_x, int bottom_y, int width, - int left_p, int right_p, XRectangle *clip_rect) + bool left_p, bool right_p, XRectangle *clip_rect) { XGCValues xgcv; @@ -2026,8 +2028,8 @@ x_draw_box_rect (struct glyph_string *s, static void x_draw_glyph_string_box (struct glyph_string *s) { - int width, left_x, right_x, top_y, bottom_y, last_x, raised_p; - int left_p, right_p; + int width, left_x, right_x, top_y, bottom_y, last_x; + bool raised_p, left_p, right_p; struct glyph *last_glyph; XRectangle clip_rect; @@ -2067,7 +2069,8 @@ x_draw_glyph_string_box (struct glyph_string *s) { x_setup_relief_colors (s); x_draw_relief_rect (s->f, left_x, top_y, right_x, bottom_y, - width, raised_p, 1, 1, left_p, right_p, &clip_rect); + width, raised_p, true, true, left_p, right_p, + &clip_rect); } } @@ -2166,7 +2169,8 @@ x_draw_image_foreground (struct glyph_string *s) static void x_draw_image_relief (struct glyph_string *s) { - int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; + int x1, y1, thick; + bool raised_p, top_p, bot_p, left_p, right_p; int extra_x, extra_y; XRectangle r; int x = s->x; @@ -2215,16 +2219,16 @@ x_draw_image_relief (struct glyph_string *s) extra_x = extra_y = XINT (Vtool_bar_button_margin); } - top_p = bot_p = left_p = right_p = 0; + top_p = bot_p = left_p = right_p = false; if (s->slice.x == 0) - x -= thick + extra_x, left_p = 1; + x -= thick + extra_x, left_p = true; if (s->slice.y == 0) - y -= thick + extra_y, top_p = 1; + y -= thick + extra_y, top_p = true; if (s->slice.x + s->slice.width == s->img->width) - x1 += thick + extra_x, right_p = 1; + x1 += thick + extra_x, right_p = true; if (s->slice.y + s->slice.height == s->img->height) - y1 += thick + extra_y, bot_p = 1; + y1 += thick + extra_y, bot_p = true; x_setup_relief_colors (s); get_glyph_string_clip_rect (s, &r); @@ -2422,7 +2426,7 @@ x_draw_image_glyph_string (struct glyph_string *s) x_draw_glyph_string_bg_rect (s, x, y, width, height); } - s->background_filled_p = 1; + s->background_filled_p = true; } /* Draw the foreground. */ @@ -2546,7 +2550,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s) x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); } - s->background_filled_p = 1; + s->background_filled_p = true; } /* @@ -2564,7 +2568,8 @@ static void x_draw_underwave (struct glyph_string *s) { int wave_height = 3, wave_length = 2; - int dx, dy, x0, y0, width, x1, y1, x2, y2, odd, xmax; + int dx, dy, x0, y0, width, x1, y1, x2, y2, xmax; + bool odd; XRectangle wave_clip, string_clip, final_clip; dx = wave_length; @@ -2591,7 +2596,7 @@ x_draw_underwave (struct glyph_string *s) x1 = x0 - (x0 % dx); x2 = x1 + dx; - odd = (x1/dx) % 2; + odd = (x1 / dx) & 1; y1 = y2 = y0; if (odd) @@ -2620,7 +2625,7 @@ x_draw_underwave (struct glyph_string *s) static void x_draw_glyph_string (struct glyph_string *s) { - bool relief_drawn_p = 0; + bool relief_drawn_p = false; /* If S draws into the background of its successors, draw the background of the successors first so that S can draw into it. @@ -2640,7 +2645,7 @@ x_draw_glyph_string (struct glyph_string *s) if (next->first_glyph->type == STRETCH_GLYPH) x_draw_stretch_glyph_string (next); else - x_draw_glyph_string_background (next, 1); + x_draw_glyph_string_background (next, true); next->num_clips = 0; } } @@ -2657,10 +2662,10 @@ x_draw_glyph_string (struct glyph_string *s) { x_set_glyph_string_clipping (s); - x_draw_glyph_string_background (s, 1); + x_draw_glyph_string_background (s, true); x_draw_glyph_string_box (s); x_set_glyph_string_clipping (s); - relief_drawn_p = 1; + relief_drawn_p = true; } else if (!s->clip_head /* draw_glyphs didn't specify a clip mask. */ && !s->clip_tail @@ -2685,26 +2690,26 @@ x_draw_glyph_string (struct glyph_string *s) case CHAR_GLYPH: if (s->for_overlaps) - s->background_filled_p = 1; + s->background_filled_p = true; else - x_draw_glyph_string_background (s, 0); + x_draw_glyph_string_background (s, false); x_draw_glyph_string_foreground (s); break; case COMPOSITE_GLYPH: if (s->for_overlaps || (s->cmp_from > 0 && ! s->first_glyph->u.cmp.automatic)) - s->background_filled_p = 1; + s->background_filled_p = true; else - x_draw_glyph_string_background (s, 1); + x_draw_glyph_string_background (s, true); x_draw_composite_glyph_string_foreground (s); break; case GLYPHLESS_GLYPH: if (s->for_overlaps) - s->background_filled_p = 1; + s->background_filled_p = true; else - x_draw_glyph_string_background (s, 1); + x_draw_glyph_string_background (s, true); x_draw_glyphless_glyph_string_foreground (s); break; @@ -2971,7 +2976,7 @@ x_show_hourglass (struct frame *f) if (FRAME_OUTER_WINDOW (f)) #endif { - x->hourglass_p = 1; + x->hourglass_p = true; if (!x->hourglass_window) { @@ -3009,7 +3014,7 @@ x_hide_hourglass (struct frame *f) /* Sync here because XTread_socket looks at the hourglass_p flag that is reset to zero below. */ XSync (FRAME_X_DISPLAY (f), False); - x->hourglass_p = 0; + x->hourglass_p = false; } } @@ -3034,7 +3039,7 @@ XTflash (struct frame *f) cairo_rectangle (cr, x, y, w, h); \ cairo_fill (cr); \ } \ - while (0) + while (false) #else /* ! HAVE_GTK3 */ GdkGCValues vals; GdkGC *gc; @@ -3157,7 +3162,7 @@ XTflash (struct frame *f) static void -XTtoggle_invisible_pointer (struct frame *f, int invisible) +XTtoggle_invisible_pointer (struct frame *f, bool invisible) { block_input (); FRAME_DISPLAY_INFO (f)->toggle_visible_pointer (f, invisible); @@ -3277,7 +3282,7 @@ frame_highlight (struct frame *f) f->output_data.x->border_pixel); x_uncatch_errors (); unblock_input (); - x_update_cursor (f, 1); + x_update_cursor (f, true); x_set_frame_alpha (f); } @@ -3295,7 +3300,7 @@ frame_unhighlight (struct frame *f) f->output_data.x->border_tile); x_uncatch_errors (); unblock_input (); - x_update_cursor (f, 1); + x_update_cursor (f, true); x_set_frame_alpha (f); } @@ -3380,7 +3385,7 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra XUnsetICFocus (FRAME_XIC (frame)); #endif if (frame->pointer_invisible) - XTtoggle_invisible_pointer (frame, 0); + XTtoggle_invisible_pointer (frame, false); } } @@ -3693,11 +3698,11 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo) Alt keysyms are on. */ { int row, col; /* The row and column in the modifier table. */ - int found_alt_or_meta; + bool found_alt_or_meta; for (row = 3; row < 8; row++) { - found_alt_or_meta = 0; + found_alt_or_meta = false; for (col = 0; col < mods->max_keypermod; col++) { KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col]; @@ -3718,13 +3723,13 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo) { case XK_Meta_L: case XK_Meta_R: - found_alt_or_meta = 1; + found_alt_or_meta = true; dpyinfo->meta_mod_mask |= (1 << row); break; case XK_Alt_L: case XK_Alt_R: - found_alt_or_meta = 1; + found_alt_or_meta = true; dpyinfo->alt_mod_mask |= (1 << row); break; @@ -3903,14 +3908,14 @@ construct_mouse_click (struct input_event *result, the mainstream emacs code by setting mouse_moved. If not, ask for another motion event, so we can check again the next time it moves. */ -static int +static bool note_mouse_movement (struct frame *frame, const XMotionEvent *event) { XRectangle *r; struct x_display_info *dpyinfo; if (!FRAME_X_OUTPUT (frame)) - return 0; + return false; dpyinfo = FRAME_DISPLAY_INFO (frame); dpyinfo->last_mouse_movement_time = event->time; @@ -3920,11 +3925,11 @@ note_mouse_movement (struct frame *frame, const XMotionEvent *event) if (event->window != FRAME_X_WINDOW (frame)) { - frame->mouse_moved = 1; + frame->mouse_moved = true; dpyinfo->last_mouse_scroll_bar = NULL; note_mouse_highlight (frame, -1, -1); dpyinfo->last_mouse_glyph_frame = NULL; - return 1; + return true; } @@ -3934,16 +3939,16 @@ note_mouse_movement (struct frame *frame, const XMotionEvent *event) || event->x < r->x || event->x >= r->x + r->width || event->y < r->y || event->y >= r->y + r->height) { - frame->mouse_moved = 1; + frame->mouse_moved = true; dpyinfo->last_mouse_scroll_bar = NULL; note_mouse_highlight (frame, event->x, event->y); /* Remember which glyph we're now on. */ remember_mouse_glyph (frame, event->x, event->y, r); dpyinfo->last_mouse_glyph_frame = frame; - return 1; + return true; } - return 0; + return false; } /* Return the current position of the mouse. @@ -3999,7 +4004,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, FOR_EACH_FRAME (tail, frame) if (FRAME_X_P (XFRAME (frame)) && FRAME_X_DISPLAY (XFRAME (frame)) == FRAME_X_DISPLAY (*fp)) - XFRAME (frame)->mouse_moved = 0; + XFRAME (frame)->mouse_moved = false; dpyinfo->last_mouse_scroll_bar = NULL; @@ -4060,7 +4065,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, } else { - while (1) + while (true) { XTranslateCoordinates (FRAME_X_DISPLAY (*fp), @@ -4284,7 +4289,7 @@ static void xt_action_hook (Widget widget, XtPointer client_data, String action_name, XEvent *event, String *params, Cardinal *num_params) { - int scroll_bar_p; + bool scroll_bar_p; const char *end_action; #ifdef USE_MOTIF @@ -4303,7 +4308,7 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name, struct scroll_bar *bar; x_send_scroll_bar_event (window_being_scrolled, - scroll_bar_end_scroll, 0, 0, 0); + scroll_bar_end_scroll, 0, 0, false); w = XWINDOW (window_being_scrolled); bar = XSCROLL_BAR (w->vertical_scroll_bar); @@ -4318,7 +4323,7 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name, bar->last_seen_part = scroll_bar_nowhere; #endif /* Xt timeouts no longer needed. */ - toolkit_scroll_bar_interaction = 0; + toolkit_scroll_bar_interaction = false; } } @@ -4327,7 +4332,7 @@ static void xt_horizontal_action_hook (Widget widget, XtPointer client_data, String action_name, XEvent *event, String *params, Cardinal *num_params) { - int scroll_bar_p; + bool scroll_bar_p; const char *end_action; #ifdef USE_MOTIF @@ -4346,7 +4351,7 @@ xt_horizontal_action_hook (Widget widget, XtPointer client_data, String action_n struct scroll_bar *bar; x_send_scroll_bar_event (window_being_scrolled, - scroll_bar_end_scroll, 0, 0, 1); + scroll_bar_end_scroll, 0, 0, true); w = XWINDOW (window_being_scrolled); bar = XSCROLL_BAR (w->horizontal_scroll_bar); @@ -4361,7 +4366,7 @@ xt_horizontal_action_hook (Widget widget, XtPointer client_data, String action_n bar->last_seen_part = scroll_bar_nowhere; #endif /* Xt timeouts no longer needed. */ - toolkit_scroll_bar_interaction = 0; + toolkit_scroll_bar_interaction = false; } } #endif /* not USE_GTK */ @@ -4408,7 +4413,7 @@ x_send_scroll_bar_event (Lisp_Object window, enum scroll_bar_part part, /* Make Xt timeouts work while the scroll bar is active. */ #ifdef USE_X_TOOLKIT - toolkit_scroll_bar_interaction = 1; + toolkit_scroll_bar_interaction = true; x_activate_timeout_atimer (); #endif @@ -4507,7 +4512,8 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) struct scroll_bar *bar = client_data; XmScrollBarCallbackStruct *cs = call_data; enum scroll_bar_part part = scroll_bar_nowhere; - int horizontal = bar->horizontal, whole = 0, portion = 0; + bool horizontal = bar->horizontal; + int whole = 0, portion = 0; switch (cs->reason) { @@ -4574,7 +4580,8 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) if (part != scroll_bar_nowhere) { window_being_scrolled = bar->window; - x_send_scroll_bar_event (bar->window, part, portion, whole, bar->horizontal); + x_send_scroll_bar_event (bar->window, part, portion, whole, + bar->horizontal); } } @@ -4647,7 +4654,8 @@ xg_scroll_callback (GtkRange *range, if (part != scroll_bar_nowhere) { window_being_scrolled = bar->window; - x_send_scroll_bar_event (bar->window, part, portion, whole, bar->horizontal); + x_send_scroll_bar_event (bar->window, part, portion, whole, + bar->horizontal); } return FALSE; @@ -4689,7 +4697,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) float shown; int whole, portion, height, width; enum scroll_bar_part part; - int horizontal = bar->horizontal; + bool horizontal = bar->horizontal; if (horizontal) @@ -4777,7 +4785,8 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) window_being_scrolled = bar->window; bar->dragging = -1; bar->last_seen_part = part; - x_send_scroll_bar_event (bar->window, part, position, width, bar->horizontal); + x_send_scroll_bar_event (bar->window, part, position, width, + bar->horizontal); } else { @@ -4800,7 +4809,8 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) window_being_scrolled = bar->window; bar->dragging = -1; bar->last_seen_part = part; - x_send_scroll_bar_event (bar->window, part, position, height, bar->horizontal); + x_send_scroll_bar_event (bar->window, part, position, height, + bar->horizontal); } } @@ -5033,7 +5043,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) xwindow = XtWindow (widget); bar->x_window = xwindow; bar->whole = 1; - bar->horizontal = 0; + bar->horizontal = false; unblock_input (); } @@ -5233,7 +5243,7 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) xwindow = XtWindow (widget); bar->x_window = xwindow; bar->whole = 1; - bar->horizontal = 1; + bar->horizontal = true; unblock_input (); } @@ -5408,7 +5418,7 @@ x_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar, int portion, XtNheight, &height, NULL); -#if 0 +#if false /* Massage the top+shown values. */ if (bar->dragging == -1 || bar->last_seen_part == scroll_bar_down_arrow) top = max (0, min (1, top)); @@ -5431,7 +5441,7 @@ x_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar, int portion, work, check that 'NARROWPROTO' is defined in src/config.h. If this is not so, most likely you need to fix configure. */ XawScrollbarSetThumb (widget, top, shown); -#if 0 +#if false if (top != old_top || shown != old_shown) { if (bar->dragging == -1) @@ -5467,7 +5477,8 @@ x_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar, int portion, scroll bar. */ static struct scroll_bar * -x_scroll_bar_create (struct window *w, int top, int left, int width, int height, bool horizontal) +x_scroll_bar_create (struct window *w, int top, int left, + int width, int height, bool horizontal) { struct frame *f = XFRAME (w->frame); struct scroll_bar *bar @@ -5570,7 +5581,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height, /* Draw BAR's handle in the proper position. If the handle is already drawn from START to END, don't bother - redrawing it, unless REBUILD is non-zero; in that case, always + redrawing it, unless REBUILD; in that case, always redraw it. (REBUILD is handy for drawing the handle after expose events.) @@ -5581,7 +5592,8 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height, to move to the very end of the buffer. */ static void -x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild) +x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, + bool rebuild) { bool dragging = bar->dragging != -1; Window w = bar->x_window; @@ -5731,7 +5743,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio unblock_input (); } - bar = x_scroll_bar_create (w, top, left, width, max (height, 1), 0); + bar = x_scroll_bar_create (w, top, left, width, max (height, 1), false); } else { @@ -5805,12 +5817,12 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height); if (whole == 0) - x_scroll_bar_set_handle (bar, 0, top_range, 0); + x_scroll_bar_set_handle (bar, 0, top_range, false); else { int start = ((double) position * top_range) / whole; int end = ((double) (position + portion) * top_range) / whole; - x_scroll_bar_set_handle (bar, start, end, 0); + x_scroll_bar_set_handle (bar, start, end, false); } } #endif /* not USE_TOOLKIT_SCROLL_BARS */ @@ -5851,7 +5863,7 @@ XTset_horizontal_scroll_bar (struct window *w, int portion, int whole, int posit unblock_input (); } - bar = x_scroll_bar_create (w, top, left, width, height, 1); + bar = x_scroll_bar_create (w, top, left, width, height, true); } else { @@ -5937,12 +5949,12 @@ XTset_horizontal_scroll_bar (struct window *w, int portion, int whole, int posit int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, width); if (whole == 0) - x_scroll_bar_set_handle (bar, 0, left_range, 0); + x_scroll_bar_set_handle (bar, 0, left_range, false); else { int start = ((double) position * left_range) / whole; int end = ((double) (position + portion) * left_range) / whole; - x_scroll_bar_set_handle (bar, start, end, 0); + x_scroll_bar_set_handle (bar, start, end, false); } } #endif /* not USE_TOOLKIT_SCROLL_BARS */ @@ -6116,7 +6128,7 @@ x_scroll_bar_expose (struct scroll_bar *bar, const XEvent *event) block_input (); - x_scroll_bar_set_handle (bar, bar->start, bar->end, 1); + x_scroll_bar_set_handle (bar, bar->start, bar->end, true); /* Switch to scroll bar foreground color. */ if (f->output_data.x->scroll_bar_foreground_pixel != -1) @@ -6190,7 +6202,7 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, int new_start = - bar->dragging; int new_end = new_start + bar->end - bar->start; - x_scroll_bar_set_handle (bar, new_start, new_end, 0); + x_scroll_bar_set_handle (bar, new_start, new_end, false); bar->dragging = -1; } #endif @@ -6221,7 +6233,7 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, int new_start = y - bar->dragging; int new_end = new_start + bar->end - bar->start; - x_scroll_bar_set_handle (bar, new_start, new_end, 0); + x_scroll_bar_set_handle (bar, new_start, new_end, false); bar->dragging = -1; } #endif @@ -6247,7 +6259,7 @@ x_scroll_bar_note_movement (struct scroll_bar *bar, dpyinfo->last_mouse_movement_time = event->time; dpyinfo->last_mouse_scroll_bar = bar; - f->mouse_moved = 1; + f->mouse_moved = true; /* If we're dragging the bar, display it. */ if (bar->dragging != -1) @@ -6259,7 +6271,7 @@ x_scroll_bar_note_movement (struct scroll_bar *bar, { int new_end = new_start + bar->end - bar->start; - x_scroll_bar_set_handle (bar, new_start, new_end, 0); + x_scroll_bar_set_handle (bar, new_start, new_end, false); } } } @@ -6326,7 +6338,7 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, XSETINT (*x, win_y); XSETINT (*y, top_range); - f->mouse_moved = 0; + f->mouse_moved = false; dpyinfo->last_mouse_scroll_bar = NULL; *timestamp = dpyinfo->last_mouse_movement_time; } @@ -6395,7 +6407,7 @@ x_horizontal_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_windo XSETINT (*y, win_x); XSETINT (*x, left_range); - f->mouse_moved = 0; + f->mouse_moved = false; dpyinfo->last_mouse_scroll_bar = NULL; *timestamp = dpyinfo->last_mouse_movement_time; } @@ -6551,9 +6563,9 @@ x_net_wm_state (struct frame *f, Window window) { int value = FULLSCREEN_NONE; Lisp_Object lval = Qnil; - int sticky = 0; + bool sticky = false; - (void)get_current_wm_state (f, window, &value, &sticky); + get_current_wm_state (f, window, &value, &sticky); switch (value) { @@ -6636,7 +6648,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (f && FRAME_XIC (f)) XSetICFocus (FRAME_XIC (f)); #endif -#if 0 /* Emacs sets WM hints whose `input' field is `true'. This +#if false + /* Emacs sets WM hints whose `input' field is `true'. This instructs the WM to set the input focus automatically for Emacs with a call to XSetInputFocus. Setting WM_TAKE_FOCUS tells the WM to send us a ClientMessage WM_TAKE_FOCUS after @@ -6669,7 +6682,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_uncatch_errors (); } /* Not certain about handling scroll bars here */ -#endif /* 0 */ +#endif goto done; } @@ -6850,22 +6863,22 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = x_top_window_to_frame (dpyinfo, event->xproperty.window); if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state) { - int not_hidden = x_handle_net_wm_state (f, &event->xproperty); + bool not_hidden = x_handle_net_wm_state (f, &event->xproperty); if (not_hidden && FRAME_ICONIFIED_P (f)) { /* Gnome shell does not iconify us when C-z is pressed. It hides the frame. So if our state says we aren't hidden anymore, treat it as deiconified. */ SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, 0); - f->output_data.x->has_been_visible = 1; + SET_FRAME_ICONIFIED (f, false); + f->output_data.x->has_been_visible = true; inev.ie.kind = DEICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } else if (! not_hidden && ! FRAME_ICONIFIED_P (f)) { SET_FRAME_VISIBLE (f, 0); - SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_ICONIFIED (f, true); inev.ie.kind = ICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } @@ -6897,8 +6910,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (!FRAME_VISIBLE_P (f)) { SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, 0); - f->output_data.x->has_been_visible = 1; + SET_FRAME_ICONIFIED (f, false); + f->output_data.x->has_been_visible = true; SET_FRAME_GARBAGED (f); } else @@ -6993,7 +7006,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, and that way, we know the window is not iconified now. */ if (visible || FRAME_ICONIFIED_P (f)) { - SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_ICONIFIED (f, true); inev.ie.kind = ICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } @@ -7020,8 +7033,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_check_fullscreen (f); SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, 0); - f->output_data.x->has_been_visible = 1; + SET_FRAME_ICONIFIED (f, false); + f->output_data.x->has_been_visible = true; if (iconified) { @@ -7060,7 +7073,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, || !EQ (f->tool_bar_window, hlinfo->mouse_face_window))) { clear_mouse_face (hlinfo); - hlinfo->mouse_face_hidden = 1; + hlinfo->mouse_face_hidden = true; } #endif @@ -7321,8 +7334,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, which depends on which X*LookupString function we used just above and the locale. */ setup_coding_system (coding_system, &coding); - coding.src_multibyte = 0; - coding.dst_multibyte = 1; + coding.src_multibyte = false; + coding.dst_multibyte = true; /* The input is converted to events, thus we can't handle composition. Anyway, there's no XIM that gives us composition information. */ @@ -7454,7 +7467,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (hlinfo->mouse_face_hidden) { - hlinfo->mouse_face_hidden = 0; + hlinfo->mouse_face_hidden = false; clear_mouse_face (hlinfo); } @@ -7471,7 +7484,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, { static Lisp_Object last_mouse_window; Lisp_Object window = window_from_coordinates - (f, event->xmotion.x, event->xmotion.y, 0, 0); + (f, event->xmotion.x, event->xmotion.y, 0, false); /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window @@ -7552,7 +7565,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, || event->xconfigure.width != FRAME_PIXEL_WIDTH (f) || event->xconfigure.height != FRAME_PIXEL_HEIGHT (f)) { - change_frame_size (f, width, height, 0, 1, 0, 1); + change_frame_size (f, width, height, false, true, false, true); x_clear_under_internal_border (f); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); @@ -7581,7 +7594,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, { /* If we decide we want to generate an event to be seen by the rest of Emacs, we put it here. */ - bool tool_bar_p = 0; + bool tool_bar_p = false; memset (&compose_status, 0, sizeof (compose_status)); dpyinfo->last_mouse_glyph_frame = NULL; @@ -7605,7 +7618,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, int x = event->xbutton.x; int y = event->xbutton.y; - window = window_from_coordinates (f, x, y, 0, 1); + window = window_from_coordinates (f, x, y, 0, true); tool_bar_p = EQ (window, f->tool_bar_window); if (tool_bar_p && event->xbutton.button < 4) @@ -7674,7 +7687,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, any subsequent mouse-movement Emacs events should reflect only motion after the ButtonPress/Release. */ if (f != 0) - f->mouse_moved = 0; + f->mouse_moved = false; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) f = x_menubar_window_to_frame (dpyinfo, event); @@ -7766,7 +7779,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (do_help > 0) { - any_help_event_p = 1; + any_help_event_p = true; gen_help_event (help_echo_string, frame, help_echo_window, help_echo_object, help_echo_pos); } @@ -7813,7 +7826,7 @@ static int XTread_socket (struct terminal *terminal, struct input_event *hold_quit) { int count = 0; - int event_found = 0; + bool event_found = false; struct x_display_info *dpyinfo = terminal->display_info.x; block_input (); @@ -7838,7 +7851,7 @@ XTread_socket (struct terminal *terminal, struct input_event *hold_quit) if (x_filter_event (dpyinfo, &event)) continue; #endif - event_found = 1; + event_found = true; count += handle_one_xevent (dpyinfo, &event, &finish, hold_quit); @@ -8038,7 +8051,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text xgcv.background = xgcv.foreground = face->foreground; else xgcv.background = xgcv.foreground = f->output_data.x->cursor_pixel; - xgcv.graphics_exposures = 0; + xgcv.graphics_exposures = False; if (gc) XChangeGC (dpy, gc, mask, &xgcv); @@ -8134,14 +8147,14 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, if (on_p) { w->phys_cursor_type = cursor_type; - w->phys_cursor_on_p = 1; + w->phys_cursor_on_p = true; if (glyph_row->exact_window_width_line_p && (glyph_row->reversed_p ? (w->phys_cursor.hpos < 0) : (w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]))) { - glyph_row->cursor_in_fringe_p = 1; + glyph_row->cursor_in_fringe_p = true; draw_fringe_bitmap (w, glyph_row, glyph_row->reversed_p); } else @@ -8188,13 +8201,13 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, /* Make the x-window of frame F use the gnu icon bitmap. */ -int +bool x_bitmap_icon (struct frame *f, Lisp_Object file) { ptrdiff_t bitmap_id; if (FRAME_X_WINDOW (f) == 0) - return 1; + return true; /* Free up our existing icon bitmap and mask if any. */ if (f->output_data.x->icon_bitmap > 0) @@ -8207,7 +8220,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) /* Use gtk_window_set_icon_from_file () if available, It's not restricted to bitmaps */ if (xg_set_icon (f, file)) - return 0; + return false; #endif /* USE_GTK */ bitmap_id = x_create_bitmap_from_file (f, file); x_create_bitmap_mask (f, bitmap_id); @@ -8226,7 +8239,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) || xg_set_icon_from_xpm_data (f, gnu_xpm_bits)) { FRAME_DISPLAY_INFO (f)->icon_bitmap_id = -2; - return 0; + return false; } #elif defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) @@ -8243,7 +8256,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) rc = x_create_bitmap_from_data (f, (char *) gnu_xbm_bits, gnu_xbm_width, gnu_xbm_height); if (rc == -1) - return 1; + return true; FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc; x_create_bitmap_mask (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id); @@ -8262,18 +8275,18 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) x_wm_set_icon_pixmap (f, bitmap_id); f->output_data.x->icon_bitmap = bitmap_id; - return 0; + return false; } /* Make the x-window of frame F use a rectangle with text. Use ICON_NAME as the text. */ -int +bool x_text_icon (struct frame *f, const char *icon_name) { if (FRAME_X_WINDOW (f) == 0) - return 1; + return true; { XTextProperty text; @@ -8289,7 +8302,7 @@ x_text_icon (struct frame *f, const char *icon_name) f->output_data.x->icon_bitmap = 0; x_wm_set_icon_pixmap (f, 0); - return 0; + return false; } #define X_ERROR_MESSAGE_SIZE 200 @@ -8407,7 +8420,8 @@ x_clear_errors (Display *dpy) x_error_message->string[0] = 0; } -#if 0 /* See comment in unwind_to_catch why calling this is a bad +#if false + /* See comment in unwind_to_catch why calling this is a bad * idea. --lorentey */ /* Close off all unclosed x_catch_errors calls. */ @@ -8419,13 +8433,13 @@ x_fully_uncatch_errors (void) } #endif -#if 0 +#if false static unsigned int x_wire_count; x_trace_wire (void) { fprintf (stderr, "Lib call: %d\n", ++x_wire_count); } -#endif /* ! 0 */ +#endif /************************************************************************ @@ -8664,7 +8678,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) if (NILP (tip_frame) || XFRAME (tip_frame) != f) adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, - 0, Qfont); + false, Qfont); } #ifdef HAVE_X_I18N @@ -8954,7 +8968,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_ x_calc_absolute_position (f); block_input (); - x_wm_set_size_hint (f, 0, 0); + x_wm_set_size_hint (f, 0, false); modified_left = f->left_pos; modified_top = f->top_pos; @@ -8972,8 +8986,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_ modified_left, modified_top); x_sync_with_move (f, f->left_pos, f->top_pos, - FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN - ? 1 : 0); + FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN); /* change_gravity is non-zero when this function is called from Lisp to programmatically move a frame. In that case, we call @@ -8985,32 +8998,33 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_ either the window manager type (A/B) is unknown or it is Type A but we need to compute the top/left offset adjustment for this frame. */ - if (change_gravity != 0 && - (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN - || (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A - && (FRAME_X_OUTPUT (f)->move_offset_left == 0 - && FRAME_X_OUTPUT (f)->move_offset_top == 0)))) + if (change_gravity != 0 + && (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN + || (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A + && (FRAME_X_OUTPUT (f)->move_offset_left == 0 + && FRAME_X_OUTPUT (f)->move_offset_top == 0)))) x_check_expected_move (f, modified_left, modified_top); unblock_input (); } -/* Return non-zero if _NET_SUPPORTING_WM_CHECK window exists and _NET_SUPPORTED +/* Return true if _NET_SUPPORTING_WM_CHECK window exists and _NET_SUPPORTED on the root window for frame F contains ATOMNAME. This is how a WM check shall be done according to the Window Manager Specification/Extended Window Manager Hints at http://freedesktop.org/wiki/Specifications/wm-spec. */ -static int +static bool wm_supports (struct frame *f, Atom want_atom) { Atom actual_type; unsigned long actual_size, bytes_remaining; int i, rc, actual_format; + bool ret; Window wmcheck_window; struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Window target_window = dpyinfo->root_window; - long max_len = 65536; + int max_len = 65536; Display *dpy = FRAME_X_DISPLAY (f); unsigned char *tmp_data = NULL; Atom target_type = XA_WINDOW; @@ -9029,7 +9043,7 @@ wm_supports (struct frame *f, Atom want_atom) if (tmp_data) XFree (tmp_data); x_uncatch_errors (); unblock_input (); - return 0; + return false; } wmcheck_window = *(Window *) tmp_data; @@ -9042,7 +9056,7 @@ wm_supports (struct frame *f, Atom want_atom) { x_uncatch_errors (); unblock_input (); - return 0; + return false; } if (dpyinfo->net_supported_window != wmcheck_window) @@ -9067,7 +9081,7 @@ wm_supports (struct frame *f, Atom want_atom) if (tmp_data) XFree (tmp_data); x_uncatch_errors (); unblock_input (); - return 0; + return false; } dpyinfo->net_supported_atoms = (Atom *)tmp_data; @@ -9075,19 +9089,19 @@ wm_supports (struct frame *f, Atom want_atom) dpyinfo->net_supported_window = wmcheck_window; } - rc = 0; + ret = false; - for (i = 0; rc == 0 && i < dpyinfo->nr_net_supported_atoms; ++i) - rc = dpyinfo->net_supported_atoms[i] == want_atom; + for (i = 0; !ret && i < dpyinfo->nr_net_supported_atoms; ++i) + ret = dpyinfo->net_supported_atoms[i] == want_atom; x_uncatch_errors (); unblock_input (); - return rc; + return ret; } static void -set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value) +set_wm_state (Lisp_Object frame, bool add, Atom atom, Atom value) { struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame)); @@ -9096,7 +9110,7 @@ set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value) make_number (32), /* 1 = add, 0 = remove */ Fcons - (make_number (add ? 1 : 0), + (make_number (add), Fcons (make_fixnum_or_float (atom), (value != 0 @@ -9112,32 +9126,33 @@ x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) XSETFRAME (frame, f); - set_wm_state (frame, NILP (new_value) ? 0 : 1, + set_wm_state (frame, !NILP (new_value), dpyinfo->Xatom_net_wm_state_sticky, None); } /* Return the current _NET_WM_STATE. SIZE_STATE is set to one of the FULLSCREEN_* values. - STICKY is set to 1 if the sticky state is set, 0 if not. + Set *STICKY to the sticky state. - Return non-zero if we are not hidden, zero if we are. */ + Return true iff we are not hidden. */ -static int +static bool get_current_wm_state (struct frame *f, Window window, int *size_state, - int *sticky) + bool *sticky) { Atom actual_type; unsigned long actual_size, bytes_remaining; - int i, rc, actual_format, is_hidden = 0; + int i, rc, actual_format; + bool is_hidden = false; struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); long max_len = 65536; Display *dpy = FRAME_X_DISPLAY (f); unsigned char *tmp_data = NULL; Atom target_type = XA_ATOM; - *sticky = 0; + *sticky = false; *size_state = FULLSCREEN_NONE; block_input (); @@ -9161,9 +9176,7 @@ get_current_wm_state (struct frame *f, { Atom a = ((Atom*)tmp_data)[i]; if (a == dpyinfo->Xatom_net_wm_state_hidden) - { - is_hidden = 1; - } + is_hidden = true; else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) { if (*size_state == FULLSCREEN_HEIGHT) @@ -9181,7 +9194,7 @@ get_current_wm_state (struct frame *f, else if (a == dpyinfo->Xatom_net_wm_state_fullscreen) *size_state = FULLSCREEN_BOTH; else if (a == dpyinfo->Xatom_net_wm_state_sticky) - *sticky = 1; + *sticky = true; } if (tmp_data) XFree (tmp_data); @@ -9191,14 +9204,15 @@ get_current_wm_state (struct frame *f, /* Do fullscreen as specified in extended window manager hints */ -static int +static bool do_ewmh_fullscreen (struct frame *f) { struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); - int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); - int cur, dummy; + bool have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); + int cur; + bool dummy; - (void)get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy); + get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy); /* Some window managers don't say they support _NET_WM_STATE, but they do say they support _NET_WM_STATE_FULLSCREEN. Try that also. */ @@ -9219,37 +9233,45 @@ do_ewmh_fullscreen (struct frame *f) case FULLSCREEN_BOTH: if (cur == FULLSCREEN_WIDTH || cur == FULLSCREEN_MAXIMIZED || cur == FULLSCREEN_HEIGHT) - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_maximized_horz, + set_wm_state (frame, false, + dpyinfo->Xatom_net_wm_state_maximized_horz, dpyinfo->Xatom_net_wm_state_maximized_vert); - set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_fullscreen, None); + set_wm_state (frame, true, + dpyinfo->Xatom_net_wm_state_fullscreen, None); break; case FULLSCREEN_WIDTH: if (cur == FULLSCREEN_BOTH || cur == FULLSCREEN_HEIGHT || cur == FULLSCREEN_MAXIMIZED) - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen, + set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen, dpyinfo->Xatom_net_wm_state_maximized_vert); if (cur != FULLSCREEN_MAXIMIZED) - set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_maximized_horz, None); + set_wm_state (frame, true, + dpyinfo->Xatom_net_wm_state_maximized_horz, None); break; case FULLSCREEN_HEIGHT: if (cur == FULLSCREEN_BOTH || cur == FULLSCREEN_WIDTH || cur == FULLSCREEN_MAXIMIZED) - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen, + set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen, dpyinfo->Xatom_net_wm_state_maximized_horz); if (cur != FULLSCREEN_MAXIMIZED) - set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_maximized_vert, None); + set_wm_state (frame, true, + dpyinfo->Xatom_net_wm_state_maximized_vert, None); break; case FULLSCREEN_MAXIMIZED: if (cur == FULLSCREEN_BOTH) - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen, None); - set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_maximized_horz, + set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen, + None); + set_wm_state (frame, true, + dpyinfo->Xatom_net_wm_state_maximized_horz, dpyinfo->Xatom_net_wm_state_maximized_vert); break; case FULLSCREEN_NONE: if (cur == FULLSCREEN_BOTH) - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen, None); + set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen, + None); else - set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_maximized_horz, + set_wm_state (frame, false, + dpyinfo->Xatom_net_wm_state_maximized_horz, dpyinfo->Xatom_net_wm_state_maximized_vert); } @@ -9273,13 +9295,13 @@ XTfullscreen_hook (struct frame *f) } -static int +static bool x_handle_net_wm_state (struct frame *f, const XPropertyEvent *event) { int value = FULLSCREEN_NONE; Lisp_Object lval; - int sticky = 0; - int not_hidden = get_current_wm_state (f, event->window, &value, &sticky); + bool sticky = false; + bool not_hidden = get_current_wm_state (f, event->window, &value, &sticky); lval = Qnil; switch (value) @@ -9381,7 +9403,7 @@ x_check_expected_move (struct frame *f, int expected_left, int expected_top) XMoveWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), adjusted_left, adjusted_top); - x_sync_with_move (f, expected_left, expected_top, 0); + x_sync_with_move (f, expected_left, expected_top, false); } else /* It's a "Type B" window manager. We don't have to adjust the @@ -9398,7 +9420,7 @@ x_check_expected_move (struct frame *f, int expected_left, int expected_top) of an exact comparison. */ static void -x_sync_with_move (struct frame *f, int left, int top, int fuzzy) +x_sync_with_move (struct frame *f, int left, int top, bool fuzzy) { int count = 0; @@ -9429,7 +9451,7 @@ x_sync_with_move (struct frame *f, int left, int top, int fuzzy) /* As a last resort, just wait 0.5 seconds and hope that XGetGeometry will then return up-to-date position info. */ - wait_reading_process_output (0, 500000000, 0, 0, Qnil, NULL, 0); + wait_reading_process_output (0, 500000000, 0, false, Qnil, NULL, 0); } @@ -9452,7 +9474,7 @@ x_wait_for_event (struct frame *f, int eventtype) while (f->wait_event_type) { - pending_signals = 1; + pending_signals = true; totally_unblock_input (); /* XTread_socket is called after unblock. */ block_input (); @@ -9475,12 +9497,13 @@ x_wait_for_event (struct frame *f, int eventtype) /* Change the size of frame F's X window to WIDTH/HEIGHT in the case F - doesn't have a widget. If CHANGE_GRAVITY is 1, we change to + doesn't have a widget. If CHANGE_GRAVITY, change to top-left-corner window gravity for this size change and subsequent - size changes. Otherwise we leave the window gravity unchanged. */ + size changes. Otherwise leave the window gravity unchanged. */ static void -x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height, bool pixelwise) +x_set_window_size_1 (struct frame *f, bool change_gravity, + int width, int height, bool pixelwise) { int pixelwidth, pixelheight; @@ -9492,7 +9515,7 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height, : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))); if (change_gravity) f->win_gravity = NorthWestGravity; - x_wm_set_size_hint (f, 0, 0); + x_wm_set_size_hint (f, 0, false); XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f)); @@ -9514,7 +9537,7 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height, wouldn't be reported in the frame parameters until some random point in the future when the ConfigureNotify event arrives. - We pass 1 for DELAY since we can't run Lisp code inside of + Pass true for DELAY since we can't run Lisp code inside of a BLOCK_INPUT. */ /* But the ConfigureNotify may in fact never arrive, and then this is @@ -9524,25 +9547,26 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height, x_wait_for_event (f, ConfigureNotify); else { - change_frame_size (f, pixelwidth, pixelheight, 0, 1, 0, 1); + change_frame_size (f, pixelwidth, pixelheight, false, true, false, true); x_sync (f); } } /* Call this to change the size of frame F's x-window. - If CHANGE_GRAVITY is 1, we change to top-left-corner window gravity + If CHANGE_GRAVITY, change to top-left-corner window gravity for this size change and subsequent size changes. Otherwise we leave the window gravity unchanged. */ void -x_set_window_size (struct frame *f, int change_gravity, int width, int height, bool pixelwise) +x_set_window_size (struct frame *f, bool change_gravity, + int width, int height, bool pixelwise) { block_input (); /* The following breaks our calculations. If it's really needed, think of something else. */ -#if 0 +#if false if (NILP (tip_frame) || XFRAME (tip_frame) != f) { int text_width, text_height; @@ -9563,7 +9587,7 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f)); text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, pixelh); - change_frame_size (f, text_width, text_height, 0, 1, 0, 1); + change_frame_size (f, text_width, text_height, false, true, false, true); } #endif @@ -9594,7 +9618,7 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b unblock_input (); - do_pending_window_change (0); + do_pending_window_change (false); } /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */ @@ -9669,7 +9693,7 @@ x_ewmh_activate_frame (struct frame *f) } static void -XTframe_raise_lower (struct frame *f, int raise_flag) +XTframe_raise_lower (struct frame *f, bool raise_flag) { if (raise_flag) x_raise_frame (f); @@ -9751,7 +9775,7 @@ x_make_frame_visible (struct frame *f) && ! f->output_data.x->asked_for_visible) x_set_offset (f, f->left_pos, f->top_pos, 0); - f->output_data.x->asked_for_visible = 1; + f->output_data.x->asked_for_visible = true; if (! EQ (Vx_no_window_manager, Qt)) x_wm_set_window_state (f, NormalState); @@ -9786,7 +9810,7 @@ x_make_frame_visible (struct frame *f) /* This must be before UNBLOCK_INPUT since events that arrive in response to the actions above will set it when they are handled. */ - int previously_visible = f->output_data.x->has_been_visible; + bool previously_visible = f->output_data.x->has_been_visible; original_left = f->left_pos; original_top = f->top_pos; @@ -9901,7 +9925,7 @@ x_make_frame_invisible (struct frame *f) program-specified, so that when the window is mapped again, it will be placed at the same location, without forcing the user to position it by hand again (they have already done that once for this window.) */ - x_wm_set_size_hint (f, 0, 1); + x_wm_set_size_hint (f, 0, true); #ifdef USE_GTK if (FRAME_GTK_OUTER_WIDGET (f)) @@ -9928,7 +9952,7 @@ x_make_frame_invisible (struct frame *f) FRAME_SAMPLE_VISIBILITY set this. So do it by hand, and synchronize with the server to make sure we agree. */ SET_FRAME_VISIBLE (f, 0); - SET_FRAME_ICONIFIED (f, 0); + SET_FRAME_ICONIFIED (f, false); x_sync (f); @@ -9963,7 +9987,7 @@ x_iconify_frame (struct frame *f) gtk_window_iconify (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); SET_FRAME_VISIBLE (f, 0); - SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_ICONIFIED (f, true); unblock_input (); return; } @@ -9981,7 +10005,7 @@ x_iconify_frame (struct frame *f) that an invisible frame was changed to an icon, so we have to record it here. */ SET_FRAME_VISIBLE (f, 0); - SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_ICONIFIED (f, true); unblock_input (); return; } @@ -9994,7 +10018,7 @@ x_iconify_frame (struct frame *f) if (!result) error ("Can't notify window manager of iconification"); - SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_ICONIFIED (f, true); SET_FRAME_VISIBLE (f, 0); block_input (); @@ -10044,7 +10068,7 @@ x_iconify_frame (struct frame *f) XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); } - SET_FRAME_ICONIFIED (f, 1); + SET_FRAME_ICONIFIED (f, true); SET_FRAME_VISIBLE (f, 0); XFlush (FRAME_X_DISPLAY (f)); @@ -10466,7 +10490,7 @@ static XrmOptionDescRec emacs_options[] = { /* Whether atimer for Xt timeouts is activated or not. */ -static int x_timeout_atimer_activated_flag; +static bool x_timeout_atimer_activated_flag; #endif /* USE_X_TOOLKIT */ @@ -10474,10 +10498,10 @@ static int x_initialized; /* Test whether two display-name strings agree up to the dot that separates the screen number from the server number. */ -static int +static bool same_x_server (const char *name1, const char *name2) { - int seen_colon = 0; + bool seen_colon = false; const char *system_name = SSDATA (Vsystem_name); ptrdiff_t system_name_length = SBYTES (Vsystem_name); ptrdiff_t length_until_period = 0; @@ -10509,9 +10533,9 @@ same_x_server (const char *name1, const char *name2) for (; *name1 != '\0' && *name1 == *name2; name1++, name2++) { if (*name1 == ':') - seen_colon = 1; + seen_colon = true; if (seen_colon && *name1 == '.') - return 1; + return true; } return (seen_colon && (*name1 == '.' || *name1 == '\0') @@ -10543,14 +10567,17 @@ get_bits_and_offset (unsigned long mask, int *bits, int *offset) *bits = nr; } -/* Return 1 if display DISPLAY is available for use, 0 otherwise. +/* Return true iff display DISPLAY is available for use. But don't permanently open it, just test its availability. */ bool x_display_ok (const char *display) { Display *dpy = XOpenDisplay (display); - return dpy ? (XCloseDisplay (dpy), 1) : 0; + if (!dpy) + return false; + XCloseDisplay (dpy); + return true; } #ifdef USE_GTK @@ -10775,12 +10802,12 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) argv[argc++] = "-xrm"; argv[argc++] = xrm_option; } - turn_on_atimers (0); + turn_on_atimers (false); dpy = XtOpenDisplay (Xt_app_con, SSDATA (display_name), resource_name, EMACS_CLASS, emacs_options, XtNumber (emacs_options), &argc, argv); - turn_on_atimers (1); + turn_on_atimers (true); #ifdef HAVE_X11XTR6 /* I think this is to compensate for XtSetLanguageProc. */ @@ -10863,9 +10890,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) /* Set the name of the terminal. */ terminal->name = xlispstrdup (display_name); -#if 0 +#if false XSetAfterFunction (x_current_display, x_trace_wire); -#endif /* ! 0 */ +#endif lim = min (PTRDIFF_MAX, SIZE_MAX) - sizeof "@"; if (lim - SBYTES (Vinvocation_name) < SBYTES (Vsystem_name)) @@ -11231,7 +11258,7 @@ static void x_process_timeouts (struct atimer *timer) { block_input (); - x_timeout_atimer_activated_flag = 0; + x_timeout_atimer_activated_flag = false; if (toolkit_scroll_bar_interaction || popup_activated ()) { while (XtAppPending (Xt_app_con) & XtIMTimer) @@ -11258,7 +11285,7 @@ x_activate_timeout_atimer (void) { struct timespec interval = make_timespec (0, 100 * 1000 * 1000); start_atimer (ATIMER_RELATIVE, interval, x_process_timeouts, 0); - x_timeout_atimer_activated_flag = 1; + x_timeout_atimer_activated_flag = true; } unblock_input (); } @@ -11338,7 +11365,7 @@ x_delete_terminal (struct terminal *terminal) don't destroy the database here in order to avoid the crash in the above situations for now, though that may cause memory leaks in other situations. */ -#if 0 +#if false #ifdef HAVE_XRMSETDATABASE XrmSetDatabase (dpyinfo->display, NULL); #else @@ -11430,7 +11457,7 @@ x_initialize (void) baud_rate = 19200; x_noop_count = 0; - any_help_event_p = 0; + any_help_event_p = false; ignore_next_mouse_click_timeout = 0; #ifdef USE_GTK @@ -11502,7 +11529,7 @@ UNDERLINE_POSITION font properties, for example 7x13 on XFree prior to 4.1, set this to nil. You can also use `underline-minimum-offset' to override the font's UNDERLINE_POSITION for small font display sizes. */); - x_use_underline_position_properties = 1; + x_use_underline_position_properties = true; DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, @@ -11510,7 +11537,7 @@ sizes. */); A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); - x_underline_at_descent_line = 0; + x_underline_at_descent_line = false; DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", x_mouse_click_focus_ignore_position, @@ -11520,7 +11547,7 @@ click on a frame to select it (give it focus). In that case, a value of nil, means that the selected window and cursor position changes to reflect the mouse click position, while a non-nil value means that the selected window or cursor position is preserved. */); - x_mouse_click_focus_ignore_position = 0; + x_mouse_click_focus_ignore_position = false; DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* Which toolkit scroll bars Emacs uses, if any. diff --git a/src/xterm.h b/src/xterm.h index 23dd436..31c3261 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -834,7 +834,7 @@ struct scroll_bar int whole; #endif - /* 1 if the scroll bar is horizontal. */ + /* True if the scroll bar is horizontal. */ bool horizontal; }; @@ -979,7 +979,7 @@ XrmDatabase x_load_resources (Display *, const char *, const char *, /* Defined in xterm.c */ -extern int x_text_icon (struct frame *, const char *); +extern bool x_text_icon (struct frame *, const char *); extern void x_catch_errors (Display *); extern void x_check_errors (Display *, const char *) ATTRIBUTE_FORMAT_PRINTF (2, 0); commit be4304d8d824100b9c877988cd6c8df5e102c2ae Author: Lars Ingebrigtsen Date: Sun Dec 21 13:21:16 2014 +0100 Fixes: debbugs:19269 * lisp/net/nsm.el (nsm-save-host): Don't save the host name twice. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ad9548c..436ac16 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -32,6 +32,11 @@ * textmodes/ispell.el (ispell-command-loop): Don't use `next-window'. +2014-12-21 Lars Ingebrigtsen + + * net/nsm.el (nsm-save-host): Don't save the host name twice + (bug#19269). + 2014-12-18 Sam Steingold Keyboard interface (C-f10) to `mouse-buffer-menu' (C-down-mouse-1). diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 2306894..eb700d7 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -340,7 +340,6 @@ unencrypted." ;; of the certificate/unencrypted connection. (cond ((eq what 'conditions) - (nconc saved (list :host (format "%s:%s" host port))) (cond ((not status) (nconc saved '(:conditions (:unencrypted)))) commit 936d5e5bb63358da281188d9c8e9e21341df9444 Author: Michael Albinus Date: Sun Dec 21 16:19:26 2014 +0100 Fix last patch. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index fdb00c8..7c79595 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3088,7 +3088,8 @@ User is always nil." (with-parsed-tramp-file-name filename nil (unwind-protect (if (not (file-exists-p filename)) - (tramp-message v 0 "(New file)") + (tramp-error + v 'file-error "File `%s' not found on remote host" filename) (with-tramp-progress-reporter v 3 (format "Inserting `%s'" filename) commit 74d3b20cf5fb4fe863a97379dea26412b27d7f39 Author: Michael Albinus Date: Sun Dec 21 12:10:31 2014 +0100 Fixes: debbugs:18623 * net/tramp.el (tramp-handle-insert-file-contents): Set `find-file-not-found-functions' in case of errors. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed08c9f..e4f620e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-21 Michael Albinus + + * net/tramp.el (tramp-handle-insert-file-contents): + Set `find-file-not-found-functions' in case of errors. (Bug#18623) + 2014-12-19 Michael Albinus * net/tramp-sh.el (tramp-send-command-and-read): New optional diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 140bf18..fdb00c8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3086,115 +3086,117 @@ User is always nil." (setq filename (expand-file-name filename)) (let (result local-copy remote-copy) (with-parsed-tramp-file-name filename nil - (with-tramp-progress-reporter - v 3 (format "Inserting `%s'" filename) - (unwind-protect - (if (not (file-exists-p filename)) - (progn - ;; We don't raise a Tramp error, because it might be - ;; suppressed, like in `find-file-noselect-1'. - (tramp-message - v 1 "File not `%s' found on remote host" filename) - (signal 'file-error - (list "File not found on remote host" filename))) - - (if (and (tramp-local-host-p v) - (let (file-name-handler-alist) - (file-readable-p localname))) - ;; Short track: if we are on the local host, we can - ;; run directly. - (setq result - (tramp-run-real-handler - 'insert-file-contents - (list localname visit beg end replace))) - - ;; When we shall insert only a part of the file, we - ;; copy this part. This works only for the shell file - ;; name handlers. - (when (and (or beg end) - (tramp-get-method-parameter - (tramp-file-name-method v) 'tramp-login-program)) - (setq remote-copy (tramp-make-tramp-temp-file v)) - ;; This is defined in tramp-sh.el. Let's assume - ;; this is loaded already. - (tramp-compat-funcall - 'tramp-send-command - v - (cond - ((and beg end) - (format "dd bs=1 skip=%d if=%s count=%d of=%s" - beg (tramp-shell-quote-argument localname) - (- end beg) remote-copy)) - (beg - (format "dd bs=1 skip=%d if=%s of=%s" - beg (tramp-shell-quote-argument localname) - remote-copy)) - (end - (format "dd bs=1 count=%d if=%s of=%s" - end (tramp-shell-quote-argument localname) - remote-copy)))) - (setq tramp-temp-buffer-file-name nil beg nil end nil)) - - ;; `insert-file-contents-literally' takes care to - ;; avoid calling jka-compr. By let-binding - ;; `inhibit-file-name-operation', we propagate that - ;; care to the `file-local-copy' operation. - (setq local-copy - (let ((inhibit-file-name-operation - (when (eq inhibit-file-name-operation - 'insert-file-contents) - 'file-local-copy))) - (cond - ((stringp remote-copy) - (file-local-copy - (tramp-make-tramp-file-name - method user host remote-copy))) - ((stringp tramp-temp-buffer-file-name) - (copy-file filename tramp-temp-buffer-file-name 'ok) - tramp-temp-buffer-file-name) - (t (file-local-copy filename))))) - - ;; When the file is not readable for the owner, it - ;; cannot be inserted, even if it is readable for the - ;; group or for everybody. - (set-file-modes - local-copy (tramp-compat-octal-to-decimal "0600")) - - (when (and (null remote-copy) - (tramp-get-method-parameter - method 'tramp-copy-keep-tmpfile)) - ;; We keep the local file for performance reasons, - ;; useful for "rsync". - (setq tramp-temp-buffer-file-name local-copy)) - - ;; We must ensure that `file-coding-system-alist' - ;; matches `local-copy'. We must also use `visit', - ;; otherwise there might be an error in the - ;; `revert-buffer' function under XEmacs. - (let ((file-coding-system-alist - (tramp-find-file-name-coding-system-alist - filename local-copy))) - (setq result - (insert-file-contents - local-copy visit beg end replace))))) - - ;; Save exit. - (progn - (when visit - (setq buffer-file-name filename) - (setq buffer-read-only (not (file-writable-p filename))) - (set-visited-file-modtime) - (set-buffer-modified-p nil)) - (when (and (stringp local-copy) - (or remote-copy (null tramp-temp-buffer-file-name))) - (delete-file local-copy)) - (when (stringp remote-copy) - (delete-file - (tramp-make-tramp-file-name method user host remote-copy))))))) - - ;; Result. - (list (expand-file-name filename) - (cadr result)))) + (unwind-protect + (if (not (file-exists-p filename)) + (tramp-message v 0 "(New file)") + + (with-tramp-progress-reporter + v 3 (format "Inserting `%s'" filename) + (condition-case err + (if (and (tramp-local-host-p v) + (let (file-name-handler-alist) + (file-readable-p localname))) + ;; Short track: if we are on the local host, we can + ;; run directly. + (setq result + (tramp-run-real-handler + 'insert-file-contents + (list localname visit beg end replace))) + + ;; When we shall insert only a part of the file, we + ;; copy this part. This works only for the shell file + ;; name handlers. + (when (and (or beg end) + (tramp-get-method-parameter + (tramp-file-name-method v) + 'tramp-login-program)) + (setq remote-copy (tramp-make-tramp-temp-file v)) + ;; This is defined in tramp-sh.el. Let's assume + ;; this is loaded already. + (tramp-compat-funcall + 'tramp-send-command + v + (cond + ((and beg end) + (format "dd bs=1 skip=%d if=%s count=%d of=%s" + beg (tramp-shell-quote-argument localname) + (- end beg) remote-copy)) + (beg + (format "dd bs=1 skip=%d if=%s of=%s" + beg (tramp-shell-quote-argument localname) + remote-copy)) + (end + (format "dd bs=1 count=%d if=%s of=%s" + end (tramp-shell-quote-argument localname) + remote-copy)))) + (setq tramp-temp-buffer-file-name nil beg nil end nil)) + + ;; `insert-file-contents-literally' takes care to + ;; avoid calling jka-compr. By let-binding + ;; `inhibit-file-name-operation', we propagate that + ;; care to the `file-local-copy' operation. + (setq local-copy + (let ((inhibit-file-name-operation + (when (eq inhibit-file-name-operation + 'insert-file-contents) + 'file-local-copy))) + (cond + ((stringp remote-copy) + (file-local-copy + (tramp-make-tramp-file-name + method user host remote-copy))) + ((stringp tramp-temp-buffer-file-name) + (copy-file + filename tramp-temp-buffer-file-name 'ok) + tramp-temp-buffer-file-name) + (t (file-local-copy filename))))) + + ;; When the file is not readable for the owner, it + ;; cannot be inserted, even if it is readable for the + ;; group or for everybody. + (set-file-modes + local-copy (tramp-compat-octal-to-decimal "0600")) + + (when (and (null remote-copy) + (tramp-get-method-parameter + method 'tramp-copy-keep-tmpfile)) + ;; We keep the local file for performance reasons, + ;; useful for "rsync". + (setq tramp-temp-buffer-file-name local-copy)) + + ;; We must ensure that `file-coding-system-alist' + ;; matches `local-copy'. We must also use `visit', + ;; otherwise there might be an error in the + ;; `revert-buffer' function under XEmacs. + (let ((file-coding-system-alist + (tramp-find-file-name-coding-system-alist + filename local-copy))) + (setq result + (insert-file-contents + local-copy visit beg end replace)))) + (error + (add-hook 'find-file-not-found-functions + `(lambda () (signal ',(car err) ',(cdr err))) + nil t) + (signal (car err) (cdr err)))))) + + ;; Save exit. + (progn + (when visit + (setq buffer-file-name filename) + (setq buffer-read-only (not (file-writable-p filename))) + (set-visited-file-modtime) + (set-buffer-modified-p nil)) + (when (and (stringp local-copy) + (or remote-copy (null tramp-temp-buffer-file-name))) + (delete-file local-copy)) + (when (stringp remote-copy) + (delete-file + (tramp-make-tramp-file-name method user host remote-copy))))) + + ;; Result. + (list (expand-file-name filename) + (cadr result))))) (defun tramp-handle-load (file &optional noerror nomessage nosuffix must-suffix) "Like `load' for Tramp files." commit a8856cb50b6a99c23664cdb3c66b480bf880edcf Author: Paul Eggert Date: Sat Dec 20 15:52:36 2014 -0800 Fix typo in charset_ordered_list_tick patch diff --git a/src/charset.c b/src/charset.c index 9ad7de6..7fcb153 100644 --- a/src/charset.c +++ b/src/charset.c @@ -102,7 +102,7 @@ Lisp_Object Vcharset_ordered_list; Lisp_Object Vcharset_non_preferred_head; /* Incremented every time we change the priority of charsets. - Wraps around. */*/ + Wraps around. */ EMACS_UINT charset_ordered_list_tick; /* List of iso-2022 charsets. */ commit 67bb1c1944ef69710e9d36420bc01e2183941358 Author: Paul Eggert Date: Sat Dec 20 15:49:04 2014 -0800 * composite.h (struct composition.width): Now int instead of unsigned short, as we prefer signed integers. diff --git a/src/ChangeLog b/src/ChangeLog index 4c2f2ec..51ab339 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2014-12-20 Paul Eggert + * composite.h (struct composition.width): Now int + instead of unsigned short, as we prefer signed integers. + Let charset tick grow past USHRT_MAX * charset.c, charset.h (charset_ordered_list_tick): Now EMACS_UINT, not unsigned short. diff --git a/src/composite.h b/src/composite.h index f01ae32..1080eb0 100644 --- a/src/composite.h +++ b/src/composite.h @@ -156,7 +156,7 @@ struct composition { /* How many columns the overall glyphs occupy on the screen. This gives an approximate value for column calculation in Fcurrent_column, and etc. */ - unsigned short width; + int width; /* Method of the composition. */ enum composition_method method; commit 4cc2f6918ddd44bf1f10a1d689b7bd769fcf6b8e Author: Paul Eggert Date: Sat Dec 20 15:20:56 2014 -0800 Let charset tick grow past USHRT_MAX * charset.c, charset.h (charset_ordered_list_tick): Now EMACS_UINT, not unsigned short. * fontset.c (reorder_font_vector): Allow the tick to grow to the maximum representable Emacs integer value before wrapping it around. diff --git a/src/ChangeLog b/src/ChangeLog index e21d9ee..4c2f2ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2014-12-20 Paul Eggert + Let charset tick grow past USHRT_MAX + * charset.c, charset.h (charset_ordered_list_tick): + Now EMACS_UINT, not unsigned short. + * fontset.c (reorder_font_vector): Allow the tick to grow to the + maximum representable Emacs integer value before wrapping it around. + Simplify unexec file mode setting * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c: Don't include when no longer needed. diff --git a/src/charset.c b/src/charset.c index 171a00f..9ad7de6 100644 --- a/src/charset.c +++ b/src/charset.c @@ -101,10 +101,9 @@ Lisp_Object Vcharset_ordered_list; charsets. */ Lisp_Object Vcharset_non_preferred_head; -/* Incremented everytime we change Vcharset_ordered_list. This is - unsigned short so that it fits in Lisp_Int and never matches - -1. */ -unsigned short charset_ordered_list_tick; +/* Incremented every time we change the priority of charsets. + Wraps around. */*/ +EMACS_UINT charset_ordered_list_tick; /* List of iso-2022 charsets. */ Lisp_Object Viso_2022_charset_list; diff --git a/src/charset.h b/src/charset.h index 4176ce5..6c6c3e6 100644 --- a/src/charset.h +++ b/src/charset.h @@ -253,8 +253,7 @@ extern struct charset *charset_table; extern Lisp_Object Vcharset_ordered_list; extern Lisp_Object Vcharset_non_preferred_head; -/* Incremented everytime we change the priority of charsets. */ -extern unsigned short charset_ordered_list_tick; +extern EMACS_UINT charset_ordered_list_tick; extern Lisp_Object Viso_2022_charset_list; extern Lisp_Object Vemacs_mule_charset_list; diff --git a/src/fontset.c b/src/fontset.c index d08d68f..ac50be1 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -389,7 +389,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) Lisp_Object vec, font_object; int size; int i; - bool score_changed = 0; + bool score_changed = false; if (font) XSETFONT (font_object, font); @@ -444,14 +444,15 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) if (RFONT_DEF_SCORE (rfont_def) != score) { RFONT_DEF_SET_SCORE (rfont_def, score); - score_changed = 1; + score_changed = true; } } if (score_changed) qsort (XVECTOR (vec)->contents, size, word_size, fontset_compare_rfontdef); - XSETCAR (font_group, make_number (charset_ordered_list_tick)); + EMACS_INT low_tick_bits = charset_ordered_list_tick & MOST_POSITIVE_FIXNUM; + XSETCAR (font_group, make_number (low_tick_bits)); } /* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for commit 9b14d8b6f259a4d602f0c61689d6641e7ab20b49 Author: Paul Eggert Date: Sat Dec 20 13:11:40 2014 -0800 Simplify unexec file mode setting * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c: Don't include when no longer needed. (unexec): Create file with correct mode in the first place, rather than overwriting the mode later and fiddling with the global umask in the mean time. Avoid bogus usage like 'umask (777)', which should have been 'umask (0777)'. (mark_x): Remove. All callers removed. diff --git a/src/ChangeLog b/src/ChangeLog index 819c88b..e21d9ee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2014-12-20 Paul Eggert + + Simplify unexec file mode setting + * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c: + Don't include when no longer needed. + (unexec): Create file with correct mode in the first place, + rather than overwriting the mode later and fiddling with the + global umask in the mean time. Avoid bogus usage like + 'umask (777)', which should have been 'umask (0777)'. + (mark_x): Remove. All callers removed. + 2014-12-19 Paul Eggert Minor cleanups for Lisp objects and symbols diff --git a/src/unexaix.c b/src/unexaix.c index c97d5ca..fd36e4a 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -55,7 +55,6 @@ what you give them. Help stamp out software-hoarding! */ #include #include #include -#include #include #include #include @@ -134,7 +133,7 @@ unexec (const char *new_name, const char *a_name) { PERROR (a_name); } - if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) + if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0777)) < 0) { PERROR (new_name); } @@ -152,7 +151,6 @@ unexec (const char *new_name, const char *a_name) emacs_close (new); if (a_out >= 0) emacs_close (a_out); - mark_x (new_name); } /* **************************************************************** @@ -466,29 +464,6 @@ copy_sym (int new, int a_out, const char *a_name, const char *new_name) return 0; } -/* **************************************************************** - * mark_x - * - * After successfully building the new a.out, mark it executable - */ -static void -mark_x (const char *name) -{ - struct stat sbuf; - int um; - int new = 0; /* for PERROR */ - - um = umask (777); - umask (um); - if (stat (name, &sbuf) == -1) - { - PERROR (name); - } - sbuf.st_mode |= 0111 & ~um; - if (chmod (name, sbuf.st_mode) == -1) - PERROR (name); -} - static int adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name) { diff --git a/src/unexcoff.c b/src/unexcoff.c index 0e47bdd..292c38f 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c @@ -97,7 +97,6 @@ struct aouthdr #include #endif /* makedev */ #include -#include #include #include @@ -439,29 +438,6 @@ copy_sym (int new, int a_out, const char *a_name, const char *new_name) return 0; } -/* **************************************************************** - * mark_x - * - * After successfully building the new a.out, mark it executable - */ -static void -mark_x (const char *name) -{ - struct stat sbuf; - int um; - int new = 0; /* for PERROR */ - - um = umask (777); - umask (um); - if (stat (name, &sbuf) == -1) - { - PERROR (name); - } - sbuf.st_mode |= 0111 & ~um; - if (chmod (name, sbuf.st_mode) == -1) - PERROR (name); -} - /* * If the COFF file contains a symbol table and a line number section, @@ -542,7 +518,7 @@ unexec (const char *new_name, const char *a_name) { PERROR (a_name); } - if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) + if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0777)) < 0) { PERROR (new_name); } @@ -560,7 +536,6 @@ unexec (const char *new_name, const char *a_name) emacs_close (new); if (a_out >= 0) emacs_close (a_out); - mark_x (new_name); } #endif /* not CANNOT_DUMP */ diff --git a/src/unexelf.c b/src/unexelf.c index 0983f8f..34478e0 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -665,7 +665,6 @@ unexec (const char *new_name, const char *old_name) #endif struct stat stat_buf; off_t old_file_size; - int mask; /* Open the old file, allocate a buffer of the right size, and read in the file contents. */ @@ -799,7 +798,7 @@ unexec (const char *new_name, const char *old_name) the image of the new file. Set pointers to various interesting objects. */ - new_file = emacs_open (new_name, O_RDWR | O_CREAT, 0666); + new_file = emacs_open (new_name, O_RDWR | O_CREAT, 0777); if (new_file < 0) fatal ("Can't creat (%s): %s", new_name, strerror (errno)); @@ -1319,13 +1318,4 @@ temacs: if (emacs_close (new_file) != 0) fatal ("Can't close (%s): %s", new_name, strerror (errno)); - - if (stat (new_name, &stat_buf) != 0) - fatal ("Can't stat (%s): %s", new_name, strerror (errno)); - - mask = umask (777); - umask (mask); - stat_buf.st_mode |= 0111 & ~mask; - if (chmod (new_name, stat_buf.st_mode) != 0) - fatal ("Can't chmod (%s): %s", new_name, strerror (errno)); } diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 2e1ac88..89971bb 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -1267,7 +1267,7 @@ unexec (const char *outfile, const char *infile) unexec_error ("cannot open input file `%s'", infile); } - outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755); + outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0777); if (outfd < 0) { emacs_close (infd); commit b459f1f0b970b640bbc1f3827115a18be2dcef7f Author: Michael Albinus Date: Sat Dec 20 13:09:49 2014 +0100 * net/tramp-sh.el (tramp-histfile-override): Add :version. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a76e81..ad9548c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-20 Michael Albinus + + * net/tramp-sh.el (tramp-histfile-override): Add :version. + 2014-12-20 Teodor Zlatanov * net/tramp-sh.el (tramp-histfile-override): Clarify docstring. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index e4ba762..ba7b7d9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -75,6 +75,7 @@ If you set this variable to nil, however, the *override* is disabled, so the history will go to the default storage location, e.g. \"$HOME/.sh_history\"." :group 'tramp + :version "25.1" :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Empty the history (/dev/null)" "/dev/null") (string :tag "Redirect to a file"))) commit 6623f3daaeecd1ec7cc24f3b0c534fa090b46ee1 Author: Ted Zlatanov Date: Sat Dec 20 06:14:04 2014 -0500 * net/tramp-sh.el (tramp-histfile-override): Clarify docstring. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b658cc1..0a76e81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-20 Teodor Zlatanov + + * net/tramp-sh.el (tramp-histfile-override): Clarify docstring. + 2014-12-19 Artur Malabarba * let-alist.el (let-alist): Enable access to deeper alists by diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c639af3..e4ba762 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -66,8 +66,14 @@ files conditionalize this setup based on the TERM environment variable." ;;;###tramp-autoload (defcustom tramp-histfile-override "/dev/null" - "Whether the HISTFILE should be overridden to something. Set -to nil to disable the override." + "When invoking a shell, override the HISTFILE with this value. +By default, the HISTFILE is set to the \"/dev/null\" value, which +is special on Unix systems and indicates the shell history should +not be logged (this avoids clutter due to Tramp commands). + +If you set this variable to nil, however, the *override* is +disabled, so the history will go to the default storage +location, e.g. \"$HOME/.sh_history\"." :group 'tramp :type '(choice (const :tag "Do not override HISTFILE" nil) (const :tag "Empty the history (/dev/null)" "/dev/null") commit 8fa2e2544a0cc10bb1966f374a57bf946a213595 Author: Paul Eggert Date: Fri Dec 19 14:20:12 2014 -0800 * buffer.c (syms_of_buffer): Omit unneeded staticpros. diff --git a/src/ChangeLog b/src/ChangeLog index 5bab023..819c88b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -14,6 +14,7 @@ * nsmenu.m (syms_of_nsmenu): * nsselect.m (syms_of_nsselect): Prefer DEFSYM to defining by hand. + * buffer.c (syms_of_buffer): Omit unneeded staticpros. * data.c: Fix too-long line. * lisp.h (DECLARE_GDB_SYM): New macro. (DEFINE_GDB_SYMBOL_BEGIN): Use it. diff --git a/src/buffer.c b/src/buffer.c index ba3245f..b57d968 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5395,13 +5395,8 @@ syms_of_buffer (void) last_overlay_modification_hooks = Fmake_vector (make_number (10), Qnil); - staticpro (&Qfundamental_mode); - staticpro (&Qmode_class); staticpro (&QSFundamental); staticpro (&Vbuffer_alist); - staticpro (&Qprotected_field); - staticpro (&Qpermanent_local); - staticpro (&Qkill_buffer_hook); DEFSYM (Qchoice, "choice"); DEFSYM (Qleft, "left"); commit f447d33fdb082ce8e5d336be6034df24339b4c45 Author: Artur Malabarba Date: Fri Dec 19 18:25:06 2014 -0200 * let-alist.el (let-alist): Enable access to deeper alists Acces them by using extra dots inside the dotted symbols. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12530a9..b658cc1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-19 Artur Malabarba + + * let-alist.el (let-alist): Enable access to deeper alists by + using dots inside the dotted symbols. + 2014-12-19 Alan Mackenzie Make C++11 uniform init syntax work. New keywords "final" and "override" diff --git a/lisp/let-alist.el b/lisp/let-alist.el index 813b841..692beba 100644 --- a/lisp/let-alist.el +++ b/lisp/let-alist.el @@ -4,7 +4,7 @@ ;; Author: Artur Malabarba ;; Maintainer: Artur Malabarba -;; Version: 1.0.1 +;; Version: 1.0.2 ;; Keywords: extensions lisp ;; Prefix: let-alist ;; Separator: - @@ -39,21 +39,25 @@ ;; (let-alist alist ;; (if (and .title .body) ;; .body -;; .site)) +;; .site +;; .site.contents)) ;; -;; expands to +;; essentially expands to ;; ;; (let ((.title (cdr (assq 'title alist))) -;; (.body (cdr (assq 'body alist))) -;; (.site (cdr (assq 'site alist)))) +;; (.body (cdr (assq 'body alist))) +;; (.site (cdr (assq 'site alist))) +;; (.site.contents (cdr (assq 'contents (cdr (assq 'site alist)))))) ;; (if (and .title .body) ;; .body -;; .site)) +;; .site +;; .site.contents)) +;; +;; If you nest `let-alist' invocations, the inner one can't access +;; the variables of the outer one. You can, however, access alists +;; inside the original alist by using dots inside the symbol, as +;; displayed in the example above by the `.site.contents'. ;; -;; Note that only one level is supported. If you nest `let-alist' -;; invocations, the inner one can't access the variables of the outer -;; one. - ;;; Code: @@ -72,6 +76,31 @@ symbol, and each cdr is the same symbol without the `.'." (t (apply #'append (mapcar #'let-alist--deep-dot-search data))))) +(defun let-alist--access-sexp (symbol variable) + "Return a sexp used to acess SYMBOL inside VARIABLE." + (let* ((clean (let-alist--remove-dot symbol)) + (name (symbol-name clean))) + (if (string-match "\\`\\." name) + clean + (let-alist--list-to-sexp + (mapcar #'intern (nreverse (split-string name "\\."))) + variable)))) + +(defun let-alist--list-to-sexp (list var) + "Turn symbols LIST into recursive calls to `cdr' `assq' on VAR." + `(cdr (assq ',(car list) + ,(if (cdr list) (let-alist--list-to-sexp (cdr list) var) + var)))) + +(defun let-alist--remove-dot (symbol) + "Return SYMBOL, sans an initial dot." + (let ((name (symbol-name symbol))) + (if (string-match "\\`\\." name) + (intern (replace-match "" nil nil name)) + symbol))) + + +;;; The actual macro. ;;;###autoload (defmacro let-alist (alist &rest body) "Let-bind dotted symbols to their cdrs in ALIST and execute BODY. @@ -83,20 +112,28 @@ For instance, the following code (let-alist alist (if (and .title .body) .body - .site)) + .site + .site.contents)) -expands to +essentially expands to (let ((.title (cdr (assq 'title alist))) - (.body (cdr (assq 'body alist))) - (.site (cdr (assq 'site alist)))) + (.body (cdr (assq 'body alist))) + (.site (cdr (assq 'site alist))) + (.site.contents (cdr (assq 'contents (cdr (assq 'site alist)))))) (if (and .title .body) .body - .site))" + .site + .site.contents)) + +If you nest `let-alist' invocations, the inner one can't access +the variables of the outer one. You can, however, access alists +inside the original alist by using dots inside the symbol, as +displayed in the example above." (declare (indent 1) (debug t)) - (let ((var (gensym "let-alist"))) + (let ((var (gensym "alist"))) `(let ((,var ,alist)) - (let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,var)))) + (let ,(mapcar (lambda (x) `(,(car x) ,(let-alist--access-sexp (car x) var))) (delete-dups (let-alist--deep-dot-search body))) ,@body)))) diff --git a/test/ChangeLog b/test/ChangeLog index 80d2a40..7d23b3e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,6 +1,7 @@ 2014-12-19 Artur Malabarba * automated/let-alist.el: require `cl-lib' + New tests for accessing alists inside alists. 2014-12-18 Artur Malabarba diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el index a700a47..391ccb4 100644 --- a/test/automated/let-alist.el +++ b/test/automated/let-alist.el @@ -33,7 +33,19 @@ (cl-letf (((symbol-function #'gensym) (lambda (x) 'symbol))) (macroexpand '(let-alist data (list .test-one .test-two - .test-two .test-two))))))) + .test-two .test-two)))))) + (should + (equal + (let ((.external "ext") + (.external.too "et")) + (let-alist '((test-two . 0) + (test-three . 1) + (sublist . ((foo . 2) + (bar . 3)))) + (list .test-one .test-two .test-three + .sublist.foo .sublist.bar + ..external ..external.too))) + (list nil 0 1 2 3 "ext" "et")))) (defvar let-alist--test-counter 0 "Used to count number of times a function is called.") @@ -49,5 +61,17 @@ (list .test-one .test-two .test-two .test-three .cl-incf)) '(nil 1 1 2 nil))))) +(ert-deftest let-alist-remove-dot () + "Remove firt dot from symbol." + (should (equal (let-alist--remove-dot 'hi) 'hi)) + (should (equal (let-alist--remove-dot '.hi) 'hi)) + (should (equal (let-alist--remove-dot '..hi) '.hi))) + +(ert-deftest let-alist-list-to-sexp () + "Check that multiple dots are handled correctly." + (should (= 1 (eval (let-alist--list-to-sexp '(a b c d) ''((d (c (b (a . 1))))))))) + (should (equal (let-alist--access-sexp '.foo.bar.baz 'var) + '(cdr (assq 'baz (cdr (assq 'bar (cdr (assq 'foo var)))))))) + (should (equal (let-alist--access-sexp '..foo.bar.baz 'var) '.foo.bar.baz))) ;;; let-alist.el ends here commit 948fa912de164a1374c87e9206cddca741b7fa33 Author: Alan Mackenzie Date: Fri Dec 19 18:35:14 2014 +0000 Make C++11 uniform init syntax work. New keywords "final" and "override" cc-engine.el (c-back-over-member-initializer-braces): New function. (c-guess-basic-syntax): Set `containing-sex' and `lim' using the new function. cc-fonts.el (c-font-lock-declarations): Check more carefully for "are we at a declarator?" using c-back-over-member-initializers. cc-langs.el (c-type-modifier-kwds): include "final" and "override" in the C++ value. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index feeab01..12530a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2014-12-19 Alan Mackenzie + + Make C++11 uniform init syntax work. New keywords "final" and "override" + + * progmodes/cc-engine.el (c-back-over-member-initializer-braces): + New function. + (c-guess-basic-syntax): Set `containing-sex' and `lim' using the + new function. + + * progmodes/cc-fonts.el (c-font-lock-declarations): Check more + carefully for "are we at a declarator?" using + c-back-over-member-initializers. + + * progmodes/cc-langs.el (c-type-modifier-kwds): include "final" + and "override" in the C++ value. + 2014-12-19 Martin Rudalics * textmodes/ispell.el (ispell-command-loop): Don't use diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index a24cb3d..9a6e975 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6588,6 +6588,36 @@ comment at the start of cc-engine.el for more info." (prog1 (car ,ps) (setq ,ps (cdr ,ps))))) +(defun c-back-over-member-initializer-braces () + ;; Point is just after a closing brace/parenthesis. Try to parse this as a + ;; C++ member initializer list, going back to just after the introducing ":" + ;; and returning t. Otherwise return nil, leaving point unchanged. + (let ((here (point)) res) + (setq res + (catch 'done + (when (not (c-go-list-backward)) + (throw 'done nil)) + (c-backward-syntactic-ws) + (when (not (c-simple-skip-symbol-backward)) + (throw 'done nil)) + (c-backward-syntactic-ws) + + (while (eq (char-before) ?,) + (backward-char) + (c-backward-syntactic-ws) + (when (not (memq (char-before) '(?\) ?}))) + (throw 'done nil)) + (when (not (c-go-list-backward)) + (throw 'done nil)) + (c-backward-syntactic-ws) + (when (not (c-simple-skip-symbol-backward)) + (throw 'done nil)) + (c-backward-syntactic-ws)) + + (eq (char-before) ?:))) + (or res (goto-char here)) + res)) + (defun c-back-over-member-initializers () ;; Test whether we are in a C++ member initializer list, and if so, go back ;; to the introducing ":", returning the position of the opening paren of @@ -9588,22 +9618,26 @@ comment at the start of cc-engine.el for more info." (c-keyword-sym (match-string 1))))) ;; Init some position variables. - (if c-state-cache + (if paren-state (progn (setq containing-sexp (car paren-state) paren-state (cdr paren-state)) (if (consp containing-sexp) - (progn - (setq lim (cdr containing-sexp)) - (if (cdr c-state-cache) - ;; Ignore balanced paren. The next entry - ;; can't be another one. - (setq containing-sexp (car (cdr c-state-cache)) - paren-state (cdr paren-state)) - ;; If there is no surrounding open paren then - ;; put the last balanced pair back on paren-state. - (setq paren-state (cons containing-sexp paren-state) - containing-sexp nil))) + (save-excursion + (goto-char (cdr containing-sexp)) + (if (and (c-major-mode-is 'c++-mode) + (c-back-over-member-initializer-braces)) + (c-syntactic-skip-backward "^}" nil t)) + (setq lim (point)) + (if paren-state + ;; Ignore balanced paren. The next entry + ;; can't be another one. + (setq containing-sexp (car paren-state) + paren-state (cdr paren-state)) + ;; If there is no surrounding open paren then + ;; put the last balanced pair back on paren-state. + (setq paren-state (cons containing-sexp paren-state) + containing-sexp nil))) (setq lim (1+ containing-sexp)))) (setq lim (point-min))) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 448e764..d39376a 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1464,36 +1464,38 @@ casts and declarations are fontified. Used on level 2 and higher." c-recognize-knr-p) ; Strictly speaking, bogus, but it ; speeds up lisp.h tremendously. (save-excursion - (unless (or (eobp) - (looking-at "\\s(\\|\\s)")) - (forward-char)) - (setq bod-res (car (c-beginning-of-decl-1 decl-search-lim))) - (if (and (eq bod-res 'same) - (save-excursion - (c-backward-syntactic-ws) - (eq (char-before) ?\}))) - (c-beginning-of-decl-1 decl-search-lim)) - - ;; We're now putatively at the declaration. - (setq paren-state (c-parse-state)) - ;; At top level or inside a "{"? - (if (or (not (setq encl-pos - (c-most-enclosing-brace paren-state))) - (eq (char-after encl-pos) ?\{)) - (progn - (when (looking-at c-typedef-key) ; "typedef" - (setq is-typedef t) - (goto-char (match-end 0)) - (c-forward-syntactic-ws)) - ;; At a real declaration? - (if (memq (c-forward-type t) '(t known found decltype)) - (progn - (c-font-lock-declarators (point-max) t is-typedef) - nil) - ;; False alarm. Return t to go on to the next check. - (goto-char start-pos) - t)) - t)))))) + (if (c-back-over-member-initializers) + t ; Can't be at a declarator + (unless (or (eobp) + (looking-at "\\s(\\|\\s)")) + (forward-char)) + (setq bod-res (car (c-beginning-of-decl-1 decl-search-lim))) + (if (and (eq bod-res 'same) + (save-excursion + (c-backward-syntactic-ws) + (eq (char-before) ?\}))) + (c-beginning-of-decl-1 decl-search-lim)) + + ;; We're now putatively at the declaration. + (setq paren-state (c-parse-state)) + ;; At top level or inside a "{"? + (if (or (not (setq encl-pos + (c-most-enclosing-brace paren-state))) + (eq (char-after encl-pos) ?\{)) + (progn + (when (looking-at c-typedef-key) ; "typedef" + (setq is-typedef t) + (goto-char (match-end 0)) + (c-forward-syntactic-ws)) + ;; At a real declaration? + (if (memq (c-forward-type t) '(t known found decltype)) + (progn + (c-font-lock-declarators (point-max) t is-typedef) + nil) + ;; False alarm. Return t to go on to the next check. + (goto-char start-pos) + t)) + t))))))) ;; It was a false alarm. Check if we're in a label (or other ;; construct with `:' except bitfield) instead. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index b93cc78..31298d7 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1741,7 +1741,7 @@ but they don't build a type of themselves. Unlike the keywords on not the type face." t nil c '("const" "restrict" "volatile") - c++ '("const" "constexpr" "noexcept" "volatile" "throw") + c++ '("const" "constexpr" "noexcept" "volatile" "throw" "final" "override") objc '("const" "volatile")) (c-lang-defconst c-opt-type-modifier-key commit 164cdfbf9e75a891bd8944a79f53bd403c6c2215 Author: Martin Rudalics Date: Fri Dec 19 18:59:54 2014 +0100 In `ispell-command-loop' don't use `next-window'. * textmodes/ispell.el (ispell-command-loop): Don't use `next-window'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b50d584..feeab01 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-19 Martin Rudalics + + * textmodes/ispell.el (ispell-command-loop): Don't use + `next-window'. + 2014-12-18 Sam Steingold Keyboard interface (C-f10) to `mouse-buffer-menu' (C-down-mouse-1). diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index ea2eaba..ab2c83b 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2265,8 +2265,9 @@ Global `ispell-quit' set to start location to continue spell session." (sit-for 0)) ;; Display choices for misspelled word. + (setq textwin (selected-window)) (ispell-show-choices) - (select-window (setq textwin (next-window))) + (select-window textwin) ;; highlight word, protecting current buffer status (unwind-protect @@ -2408,8 +2409,9 @@ Global `ispell-quit' set to start location to continue spell session." count (ispell-int-char (1+ count)))) (setq count (ispell-int-char (- count ?0 skipped)))) + (setq textwin (selected-window)) (ispell-show-choices) - (select-window (next-window))))) + (select-window textwin)))) (and (eq 'block ispell-highlight-p) (ispell-highlight-spelling-error start end nil 'block)) commit 061f310c4a32491634b7563f4b8520f4824ed21b Author: Artur Malabarba Date: Fri Dec 19 11:07:47 2014 -0200 * automated/let-alist.el: require `cl-lib' diff --git a/test/ChangeLog b/test/ChangeLog index 8ddd80f..80d2a40 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2014-12-19 Artur Malabarba + + * automated/let-alist.el: require `cl-lib' + 2014-12-18 Artur Malabarba * automated/let-alist.el: New file. diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el index 2054a96..a700a47 100644 --- a/test/automated/let-alist.el +++ b/test/automated/let-alist.el @@ -20,6 +20,7 @@ ;;; Code: (require 'ert) +(require 'cl-lib) (ert-deftest let-alist-surface-test () "Tests basic macro expansion for `let-alist'." commit 48a9d9fdbbe8946ae29393ee8bc24c6f6619003c Merge: 230c010 09ab6fe Author: Michael Albinus Date: Fri Dec 19 12:56:52 2014 +0100 Merge branch 'emacs-24' of git.sv.gnu.org:/srv/git/emacs into emacs-24 Conflicts: lisp/ChangeLog commit 230c010050f424cee81c3bcf00b0f00a65819dcb Author: Michael Albinus Date: Fri Dec 19 12:51:42 2014 +0100 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34c335c..ed08c9f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-19 Michael Albinus + + * net/tramp-sh.el (tramp-send-command-and-read): New optional + arg MARKER. + (tramp-get-remote-path): Use it. + 2014-12-18 Stefan Monnier * subr.el (redisplay-dont-pause): Mark as obsolete. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index bb1a813..dc78ace 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2856,7 +2856,7 @@ the result will be a local, non-Tramp, file name." (name1 name) (i 0) ;; We do not want to raise an error when - ;; `start-file-process' has been started several time in + ;; `start-file-process' has been started several times in ;; `eshell' and friends. (tramp-current-connection nil)) @@ -4865,8 +4865,9 @@ FMT and ARGS which are passed to `error'." (or (tramp-send-command-and-check vec command) (apply 'tramp-error vec 'file-error fmt args))) -(defun tramp-send-command-and-read (vec command &optional noerror) +(defun tramp-send-command-and-read (vec command &optional noerror marker) "Run COMMAND and return the output, which must be a Lisp expression. +If MARKER is a regexp, read the output after that string. In case there is no valid Lisp expression and NOERROR is nil, it raises an error." (when (if noerror @@ -4874,8 +4875,17 @@ raises an error." (tramp-barf-unless-okay vec command "`%s' returns with error" command)) (with-current-buffer (tramp-get-connection-buffer vec) - ;; Read the expression. (goto-char (point-min)) + ;; Read the marker. + (when (stringp marker) + (condition-case nil + (re-search-forward marker) + (error (unless noerror + (tramp-error + vec 'file-error + "`%s' does not return the marker `%s': `%s'" + command marker (buffer-string)))))) + ;; Read the expression. (condition-case nil (prog1 (read (current-buffer)) ;; Error handling. @@ -5027,25 +5037,22 @@ Return ATTR." "/bin:/usr/bin") "/bin:/usr/bin")))) (own-remote-path - ;; We cannot apply `tramp-send-command-and-read' because - ;; the login shell could return more than just the $PATH - ;; string. So we emulate that function. + ;; The login shell could return more than just the $PATH + ;; string. So we use `tramp-end-of-heredoc' as marker. (when elt2 - (tramp-send-command + (tramp-send-command-and-read vec (format - "%s -l %s 'echo \\\"$PATH\\\"'" + "%s -l %s 'echo %s \\\"$PATH\\\"'" (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-shell) (mapconcat 'identity (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-shell-args) - " "))) - (with-current-buffer (tramp-get-connection-buffer vec) - (goto-char (point-max)) - (forward-line -1) - (read (current-buffer)))))) + " ") + (tramp-shell-quote-argument tramp-end-of-heredoc)) + nil (regexp-quote tramp-end-of-heredoc))))) ;; Replace place holder `tramp-default-remote-path'. (when elt1 commit 09ab6fedb2314ad1f6ef1cac8643e4b75d4798a2 Merge: 2616307 a864bfb Author: Michael Albinus Date: Fri Dec 19 12:48:49 2014 +0100 Merge branch 'emacs-24' of git.sv.gnu.org:/srv/git/emacs into emacs-24 Conflicts: lisp/ChangeLog commit 2616307f5c517124715b4d20bdd23c6c70366ac9 Author: Michael Albinus Date: Fri Dec 19 12:45:01 2014 +0100 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a7fe332..599290a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-19 Michael Albinus + + * net/tramp-sh.el (tramp-send-command-and-read): New optional + arg MARKER. + (tramp-get-remote-path): Use it. + 2014-12-17 Michael Albinus * net/tramp.el (tramp-error-with-buffer): Call `message' properly. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index bb1a813..dc78ace 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2856,7 +2856,7 @@ the result will be a local, non-Tramp, file name." (name1 name) (i 0) ;; We do not want to raise an error when - ;; `start-file-process' has been started several time in + ;; `start-file-process' has been started several times in ;; `eshell' and friends. (tramp-current-connection nil)) @@ -4865,8 +4865,9 @@ FMT and ARGS which are passed to `error'." (or (tramp-send-command-and-check vec command) (apply 'tramp-error vec 'file-error fmt args))) -(defun tramp-send-command-and-read (vec command &optional noerror) +(defun tramp-send-command-and-read (vec command &optional noerror marker) "Run COMMAND and return the output, which must be a Lisp expression. +If MARKER is a regexp, read the output after that string. In case there is no valid Lisp expression and NOERROR is nil, it raises an error." (when (if noerror @@ -4874,8 +4875,17 @@ raises an error." (tramp-barf-unless-okay vec command "`%s' returns with error" command)) (with-current-buffer (tramp-get-connection-buffer vec) - ;; Read the expression. (goto-char (point-min)) + ;; Read the marker. + (when (stringp marker) + (condition-case nil + (re-search-forward marker) + (error (unless noerror + (tramp-error + vec 'file-error + "`%s' does not return the marker `%s': `%s'" + command marker (buffer-string)))))) + ;; Read the expression. (condition-case nil (prog1 (read (current-buffer)) ;; Error handling. @@ -5027,25 +5037,22 @@ Return ATTR." "/bin:/usr/bin") "/bin:/usr/bin")))) (own-remote-path - ;; We cannot apply `tramp-send-command-and-read' because - ;; the login shell could return more than just the $PATH - ;; string. So we emulate that function. + ;; The login shell could return more than just the $PATH + ;; string. So we use `tramp-end-of-heredoc' as marker. (when elt2 - (tramp-send-command + (tramp-send-command-and-read vec (format - "%s -l %s 'echo \\\"$PATH\\\"'" + "%s -l %s 'echo %s \\\"$PATH\\\"'" (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-shell) (mapconcat 'identity (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-remote-shell-args) - " "))) - (with-current-buffer (tramp-get-connection-buffer vec) - (goto-char (point-max)) - (forward-line -1) - (read (current-buffer)))))) + " ") + (tramp-shell-quote-argument tramp-end-of-heredoc)) + nil (regexp-quote tramp-end-of-heredoc))))) ;; Replace place holder `tramp-default-remote-path'. (when elt1 commit a864bfb57c8445156dbe7e30b0348d9896c27b28 Author: Andreas Schwab Date: Fri Dec 19 11:47:51 2014 +0100 Fix content decoding in gnus-read-ephemeral-bug-group * gnus-group.el (gnus-read-ephemeral-bug-group): Bind coding-system-for-read and coding-system-for-write only around with-temp-file, and make buffer unibyte. Don't write temp file twice. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3b2a702..f69d350 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2014-12-19 Andreas Schwab + + * gnus-group.el (gnus-read-ephemeral-bug-group): Bind + coding-system-for-read and coding-system-for-write only around + with-temp-file, and make buffer unibyte. Don't write temp file twice. + 2014-11-26 John Mastro (tiny change) * auth-source.el (auth-source-macos-keychain-search-items): Return diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index d8260b4..a7e3d30 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2459,27 +2459,27 @@ the bug number, and browsing the URL must return mbox output." (setq ids (string-to-number ids))) (unless (listp ids) (setq ids (list ids))) - (let ((tmpfile (mm-make-temp-file "gnus-temp-group-")) - (coding-system-for-write 'binary) - (coding-system-for-read 'binary)) - (with-temp-file tmpfile - (dolist (id ids) - (url-insert-file-contents (format mbox-url id))) - (goto-char (point-min)) - ;; Add the debbugs address so that we can respond to reports easily. - (while (re-search-forward "^To: " nil t) - (end-of-line) - (insert (format ", %s@%s" (car ids) - (gnus-replace-in-string - (gnus-replace-in-string mbox-url "^http://" "") - "/.*$" "")))) - (write-region (point-min) (point-max) tmpfile) - (gnus-group-read-ephemeral-group - (format "nndoc+ephemeral:bug#%s" - (mapconcat 'number-to-string ids ",")) - `(nndoc ,tmpfile - (nndoc-article-type mbox)) - nil window-conf)) + (let ((tmpfile (mm-make-temp-file "gnus-temp-group-"))) + (let ((coding-system-for-write 'binary) + (coding-system-for-read 'binary)) + (with-temp-file tmpfile + (set-buffer-multibyte nil) + (dolist (id ids) + (url-insert-file-contents (format mbox-url id))) + (goto-char (point-min)) + ;; Add the debbugs address so that we can respond to reports easily. + (while (re-search-forward "^To: " nil t) + (end-of-line) + (insert (format ", %s@%s" (car ids) + (gnus-replace-in-string + (gnus-replace-in-string mbox-url "^http://" "") + "/.*$" "")))))) + (gnus-group-read-ephemeral-group + (format "nndoc+ephemeral:bug#%s" + (mapconcat 'number-to-string ids ",")) + `(nndoc ,tmpfile + (nndoc-article-type mbox)) + nil window-conf) (delete-file tmpfile))) (defun gnus-read-ephemeral-debian-bug-group (number) commit e0ab846df46ea073503e17adedb76a3ab9d96c7e Author: Martin Rudalics Date: Fri Dec 19 11:32:39 2014 +0100 In NEWS mark `preserve-window-size' as +++. diff --git a/etc/NEWS b/etc/NEWS index 1358eaf..14a9176 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -577,6 +577,7 @@ fullwidth frames, the behavior may depend on the toolkit used. specific frame does not resize that frame in order to preserve the number of columns or lines it displays. ++++ ** New function `window-preserve-size' allows to preserve the size of windows without "fixing" it. It's supported by `fit-window-to-buffer', `temp-buffer-resize-mode' and `display-buffer'. commit 276bd75ca56d29b6ddbd2aca3659c83118b3f548 Author: Martin Rudalics Date: Fri Dec 19 11:27:43 2014 +0100 Describe window size preserving options. * windows.texi (Resizing Windows): Describe new argument of `fit-window-to-buffer'. Move description of `window-size-fixed' to new section below. (Preserving Window Sizes): New section describing `window-size-fixed' and `window-preserve-size'. (Display Action Functions): Describe `preserve-size' alist entry. (Window Parameters): Describe `preserved-size' parameter. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7424ab0..5b37506 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,14 @@ +2014-12-19 Martin Rudalics + + * windows.texi (Resizing Windows): Describe new argument of + `fit-window-to-buffer'. Move description of `window-size-fixed' + to new section below. + (Preserving Window Sizes): New section describing + `window-size-fixed' and `window-preserve-size'. + (Display Action Functions): Describe `preserve-size' alist + entry. + (Window Parameters): Describe `preserved-size' parameter. + 2014-12-18 Eli Zaretskii * display.texi (Low-Level Font): Document font-info and query-font. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index fa665da..f6e7729 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -1006,6 +1006,7 @@ Windows * Windows and Frames:: Relating windows to the frame they appear on. * Window Sizes:: Accessing a window's size. * Resizing Windows:: Changing the sizes of windows. +* Preserving Window Sizes:: Preserving the size of windows. * Splitting Windows:: Splitting one window into two windows. * Deleting Windows:: Deleting a window gives its space to other windows. * Recombining Windows:: Preserving the frame layout when splitting and diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 5060fef..c54eb90 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -16,6 +16,7 @@ is displayed in windows. * Windows and Frames:: Relating windows to the frame they appear on. * Window Sizes:: Accessing a window's size. * Resizing Windows:: Changing the sizes of windows. +* Preserving Window Sizes:: Preserving the size of windows. * Splitting Windows:: Creating a new window. * Deleting Windows:: Removing a window from its frame. * Recombining Windows:: Preserving the frame layout when splitting and @@ -657,22 +658,6 @@ window. Its value has to accommodate two text columns as well as margins, fringes, a scroll bar and a right divider, if present. @end defopt -@defvar window-size-fixed -If this buffer-local variable is non-@code{nil}, the size of any -window displaying the buffer cannot normally be changed. Deleting a -window or changing the frame's size may still change its size, if -there is no choice. - -If the value is @code{height}, then only the window's height is fixed; -if the value is @code{width}, then only the window's width is fixed. -Any other non-@code{nil} value fixes both the width and the height. - -If this variable is @code{nil}, this does not necessarily mean that any -window showing the buffer can be resized in the desired direction. To -determine that, use the function @code{window-resizable}. -@xref{Resizing Windows}. -@end defvar - The following function tells how small a specific window can get taking into account the sizes of its areas and the values of @code{window-min-height}, @code{window-min-width} and @@ -817,7 +802,7 @@ option is @code{nil}. The default value is @code{nil}. The following commands resize windows in more specific ways. When called interactively, they act on the selected window. -@deffn Command fit-window-to-buffer &optional window max-height min-height max-width min-width +@deffn Command fit-window-to-buffer &optional window max-height min-height max-width min-width preserve-size This command adjusts the height or width of @var{window} to fit the text in it. It returns non-@code{nil} if it was able to resize @var{window}, and @code{nil} otherwise. If @var{window} is omitted or @code{nil}, it @@ -845,6 +830,10 @@ defaults to the width of @var{window}'s frame. The optional argument specified in columns and include fringes, margins and scrollbars, if any. +The optional argument @var{preserve-size}, if non-@code{nil}, will +install a parameter to preserve the size of @var{window} during future +resize operations (@pxref{Preserving Window Sizes}). + If the option @code{fit-frame-to-buffer} (see below) is non-@code{nil}, this function will try to resize the frame of @var{window} to fit its contents by calling @code{fit-frame-to-buffer} (@pxref{Size and @@ -1078,6 +1067,99 @@ point was previously on. Note that this only affects function. @end defopt + +@node Preserving Window Sizes +@section Preserving Window Sizes +@cindex preserving window sizes + +A window can get resized explicitly by using one of the functions from +the preceding section or implicitly, for example, when resizing an +adjacent window, when splitting or deleting a window (@pxref{Splitting +Windows}, @pxref{Deleting Windows}) or when resizing the window's frame +(@pxref{Size and Position}). + + It is possible to avoid implicit resizing of a specific window when +there are one or more other resizable windows on the same frame. For +this purpose, Emacs must be advised to @dfn{preserve} the size of that +window. There are two basic ways to do that. + +@defvar window-size-fixed +If this buffer-local variable is non-@code{nil}, the size of any window +displaying the buffer cannot normally be changed. Deleting a window or +changing the frame's size may still change the window's size, if there +is no choice. + +If the value is @code{height}, then only the window's height is fixed; +if the value is @code{width}, then only the window's width is fixed. +Any other non-@code{nil} value fixes both the width and the height. + +If this variable is @code{nil}, this does not necessarily mean that any +window showing the buffer can be resized in the desired direction. To +determine that, use the function @code{window-resizable}. +@xref{Resizing Windows}. +@end defvar + +Often @code{window-size-fixed} is overly aggressive because it inhibits +any attempt to explicitly resize or split an affected window as well. +This may even happen after the window has been resized implicitly, for +example, when deleting an adjacent window or resizing the window's +frame. The following function tries hard to never disallow resizing +such a window explicitly: + +@defun window-preserve-size &optional window horizontal preserve +This function (un-)marks the height of window @var{window} as preserved +for future resize operations. @var{window} must be a live window and +defaults to the selected one. If the optional argument @var{horizontal} +is non-@code{nil}, it (un-)marks the width of @var{window} as preserved. + +If the optional argument @var{preserve} is @code{t}, this means to +preserve the current height/width of @var{window}'s body. The +height/width of @var{window} will change only if Emacs has no better +choice. Resizing a window whose height/width is preserved by this +function never throws an error. + +If @var{preserve} is @code{nil}, this means to stop preserving the +height/width of @var{window}, lifting any respective restraint induced +by a previous call of this function for @var{window}. Calling +@code{enlarge-window}, @code{shrink-window} or +@code{fit-window-to-buffer} with @var{window} as argument may also +remove the respective restraint. +@end defun + +@code{window-preserve-size} is currently invoked by the following +functions: + +@table @code +@item fit-window-to-buffer +If the optional argument @var{preserve-size} of that function +(@pxref{Resizing Windows}) is non-@code{nil}, the size established by +that function is preserved. + +@item display-buffer +If the @var{alist} argument of that function (@pxref{Choosing Window}) +contains a @code{preserve-size} entry, the size of the window produced +by that function is preserved. +@end table + + @code{window-preserve-size} installs a window parameter (@pxref{Window +Parameters}) called @code{preserved-size} which is consulted by the +window resizing functions. This parameter will not prevent resizing the +window when the window shows another buffer than the one when +@code{window-preserve-size} was invoked or if its size has changed since +then. + +The following function can be used to check whether the height of a +particular window is preserved: + +@defun window-preserved-size &optional window horizontal +This function returns the preserved height of window @var{window} in +pixels. @var{window} must be a live window and defaults to the selected +one. If the optional argument @var{horizontal} is non-@code{nil}, it +returns the preserved width of @var{window}. It returns @code{nil} if +the size of @var{window} is not preserved. +@end defun + + @node Deleting Windows @section Deleting Windows @cindex deleting windows @@ -2233,6 +2315,13 @@ argument: the new window. The function is supposed to adjust the width of the window; its return value is ignored. @end itemize +If @var{alist} contains a @code{preserve-size} entry, Emacs will try to +preserve the size of the new window during future resize operations +(@pxref{Preserving Window Sizes}). The @sc{cdr} of that entry must be a +cons cell whose @sc{car}, if non-@code{nil}, means to preserve the width +of the window and whose @sc{cdr}, if non-@code{nil}, means to preserve +the height of the window. + This function can fail if no window splitting can be performed for some reason (e.g., if the selected frame has an @code{unsplittable} frame parameter; @pxref{Buffer Parameters}). @@ -3900,6 +3989,15 @@ This parameter specifies the window that this one has been cloned from. It is installed by @code{window-state-get} (@pxref{Window Configurations}). +@item @code{preserved-size} +This parameter specifies a buffer, a direction where @code{nil} means +vertical and @code{t} horizontal, and a size in pixels. If this window +displays the specified buffer and its size in the indicated direction +equals the size specified by this parameter, then Emacs will try to +preserve the size of this window in the indicated direction. This +parameter is installed and updated by the function +@code{window-preserve-size} (@pxref{Preserving Window Sizes}). + @item @code{quit-restore} This parameter is installed by the buffer display functions (@pxref{Choosing Window}) and consulted by @code{quit-restore-window} commit ad013ba63134d4fe6470665abf2f9e33a595848a Author: Paul Eggert Date: Thu Dec 18 18:12:01 2014 -0800 Minor cleanups for Lisp objects and symbols * alloc.c (next_vector, set_next_vector): * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum): (lisp_h_make_number) [USE_LSB_TAG]: Use Lisp_Int0 instead of the mystery constant 0. * alloc.c (mark_object): Always set and use po; that's simpler. (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE): Properly parenthesize definientia. * bidi.c (bidi_initialize): * buffer.c (init_buffer_once): * nsfns.m (syms_of_nsfns): * nsmenu.m (syms_of_nsmenu): * nsselect.m (syms_of_nsselect): Prefer DEFSYM to defining by hand. * data.c: Fix too-long line. * lisp.h (DECLARE_GDB_SYM): New macro. (DEFINE_GDB_SYMBOL_BEGIN): Use it. (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]: Declare the symbol, so it's visible to everywhere lisp.h is included. Move forward decls as far forward as they can go, to allow future changes to use them. diff --git a/src/ChangeLog b/src/ChangeLog index 359dca9..5bab023 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2014-12-19 Paul Eggert + + Minor cleanups for Lisp objects and symbols + * alloc.c (next_vector, set_next_vector): + * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum): + (lisp_h_make_number) [USE_LSB_TAG]: + Use Lisp_Int0 instead of the mystery constant 0. + * alloc.c (mark_object): Always set and use po; that's simpler. + (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE): + Properly parenthesize definientia. + * bidi.c (bidi_initialize): + * buffer.c (init_buffer_once): + * nsfns.m (syms_of_nsfns): + * nsmenu.m (syms_of_nsmenu): + * nsselect.m (syms_of_nsselect): + Prefer DEFSYM to defining by hand. + * data.c: Fix too-long line. + * lisp.h (DECLARE_GDB_SYM): New macro. + (DEFINE_GDB_SYMBOL_BEGIN): Use it. + (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]: + Declare the symbol, so it's visible to everywhere lisp.h is included. + Move forward decls as far forward as they can go, + to allow future changes to use them. + 2014-12-18 Paul Eggert * gnutls.c: Include gnutls.h. diff --git a/src/alloc.c b/src/alloc.c index 4328745..eada96c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2719,13 +2719,13 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, static struct Lisp_Vector * next_vector (struct Lisp_Vector *v) { - return XUNTAG (v->contents[0], 0); + return XUNTAG (v->contents[0], Lisp_Int0); } static void set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) { - v->contents[0] = make_lisp_ptr (p, 0); + v->contents[0] = make_lisp_ptr (p, Lisp_Int0); } /* This value is balanced well enough to avoid too much internal overhead @@ -6155,15 +6155,16 @@ void mark_object (Lisp_Object arg) { register Lisp_Object obj = arg; -#ifdef GC_CHECK_MARKED_OBJECTS void *po; +#ifdef GC_CHECK_MARKED_OBJECTS struct mem_node *m; #endif ptrdiff_t cdr_count = 0; loop: - if (PURE_POINTER_P (XPNTR (obj))) + po = XPNTR (obj); + if (PURE_POINTER_P (po)) return; last_marked[last_marked_index++] = obj; @@ -6175,8 +6176,6 @@ mark_object (Lisp_Object arg) by ~80%, and requires compilation with GC_MARK_STACK != 0. */ #ifdef GC_CHECK_MARKED_OBJECTS - po = (void *) XPNTR (obj); - /* Check that the object pointed to by PO is known to be a Lisp structure allocated from the heap. */ #define CHECK_ALLOCATED() \ @@ -6203,8 +6202,8 @@ mark_object (Lisp_Object arg) #else /* not GC_CHECK_MARKED_OBJECTS */ -#define CHECK_LIVE(LIVEP) (void) 0 -#define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0 +#define CHECK_LIVE(LIVEP) ((void) 0) +#define CHECK_ALLOCATED_AND_LIVE(LIVEP) ((void) 0) #endif /* not GC_CHECK_MARKED_OBJECTS */ diff --git a/src/bidi.c b/src/bidi.c index 0d291fc..4538545 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1108,14 +1108,12 @@ bidi_initialize (void) emacs_abort (); staticpro (&bidi_brackets_table); - Qparagraph_start = intern ("paragraph-start"); - staticpro (&Qparagraph_start); + DEFSYM (Qparagraph_start, "paragraph-start"); paragraph_start_re = Fsymbol_value (Qparagraph_start); if (!STRINGP (paragraph_start_re)) paragraph_start_re = build_string ("\f\\|[ \t]*$"); staticpro (¶graph_start_re); - Qparagraph_separate = intern ("paragraph-separate"); - staticpro (&Qparagraph_separate); + DEFSYM (Qparagraph_separate, "paragraph-separate"); paragraph_separate_re = Fsymbol_value (Qparagraph_separate); if (!STRINGP (paragraph_separate_re)) paragraph_separate_re = build_string ("[ \t\f]*$"); diff --git a/src/buffer.c b/src/buffer.c index 9bdbfb8..ba3245f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5224,16 +5224,14 @@ init_buffer_once (void) QSFundamental = build_pure_c_string ("Fundamental"); - Qfundamental_mode = intern_c_string ("fundamental-mode"); + DEFSYM (Qfundamental_mode, "fundamental-mode"); bset_major_mode (&buffer_defaults, Qfundamental_mode); - Qmode_class = intern_c_string ("mode-class"); + DEFSYM (Qmode_class, "mode-class"); + DEFSYM (Qprotected_field, "protected-field"); - Qprotected_field = intern_c_string ("protected-field"); - - Qpermanent_local = intern_c_string ("permanent-local"); - - Qkill_buffer_hook = intern_c_string ("kill-buffer-hook"); + DEFSYM (Qpermanent_local, "permanent-local"); + DEFSYM (Qkill_buffer_hook, "kill-buffer-hook"); Fput (Qkill_buffer_hook, Qpermanent_local, Qt); /* super-magic invisible buffer */ diff --git a/src/data.c b/src/data.c index b48dbbe..7151d22 100644 --- a/src/data.c +++ b/src/data.c @@ -89,7 +89,8 @@ static Lisp_Object Qdefun; Lisp_Object Qinteractive_form; static Lisp_Object Qdefalias_fset_function; -static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); +static void swap_in_symval_forwarding (struct Lisp_Symbol *, + struct Lisp_Buffer_Local_Value *); static bool BOOLFWDP (union Lisp_Fwd *a) diff --git a/src/lisp.h b/src/lisp.h index 37172c6..3a6d247 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -44,12 +44,13 @@ INLINE_HEADER_BEGIN definitions or enums visible to the debugger. It's used for symbols that .gdbinit needs. */ +#define DECLARE_GDB_SYM(type, id) type const id EXTERNALLY_VISIBLE #ifdef MAIN_PROGRAM -# define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE +# define DEFINE_GDB_SYMBOL_BEGIN(type, id) DECLARE_GDB_SYM (type, id) # define DEFINE_GDB_SYMBOL_END(id) = id; #else -# define DEFINE_GDB_SYMBOL_BEGIN(type, id) -# define DEFINE_GDB_SYMBOL_END(val) +# define DEFINE_GDB_SYMBOL_BEGIN(type, id) extern DECLARE_GDB_SYM (type, id) +# define DEFINE_GDB_SYMBOL_END(val) ; #endif /* The ubiquitous max and min macros. */ @@ -337,7 +338,7 @@ error !; #define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons) #define lisp_h_EQ(x, y) (XLI (x) == XLI (y)) #define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float) -#define lisp_h_INTEGERP(x) ((XTYPE (x) & ~Lisp_Int1) == 0) +#define lisp_h_INTEGERP(x) ((XTYPE (x) & (Lisp_Int0 | ~Lisp_Int1)) == Lisp_Int0) #define lisp_h_MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker) #define lisp_h_MISCP(x) (XTYPE (x) == Lisp_Misc) #define lisp_h_NILP(x) EQ (x, Qnil) @@ -361,7 +362,7 @@ error !; #endif #if USE_LSB_TAG # define lisp_h_make_number(n) \ - XIL ((EMACS_INT) ((EMACS_UINT) (n) << INTTYPEBITS)) + XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) # define lisp_h_XFASTINT(a) XINT (a) # define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) # define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) @@ -573,7 +574,73 @@ typedef EMACS_INT Lisp_Object; #define LISP_INITIALLY_ZERO 0 enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; #endif /* CHECK_LISP_OBJECT_TYPE */ + +/* Forward declarations. */ + +/* Defined in this file. */ +union Lisp_Fwd; +INLINE bool BOOL_VECTOR_P (Lisp_Object); +INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *); +INLINE bool BUFFERP (Lisp_Object); +INLINE bool CHAR_TABLE_P (Lisp_Object); +INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t); +INLINE bool (CONSP) (Lisp_Object); +INLINE bool (FLOATP) (Lisp_Object); +INLINE bool functionp (Lisp_Object); +INLINE bool (INTEGERP) (Lisp_Object); +INLINE bool (MARKERP) (Lisp_Object); +INLINE bool (MISCP) (Lisp_Object); +INLINE bool (NILP) (Lisp_Object); +INLINE bool OVERLAYP (Lisp_Object); +INLINE bool PROCESSP (Lisp_Object); +INLINE bool PSEUDOVECTORP (Lisp_Object, int); +INLINE bool SAVE_VALUEP (Lisp_Object); +INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, + Lisp_Object); +INLINE bool STRINGP (Lisp_Object); +INLINE bool SUB_CHAR_TABLE_P (Lisp_Object); +INLINE bool SUBRP (Lisp_Object); +INLINE bool (SYMBOLP) (Lisp_Object); +INLINE bool (VECTORLIKEP) (Lisp_Object); +INLINE bool WINDOWP (Lisp_Object); +INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); + +/* Defined in chartab.c. */ +extern Lisp_Object char_table_ref (Lisp_Object, int); +extern void char_table_set (Lisp_Object, int, Lisp_Object); +/* Defined in data.c. */ +extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p; +extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; +extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp; +extern Lisp_Object Qbool_vector_p; +extern Lisp_Object Qvector_or_char_table_p, Qwholenump; +extern Lisp_Object Qwindow; +extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); +extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); + +/* Defined in emacs.c. */ +extern bool might_dump; +/* True means Emacs has already been initialized. + Used during startup to detect startup of dumped Emacs. */ +extern bool initialized; + +/* Defined in eval.c. */ +extern Lisp_Object Qautoload; + +/* Defined in floatfns.c. */ +extern double extract_float (Lisp_Object); + +/* Defined in process.c. */ +extern Lisp_Object Qprocessp; + +/* Defined in window.c. */ +extern Lisp_Object Qwindowp; + +/* Defined in xdisp.c. */ +extern Lisp_Object Qimage; +extern Lisp_Object Qfontification_functions; + /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. At the machine level, these operations are no-ops. */ LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) @@ -673,13 +740,18 @@ LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) INLINE Lisp_Object make_number (EMACS_INT n) { + EMACS_INT int0 = Lisp_Int0; if (USE_LSB_TAG) { EMACS_UINT u = n; n = u << INTTYPEBITS; + n += int0; } else - n &= INTMASK; + { + n &= INTMASK; + n += (int0 << VALBITS); + } return XIL (n); } @@ -702,7 +774,8 @@ XINT (Lisp_Object a) INLINE EMACS_INT XFASTINT (Lisp_Object a) { - EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a); + EMACS_INT int0 = Lisp_Int0; + EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a) - (int0 << VALBITS); eassert (0 <= n); return n; } @@ -747,7 +820,8 @@ INLINE Lisp_Object make_natnum (EMACS_INT n) { eassert (0 <= n && n <= MOST_POSITIVE_FIXNUM); - return USE_LSB_TAG ? make_number (n) : XIL (n); + EMACS_INT int0 = Lisp_Int0; + return USE_LSB_TAG ? make_number (n) : XIL (n + (int0 << VALBITS)); } /* Return true if X and Y are the same object. */ @@ -766,72 +840,6 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) return num < lower ? lower : num <= upper ? num : upper; } -/* Forward declarations. */ - -/* Defined in this file. */ -union Lisp_Fwd; -INLINE bool BOOL_VECTOR_P (Lisp_Object); -INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *); -INLINE bool BUFFERP (Lisp_Object); -INLINE bool CHAR_TABLE_P (Lisp_Object); -INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t); -INLINE bool (CONSP) (Lisp_Object); -INLINE bool (FLOATP) (Lisp_Object); -INLINE bool functionp (Lisp_Object); -INLINE bool (INTEGERP) (Lisp_Object); -INLINE bool (MARKERP) (Lisp_Object); -INLINE bool (MISCP) (Lisp_Object); -INLINE bool (NILP) (Lisp_Object); -INLINE bool OVERLAYP (Lisp_Object); -INLINE bool PROCESSP (Lisp_Object); -INLINE bool PSEUDOVECTORP (Lisp_Object, int); -INLINE bool SAVE_VALUEP (Lisp_Object); -INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, - Lisp_Object); -INLINE bool STRINGP (Lisp_Object); -INLINE bool SUB_CHAR_TABLE_P (Lisp_Object); -INLINE bool SUBRP (Lisp_Object); -INLINE bool (SYMBOLP) (Lisp_Object); -INLINE bool (VECTORLIKEP) (Lisp_Object); -INLINE bool WINDOWP (Lisp_Object); -INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); - -/* Defined in chartab.c. */ -extern Lisp_Object char_table_ref (Lisp_Object, int); -extern void char_table_set (Lisp_Object, int, Lisp_Object); - -/* Defined in data.c. */ -extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p; -extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; -extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp; -extern Lisp_Object Qbool_vector_p; -extern Lisp_Object Qvector_or_char_table_p, Qwholenump; -extern Lisp_Object Qwindow; -extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); -extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); - -/* Defined in emacs.c. */ -extern bool might_dump; -/* True means Emacs has already been initialized. - Used during startup to detect startup of dumped Emacs. */ -extern bool initialized; - -/* Defined in eval.c. */ -extern Lisp_Object Qautoload; - -/* Defined in floatfns.c. */ -extern double extract_float (Lisp_Object); - -/* Defined in process.c. */ -extern Lisp_Object Qprocessp; - -/* Defined in window.c. */ -extern Lisp_Object Qwindowp; - -/* Defined in xdisp.c. */ -extern Lisp_Object Qimage; -extern Lisp_Object Qfontification_functions; - /* Extract a value or address from a Lisp_Object. */ diff --git a/src/nsfns.m b/src/nsfns.m index a5ff634..578ec12 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -2971,8 +2971,7 @@ handlePanelKeys (NSSavePanel *panel, NSEvent *theEvent) void syms_of_nsfns (void) { - Qfontsize = intern_c_string ("fontsize"); - staticpro (&Qfontsize); + DEFSYM (Qfontsize, "fontsize"); DEFVAR_LISP ("ns-icon-type-alist", Vns_icon_type_alist, doc: /* Alist of elements (REGEXP . IMAGE) for images of icons associated to frames. diff --git a/src/nsmenu.m b/src/nsmenu.m index 0e8b68b..ffd1e4d 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1876,6 +1876,5 @@ syms_of_nsmenu (void) defsubr (&Sns_reset_menu); defsubr (&Smenu_or_popup_active_p); - Qdebug_on_next_call = intern_c_string ("debug-on-next-call"); - staticpro (&Qdebug_on_next_call); + DEFSYM (Qdebug_on_next_call, "debug-on-next-call"); } diff --git a/src/nsselect.m b/src/nsselect.m index bcf2ac1..3b33a97 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -504,10 +504,10 @@ nxatoms_of_nsselect (void) void syms_of_nsselect (void) { - QCLIPBOARD = intern_c_string ("CLIPBOARD"); staticpro (&QCLIPBOARD); - QSECONDARY = intern_c_string ("SECONDARY"); staticpro (&QSECONDARY); - QTEXT = intern_c_string ("TEXT"); staticpro (&QTEXT); - QFILE_NAME = intern_c_string ("FILE_NAME"); staticpro (&QFILE_NAME); + DEFSYM (QCLIPBOARD, "CLIPBOARD"); + DEFSYM (QSECONDARY, "SECONDARY"); + DEFSYM (QTEXT, "TEXT"); + DEFSYM (QFILE_NAME, "FILE_NAME"); defsubr (&Sns_disown_selection_internal); defsubr (&Sns_get_selection); commit 83299b940dd211f4e142d754b93ea592e9f67974 Author: Katsumi Yamaoka Date: Thu Dec 18 22:50:29 2014 +0000 lisp/gnus/registry.el: Fix comment diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el index cc18407..69f5058 100644 --- a/lisp/gnus/registry.el +++ b/lisp/gnus/registry.el @@ -27,7 +27,7 @@ ;; version: a float -;; max-size: an integer, default 50000 +;; max-size: an integer, default most-positive-fixnum ;; prune-factor: a float between 0 and 1, default 0.1 commit d9639a28cf54358b6ae9432226ced3a5b59cca7c Author: Paul Eggert Date: Thu Dec 18 14:32:06 2014 -0800 * gnutls.c: Include gnutls.h. This to check syms_of_gnutls's API even when !HAVE_GNUTLS. diff --git a/src/ChangeLog b/src/ChangeLog index 3ec4506..359dca9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2014-12-18 Paul Eggert + * gnutls.c: Include gnutls.h. + This to check syms_of_gnutls's API even when !HAVE_GNUTLS. * image.c (svg_load): Fix pointer signedness. 2014-12-18 Martin Rudalics diff --git a/src/gnutls.c b/src/gnutls.c index 1feb7e1..bf9f132 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "process.h" +#include "gnutls.h" #include "coding.h" #ifdef HAVE_GNUTLS commit 87f9ec7afb1180d6dc1ef65134f59cddddda1d68 Author: Sam Steingold Date: Thu Dec 18 16:41:34 2014 -0500 Keyboard interface (C-f10) to `mouse-buffer-menu' (C-down-mouse-1). * lisp/mouse.el (mouse-buffer-menu-map): Extract from `mouse-buffer-menu'. (mouse-buffer-menu): Use `mouse-buffer-menu-map'. * lisp/menu-bar.el (menu-bar-buffer-vector): Extract from `menu-bar-update-buffers'. (menu-bar-update-buffers): Use `menu-bar-buffer-vector'. (buffer-menu-open): New user command, bound globally to C-f10, provides a keyboard interface to `mouse-buffer-menu' (C-down-mouse-1). (mouse-buffer-menu-keymap): Use `menu-bar-buffer-vector' to convert the value returned by `mouse-buffer-menu-map' to a list acceptable to `popup-menu' for `buffer-menu-open'. diff --git a/etc/NEWS b/etc/NEWS index 3880fd1..1358eaf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -183,6 +183,8 @@ for Unicode 8.0. This includes full support for directional isolates and the Bidirectional Parentheses Algorithm (BPA) specified by these Unicode standards. +** You can access `mouse-buffer-menu' (C-down-mouse-1) using C-f10. + * Changes in Specialized Modes and Packages in Emacs 25.1 ** ido diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9828b84..b50d584 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2014-12-18 Sam Steingold + + Keyboard interface (C-f10) to `mouse-buffer-menu' (C-down-mouse-1). + * mouse.el (mouse-buffer-menu-map): Extract from `mouse-buffer-menu'. + (mouse-buffer-menu): Use `mouse-buffer-menu-map'. + * menu-bar.el (menu-bar-buffer-vector): Extract from + `menu-bar-update-buffers'. + (menu-bar-update-buffers): Use `menu-bar-buffer-vector'. + (buffer-menu-open): New user command, bound globally to C-f10, + provides a keyboard interface to `mouse-buffer-menu' (C-down-mouse-1). + (mouse-buffer-menu-keymap): Use `menu-bar-buffer-vector' to + convert the value returned by `mouse-buffer-menu-map' to a list + acceptable to `popup-menu' for `buffer-menu-open'. + 2014-12-18 Artur Malabarba * let-alist.el (let-alist): Evaluate the `alist' argument only diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 12fb192..8f33641 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1938,6 +1938,19 @@ Buffers menu is regenerated." "Function to select the buffer chosen from the `Buffers' menu-bar menu. It must accept a buffer as its only required argument.") +(defun menu-bar-buffer-vector (alist) + ;; turn ((name . buffer) ...) into a menu + (let ((buffers-vec (make-vector (length alist) nil)) + (i (length alist))) + (dolist (pair alist) + (setq i (1- i)) + (aset buffers-vec i + (cons (car pair) + `(lambda () + (interactive) + (funcall menu-bar-select-buffer-function ,(cdr pair)))))) + buffers-vec)) + (defun menu-bar-update-buffers (&optional force) ;; If user discards the Buffers item, play along. (and (lookup-key (current-global-map) [menu-bar buffer]) @@ -1973,17 +1986,7 @@ It must accept a buffer as its only required argument.") name) )) alist)))) - ;; Now make the actual list of items. - (let ((buffers-vec (make-vector (length alist) nil)) - (i (length alist))) - (dolist (pair alist) - (setq i (1- i)) - (aset buffers-vec i - (cons (car pair) - `(lambda () - (interactive) - (funcall menu-bar-select-buffer-function ,(cdr pair)))))) - (list buffers-vec)))) + (list (menu-bar-buffer-vector alist)))) ;; Make a Frames menu if we have more than one frame. (when (cdr frames) @@ -2311,6 +2314,25 @@ If FRAME is nil or not given, use the selected frame." (global-set-key [f10] 'menu-bar-open) +(defun buffer-menu-open () + "Start key navigation of the buffer menu. +This is the keyboard interface to \\[mouse-buffer-menu]." + (interactive) + (popup-menu (mouse-buffer-menu-keymap) + (posn-at-x-y 0 0 nil t))) + +(global-set-key [C-f10] 'buffer-menu-open) + +(defun mouse-buffer-menu-keymap () + (let* ((menu (mouse-buffer-menu-map)) + (km (make-sparse-keymap (pop menu)))) + (dolist (item (nreverse menu)) + (let* ((name (pop item))) + (define-key km (vector (intern name)) + (list name 'keymap name + (menu-bar-buffer-vector item))))) + km)) + (defvar tty-menu-navigation-map (let ((map (make-sparse-keymap))) ;; The next line is disabled because it breaks interpretation of diff --git a/lisp/mouse.el b/lisp/mouse.el index 800db63..6e86bc0 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1516,8 +1516,17 @@ This switches buffers in the window that you clicked on, and selects that window." (interactive "e") (mouse-minibuffer-check event) - (let ((buffers (buffer-list)) alist menu split-by-major-mode sum-of-squares) - ;; Make an alist of elements that look like (MENU-ITEM . BUFFER). + (let ((buf (x-popup-menu event (mouse-buffer-menu-map))) + (window (posn-window (event-start event)))) + (when buf + (select-window + (if (framep window) (frame-selected-window window) + window)) + (switch-to-buffer buf)))) + +(defun mouse-buffer-menu-map () + ;; Make an alist of elements that look like (MENU-ITEM . BUFFER). + (let ((buffers (buffer-list)) split-by-major-mode sum-of-squares) (dolist (buf buffers) ;; Divide all buffers into buckets for various major modes. ;; Each bucket looks like (MODE NAMESTRING BUFFERS...). @@ -1581,18 +1590,10 @@ and selects that window." (setq subdivided-menus (cons (cons "Others" others-list) subdivided-menus))))) - (setq menu (cons "Buffer Menu" (nreverse subdivided-menus)))) - (progn - (setq alist (mouse-buffer-menu-alist buffers)) - (setq menu (cons "Buffer Menu" - (mouse-buffer-menu-split "Select Buffer" alist))))) - (let ((buf (x-popup-menu event menu)) - (window (posn-window (event-start event)))) - (when buf - (select-window - (if (framep window) (frame-selected-window window) - window)) - (switch-to-buffer buf))))) + (cons "Buffer Menu" (nreverse subdivided-menus))) + (cons "Buffer Menu" + (mouse-buffer-menu-split "Select Buffer" + (mouse-buffer-menu-alist buffers)))))) (defun mouse-buffer-menu-alist (buffers) (let (tail commit 645a6aa4a5ee66659133f57ebeb5638bdc43beaa Author: Artur Malabarba Date: Thu Dec 18 19:37:15 2014 -0200 * automated/let-alist.el: New file. diff --git a/test/ChangeLog b/test/ChangeLog index 86703d5..8ddd80f 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2014-12-18 Artur Malabarba + + * automated/let-alist.el: New file. + 2014-12-16 Nicolas Petton * automated/seq-tests.el: New file. diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el new file mode 100644 index 0000000..2054a96 --- /dev/null +++ b/test/automated/let-alist.el @@ -0,0 +1,52 @@ +;;; let-alist.el --- tests for file handling. -*- lexical-binding: t; -*- + +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. + +;; 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 . + +;;; Code: + +(require 'ert) + +(ert-deftest let-alist-surface-test () + "Tests basic macro expansion for `let-alist'." + (should + (equal '(let ((symbol data)) + (let ((.test-one (cdr (assq 'test-one symbol))) + (.test-two (cdr (assq 'test-two symbol)))) + (list .test-one .test-two + .test-two .test-two))) + (cl-letf (((symbol-function #'gensym) (lambda (x) 'symbol))) + (macroexpand + '(let-alist data (list .test-one .test-two + .test-two .test-two))))))) + +(defvar let-alist--test-counter 0 + "Used to count number of times a function is called.") + +(ert-deftest let-alist-evaluate-once () + "Check that the alist argument is only evaluated once." + (let ((let-alist--test-counter 0)) + (should + (equal + (let-alist (list + (cons 'test-two (cl-incf let-alist--test-counter)) + (cons 'test-three (cl-incf let-alist--test-counter))) + (list .test-one .test-two .test-two .test-three .cl-incf)) + '(nil 1 1 2 nil))))) + + +;;; let-alist.el ends here commit d8183f8fef11d654d0aae2b24eddcdfad6d63164 Author: Paul Eggert Date: Thu Dec 18 13:16:16 2014 -0800 * image.c (svg_load): Fix pointer signedness. diff --git a/src/ChangeLog b/src/ChangeLog index 6fabfb4..3ec4506 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-12-18 Paul Eggert + + * image.c (svg_load): Fix pointer signedness. + 2014-12-18 Martin Rudalics * frame.c (frame_windows_min_size): New argument IGNORE. diff --git a/src/image.c b/src/image.c index ceec3ce..a73a725 100644 --- a/src/image.c +++ b/src/image.c @@ -8601,7 +8601,7 @@ static bool svg_image_p (Lisp_Object object); static bool svg_load (struct frame *f, struct image *img); static bool svg_load_image (struct frame *, struct image *, - unsigned char *, ptrdiff_t, char*); + unsigned char *, ptrdiff_t, char *); /* The symbol `svg' identifying images of this type. */ @@ -8807,7 +8807,7 @@ svg_load (struct frame *f, struct image *img) return 0; } /* If the file was slurped into memory properly, parse it. */ - success_p = svg_load_image (f, img, contents, size, SSDATA(file)); + success_p = svg_load_image (f, img, contents, size, SSDATA (file)); xfree (contents); } /* Else its not a file, its a lisp object. Load the image from a @@ -8824,8 +8824,8 @@ svg_load (struct frame *f, struct image *img) } original_filename = BVAR (current_buffer, filename); success_p = svg_load_image (f, img, SDATA (data), SBYTES (data), - NILP(original_filename) ? - NULL : SDATA(original_filename)); + (NILP (original_filename) ? NULL + : SSDATA (original_filename))); } return success_p; @@ -8843,7 +8843,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * struct image *img, /* Pointer to emacs image structure. */ unsigned char *contents, /* String containing the SVG XML data to be parsed. */ ptrdiff_t size, /* Size of data in bytes. */ - char *filename) /* Name of SVG file being loaded. */ + char *filename) /* Name of SVG file being loaded. */ { RsvgHandle *rsvg_handle; RsvgDimensionData dimension_data; commit 22e37afd18bd35d5ecd41189232aa2281d1d1bf5 Author: Artur Malabarba Date: Thu Dec 18 18:59:23 2014 -0200 lisp/let-alist.el (let-alist): Fix wrong parenthesis. diff --git a/lisp/let-alist.el b/lisp/let-alist.el index 8f02404..813b841 100644 --- a/lisp/let-alist.el +++ b/lisp/let-alist.el @@ -70,7 +70,7 @@ symbol, and each cdr is the same symbol without the `.'." (list (cons data (intern (replace-match "" nil nil name))))))) ((not (listp data)) nil) (t (apply #'append - (remove nil (mapcar #'let-alist--deep-dot-search data)))))) + (mapcar #'let-alist--deep-dot-search data))))) ;;;###autoload (defmacro let-alist (alist &rest body) @@ -95,10 +95,10 @@ expands to .site))" (declare (indent 1) (debug t)) (let ((var (gensym "let-alist"))) - `(let ((,var ,alist) - (let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,var)))) - (delete-dups (let-alist--deep-dot-search body))) - ,@body))))) + `(let ((,var ,alist)) + (let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,var)))) + (delete-dups (let-alist--deep-dot-search body))) + ,@body)))) (provide 'let-alist) commit 777c8235f118fa9aec2465b61cca0bdc220fd419 Author: Paul Eggert Date: Thu Dec 18 13:00:15 2014 -0800 * registry.el (registry-db): Set default slot later. This is because its value is not a literal integer. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 34dd919..6f0ea0f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2014-12-18 Paul Eggert + + * registry.el (registry-db): Set default slot later. + This is because its value is not a literal integer. + 2014-12-18 Stefan Monnier * mm-util.el (mm-with-unibyte-current-buffer): Mark obsolete and diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el index d086d64..cc18407 100644 --- a/lisp/gnus/registry.el +++ b/lisp/gnus/registry.el @@ -98,7 +98,7 @@ :type (or null float) :documentation "The registry version.") (max-size :initarg :max-size - :initform most-positive-fixnum + ;; :initform most-positive-fixnum ;; see below :type integer :custom integer :documentation "The maximum number of registry entries.") @@ -123,6 +123,8 @@ (data :initarg :data :type hash-table :documentation "The data hashtable."))) +;; Do this separately, since defclass doesn't allow expressions in :initform. +(oset-default registry-db max-size most-positive-fixnum) (defmethod initialize-instance :BEFORE ((this registry-db) slots) "Check whether a registry object needs to be upgraded." commit 17589518728e247e7574e9b61502c3ff5cf9dc67 Author: Artur Malabarba Date: Thu Dec 18 18:32:56 2014 -0200 lisp/let-alist.el (let-alist): Evaluate `alist' only once. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8978bde..9828b84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-18 Artur Malabarba + + * let-alist.el (let-alist): Evaluate the `alist' argument only + once. + 2014-12-18 Sam Steingold * emacs-lisp/package.el: Avoid compilation warning by declaring diff --git a/lisp/let-alist.el b/lisp/let-alist.el index 2efa027..8f02404 100644 --- a/lisp/let-alist.el +++ b/lisp/let-alist.el @@ -94,9 +94,11 @@ expands to .body .site))" (declare (indent 1) (debug t)) - `(let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,alist)))) - (delete-dups (let-alist--deep-dot-search body))) - ,@body)) + (let ((var (gensym "let-alist"))) + `(let ((,var ,alist) + (let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,var)))) + (delete-dups (let-alist--deep-dot-search body))) + ,@body))))) (provide 'let-alist) commit f87eff571ab7ca477e4b8ccb68a2eb306426f11e Author: Sam Steingold Date: Thu Dec 18 15:24:39 2014 -0500 Fix the `with-demoted-errors' calls * lisp/emacs-lisp/package.el (package-activate-1): Fix the `with-demoted-errors' calls: the first argument must be a string literal. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d1d866b..8978bde 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * emacs-lisp/package.el: Avoid compilation warning by declaring the `find-library-name' function. + (package-activate-1): Fix the `with-demoted-errors' calls: + the first argument must be a string literal. 2014-12-18 Martin Rudalics diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c25c29a..80b7670 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -532,7 +532,7 @@ correspond to previously loaded files (those returned by (autoloads-file (expand-file-name (format "%s-autoloads" name) pkg-dir)) (loaded-files-list (and reload (package--list-loaded-files pkg-dir)))) - (with-demoted-errors (format "Error loading %s: %%s" name) + (with-demoted-errors "Error in package-activate-1: %s" (load autoloads-file nil t)) (when (and (eq old-lp load-path) (not (or (member pkg-dir load-path) @@ -545,7 +545,7 @@ correspond to previously loaded files (those returned by ;; to their new definitions. If another package is being installed which ;; depends on this new definition, not doing this update would cause ;; compilation errors and break the installation. - (with-demoted-errors (format "Error loading %s: %%s" name) + (with-demoted-errors "Error in package-activate-1: %s" (mapc (lambda (feature) (load feature nil t)) ;; Skip autoloads file since we already evaluated it above. (remove (file-truename autoloads-file) loaded-files-list)))) commit 0f765f454dd4278a529e247598a3da50f551cf0c Author: Sam Steingold Date: Thu Dec 18 15:23:15 2014 -0500 Avoid a compilation warning * lisp/emacs-lisp/package.el: Avoid a compilation warning by declaring the `find-library-name' function. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6027cd1..d1d866b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-18 Sam Steingold + + * emacs-lisp/package.el: Avoid compilation warning by declaring + the `find-library-name' function. + 2014-12-18 Martin Rudalics Add code for "preserving" window sizes. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 11333ec..c25c29a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -559,6 +559,7 @@ correspond to previously loaded files (those returned by ;; Don't return nil. t)) +(declare-function find-library-name "find-func" (library)) (defun package--list-loaded-files (dir) "Recursively list all files in DIR which correspond to loaded features. Returns the `file-name-sans-extension' of each file, relative to commit 8f03888e7f2d86970abb638b6e6456610fed6067 Author: Stefan Monnier Date: Thu Dec 18 13:19:54 2014 -0500 * lisp/gnus/gnus-art.el: Fix up compiler warnings. (article-display-face, article-display-x-face): Remove unused `face'. (gnus-article-browse-html-save-cid-content): Remove unused var `type'. (article-date-ut): Remove unused var `first'. (gnus-article-prepare): Remove unused var `gnus-article'. (gnus-mime-save-part-and-strip): Remove unused var `param'. (gnus-mime-inline-part): Remove unused vars `charset', `contents', and `coding-system' along with corresponding dead code. (gnus-mime-view-part-externally): Remove unused var `mm-user-display-methods'. (gnus-insert-mime-button): Let-bind gnus-tmp-id explicitly. (gnus-display-mime): Remove unused var `handle'. (gnus-mime-display-alternative): Remove unused var `props'. (gnus-article-read-summary-keys): Remove unused var `up-to-top'. (gnus-article-edit-done): Remove unused var `p'. (gnus-url-mailto): Remove unused var `to'. (gnus-treat-article): Let-bind gnus-treat-condition, part-number, total-parts, and gnus-treat-type explicitly. Remove unused var `elem'. * lisp/gnus/mm-util.el (mm-with-unibyte-current-buffer): Mark obsolete and add warning. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5f0ed9d..34dd919 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,27 @@ +2014-12-18 Stefan Monnier + + * mm-util.el (mm-with-unibyte-current-buffer): Mark obsolete and + add warning. + + * gnus-art.el: Fix up compiler warnings. + (article-display-face, article-display-x-face): Remove unused `face'. + (gnus-article-browse-html-save-cid-content): Remove unused var `type'. + (article-date-ut): Remove unused var `first'. + (gnus-article-prepare): Remove unused var `gnus-article'. + (gnus-mime-save-part-and-strip): Remove unused var `param'. + (gnus-mime-inline-part): Remove unused vars `charset', `contents', and + `coding-system' along with corresponding dead code. + (gnus-mime-view-part-externally): Remove unused var + `mm-user-display-methods'. + (gnus-insert-mime-button): Let-bind gnus-tmp-id explicitly. + (gnus-display-mime): Remove unused var `handle'. + (gnus-mime-display-alternative): Remove unused var `props'. + (gnus-article-read-summary-keys): Remove unused var `up-to-top'. + (gnus-article-edit-done): Remove unused var `p'. + (gnus-url-mailto): Remove unused var `to'. + (gnus-treat-article): Let-bind gnus-treat-condition, part-number, + total-parts, and gnus-treat-type explicitly. Remove unused var `elem'. + 2014-12-18 Eric Abrahamsen * registry.el (registry-db): Consolidate the :max-hard and :max-soft diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 53da05e..e63737f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1626,6 +1626,8 @@ It is a string, such as \"PGP\". If nil, ask user." :type 'string :group 'mime-security) +(defvar idna-program) + (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) (mm-coding-system-p 'utf-8) idna-program @@ -1841,7 +1843,7 @@ Initialized from `text-mode-syntax-table.") (incf i))) i)) -(defun article-hide-headers (&optional arg delete) +(defun article-hide-headers (&optional _arg _delete) "Hide unwanted headers and possibly sort them as well." (interactive) ;; This function might be inhibited. @@ -2411,7 +2413,7 @@ long lines if and only if arg is positive." (if (and wash-face-p (memq 'face gnus-article-wash-types)) (gnus-delete-images 'face) (let ((from (message-fetch-field "from")) - face faces) + faces) (save-current-buffer (when (and wash-face-p (gnus-buffer-live-p gnus-original-article-buffer) @@ -2461,7 +2463,7 @@ long lines if and only if arg is positive." (gnus-delete-images 'xface) ;; Display X-Faces. (let ((from (message-fetch-field "from")) - x-faces face) + x-faces) (save-current-buffer (when (and wash-face-p (gnus-buffer-live-p gnus-original-article-buffer) @@ -2794,7 +2796,7 @@ summary buffer." "Find CID content in HANDLES and save it in a file in DIRECTORY. Return file name." (save-match-data - (let (file type) + (let (file) (catch 'found (dolist (handle handles) (cond @@ -3396,7 +3398,7 @@ means show, 0 means toggle." 'hidden nil))) -(defun gnus-article-show-hidden-text (type &optional dummy) +(defun gnus-article-show-hidden-text (type &optional _dummy) "Show all hidden text of type TYPE. Originally it is hide instead of DUMMY." (let ((inhibit-read-only t) @@ -3435,7 +3437,7 @@ lines forward." gnus-article-date-headers) t)) -(defun article-date-ut (&optional type highlight date-position) +(defun article-date-ut (&optional type _highlight date-position) "Convert DATE date to TYPE in the current article. The default type is `ut'. See `gnus-article-date-headers' for possible values." @@ -3443,7 +3445,6 @@ possible values." (let* ((case-fold-search t) (inhibit-read-only t) (inhibit-point-motion-hooks t) - (first t) (visible-date (mail-fetch-field "Date")) pos date bface eface) (save-excursion @@ -3982,7 +3983,7 @@ This format is defined by the `gnus-article-time-format' variable." (set dir-var (file-name-directory result))) result)) -(defun gnus-article-archive-name (group) +(defun gnus-article-archive-name (_group) "Return the first instance of an \"Archive-name\" in the current buffer." (let ((case-fold-search t)) (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) @@ -4214,7 +4215,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is default (or last-file default)))) -(defun gnus-plain-save-name (newsgroup headers &optional last-file) +(defun gnus-plain-save-name (newsgroup _headers &optional last-file) "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. If variable `gnus-use-long-file-name' is non-nil, it is ~/News/news.group. Otherwise, it is like ~/News/news/group/news." @@ -4227,7 +4228,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is default-directory)) gnus-article-save-directory))) -(defun gnus-sender-save-name (newsgroup headers &optional last-file) +(defun gnus-sender-save-name (_newsgroup headers &optional _last-file) "Generate file name from sender." (let ((from (mail-header-from headers))) (expand-file-name @@ -4424,6 +4425,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is (substitute-key-definition 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) +(defvar gnus-article-send-map) + (gnus-define-keys (gnus-article-send-map "S" gnus-article-mode-map) "W" gnus-article-wide-reply-with-original) (if (featurep 'xemacs) @@ -4607,18 +4610,19 @@ commands: (forward-line line) (point))))))) -(defun gnus-article-prepare (article &optional all-headers header) +(defvar gnus-tmp-internal-hook) + +(defun gnus-article-prepare (article &optional all-headers _header) "Prepare ARTICLE in article mode buffer. ARTICLE should either be an article number or a Message-ID. If ARTICLE is an id, HEADER should be the article headers. If ALL-HEADERS is non-nil, no headers are hidden." - (save-excursion + (save-excursion ;FIXME: Shouldn't that be save-current-buffer? ;; Make sure we start in a summary buffer. (unless (derived-mode-p 'gnus-summary-mode) (set-buffer gnus-summary-buffer)) (setq gnus-summary-buffer (current-buffer)) - (let* ((gnus-article (if header (mail-header-number header) article)) - (summary-buffer (current-buffer)) + (let* ((summary-buffer (current-buffer)) (gnus-tmp-internal-hook gnus-article-internal-prepare-hook) (group gnus-newsgroup-name) result) @@ -4717,6 +4721,8 @@ If ALL-HEADERS is non-nil, no headers are hidden." (gnus-run-hooks 'gnus-article-prepare-hook) t)))))) +(defvar gnus-mime-display-attachment-buttons-in-header) + ;;;###autoload (defun gnus-article-prepare-display () "Make the current buffer look like a nice article." @@ -4840,6 +4846,16 @@ Valid specifiers include: General format specifiers can also be used. See Info node `(gnus)Formatting Variables'.") +(defvar gnus-tmp-type) +(defvar gnus-tmp-type-long) +(defvar gnus-tmp-name) +(defvar gnus-tmp-description) +(defvar gnus-tmp-id) +(defvar gnus-tmp-length) +(defvar gnus-tmp-dots) +(defvar gnus-tmp-info) +(defvar gnus-tmp-pressed-details) + (defvar gnus-mime-button-line-format-alist '((?t gnus-tmp-type ?s) (?T gnus-tmp-type-long ?s) @@ -5066,7 +5082,6 @@ If FILE is given, use it for the external part." The current article has a complicated MIME structure, giving up...")) (let* ((data (get-text-property (point) 'gnus-data)) (id (get-text-property (point) 'gnus-part)) - param (handles gnus-article-mime-handles)) (unless file (setq file @@ -5324,7 +5339,7 @@ Compressed files like .gz and .bz2 are decompressed." (text-property-any (point-min) (point) 'gnus-data handle))) (setq handle (get-text-property b 'gnus-data)) b)) - start contents charset coding-system) + start) (when handle (when (= b (prog1 btn @@ -5335,27 +5350,11 @@ Compressed files like .gz and .bz2 are decompressed." (setq b btn)) (if (and (not arg) (mm-handle-undisplayer handle)) (mm-remove-part handle) - (mm-with-unibyte-buffer - (mm-insert-part handle) - (setq contents - (or (mm-decompress-buffer (mm-handle-filename handle) nil t) - (buffer-string)))) (cond - ((not arg) - (unless (setq charset (mail-content-type-get - (mm-handle-type handle) 'charset)) - (unless (setq coding-system - (mm-with-unibyte-buffer - (insert contents) - (mm-find-buffer-file-coding-system))) - (setq charset gnus-newsgroup-charset)))) + ((not arg) nil) ((numberp arg) (if (mm-handle-undisplayer handle) - (mm-remove-part handle)) - (setq charset - (or (cdr (assq arg - gnus-summary-show-article-charset-alist)) - (mm-read-coding-system "Charset: ")))) + (mm-remove-part handle))) ((mm-handle-undisplayer handle) (mm-remove-part handle))) (goto-char start) @@ -5465,7 +5464,6 @@ specified charset." (interactive) (gnus-article-check-buffer) (let* ((handle (or handle (get-text-property (point) 'gnus-data))) - (mm-user-display-methods nil) (mm-inlined-types nil) (mail-parse-charset gnus-newsgroup-charset) (mail-parse-ignored-charsets @@ -5833,11 +5831,12 @@ all parts." (when gnus-break-pages (gnus-narrow-to-page)))) -(defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) +(defun gnus-insert-mime-button (handle id &optional displayed) (let ((gnus-tmp-name (or (mm-handle-filename handle) (mail-content-type-get (mm-handle-type handle) 'url) "")) + (gnus-tmp-id id) (gnus-tmp-type (mm-handle-media-type handle)) (gnus-tmp-description (or (mm-handle-description handle) "")) (gnus-tmp-dots @@ -5888,7 +5887,7 @@ all parts." "hide" "show") (aref gnus-down-mouse-3 0)))))) -(defun gnus-widget-press-button (elems el) +(defun gnus-widget-press-button (elems _el) (goto-char (widget-get elems :from)) (gnus-article-press-button)) @@ -5906,8 +5905,7 @@ all parts." ;; may change the point. So we set the window point. (set-window-point window point))) (let ((handles ihandles) - (inhibit-read-only t) - handle) + (inhibit-read-only t)) (cond (handles) ((setq handles (mm-dissect-buffer nil gnus-article-loose-mime)) (when gnus-article-emulate-mime @@ -6139,7 +6137,7 @@ If nil, don't show those extra buttons." (let* ((preferred (or preferred (mm-preferred-alternative handles))) (ihandles handles) (point (point)) - handle (inhibit-read-only t) from props begend not-pref) + handle (inhibit-read-only t) from begend not-pref) (save-window-excursion (save-restriction (when ibegend @@ -6626,6 +6624,8 @@ specifies." (if header-line-format 1 0) 2))))))) +(defvar scroll-in-place) + (defun gnus-article-next-page-1 (lines) (condition-case () (let ((scroll-in-place nil) @@ -6713,7 +6713,9 @@ not have a face in `gnus-article-boring-faces'." (unless (derived-mode-p 'gnus-article-mode) (error "Command invoked outside of a Gnus article buffer"))) -(defun gnus-article-read-summary-keys (&optional arg key not-restore-window) +(defvar gnus-pick-mode) + +(defun gnus-article-read-summary-keys (&optional _arg key not-restore-window) "Read a summary buffer key sequence and execute it from the article buffer." (interactive "P") (gnus-article-check-buffer) @@ -6726,8 +6728,6 @@ not have a face in `gnus-article-boring-faces'." "An" "Ap" [?A (meta return)] [?A delete])) (nosave-in-article '("AS" "\C-d")) - (up-to-top - '("n" "Gn" "p" "Gp")) keys new-sum-point) (with-current-buffer gnus-article-current-summary (let (gnus-pick-mode) @@ -6886,6 +6886,7 @@ KEY is a string or a vector." (defvar gnus-agent-summary-mode) (defvar gnus-draft-mode) (defvar help-xref-stack-item) +(defvar help-xref-following) (defun gnus-article-describe-bindings (&optional prefix) "Show a list of all defined keys, and their definitions. @@ -7330,7 +7331,6 @@ groups." (let ((func gnus-article-edit-done-function) (buf (current-buffer)) (start (window-start)) - (p (point)) (winconf gnus-prev-winconf)) (widen) ;; Widen it in case that users narrowed the buffer. (funcall func arg) @@ -7959,7 +7959,7 @@ do the highlighting. See the documentation for those functions." (gnus-article-add-buttons) (gnus-article-add-buttons-to-head)) -(defun gnus-article-highlight-some (&optional force) +(defun gnus-article-highlight-some (&optional _force) "Highlight current article. This function calls `gnus-article-highlight-headers', `gnus-article-highlight-signature', and `gnus-article-add-buttons' to @@ -8262,9 +8262,11 @@ url is put as the `gnus-button-url' overlay property on the button." (error "Unknown news URL syntax")))) (list scheme server port group message-id articles))) +(defvar nntp-port-number) + (defun gnus-button-handle-news (url) "Fetch a news URL." - (destructuring-bind (scheme server port group message-id articles) + (destructuring-bind (_scheme server port group message-id _articles) (gnus-parse-news-url url) (cond (message-id @@ -8386,7 +8388,7 @@ url is put as the `gnus-button-url' overlay property on the button." (with-current-buffer gnus-summary-buffer (gnus-summary-refer-article message-id))) -(defun gnus-button-fetch-group (address &rest ignore) +(defun gnus-button-fetch-group (address &rest _ignore) "Fetch GROUP specified by ADDRESS." (when (string-match "\\`\\(nntp\\|news\\):\\(//\\)?\\(.*\\)\\'" address) @@ -8434,15 +8436,15 @@ url is put as the `gnus-button-url' overlay property on the button." (setq url (replace-regexp-in-string "\n" " " url)) (when (string-match "mailto:/*\\(.*\\)" url) (setq url (substring url (match-beginning 1) nil))) - (let (to args subject func) - (setq args (gnus-url-parse-query-string + (let* ((args (gnus-url-parse-query-string (if (string-match "^\\?" url) (substring url 1) (if (string-match "^\\([^?]+\\)\\?\\(.*\\)" url) (concat "to=" (match-string 1 url) "&" (match-string 2 url)) - (concat "to=" url)))) - subject (cdr-safe (assoc "subject" args))) + (concat "to=" url))))) + (subject (cdr-safe (assoc "subject" args))) + func) (gnus-msg-mail) (while args (setq func (intern-soft (concat "message-goto-" (downcase (caar args))))) @@ -8499,7 +8501,7 @@ url is put as the `gnus-button-url' overlay property on the button." :action 'gnus-button-prev-page :button-keymap gnus-prev-page-map))) -(defun gnus-button-next-page (&optional args more-args) +(defun gnus-button-next-page (&optional _args _more-args) "Go to the next page." (interactive) (let ((win (selected-window))) @@ -8507,7 +8509,7 @@ url is put as the `gnus-button-url' overlay property on the button." (gnus-article-next-page) (select-window win))) -(defun gnus-button-prev-page (&optional args more-args) +(defun gnus-button-prev-page (&optional _args _more-args) "Go to the prev page." (interactive) (let ((win (selected-window))) @@ -8535,7 +8537,7 @@ url is put as the `gnus-button-url' overlay property on the button." :action 'gnus-button-next-page :button-keymap gnus-next-page-map))) -(defun gnus-article-button-next-page (arg) +(defun gnus-article-button-next-page (_arg) "Go to the next page." (interactive "P") (let ((win (selected-window))) @@ -8543,7 +8545,7 @@ url is put as the `gnus-button-url' overlay property on the button." (gnus-article-next-page) (select-window win))) -(defun gnus-article-button-prev-page (arg) +(defun gnus-article-button-prev-page (_arg) "Go to the prev page." (interactive "P") (let ((win (selected-window))) @@ -8594,20 +8596,31 @@ For example: (defvar gnus-inhibit-article-treatments nil) -(defun gnus-treat-article (gnus-treat-condition - &optional part-number total-parts gnus-treat-type) - (let ((gnus-treat-length (- (point-max) (point-min))) +;; Dynamic variables. +(defvar part-number) ;FIXME: Lacks a "gnus-" prefix. +(defvar total-parts) ;FIXME: Lacks a "gnus-" prefix. +(defvar gnus-treat-type) +(defvar gnus-treat-condition) +(defvar gnus-treat-length) + +(defun gnus-treat-article (condition + &optional part-num total type) + (let ((gnus-treat-condition condition) + (part-number part-num) + (total-parts total) + (gnus-treat-type type) + (gnus-treat-length (- (point-max) (point-min))) (alist gnus-treatment-function-alist) (article-goto-body-goes-to-point-min-p t) (treated-type - (or (not gnus-treat-type) + (or (not type) (catch 'found (let ((list gnus-article-treat-types)) (while list - (when (string-match (pop list) gnus-treat-type) + (when (string-match (pop list) type) (throw 'found t))))))) (highlightp (gnus-visual-p 'article-highlight 'highlight)) - val elem) + val) (gnus-run-hooks 'gnus-part-display-hook) (dolist (elem alist) (setq val @@ -8625,13 +8638,6 @@ For example: (save-restriction (funcall (cadr elem))))))) -;; Dynamic variables. -(defvar part-number) -(defvar total-parts) -(defvar gnus-treat-type) -(defvar gnus-treat-condition) -(defvar gnus-treat-length) - (defun gnus-treat-predicate (val) (cond ((null val) @@ -8880,7 +8886,7 @@ For example: (gnus-mime-security-show-details handle) (gnus-mime-security-verify-or-decrypt handle)))) -(defun gnus-insert-mime-security-button (handle &optional displayed) +(defun gnus-insert-mime-security-button (handle &optional _displayed) (let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol)) (gnus-tmp-type (concat @@ -8928,7 +8934,7 @@ For example: :action 'gnus-widget-press-button :button-keymap gnus-mime-security-button-map :help-echo - (lambda (widget) + (lambda (_widget) ;; Needed to properly clear the message due to a bug in ;; wid-edit (XEmacs only). (when (boundp 'help-echo-owns-message) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 31b7d07..e40aece 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1243,6 +1243,7 @@ evaluating FORMS but it is no longer done. So, some programs assuming it if any may malfunction." (if (featurep 'xemacs) `(progn ,@forms) + (message "Warning: Using brain-dead macro `mm-with-unibyte-current-buffer'!") (let ((multibyte (make-symbol "multibyte"))) `(let ((,multibyte enable-multibyte-characters)) (when ,multibyte @@ -1253,6 +1254,7 @@ it if any may malfunction." (set-buffer-multibyte t))))))) (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0) (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body)) +(make-obsolete 'mm-with-unibyte-current-buffer nil "25.1") (defun mm-find-charset-region (b e) "Return a list of Emacs charsets in the region B to E." commit 655a6f35dfae775de53daff99ce0b1c802f4b4b7 Author: Martin Rudalics Date: Thu Dec 18 18:53:48 2014 +0100 Fix ispell window handling. * textmodes/ispell.el (ispell-command-loop): Suppress horizontal scroll bar on ispell's windows. Don't count window lines and don't deal with dedicated windows. (ispell-show-choices, ispell-help): Let `ispell-display-buffer' do the window handling. (ispell-adjusted-window-height, ispell-overlay-window): Remove. (ispell-display-buffer): New function to reuse, create and fit window to ispell's buffers. (Bug#3413) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46c8718..6027cd1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -38,6 +38,14 @@ (display-buffer): Mention `preserve-size' alist member in doc-string. (fit-window-to-buffer): New argument PRESERVE-SIZE. + * textmodes/ispell.el (ispell-command-loop): Suppress horizontal + scroll bar on ispell's windows. Don't count window lines and + don't deal with dedicated windows. + (ispell-show-choices, ispell-help): Let `ispell-display-buffer' + do the window handling. + (ispell-adjusted-window-height, ispell-overlay-window): Remove. + (ispell-display-buffer): New function to reuse, create and fit + window to ispell's buffers. (Bug#3413) 2014-12-18 Dmitry Gutov diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0fc6b4a..ea2eaba 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2209,16 +2209,12 @@ indicates whether the dictionary has been modified when option `a' or `i' is used. Global `ispell-quit' set to start location to continue spell session." (let ((count ?0) - (line ispell-choices-win-default-height) - ;; ensure 4 context lines. - (max-lines (- (ispell-adjusted-window-height) 4)) (choices miss) (window-min-height (min window-min-height ispell-choices-win-default-height)) (command-characters '( ? ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m )) - (dedicated (window-dedicated-p)) (skipped 0) - char num result textwin dedicated-win) + char num result textwin) ;; setup the *Choices* buffer with valid data. (with-current-buffer (get-buffer-create ispell-choices-buffer) @@ -2233,30 +2229,27 @@ Global `ispell-quit' set to start location to continue spell session." (boundp 'horizontal-scrollbar-visible-p) (set-specifier horizontal-scrollbar-visible-p nil (cons (current-buffer) nil)))) + (ispell-with-no-warnings + (and (boundp 'horizontal-scroll-bar) + (setq horizontal-scroll-bar nil))) (erase-buffer) (if guess (progn (insert "Affix rules generate and capitalize " "this word as shown below:\n\t") (while guess - (if (> (+ 4 (current-column) (length (car guess))) - (window-width)) - (progn - (insert "\n\t") - (setq line (1+ line)))) + (when (> (+ 4 (current-column) (length (car guess))) + (window-width)) + (insert "\n\t")) (insert (car guess) " ") (setq guess (cdr guess))) - (insert "\nUse option `i' to accept this spelling and put it in your private dictionary.\n") - (setq line (+ line (if choices 3 2))))) - (while (and choices - (< (if (> (+ 7 (current-column) (length (car choices)) - (if (> count ?~) 3 0)) - (window-width)) - (progn - (insert "\n") - (setq line (1+ line))) - line) - max-lines)) + (insert "\nUse option `i' to accept this spelling and put it in your private dictionary.\n"))) + (while choices + (when (> (+ 7 (current-column) + (length (car choices)) + (if (> count ?~) 3 0)) + (window-width)) + (insert "\n")) ;; not so good if there are over 20 or 30 options, but then, if ;; there are that many you don't want to scan them all anyway... (while (memq count command-characters) ; skip command characters. @@ -2271,14 +2264,8 @@ Global `ispell-quit' set to start location to continue spell session." (if (not (pos-visible-in-window-p end)) (sit-for 0)) - ;; allow temporary split of dedicated windows... - (if dedicated - (progn - (setq dedicated-win (selected-window)) - (set-window-dedicated-p dedicated-win nil))) - ;; Display choices for misspelled word. - (ispell-show-choices line end) + (ispell-show-choices) (select-window (setq textwin (next-window))) ;; highlight word, protecting current buffer status @@ -2406,18 +2393,13 @@ Global `ispell-quit' set to start location to continue spell session." (or ispell-complete-word-dict ispell-alternate-dictionary)) miss (ispell-lookup-words new-word) - choices miss - line ispell-choices-win-default-height) - (while (and choices ; adjust choices window. - (< (if (> (+ 7 (current-column) - (length (car choices)) - (if (> count ?~) 3 0)) - (window-width)) - (progn - (insert "\n") - (setq line (1+ line))) - line) - max-lines)) + choices miss) + (while choices + (when (> (+ 7 (current-column) + (length (car choices)) + (if (> count ?~) 3 0)) + (window-width)) + (insert "\n")) (while (memq count command-characters) (setq count (ispell-int-char (1+ count)) skipped (1+ skipped))) @@ -2426,7 +2408,7 @@ Global `ispell-quit' set to start location to continue spell session." count (ispell-int-char (1+ count)))) (setq count (ispell-int-char (- count ?0 skipped)))) - (ispell-show-choices line end) + (ispell-show-choices) (select-window (next-window))))) (and (eq 'block ispell-highlight-p) (ispell-highlight-spelling-error start end nil @@ -2487,44 +2469,19 @@ Global `ispell-quit' set to start location to continue spell session." (and ispell-highlight-p ; unhighlight (save-window-excursion (select-window textwin) - (ispell-highlight-spelling-error start end))) - (if dedicated - (set-window-dedicated-p dedicated-win t))))) + (ispell-highlight-spelling-error start end)))))) -(defun ispell-show-choices (line end) +(defun ispell-show-choices () "Show the choices in another buffer or frame." (if (and ispell-use-framepop-p (fboundp 'framepop-display-buffer)) (progn (framepop-display-buffer (get-buffer ispell-choices-buffer)) ;; (get-buffer-window ispell-choices-buffer t) (select-window (previous-window))) ; *Choices* window - ;; standard selection by splitting a small buffer out of this window. - (let ((choices-window (get-buffer-window ispell-choices-buffer))) - (if choices-window - (if (= line (ispell-adjusted-window-height choices-window)) - (select-window choices-window) - ;; *Choices* window changed size. Adjust the choices window - ;; without scrolling the spelled window when possible - (let ((window-line - (- line (ispell-adjusted-window-height choices-window))) - (visible (progn (vertical-motion -1) (point)))) - (if (< line ispell-choices-win-default-height) - (setq window-line (+ window-line - (- ispell-choices-win-default-height - line)))) - (move-to-window-line 0) - (vertical-motion window-line) - (set-window-start (selected-window) - (if (> (point) visible) visible (point))) - (goto-char end) - (select-window choices-window) - (enlarge-window window-line))) - ;; Overlay *Choices* window when it isn't showing - (ispell-overlay-window (max line ispell-choices-win-default-height))) - (switch-to-buffer ispell-choices-buffer) - (goto-char (point-min))))) + ;; Display choices above selected window. + (ispell-display-buffer (get-buffer-create ispell-choices-buffer)))) ;;;###autoload @@ -2594,10 +2551,10 @@ SPC: Accept word this time. "Type 'x C-h f ispell-help' for more help"))) (save-window-excursion (if ispell-help-in-bufferp - (progn - (ispell-overlay-window 4) - (switch-to-buffer (get-buffer-create "*Ispell Help*")) - (insert (concat help-1 "\n" help-2 "\n" help-3)) + (let ((buffer (get-buffer-create "*Ispell Help*"))) + (with-current-buffer buffer + (insert (concat help-1 "\n" help-2 "\n" help-3))) + (ispell-display-buffer buffer) (sit-for 5) (kill-buffer "*Ispell Help*")) (unwind-protect @@ -2816,49 +2773,35 @@ The variable `ispell-highlight-face' selects the face to use for highlighting." (ispell-highlight-spelling-error-overlay start end highlight)) (t (ispell-highlight-spelling-error-generic start end highlight refresh)))) -(defun ispell-adjusted-window-height (&optional window) - "Like `window-height', adjusted to correct for the effect of tall mode-lines. -The value returned is actually the nominal number of text-lines in the -window plus 1. On a terminal, this is the same value returned by -`window-height', but if the window has a mode-line is taller than a normal -text line, the returned value may be smaller than that from -`window-height'." - (cond ((fboundp 'window-text-height) - (1+ (window-text-height window))) - ((or (and (fboundp 'display-graphic-p) (display-graphic-p)) - (and (featurep 'xemacs) window-system)) - (1- (window-height window))) - (t - (window-height window)))) - -(defun ispell-overlay-window (height) - "Create a window covering the top HEIGHT lines of the current window. -Ensure that the line above point is still visible but otherwise avoid -scrolling the current window. Leave the new window selected." - (save-excursion - (let ((oldot (save-excursion (vertical-motion -1) (point))) - (top (save-excursion (move-to-window-line height) (point)))) - ;; If line above old point (line starting at oldot) would be - ;; hidden by new window, scroll it to just below new win - ;; otherwise set top line of other win so it doesn't scroll. - (if (< oldot top) (setq top oldot)) - ;; if frame is unsplittable, temporarily disable that... - (if (cdr (assq 'unsplittable (frame-parameters (selected-frame)))) - (let ((frame (selected-frame))) - (modify-frame-parameters frame '((unsplittable . nil))) - (split-window nil height) - (modify-frame-parameters frame '((unsplittable . t)))) - (split-window nil height)) - (let ((deficit (- height (ispell-adjusted-window-height)))) - (when (> deficit 0) - ;; Number of lines the window is still too short. We ensure that - ;; there are at least (1- HEIGHT) lines visible in the window. - (enlarge-window deficit) - (goto-char top) - (vertical-motion deficit) - (setq top (min (point) oldot)))) - (set-window-start (next-window) top)))) - +(defun ispell-display-buffer (buffer) + "Show BUFFER in new window above selected one. +Also position fit window to BUFFER and select it." + (let* ((unsplittable + (cdr (assq 'unsplittable (frame-parameters (selected-frame))))) + (window + (or (get-buffer-window buffer) + (and unsplittable + ;; If frame is unsplittable, temporarily disable that... + (let ((frame (selected-frame))) + (modify-frame-parameters frame '((unsplittable . nil))) + (prog1 + (condition-case nil + (split-window + nil (- ispell-choices-win-default-height) 'above) + (error nil)) + (modify-frame-parameters frame '((unsplittable . t)))))) + (and (not unsplittable) + (condition-case nil + (split-window + nil (- ispell-choices-win-default-height) 'above) + (error nil))) + (display-buffer buffer)))) + (if (not window) + (error "Couldn't make window for *Choices*") + (select-window window) + (set-window-buffer window buffer) + (set-window-point window (point-min)) + (fit-window-to-buffer window nil nil nil nil t)))) ;; Should we add a compound word match return value? (defun ispell-parse-output (output &optional accept-list shift) commit 811aceeaef8d436bdecbbb2f87bcdbefeb0cdfd0 Author: Eli Zaretskii Date: Thu Dec 18 19:15:01 2014 +0200 src/window.c (Fwindow_body_width): Doc fix. (Bug#19395) diff --git a/src/ChangeLog b/src/ChangeLog index c0b9039..d6de89a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-12-18 Eli Zaretskii + + * window.c (Fwindow_body_width): Doc fix. (Bug#19395) + 2014-12-15 Stefan Monnier * buffer.c (syms_of_buffer) : fix docstring. diff --git a/src/window.c b/src/window.c index 6938ffb..ccd714a 100644 --- a/src/window.c +++ b/src/window.c @@ -973,7 +973,10 @@ or scroll bars. If PIXELWISE is nil, return the largest integer smaller than WINDOW's pixel width divided by the character width of WINDOW's frame. This means that if a column at the right of the text area is only partially -visible, that column is not counted. */) +visible, that column is not counted. + +Note that the returned value includes the column reserved for the +continuation glyph. */) (Lisp_Object window, Lisp_Object pixelwise) { return make_number (window_body_width (decode_live_window (window), commit 47f730e3b6a36d6b3e22b91caac576ec2ac4bd7c Author: Martin Rudalics Date: Thu Dec 18 18:12:24 2014 +0100 Add code for "preserving" window sizes. * frame.c (frame_windows_min_size): New argument IGNORE. (adjust_frame_size): When called from change_frame_size call frame_windows_min_size with IGNORE Qt so we can ignore size restrictions. * dired.el (dired-pop-to-buffer): Call fit-window-to-buffer with `preserve-size' t. (dired-mark-pop-up): Preserve size of window showing marked files. * electric.el (Electric-pop-up-window): * help.el (resize-temp-buffer-window): Call fit-window-to-buffer with `preserve-size' t. * minibuffer.el (minibuffer-completion-help): Use `resize-temp-buffer-window' instead of `fit-window-to-buffer' (Bug#19355). Preserve size of completions window. * register.el (register-preview): Preserve size of register preview window. * tmm.el (tmm-add-prompt): Call fit-window-to-buffer with `preserve-size' t (Bug#1291). * window.el (with-displayed-buffer-window): Add calls to `window-preserve-size'. (window-min-pixel-size, window--preservable-size) (window-preserve-size, window-preserved-size) (window--preserve-size, window--min-size-ignore-p): New functions. (window-min-size, window-min-delta, window--resizable) (window--resize-this-window, split-window-below) (split-window-right): Amend doc-string. (adjust-window-trailing-edge): Handle preserving window sizes. Signal user-error instead of an error when there's no window above or below. (window--min-size-1, window-sizable, window--size-fixed-1) (window-size-fixed-p, window--min-delta-1) (frame-windows-min-size, window--max-delta-1, window-resize) (window--resize-child-windows, window--resize-siblings) (enlarge-window, shrink-window, split-window): Handle preserving window sizes. (window--state-put-2): Handle horizontal scroll bars. (window--display-buffer): Call `preserve-size' if asked for. (display-buffer): Mention `preserve-size' alist member in doc-string. (fit-window-to-buffer): New argument PRESERVE-SIZE. diff --git a/etc/NEWS b/etc/NEWS index 865ae07..3880fd1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -575,6 +575,10 @@ fullwidth frames, the behavior may depend on the toolkit used. specific frame does not resize that frame in order to preserve the number of columns or lines it displays. +** New function `window-preserve-size' allows to preserve the size of +windows without "fixing" it. It's supported by `fit-window-to-buffer', +`temp-buffer-resize-mode' and `display-buffer'. + ** Tearoff menus and detachable toolbars for Gtk+ has been removed. Those features have been deprecated in Gtk+ for a long time. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1659027..46c8718 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,44 @@ +2014-12-18 Martin Rudalics + + Add code for "preserving" window sizes. + * dired.el (dired-pop-to-buffer): Call fit-window-to-buffer with + `preserve-size' t. + (dired-mark-pop-up): Preserve size of window showing marked + files. + * electric.el (Electric-pop-up-window): + * help.el (resize-temp-buffer-window): Call fit-window-to-buffer + with `preserve-size' t. + * minibuffer.el (minibuffer-completion-help): Use + `resize-temp-buffer-window' instead of `fit-window-to-buffer' + (Bug#19355). Preserve size of completions window. + * register.el (register-preview): Preserve size of register + preview window. + * tmm.el (tmm-add-prompt): Call fit-window-to-buffer + with `preserve-size' t (Bug#1291). + * window.el (with-displayed-buffer-window): Add calls to + `window-preserve-size'. + (window-min-pixel-size, window--preservable-size) + (window-preserve-size, window-preserved-size) + (window--preserve-size, window--min-size-ignore-p): New + functions. + (window-min-size, window-min-delta, window--resizable) + (window--resize-this-window, split-window-below) + (split-window-right): Amend doc-string. + (window--min-size-1, window-sizable, window--size-fixed-1) + (window-size-fixed-p, window--min-delta-1) + (frame-windows-min-size, window--max-delta-1, window-resize) + (window--resize-child-windows, window--resize-siblings) + (enlarge-window, shrink-window, split-window): Handle preserving + window sizes. + (adjust-window-trailing-edge): Handle preserving window + sizes. Signal user-error instead of an error when there's no + window above or below. + (window--state-put-2): Handle horizontal scroll bars. + (window--display-buffer): Call `preserve-size' if asked for. + (display-buffer): Mention `preserve-size' alist member in + doc-string. + (fit-window-to-buffer): New argument PRESERVE-SIZE. + 2014-12-18 Dmitry Gutov * emacs-lisp/package.el (package-activate): Do not re-activate or diff --git a/lisp/dired.el b/lisp/dired.el index 4cc252c..909ba22 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3059,7 +3059,7 @@ or \"* [3 files]\"." (when dired-shrink-to-fit ;; Try to not delete window when we want to display less than ;; `window-min-height' lines. - (fit-window-to-buffer (get-buffer-window buf) nil 1))) + (fit-window-to-buffer (get-buffer-window buf) nil 1 nil nil t))) (defcustom dired-no-confirm nil "A list of symbols for commands Dired should not confirm, or t. @@ -3106,7 +3106,8 @@ argument or confirmation)." (with-displayed-buffer-window buffer (cons 'display-buffer-below-selected - '((window-height . fit-window-to-buffer))) + '((window-height . fit-window-to-buffer) + (preserve-size . (nil . t)))) #'(lambda (window _value) (with-selected-window window (unwind-protect diff --git a/lisp/electric.el b/lisp/electric.el index 4bf5963..fa9666d 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -164,7 +164,10 @@ ;; Don't shrink the window, but expand it if necessary. (goto-char (point-min)) (unless (= (point-max) (window-end win t)) - (fit-window-to-buffer win max-height)) + ;; This call is executed even if the window existed before, was + ;; reused, ... contradicting a claim in the comment before this + ;; function. + (fit-window-to-buffer win max-height nil nil nil t)) win))) ;;; Electric keys. diff --git a/lisp/help.el b/lisp/help.el index 44716a5..07b9627 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1133,7 +1133,10 @@ of a horizontal combination, restrain its new size by `fit-window-to-buffer-horizontally' can inhibit resizing. If WINDOW is the root window of its frame, resize the frame -provided `fit-frame-to-buffer' is non-nil." +provided `fit-frame-to-buffer' is non-nil. + +This function may call `preserve-window-size' to preserve the +size of WINDOW." (setq window (window-normalize-window window t)) (let ((height (if (functionp temp-buffer-max-height) (with-selected-window window @@ -1155,7 +1158,7 @@ provided `fit-frame-to-buffer' is non-nil." (and (eq quit-cadr 'frame) fit-frame-to-buffer (eq window (frame-root-window window)))) - (fit-window-to-buffer window height nil width)))) + (fit-window-to-buffer window height nil width nil t)))) ;;; Help windows. (defcustom help-window-select nil diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index ee97174..e1e6b0e 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1818,7 +1818,10 @@ variables.") ,(if (eq (selected-window) (minibuffer-window)) 'display-buffer-at-bottom 'display-buffer-below-selected)) - (window-height . fit-window-to-buffer)) + ,(when temp-buffer-resize-mode + '(window-height . resize-temp-buffer-window)) + ,(when temp-buffer-resize-mode + '(preserve-size . (nil . t)))) nil ;; Remove the base-size tail because `sort' requires a properly ;; nil-terminated list. diff --git a/lisp/register.el b/lisp/register.el index 2414606..aacd5d0 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -135,7 +135,8 @@ Format of each entry is controlled by the variable `register-preview-function'." (with-current-buffer-window buffer (cons 'display-buffer-below-selected - '((window-height . fit-window-to-buffer))) + '((window-height . fit-window-to-buffer) + (preserve-size . (nil . t)))) nil (with-current-buffer standard-output (setq cursor-in-non-selected-windows nil) diff --git a/lisp/tmm.el b/lisp/tmm.el index 0972975..8aedb78 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -371,7 +371,6 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (unless tmm-c-prompt (error "No active menu entries")) (setq tmm-old-mb-map (tmm-define-keys t)) - ;; Get window and hide it for electric mode to get correct size (or tmm-completion-prompt (add-hook 'completion-setup-hook 'tmm-completion-delete-prompt 'append)) @@ -381,9 +380,15 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (with-current-buffer "*Completions*" (tmm-remove-inactive-mouse-face) (when tmm-completion-prompt - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + (window (get-buffer-window "*Completions*"))) (goto-char (point-min)) - (insert tmm-completion-prompt)))) + (insert tmm-completion-prompt) + (when window + ;; Try to show everything just inserted and preserve height of + ;; *Completions* window. This should fix a behavior described + ;; in Bug#1291. + (fit-window-to-buffer window nil nil nil nil t))))) (insert tmm-c-prompt)) (defun tmm-shortcut () diff --git a/lisp/window.el b/lisp/window.el index b1acd93..c95b0d6 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -249,6 +249,12 @@ displays the buffer specified by BUFFER-OR-NAME before running BODY." (ignore-errors (funcall (cdr (assq 'window-height (cdr ,vaction))) ,window))) + (when (consp (cdr (assq 'preserve-size (cdr ,vaction)))) + (window-preserve-size + ,window t (cadr (assq 'preserve-size (cdr ,vaction)))) + (window-preserve-size + ,window nil (cddr (assq 'preserve-size (cdr ,vaction))))) + (if (functionp ,vquit-function) (funcall ,vquit-function ,window ,value) ,value))))) @@ -435,6 +441,14 @@ minimum pixel width of WINDOW." (window-safe-min-pixel-width window) (window-safe-min-pixel-height window))) +(defun window-min-pixel-size (&optional window horizontal) + "Return the minimum pixel height of WINDOW. +Optional argument HORIZONTAL non-nil means return the minimum +pixel width of WINDOW." + (if horizontal + (window-min-pixel-width window) + (window-min-pixel-height window))) + (defun window-combined-p (&optional window horizontal) "Return non-nil if WINDOW has siblings in a given direction. WINDOW must be a valid window and defaults to the selected one. @@ -1215,9 +1229,73 @@ unless it has no other choice (like when deleting a neighboring window).") (make-variable-buffer-local 'window-size-fixed) -(defun window--size-ignore-p (window ignore) - "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." - (if (window-valid-p ignore) (eq window ignore) ignore)) +(defun window--preservable-size (window &optional horizontal) + "Return height of WINDOW as `window-preserve-size' would preserve it. +Optional argument HORIZONTAL non-nil means to return the width of +WINDOW as `window-preserve-size' would preserve it." + (if horizontal + (window-body-width window t) + (+ (window-body-height window t) + (window-header-line-height window) + (window-mode-line-height window)))) + +(defun window-preserve-size (&optional window horizontal preserve) + "Preserve height of window WINDOW. +WINDOW must be a live window and defaults to the selected one. +Optional argument HORIZONTAL non-nil means preserve the width of +WINDOW. + +PRESERVE t means to preserve the current height/width of WINDOW's +body in frame and window resizing operations whenever possible. +The height/width of WINDOW will change only if Emacs has no other +choice. Resizing a window whose height/width is preserved never +throws an error. + +PRESERVE nil means to stop preserving the height/width of WINDOW, +lifting the respective restraint induced by a previous call of +`window-preserve-size' for WINDOW. Calling `enlarge-window', +`shrink-window', `split-window' or `fit-window-to-buffer' with +WINDOW as argument also removes the respective restraint. + +Other values of PRESERVE are reserved for future use." + (setq window (window-normalize-window window t)) + (let* ((parameter (window-parameter window 'window-preserved-size)) + (width (nth 1 parameter)) + (height (nth 2 parameter))) + (if horizontal + (set-window-parameter + window 'window-preserved-size + (list + (window-buffer window) + (and preserve (window--preservable-size window t)) + height)) + (set-window-parameter + window 'window-preserved-size + (list + (window-buffer window) + width + (and preserve (window--preservable-size window))))))) + +(defun window-preserved-size (&optional window horizontal) + "Return preserved height of window WINDOW. +WINDOW must be a live window and defaults to the selected one. +Optional argument HORIZONTAL non-nil means to return preserved +width of WINDOW." + (setq window (window-normalize-window window t)) + (let* ((parameter (window-parameter window 'window-preserved-size)) + (buffer (nth 0 parameter)) + (width (nth 1 parameter)) + (height (nth 2 parameter))) + (when (eq buffer (window-buffer window)) + (if horizontal width height)))) + +(defun window--preserve-size (window horizontal) + "Return non-nil when the height of WINDOW shall be preserved. +Optional argument HORIZONTAL non-nil means to return non-nil when +the width of WINDOW shall be preserved." + (let ((size (window-preserved-size window horizontal))) + (and (numberp size) + (= size (window--preservable-size window horizontal))))) (defun window-safe-min-size (&optional window horizontal pixelwise) "Return safe minimum size of WINDOW. @@ -1244,19 +1322,20 @@ Optional argument HORIZONTAL non-nil means return the minimum number of columns of WINDOW; otherwise return the minimum number of WINDOW's lines. -Optional argument IGNORE, if non-nil, means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE equals `safe', live -windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. If IGNORE is a window, ignore -restrictions for that window only. Any other non-nil value -means ignore all of the above restrictions for all windows. - -Optional argument PIXELWISE non-nil means return the minimum pixel-size -of WINDOW." +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional argument PIXELWISE non-nil means +return the minimum pixel-size of WINDOW." (window--min-size-1 (window-normalize-window window) horizontal ignore pixelwise)) +(defun window--min-size-ignore-p (window horizontal ignore) + "Return non-nil if IGNORE says to ignore height restrictions for WINDOW. +HORIZONTAL non-nil means to return non-nil if IGNORE says to +ignore width restrictions for WINDOW." + (if (window-valid-p ignore) + (eq window ignore) + (not (memq ignore '(nil preserved))))) + (defun window--min-size-1 (window horizontal ignore pixelwise) "Internal function of `window-min-size'." (let ((sub (window-child window))) @@ -1283,8 +1362,7 @@ of WINDOW." (cond ((window-minibuffer-p window) (if pixelwise (frame-char-height (window-frame window)) 1)) - ((and (not (window--size-ignore-p window ignore)) - (window-size-fixed-p window horizontal)) + ((window-size-fixed-p window horizontal ignore) ;; The minimum size of a fixed size window is its size. (window-size window horizontal pixelwise)) ((eq ignore 'safe) @@ -1313,12 +1391,12 @@ of WINDOW." pixel-width ;; Round up to next integral of columns. (* (ceiling pixel-width char-size) char-size)) - (if (window--size-ignore-p window ignore) + (if (window--min-size-ignore-p window horizontal ignore) 0 (window-min-pixel-width window))) (max (ceiling pixel-width char-size) - (if (window--size-ignore-p window ignore) + (if (window--min-size-ignore-p window horizontal ignore) 0 window-min-width))))) ((let ((char-size (frame-char-size window)) @@ -1334,11 +1412,11 @@ of WINDOW." pixel-height ;; Round up to next integral of lines. (* (ceiling pixel-height char-size) char-size)) - (if (window--size-ignore-p window ignore) + (if (window--min-size-ignore-p window horizontal ignore) 0 (window-min-pixel-height window))) (max (ceiling pixel-height char-size) - (if (window--size-ignore-p window ignore) + (if (window--min-size-ignore-p window horizontal ignore) 0 window-min-height)))))))))) @@ -1363,26 +1441,17 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, return the minimum value in the range DELTA..0 by which WINDOW can be shrunk. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE equals `safe', live -windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. If IGNORE is a window, ignore -restrictions for that window only. Any other non-nil value means -ignore all of the above restrictions for all windows. - -Optional argument PIXELWISE non-nil means interpret DELTA as -pixels." +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional argument PIXELWISE non-nil means +interpret DELTA as pixels." (setq window (window-normalize-window window)) (cond ((< delta 0) (max (- (window-min-size window horizontal ignore pixelwise) (window-size window horizontal pixelwise)) delta)) - ((window--size-ignore-p window ignore) - delta) ((> delta 0) - (if (window-size-fixed-p window horizontal) + (if (window-size-fixed-p window horizontal ignore) 0 delta)) (t 0))) @@ -1399,7 +1468,7 @@ doc-string of `window-sizable'." (<= (window-sizable window delta horizontal ignore pixelwise) delta))) -(defun window--size-fixed-1 (window horizontal) +(defun window--size-fixed-1 (window horizontal ignore) "Internal function for `window-size-fixed-p'." (let ((sub (window-child window))) (catch 'fixed @@ -1410,7 +1479,7 @@ doc-string of `window-sizable'." ;; windows are fixed-size. (progn (while sub - (unless (window--size-fixed-1 sub horizontal) + (unless (window--size-fixed-1 sub horizontal ignore) ;; We found a non-fixed-size child window, so ;; WINDOW's size is not fixed. (throw 'fixed nil)) @@ -1421,28 +1490,33 @@ doc-string of `window-sizable'." ;; An ortho-combination is fixed-size if at least one of its ;; child windows is fixed-size. (while sub - (when (window--size-fixed-1 sub horizontal) + (when (window--size-fixed-1 sub horizontal ignore) ;; We found a fixed-size child window, so WINDOW's size ;; is fixed. (throw 'fixed t)) (setq sub (window-right sub)))) ;; WINDOW is a live window. - (with-current-buffer (window-buffer window) - (if horizontal - (memq window-size-fixed '(width t)) - (memq window-size-fixed '(height t)))))))) - -(defun window-size-fixed-p (&optional window horizontal) + (and (or (not (windowp ignore)) (not (eq window ignore))) + (or (and (not (eq ignore 'preserved)) + (window--preserve-size window horizontal)) + (with-current-buffer (window-buffer window) + (if horizontal + (memq window-size-fixed '(width t)) + (memq window-size-fixed '(height t)))))))))) + +(defun window-size-fixed-p (&optional window horizontal ignore) "Return non-nil if WINDOW's height is fixed. WINDOW must be a valid window and defaults to the selected one. Optional argument HORIZONTAL non-nil means return non-nil if -WINDOW's width is fixed. +WINDOW's width is fixed. The optional argument IGNORE has the +same meaning as for `window-resizable'. If this function returns nil, this does not necessarily mean that WINDOW can be resized in the desired direction. The function `window-resizable' can tell that." - (window--size-fixed-1 - (window-normalize-window window) horizontal)) + (when (or (windowp ignore) (memq ignore '(nil preserved))) + (window--size-fixed-1 + (window-normalize-window window) horizontal ignore))) (defun window--min-delta-1 (window delta &optional horizontal ignore trail noup pixelwise) "Internal function for `window-min-delta'." @@ -1463,8 +1537,7 @@ WINDOW can be resized in the desired direction. The function ((eq sub window) (setq skip (eq trail 'before))) (skip) - ((and (not (window--size-ignore-p window ignore)) - (window-size-fixed-p sub horizontal))) + ((window-size-fixed-p sub horizontal ignore)) (t ;; We found a non-fixed-size child window. (throw 'done delta))) @@ -1493,25 +1566,18 @@ Return zero if WINDOW cannot be shrunk. Optional argument HORIZONTAL non-nil means return number of columns by which WINDOW can be shrunk. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE is a window, ignore -restrictions for that window only. If IGNORE equals `safe', -live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. Any other non-nil value -means ignore all of the above restrictions for all windows. - -Optional argument TRAIL restricts the windows that can be enlarged. -If its value is `before', only windows to the left of or above WINDOW -can be enlarged. If it is `after', only windows to the right of or -below WINDOW can be enlarged. +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional argument TRAIL restricts the +windows that can be enlarged. If its value is `before', only +windows to the left of or above WINDOW can be enlarged. If it is +`after', only windows to the right of or below WINDOW can be +enlarged. Optional argument NOUP non-nil means don't go up in the window -tree, but try to enlarge windows within WINDOW's combination only. - -Optional argument NODOWN non-nil means don't check whether WINDOW -itself (and its child windows) can be shrunk; check only whether -at least one other window can be enlarged appropriately. +tree, but try to enlarge windows within WINDOW's combination +only. Optional argument NODOWN non-nil means don't check whether +WINDOW itself (and its child windows) can be shrunk; check only +whether at least one other window can be enlarged appropriately. Optional argument PIXELWISE non-nil means return number of pixels by which WINDOW can be shrunk." @@ -1533,14 +1599,16 @@ by which WINDOW can be shrunk." (window--min-delta-1 window (- size minimum) horizontal ignore trail noup pixelwise))))) -(defun frame-windows-min-size (&optional frame horizontal pixelwise) +(defun frame-windows-min-size (&optional frame horizontal ignore pixelwise) "Return minimum number of lines of FRAME's windows. HORIZONTAL non-nil means return number of columns of FRAME's -windows. PIXELWISE non-nil means return sizes in pixels." +windows. The optional argument IGNORE has the same meaning as +for `window-resizable'. PIXELWISE non-nil means return sizes in +pixels." (setq frame (window-normalize-frame frame)) (let* ((root (frame-root-window frame)) (mini (window-next-sibling root))) - (+ (window-min-size root horizontal nil pixelwise) + (+ (window-min-size root horizontal ignore pixelwise) (if (and mini (not horizontal)) (window-min-size mini horizontal nil pixelwise) 0)))) @@ -1575,8 +1643,7 @@ windows. PIXELWISE non-nil means return sizes in pixels." ;; child window is fixed-size. (while sub (when (and (not (eq sub window)) - (not (window--size-ignore-p sub ignore)) - (window-size-fixed-p sub horizontal)) + (window-size-fixed-p sub horizontal ignore)) (throw 'fixed delta)) (setq sub (window-right sub)))) (if noup @@ -1595,32 +1662,24 @@ The return value is zero if WINDOW cannot be enlarged. Optional argument HORIZONTAL non-nil means return maximum number of columns by which WINDOW can be enlarged. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE is a window, ignore -restrictions for that window only. If IGNORE equals `safe', -live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. Any other non-nil value means -ignore all of the above restrictions for all windows. - -Optional argument TRAIL restricts the windows that can be enlarged. -If its value is `before', only windows to the left of or above WINDOW -can be enlarged. If it is `after', only windows to the right of or -below WINDOW can be enlarged. +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional argument TRAIL restricts the +windows that can be enlarged. If its value is `before', only +windows to the left of or above WINDOW can be enlarged. If it is +`after', only windows to the right of or below WINDOW can be +enlarged. Optional argument NOUP non-nil means don't go up in the window tree but try to obtain the entire space from windows within -WINDOW's combination. - -Optional argument NODOWN non-nil means do not check whether -WINDOW itself (and its child windows) can be enlarged; check -only whether other windows can be shrunk appropriately. +WINDOW's combination. Optional argument NODOWN non-nil means do +not check whether WINDOW itself (and its child windows) can be +enlarged; check only whether other windows can be shrunk +appropriately. Optional argument PIXELWISE non-nil means return number of pixels by which WINDOW can be enlarged." (setq window (window-normalize-window window)) - (if (and (not (window--size-ignore-p window ignore)) - (not nodown) (window-size-fixed-p window horizontal)) + (if (and (not nodown) (window-size-fixed-p window horizontal ignore)) ;; With IGNORE and NOWDON nil return zero if WINDOW has fixed ;; size. 0 @@ -1645,26 +1704,18 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, return the minimum value in the range DELTA..0 that can be used for shrinking WINDOW. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE is a window, ignore -restrictions for that window only. If IGNORE equals `safe', -live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. Any other non-nil value -means ignore all of the above restrictions for all windows. - -Optional argument TRAIL `before' means only windows to the left -of or below WINDOW can be shrunk. Optional argument TRAIL -`after' means only windows to the right of or above WINDOW can be -shrunk. +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional argument TRAIL `before' means only +windows to the left of or below WINDOW can be shrunk. Optional +argument TRAIL `after' means only windows to the right of or +above WINDOW can be shrunk. Optional argument NOUP non-nil means don't go up in the window tree but check only whether space can be obtained from (or given -to) WINDOW's siblings. - -Optional argument NODOWN non-nil means don't go down in the -window tree. This means do not check whether resizing would -violate size restrictions of WINDOW or its child windows. +to) WINDOW's siblings. Optional argument NODOWN non-nil means +don't go down in the window tree. This means do not check +whether resizing would violate size restrictions of WINDOW or its +child windows. Optional argument PIXELWISE non-nil means interpret DELTA as number of pixels." @@ -1714,13 +1765,14 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, return the minimum value in the range DELTA..0 that can be used for shrinking WINDOW. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE is a window, ignore -restrictions for that window only. If IGNORE equals `safe', -live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. Any other non-nil value -means ignore all of the above restrictions for all windows. +Optional argument IGNORE, if non-nil, means to ignore restraints +induced by fixed size windows or the values of the variables +`window-min-height' and `window-min-width'. The following values +have special meanings: `safe' means that in addition live windows +are allowed to get as small as `window-safe-min-height' lines and +`window-safe-min-width' columns. `preserved' means to ignore +only restrictions induced by `window-preserve-size'. If IGNORE +is a window, then ignore restrictions for that window only. Optional argument PIXELWISE non-nil means interpret DELTA as pixels." @@ -2419,13 +2471,14 @@ horizontally by DELTA columns. In this case a positive DELTA means enlarge WINDOW by DELTA columns. DELTA negative means WINDOW shall be shrunk by -DELTA columns. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE is a window, ignore -restrictions for that window only. If IGNORE equals `safe', -live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. Any other non-nil value -means ignore all of the above restrictions for all windows. +Optional argument IGNORE, if non-nil, means to ignore restraints +induced by fixed size windows or the values of the variables +`window-min-height' and `window-min-width'. The following values +have special meanings: `safe' means that in addition live windows +are allowed to get as small as `window-safe-min-height' lines and +`window-safe-min-width' columns. `preserved' means to ignore +only restrictions induced by `window-preserve-size'. If IGNORE +is a window, then ignore restrictions for that window only. Optional argument PIXELWISE non-nil means resize WINDOW by DELTA pixels. @@ -2456,8 +2509,12 @@ instead." ;; nil or the minibuffer window is active, resize the minibuffer ;; window. (window--resize-mini-window minibuffer-window (- delta))) - ((window--resizable-p - window delta horizontal ignore nil nil nil t) + ((or (window--resizable-p + window delta horizontal ignore nil nil nil t) + (and (not ignore) + (setq ignore 'preserved) + (window--resizable-p + window delta horizontal ignore nil nil nil t))) (window--resize-reset frame horizontal) (window--resize-this-window window delta horizontal ignore t) (if (and (not window-combination-resize) @@ -2615,13 +2672,8 @@ be a horizontally combined internal window. WINDOW, if specified, must denote a child window of PARENT that is resized by DELTA pixels. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE equals `safe', live -windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. If IGNORE is a window, ignore -restrictions for that window only. Any other non-nil value means -ignore all of the above restrictions for all windows. +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional arguments TRAIL and EDGE, when non-nil, restrict the set of windows that shall be resized. If TRAIL equals `before', @@ -2692,7 +2744,7 @@ already set by this routine." ;; Ignore windows to skip and fixed-size child windows - ;; in the latter case make it a window to skip. (and (not ignore) - (window-size-fixed-p sub horizontal) + (window-size-fixed-p sub horizontal ignore) (set-window-new-normal sub 'ignore)))) ((< delta 0) ;; When shrinking store the number of lines/cols we can get @@ -2798,13 +2850,8 @@ Optional argument HORIZONTAL non-nil means resize other windows when WINDOW is resized horizontally by DELTA pixels. WINDOW itself is not resized by this function. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE equals `safe', live -windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. If IGNORE is a window, ignore -restrictions for that window only. Any other non-nil value means -ignore all of the above restrictions for all windows. +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional arguments TRAIL and EDGE, when non-nil, refine the set of windows that shall be resized. If TRAIL equals `before', @@ -2831,8 +2878,7 @@ preferably only resize windows adjacent to EDGE." ;; Make sure this sibling is left alone when ;; resizing its siblings. (set-window-new-normal sub 'ignore)) - ((or (window--size-ignore-p sub ignore) - (not (window-size-fixed-p sub horizontal))) + ((not (window-size-fixed-p sub horizontal ignore)) ;; Set this-delta to t to signal that we found a sibling ;; of WINDOW whose size is not fixed. (setq this-delta t))) @@ -2902,16 +2948,9 @@ preferably only resize windows adjacent to EDGE." Optional argument HORIZONTAL non-nil means resize WINDOW horizontally by DELTA pixels. -Optional argument IGNORE non-nil means ignore restrictions -imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. If IGNORE equals `safe', live -windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. If IGNORE is a window, ignore -restrictions for that window only. Any other non-nil value -means ignore all of the above restrictions for all windows. - -Optional argument ADD non-nil means add DELTA to the new total -size of WINDOW. +The optional argument IGNORE has the same meaning as for +`window-resizable'. Optional argument ADD non-nil means add +DELTA to the new total size of WINDOW. Optional arguments TRAIL and EDGE, when non-nil, refine the set of windows that shall be resized. If TRAIL equals `before', @@ -3057,7 +3096,7 @@ move it as far as possible in the desired direction." (let* ((frame (window-frame window)) (minibuffer-window (minibuffer-window frame)) (right window) - left this-delta min-delta max-delta) + left this-delta min-delta max-delta ignore) (unless pixelwise (setq pixelwise t) @@ -3080,12 +3119,16 @@ move it as far as possible in the desired direction." (window--resize-mini-window minibuffer-window (- delta))) ((or (not (setq left right)) (not (setq right (window-right right)))) (if horizontal - (error "No window on the right of this one") - (error "No window below this one"))) + (user-error "No window on the right of this one") + (user-error "No window below this one"))) (t ;; Set LEFT to the first resizable window on the left. This step is ;; needed to handle fixed-size windows. - (while (and left (window-size-fixed-p left horizontal)) + (while (and left + (or (window-size-fixed-p left horizontal) + (and (< delta 0) + (<= (window-size left horizontal t) + (window-min-size left horizontal nil t))))) (setq left (or (window-left left) (progn @@ -3093,13 +3136,31 @@ move it as far as possible in the desired direction." (not (window-combined-p left horizontal)))) (window-left left))))) (unless left - (if horizontal - (error "No resizable window on the left of this one") - (error "No resizable window above this one"))) + (setq ignore 'preserved) + (setq left window) + (while (and left + (or (window-size-fixed-p left horizontal 'preserved) + (<= (window-size left horizontal t) + (window-min-size left horizontal 'preserved t)))) + (setq left + (or (window-left left) + (progn + (while (and (setq left (window-parent left)) + (not (window-combined-p left horizontal)))) + (window-left left))))) + + (unless left + (if horizontal + (user-error "No resizable window on the left of this one") + (user-error "No resizable window above this one")))) ;; Set RIGHT to the first resizable window on the right. This step ;; is needed to handle fixed-size windows. - (while (and right (window-size-fixed-p right horizontal)) + (while (and right + (or (window-size-fixed-p right horizontal) + (and (> delta 0) + (<= (window-size right horizontal t) + (window-min-size right horizontal 'preserved t))))) (setq right (or (window-right right) (progn @@ -3107,9 +3168,22 @@ move it as far as possible in the desired direction." (not (window-combined-p right horizontal)))) (window-right right))))) (unless right - (if horizontal - (error "No resizable window on the right of this one") - (error "No resizable window below this one"))) + (setq ignore 'preserved) + (setq right (window-right window)) + (while (and right + (or (window-size-fixed-p right horizontal 'preserved)) + (<= (window-size right horizontal t) + (window-min-size right horizontal nil t))) + (setq right + (or (window-right right) + (progn + (while (and (setq right (window-parent right)) + (not (window-combined-p right horizontal)))) + (window-right right))))) + (unless right + (if horizontal + (user-error "No resizable window on the right of this one") + (user-error "No resizable window below this one")))) ;; LEFT and RIGHT (which might be both internal windows) are now the ;; two windows we want to resize. @@ -3117,10 +3191,10 @@ move it as far as possible in the desired direction." ((> delta 0) (setq max-delta (window--max-delta-1 - left 0 horizontal nil 'after nil pixelwise)) + left 0 horizontal ignore 'after nil pixelwise)) (setq min-delta (window--min-delta-1 - right (- delta) horizontal nil 'before nil pixelwise)) + right (- delta) horizontal ignore 'before nil pixelwise)) (when (or (< max-delta delta) (> min-delta (- delta))) ;; We can't get the whole DELTA - move as far as possible. (setq delta (min max-delta (- min-delta)))) @@ -3129,26 +3203,26 @@ move it as far as possible in the desired direction." (window--resize-reset frame horizontal) ;; Try to enlarge LEFT first. (setq this-delta (window--resizable - left delta horizontal nil 'after nil nil pixelwise)) + left delta horizontal ignore 'after nil nil pixelwise)) (unless (zerop this-delta) (window--resize-this-window - left this-delta horizontal nil t 'before + left this-delta horizontal ignore t 'before (if horizontal (+ (window-pixel-left left) (window-pixel-width left)) (+ (window-pixel-top left) (window-pixel-height left))))) ;; Shrink windows on right of LEFT. (window--resize-siblings - left delta horizontal nil 'after + left delta horizontal ignore 'after (if horizontal (window-pixel-left right) (window-pixel-top right))))) ((< delta 0) (setq max-delta (window--max-delta-1 - right 0 horizontal nil 'before nil pixelwise)) + right 0 horizontal ignore 'before nil pixelwise)) (setq min-delta (window--min-delta-1 - left delta horizontal nil 'after nil pixelwise)) + left delta horizontal ignore 'after nil pixelwise)) (when (or (< max-delta (- delta)) (> min-delta delta)) ;; We can't get the whole DELTA - move as far as possible. (setq delta (max (- max-delta) min-delta))) @@ -3158,16 +3232,16 @@ move it as far as possible in the desired direction." ;; Try to enlarge RIGHT. (setq this-delta (window--resizable - right (- delta) horizontal nil 'before nil nil pixelwise)) + right (- delta) horizontal ignore 'before nil nil pixelwise)) (unless (zerop this-delta) (window--resize-this-window - right this-delta horizontal nil t 'after + right this-delta horizontal ignore t 'after (if horizontal (window-pixel-left right) (window-pixel-top right)))) ;; Shrink windows on left of RIGHT. (window--resize-siblings - right (- delta) horizontal nil 'before + right (- delta) horizontal ignore 'before (if horizontal (+ (window-pixel-left left) (window-pixel-width left)) (+ (window-pixel-top left) (window-pixel-height left))))))) @@ -3189,6 +3263,8 @@ make selected window wider by DELTA columns. If DELTA is negative, shrink selected window by -DELTA lines or columns." (interactive "p") (let ((minibuffer-window (minibuffer-window))) + (when (window-preserved-size nil horizontal) + (window-preserve-size nil horizontal)) (cond ((zerop delta)) ((window-size-fixed-p nil horizontal) @@ -3222,6 +3298,8 @@ negative, enlarge selected window by -DELTA lines or columns. Also see the `window-min-height' variable." (interactive "p") (let ((minibuffer-window (minibuffer-window))) + (when (window-preserved-size nil horizontal) + (window-preserve-size nil horizontal)) (cond ((zerop delta)) ((window-size-fixed-p nil horizontal) @@ -4363,7 +4441,7 @@ frame. The selected window is not changed by this function." (divider-width (if horizontal (frame-right-divider-width frame) (frame-bottom-divider-width frame))) - atom-root) + atom-root ignore) (window--check frame) (catch 'done (cond @@ -4427,10 +4505,11 @@ frame. The selected window is not changed by this function." (if resize ;; When resizing try to give the new window the ;; average size of a window in its combination. - (min (- parent-pixel-size - (window-min-size parent horizontal nil t)) - (/ parent-pixel-size - (1+ (window-combinations parent horizontal)))) + (max (min (- parent-pixel-size + (window-min-size parent horizontal nil t)) + (/ parent-pixel-size + (1+ (window-combinations parent horizontal)))) + (window-min-pixel-size)) ;; Else try to give the new window half the size ;; of WINDOW (plus an eventual odd pixel). (/ old-pixel-size 2))) @@ -4459,12 +4538,20 @@ frame. The selected window is not changed by this function." (cond (resize ;; SIZE unspecified, resizing. - (unless (window-sizable-p - parent (- new-pixel-size divider-width) horizontal nil t) + (unless (or (window-sizable-p + parent (- (+ new-pixel-size divider-width)) horizontal + nil t) + (window-sizable-p + parent (- (+ new-pixel-size divider-width)) horizontal + (setq ignore 'preserved) t)) (error "Window %s too small for splitting (1)" parent))) - ((> (+ new-pixel-size divider-width - (window-min-size window horizontal nil t)) - old-pixel-size) + ((and (> (+ new-pixel-size divider-width + (window-min-size window horizontal nil t)) + old-pixel-size) + (> (+ new-pixel-size divider-width + (window-min-size + window horizontal (setq ignore 'preserved) t)) + old-pixel-size)) ;; SIZE unspecified, no resizing. (error "Window %s too small for splitting (2)" window)))) ((and (>= pixel-size 0) @@ -4477,8 +4564,12 @@ frame. The selected window is not changed by this function." (error "Window %s too small for splitting (3)" window)) (resize ;; SIZE specified, resizing. - (unless (window-sizable-p - parent (- new-pixel-size divider-width) horizontal nil t) + (unless (or (window-sizable-p + parent (- (+ new-pixel-size divider-width)) horizontal + nil t) + (window-sizable-p + parent (- (+ new-pixel-size divider-width)) horizontal + (setq ignore 'preserved) t)) ;; If we cannot resize the parent give up. (error "Window %s too small for splitting (4)" parent))) ((or (< new-pixel-size @@ -4512,7 +4603,7 @@ frame. The selected window is not changed by this function." ;; delete the one we create here. Hence we do not go up. (progn (window--resize-child-windows - parent (- new-pixel-size) horizontal) + parent (- new-pixel-size) horizontal nil ignore) (let* ((normal (- 1.0 new-normal)) (sub (window-child parent))) (while sub @@ -4522,10 +4613,8 @@ frame. The selected window is not changed by this function." ;; Get entire space from WINDOW. (set-window-new-pixel window (- old-pixel-size new-pixel-size)) -;; (set-window-new-pixel window (- old-pixel-size new-pixel-size)) -;; (set-window-new-total -;; window (- old-size new-size)) - (window--resize-this-window window (- new-pixel-size) horizontal) + (window--resize-this-window + window (- new-pixel-size) horizontal ignore) (set-window-new-normal window (- (if new-parent 1.0 (window-normal-size window horizontal)) new-normal))) @@ -4579,7 +4668,7 @@ the original point in both windows." (defun split-window-below (&optional size) "Split the selected window into two windows, one above the other. The selected window is above. The newly split-off window is -below, and displays the same buffer. Return the new window. +below and displays the same buffer. Return the new window. If optional argument SIZE is omitted or nil, both windows get the same height, or close to it. If SIZE is positive, the upper @@ -4633,7 +4722,7 @@ amount of redisplay; this is convenient on slow terminals." (defun split-window-right (&optional size) "Split the selected window into two side-by-side windows. The selected window is on the left. The newly split-off window -is on the right, and displays the same buffer. Return the new +is on the right and displays the same buffer. Return the new window. If optional argument SIZE is omitted or nil, both windows get the @@ -5131,7 +5220,7 @@ value can be also stored on disk and read back in a new session." (let ((scroll-bars (cdr (assq 'scroll-bars state)))) (set-window-scroll-bars window (car scroll-bars) (nth 2 scroll-bars) - (or (nth 3 scroll-bars) 0) (nth 5 scroll-bars))) + (nth 3 scroll-bars) (nth 5 scroll-bars))) (set-window-vscroll window (cdr (assq 'vscroll state))) ;; Adjust vertically. (if (memq window-size-fixed '(t height)) @@ -5967,7 +6056,8 @@ live." (let ((parameter (window-parameter window 'quit-restore)) (height (cdr (assq 'window-height alist))) (width (cdr (assq 'window-width alist))) - (size (cdr (assq 'window-size alist)))) + (size (cdr (assq 'window-size alist))) + (preserve-size (cdr (assq 'preserve-size alist)))) (cond ((or (eq type 'frame) (and (eq (car parameter) 'same) @@ -6022,7 +6112,11 @@ live." (window-combined-p window t)) (window-resize window delta t 'safe)))) ((functionp width) - (ignore-errors (funcall width window))))))) + (ignore-errors (funcall width window)))) + ;; Preserve window size if asked for. + (when (consp preserve-size) + (window-preserve-size window t (car preserve-size)) + (window-preserve-size window nil (cdr preserve-size)))))) window)) @@ -6241,6 +6335,10 @@ Recognized alist entries include: of not displaying the buffer and FUNCTION can safely return a non-window value to suppress displaying. + `preserve-size' -- Value should be either '(t . nil)' to + preserve the width of the window, '(nil . t)' to preserve its + height or '(t . t)' to preserve both. + The ACTION argument to `display-buffer' can also have a non-nil and non-list value. This means to display the buffer in a window other than the selected one, even if it is already displayed in @@ -7242,7 +7340,7 @@ FRAME." (frame-text-height)) frame-resize-pixelwise))))) -(defun fit-window-to-buffer (&optional window max-height min-height max-width min-width) +(defun fit-window-to-buffer (&optional window max-height min-height max-width min-width preserve-size) "Adjust size of WINDOW to display its buffer's contents exactly. WINDOW must be a live window and defaults to the selected one. @@ -7266,6 +7364,9 @@ and defaults to `window-min-width'. Both MAX-WIDTH and MIN-WIDTH are specified in columns and include fringes, margins, a scrollbar and a vertical divider, if any. +If the optional argument `preserve-size' is non-nil, preserve the +size of WINDOW (see `window-preserve-size'). + Fit pixelwise if the option `window-resize-pixelwise' is non-nil. If WINDOW is its frame's root window and the option `fit-frame-to-buffer' is non-nil, call `fit-frame-to-buffer' to @@ -7307,25 +7408,25 @@ accessible position." (max (if pixelwise (* char-height window-min-height) window-min-height) - (window-min-size nil nil t pixelwise)))) + (window-min-size window nil window pixelwise)))) (max-height ;; Sanitize MAX-HEIGHT. (if (numberp max-height) (min (+ total-height (window-max-delta - window nil nil nil nil nil pixelwise)) + window nil window nil nil nil pixelwise)) (if pixelwise (* char-height max-height) max-height)) (+ total-height (window-max-delta - window nil nil nil nil nil pixelwise)))) + window nil window nil nil nil pixelwise)))) height) (cond ;; If WINDOW is vertically combined, try to resize it ;; vertically. ((and (not (eq fit-window-to-buffer-horizontally 'only)) - (not (window-size-fixed-p window)) + (not (window-size-fixed-p window 'preserved)) (window-combined-p)) ;; Vertically we always want to fit the entire buffer. ;; WINDOW'S height can't get larger than its frame's pixel @@ -7338,14 +7439,17 @@ accessible position." (unless pixelwise (setq height (/ (+ height char-height -1) char-height))) (unless (= height total-height) + (window-preserve-size window) (window-resize-no-error window (- (max min-height (min max-height height)) total-height) - nil window pixelwise))) + nil window pixelwise) + (when preserve-size + (window-preserve-size window nil t)))) ;; If WINDOW is horizontally combined, try to resize it ;; horizontally. ((and fit-window-to-buffer-horizontally - (not (window-size-fixed-p window t)) + (not (window-size-fixed-p window t 'preserved)) (window-combined-p nil t)) (let* ((total-width (window-size window t pixelwise)) (min-width @@ -7362,18 +7466,18 @@ accessible position." (max (if pixelwise (* char-width window-min-width) window-min-width) - (window-min-size nil nil t pixelwise)))) + (window-min-size nil nil window pixelwise)))) (max-width ;; Sanitize MAX-WIDTH. (if (numberp max-width) (min (+ total-width (window-max-delta - nil t nil nil nil nil pixelwise)) + window t window nil nil nil pixelwise)) (if pixelwise (* char-width max-width) max-width)) (+ total-width (window-max-delta - nil t nil nil nil nil pixelwise)))) + window t window nil nil nil pixelwise)))) ;; When fitting horizontally, assume that WINDOW's ;; start position remains unaltered. WINDOW can't get ;; wider than its frame's pixel width, its height @@ -7391,13 +7495,16 @@ accessible position." (unless pixelwise (setq width (/ (+ width char-width -1) char-width))) (unless (= width body-width) + (window-preserve-size window t) (window-resize-no-error window (- (max min-width (min max-width (+ total-width (- width body-width)))) total-width) - t window pixelwise))))))))) + t window pixelwise) + (when preserve-size + (window-preserve-size window t t)))))))))) (defun window-safely-shrinkable-p (&optional window) "Return t if WINDOW can be shrunk without shrinking other windows. diff --git a/src/ChangeLog b/src/ChangeLog index 2b125d5..6fabfb4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2014-12-18 Martin Rudalics + + * frame.c (frame_windows_min_size): New argument IGNORE. + (adjust_frame_size): When called from change_frame_size call + frame_windows_min_size with IGNORE Qt so we can ignore size + restrictions. + 2014-12-18 Eli Zaretskii * font.c (Ffont_info): Add more font information to the vector diff --git a/src/frame.c b/src/frame.c index eaab63a..3127366 100644 --- a/src/frame.c +++ b/src/frame.c @@ -335,9 +335,9 @@ predicates which report frame's specific UI-related capabilities. */) } static int -frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object pixelwise) +frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) { - return XINT (call3 (Qframe_windows_min_size, frame, horizontal, pixelwise)); + return XINT (call4 (Qframe_windows_min_size, frame, horizontal, ignore, pixelwise)); } @@ -419,8 +419,10 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, /* The following two values are calculated from the old window body sizes and any "new" settings for scroll bars, dividers, fringes and margins (though the latter should have been processed already). */ - min_windows_width = frame_windows_min_size (frame, Qt, Qt); - min_windows_height = frame_windows_min_size (frame, Qnil, Qt); + min_windows_width + = frame_windows_min_size (frame, Qt, (inhibit == 5) ? Qt : Qnil, Qt); + min_windows_height + = frame_windows_min_size (frame, Qnil, (inhibit == 5) ? Qt : Qnil, Qt); if (inhibit >= 2 && inhibit <= 4) /* If INHIBIT is in [2..4] inhibit if the "old" window sizes stay diff --git a/src/window.c b/src/window.c index ca2bc74..2177a1d 100644 --- a/src/window.c +++ b/src/window.c @@ -4135,11 +4135,7 @@ values. */) /* Resize frame F's windows when number of lines of F is set to SIZE. HORFLAG 1 means resize windows when number of columns of F is set to - SIZE. PIXELWISE 1 means to interpret SIZE as pixels. - - This function can delete all windows but the selected one in order to - satisfy the request. The result will be meaningful if and only if - F's windows have meaningful sizes when you call this. */ + SIZE. PIXELWISE 1 means to interpret SIZE as pixels. */ void resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) { commit 36c43e95de5e067b7d6a06db479765b4e4a22986 Author: Dmitry Gutov Date: Thu Dec 18 18:44:11 2014 +0200 Fixes: debbugs:19390 * lisp/emacs-lisp/package.el (package-activate): Do not re-activate or reload the dependencies. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b207dee..1659027 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-18 Dmitry Gutov + + * emacs-lisp/package.el (package-activate): Do not re-activate or + reload the dependencies (bug#19390). + 2014-12-18 Stefan Monnier * progmodes/cc-cmds.el (c-subword-mode): Alias to subword-mode. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 1949d0d..11333ec 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -642,7 +642,7 @@ If FORCE is true, (re-)activate it if it's already activated." (fail (catch 'dep-failure ;; Activate its dependencies recursively. (dolist (req (package-desc-reqs pkg-vec)) - (unless (package-activate (car req) force) + (unless (package-activate (car req)) (throw 'dep-failure req)))))) (if fail (warn "Unable to activate package `%s'. commit 39ead8cdfcaa921beb901ecbf27c19314221aa32 Author: Stefan Monnier Date: Thu Dec 18 11:18:21 2014 -0500 * lisp/progmodes/cc-cmds.el (c-subword-mode): Alias to subword-mode. (c-update-modeline): * lisp/progmodes/cc-langs.el (c-mode-menu): Use c-subword-mode. * lisp/progmodes/cc-mode.el (subword-mode): Move autoload to cc-cmds.el. (c-mode-base-map): Use c-subword-mode. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb8348e..b207dee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,15 @@ +2014-12-18 Stefan Monnier + + * progmodes/cc-cmds.el (c-subword-mode): Alias to subword-mode. + (c-update-modeline): + * progmodes/cc-langs.el (c-mode-menu): Use c-subword-mode. + * progmodes/cc-mode.el (subword-mode): Move autoload to cc-cmds.el. + (c-mode-base-map): Use c-subword-mode. + 2014-12-18 Eli Zaretskii - * international/mule-diag.el (describe-font-internal): Display - additional info returned by font-info. + * international/mule-diag.el (describe-font-internal): + Display additional info returned by font-info. * linum.el (linum--face-width): Rename from linum--face-height, and use the new functionality of font-info. @@ -21,8 +29,8 @@ 2014-12-17 Sam Steingold - * emacs-lisp/package.el (package--list-loaded-files): Handle - `(nil ...)' elements in `load-history'. + * emacs-lisp/package.el (package--list-loaded-files): + Handle `(nil ...)' elements in `load-history'. 2014-12-17 Teodor Zlatanov @@ -152,8 +160,8 @@ 2014-12-13 Fabián Ezequiel Gallina - * progmodes/python.el (python-shell-parse-command): Quote - `python-shell-interpreter`. (Bug#19289) + * progmodes/python.el (python-shell-parse-command): + Quote `python-shell-interpreter`. (Bug#19289) 2014-12-12 Stefan Monnier diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 55b676b..0724697 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -258,9 +258,11 @@ With universal argument, inserts the analysis as a comment on that line." "a" "") (if c-hungry-delete-key "h" "") (if (and - ;; subword might not be loaded. - (boundp 'subword-mode) - (symbol-value 'subword-mode)) + ;; (cc-)subword might not be loaded. + (boundp 'c-subword-mode) + (symbol-value 'c-subword-mode)) + ;; FIXME: subword-mode already comes with its + ;; own lighter! "w" ""))) ;; FIXME: Derived modes might want to use something else @@ -1304,6 +1306,17 @@ keyword on the line, the keyword is not inserted inside a literal, and (declare-function subword-forward "subword" (&optional arg)) (declare-function subword-backward "subword" (&optional arg)) +(cond + ((and (fboundp 'subword-mode) (not (fboundp 'c-subword-mode))) + ;; Recent Emacsen come with their own subword support. Use that. + (define-obsolete-function-alias 'c-subword-mode 'subword-mode "24.3") + (define-obsolete-variable-alias 'c-subword-mode 'subword-mode "24.3")) + (t + ;; Autoload directive for emacsen that doesn't have an older CC Mode + ;; version in the dist. + (autoload 'c-subword-mode "cc-subword" + "Mode enabling subword movement and editing keys." t))) + ;; "nomenclature" functions + c-scope-operator. (defun c-forward-into-nomenclature (&optional arg) "Compatibility alias for `c-forward-subword'." diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 375725e..b93cc78 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -318,9 +318,9 @@ the evaluated constant value at compile time." :style toggle :selected c-auto-newline] ["Hungry delete" c-toggle-hungry-state :style toggle :selected c-hungry-delete-key] - ["Subword mode" subword-mode - :style toggle :selected (and (boundp 'subword-mode) - subword-mode)]))) + ["Subword mode" c-subword-mode + :style toggle :selected (and (boundp 'c-subword-mode) + c-subword-mode)]))) ;;; Syntax tables. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 4b8e41f..a482447 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -108,11 +108,6 @@ ;; with your version of Emacs, you are incompatible! (cc-external-require 'easymenu) -;; Autoload directive for emacsen that doesn't have an older CC Mode -;; version in the dist. -(autoload 'subword-mode "subword" - "Mode enabling subword movement and editing keys." t) - ;; Load cc-fonts first after font-lock is loaded, since it isn't ;; necessary until font locking is requested. ; (eval-after-load "font-lock" ; 2006-07-09: font-lock is now preloaded. @@ -379,7 +374,7 @@ control). See \"cc-mode.el\" for more info." ;; conflicts with OOBR ;;(define-key c-mode-base-map "\C-c\C-v" 'c-version) ;; (define-key c-mode-base-map "\C-c\C-y" 'c-toggle-hungry-state) Commented out by ACM, 2005-11-22. - (define-key c-mode-base-map "\C-c\C-w" 'subword-mode) + (define-key c-mode-base-map "\C-c\C-w" 'c-subword-mode) ) ;; We don't require the outline package, but we configure it a bit anyway. commit b1978229162b0d4c3b14d8ad8bff383eb3511969 Author: Eli Zaretskii Date: Thu Dec 18 18:07:26 2014 +0200 Allow querying font by name for its height and other info. (Bug#19395) src/font.c (Ffont_info): Add more font information to the vector returned by the function, inspired by query-font. Doc fix. doc/lispref/display.texi (Low-Level Font): Document font-info and query-font. lisp/international/mule-diag.el (describe-font-internal): Display additional info returned by font-info. lisp/linum.el (linum--face-width): Rename from linum--face-height, and use the new functionality of font-info. (linum-update-window): Use linum--face-width and frame-char-width, instead of approximating with height. etc/NEWS: Mention the enhancement in font-info. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index a48289c..7424ab0 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2014-12-18 Eli Zaretskii + + * display.texi (Low-Level Font): Document font-info and query-font. + 2014-12-16 Nicolas Petton * sequences.texi (Seq Library): Add documentation for seq.el. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 90aa979..48860c8 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3349,9 +3349,9 @@ The script that the font must support (a symbol). @item :otf @cindex OpenType font The font must be an OpenType font that supports these OpenType -features, provided Emacs is compiled with support for @samp{libotf} (a -library for performing complex text layout in certain scripts). The -value must be a list of the form +features, provided Emacs is compiled with a library, such as +@samp{libotf} on GNU/Linux, that supports complex text layout for +scripts which need that. The value must be a list of the form @smallexample @code{(@var{script-tag} @var{langsys-tag} @var{gsub} @var{gpos})} @@ -3450,6 +3450,124 @@ If the optional argument @var{fold-wildcards} is non-@code{nil}, consecutive wildcards in the XLFD are folded into one. @end defun +The following two functions return important information about a font. + +@defun font-info name &optional frame +This function returns information about a font specified by its +@var{name}, a string, as it is used on @var{frame}. If @var{frame} is +omitted or @code{nil}, it defaults to the selected frame. + +The value returned by the function is a vector of the form +@code{[@var{opened-name} @var{full-name} @var{size} @var{height} +@var{baseline-offset} @var{relative-compose} @var{default-ascent} +@var{max-width} @var{ascent} @var{descent} @var{space-width} +@var{average-width} @var{filename} @var{capability}]}. Here's the +description of each components of this vector: + +@table @var +@item opened-name +The name used to open the font, a string. + +@item full-name +The full name of the font, a string. + +@item size +The pixel size of the font. + +@item height +The height of the font in pixels. + +@item baseline-offset +The offset in pixels from the @acronym{ASCII} baseline, positive +upward. + +@item relative-compose +@itemx default-ascent +Numbers controlling how to compose characters. + +@item ascent +@itemx descent +The ascent and descent of this font. The sum of these two numbers +should be equal to the value of @var{height} above. + +@item space-width +The width, in pixels, of the font's space character. + +@item average-width +The average width of the font characters. If this is zero, Emacs uses +the value of @var{space-width} instead, when it calculates text layout +on display. + +@item filename +The file name of the font as a string. This can be @code{nil} if the +font back-end does not provide a way to find out the font's file name. + +@item capability +A list whose first element is a symbol representing the font type, one +of @code{x}, @code{opentype}, @code{truetype}, @code{type1}, +@code{pcf}, or @code{bdf}. For OpenType fonts, the list includes 2 +additional elements describing the @sc{gsub} and @sc{gpos} features +supported by the font. Each of these elements is a list of the form +@code{((@var{script} (@var{langsys} @var{feature} @dots{}) @dots{}) +@dots{})}, where @var{script} is a symbol representing an OpenType +script tag, @var{langsys} is a symbol representing an OpenType langsys +tag (or @code{nil}, which stands for the default langsys), and each +@var{feature} is a symbol representing an OpenType feature tag. +@end table +@end defun + +@defun query-font font-object +This function returns information about a @var{font-object}. (This is +in contrast to @code{font-info}, which takes the font name, a string, +as its argument.) + +The value returned by the function is a vector of the form +@code{[@var{name} @var{filename} @var{pixel-size} @var{max-width} +@var{ascent} @var{descent} @var{space-width} @var{average-width} +@var{capability}]}. Here's the description of each components of this +vector: + +@table @var +@item name +The font name, a string. + +@item filename +The file name of the font as a string. This can be @code{nil} if the +font back-end does not provide a way to find out the font's file name. + +@item pixel-size +The pixel size of the font used to open the font. + +@item max-width +The maximum advance width of the font. + +@item ascent +@itemx descent +The ascent and descent of this font. The sum of these two numbers +gives the font height. + +@item space-width +The width, in pixels, of the font's space character. + +@item average-width +The average width of the font characters. If this is zero, Emacs uses +the value of @var{space-width} instead, when it calculates text layout +on display. + +@item capability +A list whose first element is a symbol representing the font type, one +of @code{x}, @code{opentype}, @code{truetype}, @code{type1}, +@code{pcf}, or @code{bdf}. For OpenType fonts, the list includes 2 +additional elements describing the @sc{gsub} and @sc{gpos} features +supported by the font. Each of these elements is a list of the form +@code{((@var{script} (@var{langsys} @var{feature} @dots{}) @dots{}) +@dots{})}, where @var{script} is a symbol representing an OpenType +script tag, @var{langsys} is a symbol representing an OpenType langsys +tag (or @code{nil}, which stands for the default langsys), and each +@var{feature} is a symbol representing an OpenType feature tag. +@end table +@end defun + @node Fringes @section Fringes @cindex fringes diff --git a/etc/NEWS b/etc/NEWS index a17cef6..865ae07 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -108,6 +108,17 @@ environment. For the time being this is implemented for modern POSIX systems and for MS-Windows, for other systems they fall back to their counterparts `string-lessp' and `string-equal'. +*** The ls-lisp package uses `string-collate-lessp' to sort file names. +If you want the old, locale-independent sorting, customize the new +option `ls-lisp-use-string-collate' to a nil value. + +*** The MS-Windows specific variable `w32-collate-ignore-punctuation', +if set to a non-nil value, causes the above 2 functions to ignore +symbol and punctuation characters when collating strings. This +emulates the behavior of modern Posix platforms when the locale's +codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because +MS-Windows doesn't support UTF-8 as codeset in its locales. + +++ ** The new function `bidi-find-overridden-directionality' allows to find characters whose directionality was, perhaps maliciously, @@ -122,17 +133,6 @@ the visual appearance both of the copied text and the text at destination, even when the copied text includes mixed bidirectional text and directional control characters. -*** The ls-lisp package uses `string-collate-lessp' to sort file names. -If you want the old, locale-independent sorting, customize the new -option `ls-lisp-use-string-collate' to a nil value. - -*** The MS-Windows specific variable `w32-collate-ignore-punctuation', -if set to a non-nil value, causes the above 2 functions to ignore -symbol and punctuation characters when collating strings. This -emulates the behavior of modern Posix platforms when the locale's -codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because -MS-Windows doesn't support UTF-8 as codeset in its locales. - ** New variable `ns-use-fullscreen-animation' controls animation for non-native NS fullscreen. The default is nil. Set to t to enable animation when entering and leaving fullscreen. For native OSX fullscreen @@ -159,6 +159,10 @@ fontification during full screen scrolling operations, giving less hesitant operation during auto-repeat of C-v, M-v at the cost of possible inaccuracies in the end position. +** The function `font-info' now returns more details about a font. +In particular, it now returns the average width of the font's +characters, which can be used for geometry-related calculations. + * Editing Changes in Emacs 25.1 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89a92f6..cb8348e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2014-12-18 Eli Zaretskii + + * international/mule-diag.el (describe-font-internal): Display + additional info returned by font-info. + + * linum.el (linum--face-width): Rename from linum--face-height, + and use the new functionality of font-info. + (linum-update-window): Use linum--face-width and frame-char-width, + instead of approximating with height. + 2014-12-18 Dmitry Gutov * vc/vc-svn.el (vc-svn-dir-status-files): Revert the 2014-12-02 diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 13a1785..ead2dec 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -825,10 +825,18 @@ but still contains full information about each coding system." The IGNORED argument is ignored." (print-list "name (opened by):" (aref font-info 0)) (print-list " full name:" (aref font-info 1)) + (and (aref font-info 12) + (print-list " file name:" (aref font-info 12))) (print-list " size:" (format "%2d" (aref font-info 2))) (print-list " height:" (format "%2d" (aref font-info 3))) (print-list " baseline-offset:" (format "%2d" (aref font-info 4))) - (print-list "relative-compose:" (format "%2d" (aref font-info 5)))) + (print-list "relative-compose:" (format "%2d" (aref font-info 5))) + (print-list " default-ascent:" (format "%2d" (aref font-info 6))) + (print-list " ascent:" (format "%2d" (aref font-info 8))) + (print-list " descent:" (format "%2d" (aref font-info 9))) + (print-list " average-width:" (format "%2d" (aref font-info 11))) + (print-list " space-width:" (format "%2d" (aref font-info 10))) + (print-list " max-width:" (format "%2d" (aref font-info 7)))) ;;;###autoload (defun describe-font (fontname) diff --git a/lisp/linum.el b/lisp/linum.el index b13bd8d..fb2cda6 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -138,8 +138,13 @@ Linum mode is a buffer-local minor mode." (mapc #'delete-overlay linum-available) (setq linum-available nil)))) -(defun linum--face-height (face) - (aref (font-info (face-font face)) 2)) +(defun linum--face-width (face) + (let ((info (font-info (face-font face))) + width) + (setq width (aref info 11)) + (if (<= width 0) + (setq width (aref info 10))) + width)) (defun linum-update-window (win) "Update line numbers for the portion visible in window WIN." @@ -183,10 +188,8 @@ Linum mode is a buffer-local minor mode." (setq line (1+ line))) (when (display-graphic-p) (setq width (ceiling - ;; We'd really want to check the widths rather than the - ;; heights, but it's a start. - (/ (* width 1.0 (linum--face-height 'linum)) - (frame-char-height))))) + (/ (* width 1.0 (linum--face-width 'linum)) + (frame-char-width))))) (set-window-margins win width (cdr (window-margins win))))) (defun linum-after-change (beg end _len) diff --git a/src/ChangeLog b/src/ChangeLog index 16e99ae..2b125d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-12-18 Eli Zaretskii + + * font.c (Ffont_info): Add more font information to the vector + returned by the function, inspired by query-font. Doc fix. + (Bug#19395) + 2014-12-18 Stefan Monnier * keyboard.c (input_was_pending): New var. diff --git a/src/font.c b/src/font.c index 70e6316..d10d228 100644 --- a/src/font.c +++ b/src/font.c @@ -4921,8 +4921,11 @@ If FRAME is omitted or nil, use the selected frame. */) DEFUN ("font-info", Ffont_info, Sfont_info, 1, 2, 0, doc: /* Return information about a font named NAME on frame FRAME. If FRAME is omitted or nil, use the selected frame. -The returned value is a vector of OPENED-NAME, FULL-NAME, SIZE, - HEIGHT, BASELINE-OFFSET, RELATIVE-COMPOSE, and DEFAULT-ASCENT, + +The returned value is a vector: + [ OPENED-NAME FULL-NAME SIZE HEIGHT BASELINE-OFFSET RELATIVE-COMPOSE + DEFAULT-ASCENT MAX-WIDTH ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH + CAPABILITY ] where OPENED-NAME is the name used for opening the font, FULL-NAME is the full name of the font, @@ -4930,7 +4933,33 @@ where HEIGHT is the pixel-height of the font (i.e., ascent + descent), BASELINE-OFFSET is the upward offset pixels from ASCII baseline, RELATIVE-COMPOSE and DEFAULT-ASCENT are the numbers controlling - how to compose characters. + how to compose characters, + MAX-WIDTH is the maximum advance width of the font, + ASCENT, DESCENT, SPACE-WIDTH, AVERAGE-WIDTH are metrics of the font + in pixels, + FILENAME is the font file name, a string (or nil if the font backend + doesn't provide a file name). + CAPABILITY is a list whose first element is a symbol representing the + font format, one of x, opentype, truetype, type1, pcf, or bdf. + The remaining elements describe the details of the font capabilities, + as follows: + + If the font is OpenType font, the form of the list is + \(opentype GSUB GPOS) + where GSUB shows which "GSUB" features the font supports, and GPOS + shows which "GPOS" features the font supports. Both GSUB and GPOS are + lists of the form: + \((SCRIPT (LANGSYS FEATURE ...) ...) ...) + + where + SCRIPT is a symbol representing OpenType script tag. + LANGSYS is a symbol representing OpenType langsys tag, or nil + representing the default langsys. + FEATURE is a symbol representing OpenType feature tag. + + If the font is not an OpenType font, there are no elements + in CAPABILITY except the font format symbol. + If the named font is not yet loaded, return nil. */) (Lisp_Object name, Lisp_Object frame) { @@ -4966,7 +4995,7 @@ If the named font is not yet loaded, return nil. */) return Qnil; font = XFONT_OBJECT (font_object); - info = make_uninit_vector (7); + info = make_uninit_vector (14); ASET (info, 0, AREF (font_object, FONT_NAME_INDEX)); ASET (info, 1, AREF (font_object, FONT_FULLNAME_INDEX)); ASET (info, 2, make_number (font->pixel_size)); @@ -4974,6 +5003,16 @@ If the named font is not yet loaded, return nil. */) ASET (info, 4, make_number (font->baseline_offset)); ASET (info, 5, make_number (font->relative_compose)); ASET (info, 6, make_number (font->default_ascent)); + ASET (info, 7, make_number (font->max_width)); + ASET (info, 8, make_number (font->ascent)); + ASET (info, 9, make_number (font->descent)); + ASET (info, 10, make_number (font->space_width)); + ASET (info, 11, make_number (font->average_width)); + ASET (info, 12, AREF (font_object, FONT_FILE_INDEX)); + if (font->driver->otf_capability) + ASET (info, 13, Fcons (Qopentype, font->driver->otf_capability (font))); + else + ASET (info, 13, Qnil); #if 0 /* As font_object is still in FONT_OBJLIST of the entity, we can't commit 78101c2b5840218933675236062060523bdd163c Author: Stefan Monnier Date: Thu Dec 18 10:25:54 2014 -0500 * lisp/subr.el (redisplay-dont-pause): Mark as obsolete. * doc/lispref/display.texi (Forcing Redisplay): Remove references to redisplay-dont-pause and redisplay-preemption-period (which doesn't even exist). diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index dcab3ba..12554dd 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2014-12-18 Stefan Monnier + + * display.texi (Forcing Redisplay): Remove references to + redisplay-dont-pause and redisplay-preemption-period (which doesn't + even exist). + 2014-12-11 Eli Zaretskii * text.texi (Comparing Text): Prevent a text string from being diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 46be5ec..c4753ec 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -85,10 +85,7 @@ waiting for input. @defun redisplay &optional force This function tries immediately to redisplay. The optional argument @var{force}, if non-@code{nil}, forces the redisplay to be performed, -instead of being preempted, even if input is pending and the variable -@code{redisplay-dont-pause} is @code{nil} (see below). If -@code{redisplay-dont-pause} is non-@code{nil} (the default), this -function redisplays in any case, i.e., @var{force} does nothing. +instead of being preempted if input is pending. The function returns @code{t} if it actually tried to redisplay, and @code{nil} otherwise. A value of @code{t} does not mean that @@ -96,28 +93,6 @@ redisplay proceeded to completion; it could have been preempted by newly arriving input. @end defun -@defvar redisplay-dont-pause -If this variable is @code{nil}, arriving input events preempt -redisplay; Emacs avoids starting a redisplay, and stops any redisplay -that is in progress, until the input has been processed. In -particular, @code{(redisplay)} returns @code{nil} without actually -redisplaying, if there is pending input. - -The default value is @code{t}, which means that pending input does not -preempt redisplay. -@end defvar - -@defvar redisplay-preemption-period -If @code{redisplay-dont-pause} is @code{nil}, this variable specifies -how many seconds Emacs waits between checks for new input during -redisplay; if input arrives during this interval, redisplay stops and -the input is processed. The default value is 0.1; if the value is -@code{nil}, Emacs does not check for input during redisplay. - -This variable has no effect when @code{redisplay-dont-pause} is -non-@code{nil} (the default). -@end defvar - @defvar pre-redisplay-function A function run just before redisplay. It is called with one argument, the set of windows to redisplay. diff --git a/etc/NEWS b/etc/NEWS index 3d580ee..b34bca8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -27,6 +27,9 @@ otherwise leave it unmarked. --- ** The default value of `history-length' has increased to 100. ++++ +** `redisplay-dont-pause' is declared as obsolete. + * Changes in Specialized Modes and Packages in Emacs 24.5 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a7fe332..34c335c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-18 Stefan Monnier + + * subr.el (redisplay-dont-pause): Mark as obsolete. + 2014-12-17 Michael Albinus * net/tramp.el (tramp-error-with-buffer): Call `message' properly. diff --git a/lisp/subr.el b/lisp/subr.el index 839b915..0a8b240 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1292,6 +1292,7 @@ is converted into a string by expressing it in decimal." (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") (make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1") (make-obsolete-variable 'deferred-action-function 'post-command-hook "24.1") +(make-obsolete-variable 'redisplay-dont-pause nil "24.5") (make-obsolete 'window-redisplay-end-trigger nil "23.1") (make-obsolete 'set-window-redisplay-end-trigger nil "23.1") commit 687ae680bd12b0353e313808253e7a07c0828ebe Author: Dmitry Gutov Date: Thu Dec 18 15:51:34 2014 +0200 Remove extra semicolons diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index f477b39..5c87cab 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -206,7 +206,7 @@ If you want to force an empty list of arguments, use t." "Run 'svn status' for DIR and update BUFFER via CALLBACK. CALLBACK is called as (CALLBACK RESULT BUFFER), where RESULT is a list of conses (FILE . STATE) for directory DIR." - ;; ;; FIXME shouldn't this rather default to all the files in dir? + ;; FIXME shouldn't this rather default to all the files in dir? (apply #'vc-svn-command (current-buffer) 'async nil "status" "-u" files) (vc-run-delayed (vc-svn-after-dir-status callback))) commit af1040b3f4ec4dbf714a532846b9639abcddb105 Author: Dmitry Gutov Date: Thu Dec 18 15:47:11 2014 +0200 Fix recent vc-svn-dir-status-files breakage Fixes: debbugs:19387 debbugs:19405 * lisp/vc/vc-svn.el (vc-svn-dir-status-files): Revert the 2014-12-02 change. Use `apply' on `vc-dir-command'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d5cdd1..89a92f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-12-18 Dmitry Gutov + * vc/vc-svn.el (vc-svn-dir-status-files): Revert the 2014-12-02 + change (bug#19387). Use `apply' on `vc-dir-command' (bug#19405). + * emacs-lisp/package.el (package-activate-1): Add RELOAD argument and a docstring. (package-activate): Call itself on dependencies on PACKAGE with diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index eedccd8..f477b39 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -202,12 +202,12 @@ If you want to force an empty list of arguments, use t." (autoload 'vc-expand-dirs "vc") -(defun vc-svn-dir-status-files (dir files callback) +(defun vc-svn-dir-status-files (_dir files callback) "Run 'svn status' for DIR and update BUFFER via CALLBACK. CALLBACK is called as (CALLBACK RESULT BUFFER), where RESULT is a list of conses (FILE . STATE) for directory DIR." - (if (not files) (setq files (vc-expand-dirs (list dir) 'SVN))) - (vc-svn-command (current-buffer) 'async nil "status" "-u" files) + ;; ;; FIXME shouldn't this rather default to all the files in dir? + (apply #'vc-svn-command (current-buffer) 'async nil "status" "-u" files) (vc-run-delayed (vc-svn-after-dir-status callback))) (defun vc-svn-dir-extra-headers (_dir) commit 62d7857d909db70d6f8bc8e13a5361160040989a Author: Nicolas Petton Date: Thu Dec 18 14:31:46 2014 +0100 * etc/NEWS: Add a short description of seq.el. diff --git a/etc/NEWS b/etc/NEWS index ca3294a..a17cef6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -282,6 +282,12 @@ appending FUN to `minibuffer-setup-hook'. ** cl-lib *** New functions cl-fresh-line, cl-digit-char-p and cl-parse-integer. +** seq +*** New seq library: +The seq library adds sequence manipulation functions and macros that +complement basic functions provided by subr.el. All functions are +prefixed with `seq-' and work on lists, strings and vectors. + ** Calendar and diary +++ commit d20acfe06340953dce443795d28ac224a2223414 Author: Eric Abrahamsen Date: Thu Dec 18 11:22:02 2014 +0000 Fix Gnus registry pruning and sorting, and rename file * lisp/gnus/gnus-registry.el (gnus-registry-prune-factor): Add new variable. (gnus-registry-max-pruned-entries): Remove obsolete variable. (gnus-registry-cache-file): Change default filename extension to "eieio". (gnus-registry-read): Add new function, split out from `gnus-registry-load', that does the actual object reading. (gnus-registry-load): Use it. Add condition case handler to check for old filename extension and rename to the new one. (gnus-registry-default-sort-function): New variable to specify a sort function to use when pruning. (gnus-registry-save, gnus-registry-insert): Use it. (gnus-registry-sort-by-creation-time): Define a default sort function. * lisp/gnus/registry.el (registry-db): Consolidate the :max-hard and :max-soft slots into a :max-size slot. (registry-db-version): Add new variable for database version number. (registry-prune): Use :max-size slot. Accept and use a sort-function argument. (registry-collect-prune-candidates): Add new function for finding non-precious pruning candidates. (registry-prune-hard-candidates, registry-prune-soft-candidates): Remove obsolete functions. (initialize-instance): Upgrade registry version when starting. * doc/misc/gnus.texi (Gnus Registry Setup): Explain pruning changes. Mention gnus-registry-prune-factor. Explain sorting changes and gnus-registry-default-sort-function. Correct file extension. diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 76b5303..cd8b7f3 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-18 Eric Abrahamsen + + * gnus.texi (Gnus Registry Setup): Explain pruning changes. Mention + gnus-registry-prune-factor. Explain sorting changes and + gnus-registry-default-sort-function. Correct file extension. + 2014-12-17 Jay Belanger * calc.texi (About This Manual): Update instructions diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 57aee27..6e3dced 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -25953,17 +25953,34 @@ the word ``archive'' is not followed. @defvar gnus-registry-max-entries The number (an integer or @code{nil} for unlimited) of entries the -registry will keep. +registry will keep. If the registry has reached or exceeded this +size, it will reject insertion of new entries. @end defvar -@defvar gnus-registry-max-pruned-entries -The maximum number (an integer or @code{nil} for unlimited) of entries -the registry will keep after pruning. +@defvar gnus-registry-prune-factor +This option (a float between 0 and 1) controls how much the registry +is cut back during pruning. In order to prevent constant pruning, the +registry will be pruned back to less than +@code{gnus-registry-max-entries}. This option controls exactly how +much less: the target is calculated as the maximum number of entries +minus the maximum number times this factor. The default is 0.1: +i.e. if your registry is limited to 50000 entries, pruning will try to +cut back to 45000 entries. Entries with keys marked as precious will +not be pruned. +@end defvar + +@defvar gnus-registry-default-sort-function +This option specifies how registry entries are sorted during pruning. +If a function is given, it should sort least valuable entries first, +as pruning starts from the beginning of the list. The default value +is @code{gnus-registry-sort-by-creation-time}, which proposes the +oldest entries for pruning. Set to nil to perform no sorting, which +will speed up the pruning process. @end defvar @defvar gnus-registry-cache-file The file where the registry will be stored between Gnus sessions. By -default the file name is @code{.gnus.registry.eioio} in the same +default the file name is @code{.gnus.registry.eieio} in the same directory as your @code{.newsrc.eld}. @end defvar diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d8dd1d3..5f0ed9d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,29 @@ +2014-12-18 Eric Abrahamsen + + * registry.el (registry-db): Consolidate the :max-hard and :max-soft + slots into a :max-size slot. + (registry-db-version): Add new variable for database version number. + (registry-prune): Use :max-size slot. Accept and use a sort-function + argument. + (registry-collect-prune-candidates): Add new function for finding + non-precious pruning candidates. + (registry-prune-hard-candidates, registry-prune-soft-candidates): + Remove obsolete functions. + (initialize-instance): Upgrade registry version when starting. + + * gnus-registry.el (gnus-registry-prune-factor): Add new variable. + (gnus-registry-max-pruned-entries): Remove obsolete variable. + (gnus-registry-cache-file): Change default + filename extension to "eieio". + (gnus-registry-read): Add new function, split out from + `gnus-registry-load', that does the actual object reading. + (gnus-registry-load): Use it. Add condition case handler to check for + old filename extension and rename to the new one. + (gnus-registry-default-sort-function): New variable to specify a sort + function to use when pruning. + (gnus-registry-save, gnus-registry-insert): Use it. + (gnus-registry-sort-by-creation-time): Define a default sort function. + 2014-12-09 Lars Magne Ingebrigtsen * gnus-art.el (gnus-article-mime-handles): Refactored out into own diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index f3b81f7..92f8f04 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -176,6 +176,7 @@ nnmairix groups are specifically excluded because they are ephemeral." (make-obsolete-variable 'gnus-registry-max-track-groups nil "23.4") (make-obsolete-variable 'gnus-registry-entry-caching nil "23.4") (make-obsolete-variable 'gnus-registry-trim-articles-without-groups nil "23.4") +(make-obsolete-variable 'gnus-registry-max-pruned-entries nil "24.4") (defcustom gnus-registry-track-extra '(subject sender recipient) "Whether the registry should track extra data about a message. @@ -231,7 +232,7 @@ the Bit Bucket." (defcustom gnus-registry-cache-file (nnheader-concat (or gnus-dribble-directory gnus-home-directory "~/") - ".gnus.registry.eioio") + ".gnus.registry.eieio") "File where the Gnus registry will be stored." :group 'gnus-registry :type 'file) @@ -242,12 +243,38 @@ the Bit Bucket." :type '(radio (const :format "Unlimited " nil) (integer :format "Maximum number: %v"))) -(defcustom gnus-registry-max-pruned-entries nil - "Maximum number of pruned entries in the registry, nil for unlimited." - :version "24.1" +(defcustom gnus-registry-prune-factor 0.1 + "When pruning, try to prune back to this factor less than the maximum size. + +In order to prevent constant pruning, we prune back to a number +somewhat less than the maximum size. This option controls +exactly how much less. For example, given a maximum size of +50000 and a prune factor of 0.1, the pruning process will try to +cut the registry back to \(- 50000 \(* 50000 0.1\)\) -> 45000 +entries. The pruning process is constrained by the presence of +\"precious\" entries." + :version "24.4" :group 'gnus-registry - :type '(radio (const :format "Unlimited " nil) - (integer :format "Maximum number: %v"))) + :type 'float) + +(defcustom gnus-registry-default-sort-function + #'gnus-registry-sort-by-creation-time + "Sort function to use when pruning the registry. + +Entries which sort to the front of the list will be pruned +first. + +This can slow pruning down. Set to nil to perform no sorting." + :version "24.4" + :group 'gnus-registry + :type 'symbol) + +(defun gnus-registry-sort-by-creation-time (l r) + "Sort older entries to front of list." + ;; Pruning starts from the front of the list. + (time-less-p + (cadr (assq 'creation-time r)) + (cadr (assq 'creation-time l)))) (defun gnus-registry-fixup-registry (db) (when db @@ -255,14 +282,12 @@ the Bit Bucket." (oset db :precious (append gnus-registry-extra-entries-precious '())) - (oset db :max-hard + (oset db :max-size (or gnus-registry-max-entries most-positive-fixnum)) (oset db :prune-factor - 0.1) - (oset db :max-soft - (or gnus-registry-max-pruned-entries - most-positive-fixnum)) + (or gnus-registry-prune-factor + 0.1)) (oset db :tracked (append gnus-registry-track-extra '(mark group keyword))) @@ -278,8 +303,8 @@ the Bit Bucket." "Gnus Registry" :file (or file gnus-registry-cache-file) ;; these parameters are set in `gnus-registry-fixup-registry' - :max-hard most-positive-fixnum - :max-soft most-positive-fixnum + :max-size most-positive-fixnum + :version registry-db-version :precious nil :tracked nil))) @@ -295,22 +320,27 @@ This is not required after changing `gnus-registry-cache-file'." (gnus-message 4 "Remaking the Gnus registry") (setq gnus-registry-db (gnus-registry-make-db)))) -(defun gnus-registry-read () - "Read the registry cache file." +(defun gnus-registry-load () + "Load the registry from the cache file." (interactive) (let ((file gnus-registry-cache-file)) (condition-case nil - (progn - (gnus-message 5 "Reading Gnus registry from %s..." file) - (setq gnus-registry-db - (gnus-registry-fixup-registry - (condition-case nil - (with-no-warnings - (eieio-persistent-read file 'registry-db)) - ;; Older EIEIO versions do not check the class name. - ('wrong-number-of-arguments - (eieio-persistent-read file))))) - (gnus-message 5 "Reading Gnus registry from %s...done" file)) + (gnus-registry-read file) + (file-error + ;; Fix previous mis-naming of the registry file. + (let ((old-file-name + (concat (file-name-sans-extension + gnus-registry-cache-file) + ".eioio"))) + (if (and (file-exists-p old-file-name) + (yes-or-no-p + (format "Rename registry file from %s to %s? " + old-file-name file))) + (progn + (gnus-registry-read old-file-name) + (oset gnus-registry-db :file file) + (gnus-message 1 "Registry filename changed to %s" file)) + (gnus-registry-remake-db t)))) (error (gnus-message 1 @@ -318,6 +348,19 @@ This is not required after changing `gnus-registry-cache-file'." file) (gnus-registry-remake-db t))))) +(defun gnus-registry-read (file) + "Do the actual reading of the registry persistence file." + (gnus-message 5 "Reading Gnus registry from %s..." file) + (setq gnus-registry-db + (gnus-registry-fixup-registry + (condition-case nil + (with-no-warnings + (eieio-persistent-read file 'registry-db)) + ;; Older EIEIO versions do not check the class name. + ('wrong-number-of-arguments + (eieio-persistent-read file))))) + (gnus-message 5 "Reading Gnus registry from %s...done" file)) + (defun gnus-registry-save (&optional file db) "Save the registry cache file." (interactive) @@ -325,7 +368,8 @@ This is not required after changing `gnus-registry-cache-file'." (db (or db gnus-registry-db))) (gnus-message 5 "Saving Gnus registry (%d entries) to %s..." (registry-size db) file) - (registry-prune db) + (registry-prune + db gnus-registry-default-sort-function) ;; TODO: call (gnus-string-remove-all-properties v) on all elements? (eieio-persistent-save db file) (gnus-message 5 "Saving Gnus registry (size %d) to %s...done" @@ -1032,7 +1076,8 @@ only the last one's marks are returned." "Just like `registry-insert' but tries to prune on error." (when (registry-full db) (message "Trying to prune the registry because it's full") - (registry-prune db)) + (registry-prune + db gnus-registry-default-sort-function)) (registry-insert db id entry) entry) @@ -1090,7 +1135,7 @@ only the last one's marks are returned." (gnus-message 5 "Initializing the registry") (gnus-registry-install-hooks) (gnus-registry-install-shortcuts) - (gnus-registry-read)) + (gnus-registry-load)) ;; FIXME: Why autoload this function? ;;;###autoload @@ -1104,7 +1149,7 @@ only the last one's marks are returned." (add-hook 'nnmail-spool-hook 'gnus-registry-spool-action) (add-hook 'gnus-save-newsrc-hook 'gnus-registry-save) - (add-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read) + (add-hook 'gnus-read-newsrc-el-hook 'gnus-registry-load) (add-hook 'gnus-summary-prepare-hook 'gnus-registry-register-message-ids)) @@ -1117,7 +1162,7 @@ only the last one's marks are returned." (remove-hook 'nnmail-spool-hook 'gnus-registry-spool-action) (remove-hook 'gnus-save-newsrc-hook 'gnus-registry-save) - (remove-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read) + (remove-hook 'gnus-read-newsrc-el-hook 'gnus-registry-load) (remove-hook 'gnus-summary-prepare-hook 'gnus-registry-register-message-ids) (setq gnus-registry-enabled nil)) diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el index 24a3aa0..d086d64 100644 --- a/lisp/gnus/registry.el +++ b/lisp/gnus/registry.el @@ -25,11 +25,11 @@ ;; This library provides a general-purpose EIEIO-based registry ;; database with persistence, initialized with these fields: -;; version: a float, 0.1 currently (don't change it) +;; version: a float -;; max-hard: an integer, default 5000000 +;; max-size: an integer, default 50000 -;; max-soft: an integer, default 50000 +;; prune-factor: a float between 0 and 1, default 0.1 ;; precious: a list of symbols @@ -57,14 +57,15 @@ ;; Note that whether a field has one or many pieces of data, the data ;; is always a list of values. -;; The user decides which fields are "precious", F2 for example. At -;; PRUNE TIME (when the :prune-function is called), the registry will -;; trim any entries without the F2 field until the size is :max-soft -;; or less. No entries with the F2 field will be removed at PRUNE -;; TIME. +;; The user decides which fields are "precious", F2 for example. When +;; the registry is pruned, any entries without the F2 field will be +;; removed until the size is :max-size * :prune-factor _less_ than the +;; maximum database size. No entries with the F2 field will be removed +;; at PRUNE TIME, which means it may not be possible to prune back all +;; the way to the target size. -;; When an entry is inserted, the registry will reject new entries -;; if they bring it over the max-hard limit, even if they have the F2 +;; When an entry is inserted, the registry will reject new entries if +;; they bring it over the :max-size limit, even if they have the F2 ;; field. ;; The user decides which fields are "tracked", F1 for example. Any @@ -82,28 +83,32 @@ (require 'eieio) (require 'eieio-base) +;; The version number needs to be kept outside of the class definition +;; itself. The persistent-save process does *not* write to file any +;; slot values that are equal to the default :initform value. If a +;; database object is at the most recent version, therefore, its +;; version number will not be written to file. That makes it +;; difficult to know when a database needs to be upgraded. +(defvar registry-db-version 0.2 + "The current version of the registry format.") + (defclass registry-db (eieio-persistent) ((version :initarg :version - :initform 0.1 - :type float - :custom float + :initform nil + :type (or null float) :documentation "The registry version.") - (max-hard :initarg :max-hard - :initform 5000000 - :type integer - :custom integer - :documentation "Never accept more than this many elements.") - (max-soft :initarg :max-soft - :initform 50000 + (max-size :initarg :max-size + :initform most-positive-fixnum :type integer :custom integer - :documentation "Prune as much as possible to get to this size.") + :documentation "The maximum number of registry entries.") (prune-factor :initarg :prune-factor :initform 0.1 :type float :custom float - :documentation "At the max-hard limit, prune size * this entries.") + :documentation "Prune to \(:max-size * :prune-factor\) less + than the :max-size limit. Should be a float between 0 and 1.") (tracked :initarg :tracked :initform nil :type t @@ -119,6 +124,23 @@ :type hash-table :documentation "The data hashtable."))) +(defmethod initialize-instance :BEFORE ((this registry-db) slots) + "Check whether a registry object needs to be upgraded." + ;; Hardcoded upgrade routines. Version 0.1 to 0.2 requires the + ;; :max-soft slot to disappear, and the :max-hard slot to be renamed + ;; :max-size. + (let ((current-version + (and (plist-member slots :version) + (plist-get slots :version)))) + (when (or (null current-version) + (eql current-version 0.1)) + (setq slots + (plist-put slots :max-size (plist-get slots :max-hard))) + (setq slots + (plist-put slots :version registry-db-version)) + (cl-remf slots :max-hard) + (cl-remf slots :max-soft)))) + (defmethod initialize-instance :AFTER ((this registry-db) slots) "Set value of data slot of THIS after initialization." (with-slots (data tracker) this @@ -255,7 +277,7 @@ This is the key count of the :data slot." (defmethod registry-full ((db registry-db)) "Checks if registry-db THIS is full." (>= (registry-size db) - (oref db :max-hard))) + (oref db :max-size))) (defmethod registry-insert ((db registry-db) key entry) "Insert ENTRY under KEY into the registry-db THIS. @@ -267,7 +289,7 @@ Errors out if the key exists already." (assert (not (registry-full db)) nil - "registry max-hard size limit reached") + "registry max-size limit reached") ;; store the entry (puthash key entry (oref db :data)) @@ -300,58 +322,51 @@ Errors out if the key exists already." (registry-lookup-secondary-value db tr val value-keys)))) (oref db :data)))))) -(defmethod registry-prune ((db registry-db) &optional sortfun) - "Prunes the registry-db object THIS. -Removes only entries without the :precious keys if it can, -then removes oldest entries first. -Returns the number of deleted entries. -If SORTFUN is given, tries to keep entries that sort *higher*. -SORTFUN is passed only the two keys so it must look them up directly." - (dolist (collector '(registry-prune-soft-candidates - registry-prune-hard-candidates)) - (let* ((size (registry-size db)) - (collected (funcall collector db)) - (limit (nth 0 collected)) - (candidates (nth 1 collected)) - ;; sort the candidates if SORTFUN was given - (candidates (if sortfun (sort candidates sortfun) candidates)) - (candidates-count (length candidates)) - ;; are we over max-soft? - (prune-needed (> size limit))) - - ;; while we have more candidates than we need to remove... - (while (and (> candidates-count (- size limit)) candidates) - (decf candidates-count) - (setq candidates (cdr candidates))) - - (registry-delete db candidates nil) - (length candidates)))) - -(defmethod registry-prune-soft-candidates ((db registry-db)) - "Collects pruning candidates from the registry-db object THIS. -Proposes only entries without the :precious keys." +(defmethod registry-prune ((db registry-db) &optional sortfunc) + "Prunes the registry-db object DB. + +Attempts to prune the number of entries down to \(* +:max-size :prune-factor\) less than the max-size limit, so +pruning doesn't need to happen on every save. Removes only +entries without the :precious keys, so it may not be possible to +reach the target limit. + +Entries to be pruned are first sorted using SORTFUNC. Entries +from the front of the list are deleted first. + +Returns the number of deleted entries." + (let ((size (registry-size db)) + (target-size (- (oref db :max-size) + (* (oref db :max-size) + (oref db :prune-factor)))) + candidates) + (if (> size target-size) + (progn + (setq candidates + (registry-collect-prune-candidates + db (- size target-size) sortfunc)) + (length (registry-delete db candidates nil))) + 0))) + +(defmethod registry-collect-prune-candidates ((db registry-db) limit sortfunc) + "Collects pruning candidates from the registry-db object DB. + +Proposes only entries without the :precious keys, and attempts to +return LIMIT such candidates. If SORTFUNC is provided, sort +entries first and return candidates from beginning of list." (let* ((precious (oref db :precious)) (precious-p (lambda (entry-key) (cdr (memq (car entry-key) precious)))) (data (oref db :data)) - (limit (oref db :max-soft)) - (candidates (loop for k being the hash-keys of data - using (hash-values v) - when (notany precious-p v) - collect k))) - (list limit candidates))) - -(defmethod registry-prune-hard-candidates ((db registry-db)) - "Collects pruning candidates from the registry-db object THIS. -Proposes any entries over the max-hard limit minus size * prune-factor." - (let* ((data (oref db :data)) - ;; prune to (size * prune-factor) below the max-hard limit so - ;; we're not pruning all the time - (limit (max 0 (- (oref db :max-hard) - (* (registry-size db) (oref db :prune-factor))))) - (candidates (loop for k being the hash-keys of data - collect k))) - (list limit candidates))) + (candidates (cl-loop for k being the hash-keys of data + using (hash-values v) + when (notany precious-p v) + collect (cons k v)))) + ;; We want the full entries for sorting, but should only return a + ;; list of entry keys. + (when sortfunc + (setq candidates (sort candidates sortfunc))) + (delq nil (cl-subseq (mapcar #'car candidates) 0 limit)))) (provide 'registry) ;;; registry.el ends here commit 18d4bdf135524f33173caa2ef2164345bd09017d Author: Dmitry Gutov Date: Thu Dec 18 12:10:34 2014 +0200 Don't reload packages at startup Fixes: debbugs:19390 * lisp/emacs-lisp/package.el (package-activate-1): Add RELOAD argument and a docstring. (package-activate): Call itself on dependencies on PACKAGE with the same FORCE argument. Pass FORCE as RELOAD into `package-activate-1' . diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87c3944..0d5cdd1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2014-12-18 Dmitry Gutov + + * emacs-lisp/package.el (package-activate-1): Add RELOAD argument + and a docstring. + (package-activate): Call itself on dependencies on PACKAGE with + the same FORCE argument. Pass FORCE as RELOAD into + `package-activate-1' (bug#19390). + 2014-12-17 Sam Steingold * emacs-lisp/package.el (package--list-loaded-files): Handle diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 199eac5..1949d0d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -516,7 +516,11 @@ Return the max version (as a string) if the package is held at a lower version." force)) (t (error "Invalid element in `package-load-list'"))))) -(defun package-activate-1 (pkg-desc) +(defun package-activate-1 (pkg-desc &optional reload) + "Activate package given by PKG-DESC, even if it was already active. +If RELOAD is non-nil, also `load' any files inside the package which +correspond to previously loaded files (those returned by +`package--list-loaded-files')." (let* ((name (package-desc-name pkg-desc)) (pkg-dir (package-desc-dir pkg-desc)) (pkg-dir-dir (file-name-as-directory pkg-dir))) @@ -527,7 +531,7 @@ Return the max version (as a string) if the package is held at a lower version." (let* ((old-lp load-path) (autoloads-file (expand-file-name (format "%s-autoloads" name) pkg-dir)) - (loaded-files-list (package--list-loaded-files pkg-dir))) + (loaded-files-list (and reload (package--list-loaded-files pkg-dir)))) (with-demoted-errors (format "Error loading %s: %%s" name) (load autoloads-file nil t)) (when (and (eq old-lp load-path) @@ -638,14 +642,14 @@ If FORCE is true, (re-)activate it if it's already activated." (fail (catch 'dep-failure ;; Activate its dependencies recursively. (dolist (req (package-desc-reqs pkg-vec)) - (unless (package-activate (car req) (cadr req)) + (unless (package-activate (car req) force) (throw 'dep-failure req)))))) (if fail (warn "Unable to activate package `%s'. Required package `%s-%s' is unavailable" package (car fail) (package-version-join (cadr fail))) ;; If all goes well, activate the package itself. - (package-activate-1 pkg-vec))))))) + (package-activate-1 pkg-vec force))))))) (defun define-package (_name-string _version-string &optional _docstring _requirements commit 9e77c1b7bcfd0807be7fe67daf73c2320e864309 Author: Stefan Monnier Date: Wed Dec 17 21:03:30 2014 -0500 * src/keyboard.c (input_was_pending): New var. (read_char): Use it to make sure we only skip redisplay when we can't keep up with the repeat rate. diff --git a/src/ChangeLog b/src/ChangeLog index 01653de..16e99ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-12-18 Stefan Monnier + + * keyboard.c (input_was_pending): New var. + (read_char): Use it to make sure we only skip redisplay when we can't + keep up with the repeat rate. + 2014-12-17 Stefan Monnier * keyboard.c (swallow_events): Don't redisplay if there's input pending. diff --git a/src/keyboard.c b/src/keyboard.c index 9e12f59..d76a8fc 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -273,6 +273,54 @@ static FILE *dribble; /* True if input is available. */ bool input_pending; +/* True if more input was available last time we read an event. + + Since redisplay can take a significant amount of time and is not + indispensible to perform the user's commands, when input arrives + "too fast", Emacs skips redisplay. More specifically, if the next + command has already been input when we finish the previous command, + we skip the intermediate redisplay. + + This is useful to try and make sure Emacs keeps up with fast input + rates, such as auto-repeating keys. But in some cases, this proves + too conservative: we may end up disabling redisplay for the whole + duration of a key repetition, even though we could afford to + redisplay every once in a while. + + So we "sample" the input_pending flag before running a command and + use *that* value after running the command to decide whether to + skip redisplay or not. This way, we only skip redisplay if we + really can't keep up with the repeat rate. + + This only makes a difference if the next input arrives while running the + command, which is very unlikely if the command is executed quickly. + IOW this tends to avoid skipping redisplay after a long running command + (which is a case where skipping redisplay is not very useful since the + redisplay time is small compared to the time it took to run the command). + + A typical use case is when scrolling. Scrolling time can be split into: + - Time to do jit-lock on the newly displayed portion of buffer. + - Time to run the actual scroll command. + - Time to perform the redisplay. + Jit-lock can happen either during the command or during the redisplay. + In the most painful cases, the jit-lock time is the one that dominates. + Also jit-lock can be tweaked (via jit-lock-defer) to delay its job, at the + cost of temporary inaccuracy in display and scrolling. + So without input_was_pending, what typically happens is the following: + - when the command starts, there's no pending input (yet). + - the scroll command triggers jit-lock. + - during the long jit-lock time the next input arrives. + - at the end of the command, we check input_pending and hence decide to + skip redisplay. + - we read the next input and start over. + End result: all the hard work of jit-locking is "wasted" since redisplay + doesn't actually happens (at least not before the input rate slows down). + With input_was_pending redisplay is still skipped if Emacs can't keep up + with the input rate, but if it can keep up just enough that there's no + input_pending when we begin the command, then redisplay is not skipped + which results in better feedback to the user. */ +static bool input_was_pending; + /* Circular buffer for pre-read keyboard input. */ static struct input_event kbd_buffer[KBD_BUFFER_SIZE]; @@ -2585,8 +2633,10 @@ read_char (int commandflag, Lisp_Object map, swallow_events (false); /* May clear input_pending. */ /* Redisplay if no pending input. */ - while (!input_pending) + while (!(input_pending + && (input_was_pending || !redisplay_dont_pause))) { + input_was_pending = input_pending; if (help_echo_showing_p && !EQ (selected_window, minibuf_window)) redisplay_preserve_echo_area (5); else @@ -3255,6 +3305,7 @@ read_char (int commandflag, Lisp_Object map, exit: RESUME_POLLING; + input_was_pending = input_pending; RETURN_UNGCPRO (c); } commit ec10ba2792eef613caf47fff83e869d4bc177616 Author: Stefan Monnier Date: Wed Dec 17 17:08:07 2014 -0500 * src/keyboard.c (swallow_events): Don't redisplay if there's input pending. diff --git a/src/ChangeLog b/src/ChangeLog index 3854803..01653de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-12-17 Stefan Monnier + + * keyboard.c (swallow_events): Don't redisplay if there's input pending. + 2014-12-17 Ulf Jasper * image.c (svg_load): Watch out for nil value of current buffer's diff --git a/src/dispnew.c b/src/dispnew.c index a68901a..212caa8 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5785,7 +5785,7 @@ immediately by pending input. */) { ptrdiff_t count; - swallow_events (1); + swallow_events (true); if ((detect_input_pending_run_timers (1) && NILP (force) && !redisplay_dont_pause) || !NILP (Vexecuting_kbd_macro)) diff --git a/src/keyboard.c b/src/keyboard.c index beb3459..9e12f59 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2582,7 +2582,7 @@ read_char (int commandflag, Lisp_Object map, user-visible, such as X selection_request events. */ if (input_pending || detect_input_pending_run_timers (0)) - swallow_events (0); /* May clear input_pending. */ + swallow_events (false); /* May clear input_pending. */ /* Redisplay if no pending input. */ while (!input_pending) @@ -2598,7 +2598,7 @@ read_char (int commandflag, Lisp_Object map, /* Input arrived and pre-empted redisplay. Process any events which are not user-visible. */ - swallow_events (0); + swallow_events (false); /* If that cleared input_pending, try again to redisplay. */ } @@ -4370,7 +4370,7 @@ swallow_events (bool do_display) old_timers_run = timers_run; get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); - if (timers_run != old_timers_run && do_display) + if (!input_pending && timers_run != old_timers_run && do_display) redisplay_preserve_echo_area (7); } diff --git a/src/process.c b/src/process.c index e59ca58..c58ae3e 100644 --- a/src/process.c +++ b/src/process.c @@ -4473,7 +4473,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, && ! EQ (wait_proc->status, Qrun) && ! EQ (wait_proc->status, Qconnect)) { - bool read_some_bytes = 0; + bool read_some_bytes = false; clear_waiting_for_input (); XSETPROCESS (proc, wait_proc); @@ -4689,13 +4689,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, unsigned old_timers_run = timers_run; struct buffer *old_buffer = current_buffer; Lisp_Object old_window = selected_window; - bool leave = 0; + bool leave = false; if (detect_input_pending_run_timers (do_display)) { swallow_events (do_display); if (detect_input_pending_run_timers (do_display)) - leave = 1; + leave = true; } /* If a timer has run, this might have changed buffers commit 92bad2aa0589d837e48af58f09134b48b32cfbb7 Author: Sam Steingold Date: Wed Dec 17 16:57:09 2014 -0500 load-history may contain nil "filenames" * lisp/emacs-lisp/package.el (package--list-loaded-files): Handle `(nil ...)' elements in `load-history'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5672e5..87c3944 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Sam Steingold + + * emacs-lisp/package.el (package--list-loaded-files): Handle + `(nil ...)' elements in `load-history'. + 2014-12-17 Teodor Zlatanov * net/tramp-sh.el (tramp-histfile-override): New variable. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 60beebd..199eac5 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -559,12 +559,15 @@ Return the max version (as a string) if the package is held at a lower version." "Recursively list all files in DIR which correspond to loaded features. Returns the `file-name-sans-extension' of each file, relative to DIR, sorted by most recently loaded last." - (let* ((history (mapcar (lambda (x) (file-name-sans-extension (car x))) - load-history)) + (let* ((history (delq nil + (mapcar (lambda (x) + (let ((f (car x))) + (and f (file-name-sans-extension f)))) + load-history))) (dir (file-truename dir)) ;; List all files that have already been loaded. (list-of-conflicts - (remove + (delq nil (mapcar (lambda (x) (let* ((file (file-relative-name x dir)) commit a2c489badd31fcb25b0a34418cd4e02f4239f1a1 Author: Ted Zlatanov Date: Wed Dec 17 16:35:07 2014 -0500 Add missing ChangeLog entry for prior commit. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39f09f4..a5672e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Teodor Zlatanov + + * net/tramp-sh.el (tramp-histfile-override): New variable. + (tramp-open-shell, tramp-maybe-open-connection): Use it. + 2014-12-17 Dmitry Gutov * vc/vc.el: Improve `dir-status-files' description. commit c773edcf56b39b2e74c9625f4547b8323a161375 Author: Michael Albinus Date: Wed Dec 17 22:08:30 2014 +0100 * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in wrong debug buffer. (tramp-gw-open-connection): Set process coding system 'binary. (tramp-gw-open-network-stream): Handle HTTP error 403. * net/tramp-sh.el (tramp-compute-multi-hops): Suppress traces in wrong debug buffer. (tramp-maybe-open-connection): Set connection property "gateway". * net/tramp.el (tramp-error-with-buffer): Call `message' properly. (tramp-accept-process-output): Use nil as argument for `accept-process-output', when there is a gateway prepended. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e242ca..a7fe332 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2014-12-17 Michael Albinus + + * net/tramp.el (tramp-error-with-buffer): Call `message' properly. + (tramp-accept-process-output): Use nil as argument for + `accept-process-output', when there is a gateway prepended. + + * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in + wrong debug buffer. + (tramp-gw-open-connection): Set process coding system 'binary. + (tramp-gw-open-network-stream): Handle HTTP error 403. + + * net/tramp-sh.el (tramp-compute-multi-hops): Suppress traces in + wrong debug buffer. + (tramp-maybe-open-connection): Set connection property "gateway". + 2014-12-15 Stefan Monnier * subr.el (sit-for): Tweak docstring (bug#19381). diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 0decd88..e21aaf7 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el @@ -195,11 +195,12 @@ instead of the host name declared in TARGET-VEC." (setq tramp-gw-gw-proc (funcall socks-function - (tramp-get-connection-name gw-vec) - (tramp-get-connection-buffer gw-vec) + (let ((tramp-verbose 0)) (tramp-get-connection-name gw-vec)) + (let ((tramp-verbose 0)) (tramp-get-connection-buffer gw-vec)) (tramp-file-name-real-host target-vec) (tramp-file-name-port target-vec))) (set-process-sentinel tramp-gw-gw-proc 'tramp-gw-gw-proc-sentinel) + (set-process-coding-system tramp-gw-gw-proc 'binary 'binary) (tramp-compat-set-process-query-on-exit-flag tramp-gw-gw-proc nil) (tramp-message vec 4 "Opened %s process `%s'" @@ -260,6 +261,10 @@ authentication is requested from proxy server, provide it." (200 (setq found t)) ;; We need basic authentication. (401 (setq authentication (tramp-gw-basic-authentication nil first))) + ;; Access forbidden. + (403 (tramp-error-with-buffer + (current-buffer) tramp-gw-vector 'file-error + "Connection to %s:%d forbidden." host service)) ;; Target host not found. (404 (tramp-error-with-buffer (current-buffer) tramp-gw-vector 'file-error diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f94c5b5..bb1a813 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4470,7 +4470,8 @@ Gateway hops are already opened." ;; Therefore, we must remember the gateway vector. But we ;; cannot do it as connection property, because it shouldn't ;; be persistent. And we have no started process yet either. - (tramp-set-file-property (car target-alist) "" "gateway" hop))) + (let ((tramp-verbose 0)) + (tramp-set-file-property (car target-alist) "" "gateway" hop)))) ;; Foreign and out-of-band methods are not supported for multi-hops. (when (cdr target-alist) @@ -4646,7 +4647,8 @@ connection if a previous connection has died for some reason." l-method 'tramp-connection-timeout)) (gw-args (tramp-get-method-parameter l-method 'tramp-gw-args)) - (gw (tramp-get-file-property hop "" "gateway" nil)) + (gw (let ((tramp-verbose 0)) + (tramp-get-file-property hop "" "gateway" nil))) (g-method (and gw (tramp-file-name-method gw))) (g-user (and gw (tramp-file-name-user gw))) (g-host (and gw (tramp-file-name-real-host gw))) @@ -4674,8 +4676,10 @@ connection if a previous connection has died for some reason." (setq login-args (append async-args login-args))) ;; Add gateway arguments if necessary. - (when (and gw gw-args) - (setq login-args (append gw-args login-args))) + (when gw + (tramp-set-connection-property p "gateway" t) + (when gw-args + (setq login-args (append gw-args login-args)))) ;; Check for port number. Until now, there's no ;; need for handling like method, user, host. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index fc9950d..140bf18 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1610,7 +1610,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." (let ((enable-recursive-minibuffers t)) ;; `tramp-error' does not show messages. So we must do it ;; ourselves. - (message fmt-string arguments) + (apply 'message fmt-string arguments) ;; Show buffer. (pop-to-buffer buf) (discard-input) @@ -3609,15 +3609,19 @@ connection buffer." This is needed in order to hide `last-coding-system-used', which is set for process communication also." (with-current-buffer (process-buffer proc) - (tramp-message proc 10 "%s %s" proc (process-status proc)) - (let (buffer-read-only last-coding-system-used) + ;; FIXME: If there is a gateway process, we need communication + ;; between several processes. Too complicate to implement, so we + ;; read output from all proceeses. + (let ((p (if (tramp-get-connection-property proc "gateway" nil) nil proc)) + buffer-read-only last-coding-system-used) ;; Under Windows XP, accept-process-output doesn't return ;; sometimes. So we add an additional timeout. (with-timeout ((or timeout 1)) (if (featurep 'xemacs) - (accept-process-output proc timeout timeout-msecs) - (accept-process-output proc timeout timeout-msecs (and proc t))))) - (tramp-message proc 10 "\n%s" (buffer-string)))) + (accept-process-output p timeout timeout-msecs) + (accept-process-output p timeout timeout-msecs (and proc t)))) + (tramp-message proc 10 "%s %s %s\n%s" + proc (process-status proc) p (buffer-string))))) (defun tramp-check-for-regexp (proc regexp) "Check, whether REGEXP is contained in process buffer of PROC. commit ad46070e421a02cb7aaf6b81b11b4ba33d403b3c Author: Ulf Jasper Date: Wed Dec 17 22:00:22 2014 +0100 Fixed problems with svg_load_image -- no more crashes (hopefully) * src/image.c (svg_load): Watch out for nil value of current buffer's filename. Re-enable filename thing for not-a-file case. diff --git a/src/ChangeLog b/src/ChangeLog index 455ec1e..3854803 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2014-12-17 Ulf Jasper + * image.c (svg_load): Watch out for nil value of current buffer's + filename. Re-enable filename thing for not-a-file case. + +2014-12-17 Ulf Jasper + Partially disabled previous change. * image.c (svg_load): Temporarily disabled filename thing for diff --git a/src/image.c b/src/image.c index 954d664..ceec3ce 100644 --- a/src/image.c +++ b/src/image.c @@ -8823,10 +8823,9 @@ svg_load (struct frame *f, struct image *img) return 0; } original_filename = BVAR (current_buffer, filename); - /* FIXME: disabled the filename thing for the time being as it - can cause crashs. */ success_p = svg_load_image (f, img, SDATA (data), SBYTES (data), - NULL /* SDATA(original_filename) */); + NILP(original_filename) ? + NULL : SDATA(original_filename)); } return success_p; commit af2952fb27c17d1aaeacb017ddb4eeacfd88853c Author: Ulf Jasper Date: Wed Dec 17 21:42:23 2014 +0100 Partially disabled previous change. * src/image.c (svg_load): Temporarily disabled filename thing for not-a-file case as it can cause crashs. diff --git a/src/ChangeLog b/src/ChangeLog index 1e10ffd..455ec1e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2014-12-17 Ulf Jasper + Partially disabled previous change. + + * image.c (svg_load): Temporarily disabled filename thing for + not-a-file case as it can cause crashs. + +2014-12-17 Ulf Jasper + Fix problem with images referenced within svg files. (bug#19373) * image.c: Additional parameter 'filename' for diff --git a/src/image.c b/src/image.c index 0bebd45..954d664 100644 --- a/src/image.c +++ b/src/image.c @@ -8823,8 +8823,10 @@ svg_load (struct frame *f, struct image *img) return 0; } original_filename = BVAR (current_buffer, filename); + /* FIXME: disabled the filename thing for the time being as it + can cause crashs. */ success_p = svg_load_image (f, img, SDATA (data), SBYTES (data), - SDATA(original_filename)); + NULL /* SDATA(original_filename) */); } return success_p; commit c17c864e7a71e267b7496afbe1d7076cca283cd7 Merge: 197a9e0 9be1538 Author: Ulf Jasper Date: Wed Dec 17 20:54:28 2014 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 9be1538571e420b5a7bc7e93006cea1c1b47790e Author: Ted Zlatanov Date: Wed Dec 17 14:05:15 2014 -0500 Introduce tramp-histfile-override. * net/tramp-sh.el (tramp-histfile-override): New variable. (tramp-open-shell, tramp-maybe-open-connection): Use it. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c4d5e2f..c639af3 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -65,6 +65,15 @@ files conditionalize this setup based on the TERM environment variable." :type 'string) ;;;###tramp-autoload +(defcustom tramp-histfile-override "/dev/null" + "Whether the HISTFILE should be overridden to something. Set +to nil to disable the override." + :group 'tramp + :type '(choice (const :tag "Do not override HISTFILE" nil) + (const :tag "Empty the history (/dev/null)" "/dev/null") + (string :tag "Redirect to a file"))) + +;;;###tramp-autoload (defconst tramp-color-escape-sequence-regexp "\e[[;0-9]+m" "Escape sequences produced by the \"ls\" command.") @@ -3882,7 +3891,10 @@ file exists and nonzero exit status otherwise." ;; the prompt in /bin/bash, it must be discarded as well. (tramp-send-command vec (format - "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" + "exec env ENV=''%s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" + (if tramp-histfile-override + (concat " HISTFILE=" tramp-histfile-override) + "") (tramp-shell-quote-argument tramp-end-of-output) shell (or extra-args "")) t)) @@ -4603,7 +4615,8 @@ connection if a previous connection has died for some reason." (delete-process p)) (setenv "TERM" tramp-terminal-type) (setenv "LC_ALL" "en_US.utf8") - (setenv "HISTFILE" "/dev/null") + (when tramp-histfile-override + (setenv "HISTFILE" tramp-histfile-override)) (setenv "PROMPT_COMMAND") (setenv "PS1" tramp-initial-end-of-output) (let* ((target-alist (tramp-compute-multi-hops vec)) commit 197a9e0c9e0c73ea5e76c10980e6265dd99439d9 Author: Ulf Jasper Date: Wed Dec 17 20:50:12 2014 +0100 Fix problem with images referenced within svg files. (bug#19373) Fixes: debbugs:19373 * src/image.c: Additional parameter 'filename' for svg_load_image. Include "buffer.h". Define library function rsvg_handle_set_base_uri for WINDOWSNT. (init_svg_functions): Initialize rsvg_handle_set_base_uri. (fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri. (svg_load): Pass a filename to svg_load_image: either name of actual file or of current buffer's file. (svg_load_image): New parameter 'filename', used for setting base_uri, necessary for loading referenced images. diff --git a/src/ChangeLog b/src/ChangeLog index aa8adab..1e10ffd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2014-12-17 Ulf Jasper + + Fix problem with images referenced within svg files. (bug#19373) + + * image.c: Additional parameter 'filename' for + svg_load_image. Include "buffer.h". Define library function + rsvg_handle_set_base_uri for WINDOWSNT. + (init_svg_functions): Initialize rsvg_handle_set_base_uri. + (fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri. + (svg_load): Pass a filename to svg_load_image: either name of + actual file or of current buffer's file. + (svg_load_image): New parameter 'filename', used for setting + base_uri, necessary for loading referenced images. (bug#19373) + 2014-12-16 Paul Eggert * lread.c (init_obarray): Declare Qt as special. diff --git a/src/image.c b/src/image.c index 1a2c0e2..0bebd45 100644 --- a/src/image.c +++ b/src/image.c @@ -33,6 +33,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "frame.h" #include "window.h" +#include "buffer.h" #include "dispextern.h" #include "blockinput.h" #include "systime.h" @@ -8600,7 +8601,7 @@ static bool svg_image_p (Lisp_Object object); static bool svg_load (struct frame *f, struct image *img); static bool svg_load_image (struct frame *, struct image *, - unsigned char *, ptrdiff_t); + unsigned char *, ptrdiff_t, char*); /* The symbol `svg' identifying images of this type. */ @@ -8688,6 +8689,7 @@ DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions, (RsvgHandle *, RsvgDimensionDat DEF_IMGLIB_FN (gboolean, rsvg_handle_write, (RsvgHandle *, const guchar *, gsize, GError **)); DEF_IMGLIB_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **)); DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); +DEF_IMGLIB_FN (void, rsvg_handle_set_base_uri, (RsvgHandle *, const char *)); DEF_IMGLIB_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); DEF_IMGLIB_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); @@ -8727,6 +8729,7 @@ init_svg_functions (void) LOAD_IMGLIB_FN (library, rsvg_handle_write); LOAD_IMGLIB_FN (library, rsvg_handle_close); LOAD_IMGLIB_FN (library, rsvg_handle_get_pixbuf); + LOAD_IMGLIB_FN (library, rsvg_handle_set_base_uri); LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_width); LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_height); @@ -8754,6 +8757,7 @@ init_svg_functions (void) #define fn_rsvg_handle_write rsvg_handle_write #define fn_rsvg_handle_close rsvg_handle_close #define fn_rsvg_handle_get_pixbuf rsvg_handle_get_pixbuf +#define fn_rsvg_handle_set_base_uri rsvg_handle_set_base_uri #define fn_gdk_pixbuf_get_width gdk_pixbuf_get_width #define fn_gdk_pixbuf_get_height gdk_pixbuf_get_height @@ -8803,14 +8807,14 @@ svg_load (struct frame *f, struct image *img) return 0; } /* If the file was slurped into memory properly, parse it. */ - success_p = svg_load_image (f, img, contents, size); + success_p = svg_load_image (f, img, contents, size, SSDATA(file)); xfree (contents); } /* Else its not a file, its a lisp object. Load the image from a lisp object rather than a file. */ else { - Lisp_Object data; + Lisp_Object data, original_filename; data = image_spec_value (img->spec, QCdata, NULL); if (!STRINGP (data)) @@ -8818,7 +8822,9 @@ svg_load (struct frame *f, struct image *img) image_error ("Invalid image data `%s'", data, Qnil); return 0; } - success_p = svg_load_image (f, img, SDATA (data), SBYTES (data)); + original_filename = BVAR (current_buffer, filename); + success_p = svg_load_image (f, img, SDATA (data), SBYTES (data), + SDATA(original_filename)); } return success_p; @@ -8835,7 +8841,8 @@ static bool svg_load_image (struct frame *f, /* Pointer to emacs frame structure. */ struct image *img, /* Pointer to emacs image structure. */ unsigned char *contents, /* String containing the SVG XML data to be parsed. */ - ptrdiff_t size) /* Size of data in bytes. */ + ptrdiff_t size, /* Size of data in bytes. */ + char *filename) /* Name of SVG file being loaded. */ { RsvgHandle *rsvg_handle; RsvgDimensionData dimension_data; @@ -8860,6 +8867,12 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * /* Make a handle to a new rsvg object. */ rsvg_handle = fn_rsvg_handle_new (); + /* Set base_uri for properly handling referenced images (via 'href'). + See rsvg bug 596114 - "image refs are relative to curdir, not .svg file" + (https://bugzilla.gnome.org/show_bug.cgi?id=596114). */ + if (filename) + fn_rsvg_handle_set_base_uri(rsvg_handle, filename); + /* Parse the contents argument and fill in the rsvg_handle. */ fn_rsvg_handle_write (rsvg_handle, contents, size, &err); if (err) goto rsvg_error; commit 72ef8d7639ba08da81af661f42b8f592d736ce94 Author: Jay Belanger Date: Wed Dec 17 08:16:11 2014 -0600 * calc.texi (About This Manual): Update instructions for building the manual. diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 297bfd2..76b5303 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Jay Belanger + + * calc.texi (About This Manual): Update instructions + for building the manual. + 2014-12-15 Alan Mackenzie "Advice" is a mass noun. Amend text accordingly. diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index ede9598..8dcb470 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -349,25 +349,12 @@ program by Donald Knuth at Stanford University) as well as the @file{texindex} program and @file{texinfo.tex} file, both of which can be obtained from the FSF as part of the @code{texinfo} package. To print the Calc manual in one huge tome, you will need the -source code to this manual, @file{calc.texi}, available as part of the -Emacs source. Once you have this file, type @kbd{texi2dvi calc.texi}. -Alternatively, change to the @file{man} subdirectory of the Emacs -source distribution, and type @kbd{make calc.dvi}. (Don't worry if you -get some ``overfull box'' warnings while @TeX{} runs.) -The result will be a device-independent output file called -@file{calc.dvi}, which you must print in whatever way is right -for your system. On many systems, the command is - -@example -lpr -d calc.dvi -@end example - -@noindent -or - -@example -dvips calc.dvi -@end example +Emacs source, which contains the source code to this manual, +@file{calc.texi}. Change to the @file{doc/misc} subdirectory of the +Emacs source distribution, which contains source code for this manual, +and type @kbd{make calc.pdf}. (Don't worry if you get some ``overfull +box'' warnings while @TeX{} runs.) The result will be this entire +manual as a pdf file. @end ifnottex @c Printed copies of this manual are also available from the Free Software @c Foundation. commit 863cf6241d49278e5244f918912f442a8c744b12 Author: Dmitry Gutov Date: Wed Dec 17 06:34:11 2014 +0200 * lisp/vc/vc.el: Improve `dir-status-files' description diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 035f476..39f09f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2014-12-17 Dmitry Gutov + * vc/vc.el: Improve `dir-status-files' description. + * emacs-lisp/package.el (package--list-loaded-files): Don't call file-truename on load-history elements (bug#19390). diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 954b3cf..6283dc8 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -133,10 +133,13 @@ ;; - dir-status-files (dir files update-function) ;; ;; Produce RESULT: a list of lists of the form (FILE VC-STATE EXTRA) -;; for FILES in DIR. If FILES is nil. report on all files in DIR. +;; for FILES in DIR. If FILES is nil, report on all files in DIR. ;; (It is OK, though possibly inefficient, to ignore the FILES argument ;; and always report on all files in DIR.) ;; +;; If FILES is non-nil, this function should report on all requested +;; files, including up-to-date or ignored files. +;; ;; EXTRA can be used for backend specific information about FILE. ;; If a command needs to be run to compute this list, it should be ;; run asynchronously using (current-buffer) as the buffer for the @@ -153,10 +156,6 @@ ;; the following functions might be needed: `dir-extra-headers', ;; `dir-printer', and `extra-dir-menu'. ;; -;; This function should report on all requested files, including -;; up-to-date or ignored files. If it is not provided, the default is to -;; consider that all files are in 'up-to-date state. -;; ;; - dir-extra-headers (dir) ;; ;; Return a string that will be added to the *vc-dir* buffer header. commit 8032fc16db7abacf6242356c5e168ea6f6cf36fa Author: Paul Eggert Date: Tue Dec 16 18:42:58 2014 -0800 * .gitignore: Ignore /conftest*. diff --git a/.gitignore b/.gitignore index 3f1ac89..cbe1309 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ makefile /confdefs.h /config.status /configure.lineno +/conftest* src/config.h src/epaths.h diff --git a/ChangeLog b/ChangeLog index 34c1840..b6d0fcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-17 Paul Eggert + + * .gitignore: Ignore /conftest*. + 2014-12-15 Stefan Monnier * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit commit 894a1f334895da7acb549f2a42bbd7edafc13716 Author: Dmitry Gutov Date: Wed Dec 17 03:23:07 2014 +0200 Speed up package--list-loaded-files a bit Fixes: debbugs:19390 * lisp/emacs-lisp/package.el (package--list-loaded-files): Don't call file-truename on load-history elements. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f28dd6d..035f476 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Dmitry Gutov + + * emacs-lisp/package.el (package--list-loaded-files): Don't call + file-truename on load-history elements (bug#19390). + 2014-12-16 Nicolas Petton * emacs-lisp/seq.el: New file. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index cd948ae..60beebd 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -559,8 +559,7 @@ Return the max version (as a string) if the package is held at a lower version." "Recursively list all files in DIR which correspond to loaded features. Returns the `file-name-sans-extension' of each file, relative to DIR, sorted by most recently loaded last." - (let* ((history (mapcar (lambda (x) (file-name-sans-extension - (file-truename (car x)))) + (let* ((history (mapcar (lambda (x) (file-name-sans-extension (car x))) load-history)) (dir (file-truename dir)) ;; List all files that have already been loaded. commit cf0773272587ba131d9ea5825c8c3fc782713890 Author: Nicolas Petton Date: Tue Dec 16 18:42:30 2014 -0500 * lisp/emacs-lisp/seq.el: New file. * doc/lispref/sequences.texi (Seq Library): Add documentation for seq.el. * test/automated/seq-tests.el: New file. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index bc9e991..a48289c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2014-12-16 Nicolas Petton + + * sequences.texi (Seq Library): Add documentation for seq.el. + 2014-12-15 Alan Mackenzie "Advice" is a mass noun. Amend text accordingly. @@ -16,21 +20,21 @@ 2014-12-09 Lars Magne Ingebrigtsen - * files.texi (Contents of Directories): Document - directory-files-recursively. + * files.texi (Contents of Directories): + Document directory-files-recursively. 2014-12-04 Eli Zaretskii - * display.texi (Bidirectional Display): Document - 'buffer-substring-with-bidi-context'. + * display.texi (Bidirectional Display): + Document 'buffer-substring-with-bidi-context'. - * text.texi (Buffer Contents): Mention - 'buffer-substring-with-bidi-context' with a cross-reference. + * text.texi (Buffer Contents): + Mention 'buffer-substring-with-bidi-context' with a cross-reference. 2014-12-02 Eli Zaretskii - * display.texi (Bidirectional Display): Document - 'bidi-find-overridden-directionality'. + * display.texi (Bidirectional Display): + Document 'bidi-find-overridden-directionality'. 2014-11-29 Paul Eggert @@ -51,7 +55,7 @@ * processes.texi (Network Security): Made into its own section and fleshed out. (Network Security): Mention more NSM variables. - (Processes): Moved the Network Security Manager stuff to the Emacs + (Processes): Move the Network Security Manager stuff to the Emacs manual. 2014-11-23 Lars Magne Ingebrigtsen @@ -67,8 +71,8 @@ 2014-11-18 Leo Liu - * functions.texi (Advising Named Functions): Document - define-advice. + * functions.texi (Advising Named Functions): + Document define-advice. 2014-11-17 Paul Eggert @@ -233,8 +237,8 @@ 2014-08-29 Dmitry Antipov - * lists.texi (Functions that Rearrange Lists): Remove - description of sort ... + * lists.texi (Functions that Rearrange Lists): + Remove description of sort ... * sequences.texi (Sequence Functions): ... and generalize it for sequences. Add an example. @@ -382,8 +386,8 @@ 2014-05-15 Dmitry Antipov - * lists.texi (Building Cons Cells and Lists): Remove - description of `reverse' and `'nreverse' to generalize them... + * lists.texi (Building Cons Cells and Lists): + Remove description of `reverse' and `'nreverse' to generalize them... * sequences.texi (Sequences): ...for sequences here. 2014-05-14 Glenn Morris @@ -13525,7 +13529,7 @@ 1998-01-30 Richard Stallman - * Makefile (SHELL): Defined. + * Makefile (SHELL): Define. 1998-01-27 Richard Stallman diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index d3a6792..8f8cfe7 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -419,6 +419,366 @@ See @code{documentation} in @ref{Accessing Documentation}, for a useful example of @code{sort}. @end defun +@cindex sequence functions in seq +@cindex seq library + The @file{seq} library provides the following additional sequence +manipulation macros and functions, prefixed with @code{seq-}. To use +them, you need to load the @file{seq} library first. + + All functions defined in the @code{seq} library are free of +side-effects, meaning that sequence(s) passed as argument(s) to +functions defined in @code{seq} are not modified. + +@defun seq-drop seq n + This function returns a sequence of all but the first @var{n} +elements of the sequence @var{seq}. + +@var{seq} may be a list, vector or string and @var{n} must be an +integer. The result is the same type of sequence as @var{seq}. + +If @var{n} is a negative integer or zero, @var{seq} is returned. + +@example +@group +(seq-drop [1 2 3 4 5 6] 3) +@result{} [4 5 6] +@end group +@group +(seq-drop "hello world" -4) +@result{} "hello world" +@end group +@end example +@end defun + +@defun seq-take seq n + This function returns a sequence of the first @var{n} elements of +@var{seq}. + +@var{seq} may be a list, vector or string and @var{n} must be an +integer. The result is the same type of sequence as @var{seq}. + +If @var{n} is a negative integer or zero, an empty sequence is returned. + +@example +@group +(seq-take '(1 2 3 4) 3) +@result{} (1 2 3) +@end group +@group +(seq-take [1 2 3 4] 0) +@result{} [] +@end group +@end example +@end defun + +@defun seq-take-while pred seq + This function returns a sub-sequence of the successive elements of +@var{seq} for which calling @code{pred} with that element returns +non-nil. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. The result is the same type of sequence as +@var{seq}. + +If evaluating @var{pred} with the first element of @var{seq} as argument +returns @code{nil}, an empty sequence is returned. + +@example +@group +(seq-take-while (lambda (elt) (> elt 0)) '(1 2 3 -1 -2)) +@result{} (1 2 3) +@end group +@group +(seq-take-while (lambda (elt) (> elt 0)) [-1 4 6]) +@result{} [] +@end group +@end example +@end defun + +@defun seq-drop-while pred seq + This function returns a sub-sequence of @var{seq} from the first +element for which calling @var{pred} with that element returns +@code{nil}. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. The result is the same type of sequence as +@var{seq}. + +If evaluating @var{pred} with every element of @var{seq} returns +@code{nil}, @var{seq} is returned. + +@example +@group +(seq-drop-while (lambda (elt) (> elt 0)) '(1 2 3 -1 -2)) +@result{} (-1 -2) +@end group +@group +(seq-drop-while (lambda (elt) (< elt 0)) [1 4 6]) +@result{} [1 4 6] +@end group +@end example +@end defun + +@defun seq-filter pred seq +@cindex filtering sequences + This function returns a list of all the elements in @var{seq} for +which calling @var{pred} with that element returns non-nil. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. + +@example +@group +(seq-filter (lambda (elt) (> elt 0)) [1 -1 3 -3 5]) +@result{} (1 3 5) +@end group +@group +(seq-filter (lambda (elt) (> elt 0)) '(-1 -3 -5)) +@result{} nil +@end group +@end example +@end defun + +@defun seq-remove pred seq +@cindex removing from sequences + This function returns a list of all the elements in @var{seq} for +which calling @var{pred} with that element returns @code{nil}. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. + +@example +@group +(seq-remove (lambda (elt) (> elt 0)) [1 -1 3 -3 5]) +@result{} (-1 -3) +@end group +@group +(seq-remove (lambda (elt) (< elt 0)) '(-1 -3 -5)) +@result{} nil +@end group +@end example +@end defun + +@defun seq-reduce function seq initial-value +@cindex reducing sequences + This function returns the result of calling @var{function} with +@var{initial-value} and the first element of @var{seq}, then calling +@var{function} with that result and the second element of @var{seq}, +then with that result and the third element of @var{seq}, etc. + +@var{function} must be a two-arguments function and @var{seq} may be a +list, vector or string. + +If @var{seq} is empty, @var{initial-value} is returned and +@var{function} is not called. + +@example +@group +(seq-reduce #'+ [1 2 3 4] 0) +@result{} 10 +@end group +@group +(seq-reduce #'+ '(1 2 3 4) 5) +@result{} 15 +@end group +@group +(seq-reduce #'+ '() 3) +@result{} 3 +@end group +@end example +@end defun + +@defun seq-some-p pred seq + This function returns any element in @var{seq} for which calling +@var{pred} with that element returns non-nil. If successively calling +@var{pred} with each element of @var{seq} always returns @code{nil}, +@code{nil} is returned. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. + +@example +@group +(seq-some-p #'numberp ["abc" 1 nil]) +@result{} 1 +@end group +@group +(seq-some-p #'numberp ["abc" "def"]) +@result{} nil +@end group +@end example +@end defun + +@defun seq-every-p pred seq + This function returns non-nil if successively calling @var{pred} with +each element of @var{seq} always returns non-nil, @code{nil} otherwise. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. + +@example +@group +(seq-every-p #'numberp [2 4 6]) +@result{} t +@end group +@group +(seq-some-p #'numberp [2 4 "6"]) +@result{} nil +@end group +@end example +@end defun + +@defun seq-empty-p seq + This function returns non-nil if the sequence @var{seq} is empty, +@code{nil} otherwise. + +@var{seq} may be a list, vector or string. + +@example +@group +(seq-empty-p "not empty") +@result{} nil +@end group +@group +(seq-empty-p "") +@result{} t +@end group +@end example +@end defun + +@defun seq-count pred seq + This function returns the number of elements in @var{seq} for which +calling @var{pred} with that element returns non-nil. + +@var{pred} must be a one-argument function and @var{seq} may be a +list, vector or string. + +@example +(seq-count (lambda (elt) (> elt 0)) [-1 2 0 3 -2]) +@result{} 2 +@end example +@end defun + +@defun seq-sort pred seq + This function returns a sorted sequence of the elements of +@var{seq}, comparing its elements with @var{pred}. Called with two +elements of @var{seq}, @var{pred} should return non-nil if the first +element should sort before the second. + +@var{pred} must be a two-arguments function, @var{seq} may be a list, +vector or string. + +The result is a sequence of the same type as SEQ. +@cindex sorting sequences +@end defun + +@defun seq-contains-p seq elt testfn + This function returns the first element in @var{seq} that equals to +@var{elt}. + +Equality is defined by @var{testfn} if non-nil or by @code{equal} if +@code{nil}. + +@var{seq} may be a list, vector or string. + +@example +@group +(seq-contains-p '(symbol1 symbol2) 'symbol1) +@result{} symbol1 +@end group +@group +(seq-contains-p '(symbol1 symbol2) 'symbol3) +@result{} nil +@end group +@end example + +@end defun + +@defun seq-uniq seq testfn + This function returns a list of the elements of @var{seq} with +duplicates removed. @var{testfn} is used to compare elements, or +@code{equal} if @var{testfn} is @code{nil}. + +@var{testfn} must be a two-argument function or @code{nil} and +@var{seq} may be a list, vector or string. + +@example +@group +(seq-uniq '(1 2 2 1 3)) +@result{} (1 2 3) +@end group +@group +(seq-uniq '(1 2 2.0 1.0) #'=) +@result{} [3 4] +@end group +@end example +@end defun + +@defun seq-subseq seq start &optional end + This function returns a sub-sequence of @var{seq} from @var{start} +to @var{end}. If @var{end} is omitted, it default to the length of +@var{seq}. If @var{start} or @var{end} is negative, it counts from +the end of @var{seq}. + +@var{seq} may be a list, vector or string. +The result is the same type of sequence as @var{seq}. + +@example +@group +(seq-subseq '(1 2 3 4 5) 1) +@result{} (2 3 4 5) +@end group +@group +(seq-subseq '[1 2 3 4 5] 1 3) +@result{} [2 3] +@end group +@group +(seq-subseq '[1 2 3 4 5] -3 -1) +@result{} [3 4] +@end group +@end example +@end defun + +@defun seq-concatenate type &rest seqs + This function returns a sequence made of the concatenation of +@var{seqs}. The result is a sequence of type @var{type}. @var{type} +may be one of the following symbols: @code{vector}, @code{list} or +@code{string}. + +@example +@group +(seq-concatenate 'list '(1 2) '(3 4) [5 6]) +@result{} (1 2 3 5 6) +@end group +@group +(seq-concatenate 'string "Hello " "world") +@result{} "Hello world" +@end group +@end example +@end defun + +@defmac seq-doseq (var seq [result]) body@dots{} +@cindex sequence iteration +This macro is like @code{dolist}, except that @var{seq} can be a list, +vector or string (@pxref{Iteration} for more information about the +@code{dolist} macro). + +@var{seq-doseq} is primarily useful for side-effects. + +@example +(seq-doseq (elt [1 2 3]) + (print (* 2 elt))) + @print{} + @print{} 2 + @print{} + @print{} 4 + @print{} + @print{} 6 + @result{} nil + +@end example +@end defmac + @node Arrays @section Arrays @cindex array diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7a44e8..f28dd6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-16 Nicolas Petton + + * emacs-lisp/seq.el: New file. + 2014-12-16 Stefan Monnier * jit-lock.el (jit-lock-function): Don't defer if jit-lock-defer-time diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el new file mode 100644 index 0000000..01a3bd3 --- /dev/null +++ b/lisp/emacs-lisp/seq.el @@ -0,0 +1,269 @@ +;;; seq.el --- Sequence manipulation functions -*- lexical-binding: t -*- + +;; Copyright (C) 2014 Free Software Foundation, Inc. + +;; Author: Nicolas Petton +;; Keywords: sequences +;; Version: 1.0 + +;; Maintainer: emacs-devel@gnu.org + +;; 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: + +;; Sequence-manipulation functions that complement basic functions +;; provided by subr.el. +;; +;; All functions are prefixed with "seq-". +;; +;; All provided functions work on lists, strings and vectors. +;; +;; Functions taking a predicate or a function iterating over the +;; sequence as argument take the function as their first argument and +;; the sequence as their second argument. All other functions take +;; the sequence as their first argument. +;; +;; All functions are tested in test/automated/seq-tests.el + +;;; Code: + +(defmacro seq-doseq (spec &rest body) + "Loop over a sequence. +Similar to `dolist' but can be applied lists, strings and vectors. + +Evaluate BODY with VAR bound to each element of SEQ, in turn. +Then evaluate RESULT to get return value, default nil. + +\(fn (VAR SEQ [RESULT]) BODY...)" + (declare (indent 1) (debug ((symbolp form &optional form) body))) + (let ((is-list (make-symbol "is-list")) + (seq (make-symbol "seq")) + (index (make-symbol "index"))) + `(let* ((,seq ,(cadr spec)) + (,is-list (listp ,seq)) + (,index (if ,is-list ,seq 0))) + (while (if ,is-list + (consp ,index) + (< ,index (seq-length ,seq))) + (let ((,(car spec) (if ,is-list + (car ,index) + (seq-elt ,seq ,index)))) + ,@body + (setq ,index (if ,is-list + (cdr ,index) + (+ ,index 1))))) + ,@(if (cddr spec) + `((setq ,(car spec) nil) ,@(cddr spec)))))) + +(defun seq-drop (seq n) + "Return a subsequence of SEQ without its first N elements. +The result is a sequence of the same type as SEQ. + +If N is a negative integer or zero, SEQ is returned." + (if (<= n 0) + seq + (if (listp seq) + (seq--drop-list seq n) + (let ((length (seq-length seq))) + (seq-subseq seq (min n length) length))))) + +(defun seq-take (seq n) + "Return a subsequence of SEQ with its first N elements. +The result is a sequence of the same type as SEQ. + +If N is a negative integer or zero, an empty sequence is +returned." + (if (listp seq) + (seq--take-list seq n) + (seq-subseq seq 0 (min (max n 0) (seq-length seq))))) + +(defun seq-drop-while (pred seq) + "Return a sequence, from the first element for which (PRED element) is nil, of SEQ. +The result is a sequence of the same type as SEQ." + (if (listp seq) + (seq--drop-while-list pred seq) + (seq-drop seq (seq--count-successive pred seq)))) + +(defun seq-take-while (pred seq) + "Return a sequence of the successive elements for which (PRED element) is non-nil in SEQ. +The result is a sequence of the same type as SEQ." + (if (listp seq) + (seq--take-while-list pred seq) + (seq-take seq (seq--count-successive pred seq)))) + +(defun seq-filter (pred seq) + "Return a list of all the elements for which (PRED element) is non-nil in SEQ." + (let ((exclude (make-symbol "exclude"))) + (delq exclude (seq-map (lambda (elt) + (if (funcall pred elt) + elt + exclude)) + seq)))) + +(defun seq-remove (pred seq) + "Return a list of all the elements for which (PRED element) is nil in SEQ." + (seq-filter (lambda (elt) (not (funcall pred elt))) + seq)) + +(defun seq-reduce (function seq initial-value) + "Reduce the function FUNCTION across SEQ, starting with INITIAL-VALUE. + +Return the result of calling FUNCTION with INITIAL-VALUE and the +first element of SEQ, then calling FUNCTION with that result and +the second element of SEQ, then with that result and the third +element of SEQ, etc. + +If SEQ is empty, return INITIAL-VALUE and FUNCTION is not called." + (if (seq-empty-p seq) + initial-value + (let ((acc initial-value)) + (seq-doseq (elt seq) + (setq acc (funcall function acc elt))) + acc))) + +(defun seq-some-p (pred seq) + "Return any element for which (PRED element) is non-nil in SEQ, nil otherwise." + (catch 'seq--break + (seq-doseq (elt seq) + (when (funcall pred elt) + (throw 'seq--break elt))) + nil)) + +(defun seq-every-p (pred seq) + "Return non-nil if (PRED element) is non-nil for all elements of the sequence SEQ." + (catch 'seq--break + (seq-doseq (elt seq) + (or (funcall pred elt) + (throw 'seq--break nil))) + t)) + +(defun seq-count (pred seq) + "Return the number of elements for which (PRED element) returns non-nil in seq." + (let ((count 0)) + (seq-doseq (elt seq) + (when (funcall pred elt) + (setq count (+ 1 count)))) + count)) + +(defun seq-empty-p (seq) + "Return non-nil if the sequence SEQ is empty, nil otherwise." + (if (listp seq) + (null seq) + (= 0 (seq-length seq)))) + +(defun seq-sort (pred seq) + "Return a sorted sequence comparing using PRED the elements of SEQ. +The result is a sequence of the same type as SEQ." + (if (listp seq) + (sort (seq-copy seq) pred) + (let ((result (seq-sort pred (append seq nil)))) + (cond ((stringp seq) (concat result)) + ((vectorp seq) (vconcat result)) + (t (error "Unsupported sequence: %s" seq)))))) + +(defun seq-contains-p (seq elt &optional testfn) + "Return the first element in SEQ that equals to ELT. +Equality is defined by TESTFN if non-nil or by `equal' if nil." + (seq-some-p (lambda (e) + (funcall (or testfn #'equal) elt e)) + seq)) + +(defun seq-uniq (seq &optional testfn) + "Return a list of the elements of SEQ with duplicates removed. +TESTFN is used to compare elements, or `equal' if TESTFN is nil." + (let ((result '())) + (seq-doseq (elt seq) + (unless (seq-contains-p result elt testfn) + (setq result (cons elt result)))) + (nreverse result))) + +(defun seq-subseq (seq start &optional end) + "Return the subsequence of SEQ from START to END. +If END is omitted, it defaults to the length of the sequence. +If START or END is negative, it counts from the end." + (cond ((or (stringp seq) (vectorp seq)) (substring seq start end)) + ((listp seq) + (let (len) + (and end (< end 0) (setq end (+ end (setq len (seq-length seq))))) + (if (< start 0) (setq start (+ start (or len (setq len (seq-length seq)))))) + (if (> start 0) (setq seq (nthcdr start seq))) + (if end + (let ((res nil)) + (while (>= (setq end (1- end)) start) + (push (pop seq) res)) + (nreverse res)) + (seq-copy seq)))) + (t (error "Unsupported sequence: %s" seq)))) + +(defun seq-concatenate (type &rest seqs) + "Concatenate, into a sequence of type TYPE, the sequences SEQS. +TYPE must be one of following symbols: vector, string or list. + +\n(fn TYPE SEQUENCE...)" + (pcase type + (`vector (apply #'vconcat seqs)) + (`string (apply #'concat seqs)) + (`list (apply #'append (append seqs '(nil)))) + (t (error "Not a sequence type name: %s" type)))) + +(defun seq--drop-list (list n) + "Optimized version of `seq-drop' for lists." + (while (and list (> n 0)) + (setq list (cdr list) + n (1- n))) + list) + +(defun seq--take-list (list n) + "Optimized version of `seq-take' for lists." + (let ((result '())) + (while (and list (> n 0)) + (setq n (1- n)) + (push (pop list) result)) + (nreverse result))) + +(defun seq--drop-while-list (pred list) + "Optimized version of `seq-drop-while' for lists." + (while (and list (funcall pred (car list))) + (setq list (cdr list))) + list) + +(defun seq--take-while-list (pred list) + "Optimized version of `seq-take-while' for lists." + (let ((result '())) + (while (and list (funcall pred (car list))) + (push (pop list) result)) + (nreverse result))) + +(defun seq--count-successive (pred seq) + "Return the number of successive elements for which (PRED element) is non-nil in SEQ." + (let ((n 0) + (len (seq-length seq))) + (while (and (< n len) + (funcall pred (seq-elt seq n))) + (setq n (+ 1 n))) + n)) + +(defalias 'seq-copy #'copy-sequence) +(defalias 'seq-elt #'elt) +(defalias 'seq-reverse #'reverse) +(defalias 'seq-length #'length) +(defalias 'seq-do #'mapc) +(defalias 'seq-each #'seq-do) +(defalias 'seq-map #'mapcar) + +(provide 'seq) +;;; seq.el ends here diff --git a/test/ChangeLog b/test/ChangeLog index 78a03d1..86703d5 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2014-12-16 Nicolas Petton + + * automated/seq-tests.el: New file. + 2014-12-16 Glenn Morris * automated/data/flymake/Makefile (check-syntax): diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el new file mode 100644 index 0000000..a46438e --- /dev/null +++ b/test/automated/seq-tests.el @@ -0,0 +1,196 @@ +;;; seq-tests.el --- Tests for sequences.el + +;; Copyright (C) 2014 Free Software Foundation, Inc. + +;; Author: Nicolas Petton +;; Maintainer: emacs-devel@gnu.org + +;; 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: + +;; Tests for sequences.el + +;;; Code: + +(require 'ert) +(require 'seq) + +(defmacro with-test-sequences (spec &rest body) + "Successively bind VAR to a list, vector, and string built from SEQ. +Evaluate BODY for each created sequence. + +\(fn (var seq) body)" + (declare (indent 1) (debug ((symbolp form) body))) + (let ((initial-seq (make-symbol "initial-seq"))) + `(let ((,initial-seq ,(cadr spec))) + ,@(mapcar (lambda (s) + `(let ((,(car spec) (apply (function ,s) ,initial-seq))) + ,@body)) + '(list vector string))))) + +(defun same-contents-p (seq1 seq2) + "Return t if SEQ1 and SEQ2 have the same contents, nil otherwise." + (equal (append seq1 '()) (append seq2 '()))) + +(defun test-sequences-evenp (integer) + "Return t if INTEGER is even." + (eq (logand integer 1) 0)) + +(defun test-sequences-oddp (integer) + "Return t if INTEGER is odd." + (not (test-sequences-evenp integer))) + +(ert-deftest test-seq-drop () + (with-test-sequences (seq '(1 2 3 4)) + (should (equal (seq-drop seq 0) seq)) + (should (equal (seq-drop seq 1) (seq-subseq seq 1))) + (should (equal (seq-drop seq 2) (seq-subseq seq 2))) + (should (seq-empty-p (seq-drop seq 4))) + (should (seq-empty-p (seq-drop seq 10)))) + (with-test-sequences (seq '()) + (should (seq-empty-p (seq-drop seq 0))) + (should (seq-empty-p (seq-drop seq 1))))) + +(ert-deftest test-seq-take () + (with-test-sequences (seq '(2 3 4 5)) + (should (seq-empty-p (seq-take seq 0))) + (should (= (seq-length (seq-take seq 1)) 1)) + (should (= (seq-elt (seq-take seq 1) 0) 2)) + (should (same-contents-p (seq-take seq 3) '(2 3 4))) + (should (equal (seq-take seq 10) seq)))) + +(ert-deftest test-seq-drop-while () + (with-test-sequences (seq '(1 3 2 4)) + (should (equal (seq-drop-while #'test-sequences-oddp seq) + (seq-drop seq 2))) + (should (equal (seq-drop-while #'test-sequences-evenp seq) + seq)) + (should (seq-empty-p (seq-drop-while #'numberp seq)))) + (with-test-sequences (seq '()) + (should (seq-empty-p (seq-drop-while #'test-sequences-oddp seq))))) + +(ert-deftest test-seq-take-while () + (with-test-sequences (seq '(1 3 2 4)) + (should (equal (seq-take-while #'test-sequences-oddp seq) + (seq-take seq 2))) + (should (seq-empty-p (seq-take-while #'test-sequences-evenp seq))) + (should (equal (seq-take-while #'numberp seq) seq))) + (with-test-sequences (seq '()) + (should (seq-empty-p (seq-take-while #'test-sequences-oddp seq))))) + +(ert-deftest test-seq-filter () + (with-test-sequences (seq '(6 7 8 9 10)) + (should (equal (seq-filter #'test-sequences-evenp seq) '(6 8 10))) + (should (equal (seq-filter #'test-sequences-oddp seq) '(7 9))) + (should (equal (seq-filter (lambda (elt) nil) seq) '()))) + (with-test-sequences (seq '()) + (should (equal (seq-filter #'test-sequences-evenp seq) '())))) + +(ert-deftest test-seq-remove () + (with-test-sequences (seq '(6 7 8 9 10)) + (should (equal (seq-remove #'test-sequences-evenp seq) '(7 9))) + (should (equal (seq-remove #'test-sequences-oddp seq) '(6 8 10))) + (should (same-contents-p (seq-remove (lambda (elt) nil) seq) seq))) + (with-test-sequences (seq '()) + (should (equal (seq-remove #'test-sequences-evenp seq) '())))) + +(ert-deftest test-seq-count () + (with-test-sequences (seq '(6 7 8 9 10)) + (should (equal (seq-count #'test-sequences-evenp seq) 3)) + (should (equal (seq-count #'test-sequences-oddp seq) 2)) + (should (equal (seq-count (lambda (elt) nil) seq) 0))) + (with-test-sequences (seq '()) + (should (equal (seq-count #'test-sequences-evenp seq) 0)))) + +(ert-deftest test-seq-reduce () + (with-test-sequences (seq '(1 2 3 4)) + (should (= (seq-reduce #'+ seq 0) 10)) + (should (= (seq-reduce #'+ seq 5) 15))) + (with-test-sequences (seq '()) + (should (eq (seq-reduce #'+ seq 0) 0)) + (should (eq (seq-reduce #'+ seq 7) 7)))) + +(ert-deftest test-seq-some-p () + (with-test-sequences (seq '(4 3 2 1)) + (should (= (seq-some-p #'test-sequences-evenp seq) 4)) + (should (= (seq-some-p #'test-sequences-oddp seq) 3)) + (should-not (seq-some-p (lambda (elt) (> elt 10)) seq))) + (with-test-sequences (seq '()) + (should-not (seq-some-p #'test-sequences-oddp seq)))) + +(ert-deftest test-seq-contains-p () + (with-test-sequences (seq '(3 4 5 6)) + (should (seq-contains-p seq 3)) + (should-not (seq-contains-p seq 7))) + (with-test-sequences (seq '()) + (should-not (seq-contains-p seq 3)) + (should-not (seq-contains-p seq nil)))) + +(ert-deftest test-seq-every-p () + (with-test-sequences (seq '(43 54 22 1)) + (should (seq-every-p (lambda (elt) t) seq)) + (should-not (seq-every-p #'test-sequences-oddp seq)) + (should-not (seq-every-p #'test-sequences-evenp seq))) + (with-test-sequences (seq '(42 54 22 2)) + (should (seq-every-p #'test-sequences-evenp seq)) + (should-not (seq-every-p #'test-sequences-oddp seq))) + (with-test-sequences (seq '()) + (should (seq-every-p #'identity seq)) + (should (seq-every-p #'test-sequences-evenp seq)))) + +(ert-deftest test-seq-empty-p () + (with-test-sequences (seq '(0)) + (should-not (seq-empty-p seq))) + (with-test-sequences (seq '(0 1 2)) + (should-not (seq-empty-p seq))) + (with-test-sequences (seq '()) + (should (seq-empty-p seq)))) + +(ert-deftest test-seq-sort () + (should (equal (seq-sort #'< "cbaf") "abcf")) + (should (equal (seq-sort #'< '(2 1 9 4)) '(1 2 4 9))) + (should (equal (seq-sort #'< [2 1 9 4]) [1 2 4 9])) + (should (equal (seq-sort #'< "") ""))) + +(ert-deftest test-seq-uniq () + (with-test-sequences (seq '(2 4 6 8 6 4 3)) + (should (equal (seq-uniq seq) '(2 4 6 8 3)))) + (with-test-sequences (seq '(3 3 3 3 3)) + (should (equal (seq-uniq seq) '(3)))) + (with-test-sequences (seq '()) + (should (equal (seq-uniq seq) '())))) + +(ert-deftest test-seq-subseq () + (with-test-sequences (seq '(2 3 4 5)) + (should (equal (seq-subseq seq 0 4) seq)) + (should (same-contents-p (seq-subseq seq 2 4) '(4 5))) + (should (same-contents-p (seq-subseq seq 1 3) '(3 4))) + (should (same-contents-p (seq-subseq seq 1 -1) '(3 4)))) + (should (vectorp (seq-subseq [2 3 4 5] 2))) + (should (stringp (seq-subseq "foo" 2 3))) + (should (listp (seq-subseq '(2 3 4 4) 2 3)))) + +(ert-deftest test-seq-concatenate () + (with-test-sequences (seq '(2 4 6)) + (should (equal (seq-concatenate 'string seq [8]) (string 2 4 6 8))) + (should (equal (seq-concatenate 'list seq '(8 10)) '(2 4 6 8 10))) + (should (equal (seq-concatenate 'vector seq '(8 10)) [2 4 6 8 10])) + (should (equal (seq-concatenate 'vector nil '(8 10)) [8 10])) + (should (equal (seq-concatenate 'vector seq nil) [2 4 6])))) + +(provide 'seq-tests) +;;; seq-tests.el ends here commit 005b86c0d061dab4279c74c45368a557733433a1 Author: Paul Eggert Date: Tue Dec 16 14:49:14 2014 -0800 * lread.c (init_obarray): Declare Qt as special. This fixes a typo in the 2012-05-15 patch that tried to declare Qt as special. diff --git a/src/ChangeLog b/src/ChangeLog index 596ae25..aa8adab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-12-16 Paul Eggert + + * lread.c (init_obarray): Declare Qt as special. + This fixes a typo in the 2012-05-15 patch that + tried to declare Qt as special. + 2014-12-15 Stefan Monnier Various fixes to use bool type and constants. diff --git a/src/lread.c b/src/lread.c index 6f71ff5..afa47aa 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4072,14 +4072,14 @@ init_obarray (void) set_symbol_plist (Qunbound, Qnil); SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil); XSYMBOL (Qnil)->constant = 1; - XSYMBOL (Qnil)->declared_special = 1; + XSYMBOL (Qnil)->declared_special = true; set_symbol_plist (Qnil, Qnil); set_symbol_function (Qnil, Qnil); Qt = intern_c_string ("t"); SET_SYMBOL_VAL (XSYMBOL (Qt), Qt); - XSYMBOL (Qnil)->declared_special = 1; XSYMBOL (Qt)->constant = 1; + XSYMBOL (Qt)->declared_special = true; /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */ Vpurify_flag = Qt; commit 0a3e2cfcbbf09abe6a550eeb1620a66a8e3d0245 Author: Stefan Monnier Date: Tue Dec 16 09:25:57 2014 -0500 * lisp/jit-lock.el (jit-lock-function): Don't defer if jit-lock-defer-time is 0 and there is no input pending. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f8631d..e7a44e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-16 Stefan Monnier + + * jit-lock.el (jit-lock-function): Don't defer if jit-lock-defer-time + is 0 and there is no input pending. + 2014-12-15 Juri Linkov * replace.el (query-replace-read-from): Use query-replace-compile-replacement diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 34f14a5..74bfa3a 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -125,7 +125,8 @@ The value of this variable is used when JIT Lock mode is turned on." (defcustom jit-lock-defer-time nil ;; 0.25 "Idle time after which deferred fontification should take place. -If nil, fontification is not deferred." +If nil, fontification is not deferred. +If 0, then fontification is only deferred while there is input pending." :group 'jit-lock :type '(choice (const :tag "never" nil) (number :tag "seconds"))) @@ -333,7 +334,9 @@ Only applies to the current buffer." This function is added to `fontification-functions' when `jit-lock-mode' is active." (when (and jit-lock-mode (not memory-full)) - (if (null jit-lock-defer-timer) + (if (not (and jit-lock-defer-timer + (or (not (eq jit-lock-defer-time 0)) + (input-pending-p)))) ;; No deferral. (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) ;; Record the buffer for later fontification. commit fb420e7789b4f9a0481ee44dbdf37d3de6578ad3 Author: Stefan Monnier Date: Mon Dec 15 15:09:04 2014 -0500 * lisp/subr.el (sit-for): Tweak docstring. Fixes: debbugs:19381 * src/buffer.c (syms_of_buffer) : fix docstring. * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit to 78. diff --git a/ChangeLog b/ChangeLog index 2b75dcb..34c1840 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-12-15 Stefan Monnier + + * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit + to 78. + 2014-12-12 Paul Eggert Git ignore lib/std*.h diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 5eb994c..2e3e4f2 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg @@ -87,8 +87,8 @@ exec $awk ' status = 1 } - 72 < length && $0 ~ space { - print "Line longer than 72 characters in commit message" + 78 < length && $0 ~ space { + print "Line longer than 78 characters in commit message" status = 1 } diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b6bf868..9e242ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-15 Stefan Monnier + + * subr.el (sit-for): Tweak docstring (bug#19381). + 2014-12-15 Dmitry Gutov * vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' @@ -20,8 +24,8 @@ 2014-12-09 Fabián Ezequiel Gallina - * progmodes/python.el (python-shell-parse-command): Quote - `python-shell-interpreter`. (Bug#19289) + * progmodes/python.el (python-shell-parse-command): + Quote `python-shell-interpreter`. (Bug#19289) 2014-12-04 Stefan Monnier @@ -60,8 +64,8 @@ 2014-11-27 Fabián Ezequiel Gallina - * progmodes/python.el (python-shell-completion-setup-code): Use - __builtin__ module (or builtins in Python 3) and catch all errors + * progmodes/python.el (python-shell-completion-setup-code): + Use __builtin__ module (or builtins in Python 3) and catch all errors when importing readline and rlcompleter. 2014-11-26 Stephen Berman @@ -113,8 +117,8 @@ 2014-11-21 Eli Zaretskii - * vc/vc-git.el (vc-git-command, vc-git--call): Bind - coding-system-for-read and coding-system-for-write to + * vc/vc-git.el (vc-git-command, vc-git--call): + Bind coding-system-for-read and coding-system-for-write to vc-git-commits-coding-system. (vc-git-previous-revision): Use "~1" instead of "^", since the latter is a special character for MS-Windows system shells. @@ -155,8 +159,8 @@ 2014-11-16 Fabián Ezequiel Gallina - * progmodes/python.el (python-eldoc--get-doc-at-point): Strip - shell output before returning. (bug#18794) + * progmodes/python.el (python-eldoc--get-doc-at-point): + Strip shell output before returning. (bug#18794) 2014-11-16 Dmitry Gutov @@ -177,13 +181,13 @@ 2014-11-15 Fabián Ezequiel Gallina - * progmodes/python.el (python-indent-calculate-levels): Fix - indentation behavior multiline dedenter statement. (Bug#18432) + * progmodes/python.el (python-indent-calculate-levels): + Fix indentation behavior multiline dedenter statement. (Bug#18432) 2014-11-15 Fabián Ezequiel Gallina - * progmodes/python.el (python-indent-region): Use - python-indent-line and skip special cases. (Bug#18843) + * progmodes/python.el (python-indent-region): + Use python-indent-line and skip special cases. (Bug#18843) 2014-11-15 Michael Albinus @@ -196,8 +200,8 @@ 2014-11-14 Ivan Andrus - * progmodes/python.el (python-ffap-module-path): Use - `derived-mode-p' instead of equality test on `major-mode'. + * progmodes/python.el (python-ffap-module-path): + Use `derived-mode-p' instead of equality test on `major-mode'. 2014-11-13 Ulrich Müller @@ -247,8 +251,8 @@ 2014-11-05 Alan Mackenzie Fix wrong bound to c-font-lock-declarators. Fixes bug #18948. - * progmodes/cc-fonts.el (c-font-lock-declarations): Pass - "(point-max)" as bound to c-font-lock-declarators, not "limit", as + * progmodes/cc-fonts.el (c-font-lock-declarations): + Pass "(point-max)" as bound to c-font-lock-declarators, not "limit", as the buffer is sometimes narrowed to less than "limit" (e.g., in the presence of macros). diff --git a/lisp/subr.el b/lisp/subr.el index 215699d..839b915 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2142,7 +2142,7 @@ keyboard-quit events while waiting for a valid input." char)) (defun sit-for (seconds &optional nodisp obsolete) - "Perform redisplay, then wait for SECONDS seconds or until input is available. + "Redisplay, then wait for SECONDS seconds. Stop when input is available. SECONDS may be a floating-point value. \(On operating systems that do not support waiting for fractions of a second, floating-point values are rounded down to the nearest integer.) @@ -2160,7 +2160,7 @@ floating point support." (declare (advertised-calling-convention (seconds &optional nodisp) "22.1")) ;; This used to be implemented in C until the following discussion: ;; http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg00401.html - ;; Then it was moved to C using an implementation based on an idle timer, + ;; Then it was moved here using an implementation based on an idle timer, ;; which was then replaced by the use of read-event. (if (numberp nodisp) (setq seconds (+ seconds (* 1e-3 nodisp)) diff --git a/src/ChangeLog b/src/ChangeLog index 6b7abe4..c0b9039 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,11 +1,15 @@ +2014-12-15 Stefan Monnier + + * buffer.c (syms_of_buffer) : fix docstring. + 2014-12-13 Eli Zaretskii * gnutls.c (gnutls_init): Fix deprecation warning from GCC. 2014-12-12 Eli Zaretskii - * gnutls.c (Fgnutls_available_p, syms_of_gnutls): Move - gnutls-available-p out of the HAVE_GNUTLS conditional, and define + * gnutls.c (Fgnutls_available_p, syms_of_gnutls): + Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define them only once. 2014-12-11 Teodor Zlatanov @@ -21,8 +25,8 @@ 2014-12-10 Eli Zaretskii - * xdisp.c (move_it_in_display_line_to, display_line): Don't - disallow overflow-newline-into-fringe when word-wrap is in + * xdisp.c (move_it_in_display_line_to, display_line): + Don't disallow overflow-newline-into-fringe when word-wrap is in effect. (Bug#19300) 2014-12-04 Lee Duhem (tiny change) @@ -78,8 +82,8 @@ 2014-11-15 Eli Zaretskii * window.c (window_scroll_pixel_based): Avoid truncation/rounding - errors in computing the number of pixels to scroll. Suggested by - Kelly Dean . (Bug#19060) + errors in computing the number of pixels to scroll. + Suggested by Kelly Dean . (Bug#19060) 2014-11-15 Jan Djärv @@ -190,8 +194,8 @@ 2014-10-26 Eli Zaretskii - * dispnew.c (buffer_posn_from_coords): Use - WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to + * dispnew.c (buffer_posn_from_coords): + Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to account for the header-line height. (Bug#18839) 2014-10-22 YAMAMOTO Mitsuharu diff --git a/src/buffer.c b/src/buffer.c index 495f937..368d273 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -6092,9 +6092,9 @@ from happening repeatedly and making Emacs nonfunctional. */); doc: /* List of functions to call after each text change. Three arguments are passed to each function: the positions of the beginning and end of the range of changed text, -and the length in bytes of the pre-change text replaced by that range. +and the length in chars of the pre-change text replaced by that range. \(For an insertion, the pre-change length is zero; -for a deletion, that length is the number of bytes deleted, +for a deletion, that length is the number of chars deleted, and the post-change beginning and end are at the same place.) Buffer changes made while executing the `after-change-functions' commit 061db139896a6eabebef5bfe199744b6151493f3 Author: Dmitry Gutov Date: Mon Dec 15 16:18:34 2014 +0200 Fix vc-git-dir-status-files WRT up-to-date vs edited Fixes: debbugs:19386 * lisp/vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' stage to after `diff-index'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 204283e..b6bf868 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-15 Dmitry Gutov + + * vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' + stage to after `diff-index' (bug#19386). + 2014-12-14 João Távora * textmodes/tex-mode.el (tex-insert-quote): Consider and respect diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ae6b13a..4c64d83 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -380,8 +380,7 @@ or an empty string if none." (goto-char (point-min)) (pcase stage (`update-index - (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added - (if files 'ls-files-up-to-date 'diff-index)))) + (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 'diff-index))) (`ls-files-added (setq next-stage 'ls-files-unknown) (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) @@ -390,7 +389,7 @@ or an empty string if none." (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) result)))) (`ls-files-up-to-date - (setq next-stage 'diff-index) + (setq next-stage 'ls-files-unknown) (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) (let ((perm (string-to-number (match-string 1) 8)) (name (match-string 2))) @@ -409,7 +408,7 @@ or an empty string if none." (vc-git-create-extra-fileinfo 0 0)) result))) (`diff-index - (setq next-stage 'ls-files-unknown) + (setq next-stage (if files 'ls-files-up-to-date 'ls-files-unknown)) (while (re-search-forward ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0" nil t 1) commit bb57c94d5f047cde106ffa71bf59f24b2b3027b8 Author: Joao Tavora Date: Sun Dec 14 11:22:46 2014 +0000 Consider electric-pair-mode in tex-mode. Fixes: debbugs:19356 * lisp/textmodes/tex-mode.el (tex-insert-quote): Consider and respect `electric-pair-mode'. * test/automated/electric-tests.el (autowrapping-7): New test for tex-mode's autowrapping. (electric-pair-test-for): Call the actual key-binding interactively. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4be07b5..204283e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-14 João Távora + + * textmodes/tex-mode.el (tex-insert-quote): Consider and respect + `electric-pair-mode' (bug#19356). + 2014-12-12 Michael Albinus * simple.el (password-word-equivalents): Add "passcode", used for diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 18843bc..cb8f2ee 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1277,18 +1277,48 @@ Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote' \(normally '') depending on the context. With prefix argument, always inserts \" characters." (interactive "*P") + ;; Discover if we'll be inserting normal double quotes. + ;; (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) - (eq (get-text-property (point) 'face) 'tex-verbatim) - (save-excursion - (backward-char (length tex-open-quote)) - (when (or (looking-at (regexp-quote tex-open-quote)) - (looking-at (regexp-quote tex-close-quote))) - (delete-char (length tex-open-quote)) - t))) + (eq (get-text-property (point) 'face) 'tex-verbatim) + ;; Discover if a preceding occurance of `tex-open-quote' + ;; should be morphed to a normal double quote. + ;; + (and (>= (point) (+ (point-min) (length tex-open-quote))) + (save-excursion + (backward-char (length tex-open-quote)) + (when (or (looking-at (regexp-quote tex-open-quote)) + (looking-at (regexp-quote tex-close-quote))) + (delete-char (length tex-open-quote)) + (when (looking-at (regexp-quote tex-close-quote)) + (delete-char (length tex-close-quote))) + t)))) + ;; Insert the normal quote (eventually letting + ;; `electric-pair-mode' do its thing). + ;; (self-insert-command (prefix-numeric-value arg)) - (insert (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) - (memq (preceding-char) '(?~))) - tex-open-quote tex-close-quote)))) + ;; We'll be inserting fancy TeX quotes, but consider and imitate + ;; `electric-pair-mode''s two behaviours: pair-insertion and + ;; region wrapping. + ;; + (if (and electric-pair-mode (use-region-p)) + (let* ((saved (point-marker))) + (goto-char (mark)) + (insert (if (> saved (mark)) tex-open-quote tex-close-quote)) + (goto-char saved) + (insert (if (> saved (mark)) tex-close-quote tex-open-quote))) + (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) + (memq (preceding-char) '(?~))) + (if electric-pair-mode + (if (looking-at (regexp-quote tex-close-quote)) + (forward-char (length tex-close-quote)) + (insert tex-open-quote) + (insert tex-close-quote) + (backward-char (length tex-close-quote))) + (insert tex-open-quote)) + (if (looking-at (regexp-quote tex-close-quote)) + (forward-char (length tex-close-quote)) + (insert tex-close-quote)))))) (defun tex-validate-buffer () "Check current buffer for paragraphs containing mismatched braces or $s. diff --git a/test/ChangeLog b/test/ChangeLog index 442e802..a117834c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2014-12-14 João Távora + + * automated/electric-tests.el (autowrapping-7): Tests for + tex-mode. + 2014-12-13 Glenn Morris * automated/flymake/warnpred/test.pl: Tweak format, since the diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el index b1908e6..cd07213 100644 --- a/test/automated/electric-tests.el +++ b/test/automated/electric-tests.el @@ -60,7 +60,7 @@ (cl-progv (mapcar #'car bindings) (mapcar #'cdr bindings) - (self-insert-command 1)))) + (call-interactively (key-binding `[,last-command-event]))))) (should (equal (buffer-substring-no-properties (point-min) (point-max)) expected-string)) (should (equal (point) @@ -575,5 +575,14 @@ baz\"\"" (skip-chars-backward "\"") (mark-sexp -1))) +(define-electric-pair-test autowrapping-7 + "foo" "\"" :expected-string "``foo''" :expected-point 8 + :modes '(tex-mode) + :fixture-fn #'(lambda () + (electric-pair-mode 1) + (goto-char (point-max)) + (skip-chars-backward "\"") + (mark-sexp -1))) + (provide 'electric-tests) ;;; electric-tests.el ends here commit 7b945728d3db91732ace3d3a1cb1c4bdea444b2c Author: Glenn Morris Date: Sat Dec 13 13:17:38 2014 -0800 * test/automated/flymake/warnpred/test.pl: Tweak earlier change. diff --git a/test/automated/flymake/warnpred/test.pl b/test/automated/flymake/warnpred/test.pl index 2752904..d5abcb4 100644 --- a/test/automated/flymake/warnpred/test.pl +++ b/test/automated/flymake/warnpred/test.pl @@ -1,2 +1,2 @@ @arr = [1,2,3,4]; -$b = @arr[1]; +my $b = @arr[1]; commit 59c218fae7f28e3f1d02009998ccc45a135c7daa Author: Glenn Morris Date: Sat Dec 13 13:10:14 2014 -0800 ChangeLog fix diff --git a/ChangeLog b/ChangeLog index 75b503b..2b75dcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -147,7 +147,8 @@ 2014-11-11 Eric S. Raymond - * Makefile.in: git transition - set VCWITNESS appropriately for git. + Git transition. + * Makefile.in (src): Set VCSWITNESS appropriately for git. All bzr revision IDS, and all CVS revision IDs for which a commit could be identified, were changed to time-date!committer version commit db2a7681dd6a5a894dcfcd0281ba34f6b23fb903 Author: Glenn Morris Date: Sat Dec 13 12:56:22 2014 -0800 * test/automated/flymake/warnpred/test.pl: Tweak format The previous format seems to have stopped giving a warning with perl 5.20.1, for some reason. diff --git a/test/ChangeLog b/test/ChangeLog index 0da5f99..442e802 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2014-12-13 Glenn Morris + + * automated/flymake/warnpred/test.pl: Tweak format, since the + previous one seems to have stopped giving a warning with perl 5.20.1. + 2014-11-22 Fabián Ezequiel Gallina * automated/python-tests.el diff --git a/test/automated/flymake/warnpred/test.pl b/test/automated/flymake/warnpred/test.pl index 2013b2e..2752904 100644 --- a/test/automated/flymake/warnpred/test.pl +++ b/test/automated/flymake/warnpred/test.pl @@ -1,2 +1,2 @@ @arr = [1,2,3,4]; -@arr[1] = -1; +$b = @arr[1]; commit d9005dd52df70e84d8807869173f95e59952a88b Author: Eli Zaretskii Date: Sat Dec 13 18:58:08 2014 +0200 src/gnutls.c (gnutls_init): Fix deprecation warning from GCC. diff --git a/src/ChangeLog b/src/ChangeLog index f8790a6..6b7abe4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-12-13 Eli Zaretskii + + * gnutls.c (gnutls_init): Fix deprecation warning from GCC. + 2014-12-12 Eli Zaretskii * gnutls.c (Fgnutls_available_p, syms_of_gnutls): Move diff --git a/src/gnutls.c b/src/gnutls.c index 247e5c4..ffa3c98 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -121,7 +121,7 @@ DEF_GNUTLS_FN (void, gnutls_global_set_mem_functions, gnutls_is_secure_function, gnutls_realloc_function, gnutls_free_function)); DEF_GNUTLS_FN (int, gnutls_handshake, (gnutls_session_t)); -DEF_GNUTLS_FN (int, gnutls_init, (gnutls_session_t *, gnutls_connection_end_t)); +DEF_GNUTLS_FN (int, gnutls_init, (gnutls_session_t *, unsigned int)); DEF_GNUTLS_FN (int, gnutls_priority_set_direct, (gnutls_session_t, const char *, const char **)); DEF_GNUTLS_FN (size_t, gnutls_record_check_pending, (gnutls_session_t));