diff options
| author | Joakim Verona | 2012-11-29 21:25:35 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-11-29 21:25:35 +0100 |
| commit | 85157ae08526617681dc711f885a9ddc3078cfbf (patch) | |
| tree | 8af0474402734784c39f035cfdb1b93b29fad337 | |
| parent | e1abb9a1e78c6e3a55f39e041b9b8d4998b6ff54 (diff) | |
| parent | 83e12fe07c18a6190c6c5ef6e959697eb0ac9f19 (diff) | |
| download | emacs-85157ae08526617681dc711f885a9ddc3078cfbf.tar.gz emacs-85157ae08526617681dc711f885a9ddc3078cfbf.zip | |
auto upstream
39 files changed, 520 insertions, 288 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-11-27 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * make-dist (nt): Adjust to changes in names of the *.manifest files. | ||
| 4 | |||
| 1 | 2012-11-24 Ken Brown <kbrown@cornell.edu> | 5 | 2012-11-24 Ken Brown <kbrown@cornell.edu> |
| 2 | 6 | ||
| 3 | * configure.ac (HAVE_MOUSE): Remove. | 7 | * configure.ac (HAVE_MOUSE): Remove. |
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index ea9c4a3c2d1..eda28b639d2 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt | |||
| @@ -57,8 +57,7 @@ For each step, check for possible errors. | |||
| 57 | M-x ediff. Especially check that Info files aren't built. | 57 | M-x ediff. Especially check that Info files aren't built. |
| 58 | 58 | ||
| 59 | 10. cd EMACS_ROOT_DIR; bzr tag TAG | 59 | 10. cd EMACS_ROOT_DIR; bzr tag TAG |
| 60 | TAG is EMACS_PRETEST_XX_YY_ZZZ for a pretest, EMACS_XX_YY for a | 60 | TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release. |
| 61 | release. | ||
| 62 | 61 | ||
| 63 | Shortly before the release, cut the version branch also, and open | 62 | Shortly before the release, cut the version branch also, and open |
| 64 | a Savannah support request asking for commits to the new branch to | 63 | a Savannah support request asking for commits to the new branch to |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index b85ba12a5b2..a74d4b90b9f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-11-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968). | ||
| 4 | * movemail.c (main): Assume EAGAIN and EBUSY. | ||
| 5 | |||
| 1 | 2012-11-23 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2012-11-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | movemail: treat EACCES etc. failures as permanent | 8 | movemail: treat EACCES etc. failures as permanent |
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 264b3d292c6..f2b2484c8e3 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -430,22 +430,10 @@ main (int argc, char **argv) | |||
| 430 | for certain failure codes. */ | 430 | for certain failure codes. */ |
| 431 | if (status < 0) | 431 | if (status < 0) |
| 432 | { | 432 | { |
| 433 | if (++lockcount <= 5) | 433 | if (++lockcount <= 5 && (errno == EAGAIN || errno == EBUSY)) |
| 434 | { | 434 | { |
| 435 | #ifdef EAGAIN | 435 | sleep (1); |
| 436 | if (errno == EAGAIN) | 436 | goto retry_lock; |
| 437 | { | ||
| 438 | sleep (1); | ||
| 439 | goto retry_lock; | ||
| 440 | } | ||
| 441 | #endif | ||
| 442 | #ifdef EBUSY | ||
| 443 | if (errno == EBUSY) | ||
| 444 | { | ||
| 445 | sleep (1); | ||
| 446 | goto retry_lock; | ||
| 447 | } | ||
| 448 | #endif | ||
| 449 | } | 437 | } |
| 450 | 438 | ||
| 451 | pfatal_with_name (inname); | 439 | pfatal_with_name (inname); |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e403af6416..20de699a5ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,101 @@ | |||
| 1 | 2012-11-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/etags.el (visit-tags-table-buffer): Give a more precise | ||
| 4 | error message when the file doesn't exist (bug#12974). | ||
| 5 | |||
| 6 | 2012-11-29 Kelly Dean <kellydeanch@yahoo.com> (tiny change) | ||
| 7 | |||
| 8 | * simple.el (activate-mark): Run activate-mark-hook (bug#13027). | ||
| 9 | |||
| 10 | 2012-11-29 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * files.el (hack-dir-local-variables): Warn if try to set | ||
| 13 | coding via dir-locals, since it doesn't work. (Bug#7169) | ||
| 14 | |||
| 15 | Add desktop support for restoring vc-dir buffers. (Bug#10606) | ||
| 16 | * vc/vc-dir.el (vc-dir-mode): Autoload it (for desktop restore). | ||
| 17 | Set buffer-local value of desktop-save-buffer. | ||
| 18 | (vc-dir-desktop-buffer-misc-data, vc-dir-restore-desktop-buffer): | ||
| 19 | New functions. | ||
| 20 | (desktop-buffer-mode-handlers): Add vc-dir-mode entry. | ||
| 21 | * desktop.el (desktop-save-buffer-p): Treat vc-dir like dired. | ||
| 22 | |||
| 23 | * files.el (inhibit-local-variables-ignore-case): New. (Bug#10610) | ||
| 24 | (inhibit-local-variables-p): Use inhibit-local-variables-ignore-case. | ||
| 25 | Doc fix. | ||
| 26 | (inhibit-local-variables-regexps, inhibit-local-variables-suffixes): | ||
| 27 | Doc fixes. | ||
| 28 | |||
| 29 | 2012-11-28 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 30 | |||
| 31 | * calc/calc-forms.el (calc-date-notation): Fix regexp | ||
| 32 | used to find time codes. Fix symbol for seconds. | ||
| 33 | |||
| 34 | 2012-11-27 Glenn Morris <rgm@gnu.org> | ||
| 35 | |||
| 36 | * emacs-lisp/derived.el (derived-mode-make-docstring): | ||
| 37 | Don't mention "abbrev" or "syntax" if nil. (Bug#11277) | ||
| 38 | |||
| 39 | 2012-11-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 40 | |||
| 41 | * textmodes/table.el (table-insert): Don't use `symbol-name' on | ||
| 42 | lexically scoped variables (bug#13005). | ||
| 43 | |||
| 44 | 2012-11-27 Glenn Morris <rgm@gnu.org> | ||
| 45 | |||
| 46 | * vc/vc-hooks.el (vc-mistrust-permissions): | ||
| 47 | Default to t, to avoid data-loss. (Bug#11490) | ||
| 48 | |||
| 49 | 2012-11-27 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 50 | |||
| 51 | * progmodes/python.el (python-indent-guess-indent-offset): | ||
| 52 | If indentation is guessed make python-indent-offset buffer-local. | ||
| 53 | |||
| 54 | Fix Imenu regression. | ||
| 55 | * progmodes/python.el (python-nav-beginning-of-defun): | ||
| 56 | Fix forward movement when statement(s) separates point from defun. | ||
| 57 | (python-imenu-prev-index-position): New function. | ||
| 58 | |||
| 59 | 2012-11-27 Eli Zaretskii <eliz@gnu.org> | ||
| 60 | |||
| 61 | * subr.el (buffer-file-type): Declare with defvar-local. Doc fix. | ||
| 62 | |||
| 63 | * dos-w32.el (find-file-not-found-set-buffer-file-coding-system): | ||
| 64 | Don't set buffer-file-type. Return nil. (Bug#12989) | ||
| 65 | |||
| 66 | 2012-11-27 Glenn Morris <rgm@gnu.org> | ||
| 67 | |||
| 68 | * hippie-exp.el (hippie-expand-try-functions-list): | ||
| 69 | Re-autoload it. (Bug#12982) | ||
| 70 | |||
| 71 | 2012-11-27 Eli Zaretskii <eliz@gnu.org> | ||
| 72 | |||
| 73 | * descr-text.el (describe-char-padded-string): | ||
| 74 | Call internal-char-font only on GUI frames. (Bug#11964) | ||
| 75 | |||
| 76 | 2012-11-27 Andreas Schwab <schwab@linux-m68k.org> | ||
| 77 | |||
| 78 | * buff-menu.el (Buffer-menu-buffer+size-width): Fix customize type | ||
| 79 | and obsoletion message. | ||
| 80 | |||
| 81 | 2012-11-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 82 | |||
| 83 | * emacs-lisp/cl-macs.el (cl--transform-lambda): Add back `declare' in | ||
| 84 | the constructs to keep outside of the `cl-block' (bug#12977). | ||
| 85 | |||
| 86 | 2012-11-27 Chong Yidong <cyd@gnu.org> | ||
| 87 | |||
| 88 | * mouse.el (mouse-drag-line): Even if the line is not draggable, | ||
| 89 | keep reading until we get the up-event anyway, in order to process | ||
| 90 | the up-event for mouse-1-click-follows-link (Bug#12971). | ||
| 91 | |||
| 92 | 2012-11-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 93 | |||
| 94 | * emacs-lisp/advice.el (ad-should-compile): Don't compile advice if the | ||
| 95 | base function is not yet defined (bug#12965). | ||
| 96 | (ad-activate-advised-definition): Use ad-compile-function. | ||
| 97 | (ad-activate): Use cond. | ||
| 98 | |||
| 1 | 2012-11-25 Leo Liu <sdl.web@gmail.com> | 99 | 2012-11-25 Leo Liu <sdl.web@gmail.com> |
| 2 | 100 | ||
| 3 | * textmodes/sgml-mode.el (sgml-tag): Fix indentation for closing tag. | 101 | * textmodes/sgml-mode.el (sgml-tag): Fix indentation for closing tag. |
| @@ -10,14 +108,14 @@ | |||
| 10 | Texinfo integration. | 108 | Texinfo integration. |
| 11 | 109 | ||
| 12 | * textmodes/reftex.el (reftex-section-pre-regexp) | 110 | * textmodes/reftex.el (reftex-section-pre-regexp) |
| 13 | (reftex-section-post-regexp, reftex-section-info-function): New | 111 | (reftex-section-post-regexp, reftex-section-info-function): |
| 14 | variable. | 112 | New variable. |
| 15 | (reftex-compile-variables): Use variables | 113 | (reftex-compile-variables): Use variables reftex-section-pre-regexp, |
| 16 | reftex-section-pre-regexp, reftex-section-post-regexp, and | 114 | reftex-section-post-regexp, and reftex-section-info-function in order |
| 17 | reftex-section-info-function in order to be compatible with Texinfo integration. | 115 | to be compatible with Texinfo integration. |
| 18 | 116 | ||
| 19 | * textmodes/reftex-toc.el (reftex-toc-promote-action): use | 117 | * textmodes/reftex-toc.el (reftex-toc-promote-action): |
| 20 | reftex-section-pre-regexp variable in order to be compatible with | 118 | use reftex-section-pre-regexp variable in order to be compatible with |
| 21 | Texinfo integration. | 119 | Texinfo integration. |
| 22 | 120 | ||
| 23 | 2012-11-25 Chong Yidong <cyd@gnu.org> | 121 | 2012-11-25 Chong Yidong <cyd@gnu.org> |
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 6ab6e548ab5..01035f8727d 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -55,12 +55,12 @@ If nil, use `Buffer-menu-name-width' and `Buffer-menu-size-width'. | |||
| 55 | If non-nil, the value of `Buffer-menu-name-width' is overridden; | 55 | If non-nil, the value of `Buffer-menu-name-width' is overridden; |
| 56 | the name column is assigned width `Buffer-menu-buffer+size-width' | 56 | the name column is assigned width `Buffer-menu-buffer+size-width' |
| 57 | minus `Buffer-menu-size-width'. This use is deprecated." | 57 | minus `Buffer-menu-size-width'. This use is deprecated." |
| 58 | :type 'number | 58 | :type '(choice (const nil) number) |
| 59 | :group 'Buffer-menu | 59 | :group 'Buffer-menu |
| 60 | :version "24.3") | 60 | :version "24.3") |
| 61 | 61 | ||
| 62 | (make-obsolete-variable 'Buffer-menu-buffer+size-width | 62 | (make-obsolete-variable 'Buffer-menu-buffer+size-width |
| 63 | "`Buffer-menu-name-width' and `Buffer-menu-size-width'" | 63 | "use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead." |
| 64 | "24.3") | 64 | "24.3") |
| 65 | 65 | ||
| 66 | (defcustom Buffer-menu-name-width 19 | 66 | (defcustom Buffer-menu-name-width 19 |
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 98b22550f75..15a153059a8 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el | |||
| @@ -94,7 +94,8 @@ | |||
| 94 | (setcar (nthcdr arg calc-standard-date-formats) fmt)) | 94 | (setcar (nthcdr arg calc-standard-date-formats) fmt)) |
| 95 | (let ((case-fold-search nil)) | 95 | (let ((case-fold-search nil)) |
| 96 | (and (not (string-match "<.*>" fmt)) | 96 | (and (not (string-match "<.*>" fmt)) |
| 97 | (string-match "\\`[^hHspP]*\\([^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*[bBhHmpPsS]+[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\)[^hHspP]*\\'" fmt) | 97 | ;; Find time part to put in <...> |
| 98 | (string-match "\\`[^hHspP]*\\([^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\(bs\\|bm\\|bh\\|BS\\|BH\\|[hHmpPsS]\\)+[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\)[^hHspP]*\\'" fmt) | ||
| 98 | (string-match (concat "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*" | 99 | (string-match (concat "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*" |
| 99 | (regexp-quote (math-match-substring fmt 1)) | 100 | (regexp-quote (math-match-substring fmt 1)) |
| 100 | "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*") fmt) | 101 | "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*") fmt) |
| @@ -140,7 +141,7 @@ | |||
| 140 | W www Www Wwww WWW WWWW | 141 | W www Www Wwww WWW WWWW |
| 141 | h hh bh H HH BH | 142 | h hh bh H HH BH |
| 142 | p P pp PP pppp PPPP | 143 | p P pp PP pppp PPPP |
| 143 | m mm bm s ss bss SS BS C | 144 | m mm bm s ss bs SS BS C |
| 144 | N n J j U b)) | 145 | N n J j U b)) |
| 145 | (and (eq sym 'X) (not lfmt) (not fullfmt)) | 146 | (and (eq sym 'X) (not lfmt) (not fullfmt)) |
| 146 | (error "Bad format code: %s" sym)) | 147 | (error "Bad format code: %s" sym)) |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index c384b96df86..d531e15546a 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -354,7 +354,8 @@ This function is semi-obsolete. Use `get-char-code-property'." | |||
| 354 | ;; Return a string of CH with composition for padding on both sides. | 354 | ;; Return a string of CH with composition for padding on both sides. |
| 355 | ;; It is displayed without overlapping with the left/right columns. | 355 | ;; It is displayed without overlapping with the left/right columns. |
| 356 | (defsubst describe-char-padded-string (ch) | 356 | (defsubst describe-char-padded-string (ch) |
| 357 | (if (internal-char-font nil ch) | 357 | (if (and (display-multi-font-p) |
| 358 | (internal-char-font nil ch)) | ||
| 358 | (compose-string (string ch) 0 1 (format "\t%c\t" ch)) | 359 | (compose-string (string ch) 0 1 (format "\t%c\t" ch)) |
| 359 | (string ch))) | 360 | (string ch))) |
| 360 | 361 | ||
diff --git a/lisp/desktop.el b/lisp/desktop.el index c8023bb43ed..5589dd025bc 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -825,7 +825,7 @@ MODE is the major mode. | |||
| 825 | (or (and filename | 825 | (or (and filename |
| 826 | (stringp desktop-files-not-to-save) | 826 | (stringp desktop-files-not-to-save) |
| 827 | (not (string-match desktop-files-not-to-save filename))) | 827 | (not (string-match desktop-files-not-to-save filename))) |
| 828 | (and (eq mode 'dired-mode) | 828 | (and (memq mode '(dired-mode vc-dir-mode)) |
| 829 | (with-current-buffer bufname | 829 | (with-current-buffer bufname |
| 830 | (not (setq dired-skip | 830 | (not (setq dired-skip |
| 831 | (string-match desktop-files-not-to-save | 831 | (string-match desktop-files-not-to-save |
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 4839d6b9239..cb043ce8559 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el | |||
| @@ -210,7 +210,7 @@ set to the appropriate coding system, and the value of | |||
| 210 | (untranslated-file-p (buffer-file-name)))) | 210 | (untranslated-file-p (buffer-file-name)))) |
| 211 | (setq coding (coding-system-change-eol-conversion coding 0)) | 211 | (setq coding (coding-system-change-eol-conversion coding 0)) |
| 212 | (setq buffer-file-coding-system coding)) | 212 | (setq buffer-file-coding-system coding)) |
| 213 | (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion))))) | 213 | nil))) |
| 214 | 214 | ||
| 215 | ;;; To set the default coding system on new files. | 215 | ;;; To set the default coding system on new files. |
| 216 | (add-hook 'find-file-not-found-functions | 216 | (add-hook 'find-file-not-found-functions |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index c2ebb3bbdc6..a947dceccc9 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -2900,19 +2900,18 @@ If COMPILE is non-nil and not a negative number then it returns t. | |||
| 2900 | If COMPILE is a negative number then it returns nil. | 2900 | If COMPILE is a negative number then it returns nil. |
| 2901 | If COMPILE is nil then the result depends on the value of | 2901 | If COMPILE is nil then the result depends on the value of |
| 2902 | `ad-default-compilation-action' (which see)." | 2902 | `ad-default-compilation-action' (which see)." |
| 2903 | (if (integerp compile) | 2903 | (cond |
| 2904 | (>= compile 0) | 2904 | ;; Don't compile until the real function definition is known (bug#12965). |
| 2905 | (if compile | 2905 | ((not (ad-real-orig-definition function)) nil) |
| 2906 | compile | 2906 | ((integerp compile) (>= compile 0)) |
| 2907 | (cond ((eq ad-default-compilation-action 'never) | 2907 | (compile) |
| 2908 | nil) | 2908 | ((eq ad-default-compilation-action 'never) nil) |
| 2909 | ((eq ad-default-compilation-action 'always) | 2909 | ((eq ad-default-compilation-action 'always) t) |
| 2910 | t) | 2910 | ((eq ad-default-compilation-action 'like-original) |
| 2911 | ((eq ad-default-compilation-action 'like-original) | 2911 | (or (ad-subr-p (ad-get-orig-definition function)) |
| 2912 | (or (ad-subr-p (ad-get-orig-definition function)) | 2912 | (ad-compiled-p (ad-get-orig-definition function)))) |
| 2913 | (ad-compiled-p (ad-get-orig-definition function)))) | 2913 | ;; everything else means `maybe': |
| 2914 | ;; everything else means `maybe': | 2914 | (t (featurep 'byte-compile)))) |
| 2915 | (t (featurep 'byte-compile)))))) | ||
| 2916 | 2915 | ||
| 2917 | (defun ad-activate-advised-definition (function compile) | 2916 | (defun ad-activate-advised-definition (function compile) |
| 2918 | "Redefine FUNCTION with its advised definition from cache or scratch. | 2917 | "Redefine FUNCTION with its advised definition from cache or scratch. |
| @@ -2927,7 +2926,7 @@ The current definition and its cache-id will be put into the cache." | |||
| 2927 | (ad-make-advised-definition function))) | 2926 | (ad-make-advised-definition function))) |
| 2928 | (advice-add function :around advicefunname) | 2927 | (advice-add function :around advicefunname) |
| 2929 | (if (ad-should-compile function compile) | 2928 | (if (ad-should-compile function compile) |
| 2930 | (byte-compile advicefunname)) | 2929 | (ad-compile-function function)) |
| 2931 | (if verified-cached-definition | 2930 | (if verified-cached-definition |
| 2932 | (if (not (eq verified-cached-definition | 2931 | (if (not (eq verified-cached-definition |
| 2933 | (symbol-function advicefunname))) | 2932 | (symbol-function advicefunname))) |
| @@ -3003,20 +3002,20 @@ definition will always be cached for later usage." | |||
| 3003 | (interactive | 3002 | (interactive |
| 3004 | (list (ad-read-advised-function "Activate advice of") | 3003 | (list (ad-read-advised-function "Activate advice of") |
| 3005 | current-prefix-arg)) | 3004 | current-prefix-arg)) |
| 3006 | (if (not (ad-is-advised function)) | 3005 | (cond |
| 3007 | (error "ad-activate: `%s' is not advised" function) | 3006 | ((not (ad-is-advised function)) |
| 3008 | ;; Just return for forward advised and not yet defined functions: | 3007 | (error "ad-activate: `%s' is not advised" function)) |
| 3009 | (if (ad-get-orig-definition function) | 3008 | ;; Just return for forward advised and not yet defined functions: |
| 3010 | (if (not (ad-has-any-advice function)) | 3009 | ((not (ad-get-orig-definition function)) nil) |
| 3011 | (ad-unadvise function) | 3010 | ((not (ad-has-any-advice function)) (ad-unadvise function)) |
| 3012 | ;; Otherwise activate the advice: | 3011 | ;; Otherwise activate the advice: |
| 3013 | (cond ((ad-has-redefining-advice function) | 3012 | ((ad-has-redefining-advice function) |
| 3014 | (ad-activate-advised-definition function compile) | 3013 | (ad-activate-advised-definition function compile) |
| 3015 | (ad-set-advice-info-field function 'active t) | 3014 | (ad-set-advice-info-field function 'active t) |
| 3016 | (eval (ad-make-hook-form function 'activation)) | 3015 | (eval (ad-make-hook-form function 'activation)) |
| 3017 | function) | 3016 | function) |
| 3018 | ;; Here we are if we have all disabled advices: | 3017 | ;; Here we are if we have all disabled advices: |
| 3019 | (t (ad-deactivate function))))))) | 3018 | (t (ad-deactivate function)))) |
| 3020 | 3019 | ||
| 3021 | (defalias 'ad-activate-on 'ad-activate) | 3020 | (defalias 'ad-activate-on 'ad-activate) |
| 3022 | 3021 | ||
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 7481e2d0b2b..743c24ffd91 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el | |||
| @@ -267,7 +267,7 @@ including `cl-block' and `cl-eval-when'. | |||
| 267 | ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when | 267 | ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when |
| 268 | ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp | 268 | ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp |
| 269 | ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) | 269 | ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) |
| 270 | ;;;;;; "cl-macs" "cl-macs.el" "93b43ab1ba3868dbad9ddedc54771a66") | 270 | ;;;;;; "cl-macs" "cl-macs.el" "6e610d63ae75ac7b631e09c76f75c258") |
| 271 | ;;; Generated autoloads from cl-macs.el | 271 | ;;; Generated autoloads from cl-macs.el |
| 272 | 272 | ||
| 273 | (autoload 'cl--compiler-macro-list* "cl-macs" "\ | 273 | (autoload 'cl--compiler-macro-list* "cl-macs" "\ |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index f8c18339ff2..41c54bee448 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -216,12 +216,17 @@ The name is made by appending a number to PREFIX, default \"G\"." | |||
| 216 | (defvar cl--bind-inits) (defvar cl--bind-lets) (defvar cl--bind-forms) | 216 | (defvar cl--bind-inits) (defvar cl--bind-lets) (defvar cl--bind-forms) |
| 217 | 217 | ||
| 218 | (defun cl--transform-lambda (form bind-block) | 218 | (defun cl--transform-lambda (form bind-block) |
| 219 | "Transform a function form FORM of name BIND-BLOCK. | ||
| 220 | BIND-BLOCK is the name of the symbol to which the function will be bound, | ||
| 221 | and which will be used for the name of the `cl-block' surrounding the | ||
| 222 | function's body. | ||
| 223 | FORM is of the form (ARGS . BODY)." | ||
| 219 | (let* ((args (car form)) (body (cdr form)) (orig-args args) | 224 | (let* ((args (car form)) (body (cdr form)) (orig-args args) |
| 220 | (cl--bind-block bind-block) (cl--bind-defs nil) (cl--bind-enquote nil) | 225 | (cl--bind-block bind-block) (cl--bind-defs nil) (cl--bind-enquote nil) |
| 221 | (cl--bind-inits nil) (cl--bind-lets nil) (cl--bind-forms nil) | 226 | (cl--bind-inits nil) (cl--bind-lets nil) (cl--bind-forms nil) |
| 222 | (header nil) (simple-args nil)) | 227 | (header nil) (simple-args nil)) |
| 223 | (while (or (stringp (car body)) | 228 | (while (or (stringp (car body)) |
| 224 | (memq (car-safe (car body)) '(interactive cl-declare))) | 229 | (memq (car-safe (car body)) '(interactive declare cl-declare))) |
| 225 | (push (pop body) header)) | 230 | (push (pop body) header)) |
| 226 | (setq args (if (listp args) (cl-copy-list args) (list '&rest args))) | 231 | (setq args (if (listp args) (cl-copy-list args) (list '&rest args))) |
| 227 | (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p))))) | 232 | (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p))))) |
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 8c8d37b2194..f4b79eb3016 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el | |||
| @@ -295,16 +295,32 @@ is not very useful." | |||
| 295 | ;; Use a default docstring. | 295 | ;; Use a default docstring. |
| 296 | (setq docstring | 296 | (setq docstring |
| 297 | (if (null parent) | 297 | (if (null parent) |
| 298 | (format "Major-mode. | 298 | ;; FIXME filling. |
| 299 | Uses keymap `%s', abbrev table `%s' and syntax-table `%s'." map abbrev syntax) | 299 | (format "Major-mode.\nUses keymap `%s'%s%s." map |
| 300 | (if abbrev (format "%s abbrev table `%s'" | ||
| 301 | (if syntax "," " and") abbrev) "") | ||
| 302 | (if syntax (format " and syntax-table `%s'" syntax) "")) | ||
| 300 | (format "Major mode derived from `%s' by `define-derived-mode'. | 303 | (format "Major mode derived from `%s' by `define-derived-mode'. |
| 301 | It inherits all of the parent's attributes, but has its own keymap, | 304 | It inherits all of the parent's attributes, but has its own keymap%s: |
| 302 | abbrev table and syntax table: | 305 | |
| 303 | 306 | `%s'%s | |
| 304 | `%s', `%s' and `%s' | 307 | |
| 305 | 308 | which more-or-less shadow%s %s's corresponding table%s." | |
| 306 | which more-or-less shadow %s's corresponding tables." | 309 | parent |
| 307 | parent map abbrev syntax parent)))) | 310 | (cond ((and abbrev syntax) |
| 311 | ",\nabbrev table and syntax table") | ||
| 312 | (abbrev "\nand abbrev table") | ||
| 313 | (syntax "\nand syntax table") | ||
| 314 | (t "")) | ||
| 315 | map | ||
| 316 | (cond ((and abbrev syntax) | ||
| 317 | (format ", `%s' and `%s'" abbrev syntax)) | ||
| 318 | ((or abbrev syntax) | ||
| 319 | (format " and `%s'" (or abbrev syntax))) | ||
| 320 | (t "")) | ||
| 321 | (if (or abbrev syntax) "" "s") | ||
| 322 | parent | ||
| 323 | (if (or abbrev syntax) "s" ""))))) | ||
| 308 | 324 | ||
| 309 | (unless (string-match (regexp-quote (symbol-name hook)) docstring) | 325 | (unless (string-match (regexp-quote (symbol-name hook)) docstring) |
| 310 | ;; Make sure the docstring mentions the mode's hook. | 326 | ;; Make sure the docstring mentions the mode's hook. |
diff --git a/lisp/files.el b/lisp/files.el index 496f9bf8fa4..e03b02193a4 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2502,25 +2502,31 @@ They may happen to contain sequences that look like local variable | |||
| 2502 | specifications, but are not really, or they may be containers for | 2502 | specifications, but are not really, or they may be containers for |
| 2503 | member files with their own local variable sections, which are | 2503 | member files with their own local variable sections, which are |
| 2504 | not appropriate for the containing file. | 2504 | not appropriate for the containing file. |
| 2505 | See also `inhibit-local-variables-suffixes'.") | 2505 | The function `inhibit-local-variables-p' uses this.") |
| 2506 | 2506 | ||
| 2507 | (define-obsolete-variable-alias 'inhibit-first-line-modes-suffixes | 2507 | (define-obsolete-variable-alias 'inhibit-first-line-modes-suffixes |
| 2508 | 'inhibit-local-variables-suffixes "24.1") | 2508 | 'inhibit-local-variables-suffixes "24.1") |
| 2509 | 2509 | ||
| 2510 | (defvar inhibit-local-variables-suffixes nil | 2510 | (defvar inhibit-local-variables-suffixes nil |
| 2511 | "List of regexps matching suffixes to remove from file names. | 2511 | "List of regexps matching suffixes to remove from file names. |
| 2512 | When checking `inhibit-local-variables-regexps', we first discard | 2512 | The function `inhibit-local-variables-p' uses this: when checking |
| 2513 | from the end of the file name anything that matches one of these regexps.") | 2513 | a file name, it first discards from the end of the name anything that |
| 2514 | matches one of these regexps.") | ||
| 2515 | |||
| 2516 | ;; Can't think of any situation in which you'd want this to be nil... | ||
| 2517 | (defvar inhibit-local-variables-ignore-case t | ||
| 2518 | "Non-nil means `inhibit-local-variables-p' ignores case.") | ||
| 2514 | 2519 | ||
| 2515 | ;; TODO explicitly add case-fold-search t? | ||
| 2516 | (defun inhibit-local-variables-p () | 2520 | (defun inhibit-local-variables-p () |
| 2517 | "Return non-nil if file local variables should be ignored. | 2521 | "Return non-nil if file local variables should be ignored. |
| 2518 | This checks the file (or buffer) name against `inhibit-local-variables-regexps' | 2522 | This checks the file (or buffer) name against `inhibit-local-variables-regexps' |
| 2519 | and `inhibit-local-variables-suffixes'." | 2523 | and `inhibit-local-variables-suffixes'. If |
| 2524 | `inhibit-local-variables-ignore-case' is non-nil, this ignores case." | ||
| 2520 | (let ((temp inhibit-local-variables-regexps) | 2525 | (let ((temp inhibit-local-variables-regexps) |
| 2521 | (name (if buffer-file-name | 2526 | (name (if buffer-file-name |
| 2522 | (file-name-sans-versions buffer-file-name) | 2527 | (file-name-sans-versions buffer-file-name) |
| 2523 | (buffer-name)))) | 2528 | (buffer-name))) |
| 2529 | (case-fold-search inhibit-local-variables-ignore-case)) | ||
| 2524 | (while (let ((sufs inhibit-local-variables-suffixes)) | 2530 | (while (let ((sufs inhibit-local-variables-suffixes)) |
| 2525 | (while (and sufs (not (string-match (car sufs) name))) | 2531 | (while (and sufs (not (string-match (car sufs) name))) |
| 2526 | (setq sufs (cdr sufs))) | 2532 | (setq sufs (cdr sufs))) |
| @@ -3676,10 +3682,13 @@ and `file-local-variables-alist', without applying them." | |||
| 3676 | (dir-locals-get-class-variables class) dir-name nil))) | 3682 | (dir-locals-get-class-variables class) dir-name nil))) |
| 3677 | (when variables | 3683 | (when variables |
| 3678 | (dolist (elt variables) | 3684 | (dolist (elt variables) |
| 3679 | (unless (memq (car elt) '(eval mode)) | 3685 | (if (eq (car elt) 'coding) |
| 3680 | (setq dir-local-variables-alist | 3686 | (display-warning :warning |
| 3681 | (assq-delete-all (car elt) dir-local-variables-alist))) | 3687 | "Coding cannot be specified by dir-locals") |
| 3682 | (push elt dir-local-variables-alist)) | 3688 | (unless (memq (car elt) '(eval mode)) |
| 3689 | (setq dir-local-variables-alist | ||
| 3690 | (assq-delete-all (car elt) dir-local-variables-alist))) | ||
| 3691 | (push elt dir-local-variables-alist))) | ||
| 3683 | (hack-local-variables-filter variables dir-name))))))) | 3692 | (hack-local-variables-filter variables dir-name))))))) |
| 3684 | 3693 | ||
| 3685 | (defun hack-dir-local-variables-non-file-buffer () | 3694 | (defun hack-dir-local-variables-non-file-buffer () |
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el index 2f0a6e3af59..d2c69c70b75 100644 --- a/lisp/hippie-exp.el +++ b/lisp/hippie-exp.el | |||
| @@ -199,6 +199,8 @@ | |||
| 199 | 199 | ||
| 200 | (defvar he-search-window ()) | 200 | (defvar he-search-window ()) |
| 201 | 201 | ||
| 202 | ;;; Autoloaded for historical reasons (bug#12982) | ||
| 203 | ;;;###autoload | ||
| 202 | (defcustom hippie-expand-try-functions-list | 204 | (defcustom hippie-expand-try-functions-list |
| 203 | '(try-complete-file-name-partially | 205 | '(try-complete-file-name-partially |
| 204 | try-complete-file-name | 206 | try-complete-file-name |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 61d70404bd6..60a3d390889 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -425,7 +425,7 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 425 | (frame-parameters frame))) | 425 | (frame-parameters frame))) |
| 426 | 'right))) | 426 | 'right))) |
| 427 | (draggable t) | 427 | (draggable t) |
| 428 | event position growth dragged) | 428 | finished event position growth dragged) |
| 429 | (cond | 429 | (cond |
| 430 | ((eq line 'header) | 430 | ((eq line 'header) |
| 431 | ;; Check whether header-line can be dragged at all. | 431 | ;; Check whether header-line can be dragged at all. |
| @@ -457,7 +457,7 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 457 | ;; Start tracking. | 457 | ;; Start tracking. |
| 458 | (track-mouse | 458 | (track-mouse |
| 459 | ;; Loop reading events and sampling the position of the mouse. | 459 | ;; Loop reading events and sampling the position of the mouse. |
| 460 | (while draggable | 460 | (while (not finished) |
| 461 | (setq event (read-event)) | 461 | (setq event (read-event)) |
| 462 | (setq position (mouse-position)) | 462 | (setq position (mouse-position)) |
| 463 | ;; Do nothing if | 463 | ;; Do nothing if |
| @@ -472,7 +472,7 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 472 | ;; - there is a keyboard event or some other unknown event. | 472 | ;; - there is a keyboard event or some other unknown event. |
| 473 | (cond | 473 | (cond |
| 474 | ((not (consp event)) | 474 | ((not (consp event)) |
| 475 | (setq draggable nil)) | 475 | (setq finished t)) |
| 476 | ((memq (car event) '(switch-frame select-window)) | 476 | ((memq (car event) '(switch-frame select-window)) |
| 477 | nil) | 477 | nil) |
| 478 | ((not (memq (car event) '(mouse-movement scroll-bar-movement))) | 478 | ((not (memq (car event) '(mouse-movement scroll-bar-movement))) |
| @@ -480,15 +480,15 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 480 | ;; Do not unread a drag-mouse-1 event to avoid selecting | 480 | ;; Do not unread a drag-mouse-1 event to avoid selecting |
| 481 | ;; some other window. For vertical line dragging do not | 481 | ;; some other window. For vertical line dragging do not |
| 482 | ;; unread mouse-1 events either (but only if we dragged at | 482 | ;; unread mouse-1 events either (but only if we dragged at |
| 483 | ;; least once to allow mouse-1 clicks get through. | 483 | ;; least once to allow mouse-1 clicks get through). |
| 484 | (unless (and dragged | 484 | (unless (and dragged |
| 485 | (if (eq line 'vertical) | 485 | (if (eq line 'vertical) |
| 486 | (memq (car event) '(drag-mouse-1 mouse-1)) | 486 | (memq (car event) '(drag-mouse-1 mouse-1)) |
| 487 | (eq (car event) 'drag-mouse-1))) | 487 | (eq (car event) 'drag-mouse-1))) |
| 488 | (push event unread-command-events))) | 488 | (push event unread-command-events))) |
| 489 | (setq draggable nil)) | 489 | (setq finished t)) |
| 490 | ((or (not (eq (car position) frame)) | 490 | ((not (and (eq (car position) frame) |
| 491 | (null (car (cdr position)))) | 491 | (cadr position))) |
| 492 | nil) | 492 | nil) |
| 493 | ((eq line 'vertical) | 493 | ((eq line 'vertical) |
| 494 | ;; Drag vertical divider. | 494 | ;; Drag vertical divider. |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 071a0fb6037..067d89781d2 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -702,7 +702,9 @@ Returns t if it visits a tags table, or nil if there are no more in the list." | |||
| 702 | (kill-local-variable 'tags-file-name) | 702 | (kill-local-variable 'tags-file-name) |
| 703 | (if (eq local-tags-file-name tags-file-name) | 703 | (if (eq local-tags-file-name tags-file-name) |
| 704 | (setq tags-file-name nil)) | 704 | (setq tags-file-name nil)) |
| 705 | (user-error "File %s is not a valid tags table" | 705 | (user-error (if (file-exists-p local-tags-file-name) |
| 706 | "File %s is not a valid tags table" | ||
| 707 | "File %s does not exist") | ||
| 706 | local-tags-file-name))))) | 708 | local-tags-file-name))))) |
| 707 | 709 | ||
| 708 | (defun tags-reset-tags-tables () | 710 | (defun tags-reset-tags-tables () |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 550c5f5a129..a2c8453a011 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ;; Implements Syntax highlighting, Indentation, Movement, Shell | 33 | ;; Implements Syntax highlighting, Indentation, Movement, Shell |
| 34 | ;; interaction, Shell completion, Shell virtualenv support, Pdb | 34 | ;; interaction, Shell completion, Shell virtualenv support, Pdb |
| 35 | ;; tracking, Symbol completion, Skeletons, FFAP, Code Check, Eldoc, | 35 | ;; tracking, Symbol completion, Skeletons, FFAP, Code Check, Eldoc, |
| 36 | ;; imenu. | 36 | ;; Imenu. |
| 37 | 37 | ||
| 38 | ;; Syntax highlighting: Fontification of code is provided and supports | 38 | ;; Syntax highlighting: Fontification of code is provided and supports |
| 39 | ;; python's triple quoted strings properly. | 39 | ;; python's triple quoted strings properly. |
| @@ -169,10 +169,12 @@ | |||
| 169 | ;; might guessed you should run `python-shell-send-buffer' from time | 169 | ;; might guessed you should run `python-shell-send-buffer' from time |
| 170 | ;; to time to get better results too. | 170 | ;; to time to get better results too. |
| 171 | 171 | ||
| 172 | ;; imenu: This mode supports imenu in its most basic form, letting it | 172 | ;; Imenu: This mode supports Imenu in its most basic form, letting it |
| 173 | ;; build the necessary alist via `imenu-default-create-index-function' | 173 | ;; build the necessary alist via `imenu-default-create-index-function' |
| 174 | ;; by having set `imenu-extract-index-name-function' to | 174 | ;; by having set `imenu-extract-index-name-function' to |
| 175 | ;; `python-info-current-defun'. | 175 | ;; `python-info-current-defun' and |
| 176 | ;; `imenu-prev-index-position-function' to | ||
| 177 | ;; `python-imenu-prev-index-position'. | ||
| 176 | 178 | ||
| 177 | ;; If you used python-mode.el you probably will miss auto-indentation | 179 | ;; If you used python-mode.el you probably will miss auto-indentation |
| 178 | ;; when inserting newlines. To achieve the same behavior you have | 180 | ;; when inserting newlines. To achieve the same behavior you have |
| @@ -656,7 +658,7 @@ These make `python-indent-calculate-indentation' subtract the value of | |||
| 656 | (python-util-forward-comment) | 658 | (python-util-forward-comment) |
| 657 | (current-indentation)))) | 659 | (current-indentation)))) |
| 658 | (if indentation | 660 | (if indentation |
| 659 | (setq python-indent-offset indentation) | 661 | (set (make-local-variable 'python-indent-offset) indentation) |
| 660 | (message "Can't guess python-indent-offset, using defaults: %s" | 662 | (message "Can't guess python-indent-offset, using defaults: %s" |
| 661 | python-indent-offset))))))) | 663 | python-indent-offset))))))) |
| 662 | 664 | ||
| @@ -1098,12 +1100,12 @@ With positive ARG search backwards, else search forwards." | |||
| 1098 | (beg-indentation | 1100 | (beg-indentation |
| 1099 | (and (> arg 0) | 1101 | (and (> arg 0) |
| 1100 | (save-excursion | 1102 | (save-excursion |
| 1101 | (and (python-info-current-line-empty-p) | 1103 | (while (and |
| 1102 | (python-util-forward-comment -1)) | 1104 | (not (python-info-looking-at-beginning-of-defun)) |
| 1103 | (python-nav-beginning-of-statement) | 1105 | (python-nav-backward-block))) |
| 1104 | (if (python-info-looking-at-beginning-of-defun) | 1106 | (or (and (python-info-looking-at-beginning-of-defun) |
| 1105 | (+ (current-indentation) python-indent-offset) | 1107 | (+ (current-indentation) python-indent-offset)) |
| 1106 | (current-indentation))))) | 1108 | 0)))) |
| 1107 | (found | 1109 | (found |
| 1108 | (progn | 1110 | (progn |
| 1109 | (when (and (< arg 0) | 1111 | (when (and (< arg 0) |
| @@ -2881,6 +2883,19 @@ Interactively, prompt for symbol." | |||
| 2881 | "^Eldoc needs an inferior Python process running.") | 2883 | "^Eldoc needs an inferior Python process running.") |
| 2882 | 2884 | ||
| 2883 | 2885 | ||
| 2886 | ;;; Imenu | ||
| 2887 | |||
| 2888 | (defun python-imenu-prev-index-position () | ||
| 2889 | "Python mode's `imenu-prev-index-position-function'." | ||
| 2890 | (let ((found)) | ||
| 2891 | (while (and (setq found | ||
| 2892 | (re-search-backward python-nav-beginning-of-defun-regexp nil t)) | ||
| 2893 | (not (python-info-looking-at-beginning-of-defun)))) | ||
| 2894 | (and found | ||
| 2895 | (python-info-looking-at-beginning-of-defun) | ||
| 2896 | (python-info-current-defun)))) | ||
| 2897 | |||
| 2898 | |||
| 2884 | ;;; Misc helpers | 2899 | ;;; Misc helpers |
| 2885 | 2900 | ||
| 2886 | (defun python-info-current-defun (&optional include-type) | 2901 | (defun python-info-current-defun (&optional include-type) |
| @@ -3225,6 +3240,9 @@ if that value is non-nil." | |||
| 3225 | (set (make-local-variable 'imenu-extract-index-name-function) | 3240 | (set (make-local-variable 'imenu-extract-index-name-function) |
| 3226 | #'python-info-current-defun) | 3241 | #'python-info-current-defun) |
| 3227 | 3242 | ||
| 3243 | (set (make-local-variable 'imenu-prev-index-position-function) | ||
| 3244 | #'python-imenu-prev-index-position) | ||
| 3245 | |||
| 3228 | (set (make-local-variable 'add-log-current-defun-function) | 3246 | (set (make-local-variable 'add-log-current-defun-function) |
| 3229 | #'python-info-current-defun) | 3247 | #'python-info-current-defun) |
| 3230 | 3248 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 5867561da26..ecd02545b41 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4012,7 +4012,8 @@ run `deactivate-mark-hook'." | |||
| 4012 | (when (mark t) | 4012 | (when (mark t) |
| 4013 | (setq mark-active t) | 4013 | (setq mark-active t) |
| 4014 | (unless transient-mark-mode | 4014 | (unless transient-mark-mode |
| 4015 | (setq transient-mark-mode 'lambda)))) | 4015 | (setq transient-mark-mode 'lambda)) |
| 4016 | (run-hooks 'activate-mark-hook))) | ||
| 4016 | 4017 | ||
| 4017 | (defun set-mark (pos) | 4018 | (defun set-mark (pos) |
| 4018 | "Set this buffer's mark to POS. Don't use this function! | 4019 | "Set this buffer's mark to POS. Don't use this function! |
diff --git a/lisp/subr.el b/lisp/subr.el index c0479d35987..c0cb026fdf9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2622,13 +2622,14 @@ When the hook runs, the temporary buffer is current. | |||
| 2622 | This hook is normally set up with a function to put the buffer in Help | 2622 | This hook is normally set up with a function to put the buffer in Help |
| 2623 | mode.") | 2623 | mode.") |
| 2624 | 2624 | ||
| 2625 | ;; Avoid compiler warnings about this variable, | 2625 | (defvar-local buffer-file-type nil |
| 2626 | ;; which has a special meaning on certain system types. | ||
| 2627 | (defvar buffer-file-type nil | ||
| 2628 | "Non-nil if the visited file is a binary file. | 2626 | "Non-nil if the visited file is a binary file. |
| 2629 | This variable is meaningful on MS-DOG and Windows NT. | 2627 | This variable is meaningful on MS-DOG and MS-Windows. |
| 2630 | On those systems, it is automatically local in every buffer. | 2628 | On those systems, it is automatically local in every buffer. |
| 2631 | On other systems, this variable is normally always nil.") | 2629 | On other systems, this variable is normally always nil. |
| 2630 | |||
| 2631 | WARNING: This variable is obsolete and will disapper Real Soon Now. | ||
| 2632 | Don't use it!") | ||
| 2632 | 2633 | ||
| 2633 | ;; The `assert' macro from the cl package signals | 2634 | ;; The `assert' macro from the cl package signals |
| 2634 | ;; `cl-assertion-failed' at runtime so always define it. | 2635 | ;; `cl-assertion-failed' at runtime so always define it. |
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 6db15b7ec2a..cbfc746dc56 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el | |||
| @@ -1570,8 +1570,7 @@ results. | |||
| 1570 | 1570 | ||
| 1571 | Inside a table cell has a special keymap. | 1571 | Inside a table cell has a special keymap. |
| 1572 | 1572 | ||
| 1573 | \\{table-cell-map} | 1573 | \\{table-cell-map}" |
| 1574 | " | ||
| 1575 | (interactive | 1574 | (interactive |
| 1576 | (progn | 1575 | (progn |
| 1577 | (barf-if-buffer-read-only) | 1576 | (barf-if-buffer-read-only) |
| @@ -1583,41 +1582,47 @@ Inside a table cell has a special keymap. | |||
| 1583 | ("Cell width(s)" . table-cell-width-history) | 1582 | ("Cell width(s)" . table-cell-width-history) |
| 1584 | ("Cell height(s)" . table-cell-height-history))))) | 1583 | ("Cell height(s)" . table-cell-height-history))))) |
| 1585 | (table--make-cell-map) | 1584 | (table--make-cell-map) |
| 1586 | ;; reform the arguments. | 1585 | ;; Reform the arguments. |
| 1587 | (if (null cell-width) (setq cell-width (car table-cell-width-history))) | 1586 | (if (null cell-width) (setq cell-width (car table-cell-width-history))) |
| 1588 | (if (null cell-height) (setq cell-height (car table-cell-height-history))) | 1587 | (if (null cell-height) (setq cell-height (car table-cell-height-history))) |
| 1589 | (if (stringp columns) (setq columns (string-to-number columns))) | 1588 | (if (stringp columns) (setq columns (string-to-number columns))) |
| 1590 | (if (stringp rows) (setq rows (string-to-number rows))) | 1589 | (if (stringp rows) (setq rows (string-to-number rows))) |
| 1591 | (if (stringp cell-width) (setq cell-width (table--string-to-number-list cell-width))) | 1590 | (if (stringp cell-width) |
| 1592 | (if (stringp cell-height) (setq cell-height (table--string-to-number-list cell-height))) | 1591 | (setq cell-width (table--string-to-number-list cell-width))) |
| 1592 | (if (stringp cell-height) | ||
| 1593 | (setq cell-height (table--string-to-number-list cell-height))) | ||
| 1593 | (if (numberp cell-width) (setq cell-width (cons cell-width nil))) | 1594 | (if (numberp cell-width) (setq cell-width (cons cell-width nil))) |
| 1594 | (if (numberp cell-height) (setq cell-height (cons cell-height nil))) | 1595 | (if (numberp cell-height) (setq cell-height (cons cell-height nil))) |
| 1595 | ;; test validity of the arguments. | 1596 | ;; Test validity of the arguments. |
| 1596 | (mapc (lambda (arg) | 1597 | (dolist (arg `((columns . ,columns) |
| 1597 | (let* ((value (symbol-value arg)) | 1598 | (rows . ,rows) |
| 1598 | (error-handler | 1599 | (cell-width . ,cell-width) |
| 1599 | (function (lambda () | 1600 | (cell-height . ,cell-height))) |
| 1600 | (error "%s must be a positive integer%s" arg | 1601 | (let* ((value (cdr arg)) |
| 1601 | (if (listp value) " or a list of positive integers" "")))))) | 1602 | (error-handler |
| 1602 | (if (null value) (funcall error-handler)) | 1603 | (lambda () |
| 1603 | (mapcar (function (lambda (arg1) | 1604 | (error "%s must be a positive integer%s" (car arg) |
| 1604 | (if (or (not (integerp arg1)) | 1605 | (if (listp value) |
| 1605 | (< arg1 1)) | 1606 | " or a list of positive integers" ""))))) |
| 1606 | (funcall error-handler)))) | 1607 | (if (null value) (funcall error-handler)) |
| 1607 | (if (listp value) value | 1608 | (dolist (arg1 (if (listp value) value |
| 1608 | (cons value nil))))) | 1609 | (cons value nil))) |
| 1609 | '(columns rows cell-width cell-height)) | 1610 | (if (or (not (integerp arg1)) |
| 1611 | (< arg1 1)) | ||
| 1612 | (funcall error-handler))))) | ||
| 1610 | (let ((orig-coord (table--get-coordinate)) | 1613 | (let ((orig-coord (table--get-coordinate)) |
| 1611 | (coord (table--get-coordinate)) | 1614 | (coord (table--get-coordinate)) |
| 1612 | r i cw ch cell-str border-str) | 1615 | r i cw ch cell-str border-str) |
| 1613 | ;; prefabricate the building blocks border-str and cell-str. | 1616 | ;; Prefabricate the building blocks border-str and cell-str. |
| 1614 | (with-temp-buffer | 1617 | (with-temp-buffer |
| 1615 | ;; construct border-str | 1618 | ;; Construct border-str. |
| 1616 | (insert table-cell-intersection-char) | 1619 | (insert table-cell-intersection-char) |
| 1617 | (setq cw cell-width) | 1620 | (setq cw cell-width) |
| 1618 | (setq i 0) | 1621 | (setq i 0) |
| 1619 | (while (< i columns) | 1622 | (while (< i columns) |
| 1620 | (insert (make-string (car cw) (string-to-char table-cell-horizontal-chars)) table-cell-intersection-char) | 1623 | (insert (make-string (car cw) |
| 1624 | (string-to-char table-cell-horizontal-chars)) | ||
| 1625 | table-cell-intersection-char) | ||
| 1621 | (if (cdr cw) (setq cw (cdr cw))) | 1626 | (if (cdr cw) (setq cw (cdr cw))) |
| 1622 | (setq i (1+ i))) | 1627 | (setq i (1+ i))) |
| 1623 | (setq border-str (buffer-substring (point-min) (point-max))) | 1628 | (setq border-str (buffer-substring (point-min) (point-max))) |
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 455f48c50d3..a9df6fdee8d 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el | |||
| @@ -930,6 +930,8 @@ If it is a file, return the corresponding cons for the file itself." | |||
| 930 | 930 | ||
| 931 | (defvar use-vc-backend) ;; dynamically bound | 931 | (defvar use-vc-backend) ;; dynamically bound |
| 932 | 932 | ||
| 933 | ;; Autoload cookie needed by desktop.el. | ||
| 934 | ;;;###autoload | ||
| 933 | (define-derived-mode vc-dir-mode special-mode "VC dir" | 935 | (define-derived-mode vc-dir-mode special-mode "VC dir" |
| 934 | "Major mode for VC directory buffers. | 936 | "Major mode for VC directory buffers. |
| 935 | Marking/Unmarking key bindings and actions: | 937 | Marking/Unmarking key bindings and actions: |
| @@ -967,6 +969,8 @@ the *vc-dir* buffer. | |||
| 967 | 969 | ||
| 968 | \\{vc-dir-mode-map}" | 970 | \\{vc-dir-mode-map}" |
| 969 | (set (make-local-variable 'vc-dir-backend) use-vc-backend) | 971 | (set (make-local-variable 'vc-dir-backend) use-vc-backend) |
| 972 | (set (make-local-variable 'desktop-save-buffer) | ||
| 973 | 'vc-dir-desktop-buffer-misc-data) | ||
| 970 | (setq buffer-read-only t) | 974 | (setq buffer-read-only t) |
| 971 | (when (boundp 'tool-bar-map) | 975 | (when (boundp 'tool-bar-map) |
| 972 | (set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map)) | 976 | (set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map)) |
| @@ -1288,6 +1292,31 @@ These are the commands available for use in the file status buffer: | |||
| 1288 | "Default absence of extra information returned for a file." | 1292 | "Default absence of extra information returned for a file." |
| 1289 | nil) | 1293 | nil) |
| 1290 | 1294 | ||
| 1295 | |||
| 1296 | ;;; Support for desktop.el (adapted from what dired.el does). | ||
| 1297 | |||
| 1298 | (declare-function desktop-file-name "desktop" (filename dirname)) | ||
| 1299 | |||
| 1300 | (defun vc-dir-desktop-buffer-misc-data (dirname) | ||
| 1301 | "Auxiliary information to be saved in desktop file." | ||
| 1302 | (cons (desktop-file-name default-directory dirname) vc-dir-backend)) | ||
| 1303 | |||
| 1304 | (defun vc-dir-restore-desktop-buffer (_filename _buffername misc-data) | ||
| 1305 | "Restore a `vc-dir' buffer specified in a desktop file." | ||
| 1306 | (let ((dir (car misc-data)) | ||
| 1307 | (backend (cdr misc-data))) | ||
| 1308 | (if (file-directory-p dir) | ||
| 1309 | (progn | ||
| 1310 | (vc-dir dir backend) | ||
| 1311 | (current-buffer)) | ||
| 1312 | (message "Desktop: Directory %s no longer exists." dir) | ||
| 1313 | (when desktop-missing-file-warning (sit-for 1)) | ||
| 1314 | nil))) | ||
| 1315 | |||
| 1316 | (add-to-list 'desktop-buffer-mode-handlers | ||
| 1317 | '(vc-dir-mode . vc-dir-restore-desktop-buffer)) | ||
| 1318 | |||
| 1319 | |||
| 1291 | (provide 'vc-dir) | 1320 | (provide 'vc-dir) |
| 1292 | 1321 | ||
| 1293 | ;;; vc-dir.el ends here | 1322 | ;;; vc-dir.el ends here |
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 07a292ae435..ef900cb5257 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el | |||
| @@ -107,10 +107,12 @@ control systems." | |||
| 107 | :type 'boolean | 107 | :type 'boolean |
| 108 | :group 'vc) | 108 | :group 'vc) |
| 109 | 109 | ||
| 110 | (defcustom vc-mistrust-permissions nil | 110 | ;; If you fix bug#11490, probably you can set this back to nil. |
| 111 | (defcustom vc-mistrust-permissions t | ||
| 111 | "If non-nil, don't assume permissions/ownership track version-control status. | 112 | "If non-nil, don't assume permissions/ownership track version-control status. |
| 112 | If nil, do rely on the permissions. | 113 | If nil, do rely on the permissions. |
| 113 | See also variable `vc-consult-headers'." | 114 | See also variable `vc-consult-headers'." |
| 115 | :version "24.3" ; nil->t, bug#11490 | ||
| 114 | :type 'boolean | 116 | :type 'boolean |
| 115 | :group 'vc) | 117 | :group 'vc) |
| 116 | 118 | ||
| @@ -381,9 +381,9 @@ echo "Making links to \`m4'" | |||
| 381 | 381 | ||
| 382 | echo "Making links to \`nt'" | 382 | echo "Making links to \`nt'" |
| 383 | (cd nt | 383 | (cd nt |
| 384 | ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt | 384 | ln emacs-x86.manifest emacs-x64.manifest emacs.rc ../${tempdir}/nt |
| 385 | ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt | 385 | ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt |
| 386 | ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt | 386 | ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt |
| 387 | ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) | 387 | ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) |
| 388 | 388 | ||
| 389 | echo "Making links to \`nt/inc' and its subdirectories" | 389 | echo "Making links to \`nt/inc' and its subdirectories" |
diff --git a/src/ChangeLog b/src/ChangeLog index c612c4dd365..b19ecc926d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,67 @@ | |||
| 1 | 2012-11-29 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * xdisp.c (window_outdated): Remove eassert since it hits | ||
| 4 | some suspicious corner cases (see Bug#13007 and Bug#13012). | ||
| 5 | (mode_line_update_needed): New function. | ||
| 6 | (redisplay_internal, redisplay_window): Use it. | ||
| 7 | (ensure_selected_frame): New function. | ||
| 8 | (redisplay_internal, unwind_redisplay): Use it. | ||
| 9 | (redisplay_internal): Move comment about buffer_shared... | ||
| 10 | (buffer_shared_and_changed): ...near to its real use. | ||
| 11 | |||
| 12 | 2012-11-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 13 | |||
| 14 | * callproc.c (Fcall_process): Don't misreport vfork failure. | ||
| 15 | |||
| 16 | 2012-11-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 17 | |||
| 18 | * callproc.c (Fcall_process): Fix vfork portability problems. | ||
| 19 | Do not assume that fd[0], count, filefd, and save_environ survive | ||
| 20 | vfork. Fix bug whereby wrong errno value could be reported for | ||
| 21 | pipe failure. Some minor cleanups, too, as follows. Move buf and | ||
| 22 | bufsize to the context where they're needed. Change new_argv to | ||
| 23 | be of type char **, as this is more convenient and avoids casts. | ||
| 24 | (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX): | ||
| 25 | Now local constants, not macros. | ||
| 26 | |||
| 27 | 2012-11-18 Kenichi Handa <handa@gnu.org> | ||
| 28 | |||
| 29 | * font.c (font_unparse_xlfd): Fix previous change. Keep "const" | ||
| 30 | for the variable "f". | ||
| 31 | |||
| 32 | 2012-11-13 Kenichi Handa <handa@gnu.org> | ||
| 33 | |||
| 34 | * font.c (font_unparse_xlfd): Exclude special characters from the | ||
| 35 | generating XLFD name. | ||
| 36 | |||
| 37 | 2012-11-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 38 | |||
| 39 | Assume POSIX 1003.1-1988 or later for grp.h, pwd.h. | ||
| 40 | * dired.c (stat_uname, stat_gname): | ||
| 41 | * fileio.c (Fexpand_file_name): Remove no-longer-needed casts. | ||
| 42 | |||
| 43 | Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968). | ||
| 44 | * dired.c (directory_files_internal, file_name_completion): | ||
| 45 | Assume EAGAIN and EINTR are defined. | ||
| 46 | |||
| 47 | * fileio.c (Fcopy_file): Assume EISDIR is defined. | ||
| 48 | * gmalloc.c (ENOMEM, EINVAL): Assume they're defined. | ||
| 49 | * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined. | ||
| 50 | * lread.c (readbyte_from_file): Assume EINTR is defined. | ||
| 51 | * process.c (wait_reading_process_output, send_process) [subprocesses]: | ||
| 52 | Assume EIO and EAGAIN are defined. | ||
| 53 | * unexcoff.c (write_segment): Assume EFAULT is defined. | ||
| 54 | |||
| 55 | 2012-11-27 Eli Zaretskii <eliz@gnu.org> | ||
| 56 | |||
| 57 | * fontset.c (Finternal_char_font): Return nil on non-GUI frames. | ||
| 58 | (Bug#11964) | ||
| 59 | |||
| 60 | * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse | ||
| 61 | highlighting on the frame was cleared. Prevents assertion | ||
| 62 | violations when repeatedly clicking on the "Top" link of the | ||
| 63 | "bread-crumbs" in Info buffers. | ||
| 64 | |||
| 1 | 2012-11-25 Paul Eggert <eggert@cs.ucla.edu> | 65 | 2012-11-25 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 66 | ||
| 3 | * sysdep.c (sys_subshell): Don't assume pid_t fits in int. | 67 | * sysdep.c (sys_subshell): Don't assume pid_t fits in int. |
diff --git a/src/callproc.c b/src/callproc.c index c9a504746b3..167663a45c6 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -183,16 +183,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 183 | { | 183 | { |
| 184 | Lisp_Object infile, buffer, current_dir, path, cleanup_info_tail; | 184 | Lisp_Object infile, buffer, current_dir, path, cleanup_info_tail; |
| 185 | bool display_p; | 185 | bool display_p; |
| 186 | int fd[2]; | 186 | int fd0, fd1, filefd; |
| 187 | int filefd; | ||
| 188 | #define CALLPROC_BUFFER_SIZE_MIN (16 * 1024) | ||
| 189 | #define CALLPROC_BUFFER_SIZE_MAX (4 * CALLPROC_BUFFER_SIZE_MIN) | ||
| 190 | char buf[CALLPROC_BUFFER_SIZE_MAX]; | ||
| 191 | int bufsize = CALLPROC_BUFFER_SIZE_MIN; | ||
| 192 | ptrdiff_t count = SPECPDL_INDEX (); | 187 | ptrdiff_t count = SPECPDL_INDEX (); |
| 193 | USE_SAFE_ALLOCA; | 188 | USE_SAFE_ALLOCA; |
| 194 | 189 | ||
| 195 | register const unsigned char **new_argv; | 190 | char **new_argv; |
| 196 | /* File to use for stderr in the child. | 191 | /* File to use for stderr in the child. |
| 197 | t means use same as standard output. */ | 192 | t means use same as standard output. */ |
| 198 | Lisp_Object error_file; | 193 | Lisp_Object error_file; |
| @@ -204,6 +199,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 204 | #else | 199 | #else |
| 205 | pid_t pid; | 200 | pid_t pid; |
| 206 | #endif | 201 | #endif |
| 202 | int vfork_errno; | ||
| 207 | int fd_output = -1; | 203 | int fd_output = -1; |
| 208 | struct coding_system process_coding; /* coding-system of process output */ | 204 | struct coding_system process_coding; /* coding-system of process output */ |
| 209 | struct coding_system argument_coding; /* coding-system of arguments */ | 205 | struct coding_system argument_coding; /* coding-system of arguments */ |
| @@ -432,12 +428,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 432 | } | 428 | } |
| 433 | UNGCPRO; | 429 | UNGCPRO; |
| 434 | for (i = 4; i < nargs; i++) | 430 | for (i = 4; i < nargs; i++) |
| 435 | new_argv[i - 3] = SDATA (args[i]); | 431 | new_argv[i - 3] = SSDATA (args[i]); |
| 436 | new_argv[i - 3] = 0; | 432 | new_argv[i - 3] = 0; |
| 437 | } | 433 | } |
| 438 | else | 434 | else |
| 439 | new_argv[1] = 0; | 435 | new_argv[1] = 0; |
| 440 | new_argv[0] = SDATA (path); | 436 | new_argv[0] = SSDATA (path); |
| 441 | 437 | ||
| 442 | #ifdef MSDOS /* MW, July 1993 */ | 438 | #ifdef MSDOS /* MW, July 1993 */ |
| 443 | 439 | ||
| @@ -466,29 +462,35 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 466 | } | 462 | } |
| 467 | else | 463 | else |
| 468 | outfilefd = fd_output; | 464 | outfilefd = fd_output; |
| 469 | fd[0] = filefd; | 465 | fd0 = filefd; |
| 470 | fd[1] = outfilefd; | 466 | fd1 = outfilefd; |
| 471 | #endif /* MSDOS */ | 467 | #endif /* MSDOS */ |
| 472 | 468 | ||
| 473 | if (INTEGERP (buffer)) | 469 | if (INTEGERP (buffer)) |
| 474 | fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1; | 470 | { |
| 471 | fd0 = -1; | ||
| 472 | fd1 = emacs_open (NULL_DEVICE, O_WRONLY, 0); | ||
| 473 | } | ||
| 475 | else | 474 | else |
| 476 | { | 475 | { |
| 477 | #ifndef MSDOS | 476 | #ifndef MSDOS |
| 478 | errno = 0; | 477 | int fd[2]; |
| 479 | if (pipe (fd) == -1) | 478 | if (pipe (fd) == -1) |
| 480 | { | 479 | { |
| 480 | int pipe_errno = errno; | ||
| 481 | emacs_close (filefd); | 481 | emacs_close (filefd); |
| 482 | errno = pipe_errno; | ||
| 482 | report_file_error ("Creating process pipe", Qnil); | 483 | report_file_error ("Creating process pipe", Qnil); |
| 483 | } | 484 | } |
| 485 | fd0 = fd[0]; | ||
| 486 | fd1 = fd[1]; | ||
| 484 | #endif | 487 | #endif |
| 485 | } | 488 | } |
| 486 | 489 | ||
| 487 | { | 490 | { |
| 488 | /* child_setup must clobber environ in systems with true vfork. | 491 | /* child_setup must clobber environ in systems with true vfork. |
| 489 | Protect it from permanent change. */ | 492 | Protect it from permanent change. */ |
| 490 | register char **save_environ = environ; | 493 | char **save_environ = environ; |
| 491 | register int fd1 = fd[1]; | ||
| 492 | int fd_error = fd1; | 494 | int fd_error = fd1; |
| 493 | 495 | ||
| 494 | if (fd_output >= 0) | 496 | if (fd_output >= 0) |
| @@ -520,8 +522,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 520 | if (fd_error < 0) | 522 | if (fd_error < 0) |
| 521 | { | 523 | { |
| 522 | emacs_close (filefd); | 524 | emacs_close (filefd); |
| 523 | if (fd[0] != filefd) | 525 | if (fd0 != filefd) |
| 524 | emacs_close (fd[0]); | 526 | emacs_close (fd0); |
| 525 | if (fd1 >= 0) | 527 | if (fd1 >= 0) |
| 526 | emacs_close (fd1); | 528 | emacs_close (fd1); |
| 527 | #ifdef MSDOS | 529 | #ifdef MSDOS |
| @@ -538,8 +540,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 538 | /* Note that on MSDOS `child_setup' actually returns the child process | 540 | /* Note that on MSDOS `child_setup' actually returns the child process |
| 539 | exit status, not its PID, so we assign it to `synch_process_retcode' | 541 | exit status, not its PID, so we assign it to `synch_process_retcode' |
| 540 | below. */ | 542 | below. */ |
| 541 | pid = child_setup (filefd, outfilefd, fd_error, (char **) new_argv, | 543 | pid = child_setup (filefd, outfilefd, fd_error, new_argv, 0, current_dir); |
| 542 | 0, current_dir); | ||
| 543 | 544 | ||
| 544 | /* Record that the synchronous process exited and note its | 545 | /* Record that the synchronous process exited and note its |
| 545 | termination status. */ | 546 | termination status. */ |
| @@ -559,8 +560,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 559 | { | 560 | { |
| 560 | /* Since CRLF is converted to LF within `decode_coding', we | 561 | /* Since CRLF is converted to LF within `decode_coding', we |
| 561 | can always open a file with binary mode. */ | 562 | can always open a file with binary mode. */ |
| 562 | fd[0] = emacs_open (tempfile, O_RDONLY | O_BINARY, 0); | 563 | fd0 = emacs_open (tempfile, O_RDONLY | O_BINARY, 0); |
| 563 | if (fd[0] < 0) | 564 | if (fd0 < 0) |
| 564 | { | 565 | { |
| 565 | unlink (tempfile); | 566 | unlink (tempfile); |
| 566 | emacs_close (filefd); | 567 | emacs_close (filefd); |
| @@ -569,11 +570,10 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 569 | } | 570 | } |
| 570 | } | 571 | } |
| 571 | else | 572 | else |
| 572 | fd[0] = -1; /* We are not going to read from tempfile. */ | 573 | fd0 = -1; /* We are not going to read from tempfile. */ |
| 573 | #else /* not MSDOS */ | 574 | #else /* not MSDOS */ |
| 574 | #ifdef WINDOWSNT | 575 | #ifdef WINDOWSNT |
| 575 | pid = child_setup (filefd, fd1, fd_error, (char **) new_argv, | 576 | pid = child_setup (filefd, fd1, fd_error, new_argv, 0, current_dir); |
| 576 | 0, current_dir); | ||
| 577 | #else /* not WINDOWSNT */ | 577 | #else /* not WINDOWSNT */ |
| 578 | 578 | ||
| 579 | block_input (); | 579 | block_input (); |
| @@ -586,11 +586,15 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 586 | bool volatile display_p_volatile = display_p; | 586 | bool volatile display_p_volatile = display_p; |
| 587 | bool volatile output_to_buffer_volatile = output_to_buffer; | 587 | bool volatile output_to_buffer_volatile = output_to_buffer; |
| 588 | bool volatile sa_must_free_volatile = sa_must_free; | 588 | bool volatile sa_must_free_volatile = sa_must_free; |
| 589 | int volatile fd0_volatile = fd0; | ||
| 589 | int volatile fd1_volatile = fd1; | 590 | int volatile fd1_volatile = fd1; |
| 590 | int volatile fd_error_volatile = fd_error; | 591 | int volatile fd_error_volatile = fd_error; |
| 591 | int volatile fd_output_volatile = fd_output; | 592 | int volatile fd_output_volatile = fd_output; |
| 593 | int volatile filefd_volatile = filefd; | ||
| 594 | ptrdiff_t volatile count_volatile = count; | ||
| 592 | ptrdiff_t volatile sa_count_volatile = sa_count; | 595 | ptrdiff_t volatile sa_count_volatile = sa_count; |
| 593 | unsigned char const **volatile new_argv_volatile = new_argv; | 596 | char **volatile new_argv_volatile = new_argv; |
| 597 | char **volatile new_save_environ = save_environ; | ||
| 594 | 598 | ||
| 595 | pid = vfork (); | 599 | pid = vfork (); |
| 596 | 600 | ||
| @@ -598,29 +602,33 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 598 | coding_systems = coding_systems_volatile; | 602 | coding_systems = coding_systems_volatile; |
| 599 | current_dir = current_dir_volatile; | 603 | current_dir = current_dir_volatile; |
| 600 | display_p = display_p_volatile; | 604 | display_p = display_p_volatile; |
| 605 | output_to_buffer = output_to_buffer_volatile; | ||
| 606 | sa_must_free = sa_must_free_volatile; | ||
| 607 | fd0 = fd0_volatile; | ||
| 601 | fd1 = fd1_volatile; | 608 | fd1 = fd1_volatile; |
| 602 | fd_error = fd_error_volatile; | 609 | fd_error = fd_error_volatile; |
| 603 | fd_output = fd_output_volatile; | 610 | fd_output = fd_output_volatile; |
| 604 | output_to_buffer = output_to_buffer_volatile; | 611 | filefd = filefd_volatile; |
| 605 | sa_must_free = sa_must_free_volatile; | 612 | count = count_volatile; |
| 606 | sa_count = sa_count_volatile; | 613 | sa_count = sa_count_volatile; |
| 607 | new_argv = new_argv_volatile; | 614 | new_argv = new_argv_volatile; |
| 615 | save_environ = new_save_environ; | ||
| 608 | } | 616 | } |
| 609 | 617 | ||
| 610 | if (pid == 0) | 618 | if (pid == 0) |
| 611 | { | 619 | { |
| 612 | if (fd[0] >= 0) | 620 | if (fd0 >= 0) |
| 613 | emacs_close (fd[0]); | 621 | emacs_close (fd0); |
| 614 | 622 | ||
| 615 | setsid (); | 623 | setsid (); |
| 616 | 624 | ||
| 617 | /* Emacs ignores SIGPIPE, but the child should not. */ | 625 | /* Emacs ignores SIGPIPE, but the child should not. */ |
| 618 | signal (SIGPIPE, SIG_DFL); | 626 | signal (SIGPIPE, SIG_DFL); |
| 619 | 627 | ||
| 620 | child_setup (filefd, fd1, fd_error, (char **) new_argv, | 628 | child_setup (filefd, fd1, fd_error, new_argv, 0, current_dir); |
| 621 | 0, current_dir); | ||
| 622 | } | 629 | } |
| 623 | 630 | ||
| 631 | vfork_errno = errno; | ||
| 624 | unblock_input (); | 632 | unblock_input (); |
| 625 | 633 | ||
| 626 | #endif /* not WINDOWSNT */ | 634 | #endif /* not WINDOWSNT */ |
| @@ -632,7 +640,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 632 | 640 | ||
| 633 | environ = save_environ; | 641 | environ = save_environ; |
| 634 | 642 | ||
| 635 | /* Close most of our fd's, but not fd[0] | 643 | /* Close most of our file descriptors, but not fd0 |
| 636 | since we will use that to read input from. */ | 644 | since we will use that to read input from. */ |
| 637 | emacs_close (filefd); | 645 | emacs_close (filefd); |
| 638 | if (fd_output >= 0) | 646 | if (fd_output >= 0) |
| @@ -643,15 +651,16 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 643 | 651 | ||
| 644 | if (pid < 0) | 652 | if (pid < 0) |
| 645 | { | 653 | { |
| 646 | if (fd[0] >= 0) | 654 | if (fd0 >= 0) |
| 647 | emacs_close (fd[0]); | 655 | emacs_close (fd0); |
| 656 | errno = vfork_errno; | ||
| 648 | report_file_error ("Doing vfork", Qnil); | 657 | report_file_error ("Doing vfork", Qnil); |
| 649 | } | 658 | } |
| 650 | 659 | ||
| 651 | if (INTEGERP (buffer)) | 660 | if (INTEGERP (buffer)) |
| 652 | { | 661 | { |
| 653 | if (fd[0] >= 0) | 662 | if (fd0 >= 0) |
| 654 | emacs_close (fd[0]); | 663 | emacs_close (fd0); |
| 655 | return Qnil; | 664 | return Qnil; |
| 656 | } | 665 | } |
| 657 | 666 | ||
| @@ -666,7 +675,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 666 | #endif /* not MSDOS */ | 675 | #endif /* not MSDOS */ |
| 667 | record_unwind_protect (call_process_cleanup, | 676 | record_unwind_protect (call_process_cleanup, |
| 668 | Fcons (Fcurrent_buffer (), | 677 | Fcons (Fcurrent_buffer (), |
| 669 | Fcons (INTEGER_TO_CONS (fd[0]), | 678 | Fcons (INTEGER_TO_CONS (fd0), |
| 670 | cleanup_info_tail))); | 679 | cleanup_info_tail))); |
| 671 | 680 | ||
| 672 | if (BUFFERP (buffer)) | 681 | if (BUFFERP (buffer)) |
| @@ -723,6 +732,10 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 723 | 732 | ||
| 724 | if (output_to_buffer) | 733 | if (output_to_buffer) |
| 725 | { | 734 | { |
| 735 | enum { CALLPROC_BUFFER_SIZE_MIN = 16 * 1024 }; | ||
| 736 | enum { CALLPROC_BUFFER_SIZE_MAX = 4 * CALLPROC_BUFFER_SIZE_MIN }; | ||
| 737 | char buf[CALLPROC_BUFFER_SIZE_MAX]; | ||
| 738 | int bufsize = CALLPROC_BUFFER_SIZE_MIN; | ||
| 726 | int nread; | 739 | int nread; |
| 727 | bool first = 1; | 740 | bool first = 1; |
| 728 | EMACS_INT total_read = 0; | 741 | EMACS_INT total_read = 0; |
| @@ -739,7 +752,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 739 | nread = carryover; | 752 | nread = carryover; |
| 740 | while (nread < bufsize - 1024) | 753 | while (nread < bufsize - 1024) |
| 741 | { | 754 | { |
| 742 | int this_read = emacs_read (fd[0], buf + nread, | 755 | int this_read = emacs_read (fd0, buf + nread, |
| 743 | bufsize - nread); | 756 | bufsize - nread); |
| 744 | 757 | ||
| 745 | if (this_read < 0) | 758 | if (this_read < 0) |
diff --git a/src/dired.c b/src/dired.c index 3530b74ecb4..bdb71c46364 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -193,19 +193,15 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, | |||
| 193 | 193 | ||
| 194 | errno = 0; | 194 | errno = 0; |
| 195 | dp = readdir (d); | 195 | dp = readdir (d); |
| 196 | 196 | if (!dp) | |
| 197 | if (dp == NULL && (0 | 197 | { |
| 198 | #ifdef EAGAIN | 198 | if (errno == EAGAIN || errno == EINTR) |
| 199 | || errno == EAGAIN | 199 | { |
| 200 | #endif | 200 | QUIT; |
| 201 | #ifdef EINTR | 201 | continue; |
| 202 | || errno == EINTR | 202 | } |
| 203 | #endif | 203 | break; |
| 204 | )) | 204 | } |
| 205 | { QUIT; continue; } | ||
| 206 | |||
| 207 | if (dp == NULL) | ||
| 208 | break; | ||
| 209 | 205 | ||
| 210 | len = dirent_namelen (dp); | 206 | len = dirent_namelen (dp); |
| 211 | name = finalname = make_unibyte_string (dp->d_name, len); | 207 | name = finalname = make_unibyte_string (dp->d_name, len); |
| @@ -480,17 +476,15 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, | |||
| 480 | 476 | ||
| 481 | errno = 0; | 477 | errno = 0; |
| 482 | dp = readdir (d); | 478 | dp = readdir (d); |
| 483 | if (dp == NULL && (0 | 479 | if (!dp) |
| 484 | # ifdef EAGAIN | 480 | { |
| 485 | || errno == EAGAIN | 481 | if (errno == EAGAIN || errno == EINTR) |
| 486 | # endif | 482 | { |
| 487 | # ifdef EINTR | 483 | QUIT; |
| 488 | || errno == EINTR | 484 | continue; |
| 489 | # endif | 485 | } |
| 490 | )) | 486 | break; |
| 491 | { QUIT; continue; } | 487 | } |
| 492 | |||
| 493 | if (!dp) break; | ||
| 494 | 488 | ||
| 495 | len = dirent_namelen (dp); | 489 | len = dirent_namelen (dp); |
| 496 | 490 | ||
| @@ -826,7 +820,7 @@ stat_uname (struct stat *st) | |||
| 826 | #ifdef WINDOWSNT | 820 | #ifdef WINDOWSNT |
| 827 | return st->st_uname; | 821 | return st->st_uname; |
| 828 | #else | 822 | #else |
| 829 | struct passwd *pw = (struct passwd *) getpwuid (st->st_uid); | 823 | struct passwd *pw = getpwuid (st->st_uid); |
| 830 | 824 | ||
| 831 | if (pw) | 825 | if (pw) |
| 832 | return pw->pw_name; | 826 | return pw->pw_name; |
| @@ -841,7 +835,7 @@ stat_gname (struct stat *st) | |||
| 841 | #ifdef WINDOWSNT | 835 | #ifdef WINDOWSNT |
| 842 | return st->st_gname; | 836 | return st->st_gname; |
| 843 | #else | 837 | #else |
| 844 | struct group *gr = (struct group *) getgrgid (st->st_gid); | 838 | struct group *gr = getgrgid (st->st_gid); |
| 845 | 839 | ||
| 846 | if (gr) | 840 | if (gr) |
| 847 | return gr->gr_name; | 841 | return gr->gr_name; |
diff --git a/src/dispextern.h b/src/dispextern.h index 22fcee331c5..55fd852ea3b 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1582,12 +1582,12 @@ struct face | |||
| 1582 | /* Pixmap width and height. */ | 1582 | /* Pixmap width and height. */ |
| 1583 | unsigned int pixmap_w, pixmap_h; | 1583 | unsigned int pixmap_w, pixmap_h; |
| 1584 | 1584 | ||
| 1585 | /* Non-zero means characters in this face have a box that thickness | 1585 | /* Non-zero means characters in this face have a box of that |
| 1586 | around them. If it is negative, the absolute value indicates the | 1586 | thickness around them. If this value is negative, its absolute |
| 1587 | thickness, and the horizontal lines of box (top and bottom) are | 1587 | value indicates the thickness, and the horizontal (top and |
| 1588 | drawn inside of characters glyph area. The vertical lines of box | 1588 | bottom) borders of box are drawn inside of the character glyphs' |
| 1589 | (left and right) are drawn as the same way as the case that this | 1589 | area. The vertical (left and right) borders of the box are drawn |
| 1590 | value is positive. */ | 1590 | in the same way as when this value is positive. */ |
| 1591 | int box_line_width; | 1591 | int box_line_width; |
| 1592 | 1592 | ||
| 1593 | /* Type of box drawn. A value of FACE_NO_BOX means no box is drawn | 1593 | /* Type of box drawn. A value of FACE_NO_BOX means no box is drawn |
diff --git a/src/fileio.c b/src/fileio.c index 442c66550d3..48dbf20b88f 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1042,7 +1042,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) | |||
| 1042 | o [p - nm] = 0; | 1042 | o [p - nm] = 0; |
| 1043 | 1043 | ||
| 1044 | block_input (); | 1044 | block_input (); |
| 1045 | pw = (struct passwd *) getpwnam (o + 1); | 1045 | pw = getpwnam (o + 1); |
| 1046 | unblock_input (); | 1046 | unblock_input (); |
| 1047 | if (pw) | 1047 | if (pw) |
| 1048 | { | 1048 | { |
| @@ -1995,10 +1995,8 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) | |||
| 1995 | { | 1995 | { |
| 1996 | if (!(S_ISREG (st.st_mode)) && !(S_ISLNK (st.st_mode))) | 1996 | if (!(S_ISREG (st.st_mode)) && !(S_ISLNK (st.st_mode))) |
| 1997 | { | 1997 | { |
| 1998 | #if defined (EISDIR) | ||
| 1999 | /* Get a better looking error message. */ | 1998 | /* Get a better looking error message. */ |
| 2000 | errno = EISDIR; | 1999 | errno = EISDIR; |
| 2001 | #endif /* EISDIR */ | ||
| 2002 | report_file_error ("Non-regular file", Fcons (file, Qnil)); | 2000 | report_file_error ("Non-regular file", Fcons (file, Qnil)); |
| 2003 | } | 2001 | } |
| 2004 | } | 2002 | } |
diff --git a/src/font.c b/src/font.c index 41dbfd7a757..f6b6fa026c0 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -1234,8 +1234,21 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) | |||
| 1234 | f[j] = "*"; | 1234 | f[j] = "*"; |
| 1235 | else | 1235 | else |
| 1236 | { | 1236 | { |
| 1237 | int c, k, l; | ||
| 1238 | ptrdiff_t alloc; | ||
| 1239 | |||
| 1237 | val = SYMBOL_NAME (val); | 1240 | val = SYMBOL_NAME (val); |
| 1238 | f[j] = SSDATA (val); | 1241 | alloc = SBYTES (val) + 1; |
| 1242 | if (nbytes <= alloc) | ||
| 1243 | return -1; | ||
| 1244 | f[j] = p = alloca (alloc); | ||
| 1245 | /* Copy the name while excluding '-', '?', ',', and '"'. */ | ||
| 1246 | for (k = l = 0; k < alloc; k++) | ||
| 1247 | { | ||
| 1248 | c = SREF (val, k); | ||
| 1249 | if (c != '-' && c != '?' && c != ',' && c != '"') | ||
| 1250 | p[l++] = c; | ||
| 1251 | } | ||
| 1239 | } | 1252 | } |
| 1240 | } | 1253 | } |
| 1241 | 1254 | ||
diff --git a/src/fontset.c b/src/fontset.c index b76a216bac2..660ca432fad 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1876,6 +1876,8 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, | |||
| 1876 | } | 1876 | } |
| 1877 | if (! CHAR_VALID_P (c)) | 1877 | if (! CHAR_VALID_P (c)) |
| 1878 | return Qnil; | 1878 | return Qnil; |
| 1879 | if (!FRAME_WINDOW_P (f)) | ||
| 1880 | return Qnil; | ||
| 1879 | face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); | 1881 | face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); |
| 1880 | face = FACE_FROM_ID (f, face_id); | 1882 | face = FACE_FROM_ID (f, face_id); |
| 1881 | if (face->font) | 1883 | if (face->font) |
diff --git a/src/gmalloc.c b/src/gmalloc.c index dc584955661..c325ca79910 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -1645,14 +1645,6 @@ memalign (size_t alignment, size_t size) | |||
| 1645 | return result; | 1645 | return result; |
| 1646 | } | 1646 | } |
| 1647 | 1647 | ||
| 1648 | #ifndef ENOMEM | ||
| 1649 | #define ENOMEM 12 | ||
| 1650 | #endif | ||
| 1651 | |||
| 1652 | #ifndef EINVAL | ||
| 1653 | #define EINVAL 22 | ||
| 1654 | #endif | ||
| 1655 | |||
| 1656 | int | 1648 | int |
| 1657 | posix_memalign (void **memptr, size_t alignment, size_t size) | 1649 | posix_memalign (void **memptr, size_t alignment, size_t size) |
| 1658 | { | 1650 | { |
diff --git a/src/gnutls.c b/src/gnutls.c index e3d84a0b61b..03f753fa8cc 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -359,12 +359,7 @@ emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte) | |||
| 359 | 359 | ||
| 360 | if (proc->gnutls_initstage != GNUTLS_STAGE_READY) | 360 | if (proc->gnutls_initstage != GNUTLS_STAGE_READY) |
| 361 | { | 361 | { |
| 362 | #ifdef EWOULDBLOCK | ||
| 363 | errno = EWOULDBLOCK; | ||
| 364 | #endif | ||
| 365 | #ifdef EAGAIN | ||
| 366 | errno = EAGAIN; | 362 | errno = EAGAIN; |
| 367 | #endif | ||
| 368 | return 0; | 363 | return 0; |
| 369 | } | 364 | } |
| 370 | 365 | ||
| @@ -384,14 +379,7 @@ emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte) | |||
| 384 | appropriately so that send_process retries the | 379 | appropriately so that send_process retries the |
| 385 | correct way instead of erroring out. */ | 380 | correct way instead of erroring out. */ |
| 386 | if (rtnval == GNUTLS_E_AGAIN) | 381 | if (rtnval == GNUTLS_E_AGAIN) |
| 387 | { | 382 | errno = EAGAIN; |
| 388 | #ifdef EWOULDBLOCK | ||
| 389 | errno = EWOULDBLOCK; | ||
| 390 | #endif | ||
| 391 | #ifdef EAGAIN | ||
| 392 | errno = EAGAIN; | ||
| 393 | #endif | ||
| 394 | } | ||
| 395 | break; | 383 | break; |
| 396 | } | 384 | } |
| 397 | } | 385 | } |
diff --git a/src/keyboard.c b/src/keyboard.c index 5980ae89522..30b4db5e077 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6976,10 +6976,7 @@ tty_read_avail_input (struct terminal *terminal, | |||
| 6976 | an EAGAIN error. Does anybody know of a situation | 6976 | an EAGAIN error. Does anybody know of a situation |
| 6977 | where a retry is actually needed? */ | 6977 | where a retry is actually needed? */ |
| 6978 | #if 0 | 6978 | #if 0 |
| 6979 | nread < 0 && (errno == EAGAIN | 6979 | nread < 0 && (errno == EAGAIN || errno == EFAULT |
| 6980 | #ifdef EFAULT | ||
| 6981 | || errno == EFAULT | ||
| 6982 | #endif | ||
| 6983 | #ifdef EBADSLT | 6980 | #ifdef EBADSLT |
| 6984 | || errno == EBADSLT | 6981 | || errno == EBADSLT |
| 6985 | #endif | 6982 | #endif |
diff --git a/src/lread.c b/src/lread.c index 6d0ff9f780e..6647382a254 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -440,7 +440,6 @@ readbyte_from_file (int c, Lisp_Object readcharfun) | |||
| 440 | block_input (); | 440 | block_input (); |
| 441 | c = getc (instream); | 441 | c = getc (instream); |
| 442 | 442 | ||
| 443 | #ifdef EINTR | ||
| 444 | /* Interrupted reads have been observed while reading over the network. */ | 443 | /* Interrupted reads have been observed while reading over the network. */ |
| 445 | while (c == EOF && ferror (instream) && errno == EINTR) | 444 | while (c == EOF && ferror (instream) && errno == EINTR) |
| 446 | { | 445 | { |
| @@ -450,7 +449,6 @@ readbyte_from_file (int c, Lisp_Object readcharfun) | |||
| 450 | clearerr (instream); | 449 | clearerr (instream); |
| 451 | c = getc (instream); | 450 | c = getc (instream); |
| 452 | } | 451 | } |
| 453 | #endif | ||
| 454 | 452 | ||
| 455 | unblock_input (); | 453 | unblock_input (); |
| 456 | 454 | ||
diff --git a/src/process.c b/src/process.c index 0036ce595f5..b23f06fd025 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4432,14 +4432,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4432 | total_nread += nread; | 4432 | total_nread += nread; |
| 4433 | got_some_input = 1; | 4433 | got_some_input = 1; |
| 4434 | } | 4434 | } |
| 4435 | #ifdef EIO | 4435 | else if (nread == -1 && (errno == EIO || errno == EAGAIN)) |
| 4436 | else if (nread == -1 && EIO == errno) | ||
| 4437 | break; | 4436 | break; |
| 4438 | #endif | ||
| 4439 | #ifdef EAGAIN | ||
| 4440 | else if (nread == -1 && EAGAIN == errno) | ||
| 4441 | break; | ||
| 4442 | #endif | ||
| 4443 | #ifdef EWOULDBLOCK | 4437 | #ifdef EWOULDBLOCK |
| 4444 | else if (nread == -1 && EWOULDBLOCK == errno) | 4438 | else if (nread == -1 && EWOULDBLOCK == errno) |
| 4445 | break; | 4439 | break; |
| @@ -5517,13 +5511,10 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, | |||
| 5517 | 5511 | ||
| 5518 | if (rv < 0) | 5512 | if (rv < 0) |
| 5519 | { | 5513 | { |
| 5520 | if (0 | 5514 | if (errno == EAGAIN |
| 5521 | #ifdef EWOULDBLOCK | 5515 | #ifdef EWOULDBLOCK |
| 5522 | || errno == EWOULDBLOCK | 5516 | || errno == EWOULDBLOCK |
| 5523 | #endif | 5517 | #endif |
| 5524 | #ifdef EAGAIN | ||
| 5525 | || errno == EAGAIN | ||
| 5526 | #endif | ||
| 5527 | ) | 5518 | ) |
| 5528 | /* Buffer is full. Wait, accepting input; | 5519 | /* Buffer is full. Wait, accepting input; |
| 5529 | that may allow the program | 5520 | that may allow the program |
diff --git a/src/unexcoff.c b/src/unexcoff.c index 966dd58cb6e..6e29951a962 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c | |||
| @@ -332,11 +332,7 @@ write_segment (int new, const char *ptr, const char *end) | |||
| 332 | a gap between the old text segment and the old data segment. | 332 | a gap between the old text segment and the old data segment. |
| 333 | This gap has probably been remapped into part of the text segment. | 333 | This gap has probably been remapped into part of the text segment. |
| 334 | So write zeros for it. */ | 334 | So write zeros for it. */ |
| 335 | if (ret == -1 | 335 | if (ret == -1 && errno == EFAULT) |
| 336 | #ifdef EFAULT | ||
| 337 | && errno == EFAULT | ||
| 338 | #endif | ||
| 339 | ) | ||
| 340 | { | 336 | { |
| 341 | /* Write only a page of zeros at once, | 337 | /* Write only a page of zeros at once, |
| 342 | so that we don't overshoot the start | 338 | so that we don't overshoot the start |
diff --git a/src/xdisp.c b/src/xdisp.c index f212c39607f..af83eba8544 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10948,16 +10948,18 @@ echo_area_display (int update_frame_p) | |||
| 10948 | static int | 10948 | static int |
| 10949 | buffer_shared_and_changed (void) | 10949 | buffer_shared_and_changed (void) |
| 10950 | { | 10950 | { |
| 10951 | /* The variable buffer_shared is set in redisplay_window and | ||
| 10952 | indicates that we redisplay a buffer in different windows. */ | ||
| 10951 | return (buffer_shared > 1 && UNCHANGED_MODIFIED < MODIFF); | 10953 | return (buffer_shared > 1 && UNCHANGED_MODIFIED < MODIFF); |
| 10952 | } | 10954 | } |
| 10953 | 10955 | ||
| 10954 | /* Nonzero if W doesn't reflect the actual state of | 10956 | /* Nonzero if W doesn't reflect the actual state of current buffer due |
| 10955 | current buffer due to its text or overlays change. */ | 10957 | to its text or overlays change. FIXME: this may be called when |
| 10958 | XBUFFER (w->buffer) != current_buffer, which looks suspicious. */ | ||
| 10956 | 10959 | ||
| 10957 | static int | 10960 | static int |
| 10958 | window_outdated (struct window *w) | 10961 | window_outdated (struct window *w) |
| 10959 | { | 10962 | { |
| 10960 | eassert (XBUFFER (w->buffer) == current_buffer); | ||
| 10961 | return (w->last_modified < MODIFF | 10963 | return (w->last_modified < MODIFF |
| 10962 | || w->last_overlay_modified < OVERLAY_MODIFF); | 10964 | || w->last_overlay_modified < OVERLAY_MODIFF); |
| 10963 | } | 10965 | } |
| @@ -10977,6 +10979,16 @@ window_buffer_changed (struct window *w) | |||
| 10977 | != !NILP (w->region_showing))); | 10979 | != !NILP (w->region_showing))); |
| 10978 | } | 10980 | } |
| 10979 | 10981 | ||
| 10982 | /* Nonzero if W has %c in its mode line and mode line should be updated. */ | ||
| 10983 | |||
| 10984 | static int | ||
| 10985 | mode_line_update_needed (struct window *w) | ||
| 10986 | { | ||
| 10987 | return (!NILP (w->column_number_displayed) | ||
| 10988 | && !(PT == w->last_point && !window_outdated (w)) | ||
| 10989 | && (XFASTINT (w->column_number_displayed) != current_column ())); | ||
| 10990 | } | ||
| 10991 | |||
| 10980 | /*********************************************************************** | 10992 | /*********************************************************************** |
| 10981 | Mode Lines and Frame Titles | 10993 | Mode Lines and Frame Titles |
| 10982 | ***********************************************************************/ | 10994 | ***********************************************************************/ |
| @@ -13021,6 +13033,15 @@ select_frame_for_redisplay (Lisp_Object frame) | |||
| 13021 | } while (!EQ (frame, old) && (frame = old, 1)); | 13033 | } while (!EQ (frame, old) && (frame = old, 1)); |
| 13022 | } | 13034 | } |
| 13023 | 13035 | ||
| 13036 | /* Make sure that previously selected OLD_FRAME is selected unless it has been | ||
| 13037 | deleted (by an X connection failure during redisplay, for example). */ | ||
| 13038 | |||
| 13039 | static void | ||
| 13040 | ensure_selected_frame (Lisp_Object old_frame) | ||
| 13041 | { | ||
| 13042 | if (!EQ (old_frame, selected_frame) && FRAME_LIVE_P (XFRAME (old_frame))) | ||
| 13043 | select_frame_for_redisplay (old_frame); | ||
| 13044 | } | ||
| 13024 | 13045 | ||
| 13025 | #define STOP_POLLING \ | 13046 | #define STOP_POLLING \ |
| 13026 | do { if (! polling_stopped_here) stop_polling (); \ | 13047 | do { if (! polling_stopped_here) stop_polling (); \ |
| @@ -13106,13 +13127,11 @@ redisplay_internal (void) | |||
| 13106 | /* Remember the currently selected window. */ | 13127 | /* Remember the currently selected window. */ |
| 13107 | sw = w; | 13128 | sw = w; |
| 13108 | 13129 | ||
| 13109 | if (!EQ (old_frame, selected_frame) | 13130 | /* When running redisplay, we play a bit fast-and-loose and allow e.g. |
| 13110 | && FRAME_LIVE_P (XFRAME (old_frame))) | 13131 | selected_frame and selected_window to be temporarily out-of-sync so |
| 13111 | /* When running redisplay, we play a bit fast-and-loose and allow e.g. | 13132 | when we come back here via `goto retry', we need to resync because we |
| 13112 | selected_frame and selected_window to be temporarily out-of-sync so | 13133 | may need to run Elisp code (via prepare_menu_bars). */ |
| 13113 | when we come back here via `goto retry', we need to resync because we | 13134 | ensure_selected_frame (old_frame); |
| 13114 | may need to run Elisp code (via prepare_menu_bars). */ | ||
| 13115 | select_frame_for_redisplay (old_frame); | ||
| 13116 | 13135 | ||
| 13117 | pending = 0; | 13136 | pending = 0; |
| 13118 | reconsider_clip_changes (w, current_buffer); | 13137 | reconsider_clip_changes (w, current_buffer); |
| @@ -13198,21 +13217,13 @@ redisplay_internal (void) | |||
| 13198 | count1 = SPECPDL_INDEX (); | 13217 | count1 = SPECPDL_INDEX (); |
| 13199 | specbind (Qinhibit_point_motion_hooks, Qt); | 13218 | specbind (Qinhibit_point_motion_hooks, Qt); |
| 13200 | 13219 | ||
| 13201 | /* If %c is in the mode line, update it if needed. */ | 13220 | if (mode_line_update_needed (w)) |
| 13202 | if (!NILP (w->column_number_displayed) | ||
| 13203 | /* This alternative quickly identifies a common case | ||
| 13204 | where no change is needed. */ | ||
| 13205 | && !(PT == w->last_point && !window_outdated (w)) | ||
| 13206 | && (XFASTINT (w->column_number_displayed) != current_column ())) | ||
| 13207 | w->update_mode_line = 1; | 13221 | w->update_mode_line = 1; |
| 13208 | 13222 | ||
| 13209 | unbind_to (count1, Qnil); | 13223 | unbind_to (count1, Qnil); |
| 13210 | 13224 | ||
| 13211 | FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1; | 13225 | FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1; |
| 13212 | 13226 | ||
| 13213 | /* The variable buffer_shared is set in redisplay_window and | ||
| 13214 | indicates that we redisplay a buffer in different windows. See | ||
| 13215 | there. */ | ||
| 13216 | consider_all_windows_p = (update_mode_lines | 13227 | consider_all_windows_p = (update_mode_lines |
| 13217 | || buffer_shared_and_changed () | 13228 | || buffer_shared_and_changed () |
| 13218 | || cursor_type_changed); | 13229 | || cursor_type_changed); |
| @@ -13594,14 +13605,11 @@ redisplay_internal (void) | |||
| 13594 | } | 13605 | } |
| 13595 | } | 13606 | } |
| 13596 | 13607 | ||
| 13597 | if (!EQ (old_frame, selected_frame) | 13608 | /* We played a bit fast-and-loose above and allowed selected_frame |
| 13598 | && FRAME_LIVE_P (XFRAME (old_frame))) | 13609 | and selected_window to be temporarily out-of-sync but let's make |
| 13599 | /* We played a bit fast-and-loose above and allowed selected_frame | 13610 | sure this stays contained. */ |
| 13600 | and selected_window to be temporarily out-of-sync but let's make | 13611 | ensure_selected_frame (old_frame); |
| 13601 | sure this stays contained. */ | 13612 | eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window)); |
| 13602 | select_frame_for_redisplay (old_frame); | ||
| 13603 | eassert (EQ (XFRAME (selected_frame)->selected_window, | ||
| 13604 | selected_window)); | ||
| 13605 | 13613 | ||
| 13606 | if (!pending) | 13614 | if (!pending) |
| 13607 | { | 13615 | { |
| @@ -13820,17 +13828,13 @@ redisplay_preserve_echo_area (int from_where) | |||
| 13820 | 13828 | ||
| 13821 | 13829 | ||
| 13822 | /* Function registered with record_unwind_protect in redisplay_internal. | 13830 | /* Function registered with record_unwind_protect in redisplay_internal. |
| 13823 | Clear redisplaying_p. Also, select the previously | 13831 | Clear redisplaying_p. Also select the previously selected frame. */ |
| 13824 | selected frame, unless it has been deleted (by an X connection | ||
| 13825 | failure during redisplay, for example). */ | ||
| 13826 | 13832 | ||
| 13827 | static Lisp_Object | 13833 | static Lisp_Object |
| 13828 | unwind_redisplay (Lisp_Object old_frame) | 13834 | unwind_redisplay (Lisp_Object old_frame) |
| 13829 | { | 13835 | { |
| 13830 | redisplaying_p = 0; | 13836 | redisplaying_p = 0; |
| 13831 | if (! EQ (old_frame, selected_frame) | 13837 | ensure_selected_frame (old_frame); |
| 13832 | && FRAME_LIVE_P (XFRAME (old_frame))) | ||
| 13833 | select_frame_for_redisplay (old_frame); | ||
| 13834 | return Qnil; | 13838 | return Qnil; |
| 13835 | } | 13839 | } |
| 13836 | 13840 | ||
| @@ -15626,12 +15630,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15626 | if (BYTEPOS (opoint) < CHARPOS (opoint)) | 15630 | if (BYTEPOS (opoint) < CHARPOS (opoint)) |
| 15627 | emacs_abort (); | 15631 | emacs_abort (); |
| 15628 | 15632 | ||
| 15629 | /* If %c is in mode line, update it if needed. */ | 15633 | if (mode_line_update_needed (w)) |
| 15630 | if (!NILP (w->column_number_displayed) | ||
| 15631 | /* This alternative quickly identifies a common case | ||
| 15632 | where no change is needed. */ | ||
| 15633 | && !(PT == w->last_point && !window_outdated (w)) | ||
| 15634 | && (XFASTINT (w->column_number_displayed) != current_column ())) | ||
| 15635 | update_mode_line = 1; | 15634 | update_mode_line = 1; |
| 15636 | 15635 | ||
| 15637 | /* Count number of windows showing the selected buffer. An indirect | 15636 | /* Count number of windows showing the selected buffer. An indirect |
| @@ -23665,7 +23664,9 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row, | |||
| 23665 | 23664 | ||
| 23666 | /* If mouse highlighting is on, we may need to draw adjacent | 23665 | /* If mouse highlighting is on, we may need to draw adjacent |
| 23667 | glyphs using mouse-face highlighting. */ | 23666 | glyphs using mouse-face highlighting. */ |
| 23668 | if (area == TEXT_AREA && row->mouse_face_p) | 23667 | if (area == TEXT_AREA && row->mouse_face_p |
| 23668 | && hlinfo->mouse_face_beg_row >= 0 | ||
| 23669 | && hlinfo->mouse_face_end_row >= 0) | ||
| 23669 | { | 23670 | { |
| 23670 | struct glyph_row *mouse_beg_row, *mouse_end_row; | 23671 | struct glyph_row *mouse_beg_row, *mouse_end_row; |
| 23671 | 23672 | ||