diff options
| author | Kenichi Handa | 2012-09-15 15:14:18 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-09-15 15:14:18 +0900 |
| commit | dcbd9236f7be9da4e658fd559dfbd7454f4b6018 (patch) | |
| tree | df71af7779e1a0da9d0822ce5b89e51bd603bd40 | |
| parent | ea964864a66828ce2457e44c4c670160d5879ec6 (diff) | |
| parent | 823751606a90e3850551b43e707d58bbf58033dc (diff) | |
| download | emacs-dcbd9236f7be9da4e658fd559dfbd7454f4b6018.tar.gz emacs-dcbd9236f7be9da4e658fd559dfbd7454f4b6018.zip | |
merge trunk
| -rw-r--r-- | ChangeLog | 11 | ||||
| -rw-r--r-- | configure.ac | 17 | ||||
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/advice.el | 16 | ||||
| -rw-r--r-- | lisp/vc/vc-bzr.el | 14 | ||||
| -rw-r--r-- | lisp/version.el | 47 | ||||
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/insdel.c | 31 |
10 files changed, 125 insertions, 51 deletions
| @@ -1,3 +1,14 @@ | |||
| 1 | 2012-09-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * configure.ac (--without-sync-input): Fix typo in usage message. | ||
| 4 | |||
| 5 | * configure.ac: Port to hosts lacking gtk. | ||
| 6 | (PKG_CHECK_MODULES): Capture pkg-config diagnostics | ||
| 7 | better, in particular, problems in invoking pkg-config itself. | ||
| 8 | This is useful on hosts that don't have pkg-config. | ||
| 9 | (GTK_MODULES): Do not exit 'configure' simply because gtk3 | ||
| 10 | and gtk2 are both missing. Problem found on Solaris 8. | ||
| 11 | |||
| 1 | 2012-09-13 Jan Djärv <jan.h.d@swipnet.se> | 12 | 2012-09-13 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 13 | ||
| 3 | * configure.ac: Reorder Xaw3d messages. | 14 | * configure.ac: Reorder Xaw3d messages. |
diff --git a/configure.ac b/configure.ac index ce65f07522d..382e62a97a1 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -128,7 +128,7 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME], | |||
| 128 | 128 | ||
| 129 | OPTION_DEFAULT_ON([sound],[don't compile with sound support]) | 129 | OPTION_DEFAULT_ON([sound],[don't compile with sound support]) |
| 130 | 130 | ||
| 131 | OPTION_DEFAULT_ON([sync-input],[process async input synchronously]) | 131 | OPTION_DEFAULT_ON([sync-input],[don't process async input synchronously]) |
| 132 | if test "$with_sync_input" = yes; then | 132 | if test "$with_sync_input" = yes; then |
| 133 | AC_DEFINE(SYNC_INPUT, 1, [Process async input synchronously.]) | 133 | AC_DEFINE(SYNC_INPUT, 1, [Process async input synchronously.]) |
| 134 | fi | 134 | fi |
| @@ -1189,9 +1189,10 @@ AC_DEFUN([PKG_CHECK_MODULES], [ | |||
| 1189 | $1_CFLAGS="" | 1189 | $1_CFLAGS="" |
| 1190 | $1_LIBS="" | 1190 | $1_LIBS="" |
| 1191 | ## If we have a custom action on failure, don't print errors, but | 1191 | ## If we have a custom action on failure, don't print errors, but |
| 1192 | ## do set a variable so people can do so. | 1192 | ## do set a variable so people can do so. Do it in a subshell |
| 1193 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | 1193 | ## to capture any diagnostics in invoking pkg-config. |
| 1194 | ifelse([$4], ,echo $$1_PKG_ERRORS,) | 1194 | $1_PKG_ERRORS=`($PKG_CONFIG --print-errors "$2") 2>&1` |
| 1195 | ifelse([$4], ,echo "$$1_PKG_ERRORS",) | ||
| 1195 | fi | 1196 | fi |
| 1196 | 1197 | ||
| 1197 | AC_SUBST($1_CFLAGS) | 1198 | AC_SUBST($1_CFLAGS) |
| @@ -1934,10 +1935,10 @@ if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then | |||
| 1934 | 1935 | ||
| 1935 | dnl Checks for libraries. | 1936 | dnl Checks for libraries. |
| 1936 | PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) | 1937 | PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) |
| 1937 | if test "$pkg_check_gtk" = "no"; then | 1938 | if test "$pkg_check_gtk" = "no" && |
| 1938 | if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then | 1939 | { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } |
| 1939 | AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS) | 1940 | then |
| 1940 | fi | 1941 | AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS) |
| 1941 | fi | 1942 | fi |
| 1942 | fi | 1943 | fi |
| 1943 | 1944 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7163b4b4989..c9aa7e99356 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,25 @@ | |||
| 1 | 2012-09-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local | ||
| 4 | checkouts, check the parent dirstate matches the branch. | ||
| 5 | Add "--tree" to "bzr revno" arguments. Don't try to shorten the | ||
| 6 | empty string. | ||
| 7 | |||
| 8 | * version.el (emacs-bzr-version): Doc fix. | ||
| 9 | (emacs-bzr-version-dirstate): New function. | ||
| 10 | (emacs-bzr-get-version): For lightweight checkouts, if the parent | ||
| 11 | is local try and check that it matches the branch. If not, just | ||
| 12 | use dirstate information. (Bug#12441) | ||
| 13 | |||
| 14 | 2012-09-14 Juri Linkov <juri@jurta.org> | ||
| 15 | |||
| 16 | * dired-aux.el (dired-do-chmod): Use `eq' to detect empty input. | ||
| 17 | (Bug#12399) | ||
| 18 | |||
| 1 | 2012-09-14 Stefan Monnier <monnier@iro.umontreal.ca> | 19 | 2012-09-14 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 20 | ||
| 21 | * emacs-lisp/advice.el (ad-prognify): Remove, use macroexp-progn. | ||
| 22 | |||
| 3 | * emacs-lisp/edebug.el: Miscellaneous cleanup. | 23 | * emacs-lisp/edebug.el: Miscellaneous cleanup. |
| 4 | Remove obsolete byte-compiler hack that tried to silence some warnings. | 24 | Remove obsolete byte-compiler hack that tried to silence some warnings. |
| 5 | (edebug-submit-bug-report): Remove. | 25 | (edebug-submit-bug-report): Remove. |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index b42df954fe5..e5ca463e8d4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -281,7 +281,10 @@ Symbolic modes like `g+w' are allowed." | |||
| 281 | "Change mode of %s to: " | 281 | "Change mode of %s to: " |
| 282 | nil 'chmod arg files default)) | 282 | nil 'chmod arg files default)) |
| 283 | num-modes) | 283 | num-modes) |
| 284 | (cond ((equal modes "") | 284 | (cond ((or (equal modes "") |
| 285 | ;; Use `eq' instead of `equal' | ||
| 286 | ;; to detect empty input (bug#12399). | ||
| 287 | (eq modes default)) | ||
| 285 | ;; We used to treat empty input as DEFAULT, but that is not | 288 | ;; We used to treat empty input as DEFAULT, but that is not |
| 286 | ;; such a good idea (Bug#9361). | 289 | ;; such a good idea (Bug#9361). |
| 287 | (error "No file mode specified")) | 290 | (error "No file mode specified")) |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index f0d277a3f69..d96076d17a6 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -1746,6 +1746,7 @@ | |||
| 1746 | (provide 'advice-preload) | 1746 | (provide 'advice-preload) |
| 1747 | ;; During a normal load this is a noop: | 1747 | ;; During a normal load this is a noop: |
| 1748 | (require 'advice-preload "advice.el") | 1748 | (require 'advice-preload "advice.el") |
| 1749 | (require 'macroexp) | ||
| 1749 | (eval-when-compile (require 'cl-lib)) | 1750 | (eval-when-compile (require 'cl-lib)) |
| 1750 | 1751 | ||
| 1751 | ;; @@ Variable definitions: | 1752 | ;; @@ Variable definitions: |
| @@ -2538,11 +2539,6 @@ For that it has to be fbound with a non-autoload definition." | |||
| 2538 | (byte-compile symbol) | 2539 | (byte-compile symbol) |
| 2539 | (fset function (symbol-function symbol)))))) | 2540 | (fset function (symbol-function symbol)))))) |
| 2540 | 2541 | ||
| 2541 | (defun ad-prognify (forms) | ||
| 2542 | (cond ((<= (length forms) 1) | ||
| 2543 | (car forms)) | ||
| 2544 | (t (cons 'progn forms)))) | ||
| 2545 | |||
| 2546 | ;; @@@ Accessing argument lists: | 2542 | ;; @@@ Accessing argument lists: |
| 2547 | ;; ============================= | 2543 | ;; ============================= |
| 2548 | 2544 | ||
| @@ -2954,7 +2950,7 @@ should be modified. The assembled function will be returned." | |||
| 2954 | before-forms) | 2950 | before-forms) |
| 2955 | (setq before-forms | 2951 | (setq before-forms |
| 2956 | `((unwind-protect | 2952 | `((unwind-protect |
| 2957 | ,(ad-prognify before-forms) | 2953 | ,(macroexp-progn before-forms) |
| 2958 | ,@(ad-body-forms | 2954 | ,@(ad-body-forms |
| 2959 | (ad-advice-definition advice)))))) | 2955 | (ad-advice-definition advice)))))) |
| 2960 | (t (setq before-forms | 2956 | (t (setq before-forms |
| @@ -2971,12 +2967,12 @@ should be modified. The assembled function will be returned." | |||
| 2971 | (ad-substitute-tree | 2967 | (ad-substitute-tree |
| 2972 | (function (lambda (form) (eq form 'ad-do-it))) | 2968 | (function (lambda (form) (eq form 'ad-do-it))) |
| 2973 | (function (lambda (form) around-form)) | 2969 | (function (lambda (form) around-form)) |
| 2974 | (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) | 2970 | (macroexp-progn (ad-body-forms (ad-advice-definition advice)))))) |
| 2975 | 2971 | ||
| 2976 | (setq after-forms | 2972 | (setq after-forms |
| 2977 | (if (and around-form-protected before-forms) | 2973 | (if (and around-form-protected before-forms) |
| 2978 | `((unwind-protect | 2974 | `((unwind-protect |
| 2979 | ,(ad-prognify before-forms) | 2975 | ,(macroexp-progn before-forms) |
| 2980 | ,around-form)) | 2976 | ,around-form)) |
| 2981 | (append before-forms (list around-form)))) | 2977 | (append before-forms (list around-form)))) |
| 2982 | (dolist (advice afters) | 2978 | (dolist (advice afters) |
| @@ -2984,7 +2980,7 @@ should be modified. The assembled function will be returned." | |||
| 2984 | after-forms) | 2980 | after-forms) |
| 2985 | (setq after-forms | 2981 | (setq after-forms |
| 2986 | `((unwind-protect | 2982 | `((unwind-protect |
| 2987 | ,(ad-prognify after-forms) | 2983 | ,(macroexp-progn after-forms) |
| 2988 | ,@(ad-body-forms | 2984 | ,@(ad-body-forms |
| 2989 | (ad-advice-definition advice)))))) | 2985 | (ad-advice-definition advice)))))) |
| 2990 | (t (setq after-forms | 2986 | (t (setq after-forms |
| @@ -3013,7 +3009,7 @@ should be modified. The assembled function will be returned." | |||
| 3013 | (ad-body-forms (ad-advice-definition advice)))) | 3009 | (ad-body-forms (ad-advice-definition advice)))) |
| 3014 | (ad-get-enabled-advices function hook-name)))) | 3010 | (ad-get-enabled-advices function hook-name)))) |
| 3015 | (if hook-forms | 3011 | (if hook-forms |
| 3016 | (ad-prognify (apply 'append hook-forms))))) | 3012 | (macroexp-progn (apply 'append hook-forms))))) |
| 3017 | 3013 | ||
| 3018 | 3014 | ||
| 3019 | ;; @@ Caching: | 3015 | ;; @@ Caching: |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index c0dafda57b6..1eb33776f6a 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -534,7 +534,9 @@ in the branch repository (or whose status not be determined)." | |||
| 534 | ;; FIXME: maybe it's overkill to check if both these | 534 | ;; FIXME: maybe it's overkill to check if both these |
| 535 | ;; files exist. | 535 | ;; files exist. |
| 536 | (and (file-exists-p branch-format-file) | 536 | (and (file-exists-p branch-format-file) |
| 537 | (file-exists-p lastrev-file))))) | 537 | (file-exists-p lastrev-file) |
| 538 | (equal (emacs-bzr-version-dirstate l-c-parent-dir) | ||
| 539 | (emacs-bzr-version-dirstate rootdir)))))) | ||
| 538 | t))) | 540 | t))) |
| 539 | (with-temp-buffer | 541 | (with-temp-buffer |
| 540 | (insert-file-contents branch-format-file) | 542 | (insert-file-contents branch-format-file) |
| @@ -553,13 +555,17 @@ in the branch repository (or whose status not be determined)." | |||
| 553 | (insert-file-contents lastrev-file) | 555 | (insert-file-contents lastrev-file) |
| 554 | (when (re-search-forward "[0-9]+" nil t) | 556 | (when (re-search-forward "[0-9]+" nil t) |
| 555 | (buffer-substring (match-beginning 0) (match-end 0)))))) | 557 | (buffer-substring (match-beginning 0) (match-end 0)))))) |
| 556 | ;; fallback to calling "bzr revno" | 558 | ;; Fallback to calling "bzr revno --tree". |
| 559 | ;; The "--tree" matters for lightweight checkouts not on the same | ||
| 560 | ;; revision as the parent. | ||
| 557 | (let* ((result (vc-bzr-command-discarding-stderr | 561 | (let* ((result (vc-bzr-command-discarding-stderr |
| 558 | vc-bzr-program "revno" (file-relative-name file))) | 562 | vc-bzr-program "revno" "--tree" |
| 563 | (file-relative-name file))) | ||
| 559 | (exitcode (car result)) | 564 | (exitcode (car result)) |
| 560 | (output (cdr result))) | 565 | (output (cdr result))) |
| 561 | (cond | 566 | (cond |
| 562 | ((eq exitcode 0) (substring output 0 -1)) | 567 | ((and (eq exitcode 0) (not (zerop (length output)))) |
| 568 | (substring output 0 -1)) | ||
| 563 | (t nil)))))) | 569 | (t nil)))))) |
| 564 | 570 | ||
| 565 | (defun vc-bzr-create-repo () | 571 | (defun vc-bzr-create-repo () |
diff --git a/lisp/version.el b/lisp/version.el index e63c51d0d26..47476cb268a 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -87,23 +87,36 @@ to the system configuration; look at `system-configuration' instead." | |||
| 87 | ;; Set during dumping, this is a defvar so that it can be setq'd. | 87 | ;; Set during dumping, this is a defvar so that it can be setq'd. |
| 88 | (defvar emacs-bzr-version nil | 88 | (defvar emacs-bzr-version nil |
| 89 | "String giving the bzr revision from which this Emacs was built. | 89 | "String giving the bzr revision from which this Emacs was built. |
| 90 | Value is the bzr revision number and a revision ID separated by a blank. | 90 | The format is: [revno] revision_id, where revno may be absent. |
| 91 | Value is nil if Emacs was not built from a bzr checkout, or if we could | 91 | Value is nil if Emacs was not built from a bzr checkout, or if we could |
| 92 | not determine the revision.") | 92 | not determine the revision.") |
| 93 | 93 | ||
| 94 | (defun emacs-bzr-version-dirstate (dir) | ||
| 95 | "Try to return as a string the bzr revision ID of directory DIR. | ||
| 96 | This uses the dirstate file's parent revision entry. | ||
| 97 | Returns nil if unable to find this information." | ||
| 98 | (let ((file (expand-file-name ".bzr/checkout/dirstate" dir))) | ||
| 99 | (when (file-readable-p file) | ||
| 100 | (with-temp-buffer | ||
| 101 | (insert-file-contents file) | ||
| 102 | (and (looking-at "#bazaar dirstate flat format 3") | ||
| 103 | (forward-line 3) | ||
| 104 | (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") | ||
| 105 | (match-string 1)))))) | ||
| 106 | |||
| 94 | (defun emacs-bzr-get-version (&optional dir) | 107 | (defun emacs-bzr-get-version (&optional dir) |
| 95 | "Try to return as a string the bzr revision number of the Emacs sources. | 108 | "Try to return as a string the bzr revision of the Emacs sources. |
| 96 | Value is the bzr revision number and a revision ID separated by a blank. | 109 | The format is: [revno] revision_id, where revno may be absent. |
| 97 | Value is nil if the sources do not seem to be under bzr, or if we could | 110 | Value is nil if the sources do not seem to be under bzr, or if we could |
| 98 | not determine the revision. Note that this reports on the current state | 111 | not determine the revision. Note that this reports on the current state |
| 99 | of the sources, which may not correspond to the running Emacs. | 112 | of the sources, which may not correspond to the running Emacs. |
| 100 | 113 | ||
| 101 | Optional argument DIR is a directory to use instead of `source-directory'." | 114 | Optional argument DIR is a directory to use instead of `source-directory'." |
| 102 | (or dir (setq dir source-directory)) | 115 | (or dir (setq dir source-directory)) |
| 103 | (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir))) | 116 | (when (file-directory-p (expand-file-name ".bzr/branch" dir)) |
| 104 | (let (file loc) | 117 | (let (file loc rev) |
| 105 | (cond ((file-readable-p | 118 | (cond ((file-readable-p |
| 106 | (setq file (expand-file-name "last-revision" dir))) | 119 | (setq file (expand-file-name ".bzr/branch/last-revision" dir))) |
| 107 | (with-temp-buffer | 120 | (with-temp-buffer |
| 108 | (insert-file-contents file) | 121 | (insert-file-contents file) |
| 109 | (goto-char (point-max)) | 122 | (goto-char (point-max)) |
| @@ -112,14 +125,26 @@ Optional argument DIR is a directory to use instead of `source-directory'." | |||
| 112 | (buffer-string))) | 125 | (buffer-string))) |
| 113 | ;; OK, no last-revision. Is it a lightweight checkout? | 126 | ;; OK, no last-revision. Is it a lightweight checkout? |
| 114 | ((file-readable-p | 127 | ((file-readable-p |
| 115 | (setq file (expand-file-name "location" dir))) | 128 | (setq file (expand-file-name ".bzr/branch/location" dir))) |
| 116 | ;; If the parent branch is local, try looking there for the revid. | 129 | (setq rev (emacs-bzr-version-dirstate dir)) |
| 117 | (if (setq loc (with-temp-buffer | 130 | ;; If the parent branch is local, try looking there for the rev. |
| 131 | ;; Note: there is no guarantee that the parent branch's rev | ||
| 132 | ;; corresponds to this branch. This branch could have | ||
| 133 | ;; been made with a specific -r revno argument, or the | ||
| 134 | ;; parent could have been updated since this branch was created. | ||
| 135 | ;; To try and detect this, we check the dirstate revids | ||
| 136 | ;; to see if they match. | ||
| 137 | (if (and (setq loc (with-temp-buffer | ||
| 118 | (insert-file-contents file) | 138 | (insert-file-contents file) |
| 119 | (if (looking-at "file://\\(.*\\)") | 139 | (if (looking-at "file://\\(.*\\)") |
| 120 | (match-string 1)))) | 140 | (match-string 1)))) |
| 121 | (emacs-bzr-get-version loc))) | 141 | (equal rev (emacs-bzr-version-dirstate loc))) |
| 122 | ;; Could fall back to eg `bzr testament' at this point. | 142 | (emacs-bzr-get-version loc) |
| 143 | ;; If parent does not match, the best we can do without | ||
| 144 | ;; calling external commands is to use the dirstate rev. | ||
| 145 | rev)) | ||
| 146 | ;; At this point, could fall back to: | ||
| 147 | ;; bzr version-info --custom --template='{revno} {revision_id}\n' | ||
| 123 | )))) | 148 | )))) |
| 124 | 149 | ||
| 125 | ;; We put version info into the executable in the form that `ident' uses. | 150 | ;; We put version info into the executable in the form that `ident' uses. |
diff --git a/src/ChangeLog b/src/ChangeLog index e598d4d465a..88e385c876b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,19 @@ | |||
| 3 | * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster | 3 | * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster |
| 4 | here, but just check the validity of glyphs in the glyph-string. | 4 | here, but just check the validity of glyphs in the glyph-string. |
| 5 | 5 | ||
| 6 | 2012-09-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 7 | |||
| 8 | * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: | ||
| 9 | Include "syssignal.h", for 'main_thread'. | ||
| 10 | |||
| 11 | 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 12 | |||
| 13 | Avoid out-of-range marker position (Bug#12426). | ||
| 14 | * insdel.c (replace_range, replace_range_2): Adjust | ||
| 15 | markers before overlays, as suggested by comments. | ||
| 16 | (insert_1_both, insert_from_buffer_1, adjust_after_replace): | ||
| 17 | Remove redundant check before calling offset_intervals. | ||
| 18 | |||
| 6 | 2012-09-14 Martin Rudalics <rudalics@gmx.at> | 19 | 2012-09-14 Martin Rudalics <rudalics@gmx.at> |
| 7 | 20 | ||
| 8 | * xdisp.c (Fformat_mode_line): Unconditionally save/restore | 21 | * xdisp.c (Fformat_mode_line): Unconditionally save/restore |
diff --git a/src/alloc.c b/src/alloc.c index 77807f6e086..25cf03dfa2e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -100,6 +100,8 @@ extern void _free_internal (void *); | |||
| 100 | #if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT | 100 | #if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT |
| 101 | #ifdef HAVE_PTHREAD | 101 | #ifdef HAVE_PTHREAD |
| 102 | 102 | ||
| 103 | # include "syssignal.h" | ||
| 104 | |||
| 103 | /* When GTK uses the file chooser dialog, different backends can be loaded | 105 | /* When GTK uses the file chooser dialog, different backends can be loaded |
| 104 | dynamically. One such a backend is the Gnome VFS backend that gets loaded | 106 | dynamically. One such a backend is the Gnome VFS backend that gets loaded |
| 105 | if you run Gnome. That backend creates several threads and also allocates | 107 | if you run Gnome. That backend creates several threads and also allocates |
diff --git a/src/insdel.c b/src/insdel.c index b12a390633e..bfb2327a696 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -840,8 +840,7 @@ insert_1_both (const char *string, | |||
| 840 | PT + nchars, PT_BYTE + nbytes, | 840 | PT + nchars, PT_BYTE + nbytes, |
| 841 | before_markers); | 841 | before_markers); |
| 842 | 842 | ||
| 843 | if (buffer_intervals (current_buffer)) | 843 | offset_intervals (current_buffer, PT, nchars); |
| 844 | offset_intervals (current_buffer, PT, nchars); | ||
| 845 | 844 | ||
| 846 | if (!inherit && buffer_intervals (current_buffer)) | 845 | if (!inherit && buffer_intervals (current_buffer)) |
| 847 | set_text_properties (make_number (PT), make_number (PT + nchars), | 846 | set_text_properties (make_number (PT), make_number (PT + nchars), |
| @@ -1153,8 +1152,7 @@ insert_from_buffer_1 (struct buffer *buf, | |||
| 1153 | PT_BYTE + outgoing_nbytes, | 1152 | PT_BYTE + outgoing_nbytes, |
| 1154 | 0); | 1153 | 0); |
| 1155 | 1154 | ||
| 1156 | if (buffer_intervals (current_buffer)) | 1155 | offset_intervals (current_buffer, PT, nchars); |
| 1157 | offset_intervals (current_buffer, PT, nchars); | ||
| 1158 | 1156 | ||
| 1159 | /* Get the intervals for the part of the string we are inserting. */ | 1157 | /* Get the intervals for the part of the string we are inserting. */ |
| 1160 | intervals = buffer_intervals (buf); | 1158 | intervals = buffer_intervals (buf); |
| @@ -1222,8 +1220,7 @@ adjust_after_replace (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1222 | else if (len < nchars_del) | 1220 | else if (len < nchars_del) |
| 1223 | adjust_overlays_for_delete (from, nchars_del - len); | 1221 | adjust_overlays_for_delete (from, nchars_del - len); |
| 1224 | 1222 | ||
| 1225 | if (buffer_intervals (current_buffer)) | 1223 | offset_intervals (current_buffer, from, len - nchars_del); |
| 1226 | offset_intervals (current_buffer, from, len - nchars_del); | ||
| 1227 | 1224 | ||
| 1228 | if (from < PT) | 1225 | if (from < PT) |
| 1229 | adjust_point (len - nchars_del, len_byte - nbytes_del); | 1226 | adjust_point (len - nchars_del, len_byte - nbytes_del); |
| @@ -1394,16 +1391,16 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, | |||
| 1394 | 1391 | ||
| 1395 | eassert (GPT <= GPT_BYTE); | 1392 | eassert (GPT <= GPT_BYTE); |
| 1396 | 1393 | ||
| 1397 | /* Adjust the overlay center as needed. This must be done after | ||
| 1398 | adjusting the markers that bound the overlays. */ | ||
| 1399 | adjust_overlays_for_delete (from, nchars_del); | ||
| 1400 | adjust_overlays_for_insert (from, inschars); | ||
| 1401 | |||
| 1402 | /* Adjust markers for the deletion and the insertion. */ | 1394 | /* Adjust markers for the deletion and the insertion. */ |
| 1403 | if (markers) | 1395 | if (markers) |
| 1404 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, | 1396 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, |
| 1405 | inschars, outgoing_insbytes); | 1397 | inschars, outgoing_insbytes); |
| 1406 | 1398 | ||
| 1399 | /* Adjust the overlay center as needed. This must be done after | ||
| 1400 | adjusting the markers that bound the overlays. */ | ||
| 1401 | adjust_overlays_for_delete (from, nchars_del); | ||
| 1402 | adjust_overlays_for_insert (from, inschars); | ||
| 1403 | |||
| 1407 | offset_intervals (current_buffer, from, inschars - nchars_del); | 1404 | offset_intervals (current_buffer, from, inschars - nchars_del); |
| 1408 | 1405 | ||
| 1409 | /* Get the intervals for the part of the string we are inserting-- | 1406 | /* Get the intervals for the part of the string we are inserting-- |
| @@ -1510,6 +1507,12 @@ replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1510 | 1507 | ||
| 1511 | eassert (GPT <= GPT_BYTE); | 1508 | eassert (GPT <= GPT_BYTE); |
| 1512 | 1509 | ||
| 1510 | /* Adjust markers for the deletion and the insertion. */ | ||
| 1511 | if (markers | ||
| 1512 | && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) | ||
| 1513 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, | ||
| 1514 | inschars, insbytes); | ||
| 1515 | |||
| 1513 | /* Adjust the overlay center as needed. This must be done after | 1516 | /* Adjust the overlay center as needed. This must be done after |
| 1514 | adjusting the markers that bound the overlays. */ | 1517 | adjusting the markers that bound the overlays. */ |
| 1515 | if (nchars_del != inschars) | 1518 | if (nchars_del != inschars) |
| @@ -1518,12 +1521,6 @@ replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, | |||
| 1518 | adjust_overlays_for_delete (from + inschars, nchars_del); | 1521 | adjust_overlays_for_delete (from + inschars, nchars_del); |
| 1519 | } | 1522 | } |
| 1520 | 1523 | ||
| 1521 | /* Adjust markers for the deletion and the insertion. */ | ||
| 1522 | if (markers | ||
| 1523 | && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) | ||
| 1524 | adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, | ||
| 1525 | inschars, insbytes); | ||
| 1526 | |||
| 1527 | offset_intervals (current_buffer, from, inschars - nchars_del); | 1524 | offset_intervals (current_buffer, from, inschars - nchars_del); |
| 1528 | 1525 | ||
| 1529 | /* Relocate point as if it were a marker. */ | 1526 | /* Relocate point as if it were a marker. */ |