From 64f8c4bd616e110defc092ca8370739e34bbe183 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 29 Aug 2012 14:33:35 -0400 Subject: [PATCH 001/216] * lisp/progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB. Fixes: debbugs:12222 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 31 ++++++++++++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ef437213a0..0112dad3344 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-29 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB + (bug#12222). + 2012-08-27 Leo Liu * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 2d0cdeaeeae..d9f4678e6a5 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1064,21 +1064,22 @@ subshells can nest." (backward-char 1)) (when (eq (char-before) ?|) (backward-char 1) t))) - (when (progn (backward-char 2) - (if (> start (line-end-position)) - (put-text-property (point) (1+ start) - 'syntax-multiline t)) - ;; FIXME: The `in' may just be a random argument to - ;; a normal command rather than the real `in' keyword. - ;; I.e. we should look back to try and find the - ;; corresponding `case'. - (and (looking-at ";[;&]\\|\\_ (point) (1+ (point-min))) + (progn (backward-char 2) + (if (> start (line-end-position)) + (put-text-property (point) (1+ start) + 'syntax-multiline t)) + ;; FIXME: The `in' may just be a random argument to + ;; a normal command rather than the real `in' keyword. + ;; I.e. we should look back to try and find the + ;; corresponding `case'. + (and (looking-at ";[;&]\\|\\_ Date: Wed, 29 Aug 2012 21:18:41 -0400 Subject: [PATCH 002/216] * holidays.el (holiday-christian-holidays): Rename an entry (bug#12289) (Not worth a :version bump.) --- lisp/ChangeLog | 5 +++++ lisp/calendar/holidays.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0112dad3344..a2e9abede13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-30 Glenn Morris + + * calendar/holidays.el (holiday-christian-holidays): + Rename an entry. (Bug#12289) + 2012-08-29 Stefan Monnier * progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 9edd353b889..8991d20c433 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -250,7 +250,7 @@ See the documentation for `calendar-holidays' for details." (if calendar-christian-all-holidays-flag (append (holiday-fixed 1 6 "Epiphany") - (holiday-julian 12 25 "Eastern Orthodox Christmas") + (holiday-julian 12 25 "Christmas (Julian calendar)") (holiday-greek-orthodox-easter) (holiday-fixed 8 15 "Assumption") (holiday-advent 0 "Advent"))))) From 3aca1291d030ea97eab8b99d7a3e916a980b0bae Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 30 Aug 2012 19:41:40 +0800 Subject: [PATCH 003/216] Extract "^[wW]arning" into a new var flymake-warning-re --- lisp/ChangeLog | 5 +++++ lisp/progmodes/flymake.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2e9abede13..3af8b506ee7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-30 Leo Liu + + * progmodes/flymake.el (flymake-warning-re): New variable. + (flymake-parse-line): Use it. + 2012-08-30 Glenn Morris * calendar/holidays.el (holiday-christian-holidays): diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 07393c6954d..0b1290211a5 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -947,6 +947,9 @@ from compile.el") ;; :type '(repeat (string number number number)) ;;) +(defvar flymake-warning-re "^[wW]arning" + "Regexp matching against err-text to detect a warning.") + (defun flymake-parse-line (line) "Parse LINE to see if it is an error or warning. Return its components if so, nil otherwise." @@ -967,7 +970,7 @@ Return its components if so, nil otherwise." (match-string (nth 4 (car patterns)) line) (flymake-patch-err-text (substring line (match-end 0))))) (or err-text (setq err-text "")) - (if (and err-text (string-match "^[wW]arning" err-text)) + (if (and err-text (string-match flymake-warning-re err-text)) (setq err-type "w") ) (flymake-log 3 "parse line: file-idx=%s line-idx=%s file=%s line=%s text=%s" file-idx line-idx From 723088480da2c8320e0944bc23f9b72fccb54319 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 31 Aug 2012 13:38:50 -0400 Subject: [PATCH 004/216] Fix right and left key remapping issue (bug#12317) * lisp/emulation/cua-rect.el (cua--init-rectangles): * lisp/textmodes/picture.el (picture-mode-map): * lisp/play/blackbox.el (blackbox-mode-map): Remap right-char and left-char like forward-char and backward-char. --- lisp/ChangeLog | 7 +++++++ lisp/emulation/cua-rect.el | 2 ++ lisp/play/blackbox.el | 4 +++- lisp/textmodes/picture.el | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3af8b506ee7..d0f4bed4449 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-08-31 Glenn Morris + + * emulation/cua-rect.el (cua--init-rectangles): + * textmodes/picture.el (picture-mode-map): + * play/blackbox.el (blackbox-mode-map): Remap right-char and left-char + like forward-char and backward-char. (Bug#12317) + 2012-08-30 Leo Liu * progmodes/flymake.el (flymake-warning-re): New variable. diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e3aade760dc..245e1f63cc1 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -1424,7 +1424,9 @@ With prefix arg, indent to that column." (define-key cua--rectangle-keymap [remap set-mark-command] 'cua-toggle-rectangle-mark) (define-key cua--rectangle-keymap [remap forward-char] 'cua-resize-rectangle-right) + (define-key cua--rectangle-keymap [remap right-char] 'cua-resize-rectangle-right) (define-key cua--rectangle-keymap [remap backward-char] 'cua-resize-rectangle-left) + (define-key cua--rectangle-keymap [remap left-char] 'cua-resize-rectangle-left) (define-key cua--rectangle-keymap [remap next-line] 'cua-resize-rectangle-down) (define-key cua--rectangle-keymap [remap previous-line] 'cua-resize-rectangle-up) (define-key cua--rectangle-keymap [remap end-of-line] 'cua-resize-rectangle-eol) diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index eb2d784c8e5..4e8790c3586 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -93,11 +93,13 @@ (define-key map (vector 'remap oldfun) newfun)) -(defvar blackbox-mode-map +(defvar blackbox-mode-map (let ((map (make-keymap))) (suppress-keymap map t) (blackbox-redefine-key map 'backward-char 'bb-left) + (blackbox-redefine-key map 'left-char 'bb-left) (blackbox-redefine-key map 'forward-char 'bb-right) + (blackbox-redefine-key map 'right-char 'bb-right) (blackbox-redefine-key map 'previous-line 'bb-up) (blackbox-redefine-key map 'next-line 'bb-down) (blackbox-redefine-key map 'move-end-of-line 'bb-eol) diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 9e8cbb216d1..5662e905714 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -620,7 +620,9 @@ Leaves the region surrounding the rectangle." (picture-substitute 'completion-separator-self-insert-autofilling 'picture-self-insert) (picture-substitute 'forward-char 'picture-forward-column) + (picture-substitute 'right-char 'picture-forward-column) (picture-substitute 'backward-char 'picture-backward-column) + (picture-substitute 'left-char 'picture-backward-column) (picture-substitute 'delete-char 'picture-clear-column) ;; There are two possibilities for what is normally on DEL. (picture-substitute 'backward-delete-char-untabify 'picture-backward-clear-column) From f1220388bca64f31182daacfb2eefcc8053af11a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 1 Sep 2012 07:17:44 -0400 Subject: [PATCH 005/216] Auto-commit of loaddefs files. --- lisp/ldefs-boot.el | 1602 ++++++++++++++++++++++---------------------- 1 file changed, 802 insertions(+), 800 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index be81935160e..289afda5734 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -5,7 +5,7 @@ ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" -;;;;;; "play/5x5.el" (20352 65510)) +;;;;;; "play/5x5.el" (20355 10320)) ;;; Generated autoloads from play/5x5.el (autoload '5x5 "5x5" "\ @@ -68,7 +68,7 @@ should return a grid vector array that is the new solution. ;;;*** ;;;### (autoloads (ada-mode ada-add-extensions) "ada-mode" "progmodes/ada-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/ada-mode.el (autoload 'ada-add-extensions "ada-mode" "\ @@ -88,7 +88,7 @@ Ada mode is the major mode for editing Ada code. ;;;*** ;;;### (autoloads (ada-header) "ada-stmt" "progmodes/ada-stmt.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/ada-stmt.el (autoload 'ada-header "ada-stmt" "\ @@ -99,7 +99,7 @@ Insert a descriptive header at the top of the file. ;;;*** ;;;### (autoloads (ada-find-file) "ada-xref" "progmodes/ada-xref.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/ada-xref.el (autoload 'ada-find-file "ada-xref" "\ @@ -114,7 +114,7 @@ Completion is available. ;;;;;; add-change-log-entry-other-window add-change-log-entry find-change-log ;;;;;; prompt-for-change-log-name add-log-mailing-address add-log-full-name ;;;;;; add-log-current-defun-function) "add-log" "vc/add-log.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/add-log.el (put 'change-log-default-name 'safe-local-variable 'string-or-null-p) @@ -253,7 +253,7 @@ old-style time formats for entries are supported. ;;;### (autoloads (defadvice ad-activate ad-add-advice ad-disable-advice ;;;;;; ad-enable-advice ad-default-compilation-action ad-redefinition-action) -;;;;;; "advice" "emacs-lisp/advice.el" (20352 65510)) +;;;;;; "advice" "emacs-lisp/advice.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/advice.el (defvar ad-redefinition-action 'warn "\ @@ -398,7 +398,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) ;;;### (autoloads (align-newline-and-indent align-unhighlight-rule ;;;;;; align-highlight-rule align-current align-entire align-regexp -;;;;;; align) "align" "align.el" (20352 65510)) +;;;;;; align) "align" "align.el" (20355 10320)) ;;; Generated autoloads from align.el (autoload 'align "align" "\ @@ -489,7 +489,7 @@ A replacement function for `newline-and-indent', aligning as it goes. ;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation ;;;;;; allout-setup allout-auto-activation-helper) "allout" "allout.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from allout.el (autoload 'allout-auto-activation-helper "allout" "\ @@ -850,7 +850,7 @@ for details on preparing Emacs for automatic allout activation. ;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation ;;;;;; allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el" -;;;;;; (20432 47835)) +;;;;;; (20433 57140)) ;;; Generated autoloads from allout-widgets.el (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) @@ -910,7 +910,7 @@ outline hot-spot navigation (see `allout-mode'). ;;;*** ;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp" -;;;;;; "net/ange-ftp.el" (20400 62402)) +;;;;;; "net/ange-ftp.el" (20355 10320)) ;;; Generated autoloads from net/ange-ftp.el (defalias 'ange-ftp-re-read-dir 'ange-ftp-reread-dir) @@ -932,7 +932,7 @@ directory, so that Emacs will know its current contents. ;;;*** ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) -;;;;;; "animate" "play/animate.el" (20400 62402)) +;;;;;; "animate" "play/animate.el" (20355 10320)) ;;; Generated autoloads from play/animate.el (autoload 'animate-string "animate" "\ @@ -965,7 +965,7 @@ the buffer *Birthday-Present-for-Name*. ;;;*** ;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) -;;;;;; "ansi-color" "ansi-color.el" (20391 15703)) +;;;;;; "ansi-color" "ansi-color.el" (20391 44851)) ;;; Generated autoloads from ansi-color.el (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ @@ -991,7 +991,7 @@ This is a good function to put in `comint-output-filter-functions'. ;;;*** ;;;### (autoloads (antlr-set-tabs antlr-mode antlr-show-makefile-rules) -;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (20400 62402)) +;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (20355 10320)) ;;; Generated autoloads from progmodes/antlr-mode.el (autoload 'antlr-show-makefile-rules "antlr-mode" "\ @@ -1027,7 +1027,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. ;;;*** ;;;### (autoloads (appt-activate appt-add) "appt" "calendar/appt.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from calendar/appt.el (autoload 'appt-add "appt" "\ @@ -1050,7 +1050,7 @@ ARG is positive, otherwise off. ;;;### (autoloads (apropos-documentation apropos-value apropos-library ;;;;;; apropos apropos-documentation-property apropos-command apropos-variable -;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20400 62402)) +;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20355 10320)) ;;; Generated autoloads from apropos.el (autoload 'apropos-read-pattern "apropos" "\ @@ -1158,8 +1158,8 @@ Returns list of symbols and documentation found. ;;;*** -;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from arc-mode.el (autoload 'archive-mode "arc-mode" "\ @@ -1179,7 +1179,7 @@ archive. ;;;*** -;;;### (autoloads (array-mode) "array" "array.el" (20352 65510)) +;;;### (autoloads (array-mode) "array" "array.el" (20355 10320)) ;;; Generated autoloads from array.el (autoload 'array-mode "array" "\ @@ -1250,8 +1250,8 @@ Entering array mode calls the function `array-mode-hook'. ;;;*** -;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from textmodes/artist.el (autoload 'artist-mode "artist" "\ @@ -1457,8 +1457,8 @@ Keymap summary ;;;*** -;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/asm-mode.el (autoload 'asm-mode "asm-mode" "\ @@ -1486,7 +1486,7 @@ Special commands: ;;;*** ;;;### (autoloads (auth-source-cache-expiry) "auth-source" "gnus/auth-source.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/auth-source.el (defvar auth-source-cache-expiry 7200 "\ @@ -1499,7 +1499,7 @@ let-binding.") ;;;*** ;;;### (autoloads (autoarg-kp-mode autoarg-mode) "autoarg" "autoarg.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from autoarg.el (defvar autoarg-mode nil "\ @@ -1560,7 +1560,7 @@ This is similar to `autoarg-mode' but rebinds the keypad keys ;;;*** ;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/autoconf.el (autoload 'autoconf-mode "autoconf" "\ @@ -1571,7 +1571,7 @@ Major mode for editing Autoconf configure.in files. ;;;*** ;;;### (autoloads (auto-insert-mode define-auto-insert auto-insert) -;;;;;; "autoinsert" "autoinsert.el" (20400 62402)) +;;;;;; "autoinsert" "autoinsert.el" (20355 10320)) ;;; Generated autoloads from autoinsert.el (autoload 'auto-insert "autoinsert" "\ @@ -1611,7 +1611,7 @@ insert a template for the file depending on the mode of the buffer. ;;;### (autoloads (batch-update-autoloads update-directory-autoloads ;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el" -;;;;;; (20517 48515)) +;;;;;; (20516 60858)) ;;; Generated autoloads from emacs-lisp/autoload.el (put 'generated-autoload-file 'safe-local-variable 'stringp) @@ -1662,7 +1662,7 @@ should be non-nil). ;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-tail-mode ;;;;;; auto-revert-tail-mode turn-on-auto-revert-mode auto-revert-mode) -;;;;;; "autorevert" "autorevert.el" (20400 62402)) +;;;;;; "autorevert" "autorevert.el" (20355 10320)) ;;; Generated autoloads from autorevert.el (autoload 'auto-revert-mode "autorevert" "\ @@ -1751,7 +1751,7 @@ specifies in the mode line. ;;;*** ;;;### (autoloads (mouse-avoidance-mode mouse-avoidance-mode) "avoid" -;;;;;; "avoid.el" (20400 62402)) +;;;;;; "avoid.el" (20355 10320)) ;;; Generated autoloads from avoid.el (defvar mouse-avoidance-mode nil "\ @@ -1792,7 +1792,7 @@ definition of \"random distance\".) ;;;*** ;;;### (autoloads (display-battery-mode battery) "battery" "battery.el" -;;;;;; (20400 62402)) +;;;;;; (20369 17844)) ;;; Generated autoloads from battery.el (put 'battery-mode-line-string 'risky-local-variable t) @@ -1828,7 +1828,7 @@ seconds. ;;;*** ;;;### (autoloads (benchmark benchmark-run-compiled benchmark-run) -;;;;;; "benchmark" "emacs-lisp/benchmark.el" (20352 65510)) +;;;;;; "benchmark" "emacs-lisp/benchmark.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/benchmark.el (autoload 'benchmark-run "benchmark" "\ @@ -1861,7 +1861,7 @@ For non-interactive use see also `benchmark-run' and ;;;*** ;;;### (autoloads (bibtex-search-entry bibtex-mode bibtex-initialize) -;;;;;; "bibtex" "textmodes/bibtex.el" (20400 62402)) +;;;;;; "bibtex" "textmodes/bibtex.el" (20355 10320)) ;;; Generated autoloads from textmodes/bibtex.el (autoload 'bibtex-initialize "bibtex" "\ @@ -1950,7 +1950,7 @@ A prefix arg negates the value of `bibtex-search-entry-globally'. ;;;*** ;;;### (autoloads (bibtex-style-mode) "bibtex-style" "textmodes/bibtex-style.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/bibtex-style.el (autoload 'bibtex-style-mode "bibtex-style" "\ @@ -1962,7 +1962,7 @@ Major mode for editing BibTeX style files. ;;;### (autoloads (binhex-decode-region binhex-decode-region-external ;;;;;; binhex-decode-region-internal) "binhex" "mail/binhex.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/binhex.el (defconst binhex-begin-line "^:...............................................................$" "\ @@ -1986,8 +1986,8 @@ Binhex decode region between START and END. ;;;*** -;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20544 +;;;;;; 62870)) ;;; Generated autoloads from play/blackbox.el (autoload 'blackbox "blackbox" "\ @@ -2110,7 +2110,7 @@ a reflection. ;;;;;; bookmark-save bookmark-write bookmark-delete bookmark-insert ;;;;;; bookmark-rename bookmark-insert-location bookmark-relocate ;;;;;; bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark" -;;;;;; "bookmark.el" (20400 62402)) +;;;;;; "bookmark.el" (20355 10320)) ;;; Generated autoloads from bookmark.el (define-key ctl-x-r-map "b" 'bookmark-jump) (define-key ctl-x-r-map "m" 'bookmark-set) @@ -2311,7 +2311,7 @@ Incremental search of bookmarks, hiding the non-matches as we go. ;;;;;; browse-url-xdg-open browse-url-at-mouse browse-url-at-point ;;;;;; browse-url browse-url-of-region browse-url-of-dired-file ;;;;;; browse-url-of-buffer browse-url-of-file browse-url-browser-function) -;;;;;; "browse-url" "net/browse-url.el" (20400 62402)) +;;;;;; "browse-url" "net/browse-url.el" (20355 10320)) ;;; Generated autoloads from net/browse-url.el (defvar browse-url-browser-function 'browse-url-default-browser "\ @@ -2626,8 +2626,8 @@ from `browse-url-elinks-wrapper'. ;;;*** -;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from play/bruce.el (autoload 'bruce "bruce" "\ @@ -2643,7 +2643,7 @@ Return a vector containing the lines from `bruce-phrases-file'. ;;;*** ;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next) -;;;;;; "bs" "bs.el" (20400 62402)) +;;;;;; "bs" "bs.el" (20355 10320)) ;;; Generated autoloads from bs.el (autoload 'bs-cycle-next "bs" "\ @@ -2683,7 +2683,7 @@ name of buffer configuration. ;;;*** -;;;### (autoloads (bubbles) "bubbles" "play/bubbles.el" (20352 65510)) +;;;### (autoloads (bubbles) "bubbles" "play/bubbles.el" (20355 10320)) ;;; Generated autoloads from play/bubbles.el (autoload 'bubbles "bubbles" "\ @@ -2705,7 +2705,7 @@ columns on its right towards the left. ;;;*** ;;;### (autoloads (bug-reference-prog-mode bug-reference-mode) "bug-reference" -;;;;;; "progmodes/bug-reference.el" (20487 24216)) +;;;;;; "progmodes/bug-reference.el" (20487 60609)) ;;; Generated autoloads from progmodes/bug-reference.el (put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format))))) @@ -2729,7 +2729,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning) -;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20423 1775)) +;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20423 21318)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -2849,8 +2849,8 @@ and corresponding effects. ;;;*** -;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20352 -;;;;;; 65510)) +;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calendar/cal-china.el (put 'calendar-chinese-time-zone 'risky-local-variable t) @@ -2859,7 +2859,7 @@ and corresponding effects. ;;;*** -;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (20461 49352)) +;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (20461 36529)) ;;; Generated autoloads from calendar/cal-dst.el (put 'calendar-daylight-savings-starts 'risky-local-variable t) @@ -2871,7 +2871,7 @@ and corresponding effects. ;;;*** ;;;### (autoloads (calendar-hebrew-list-yahrzeits) "cal-hebrew" "calendar/cal-hebrew.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from calendar/cal-hebrew.el (autoload 'calendar-hebrew-list-yahrzeits "cal-hebrew" "\ @@ -2887,8 +2887,8 @@ from the cursor position. ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc -;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (20400 -;;;;;; 62402)) +;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calc/calc.el (define-key ctl-x-map "*" 'calc-dispatch) @@ -2972,8 +2972,8 @@ See Info node `(calc)Defining Functions'. ;;;*** -;;;### (autoloads (calc-undo) "calc-undo" "calc/calc-undo.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (calc-undo) "calc-undo" "calc/calc-undo.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calc/calc-undo.el (autoload 'calc-undo "calc-undo" "\ @@ -2983,8 +2983,8 @@ See Info node `(calc)Defining Functions'. ;;;*** -;;;### (autoloads (calculator) "calculator" "calculator.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (calculator) "calculator" "calculator.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calculator.el (autoload 'calculator "calculator" "\ @@ -2995,8 +2995,8 @@ See the documentation for `calculator-mode' for more information. ;;;*** -;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calendar/calendar.el (autoload 'calendar "calendar" "\ @@ -3040,7 +3040,7 @@ This function is suitable for execution in a .emacs file. ;;;*** ;;;### (autoloads (canlock-verify canlock-insert-header) "canlock" -;;;;;; "gnus/canlock.el" (20352 65510)) +;;;;;; "gnus/canlock.el" (20355 10320)) ;;; Generated autoloads from gnus/canlock.el (autoload 'canlock-insert-header "canlock" "\ @@ -3058,7 +3058,7 @@ it fails. ;;;*** ;;;### (autoloads (capitalized-words-mode) "cap-words" "progmodes/cap-words.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/cap-words.el (autoload 'capitalized-words-mode "cap-words" "\ @@ -3097,15 +3097,15 @@ Obsoletes `c-forward-into-nomenclature'. ;;;*** -;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (20352 -;;;;;; 65510)) +;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/cc-compat.el (put 'c-indent-level 'safe-local-variable 'integerp) ;;;*** ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" -;;;;;; (20400 62402)) +;;;;;; (20358 10456)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload 'c-guess-basic-syntax "cc-engine" "\ @@ -3117,7 +3117,7 @@ Return the syntactic context of the current line. ;;;### (autoloads (c-guess-install c-guess-region-no-install c-guess-region ;;;;;; c-guess-buffer-no-install c-guess-buffer c-guess-no-install -;;;;;; c-guess) "cc-guess" "progmodes/cc-guess.el" (20352 65510)) +;;;;;; c-guess) "cc-guess" "progmodes/cc-guess.el" (20355 10320)) ;;; Generated autoloads from progmodes/cc-guess.el (defvar c-guess-guessed-offsets-alist nil "\ @@ -3217,7 +3217,7 @@ the absolute file name of the file if STYLE-NAME is nil. ;;;### (autoloads (awk-mode pike-mode idl-mode java-mode objc-mode ;;;;;; c++-mode c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" -;;;;;; (20365 1028)) +;;;;;; (20365 20790)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload 'c-initialize-cc-mode "cc-mode" "\ @@ -3394,7 +3394,7 @@ Key bindings: ;;;*** ;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles" -;;;;;; "progmodes/cc-styles.el" (20352 65510)) +;;;;;; "progmodes/cc-styles.el" (20355 10320)) ;;; Generated autoloads from progmodes/cc-styles.el (autoload 'c-set-style "cc-styles" "\ @@ -3445,7 +3445,7 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (20352 65510)) +;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (20355 10320)) ;;; Generated autoloads from progmodes/cc-vars.el (put 'c-basic-offset 'safe-local-variable 'integerp) (put 'c-backslash-column 'safe-local-variable 'integerp) @@ -3455,7 +3455,7 @@ and exists only for compatibility reasons. ;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program ;;;;;; declare-ccl-program ccl-dump ccl-compile) "ccl" "international/ccl.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from international/ccl.el (autoload 'ccl-compile "ccl" "\ @@ -3716,7 +3716,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. ;;;*** ;;;### (autoloads (cconv-closure-convert) "cconv" "emacs-lisp/cconv.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/cconv.el (autoload 'cconv-closure-convert "cconv" "\ @@ -3731,7 +3731,7 @@ Returns a form where all lambdas don't have any free variables. ;;;*** ;;;### (autoloads (cfengine-auto-mode cfengine2-mode cfengine3-mode) -;;;;;; "cfengine" "progmodes/cfengine.el" (20400 62402)) +;;;;;; "cfengine" "progmodes/cfengine.el" (20355 10320)) ;;; Generated autoloads from progmodes/cfengine.el (autoload 'cfengine3-mode "cfengine" "\ @@ -3761,7 +3761,7 @@ on the buffer contents ;;;*** ;;;### (autoloads (check-declare-directory check-declare-file) "check-declare" -;;;;;; "emacs-lisp/check-declare.el" (20370 20099)) +;;;;;; "emacs-lisp/check-declare.el" (20370 2)) ;;; Generated autoloads from emacs-lisp/check-declare.el (autoload 'check-declare-file "check-declare" "\ @@ -3786,7 +3786,7 @@ Returns non-nil if any false statements are found. ;;;;;; checkdoc-comments checkdoc-continue checkdoc-start checkdoc-current-buffer ;;;;;; checkdoc-eval-current-buffer checkdoc-message-interactive ;;;;;; checkdoc-interactive checkdoc checkdoc-list-of-strings-p) -;;;;;; "checkdoc" "emacs-lisp/checkdoc.el" (20400 62402)) +;;;;;; "checkdoc" "emacs-lisp/checkdoc.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/checkdoc.el (put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp) (put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp) @@ -3982,7 +3982,7 @@ checking of documentation strings. ;;;### (autoloads (pre-write-encode-hz post-read-decode-hz encode-hz-buffer ;;;;;; encode-hz-region decode-hz-buffer decode-hz-region) "china-util" -;;;;;; "language/china-util.el" (20352 65510)) +;;;;;; "language/china-util.el" (20355 10320)) ;;; Generated autoloads from language/china-util.el (autoload 'decode-hz-region "china-util" "\ @@ -4020,7 +4020,7 @@ Encode the text in the current buffer to HZ. ;;;*** ;;;### (autoloads (command-history list-command-history repeat-matching-complex-command) -;;;;;; "chistory" "chistory.el" (20352 65510)) +;;;;;; "chistory" "chistory.el" (20355 10320)) ;;; Generated autoloads from chistory.el (autoload 'repeat-matching-complex-command "chistory" "\ @@ -4059,7 +4059,7 @@ and runs the normal hook `command-history-hook'. ;;;*** -;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (20352 65510)) +;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/cl.el (defvar custom-print-functions nil "\ @@ -4075,7 +4075,7 @@ a future Emacs interpreter will be able to use it.") ;;;*** ;;;### (autoloads (common-lisp-indent-function) "cl-indent" "emacs-lisp/cl-indent.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/cl-indent.el (autoload 'common-lisp-indent-function "cl-indent" "\ @@ -4154,7 +4154,7 @@ For example, the function `case' has an indent property ;;;*** ;;;### (autoloads (c-macro-expand) "cmacexp" "progmodes/cmacexp.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/cmacexp.el (autoload 'c-macro-expand "cmacexp" "\ @@ -4174,8 +4174,8 @@ For use inside Lisp programs, see also `c-macro-expansion'. ;;;*** -;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from cmuscheme.el (autoload 'run-scheme "cmuscheme" "\ @@ -4195,7 +4195,7 @@ is run). ;;;*** -;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20352 65510)) +;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20355 10320)) ;;; Generated autoloads from color.el (autoload 'color-name-to-rgb "color" "\ @@ -4217,7 +4217,7 @@ If FRAME cannot display COLOR, return nil. ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" -;;;;;; (20400 62402)) +;;;;;; (20367 62515)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ @@ -4317,7 +4317,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use. ;;;*** ;;;### (autoloads (compare-windows) "compare-w" "vc/compare-w.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/compare-w.el (autoload 'compare-windows "compare-w" "\ @@ -4354,8 +4354,8 @@ on third call it again advances points to the next difference and so on. ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start ;;;;;; compile compilation-disable-input compile-command compilation-search-path ;;;;;; compilation-ask-about-save compilation-window-height compilation-start-hook -;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20400 -;;;;;; 62402)) +;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20399 +;;;;;; 38963)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ @@ -4535,7 +4535,7 @@ This is the value of `next-error-function' in Compilation buffers. ;;;*** ;;;### (autoloads (dynamic-completion-mode) "completion" "completion.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from completion.el (defvar dynamic-completion-mode nil "\ @@ -4560,7 +4560,7 @@ if ARG is omitted or nil. ;;;### (autoloads (conf-xdefaults-mode conf-ppd-mode conf-colon-mode ;;;;;; conf-space-keywords conf-space-mode conf-javaprop-mode conf-windows-mode ;;;;;; conf-unix-mode conf-mode) "conf-mode" "textmodes/conf-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/conf-mode.el (autoload 'conf-mode "conf-mode" "\ @@ -4716,7 +4716,7 @@ For details see `conf-mode'. Example: ;;;*** ;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) -;;;;;; "cookie1" "play/cookie1.el" (20400 62402)) +;;;;;; "cookie1" "play/cookie1.el" (20355 10320)) ;;; Generated autoloads from play/cookie1.el (autoload 'cookie "cookie1" "\ @@ -4748,8 +4748,8 @@ Randomly permute the elements of VECTOR (all permutations equally likely). ;;;*** ;;;### (autoloads (copyright-update-directory copyright copyright-fix-years -;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20517 -;;;;;; 48515)) +;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20516 +;;;;;; 60858)) ;;; Generated autoloads from emacs-lisp/copyright.el (put 'copyright-at-end-flag 'safe-local-variable 'booleanp) (put 'copyright-names-regexp 'safe-local-variable 'stringp) @@ -4788,7 +4788,7 @@ If FIX is non-nil, run `copyright-fix-years' instead. ;;;*** ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) -;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20512 35261)) +;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20512 11949)) ;;; Generated autoloads from progmodes/cperl-mode.el (put 'cperl-indent-level 'safe-local-variable 'integerp) (put 'cperl-brace-offset 'safe-local-variable 'integerp) @@ -4987,7 +4987,7 @@ Run a `perldoc' on the word around point. ;;;*** ;;;### (autoloads (cpp-parse-edit cpp-highlight-buffer) "cpp" "progmodes/cpp.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/cpp.el (autoload 'cpp-highlight-buffer "cpp" "\ @@ -5006,7 +5006,7 @@ Edit display information for cpp conditionals. ;;;*** ;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emulation/crisp.el (defvar crisp-mode nil "\ @@ -5032,7 +5032,7 @@ if ARG is omitted or nil. ;;;*** ;;;### (autoloads (completing-read-multiple) "crm" "emacs-lisp/crm.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/crm.el (autoload 'completing-read-multiple "crm" "\ @@ -5067,8 +5067,8 @@ INHERIT-INPUT-METHOD. ;;;*** -;;;### (autoloads (css-mode) "css-mode" "textmodes/css-mode.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (css-mode) "css-mode" "textmodes/css-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from textmodes/css-mode.el (autoload 'css-mode "css-mode" "\ @@ -5079,7 +5079,7 @@ Major mode to edit Cascading Style Sheets. ;;;*** ;;;### (autoloads (cua-selection-mode cua-mode) "cua-base" "emulation/cua-base.el" -;;;;;; (20400 62402)) +;;;;;; (20360 2867)) ;;; Generated autoloads from emulation/cua-base.el (defvar cua-mode nil "\ @@ -5139,7 +5139,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. ;;;;;; customize-mode customize customize-push-and-save customize-save-variable ;;;;;; customize-set-variable customize-set-value custom-menu-sort-alphabetically ;;;;;; custom-buffer-sort-alphabetically custom-browse-sort-alphabetically) -;;;;;; "cus-edit" "cus-edit.el" (20424 24226)) +;;;;;; "cus-edit" "cus-edit.el" (20424 42174)) ;;; Generated autoloads from cus-edit.el (defvar custom-browse-sort-alphabetically nil "\ @@ -5455,8 +5455,8 @@ The format is suitable for use with `easy-menu-define'. ;;;*** ;;;### (autoloads (customize-themes describe-theme custom-theme-visit-theme -;;;;;; customize-create-theme) "cus-theme" "cus-theme.el" (20352 -;;;;;; 65510)) +;;;;;; customize-create-theme) "cus-theme" "cus-theme.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from cus-theme.el (autoload 'customize-create-theme "cus-theme" "\ @@ -5490,7 +5490,7 @@ omitted, a buffer named *Custom Themes* is used. ;;;*** ;;;### (autoloads (cvs-status-mode) "cvs-status" "vc/cvs-status.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/cvs-status.el (autoload 'cvs-status-mode "cvs-status" "\ @@ -5501,7 +5501,7 @@ Mode used for cvs status output. ;;;*** ;;;### (autoloads (global-cwarn-mode turn-on-cwarn-mode cwarn-mode) -;;;;;; "cwarn" "progmodes/cwarn.el" (20400 62402)) +;;;;;; "cwarn" "progmodes/cwarn.el" (20355 10320)) ;;; Generated autoloads from progmodes/cwarn.el (autoload 'cwarn-mode "cwarn" "\ @@ -5552,7 +5552,7 @@ See `cwarn-mode' for more information on Cwarn mode. ;;;### (autoloads (standard-display-cyrillic-translit cyrillic-encode-alternativnyj-char ;;;;;; cyrillic-encode-koi8-r-char) "cyril-util" "language/cyril-util.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from language/cyril-util.el (autoload 'cyrillic-encode-koi8-r-char "cyril-util" "\ @@ -5581,7 +5581,7 @@ If the argument is nil, we return the display table to its standard state. ;;;*** ;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from dabbrev.el (put 'dabbrev-case-fold-search 'risky-local-variable t) (put 'dabbrev-case-replace 'risky-local-variable t) @@ -5628,7 +5628,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. ;;;*** ;;;### (autoloads (data-debug-new-buffer) "data-debug" "cedet/data-debug.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from cedet/data-debug.el (autoload 'data-debug-new-buffer "data-debug" "\ @@ -5638,8 +5638,8 @@ Create a new data-debug buffer with NAME. ;;;*** -;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from net/dbus.el (autoload 'dbus-handle-event "dbus" "\ @@ -5652,8 +5652,8 @@ If the HANDLER returns a `dbus-error', it is propagated as return message. ;;;*** -;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/dcl-mode.el (autoload 'dcl-mode "dcl-mode" "\ @@ -5780,7 +5780,7 @@ There is some minimal font-lock support (see vars ;;;*** ;;;### (autoloads (cancel-debug-on-entry debug-on-entry debug) "debug" -;;;;;; "emacs-lisp/debug.el" (20352 65510)) +;;;;;; "emacs-lisp/debug.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/debug.el (setq debugger 'debug) @@ -5824,7 +5824,7 @@ To specify a nil argument interactively, exit with an empty minibuffer. ;;;*** ;;;### (autoloads (decipher-mode decipher) "decipher" "play/decipher.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from play/decipher.el (autoload 'decipher "decipher" "\ @@ -5853,8 +5853,8 @@ The most useful commands are: ;;;*** ;;;### (autoloads (delimit-columns-rectangle delimit-columns-region -;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (20352 -;;;;;; 65510)) +;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from delim-col.el (autoload 'delimit-columns-customize "delim-col" "\ @@ -5878,8 +5878,8 @@ START and END delimits the corners of text rectangle. ;;;*** -;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/delphi.el (autoload 'delphi-mode "delphi" "\ @@ -5930,8 +5930,8 @@ with no args, if that value is non-nil. ;;;*** -;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from delsel.el (defalias 'pending-delete-mode 'delete-selection-mode) @@ -5961,7 +5961,7 @@ any selection. ;;;*** ;;;### (autoloads (derived-mode-init-mode-variables define-derived-mode) -;;;;;; "derived" "emacs-lisp/derived.el" (20352 65510)) +;;;;;; "derived" "emacs-lisp/derived.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/derived.el (autoload 'define-derived-mode "derived" "\ @@ -6028,7 +6028,7 @@ the first time the mode is used. ;;;*** ;;;### (autoloads (describe-char describe-text-properties) "descr-text" -;;;;;; "descr-text.el" (20400 62402)) +;;;;;; "descr-text.el" (20355 10320)) ;;; Generated autoloads from descr-text.el (autoload 'describe-text-properties "descr-text" "\ @@ -6065,7 +6065,7 @@ relevant to POS. ;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir ;;;;;; desktop-load-default desktop-read desktop-remove desktop-save ;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop" -;;;;;; "desktop.el" (20420 42151)) +;;;;;; "desktop.el" (20419 24243)) ;;; Generated autoloads from desktop.el (defvar desktop-save-mode nil "\ @@ -6252,7 +6252,7 @@ Revert to the last loaded desktop. ;;;### (autoloads (gnus-article-outlook-deuglify-article gnus-outlook-deuglify-article ;;;;;; gnus-article-outlook-repair-attribution gnus-article-outlook-unwrap-lines) -;;;;;; "deuglify" "gnus/deuglify.el" (20352 65510)) +;;;;;; "deuglify" "gnus/deuglify.el" (20355 10320)) ;;; Generated autoloads from gnus/deuglify.el (autoload 'gnus-article-outlook-unwrap-lines "deuglify" "\ @@ -6285,7 +6285,7 @@ Deuglify broken Outlook (Express) articles and redisplay. ;;;*** ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" -;;;;;; "calendar/diary-lib.el" (20352 65510)) +;;;;;; "calendar/diary-lib.el" (20355 10320)) ;;; Generated autoloads from calendar/diary-lib.el (autoload 'diary "diary-lib" "\ @@ -6328,7 +6328,7 @@ Major mode for editing the diary file. ;;;*** ;;;### (autoloads (diff-buffer-with-file diff-backup diff diff-command -;;;;;; diff-switches) "diff" "vc/diff.el" (20400 62402)) +;;;;;; diff-switches) "diff" "vc/diff.el" (20355 10320)) ;;; Generated autoloads from vc/diff.el (defvar diff-switches (purecopy "-c") "\ @@ -6372,7 +6372,7 @@ This requires the external program `diff' to be in your `exec-path'. ;;;*** ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "vc/diff-mode.el" -;;;;;; (20461 49352)) +;;;;;; (20454 63285)) ;;; Generated autoloads from vc/diff-mode.el (autoload 'diff-mode "diff-mode" "\ @@ -6404,7 +6404,7 @@ the mode if ARG is omitted or nil. ;;;*** -;;;### (autoloads (dig) "dig" "net/dig.el" (20352 65510)) +;;;### (autoloads (dig) "dig" "net/dig.el" (20355 10320)) ;;; Generated autoloads from net/dig.el (autoload 'dig "dig" "\ @@ -6416,7 +6416,7 @@ Optional arguments are passed to `dig-invoke'. ;;;*** ;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window -;;;;;; dired dired-listing-switches) "dired" "dired.el" (20400 62402)) +;;;;;; dired dired-listing-switches) "dired" "dired.el" (20355 10320)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -6538,7 +6538,7 @@ Keybindings: ;;;*** ;;;### (autoloads (dirtrack dirtrack-mode) "dirtrack" "dirtrack.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from dirtrack.el (autoload 'dirtrack-mode "dirtrack" "\ @@ -6568,8 +6568,8 @@ from `default-directory'. ;;;*** -;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/disass.el (autoload 'disassemble "disass" "\ @@ -6588,7 +6588,7 @@ redefine OBJECT if it is a symbol. ;;;;;; standard-display-g1 standard-display-ascii standard-display-default ;;;;;; standard-display-8bit describe-current-display-table describe-display-table ;;;;;; set-display-table-slot display-table-slot make-display-table) -;;;;;; "disp-table" "disp-table.el" (20352 65510)) +;;;;;; "disp-table" "disp-table.el" (20355 10320)) ;;; Generated autoloads from disp-table.el (autoload 'make-display-table "disp-table" "\ @@ -6710,7 +6710,7 @@ in `.emacs'. ;;;*** ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from play/dissociate.el (autoload 'dissociated-press "dissociate" "\ @@ -6726,7 +6726,7 @@ Default is 2. ;;;*** -;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (20352 65510)) +;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (20355 10320)) ;;; Generated autoloads from dnd.el (defvar dnd-protocol-alist `((,(purecopy "^file:///") . dnd-open-local-file) (,(purecopy "^file://") . dnd-open-file) (,(purecopy "^file:") . dnd-open-local-file) (,(purecopy "^\\(https?\\|ftp\\|file\\|nfs\\)://") . dnd-open-file)) "\ @@ -6747,7 +6747,7 @@ if some action was made, or nil if the URL is ignored.") ;;;*** ;;;### (autoloads (dns-mode-soa-increment-serial dns-mode) "dns-mode" -;;;;;; "textmodes/dns-mode.el" (20352 65510)) +;;;;;; "textmodes/dns-mode.el" (20355 10320)) ;;; Generated autoloads from textmodes/dns-mode.el (autoload 'dns-mode "dns-mode" "\ @@ -6771,8 +6771,8 @@ Locate SOA record and increment the serial field. ;;;*** ;;;### (autoloads (doc-view-bookmark-jump doc-view-minor-mode doc-view-mode-maybe -;;;;;; doc-view-mode doc-view-mode-p) "doc-view" "doc-view.el" (20400 -;;;;;; 62402)) +;;;;;; doc-view-mode doc-view-mode-p) "doc-view" "doc-view.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from doc-view.el (autoload 'doc-view-mode-p "doc-view" "\ @@ -6818,7 +6818,7 @@ See the command `doc-view-mode' for more information on this mode. ;;;*** -;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20352 65510)) +;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20355 10320)) ;;; Generated autoloads from play/doctor.el (autoload 'doctor "doctor" "\ @@ -6828,7 +6828,7 @@ Switch to *doctor* buffer and start giving psychotherapy. ;;;*** -;;;### (autoloads (double-mode) "double" "double.el" (20352 65510)) +;;;### (autoloads (double-mode) "double" "double.el" (20355 10320)) ;;; Generated autoloads from double.el (autoload 'double-mode "double" "\ @@ -6844,7 +6844,7 @@ strings when pressed twice. See `double-map' for details. ;;;*** -;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20352 65510)) +;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20355 10320)) ;;; Generated autoloads from play/dunnet.el (autoload 'dunnet "dunnet" "\ @@ -6856,7 +6856,7 @@ Switch to *dungeon* buffer and start game. ;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap ;;;;;; define-globalized-minor-mode define-minor-mode) "easy-mmode" -;;;;;; "emacs-lisp/easy-mmode.el" (20400 62402)) +;;;;;; "emacs-lisp/easy-mmode.el" (20362 44597)) ;;; Generated autoloads from emacs-lisp/easy-mmode.el (defalias 'easy-mmode-define-minor-mode 'define-minor-mode) @@ -6982,8 +6982,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX). ;;;*** ;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define -;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (20352 -;;;;;; 65510)) +;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/easymenu.el (autoload 'easy-menu-define "easymenu" "\ @@ -7137,7 +7137,7 @@ To implement dynamic menus, either call this from ;;;;;; ebnf-eps-file ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ;;;;;; ebnf-spool-file ebnf-spool-directory ebnf-print-region ebnf-print-buffer ;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" -;;;;;; "progmodes/ebnf2ps.el" (20400 62402)) +;;;;;; "progmodes/ebnf2ps.el" (20355 10320)) ;;; Generated autoloads from progmodes/ebnf2ps.el (autoload 'ebnf-customize "ebnf2ps" "\ @@ -7411,8 +7411,8 @@ See `ebnf-style-database' documentation. ;;;;;; ebrowse-tags-find-declaration-other-window ebrowse-tags-find-definition ;;;;;; ebrowse-tags-view-definition ebrowse-tags-find-declaration ;;;;;; ebrowse-tags-view-declaration ebrowse-member-mode ebrowse-electric-choose-tree -;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (20400 -;;;;;; 62402)) +;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/ebrowse.el (autoload 'ebrowse-tree-mode "ebrowse" "\ @@ -7561,7 +7561,7 @@ Display statistics for a class tree. ;;;*** ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from ebuff-menu.el (autoload 'electric-buffer-list "ebuff-menu" "\ @@ -7586,7 +7586,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry. ;;;*** ;;;### (autoloads (Electric-command-history-redo-expression) "echistory" -;;;;;; "echistory.el" (20352 65510)) +;;;;;; "echistory.el" (20355 10320)) ;;; Generated autoloads from echistory.el (autoload 'Electric-command-history-redo-expression "echistory" "\ @@ -7598,7 +7598,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** ;;;### (autoloads (ecomplete-setup) "ecomplete" "gnus/ecomplete.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/ecomplete.el (autoload 'ecomplete-setup "ecomplete" "\ @@ -7608,7 +7608,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** -;;;### (autoloads (global-ede-mode) "ede" "cedet/ede.el" (20352 65510)) +;;;### (autoloads (global-ede-mode) "ede" "cedet/ede.el" (20355 10320)) ;;; Generated autoloads from cedet/ede.el (defvar global-ede-mode nil "\ @@ -7635,7 +7635,7 @@ an EDE controlled project. ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" -;;;;;; "emacs-lisp/edebug.el" (20400 62402)) +;;;;;; "emacs-lisp/edebug.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -7708,7 +7708,7 @@ Toggle edebugging of all forms. ;;;;;; ediff-merge-directories-with-ancestor ediff-merge-directories ;;;;;; ediff-directories3 ediff-directory-revisions ediff-directories ;;;;;; ediff-buffers3 ediff-buffers ediff-backup ediff-current-file -;;;;;; ediff-files3 ediff-files) "ediff" "vc/ediff.el" (20400 62402)) +;;;;;; ediff-files3 ediff-files) "ediff" "vc/ediff.el" (20355 10320)) ;;; Generated autoloads from vc/ediff.el (autoload 'ediff-files "ediff" "\ @@ -7940,7 +7940,7 @@ With optional NODE, goes to that node. ;;;*** ;;;### (autoloads (ediff-customize) "ediff-help" "vc/ediff-help.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/ediff-help.el (autoload 'ediff-customize "ediff-help" "\ @@ -7951,7 +7951,7 @@ With optional NODE, goes to that node. ;;;*** ;;;### (autoloads (ediff-show-registry) "ediff-mult" "vc/ediff-mult.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/ediff-mult.el (autoload 'ediff-show-registry "ediff-mult" "\ @@ -7964,7 +7964,7 @@ Display Ediff's registry. ;;;*** ;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe) -;;;;;; "ediff-util" "vc/ediff-util.el" (20352 65510)) +;;;;;; "ediff-util" "vc/ediff-util.el" (20355 10320)) ;;; Generated autoloads from vc/ediff-util.el (autoload 'ediff-toggle-multiframe "ediff-util" "\ @@ -7985,7 +7985,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see. ;;;### (autoloads (format-kbd-macro read-kbd-macro edit-named-kbd-macro ;;;;;; edit-last-kbd-macro edit-kbd-macro) "edmacro" "edmacro.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from edmacro.el (autoload 'edit-kbd-macro "edmacro" "\ @@ -8034,7 +8034,7 @@ or nil, use a compact 80-column format. ;;;*** ;;;### (autoloads (edt-emulation-on edt-set-scroll-margins) "edt" -;;;;;; "emulation/edt.el" (20352 65510)) +;;;;;; "emulation/edt.el" (20355 10320)) ;;; Generated autoloads from emulation/edt.el (autoload 'edt-set-scroll-margins "edt" "\ @@ -8052,7 +8052,7 @@ Turn on EDT Emulation. ;;;*** ;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "ehelp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from ehelp.el (autoload 'with-electric-help "ehelp" "\ @@ -8089,7 +8089,7 @@ BUFFER is put back into its original major mode. ;;;*** ;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string) -;;;;;; "eldoc" "emacs-lisp/eldoc.el" (20352 65510)) +;;;;;; "eldoc" "emacs-lisp/eldoc.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/eldoc.el (defvar eldoc-minor-mode-string (purecopy " ElDoc") "\ @@ -8136,7 +8136,7 @@ Emacs Lisp mode) that support ElDoc.") ;;;*** ;;;### (autoloads (electric-layout-mode electric-pair-mode electric-indent-mode) -;;;;;; "electric" "electric.el" (20400 62402)) +;;;;;; "electric" "electric.el" (20355 10320)) ;;; Generated autoloads from electric.el (defvar electric-indent-chars '(10) "\ @@ -8206,8 +8206,8 @@ The variable `electric-layout-rules' says when and how to insert newlines. ;;;*** -;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from elide-head.el (autoload 'elide-head "elide-head" "\ @@ -8224,7 +8224,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks. ;;;### (autoloads (elint-initialize elint-defun elint-current-buffer ;;;;;; elint-directory elint-file) "elint" "emacs-lisp/elint.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/elint.el (autoload 'elint-file "elint" "\ @@ -8260,8 +8260,8 @@ optional prefix argument REINIT is non-nil. ;;;*** ;;;### (autoloads (elp-results elp-instrument-package elp-instrument-list -;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (20352 -;;;;;; 65510)) +;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/elp.el (autoload 'elp-instrument-function "elp" "\ @@ -8296,7 +8296,7 @@ displayed. ;;;*** ;;;### (autoloads (emacs-lock-mode) "emacs-lock" "emacs-lock.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lock.el (autoload 'emacs-lock-mode "emacs-lock" "\ @@ -8324,7 +8324,7 @@ Other values are interpreted as usual. ;;;*** ;;;### (autoloads (report-emacs-bug-query-existing-bugs report-emacs-bug) -;;;;;; "emacsbug" "mail/emacsbug.el" (20400 62402)) +;;;;;; "emacsbug" "mail/emacsbug.el" (20355 10320)) ;;; Generated autoloads from mail/emacsbug.el (autoload 'report-emacs-bug "emacsbug" "\ @@ -8345,7 +8345,7 @@ The result is an alist with items of the form (URL SUBJECT NO). ;;;;;; emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote ;;;;;; emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor ;;;;;; emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" -;;;;;; "vc/emerge.el" (20400 62402)) +;;;;;; "vc/emerge.el" (20355 10320)) ;;; Generated autoloads from vc/emerge.el (autoload 'emerge-files "emerge" "\ @@ -8406,7 +8406,7 @@ Emerge two RCS revisions of a file, with another revision as ancestor. ;;;*** ;;;### (autoloads (enriched-decode enriched-encode enriched-mode) -;;;;;; "enriched" "textmodes/enriched.el" (20461 49352)) +;;;;;; "enriched" "textmodes/enriched.el" (20454 63285)) ;;; Generated autoloads from textmodes/enriched.el (autoload 'enriched-mode "enriched" "\ @@ -8446,8 +8446,8 @@ Commands: ;;;;;; epa-sign-region epa-verify-cleartext-in-region epa-verify-region ;;;;;; epa-decrypt-armor-in-region epa-decrypt-region epa-encrypt-file ;;;;;; epa-sign-file epa-verify-file epa-decrypt-file epa-select-keys -;;;;;; epa-list-secret-keys epa-list-keys) "epa" "epa.el" (20400 -;;;;;; 62402)) +;;;;;; epa-list-secret-keys epa-list-keys) "epa" "epa.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from epa.el (autoload 'epa-list-keys "epa" "\ @@ -8625,7 +8625,7 @@ Insert selected KEYS after the point. ;;;*** ;;;### (autoloads (epa-dired-do-encrypt epa-dired-do-sign epa-dired-do-verify -;;;;;; epa-dired-do-decrypt) "epa-dired" "epa-dired.el" (20352 65510)) +;;;;;; epa-dired-do-decrypt) "epa-dired" "epa-dired.el" (20355 10320)) ;;; Generated autoloads from epa-dired.el (autoload 'epa-dired-do-decrypt "epa-dired" "\ @@ -8651,7 +8651,7 @@ Encrypt marked files. ;;;*** ;;;### (autoloads (epa-file-disable epa-file-enable epa-file-handler) -;;;;;; "epa-file" "epa-file.el" (20352 65510)) +;;;;;; "epa-file" "epa-file.el" (20355 10320)) ;;; Generated autoloads from epa-file.el (autoload 'epa-file-handler "epa-file" "\ @@ -8673,7 +8673,7 @@ Encrypt marked files. ;;;### (autoloads (epa-global-mail-mode epa-mail-import-keys epa-mail-encrypt ;;;;;; epa-mail-sign epa-mail-verify epa-mail-decrypt epa-mail-mode) -;;;;;; "epa-mail" "epa-mail.el" (20352 65510)) +;;;;;; "epa-mail" "epa-mail.el" (20355 10320)) ;;; Generated autoloads from epa-mail.el (autoload 'epa-mail-mode "epa-mail" "\ @@ -8743,7 +8743,7 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads (epg-make-context) "epg" "epg.el" (20352 65510)) +;;;### (autoloads (epg-make-context) "epg" "epg.el" (20355 10320)) ;;; Generated autoloads from epg.el (autoload 'epg-make-context "epg" "\ @@ -8754,7 +8754,7 @@ Return a context object. ;;;*** ;;;### (autoloads (epg-expand-group epg-check-configuration epg-configuration) -;;;;;; "epg-config" "epg-config.el" (20400 62402)) +;;;;;; "epg-config" "epg-config.el" (20355 10320)) ;;; Generated autoloads from epg-config.el (autoload 'epg-configuration "epg-config" "\ @@ -8775,7 +8775,7 @@ Look at CONFIG and try to expand GROUP. ;;;*** ;;;### (autoloads (erc-handle-irc-url erc-tls erc erc-select-read-args) -;;;;;; "erc" "erc/erc.el" (20400 62402)) +;;;;;; "erc" "erc/erc.el" (20355 10320)) ;;; Generated autoloads from erc/erc.el (autoload 'erc-select-read-args "erc" "\ @@ -8823,33 +8823,33 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. ;;;*** -;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (20400 -;;;;;; 62402)) +;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from erc/erc-autoaway.el (autoload 'erc-autoaway-mode "erc-autoaway") ;;;*** -;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20400 62402)) +;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20355 10320)) ;;; Generated autoloads from erc/erc-button.el (autoload 'erc-button-mode "erc-button" nil t) ;;;*** -;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (20352 65510)) +;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (20355 10320)) ;;; Generated autoloads from erc/erc-capab.el (autoload 'erc-capab-identify-mode "erc-capab" nil t) ;;;*** -;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (20352 65510)) +;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (20355 10320)) ;;; Generated autoloads from erc/erc-compat.el (autoload 'erc-define-minor-mode "erc-compat") ;;;*** ;;;### (autoloads (erc-ctcp-query-DCC pcomplete/erc-mode/DCC erc-cmd-DCC) -;;;;;; "erc-dcc" "erc/erc-dcc.el" (20400 62402)) +;;;;;; "erc-dcc" "erc/erc-dcc.el" (20355 10320)) ;;; Generated autoloads from erc/erc-dcc.el (autoload 'erc-dcc-mode "erc-dcc") @@ -8882,7 +8882,7 @@ that subcommand. ;;;;;; erc-ezb-add-session erc-ezb-end-of-session-list erc-ezb-init-session-list ;;;;;; erc-ezb-identify erc-ezb-notice-autodetect erc-ezb-lookup-action ;;;;;; erc-ezb-get-login erc-cmd-ezb) "erc-ezbounce" "erc/erc-ezbounce.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-ezbounce.el (autoload 'erc-cmd-ezb "erc-ezbounce" "\ @@ -8944,8 +8944,8 @@ Add EZBouncer convenience functions to ERC. ;;;*** -;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from erc/erc-fill.el (autoload 'erc-fill-mode "erc-fill" nil t) @@ -8958,7 +8958,7 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'. ;;;*** ;;;### (autoloads (erc-identd-stop erc-identd-start) "erc-identd" -;;;;;; "erc/erc-identd.el" (20352 65510)) +;;;;;; "erc/erc-identd.el" (20355 10320)) ;;; Generated autoloads from erc/erc-identd.el (autoload 'erc-identd-mode "erc-identd") @@ -8980,7 +8980,7 @@ system. ;;;*** ;;;### (autoloads (erc-create-imenu-index) "erc-imenu" "erc/erc-imenu.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-imenu.el (autoload 'erc-create-imenu-index "erc-imenu" "\ @@ -8990,20 +8990,20 @@ system. ;;;*** -;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20400 62402)) +;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20355 10320)) ;;; Generated autoloads from erc/erc-join.el (autoload 'erc-autojoin-mode "erc-join" nil t) ;;;*** -;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20352 65510)) +;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20355 10320)) ;;; Generated autoloads from erc/erc-list.el (autoload 'erc-list-mode "erc-list") ;;;*** ;;;### (autoloads (erc-save-buffer-in-logs erc-logging-enabled) "erc-log" -;;;;;; "erc/erc-log.el" (20400 62402)) +;;;;;; "erc/erc-log.el" (20355 10320)) ;;; Generated autoloads from erc/erc-log.el (autoload 'erc-log-mode "erc-log" nil t) @@ -9035,7 +9035,7 @@ You can save every individual message by putting this function on ;;;### (autoloads (erc-delete-dangerous-host erc-add-dangerous-host ;;;;;; erc-delete-keyword erc-add-keyword erc-delete-fool erc-add-fool ;;;;;; erc-delete-pal erc-add-pal) "erc-match" "erc/erc-match.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-match.el (autoload 'erc-match-mode "erc-match") @@ -9081,14 +9081,14 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'. ;;;*** -;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (20352 65510)) +;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (20355 10320)) ;;; Generated autoloads from erc/erc-menu.el (autoload 'erc-menu-mode "erc-menu" nil t) ;;;*** ;;;### (autoloads (erc-cmd-WHOLEFT) "erc-netsplit" "erc/erc-netsplit.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-netsplit.el (autoload 'erc-netsplit-mode "erc-netsplit") @@ -9100,7 +9100,7 @@ Show who's gone. ;;;*** ;;;### (autoloads (erc-server-select erc-determine-network) "erc-networks" -;;;;;; "erc/erc-networks.el" (20352 65510)) +;;;;;; "erc/erc-networks.el" (20355 10320)) ;;; Generated autoloads from erc/erc-networks.el (autoload 'erc-determine-network "erc-networks" "\ @@ -9118,7 +9118,7 @@ Interactively select a server to connect to using `erc-server-alist'. ;;;*** ;;;### (autoloads (pcomplete/erc-mode/NOTIFY erc-cmd-NOTIFY) "erc-notify" -;;;;;; "erc/erc-notify.el" (20400 62402)) +;;;;;; "erc/erc-notify.el" (20355 10320)) ;;; Generated autoloads from erc/erc-notify.el (autoload 'erc-notify-mode "erc-notify" nil t) @@ -9136,33 +9136,33 @@ with args, toggle notify status of people. ;;;*** -;;;### (autoloads nil "erc-page" "erc/erc-page.el" (20352 65510)) +;;;### (autoloads nil "erc-page" "erc/erc-page.el" (20355 10320)) ;;; Generated autoloads from erc/erc-page.el (autoload 'erc-page-mode "erc-page") ;;;*** -;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (20400 -;;;;;; 62402)) +;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from erc/erc-pcomplete.el (autoload 'erc-completion-mode "erc-pcomplete" nil t) ;;;*** -;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (20352 65510)) +;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (20355 10320)) ;;; Generated autoloads from erc/erc-replace.el (autoload 'erc-replace-mode "erc-replace") ;;;*** -;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (20352 65510)) +;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (20355 10320)) ;;; Generated autoloads from erc/erc-ring.el (autoload 'erc-ring-mode "erc-ring" nil t) ;;;*** ;;;### (autoloads (erc-nickserv-identify erc-nickserv-identify-mode) -;;;;;; "erc-services" "erc/erc-services.el" (20400 62402)) +;;;;;; "erc-services" "erc/erc-services.el" (20355 10320)) ;;; Generated autoloads from erc/erc-services.el (autoload 'erc-services-mode "erc-services" nil t) @@ -9179,14 +9179,14 @@ When called interactively, read the password using `read-passwd'. ;;;*** -;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (20400 62402)) +;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (20355 10320)) ;;; Generated autoloads from erc/erc-sound.el (autoload 'erc-sound-mode "erc-sound") ;;;*** ;;;### (autoloads (erc-speedbar-browser) "erc-speedbar" "erc/erc-speedbar.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-speedbar.el (autoload 'erc-speedbar-browser "erc-speedbar" "\ @@ -9197,21 +9197,21 @@ This will add a speedbar major display mode. ;;;*** -;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (20352 -;;;;;; 65510)) +;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from erc/erc-spelling.el (autoload 'erc-spelling-mode "erc-spelling" nil t) ;;;*** -;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (20400 62402)) +;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (20355 10320)) ;;; Generated autoloads from erc/erc-stamp.el (autoload 'erc-timestamp-mode "erc-stamp" nil t) ;;;*** ;;;### (autoloads (erc-track-minor-mode) "erc-track" "erc/erc-track.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-track.el (defvar erc-track-minor-mode nil "\ @@ -9237,7 +9237,7 @@ keybindings will not do anything useful. ;;;*** ;;;### (autoloads (erc-truncate-buffer erc-truncate-buffer-to-size) -;;;;;; "erc-truncate" "erc/erc-truncate.el" (20400 62402)) +;;;;;; "erc-truncate" "erc/erc-truncate.el" (20355 10320)) ;;; Generated autoloads from erc/erc-truncate.el (autoload 'erc-truncate-mode "erc-truncate" nil t) @@ -9257,7 +9257,7 @@ Meant to be used in hooks, like `erc-insert-post-hook'. ;;;*** ;;;### (autoloads (erc-xdcc-add-file) "erc-xdcc" "erc/erc-xdcc.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from erc/erc-xdcc.el (autoload 'erc-xdcc-mode "erc-xdcc") @@ -9270,7 +9270,7 @@ Add a file to `erc-xdcc-files'. ;;;### (autoloads (ert-describe-test ert-run-tests-interactively ;;;;;; ert-run-tests-batch-and-exit ert-run-tests-batch ert-deftest) -;;;;;; "ert" "emacs-lisp/ert.el" (20400 62402)) +;;;;;; "ert" "emacs-lisp/ert.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/ert.el (autoload 'ert-deftest "ert" "\ @@ -9340,7 +9340,7 @@ Display the documentation for TEST-OR-TEST-NAME (a symbol or ert-test). ;;;*** ;;;### (autoloads (ert-kill-all-test-buffers) "ert-x" "emacs-lisp/ert-x.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/ert-x.el (put 'ert-with-test-buffer 'lisp-indent-function 1) @@ -9352,8 +9352,8 @@ Kill all test buffers that are still live. ;;;*** -;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from eshell/esh-mode.el (autoload 'eshell-mode "esh-mode" "\ @@ -9366,7 +9366,7 @@ Emacs shell interactive mode. ;;;*** ;;;### (autoloads (eshell-command-result eshell-command eshell) "eshell" -;;;;;; "eshell/eshell.el" (20400 62402)) +;;;;;; "eshell/eshell.el" (20355 10320)) ;;; Generated autoloads from eshell/eshell.el (autoload 'eshell "eshell" "\ @@ -9407,7 +9407,7 @@ corresponding to a successful execution. ;;;;;; visit-tags-table tags-table-mode find-tag-default-function ;;;;;; find-tag-hook tags-add-tables tags-compression-info-list ;;;;;; tags-table-list tags-case-fold-search) "etags" "progmodes/etags.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/etags.el (defvar tags-file-name nil "\ @@ -9725,7 +9725,7 @@ for \\[find-tag] (which see). ;;;;;; ethio-fidel-to-sera-marker ethio-fidel-to-sera-region ethio-fidel-to-sera-buffer ;;;;;; ethio-sera-to-fidel-marker ethio-sera-to-fidel-region ethio-sera-to-fidel-buffer ;;;;;; setup-ethiopic-environment-internal) "ethio-util" "language/ethio-util.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from language/ethio-util.el (autoload 'setup-ethiopic-environment-internal "ethio-util" "\ @@ -9895,7 +9895,7 @@ With ARG, insert that many delimiters. ;;;### (autoloads (eudc-load-eudc eudc-query-form eudc-expand-inline ;;;;;; eudc-get-phone eudc-get-email eudc-set-server) "eudc" "net/eudc.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/eudc.el (autoload 'eudc-set-server "eudc" "\ @@ -9951,7 +9951,7 @@ This does nothing except loading eudc by autoload side-effect. ;;;### (autoloads (eudc-display-jpeg-as-button eudc-display-jpeg-inline ;;;;;; eudc-display-sound eudc-display-mail eudc-display-url eudc-display-generic-binary) -;;;;;; "eudc-bob" "net/eudc-bob.el" (20352 65510)) +;;;;;; "eudc-bob" "net/eudc-bob.el" (20355 10320)) ;;; Generated autoloads from net/eudc-bob.el (autoload 'eudc-display-generic-binary "eudc-bob" "\ @@ -9987,7 +9987,7 @@ Display a button for the JPEG DATA. ;;;*** ;;;### (autoloads (eudc-try-bbdb-insert eudc-insert-record-at-point-into-bbdb) -;;;;;; "eudc-export" "net/eudc-export.el" (20352 65510)) +;;;;;; "eudc-export" "net/eudc-export.el" (20355 10320)) ;;; Generated autoloads from net/eudc-export.el (autoload 'eudc-insert-record-at-point-into-bbdb "eudc-export" "\ @@ -10004,7 +10004,7 @@ Call `eudc-insert-record-at-point-into-bbdb' if on a record. ;;;*** ;;;### (autoloads (eudc-edit-hotlist) "eudc-hotlist" "net/eudc-hotlist.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/eudc-hotlist.el (autoload 'eudc-edit-hotlist "eudc-hotlist" "\ @@ -10014,8 +10014,8 @@ Edit the hotlist of directory servers in a specialized buffer. ;;;*** -;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/ewoc.el (autoload 'ewoc-create "ewoc" "\ @@ -10044,7 +10044,7 @@ fourth arg NOSEP non-nil inhibits this. ;;;### (autoloads (executable-make-buffer-file-executable-if-script-p ;;;;;; executable-self-display executable-set-magic executable-interpret ;;;;;; executable-command-find-posix-p) "executable" "progmodes/executable.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/executable.el (autoload 'executable-command-find-posix-p "executable" "\ @@ -10087,7 +10087,7 @@ file modes. ;;;### (autoloads (expand-jump-to-next-slot expand-jump-to-previous-slot ;;;;;; expand-abbrev-hook expand-add-abbrevs) "expand" "expand.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from expand.el (autoload 'expand-add-abbrevs "expand" "\ @@ -10136,7 +10136,7 @@ This is used only in conjunction with `expand-add-abbrevs'. ;;;*** -;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (20461 49352)) +;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (20451 30311)) ;;; Generated autoloads from progmodes/f90.el (autoload 'f90-mode "f90" "\ @@ -10206,8 +10206,8 @@ with no args, if that value is non-nil. ;;;### (autoloads (variable-pitch-mode buffer-face-toggle buffer-face-set ;;;;;; buffer-face-mode text-scale-adjust text-scale-decrease text-scale-increase ;;;;;; text-scale-set face-remap-set-base face-remap-reset-base -;;;;;; face-remap-add-relative) "face-remap" "face-remap.el" (20400 -;;;;;; 62402)) +;;;;;; face-remap-add-relative) "face-remap" "face-remap.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from face-remap.el (autoload 'face-remap-add-relative "face-remap" "\ @@ -10355,7 +10355,7 @@ Besides the choice of face, it is the same as `buffer-face-mode'. ;;;### (autoloads (feedmail-queue-reminder feedmail-run-the-queue ;;;;;; feedmail-run-the-queue-global-prompt feedmail-run-the-queue-no-prompts -;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (20400 62402)) +;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (20355 10320)) ;;; Generated autoloads from mail/feedmail.el (autoload 'feedmail-send-it "feedmail" "\ @@ -10409,7 +10409,7 @@ you can set `feedmail-queue-reminder-alist' to nil. ;;;*** ;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu -;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (20400 62402)) +;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (20355 10320)) ;;; Generated autoloads from ffap.el (autoload 'ffap-next "ffap" "\ @@ -10473,7 +10473,7 @@ Evaluate the forms in variable `ffap-bindings'. ;;;### (autoloads (file-cache-minibuffer-complete file-cache-add-directory-recursively ;;;;;; file-cache-add-directory-using-locate file-cache-add-directory-using-find ;;;;;; file-cache-add-file file-cache-add-directory-list file-cache-add-directory) -;;;;;; "filecache" "filecache.el" (20352 65510)) +;;;;;; "filecache" "filecache.el" (20355 10320)) ;;; Generated autoloads from filecache.el (autoload 'file-cache-add-directory "filecache" "\ @@ -10533,7 +10533,7 @@ the name is considered already unique; only the second substitution ;;;;;; copy-file-locals-to-dir-locals delete-dir-local-variable ;;;;;; add-dir-local-variable delete-file-local-variable-prop-line ;;;;;; add-file-local-variable-prop-line delete-file-local-variable -;;;;;; add-file-local-variable) "files-x" "files-x.el" (20400 62402)) +;;;;;; add-file-local-variable) "files-x" "files-x.el" (20355 10320)) ;;; Generated autoloads from files-x.el (autoload 'add-file-local-variable "files-x" "\ @@ -10598,8 +10598,8 @@ Copy directory-local variables to the -*- line. ;;;*** -;;;### (autoloads (filesets-init) "filesets" "filesets.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (filesets-init) "filesets" "filesets.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from filesets.el (autoload 'filesets-init "filesets" "\ @@ -10610,7 +10610,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu. ;;;*** -;;;### (autoloads (find-cmd) "find-cmd" "find-cmd.el" (20352 65510)) +;;;### (autoloads (find-cmd) "find-cmd" "find-cmd.el" (20355 10320)) ;;; Generated autoloads from find-cmd.el (autoload 'find-cmd "find-cmd" "\ @@ -10630,7 +10630,7 @@ result is a string that should be ready for the command line. ;;;*** ;;;### (autoloads (find-grep-dired find-name-dired find-dired) "find-dired" -;;;;;; "find-dired.el" (20352 65510)) +;;;;;; "find-dired.el" (20355 10320)) ;;; Generated autoloads from find-dired.el (autoload 'find-dired "find-dired" "\ @@ -10670,7 +10670,7 @@ use in place of \"-ls\" as the final argument. ;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file ;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from find-file.el (defvar ff-special-constructs `((,(purecopy "^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") lambda nil (buffer-substring (match-beginning 2) (match-end 2)))) "\ @@ -10764,7 +10764,7 @@ Visit the file you click on in another window. ;;;;;; find-variable find-variable-noselect find-function-other-frame ;;;;;; find-function-other-window find-function find-function-noselect ;;;;;; find-function-search-for-symbol find-library) "find-func" -;;;;;; "emacs-lisp/find-func.el" (20352 65510)) +;;;;;; "emacs-lisp/find-func.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/find-func.el (autoload 'find-library "find-func" "\ @@ -10923,7 +10923,7 @@ Define some key bindings for the find-function family of functions. ;;;*** ;;;### (autoloads (find-lisp-find-dired-filter find-lisp-find-dired-subdirectories -;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (20352 65510)) +;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (20355 10320)) ;;; Generated autoloads from find-lisp.el (autoload 'find-lisp-find-dired "find-lisp" "\ @@ -10944,7 +10944,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP. ;;;*** ;;;### (autoloads (finder-by-keyword finder-commentary finder-list-keywords) -;;;;;; "finder" "finder.el" (20352 65510)) +;;;;;; "finder" "finder.el" (20355 10320)) ;;; Generated autoloads from finder.el (autoload 'finder-list-keywords "finder" "\ @@ -10966,7 +10966,7 @@ Find packages matching a given keyword. ;;;*** ;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" -;;;;;; "flow-ctrl.el" (20352 65510)) +;;;;;; "flow-ctrl.el" (20355 10320)) ;;; Generated autoloads from flow-ctrl.el (autoload 'enable-flow-control "flow-ctrl" "\ @@ -10988,7 +10988,7 @@ to get the effect of a C-q. ;;;*** ;;;### (autoloads (fill-flowed fill-flowed-encode) "flow-fill" "gnus/flow-fill.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/flow-fill.el (autoload 'fill-flowed-encode "flow-fill" "\ @@ -11004,7 +11004,7 @@ to get the effect of a C-q. ;;;*** ;;;### (autoloads (flymake-find-file-hook flymake-mode-off flymake-mode-on -;;;;;; flymake-mode) "flymake" "progmodes/flymake.el" (20400 62402)) +;;;;;; flymake-mode) "flymake" "progmodes/flymake.el" (20544 40251)) ;;; Generated autoloads from progmodes/flymake.el (autoload 'flymake-mode "flymake" "\ @@ -11034,7 +11034,7 @@ Turn flymake mode off. ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off ;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode) -;;;;;; "flyspell" "textmodes/flyspell.el" (20400 62402)) +;;;;;; "flyspell" "textmodes/flyspell.el" (20355 10320)) ;;; Generated autoloads from textmodes/flyspell.el (autoload 'flyspell-prog-mode "flyspell" "\ @@ -11106,7 +11106,7 @@ Flyspell whole buffer. ;;;### (autoloads (follow-delete-other-windows-and-split follow-mode ;;;;;; turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from follow.el (autoload 'turn-on-follow-mode "follow" "\ @@ -11182,8 +11182,8 @@ in your `~/.emacs' file, replacing [f7] by your favorite key: ;;;*** -;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from mail/footnote.el (autoload 'footnote-mode "footnote" "\ @@ -11202,7 +11202,7 @@ play around with the following keys: ;;;*** ;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) -;;;;;; "forms" "forms.el" (20400 62402)) +;;;;;; "forms" "forms.el" (20355 10320)) ;;; Generated autoloads from forms.el (autoload 'forms-mode "forms" "\ @@ -11239,7 +11239,7 @@ Visit a file in Forms mode in other window. ;;;*** ;;;### (autoloads (fortran-mode) "fortran" "progmodes/fortran.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/fortran.el (autoload 'fortran-mode "fortran" "\ @@ -11317,7 +11317,7 @@ with no args, if that value is non-nil. ;;;*** ;;;### (autoloads (fortune fortune-to-signature fortune-compile fortune-from-region -;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (20352 65510)) +;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (20355 10320)) ;;; Generated autoloads from play/fortune.el (autoload 'fortune-add-fortune "fortune" "\ @@ -11366,7 +11366,7 @@ and choose the directory as the fortune-file. ;;;*** ;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el" -;;;;;; (20500 124)) +;;;;;; (20501 7101)) ;;; Generated autoloads from progmodes/gdb-mi.el (defvar gdb-enable-debug nil "\ @@ -11433,8 +11433,8 @@ detailed description of this mode. ;;;*** ;;;### (autoloads (generic-make-keywords-list generic-mode generic-mode-internal -;;;;;; define-generic-mode) "generic" "emacs-lisp/generic.el" (20400 -;;;;;; 62402)) +;;;;;; define-generic-mode) "generic" "emacs-lisp/generic.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/generic.el (defvar generic-mode-list nil "\ @@ -11511,7 +11511,7 @@ regular expression that can be used as an element of ;;;*** ;;;### (autoloads (glasses-mode) "glasses" "progmodes/glasses.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/glasses.el (autoload 'glasses-mode "glasses" "\ @@ -11527,7 +11527,7 @@ add virtual separators (like underscores) at places they belong to. ;;;### (autoloads (gmm-tool-bar-from-list gmm-widget-p gmm-error ;;;;;; gmm-message gmm-regexp-concat) "gmm-utils" "gnus/gmm-utils.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gmm-utils.el (autoload 'gmm-regexp-concat "gmm-utils" "\ @@ -11582,7 +11582,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST. ;;;*** ;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server -;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (20370 31722)) +;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (20370 38715)) ;;; Generated autoloads from gnus/gnus.el (when (fboundp 'custom-autoload) (custom-autoload 'gnus-select-method "gnus")) @@ -11635,7 +11635,7 @@ prompt the user for the name of an NNTP server to use. ;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group ;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize ;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent" -;;;;;; "gnus/gnus-agent.el" (20352 65510)) +;;;;;; "gnus/gnus-agent.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-agent.el (autoload 'gnus-unplugged "gnus-agent" "\ @@ -11726,7 +11726,7 @@ If CLEAN, obsolete (ignore). ;;;*** ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" -;;;;;; (20358 29669)) +;;;;;; (20358 10456)) ;;; Generated autoloads from gnus/gnus-art.el (autoload 'gnus-article-prepare-display "gnus-art" "\ @@ -11737,7 +11737,7 @@ Make the current buffer look like a nice article. ;;;*** ;;;### (autoloads (gnus-bookmark-bmenu-list gnus-bookmark-jump gnus-bookmark-set) -;;;;;; "gnus-bookmark" "gnus/gnus-bookmark.el" (20352 65510)) +;;;;;; "gnus-bookmark" "gnus/gnus-bookmark.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-bookmark.el (autoload 'gnus-bookmark-set "gnus-bookmark" "\ @@ -11762,8 +11762,8 @@ deletion, or > if it is flagged for displaying. ;;;### (autoloads (gnus-cache-delete-group gnus-cache-rename-group ;;;;;; gnus-cache-generate-nov-databases gnus-cache-generate-active -;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (20352 -;;;;;; 65510)) +;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/gnus-cache.el (autoload 'gnus-jog-cache "gnus-cache" "\ @@ -11805,7 +11805,7 @@ supported. ;;;*** ;;;### (autoloads (gnus-delay-initialize gnus-delay-send-queue gnus-delay-article) -;;;;;; "gnus-delay" "gnus/gnus-delay.el" (20352 65510)) +;;;;;; "gnus-delay" "gnus/gnus-delay.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-delay.el (autoload 'gnus-delay-article "gnus-delay" "\ @@ -11841,7 +11841,7 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil. ;;;*** ;;;### (autoloads (gnus-user-format-function-D gnus-user-format-function-d) -;;;;;; "gnus-diary" "gnus/gnus-diary.el" (20352 65510)) +;;;;;; "gnus-diary" "gnus/gnus-diary.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-diary.el (autoload 'gnus-user-format-function-d "gnus-diary" "\ @@ -11857,7 +11857,7 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil. ;;;*** ;;;### (autoloads (turn-on-gnus-dired-mode) "gnus-dired" "gnus/gnus-dired.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-dired.el (autoload 'turn-on-gnus-dired-mode "gnus-dired" "\ @@ -11868,7 +11868,7 @@ Convenience method to turn on gnus-dired-mode. ;;;*** ;;;### (autoloads (gnus-draft-reminder) "gnus-draft" "gnus/gnus-draft.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-draft.el (autoload 'gnus-draft-reminder "gnus-draft" "\ @@ -11880,8 +11880,8 @@ Reminder user if there are unsent drafts. ;;;### (autoloads (gnus-convert-png-to-face gnus-convert-face-to-png ;;;;;; gnus-face-from-file gnus-x-face-from-file gnus-insert-random-x-face-header -;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (20352 -;;;;;; 65510)) +;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/gnus-fun.el (autoload 'gnus-random-x-face "gnus-fun" "\ @@ -11926,7 +11926,7 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to ;;;*** ;;;### (autoloads (gnus-treat-mail-gravatar gnus-treat-from-gravatar) -;;;;;; "gnus-gravatar" "gnus/gnus-gravatar.el" (20352 65510)) +;;;;;; "gnus-gravatar" "gnus/gnus-gravatar.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-gravatar.el (autoload 'gnus-treat-from-gravatar "gnus-gravatar" "\ @@ -11944,7 +11944,7 @@ If gravatars are already displayed, remove them. ;;;*** ;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group) -;;;;;; "gnus-group" "gnus/gnus-group.el" (20352 65510)) +;;;;;; "gnus-group" "gnus/gnus-group.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-group.el (autoload 'gnus-fetch-group "gnus-group" "\ @@ -11962,7 +11962,7 @@ Pop up a frame and enter GROUP. ;;;*** ;;;### (autoloads (gnus-html-prefetch-images gnus-article-html) "gnus-html" -;;;;;; "gnus/gnus-html.el" (20352 65510)) +;;;;;; "gnus/gnus-html.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-html.el (autoload 'gnus-article-html "gnus-html" "\ @@ -11978,7 +11978,7 @@ Pop up a frame and enter GROUP. ;;;*** ;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-kill.el (defalias 'gnus-batch-kill 'gnus-batch-score) @@ -11993,7 +11993,7 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score ;;;### (autoloads (gnus-mailing-list-mode gnus-mailing-list-insinuate ;;;;;; turn-on-gnus-mailing-list-mode) "gnus-ml" "gnus/gnus-ml.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-ml.el (autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" "\ @@ -12018,7 +12018,7 @@ Minor mode for providing mailing-list commands. ;;;### (autoloads (gnus-group-split-fancy gnus-group-split gnus-group-split-update ;;;;;; gnus-group-split-setup) "gnus-mlspl" "gnus/gnus-mlspl.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-mlspl.el (autoload 'gnus-group-split-setup "gnus-mlspl" "\ @@ -12119,7 +12119,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: ;;;*** ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) -;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20420 42151)) +;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20411 30131)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload 'gnus-msg-mail "gnus-msg" "\ @@ -12147,7 +12147,7 @@ Like `message-reply'. ;;;### (autoloads (gnus-treat-newsgroups-picon gnus-treat-mail-picon ;;;;;; gnus-treat-from-picon) "gnus-picon" "gnus/gnus-picon.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-picon.el (autoload 'gnus-treat-from-picon "gnus-picon" "\ @@ -12174,7 +12174,7 @@ If picons are already displayed, remove them. ;;;;;; gnus-sorted-nintersection gnus-sorted-range-intersection ;;;;;; gnus-sorted-intersection gnus-intersection gnus-sorted-complement ;;;;;; gnus-sorted-ndifference gnus-sorted-difference) "gnus-range" -;;;;;; "gnus/gnus-range.el" (20352 65510)) +;;;;;; "gnus/gnus-range.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-range.el (autoload 'gnus-sorted-difference "gnus-range" "\ @@ -12242,7 +12242,7 @@ Add NUM into sorted LIST by side effect. ;;;*** ;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize) -;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20352 65510)) +;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-registry.el (autoload 'gnus-registry-initialize "gnus-registry" "\ @@ -12258,8 +12258,8 @@ Install the registry hooks. ;;;*** ;;;### (autoloads (gnus-sieve-article-add-rule gnus-sieve-generate -;;;;;; gnus-sieve-update) "gnus-sieve" "gnus/gnus-sieve.el" (20352 -;;;;;; 65510)) +;;;;;; gnus-sieve-update) "gnus-sieve" "gnus/gnus-sieve.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/gnus-sieve.el (autoload 'gnus-sieve-update "gnus-sieve" "\ @@ -12287,7 +12287,7 @@ See the documentation for these variables and functions for details. ;;;*** ;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-spec.el (autoload 'gnus-update-format "gnus-spec" "\ @@ -12298,7 +12298,7 @@ Update the format specification near point. ;;;*** ;;;### (autoloads (gnus-declare-backend) "gnus-start" "gnus/gnus-start.el" -;;;;;; (20358 29669)) +;;;;;; (20358 10456)) ;;; Generated autoloads from gnus/gnus-start.el (autoload 'gnus-declare-backend "gnus-start" "\ @@ -12309,7 +12309,7 @@ Declare back end NAME with ABILITIES as a Gnus back end. ;;;*** ;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-sum.el (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ @@ -12321,7 +12321,7 @@ BOOKMARK is a bookmark name or a bookmark record. ;;;*** ;;;### (autoloads (gnus-sync-install-hooks gnus-sync-initialize) -;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20352 65510)) +;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20355 10320)) ;;; Generated autoloads from gnus/gnus-sync.el (autoload 'gnus-sync-initialize "gnus-sync" "\ @@ -12337,7 +12337,7 @@ Install the sync hooks. ;;;*** ;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/gnus-win.el (autoload 'gnus-add-configuration "gnus-win" "\ @@ -12348,7 +12348,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'. ;;;*** ;;;### (autoloads (gnutls-min-prime-bits) "gnutls" "net/gnutls.el" -;;;;;; (20403 5511)) +;;;;;; (20403 36019)) ;;; Generated autoloads from net/gnutls.el (defvar gnutls-min-prime-bits 256 "\ @@ -12364,7 +12364,7 @@ A value of nil says to use the default GnuTLS value.") ;;;*** -;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20400 62402)) +;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20355 10320)) ;;; Generated autoloads from play/gomoku.el (autoload 'gomoku "gomoku" "\ @@ -12391,8 +12391,8 @@ Use \\[describe-mode] for more info. ;;;*** ;;;### (autoloads (goto-address-prog-mode goto-address-mode goto-address -;;;;;; goto-address-at-point) "goto-addr" "net/goto-addr.el" (20400 -;;;;;; 62402)) +;;;;;; goto-address-at-point) "goto-addr" "net/goto-addr.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from net/goto-addr.el (define-obsolete-function-alias 'goto-address-at-mouse 'goto-address-at-point "22.1") @@ -12434,7 +12434,7 @@ Like `goto-address-mode', but only for comments and strings. ;;;*** ;;;### (autoloads (gravatar-retrieve-synchronously gravatar-retrieve) -;;;;;; "gravatar" "gnus/gravatar.el" (20352 65510)) +;;;;;; "gravatar" "gnus/gravatar.el" (20355 10320)) ;;; Generated autoloads from gnus/gravatar.el (autoload 'gravatar-retrieve "gravatar" "\ @@ -12452,7 +12452,7 @@ Retrieve MAIL-ADDRESS gravatar and returns it. ;;;### (autoloads (zrgrep rgrep lgrep grep-find grep grep-mode grep-compute-defaults ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command -;;;;;; grep-window-height) "grep" "progmodes/grep.el" (20400 62402)) +;;;;;; grep-window-height) "grep" "progmodes/grep.el" (20366 41661)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@ -12615,7 +12615,7 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'. ;;;*** -;;;### (autoloads (gs-load-image) "gs" "gs.el" (20352 65510)) +;;;### (autoloads (gs-load-image) "gs" "gs.el" (20355 10320)) ;;; Generated autoloads from gs.el (autoload 'gs-load-image "gs" "\ @@ -12629,7 +12629,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** ;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb -;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20400 62402)) +;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20355 10320)) ;;; Generated autoloads from progmodes/gud.el (autoload 'gud-gdb "gud" "\ @@ -12717,8 +12717,8 @@ it if ARG is omitted or nil. ;;;*** -;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from play/handwrite.el (autoload 'handwrite "handwrite" "\ @@ -12736,7 +12736,7 @@ Variables: `handwrite-linespace' (default 12) ;;;*** ;;;### (autoloads (hanoi-unix-64 hanoi-unix hanoi) "hanoi" "play/hanoi.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from play/hanoi.el (autoload 'hanoi "hanoi" "\ @@ -12765,7 +12765,7 @@ to be updated. ;;;### (autoloads (mail-check-payment mail-add-payment-async mail-add-payment ;;;;;; hashcash-verify-payment hashcash-insert-payment-async hashcash-insert-payment) -;;;;;; "hashcash" "mail/hashcash.el" (20400 62402)) +;;;;;; "hashcash" "mail/hashcash.el" (20355 10320)) ;;; Generated autoloads from mail/hashcash.el (autoload 'hashcash-insert-payment "hashcash" "\ @@ -12810,7 +12810,7 @@ Prefix arg sets default accept amount temporarily. ;;;### (autoloads (scan-buf-previous-region scan-buf-next-region ;;;;;; scan-buf-move-to-region help-at-pt-display-when-idle help-at-pt-set-timer ;;;;;; help-at-pt-cancel-timer display-local-help help-at-pt-kbd-string -;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (20352 65510)) +;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (20355 10320)) ;;; Generated autoloads from help-at-pt.el (autoload 'help-at-pt-string "help-at-pt" "\ @@ -12940,7 +12940,7 @@ different regions. With numeric argument ARG, behaves like ;;;### (autoloads (doc-file-to-info doc-file-to-man describe-categories ;;;;;; describe-syntax describe-variable variable-at-point describe-function-1 ;;;;;; find-lisp-object-file-name help-C-file-name describe-function) -;;;;;; "help-fns" "help-fns.el" (20352 65510)) +;;;;;; "help-fns" "help-fns.el" (20355 10320)) ;;; Generated autoloads from help-fns.el (autoload 'describe-function "help-fns" "\ @@ -13020,7 +13020,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file. ;;;*** ;;;### (autoloads (three-step-help) "help-macro" "help-macro.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from help-macro.el (defvar three-step-help nil "\ @@ -13036,8 +13036,8 @@ gives the window that lists the options.") ;;;### (autoloads (help-xref-on-pp help-insert-xref-button help-xref-button ;;;;;; help-make-xrefs help-buffer help-setup-xref help-mode-finish -;;;;;; help-mode-setup help-mode) "help-mode" "help-mode.el" (20352 -;;;;;; 65510)) +;;;;;; help-mode-setup help-mode) "help-mode" "help-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from help-mode.el (autoload 'help-mode "help-mode" "\ @@ -13130,7 +13130,7 @@ Add xrefs for symbols in `pp's output between FROM and TO. ;;;*** ;;;### (autoloads (Helper-help Helper-describe-bindings) "helper" -;;;;;; "emacs-lisp/helper.el" (20352 65510)) +;;;;;; "emacs-lisp/helper.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/helper.el (autoload 'Helper-describe-bindings "helper" "\ @@ -13146,7 +13146,7 @@ Provide help for current mode. ;;;*** ;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" -;;;;;; "hexl.el" (20400 62402)) +;;;;;; "hexl.el" (20355 10320)) ;;; Generated autoloads from hexl.el (autoload 'hexl-mode "hexl" "\ @@ -13243,7 +13243,7 @@ This discards the buffer's undo information. ;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer ;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer ;;;;;; global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from hi-lock.el (autoload 'hi-lock-mode "hi-lock" "\ @@ -13382,7 +13382,7 @@ be found in variable `hi-lock-interactive-patterns'. ;;;*** ;;;### (autoloads (hide-ifdef-mode) "hideif" "progmodes/hideif.el" -;;;;;; (20352 65510)) +;;;;;; (20532 49081)) ;;; Generated autoloads from progmodes/hideif.el (autoload 'hide-ifdef-mode "hideif" "\ @@ -13426,7 +13426,7 @@ Several variables affect how the hiding is done: ;;;*** ;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el" -;;;;;; (20400 62402)) +;;;;;; (20531 28218)) ;;; Generated autoloads from progmodes/hideshow.el (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\ @@ -13492,8 +13492,8 @@ Unconditionally turn off `hs-minor-mode'. ;;;;;; highlight-compare-buffers highlight-changes-rotate-faces ;;;;;; highlight-changes-previous-change highlight-changes-next-change ;;;;;; highlight-changes-remove-highlight highlight-changes-visible-mode -;;;;;; highlight-changes-mode) "hilit-chg" "hilit-chg.el" (20352 -;;;;;; 65510)) +;;;;;; highlight-changes-mode) "hilit-chg" "hilit-chg.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from hilit-chg.el (autoload 'highlight-changes-mode "hilit-chg" "\ @@ -13628,7 +13628,7 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode. ;;;;;; hippie-expand-ignore-buffers hippie-expand-max-buffers hippie-expand-no-restriction ;;;;;; hippie-expand-dabbrev-as-symbol hippie-expand-dabbrev-skip-space ;;;;;; hippie-expand-verbose hippie-expand-try-functions-list) "hippie-exp" -;;;;;; "hippie-exp.el" (20352 65510)) +;;;;;; "hippie-exp.el" (20355 10320)) ;;; Generated autoloads from hippie-exp.el (defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\ @@ -13701,7 +13701,7 @@ argument VERBOSE non-nil makes the function verbose. ;;;*** ;;;### (autoloads (global-hl-line-mode hl-line-mode) "hl-line" "hl-line.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from hl-line.el (autoload 'hl-line-mode "hl-line" "\ @@ -13754,7 +13754,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and ;;;;;; holiday-bahai-holidays holiday-islamic-holidays holiday-christian-holidays ;;;;;; holiday-hebrew-holidays holiday-other-holidays holiday-local-holidays ;;;;;; holiday-oriental-holidays holiday-general-holidays) "holidays" -;;;;;; "calendar/holidays.el" (20400 62402)) +;;;;;; "calendar/holidays.el" (20542 48904)) ;;; Generated autoloads from calendar/holidays.el (define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1") @@ -13829,7 +13829,7 @@ See the documentation for `calendar-holidays' for details.") (define-obsolete-variable-alias 'christian-holidays 'holiday-christian-holidays "23.1") -(defvar holiday-christian-holidays (mapcar 'purecopy '((holiday-easter-etc) (holiday-fixed 12 25 "Christmas") (if calendar-christian-all-holidays-flag (append (holiday-fixed 1 6 "Epiphany") (holiday-julian 12 25 "Eastern Orthodox Christmas") (holiday-greek-orthodox-easter) (holiday-fixed 8 15 "Assumption") (holiday-advent 0 "Advent"))))) "\ +(defvar holiday-christian-holidays (mapcar 'purecopy '((holiday-easter-etc) (holiday-fixed 12 25 "Christmas") (if calendar-christian-all-holidays-flag (append (holiday-fixed 1 6 "Epiphany") (holiday-julian 12 25 "Christmas (Julian calendar)") (holiday-greek-orthodox-easter) (holiday-fixed 8 15 "Assumption") (holiday-advent 0 "Advent"))))) "\ Christian holidays. See the documentation for `calendar-holidays' for details.") @@ -13902,8 +13902,8 @@ The optional LABEL is used to label the buffer created. ;;;*** -;;;### (autoloads (html2text) "html2text" "gnus/html2text.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (html2text) "html2text" "gnus/html2text.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/html2text.el (autoload 'html2text "html2text" "\ @@ -13914,7 +13914,7 @@ Convert HTML to plain text in the current buffer. ;;;*** ;;;### (autoloads (htmlfontify-copy-and-link-dir htmlfontify-buffer) -;;;;;; "htmlfontify" "htmlfontify.el" (20352 65510)) +;;;;;; "htmlfontify" "htmlfontify.el" (20355 10320)) ;;; Generated autoloads from htmlfontify.el (autoload 'htmlfontify-buffer "htmlfontify" "\ @@ -13947,8 +13947,8 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'. ;;;*** ;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter -;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (20352 -;;;;;; 65510)) +;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from ibuf-macs.el (autoload 'define-ibuffer-column "ibuf-macs" "\ @@ -14045,7 +14045,7 @@ bound to the current value of the filter. ;;;*** ;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) -;;;;;; "ibuffer" "ibuffer.el" (20461 49352)) +;;;;;; "ibuffer" "ibuffer.el" (20454 63593)) ;;; Generated autoloads from ibuffer.el (autoload 'ibuffer-list-buffers "ibuffer" "\ @@ -14086,7 +14086,7 @@ FORMATS is the value to use for `ibuffer-formats'. ;;;### (autoloads (icalendar-import-buffer icalendar-import-file ;;;;;; icalendar-export-region icalendar-export-file) "icalendar" -;;;;;; "calendar/icalendar.el" (20352 65510)) +;;;;;; "calendar/icalendar.el" (20355 10320)) ;;; Generated autoloads from calendar/icalendar.el (autoload 'icalendar-export-file "icalendar" "\ @@ -14138,8 +14138,8 @@ buffer `*icalendar-errors*'. ;;;*** -;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from icomplete.el (defvar icomplete-mode nil "\ @@ -14161,7 +14161,7 @@ the mode if ARG is omitted or nil. ;;;*** -;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (20400 62402)) +;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (20355 10320)) ;;; Generated autoloads from progmodes/icon.el (autoload 'icon-mode "icon" "\ @@ -14202,7 +14202,7 @@ with no args, if that value is non-nil. ;;;*** ;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/idlw-shell.el (autoload 'idlwave-shell "idlw-shell" "\ @@ -14228,7 +14228,7 @@ See also the variable `idlwave-shell-prompt-pattern'. ;;;*** ;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/idlwave.el (autoload 'idlwave-mode "idlwave" "\ @@ -14362,8 +14362,8 @@ The main features of this mode are ;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file ;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer ;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window -;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (20400 -;;;;;; 62402)) +;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -14623,7 +14623,7 @@ DEF, if non-nil, is the default value. ;;;*** -;;;### (autoloads (ielm) "ielm" "ielm.el" (20352 65510)) +;;;### (autoloads (ielm) "ielm" "ielm.el" (20355 10320)) ;;; Generated autoloads from ielm.el (autoload 'ielm "ielm" "\ @@ -14634,7 +14634,7 @@ Switches to the buffer `*ielm*', or creates it if it does not exist. ;;;*** -;;;### (autoloads (iimage-mode) "iimage" "iimage.el" (20352 65510)) +;;;### (autoloads (iimage-mode) "iimage" "iimage.el" (20355 10320)) ;;; Generated autoloads from iimage.el (define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1") @@ -14655,7 +14655,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. ;;;;;; create-image image-type-auto-detected-p image-type-available-p ;;;;;; image-type image-type-from-file-name image-type-from-file-header ;;;;;; image-type-from-buffer image-type-from-data) "image" "image.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from image.el (autoload 'image-type-from-data "image" "\ @@ -14855,7 +14855,7 @@ If Emacs is compiled without ImageMagick support, do nothing. ;;;;;; image-dired-jump-thumbnail-buffer image-dired-delete-tag ;;;;;; image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs ;;;;;; image-dired-dired-with-window-configuration image-dired-dired-toggle-marked-thumbs) -;;;;;; "image-dired" "image-dired.el" (20352 65510)) +;;;;;; "image-dired" "image-dired.el" (20355 10320)) ;;; Generated autoloads from image-dired.el (autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\ @@ -14993,7 +14993,7 @@ easy-to-use form. ;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp ;;;;;; image-file-name-regexps image-file-name-extensions) "image-file" -;;;;;; "image-file.el" (20352 65510)) +;;;;;; "image-file.el" (20355 10320)) ;;; Generated autoloads from image-file.el (defvar image-file-name-extensions (purecopy '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg")) "\ @@ -15056,7 +15056,7 @@ An image file is one whose name has an extension in ;;;*** ;;;### (autoloads (image-bookmark-jump image-mode-as-text image-minor-mode -;;;;;; image-mode) "image-mode" "image-mode.el" (20400 62402)) +;;;;;; image-mode) "image-mode" "image-mode.el" (20355 10320)) ;;; Generated autoloads from image-mode.el (autoload 'image-mode "image-mode" "\ @@ -15101,7 +15101,7 @@ on these modes. ;;;*** ;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar -;;;;;; imenu-sort-function) "imenu" "imenu.el" (20400 62402)) +;;;;;; imenu-sort-function) "imenu" "imenu.el" (20358 10456)) ;;; Generated autoloads from imenu.el (defvar imenu-sort-function nil "\ @@ -15218,7 +15218,7 @@ for more information. ;;;### (autoloads (indian-2-column-to-ucs-region in-is13194-pre-write-conversion ;;;;;; in-is13194-post-read-conversion indian-compose-string indian-compose-region) -;;;;;; "ind-util" "language/ind-util.el" (20352 65510)) +;;;;;; "ind-util" "language/ind-util.el" (20355 10320)) ;;; Generated autoloads from language/ind-util.el (autoload 'indian-compose-region "ind-util" "\ @@ -15250,7 +15250,7 @@ Convert old Emacs Devanagari characters to UCS. ;;;### (autoloads (inferior-lisp inferior-lisp-prompt inferior-lisp-load-command ;;;;;; inferior-lisp-program inferior-lisp-filter-regexp) "inf-lisp" -;;;;;; "progmodes/inf-lisp.el" (20400 62402)) +;;;;;; "progmodes/inf-lisp.el" (20355 10320)) ;;; Generated autoloads from progmodes/inf-lisp.el (defvar inferior-lisp-filter-regexp (purecopy "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'") "\ @@ -15317,7 +15317,7 @@ of `inferior-lisp-program'). Runs the hooks from ;;;;;; Info-goto-emacs-key-command-node Info-goto-emacs-command-node ;;;;;; Info-mode info-finder info-apropos Info-index Info-directory ;;;;;; Info-on-current-buffer info-standalone info-emacs-manual -;;;;;; info info-other-window) "info" "info.el" (20400 62402)) +;;;;;; info info-other-window) "info" "info.el" (20355 10320)) ;;; Generated autoloads from info.el (autoload 'info-other-window "info" "\ @@ -15503,7 +15503,7 @@ Go to Info buffer that displays MANUAL, creating it if none already exists. ;;;### (autoloads (info-complete-file info-complete-symbol info-lookup-file ;;;;;; info-lookup-symbol info-lookup-reset) "info-look" "info-look.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from info-look.el (autoload 'info-lookup-reset "info-look" "\ @@ -15552,7 +15552,7 @@ Perform completion on file preceding point. ;;;### (autoloads (info-xref-docstrings info-xref-check-all-custom ;;;;;; info-xref-check-all info-xref-check) "info-xref" "info-xref.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from info-xref.el (autoload 'info-xref-check "info-xref" "\ @@ -15635,7 +15635,7 @@ the sources handy. ;;;*** ;;;### (autoloads (batch-info-validate Info-validate Info-split Info-split-threshold -;;;;;; Info-tagify) "informat" "informat.el" (20352 65510)) +;;;;;; Info-tagify) "informat" "informat.el" (20355 10320)) ;;; Generated autoloads from informat.el (autoload 'Info-tagify "informat" "\ @@ -15682,7 +15682,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" ;;;### (autoloads (isearch-process-search-multibyte-characters isearch-toggle-input-method ;;;;;; isearch-toggle-specified-input-method) "isearch-x" "international/isearch-x.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from international/isearch-x.el (autoload 'isearch-toggle-specified-input-method "isearch-x" "\ @@ -15702,8 +15702,8 @@ Toggle input method in interactive search. ;;;*** -;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from isearchb.el (autoload 'isearchb-activate "isearchb" "\ @@ -15719,7 +15719,7 @@ accessed via isearchb. ;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only ;;;;;; iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso ;;;;;; iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt" -;;;;;; "international/iso-cvt.el" (20352 65510)) +;;;;;; "international/iso-cvt.el" (20355 10320)) ;;; Generated autoloads from international/iso-cvt.el (autoload 'iso-spanish "iso-cvt" "\ @@ -15810,7 +15810,7 @@ Add submenus to the File menu, to convert to and from various formats. ;;;*** ;;;### (autoloads nil "iso-transl" "international/iso-transl.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from international/iso-transl.el (or key-translation-map (setq key-translation-map (make-sparse-keymap))) (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) @@ -15822,7 +15822,7 @@ Add submenus to the File menu, to convert to and from various formats. ;;;;;; ispell-complete-word ispell-continue ispell-buffer ispell-comments-and-strings ;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell ;;;;;; ispell-help ispell-pdict-save ispell-word ispell-personal-dictionary) -;;;;;; "ispell" "textmodes/ispell.el" (20400 62402)) +;;;;;; "ispell" "textmodes/ispell.el" (20355 10320)) ;;; Generated autoloads from textmodes/ispell.el (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) @@ -16048,8 +16048,8 @@ You can bind this to the key C-c i in GNUS or mail by adding to ;;;*** -;;;### (autoloads (iswitchb-mode) "iswitchb" "iswitchb.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (iswitchb-mode) "iswitchb" "iswitchb.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from iswitchb.el (defvar iswitchb-mode nil "\ @@ -16077,7 +16077,7 @@ between buffers using substrings. See `iswitchb' for details. ;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region ;;;;;; japanese-hiragana-region japanese-katakana-region japanese-zenkaku ;;;;;; japanese-hankaku japanese-hiragana japanese-katakana setup-japanese-environment-internal) -;;;;;; "japan-util" "language/japan-util.el" (20352 65510)) +;;;;;; "japan-util" "language/japan-util.el" (20355 10320)) ;;; Generated autoloads from language/japan-util.el (autoload 'setup-japanese-environment-internal "japan-util" "\ @@ -16155,7 +16155,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading. ;;;*** ;;;### (autoloads (jka-compr-uninstall jka-compr-handler) "jka-compr" -;;;;;; "jka-compr.el" (20352 65510)) +;;;;;; "jka-compr.el" (20355 10320)) ;;; Generated autoloads from jka-compr.el (defvar jka-compr-inhibit nil "\ @@ -16178,7 +16178,7 @@ by `jka-compr-installed'. ;;;*** -;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20400 62402)) +;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20355 10320)) ;;; Generated autoloads from progmodes/js.el (autoload 'js-mode "js" "\ @@ -16192,7 +16192,7 @@ Major mode for editing JavaScript. ;;;### (autoloads (keypad-setup keypad-numlock-shifted-setup keypad-shifted-setup ;;;;;; keypad-numlock-setup keypad-setup) "keypad" "emulation/keypad.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emulation/keypad.el (defvar keypad-setup nil "\ @@ -16248,7 +16248,7 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.' ;;;*** ;;;### (autoloads (kinsoku) "kinsoku" "international/kinsoku.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from international/kinsoku.el (autoload 'kinsoku "kinsoku" "\ @@ -16269,8 +16269,8 @@ the context of text formatting. ;;;*** -;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from international/kkc.el (defvar kkc-after-update-conversion-functions nil "\ @@ -16295,7 +16295,7 @@ and the return value is the length of the conversion. ;;;### (autoloads (kmacro-end-call-mouse kmacro-end-and-call-macro ;;;;;; kmacro-end-or-call-macro kmacro-start-macro-or-insert-counter ;;;;;; kmacro-call-macro kmacro-end-macro kmacro-start-macro kmacro-exec-ring-item) -;;;;;; "kmacro" "kmacro.el" (20400 62402)) +;;;;;; "kmacro" "kmacro.el" (20355 10320)) ;;; Generated autoloads from kmacro.el (global-set-key "\C-x(" 'kmacro-start-macro) (global-set-key "\C-x)" 'kmacro-end-macro) @@ -16406,7 +16406,7 @@ If kbd macro currently being defined end it before activating it. ;;;*** ;;;### (autoloads (setup-korean-environment-internal) "korea-util" -;;;;;; "language/korea-util.el" (20400 62402)) +;;;;;; "language/korea-util.el" (20355 10320)) ;;; Generated autoloads from language/korea-util.el (defvar default-korean-keyboard (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "")) "\ @@ -16421,7 +16421,7 @@ If kbd macro currently being defined end it before activating it. ;;;*** ;;;### (autoloads (landmark landmark-test-run) "landmark" "play/landmark.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from play/landmark.el (defalias 'landmark-repeat 'landmark-test-run) @@ -16453,7 +16453,7 @@ Use \\[describe-mode] for more info. ;;;### (autoloads (lao-compose-region lao-composition-function lao-transcribe-roman-to-lao-string ;;;;;; lao-transcribe-single-roman-syllable-to-lao lao-compose-string) -;;;;;; "lao-util" "language/lao-util.el" (20352 65510)) +;;;;;; "lao-util" "language/lao-util.el" (20355 10320)) ;;; Generated autoloads from language/lao-util.el (autoload 'lao-compose-string "lao-util" "\ @@ -16492,7 +16492,7 @@ Transcribe Romanized Lao string STR to Lao character string. ;;;### (autoloads (latexenc-find-file-coding-system latexenc-coding-system-to-inputenc ;;;;;; latexenc-inputenc-to-coding-system latex-inputenc-coding-alist) -;;;;;; "latexenc" "international/latexenc.el" (20352 65510)) +;;;;;; "latexenc" "international/latexenc.el" (20355 10320)) ;;; Generated autoloads from international/latexenc.el (defvar latex-inputenc-coding-alist (purecopy '(("ansinew" . windows-1252) ("applemac" . mac-roman) ("ascii" . us-ascii) ("cp1250" . windows-1250) ("cp1252" . windows-1252) ("cp1257" . cp1257) ("cp437de" . cp437) ("cp437" . cp437) ("cp850" . cp850) ("cp852" . cp852) ("cp858" . cp858) ("cp865" . cp865) ("latin1" . iso-8859-1) ("latin2" . iso-8859-2) ("latin3" . iso-8859-3) ("latin4" . iso-8859-4) ("latin5" . iso-8859-5) ("latin9" . iso-8859-15) ("next" . next) ("utf8" . utf-8) ("utf8x" . utf-8))) "\ @@ -16524,7 +16524,7 @@ coding system names is determined from `latex-inputenc-coding-alist'. ;;;*** ;;;### (autoloads (latin1-display-ucs-per-lynx latin1-display latin1-display) -;;;;;; "latin1-disp" "international/latin1-disp.el" (20352 65510)) +;;;;;; "latin1-disp" "international/latin1-disp.el" (20355 10320)) ;;; Generated autoloads from international/latin1-disp.el (defvar latin1-display nil "\ @@ -16566,7 +16566,7 @@ use either \\[customize] or the function `latin1-display'.") ;;;*** ;;;### (autoloads (ld-script-mode) "ld-script" "progmodes/ld-script.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/ld-script.el (autoload 'ld-script-mode "ld-script" "\ @@ -16577,7 +16577,7 @@ A major mode to edit GNU ld script files ;;;*** ;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "ledit.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from ledit.el (defconst ledit-save-files t "\ @@ -16612,7 +16612,7 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode) ;;;*** -;;;### (autoloads (life) "life" "play/life.el" (20352 65510)) +;;;### (autoloads (life) "life" "play/life.el" (20355 10320)) ;;; Generated autoloads from play/life.el (autoload 'life "life" "\ @@ -16626,7 +16626,7 @@ generations (this defaults to 1). ;;;*** ;;;### (autoloads (global-linum-mode linum-mode linum-format) "linum" -;;;;;; "linum.el" (20352 65510)) +;;;;;; "linum.el" (20355 10320)) ;;; Generated autoloads from linum.el (defvar linum-format 'dynamic "\ @@ -16671,8 +16671,8 @@ See `linum-mode' for more information on Linum mode. ;;;*** -;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from loadhist.el (autoload 'unload-feature "loadhist" "\ @@ -16704,7 +16704,7 @@ something strange, such as redefining an Emacs function. ;;;*** ;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches) -;;;;;; "locate" "locate.el" (20352 65510)) +;;;;;; "locate" "locate.el" (20355 10320)) ;;; Generated autoloads from locate.el (defvar locate-ls-subdir-switches (purecopy "-al") "\ @@ -16756,7 +16756,7 @@ except that FILTER is not optional. ;;;*** -;;;### (autoloads (log-edit) "log-edit" "vc/log-edit.el" (20400 62402)) +;;;### (autoloads (log-edit) "log-edit" "vc/log-edit.el" (20531 28218)) ;;; Generated autoloads from vc/log-edit.el (autoload 'log-edit "log-edit" "\ @@ -16783,8 +16783,8 @@ uses the current buffer. ;;;*** -;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from vc/log-view.el (autoload 'log-view-mode "log-view" "\ @@ -16794,8 +16794,8 @@ Major mode for browsing CVS log output. ;;;*** -;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from longlines.el (autoload 'longlines-mode "longlines" "\ @@ -16821,8 +16821,8 @@ newlines are indicated with a symbol. ;;;*** ;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer -;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (20352 -;;;;;; 65510)) +;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from lpr.el (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\ @@ -16918,7 +16918,7 @@ for further customization of the printer command. ;;;*** ;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from ls-lisp.el (defvar ls-lisp-support-shell-wildcards t "\ @@ -16929,8 +16929,8 @@ Otherwise they are treated as Emacs regexps (for backward compatibility).") ;;;*** -;;;### (autoloads (lunar-phases) "lunar" "calendar/lunar.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (lunar-phases) "lunar" "calendar/lunar.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calendar/lunar.el (autoload 'lunar-phases "lunar" "\ @@ -16944,8 +16944,8 @@ This function is suitable for execution in a .emacs file. ;;;*** -;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/m4-mode.el (autoload 'm4-mode "m4-mode" "\ @@ -16956,7 +16956,7 @@ A major mode to edit m4 macro files. ;;;*** ;;;### (autoloads (macroexpand-all) "macroexp" "emacs-lisp/macroexp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/macroexp.el (autoload 'macroexpand-all "macroexp" "\ @@ -16970,7 +16970,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. ;;;*** ;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro -;;;;;; name-last-kbd-macro) "macros" "macros.el" (20352 65510)) +;;;;;; name-last-kbd-macro) "macros" "macros.el" (20355 10320)) ;;; Generated autoloads from macros.el (autoload 'name-last-kbd-macro "macros" "\ @@ -17059,7 +17059,7 @@ and then select the region of un-tablified names and use ;;;*** ;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" -;;;;;; "mail/mail-extr.el" (20400 62402)) +;;;;;; "mail/mail-extr.el" (20355 10320)) ;;; Generated autoloads from mail/mail-extr.el (autoload 'mail-extract-address-components "mail-extr" "\ @@ -17091,7 +17091,7 @@ Convert mail domain DOMAIN to the country it corresponds to. ;;;### (autoloads (mail-hist-put-headers-into-history mail-hist-keep-history ;;;;;; mail-hist-enable mail-hist-define-keys) "mail-hist" "mail/mail-hist.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/mail-hist.el (autoload 'mail-hist-define-keys "mail-hist" "\ @@ -17123,7 +17123,7 @@ This function normally would be called when the message is sent. ;;;### (autoloads (mail-fetch-field mail-unquote-printable-region ;;;;;; mail-unquote-printable mail-quote-printable-region mail-quote-printable ;;;;;; mail-file-babyl-p mail-dont-reply-to-names mail-use-rfc822) -;;;;;; "mail-utils" "mail/mail-utils.el" (20352 65510)) +;;;;;; "mail-utils" "mail/mail-utils.el" (20355 10320)) ;;; Generated autoloads from mail/mail-utils.el (defvar mail-use-rfc822 nil "\ @@ -17198,8 +17198,8 @@ matches may be returned from the message body. ;;;*** ;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup -;;;;;; mail-abbrevs-mode) "mailabbrev" "mail/mailabbrev.el" (20400 -;;;;;; 62402)) +;;;;;; mail-abbrevs-mode) "mailabbrev" "mail/mailabbrev.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from mail/mailabbrev.el (defvar mail-abbrevs-mode nil "\ @@ -17250,7 +17250,7 @@ double-quotes. ;;;### (autoloads (mail-complete mail-completion-at-point-function ;;;;;; define-mail-alias expand-mail-aliases mail-complete-style) -;;;;;; "mailalias" "mail/mailalias.el" (20352 65510)) +;;;;;; "mailalias" "mail/mailalias.el" (20355 10320)) ;;; Generated autoloads from mail/mailalias.el (defvar mail-complete-style 'angles "\ @@ -17302,7 +17302,7 @@ current header, calls `mail-complete-function' and passes prefix ARG if any. ;;;*** ;;;### (autoloads (mailclient-send-it) "mailclient" "mail/mailclient.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/mailclient.el (autoload 'mailclient-send-it "mailclient" "\ @@ -17316,7 +17316,7 @@ The mail client is taken to be the handler of mailto URLs. ;;;### (autoloads (makefile-imake-mode makefile-bsdmake-mode makefile-makepp-mode ;;;;;; makefile-gmake-mode makefile-automake-mode makefile-mode) -;;;;;; "make-mode" "progmodes/make-mode.el" (20400 62402)) +;;;;;; "make-mode" "progmodes/make-mode.el" (20355 10320)) ;;; Generated autoloads from progmodes/make-mode.el (autoload 'makefile-mode "make-mode" "\ @@ -17433,8 +17433,8 @@ An adapted `makefile-mode' that knows about imake. ;;;*** -;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from makesum.el (autoload 'make-command-summary "makesum" "\ @@ -17446,7 +17446,7 @@ Previous contents of that buffer are killed first. ;;;*** ;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from man.el (defalias 'manual-entry 'man) @@ -17500,7 +17500,7 @@ Default bookmark handler for Man buffers. ;;;*** -;;;### (autoloads (master-mode) "master" "master.el" (20352 65510)) +;;;### (autoloads (master-mode) "master" "master.el" (20355 10320)) ;;; Generated autoloads from master.el (autoload 'master-mode "master" "\ @@ -17523,7 +17523,7 @@ yourself the value of `master-of' by calling `master-show-slave'. ;;;*** ;;;### (autoloads (minibuffer-depth-indicate-mode) "mb-depth" "mb-depth.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mb-depth.el (defvar minibuffer-depth-indicate-mode nil "\ @@ -17556,7 +17556,7 @@ recursion depth in the minibuffer prompt. This is only useful if ;;;;;; message-forward-make-body message-forward message-recover ;;;;;; message-supersede message-cancel-news message-followup message-wide-reply ;;;;;; message-reply message-news message-mail message-mode) "message" -;;;;;; "gnus/message.el" (20352 65510)) +;;;;;; "gnus/message.el" (20355 10320)) ;;; Generated autoloads from gnus/message.el (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) @@ -17722,7 +17722,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (metapost-mode metafont-mode) "meta-mode" "progmodes/meta-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/meta-mode.el (autoload 'metafont-mode "meta-mode" "\ @@ -17739,7 +17739,7 @@ Major mode for editing MetaPost sources. ;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body ;;;;;; metamail-interpret-header) "metamail" "mail/metamail.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/metamail.el (autoload 'metamail-interpret-header "metamail" "\ @@ -17784,7 +17784,7 @@ redisplayed as output is inserted. ;;;### (autoloads (mh-fully-kill-draft mh-send-letter mh-user-agent-compose ;;;;;; mh-smail-batch mh-smail-other-window mh-smail) "mh-comp" -;;;;;; "mh-e/mh-comp.el" (20352 65510)) +;;;;;; "mh-e/mh-comp.el" (20355 10320)) ;;; Generated autoloads from mh-e/mh-comp.el (autoload 'mh-smail "mh-comp" "\ @@ -17874,7 +17874,7 @@ delete the draft message. ;;;*** -;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20352 65510)) +;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20355 10320)) ;;; Generated autoloads from mh-e/mh-e.el (put 'mh-progs 'risky-local-variable t) @@ -17891,7 +17891,7 @@ Display version information about MH-E and the MH mail handling system. ;;;*** ;;;### (autoloads (mh-folder-mode mh-nmail mh-rmail) "mh-folder" -;;;;;; "mh-e/mh-folder.el" (20400 62402)) +;;;;;; "mh-e/mh-folder.el" (20355 10320)) ;;; Generated autoloads from mh-e/mh-folder.el (autoload 'mh-rmail "mh-folder" "\ @@ -17973,7 +17973,7 @@ perform the operation on all messages in that region. ;;;*** ;;;### (autoloads (midnight-delay-set clean-buffer-list) "midnight" -;;;;;; "midnight.el" (20352 65510)) +;;;;;; "midnight.el" (20355 10320)) ;;; Generated autoloads from midnight.el (autoload 'clean-buffer-list "midnight" "\ @@ -18000,7 +18000,7 @@ to its second argument TM. ;;;*** ;;;### (autoloads (minibuffer-electric-default-mode) "minibuf-eldef" -;;;;;; "minibuf-eldef.el" (20400 62402)) +;;;;;; "minibuf-eldef.el" (20355 10320)) ;;; Generated autoloads from minibuf-eldef.el (defvar minibuffer-electric-default-mode nil "\ @@ -18030,7 +18030,7 @@ is modified to remove the default indication. ;;;*** ;;;### (autoloads (list-dynamic-libraries butterfly) "misc" "misc.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from misc.el (autoload 'butterfly "misc" "\ @@ -18060,7 +18060,7 @@ The return value is always nil. ;;;### (autoloads (multi-isearch-files-regexp multi-isearch-files ;;;;;; multi-isearch-buffers-regexp multi-isearch-buffers multi-isearch-setup) -;;;;;; "misearch" "misearch.el" (20487 24216)) +;;;;;; "misearch" "misearch.el" (20487 60609)) ;;; Generated autoloads from misearch.el (add-hook 'isearch-mode-hook 'multi-isearch-setup) @@ -18142,7 +18142,7 @@ whose file names match the specified wildcard. ;;;*** ;;;### (autoloads (mixal-mode) "mixal-mode" "progmodes/mixal-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/mixal-mode.el (autoload 'mixal-mode "mixal-mode" "\ @@ -18153,7 +18153,7 @@ Major mode for the mixal asm language. ;;;*** ;;;### (autoloads (mm-default-file-encoding) "mm-encode" "gnus/mm-encode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/mm-encode.el (autoload 'mm-default-file-encoding "mm-encode" "\ @@ -18164,7 +18164,7 @@ Return a default encoding for FILE. ;;;*** ;;;### (autoloads (mm-inline-external-body mm-extern-cache-contents) -;;;;;; "mm-extern" "gnus/mm-extern.el" (20352 65510)) +;;;;;; "mm-extern" "gnus/mm-extern.el" (20355 10320)) ;;; Generated autoloads from gnus/mm-extern.el (autoload 'mm-extern-cache-contents "mm-extern" "\ @@ -18183,7 +18183,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** ;;;### (autoloads (mm-inline-partial) "mm-partial" "gnus/mm-partial.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/mm-partial.el (autoload 'mm-inline-partial "mm-partial" "\ @@ -18197,7 +18197,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** ;;;### (autoloads (mm-url-insert-file-contents-external mm-url-insert-file-contents) -;;;;;; "mm-url" "gnus/mm-url.el" (20352 65510)) +;;;;;; "mm-url" "gnus/mm-url.el" (20355 10320)) ;;; Generated autoloads from gnus/mm-url.el (autoload 'mm-url-insert-file-contents "mm-url" "\ @@ -18214,7 +18214,7 @@ Insert file contents of URL using `mm-url-program'. ;;;*** ;;;### (autoloads (mm-uu-dissect-text-parts mm-uu-dissect) "mm-uu" -;;;;;; "gnus/mm-uu.el" (20352 65510)) +;;;;;; "gnus/mm-uu.el" (20355 10320)) ;;; Generated autoloads from gnus/mm-uu.el (autoload 'mm-uu-dissect "mm-uu" "\ @@ -18234,7 +18234,7 @@ Assume text has been decoded if DECODED is non-nil. ;;;*** ;;;### (autoloads (mml-attach-file mml-to-mime) "mml" "gnus/mml.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/mml.el (autoload 'mml-to-mime "mml" "\ @@ -18259,7 +18259,7 @@ body) or \"attachment\" (separate from the body). ;;;*** ;;;### (autoloads (mml1991-sign mml1991-encrypt) "mml1991" "gnus/mml1991.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/mml1991.el (autoload 'mml1991-encrypt "mml1991" "\ @@ -18276,7 +18276,7 @@ body) or \"attachment\" (separate from the body). ;;;### (autoloads (mml2015-self-encrypt mml2015-sign mml2015-encrypt ;;;;;; mml2015-verify-test mml2015-verify mml2015-decrypt-test mml2015-decrypt) -;;;;;; "mml2015" "gnus/mml2015.el" (20352 65510)) +;;;;;; "mml2015" "gnus/mml2015.el" (20355 10320)) ;;; Generated autoloads from gnus/mml2015.el (autoload 'mml2015-decrypt "mml2015" "\ @@ -18316,8 +18316,8 @@ body) or \"attachment\" (separate from the body). ;;;*** -;;;### (autoloads (m2-mode) "modula2" "progmodes/modula2.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (m2-mode) "modula2" "progmodes/modula2.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/modula2.el (defalias 'modula-2-mode 'm2-mode) @@ -18351,7 +18351,7 @@ followed by the first character of the construct. ;;;*** ;;;### (autoloads (denato-region nato-region unmorse-region morse-region) -;;;;;; "morse" "play/morse.el" (20352 65510)) +;;;;;; "morse" "play/morse.el" (20355 10320)) ;;; Generated autoloads from play/morse.el (autoload 'morse-region "morse" "\ @@ -18377,7 +18377,7 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text. ;;;*** ;;;### (autoloads (mouse-drag-drag mouse-drag-throw) "mouse-drag" -;;;;;; "mouse-drag.el" (20400 62402)) +;;;;;; "mouse-drag.el" (20355 10320)) ;;; Generated autoloads from mouse-drag.el (autoload 'mouse-drag-throw "mouse-drag" "\ @@ -18424,8 +18424,8 @@ To test this function, evaluate: ;;;*** -;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from mouse-sel.el (defvar mouse-sel-mode nil "\ @@ -18468,7 +18468,7 @@ kill ring; mouse-1 or mouse-3 kills it. ;;;*** -;;;### (autoloads (mpc) "mpc" "mpc.el" (20400 62402)) +;;;### (autoloads (mpc) "mpc" "mpc.el" (20355 10320)) ;;; Generated autoloads from mpc.el (autoload 'mpc "mpc" "\ @@ -18478,7 +18478,7 @@ Main entry point for MPC. ;;;*** -;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20352 65510)) +;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20355 10320)) ;;; Generated autoloads from play/mpuz.el (autoload 'mpuz "mpuz" "\ @@ -18488,7 +18488,7 @@ Multiplication puzzle with GNU Emacs. ;;;*** -;;;### (autoloads (msb-mode) "msb" "msb.el" (20400 62402)) +;;;### (autoloads (msb-mode) "msb" "msb.el" (20355 10320)) ;;; Generated autoloads from msb.el (defvar msb-mode nil "\ @@ -18518,7 +18518,7 @@ different buffer menu using the function `msb'. ;;;;;; describe-current-coding-system describe-current-coding-system-briefly ;;;;;; describe-coding-system describe-character-set list-charset-chars ;;;;;; read-charset list-character-sets) "mule-diag" "international/mule-diag.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from international/mule-diag.el (autoload 'list-character-sets "mule-diag" "\ @@ -18655,7 +18655,7 @@ The default is 20. If LIMIT is negative, do not limit the listing. ;;;;;; coding-system-translation-table-for-decode coding-system-pre-write-conversion ;;;;;; coding-system-post-read-conversion lookup-nested-alist set-nested-alist ;;;;;; truncate-string-to-width store-substring string-to-sequence) -;;;;;; "mule-util" "international/mule-util.el" (20352 65510)) +;;;;;; "mule-util" "international/mule-util.el" (20355 10320)) ;;; Generated autoloads from international/mule-util.el (autoload 'string-to-sequence "mule-util" "\ @@ -18795,8 +18795,8 @@ per-character basis, this may not be accurate. ;;;### (autoloads (network-connection network-connection-to-service ;;;;;; whois-reverse-lookup whois finger ftp run-dig dns-lookup-host ;;;;;; nslookup nslookup-host ping traceroute route arp netstat -;;;;;; iwconfig ifconfig) "net-utils" "net/net-utils.el" (20352 -;;;;;; 65510)) +;;;;;; iwconfig ifconfig) "net-utils" "net/net-utils.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from net/net-utils.el (autoload 'ifconfig "net-utils" "\ @@ -18890,8 +18890,8 @@ Open a network connection to HOST on PORT. ;;;*** -;;;### (autoloads (netrc-credentials) "netrc" "net/netrc.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (netrc-credentials) "netrc" "net/netrc.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from net/netrc.el (autoload 'netrc-credentials "netrc" "\ @@ -18904,7 +18904,7 @@ listed in the PORTS list. ;;;*** ;;;### (autoloads (open-network-stream) "network-stream" "net/network-stream.el" -;;;;;; (20366 22869)) +;;;;;; (20366 41661)) ;;; Generated autoloads from net/network-stream.el (autoload 'open-network-stream "network-stream" "\ @@ -18999,7 +18999,7 @@ STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. ;;;;;; uncomment-region comment-kill comment-set-column comment-indent ;;;;;; comment-indent-default comment-normalize-vars comment-multi-line ;;;;;; comment-padding comment-style comment-column) "newcomment" -;;;;;; "newcomment.el" (20400 62402)) +;;;;;; "newcomment.el" (20355 10320)) ;;; Generated autoloads from newcomment.el (defalias 'indent-for-comment 'comment-indent) @@ -19241,7 +19241,7 @@ unless optional argument SOFT is non-nil. ;;;*** ;;;### (autoloads (newsticker-start newsticker-running-p) "newst-backend" -;;;;;; "net/newst-backend.el" (20352 65510)) +;;;;;; "net/newst-backend.el" (20355 10320)) ;;; Generated autoloads from net/newst-backend.el (autoload 'newsticker-running-p "newst-backend" "\ @@ -19263,7 +19263,7 @@ Run `newsticker-start-hook' if newsticker was not running already. ;;;*** ;;;### (autoloads (newsticker-plainview) "newst-plainview" "net/newst-plainview.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/newst-plainview.el (autoload 'newsticker-plainview "newst-plainview" "\ @@ -19274,7 +19274,7 @@ Start newsticker plainview. ;;;*** ;;;### (autoloads (newsticker-show-news) "newst-reader" "net/newst-reader.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/newst-reader.el (autoload 'newsticker-show-news "newst-reader" "\ @@ -19285,7 +19285,7 @@ Start reading news. You may want to bind this to a key. ;;;*** ;;;### (autoloads (newsticker-start-ticker newsticker-ticker-running-p) -;;;;;; "newst-ticker" "net/newst-ticker.el" (20352 65510)) +;;;;;; "newst-ticker" "net/newst-ticker.el" (20355 10320)) ;;; Generated autoloads from net/newst-ticker.el (autoload 'newsticker-ticker-running-p "newst-ticker" "\ @@ -19306,7 +19306,7 @@ running already. ;;;*** ;;;### (autoloads (newsticker-treeview) "newst-treeview" "net/newst-treeview.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/newst-treeview.el (autoload 'newsticker-treeview "newst-treeview" "\ @@ -19317,7 +19317,7 @@ Start newsticker treeview. ;;;*** ;;;### (autoloads (nndiary-generate-nov-databases) "nndiary" "gnus/nndiary.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/nndiary.el (autoload 'nndiary-generate-nov-databases "nndiary" "\ @@ -19327,8 +19327,8 @@ Generate NOV databases in all nndiary directories. ;;;*** -;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/nndoc.el (autoload 'nndoc-add-type "nndoc" "\ @@ -19343,7 +19343,7 @@ symbol in the alist. ;;;*** ;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/nnfolder.el (autoload 'nnfolder-generate-active-file "nnfolder" "\ @@ -19355,7 +19355,7 @@ This command does not work if you use short group names. ;;;*** ;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/nnml.el (autoload 'nnml-generate-nov-databases "nnml" "\ @@ -19366,7 +19366,7 @@ Generate NOV databases in all nnml directories. ;;;*** ;;;### (autoloads (disable-command enable-command disabled-command-function) -;;;;;; "novice" "novice.el" (20400 62402)) +;;;;;; "novice" "novice.el" (20355 10320)) ;;; Generated autoloads from novice.el (defvar disabled-command-function 'disabled-command-function "\ @@ -19399,7 +19399,7 @@ to future sessions. ;;;*** ;;;### (autoloads (nroff-mode) "nroff-mode" "textmodes/nroff-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/nroff-mode.el (autoload 'nroff-mode "nroff-mode" "\ @@ -19414,7 +19414,7 @@ closing requests for requests that are used in matched pairs. ;;;*** ;;;### (autoloads (nxml-glyph-display-string) "nxml-glyph" "nxml/nxml-glyph.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from nxml/nxml-glyph.el (autoload 'nxml-glyph-display-string "nxml-glyph" "\ @@ -19426,8 +19426,8 @@ Return nil if the face cannot display a glyph for N. ;;;*** -;;;### (autoloads (nxml-mode) "nxml-mode" "nxml/nxml-mode.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (nxml-mode) "nxml-mode" "nxml/nxml-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from nxml/nxml-mode.el (autoload 'nxml-mode "nxml-mode" "\ @@ -19489,7 +19489,7 @@ Many aspects this mode can be customized using ;;;*** ;;;### (autoloads (nxml-enable-unicode-char-name-sets) "nxml-uchnm" -;;;;;; "nxml/nxml-uchnm.el" (20352 65510)) +;;;;;; "nxml/nxml-uchnm.el" (20355 10320)) ;;; Generated autoloads from nxml/nxml-uchnm.el (autoload 'nxml-enable-unicode-char-name-sets "nxml-uchnm" "\ @@ -19513,7 +19513,7 @@ the variable `nxml-enabled-unicode-blocks'. ;;;;;; org-babel-pop-to-session-maybe org-babel-load-in-session-maybe ;;;;;; org-babel-expand-src-block-maybe org-babel-view-src-block-info ;;;;;; org-babel-execute-maybe org-babel-execute-safely-maybe) "ob" -;;;;;; "org/ob.el" (20420 42151)) +;;;;;; "org/ob.el" (20415 27188)) ;;; Generated autoloads from org/ob.el (autoload 'org-babel-execute-safely-maybe "ob" "\ @@ -19736,7 +19736,7 @@ Mark current src block ;;;*** ;;;### (autoloads (org-babel-describe-bindings) "ob-keys" "org/ob-keys.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/ob-keys.el (autoload 'org-babel-describe-bindings "ob-keys" "\ @@ -19747,7 +19747,7 @@ Describe all keybindings behind `org-babel-key-prefix'. ;;;*** ;;;### (autoloads (org-babel-lob-get-info org-babel-lob-execute-maybe -;;;;;; org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (20352 65510)) +;;;;;; org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (20355 10320)) ;;; Generated autoloads from org/ob-lob.el (autoload 'org-babel-lob-ingest "ob-lob" "\ @@ -19772,7 +19772,7 @@ Return a Library of Babel function call as a string. ;;;### (autoloads (org-babel-tangle org-babel-tangle-file org-babel-load-file ;;;;;; org-babel-tangle-lang-exts) "ob-tangle" "org/ob-tangle.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/ob-tangle.el (defvar org-babel-tangle-lang-exts '(("emacs-lisp" . "el")) "\ @@ -19814,7 +19814,7 @@ exported source code blocks by language. ;;;*** ;;;### (autoloads (inferior-octave) "octave-inf" "progmodes/octave-inf.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/octave-inf.el (autoload 'inferior-octave "octave-inf" "\ @@ -19837,7 +19837,7 @@ startup file, `~/.emacs-octave'. ;;;*** ;;;### (autoloads (octave-mode) "octave-mod" "progmodes/octave-mod.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/octave-mod.el (autoload 'octave-mode "octave-mod" "\ @@ -19925,7 +19925,7 @@ including a reproducible test case and send the message. ;;;;;; org-insert-link-global org-store-link org-run-like-in-org-mode ;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle ;;;;;; org-mode org-version org-babel-do-load-languages) "org" "org/org.el" -;;;;;; (20420 42151)) +;;;;;; (20415 63769)) ;;; Generated autoloads from org/org.el (autoload 'org-babel-do-load-languages "org" "\ @@ -20158,7 +20158,7 @@ Call the customize function with org as argument. ;;;;;; org-diary org-agenda-list-stuck-projects org-tags-view org-todo-list ;;;;;; org-search-view org-agenda-list org-batch-store-agenda-views ;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda -;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (20404 23547)) +;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (20404 56885)) ;;; Generated autoloads from org/org-agenda.el (autoload 'org-agenda "org-agenda" "\ @@ -20412,7 +20412,7 @@ details and examples. ;;;### (autoloads (org-archive-subtree-default-with-confirmation ;;;;;; org-archive-subtree-default) "org-archive" "org/org-archive.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-archive.el (autoload 'org-archive-subtree-default "org-archive" "\ @@ -20432,8 +20432,8 @@ This command is set with the variable `org-archive-default-command'. ;;;### (autoloads (org-export-as-ascii org-export-region-as-ascii ;;;;;; org-replace-region-by-ascii org-export-as-ascii-to-buffer ;;;;;; org-export-as-utf8-to-buffer org-export-as-utf8 org-export-as-latin1-to-buffer -;;;;;; org-export-as-latin1) "org-ascii" "org/org-ascii.el" (20352 -;;;;;; 65510)) +;;;;;; org-export-as-latin1) "org-ascii" "org/org-ascii.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from org/org-ascii.el (autoload 'org-export-as-latin1 "org-ascii" "\ @@ -20506,8 +20506,8 @@ publishing directory. ;;;*** -;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from org/org-attach.el (autoload 'org-attach "org-attach" "\ @@ -20519,7 +20519,7 @@ Shows a list of commands and prompts for another key to execute a command. ;;;*** ;;;### (autoloads (org-bbdb-anniversaries) "org-bbdb" "org/org-bbdb.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-bbdb.el (autoload 'org-bbdb-anniversaries "org-bbdb" "\ @@ -20530,7 +20530,7 @@ Extract anniversaries from BBDB for display in the agenda. ;;;*** ;;;### (autoloads (org-capture-import-remember-templates org-capture-insert-template-here -;;;;;; org-capture) "org-capture" "org/org-capture.el" (20352 65510)) +;;;;;; org-capture) "org-capture" "org/org-capture.el" (20355 10320)) ;;; Generated autoloads from org/org-capture.el (autoload 'org-capture "org-capture" "\ @@ -20568,7 +20568,7 @@ Set org-capture-templates to be similar to `org-remember-templates'. ;;;*** ;;;### (autoloads (org-clock-persistence-insinuate org-get-clocktable) -;;;;;; "org-clock" "org/org-clock.el" (20377 65403)) +;;;;;; "org-clock" "org/org-clock.el" (20377 35643)) ;;; Generated autoloads from org/org-clock.el (autoload 'org-get-clocktable "org-clock" "\ @@ -20586,7 +20586,7 @@ Set up hooks for clock persistence. ;;;*** ;;;### (autoloads (org-datetree-find-date-create) "org-datetree" -;;;;;; "org/org-datetree.el" (20352 65510)) +;;;;;; "org/org-datetree.el" (20355 10320)) ;;; Generated autoloads from org/org-datetree.el (autoload 'org-datetree-find-date-create "org-datetree" "\ @@ -20602,7 +20602,7 @@ tree can be found. ;;;### (autoloads (org-export-as-docbook org-export-as-docbook-pdf-and-open ;;;;;; org-export-as-docbook-pdf org-export-region-as-docbook org-replace-region-by-docbook ;;;;;; org-export-as-docbook-to-buffer org-export-as-docbook-batch) -;;;;;; "org-docbook" "org/org-docbook.el" (20352 65510)) +;;;;;; "org-docbook" "org/org-docbook.el" (20355 10320)) ;;; Generated autoloads from org/org-docbook.el (autoload 'org-export-as-docbook-batch "org-docbook" "\ @@ -20679,7 +20679,7 @@ publishing directory. ;;;### (autoloads (org-insert-export-options-template org-export-as-org ;;;;;; org-export-visible org-export) "org-exp" "org/org-exp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-exp.el (autoload 'org-export "org-exp" "\ @@ -20740,8 +20740,8 @@ Insert into the buffer a template with information for exporting. ;;;*** ;;;### (autoloads (org-feed-show-raw-feed org-feed-goto-inbox org-feed-update -;;;;;; org-feed-update-all) "org-feed" "org/org-feed.el" (20352 -;;;;;; 65510)) +;;;;;; org-feed-update-all) "org-feed" "org/org-feed.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from org/org-feed.el (autoload 'org-feed-update-all "org-feed" "\ @@ -20769,7 +20769,7 @@ Show the raw feed buffer of a feed. ;;;*** ;;;### (autoloads (org-footnote-normalize org-footnote-action) "org-footnote" -;;;;;; "org/org-footnote.el" (20377 65403)) +;;;;;; "org/org-footnote.el" (20377 35643)) ;;; Generated autoloads from org/org-footnote.el (autoload 'org-footnote-action "org-footnote" "\ @@ -20820,7 +20820,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': ;;;### (autoloads (org-freemind-to-org-mode org-freemind-from-org-sparse-tree ;;;;;; org-freemind-from-org-mode org-freemind-from-org-mode-node ;;;;;; org-freemind-show org-export-as-freemind) "org-freemind" -;;;;;; "org/org-freemind.el" (20352 65510)) +;;;;;; "org/org-freemind.el" (20355 10320)) ;;; Generated autoloads from org/org-freemind.el (autoload 'org-export-as-freemind "org-freemind" "\ @@ -20881,7 +20881,7 @@ Convert FreeMind file MM-FILE to `org-mode' file ORG-FILE. ;;;### (autoloads (org-export-htmlize-generate-css org-export-as-html ;;;;;; org-export-region-as-html org-replace-region-by-html org-export-as-html-to-buffer ;;;;;; org-export-as-html-batch org-export-as-html-and-open) "org-html" -;;;;;; "org/org-html.el" (20352 65510)) +;;;;;; "org/org-html.el" (20355 10320)) ;;; Generated autoloads from org/org-html.el (put 'org-export-html-style-include-default 'safe-local-variable 'booleanp) @@ -20975,7 +20975,7 @@ that uses these same face definitions. ;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files ;;;;;; org-export-icalendar-this-file) "org-icalendar" "org/org-icalendar.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-icalendar.el (autoload 'org-export-icalendar-this-file "org-icalendar" "\ @@ -21003,7 +21003,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'. ;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find ;;;;;; org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion ;;;;;; org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-id.el (autoload 'org-id-get-create "org-id" "\ @@ -21072,7 +21072,7 @@ Store a link to the current entry, using its ID. ;;;*** ;;;### (autoloads (org-indent-mode) "org-indent" "org/org-indent.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-indent.el (autoload 'org-indent-mode "org-indent" "\ @@ -21090,7 +21090,7 @@ during idle time. ;;;*** ;;;### (autoloads (org-irc-store-link) "org-irc" "org/org-irc.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-irc.el (autoload 'org-irc-store-link "org-irc" "\ @@ -21103,7 +21103,7 @@ Dispatch to the appropriate function to store a link to an IRC session. ;;;### (autoloads (org-export-as-pdf-and-open org-export-as-pdf org-export-as-latex ;;;;;; org-export-region-as-latex org-replace-region-by-latex org-export-as-latex-to-buffer ;;;;;; org-export-as-latex-batch) "org-latex" "org/org-latex.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-latex.el (autoload 'org-export-as-latex-batch "org-latex" "\ @@ -21184,7 +21184,7 @@ Export as LaTeX, then process through to PDF, and open. ;;;### (autoloads (org-lparse-region org-replace-region-by org-lparse-to-buffer ;;;;;; org-lparse-batch org-lparse-and-open) "org-lparse" "org/org-lparse.el" -;;;;;; (20420 42151)) +;;;;;; (20415 27188)) ;;; Generated autoloads from org/org-lparse.el (autoload 'org-lparse-and-open "org-lparse" "\ @@ -21241,8 +21241,8 @@ in a window. A non-interactive call will only return the buffer. ;;;*** ;;;### (autoloads (org-mobile-create-sumo-agenda org-mobile-pull -;;;;;; org-mobile-push) "org-mobile" "org/org-mobile.el" (20352 -;;;;;; 65510)) +;;;;;; org-mobile-push) "org-mobile" "org/org-mobile.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from org/org-mobile.el (autoload 'org-mobile-push "org-mobile" "\ @@ -21268,7 +21268,7 @@ Create a file that contains all custom agenda views. ;;;### (autoloads (org-export-as-odf-and-open org-export-as-odf org-export-odt-convert ;;;;;; org-export-as-odt org-export-as-odt-batch org-export-as-odt-and-open) -;;;;;; "org-odt" "org/org-odt.el" (20420 42151)) +;;;;;; "org-odt" "org/org-odt.el" (20415 63769)) ;;; Generated autoloads from org/org-odt.el (autoload 'org-export-as-odt-and-open "org-odt" "\ @@ -21338,7 +21338,7 @@ formula file. ;;;*** ;;;### (autoloads (org-plot/gnuplot) "org-plot" "org/org-plot.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-plot.el (autoload 'org-plot/gnuplot "org-plot" "\ @@ -21352,7 +21352,7 @@ line directly before or after the table. ;;;### (autoloads (org-publish-current-project org-publish-current-file ;;;;;; org-publish-all org-publish) "org-publish" "org/org-publish.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-publish.el (defalias 'org-publish-project 'org-publish) @@ -21386,7 +21386,7 @@ the project. ;;;### (autoloads (org-remember-handler org-remember org-remember-apply-template ;;;;;; org-remember-annotation org-remember-insinuate) "org-remember" -;;;;;; "org/org-remember.el" (20352 65510)) +;;;;;; "org/org-remember.el" (20355 10320)) ;;; Generated autoloads from org/org-remember.el (autoload 'org-remember-insinuate "org-remember" "\ @@ -21462,7 +21462,7 @@ See also the variable `org-reverse-note-order'. ;;;*** ;;;### (autoloads (org-table-to-lisp orgtbl-mode turn-on-orgtbl) -;;;;;; "org-table" "org/org-table.el" (20404 23547)) +;;;;;; "org-table" "org/org-table.el" (20404 56885)) ;;; Generated autoloads from org/org-table.el (autoload 'turn-on-orgtbl "org-table" "\ @@ -21486,7 +21486,7 @@ The table is taken from the parameter TXT, or from the buffer at point. ;;;*** ;;;### (autoloads (org-export-as-taskjuggler-and-open org-export-as-taskjuggler) -;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (20352 65510)) +;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (20355 10320)) ;;; Generated autoloads from org/org-taskjuggler.el (autoload 'org-export-as-taskjuggler "org-taskjuggler" "\ @@ -21514,7 +21514,7 @@ with the TaskJuggler GUI. ;;;### (autoloads (org-timer-set-timer org-timer-item org-timer-change-times-in-region ;;;;;; org-timer org-timer-start) "org-timer" "org/org-timer.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-timer.el (autoload 'org-timer-start "org-timer" "\ @@ -21575,7 +21575,7 @@ replace any running timer. ;;;*** ;;;### (autoloads (org-export-as-xoxo) "org-xoxo" "org/org-xoxo.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from org/org-xoxo.el (autoload 'org-export-as-xoxo "org-xoxo" "\ @@ -21587,7 +21587,7 @@ The XOXO buffer is named *xoxo-* ;;;*** ;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from outline.el (put 'outline-regexp 'safe-local-variable 'stringp) (put 'outline-heading-end-regexp 'safe-local-variable 'stringp) @@ -21651,7 +21651,7 @@ See the command `outline-mode' for more information on this mode. ;;;### (autoloads (list-packages describe-package package-initialize ;;;;;; package-refresh-contents package-install-file package-install-from-buffer ;;;;;; package-install package-enable-at-startup) "package" "emacs-lisp/package.el" -;;;;;; (20400 62402)) +;;;;;; (20390 23986)) ;;; Generated autoloads from emacs-lisp/package.el (defvar package-enable-at-startup t "\ @@ -21721,7 +21721,7 @@ The list is displayed in a buffer named `*Packages*'. ;;;*** -;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20400 62402)) +;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20355 10320)) ;;; Generated autoloads from paren.el (defvar show-paren-mode nil "\ @@ -21748,7 +21748,7 @@ matching parenthesis is highlighted in `show-paren-style' after ;;;*** ;;;### (autoloads (parse-time-string) "parse-time" "calendar/parse-time.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from calendar/parse-time.el (put 'parse-time-rules 'risky-local-variable t) @@ -21761,8 +21761,8 @@ unknown are returned as nil. ;;;*** -;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/pascal.el (autoload 'pascal-mode "pascal" "\ @@ -21815,7 +21815,7 @@ no args, if that value is non-nil. ;;;*** ;;;### (autoloads (password-in-cache-p password-cache-expiry password-cache) -;;;;;; "password-cache" "password-cache.el" (20352 65510)) +;;;;;; "password-cache" "password-cache.el" (20355 10320)) ;;; Generated autoloads from password-cache.el (defvar password-cache t "\ @@ -21837,7 +21837,7 @@ Check if KEY is in the cache. ;;;*** ;;;### (autoloads (pcase-let pcase-let* pcase) "pcase" "emacs-lisp/pcase.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/pcase.el (autoload 'pcase "pcase" "\ @@ -21896,8 +21896,8 @@ of the form (UPAT EXP). ;;;*** -;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from pcmpl-cvs.el (autoload 'pcomplete/cvs "pcmpl-cvs" "\ @@ -21908,7 +21908,7 @@ Completion rules for the `cvs' command. ;;;*** ;;;### (autoloads (pcomplete/tar pcomplete/make pcomplete/bzip2 pcomplete/gzip) -;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (20352 65510)) +;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (20355 10320)) ;;; Generated autoloads from pcmpl-gnu.el (autoload 'pcomplete/gzip "pcmpl-gnu" "\ @@ -21936,7 +21936,7 @@ Completion for the GNU tar utility. ;;;*** ;;;### (autoloads (pcomplete/mount pcomplete/umount pcomplete/kill) -;;;;;; "pcmpl-linux" "pcmpl-linux.el" (20352 65510)) +;;;;;; "pcmpl-linux" "pcmpl-linux.el" (20355 10320)) ;;; Generated autoloads from pcmpl-linux.el (autoload 'pcomplete/kill "pcmpl-linux" "\ @@ -21956,8 +21956,8 @@ Completion for GNU/Linux `mount'. ;;;*** -;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from pcmpl-rpm.el (autoload 'pcomplete/rpm "pcmpl-rpm" "\ @@ -21969,7 +21969,7 @@ Completion for the `rpm' command. ;;;### (autoloads (pcomplete/scp pcomplete/ssh pcomplete/chgrp pcomplete/chown ;;;;;; pcomplete/which pcomplete/xargs pcomplete/rm pcomplete/rmdir -;;;;;; pcomplete/cd) "pcmpl-unix" "pcmpl-unix.el" (20400 62402)) +;;;;;; pcomplete/cd) "pcmpl-unix" "pcmpl-unix.el" (20355 10320)) ;;; Generated autoloads from pcmpl-unix.el (autoload 'pcomplete/cd "pcmpl-unix" "\ @@ -22026,8 +22026,8 @@ Includes files as well as host names followed by a colon. ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete -;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20400 -;;;;;; 62402)) +;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from pcomplete.el (autoload 'pcomplete "pcomplete" "\ @@ -22086,7 +22086,7 @@ Setup `shell-mode' to use pcomplete. ;;;### (autoloads (cvs-dired-use-hook cvs-dired-action cvs-status ;;;;;; cvs-update cvs-examine cvs-quickdir cvs-checkout) "pcvs" -;;;;;; "vc/pcvs.el" (20400 62402)) +;;;;;; "vc/pcvs.el" (20355 10320)) ;;; Generated autoloads from vc/pcvs.el (autoload 'cvs-checkout "pcvs" "\ @@ -22161,7 +22161,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** -;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (20400 62402)) +;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (20355 10320)) ;;; Generated autoloads from vc/pcvs-defs.el (defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] `(menu-item ,(purecopy "Directory Status") cvs-status :help ,(purecopy "A more verbose status of a workarea"))) (define-key m [checkout] `(menu-item ,(purecopy "Checkout Module") cvs-checkout :help ,(purecopy "Check out a module from the repository"))) (define-key m [update] `(menu-item ,(purecopy "Update Directory") cvs-update :help ,(purecopy "Fetch updates from the repository"))) (define-key m [examine] `(menu-item ,(purecopy "Examine Directory") cvs-examine :help ,(purecopy "Examine the current state of a workarea"))) (fset 'cvs-global-menu m)) "\ @@ -22170,7 +22170,7 @@ Global menu used by PCL-CVS.") ;;;*** ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/perl-mode.el (put 'perl-indent-level 'safe-local-variable 'integerp) (put 'perl-continued-statement-offset 'safe-local-variable 'integerp) @@ -22232,7 +22232,7 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'. ;;;*** ;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el" -;;;;;; (20400 62402)) +;;;;;; (20544 62870)) ;;; Generated autoloads from textmodes/picture.el (autoload 'picture-mode "picture" "\ @@ -22312,8 +22312,8 @@ they are not by default assigned to keys. ;;;*** -;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/plstore.el (autoload 'plstore-open "plstore" "\ @@ -22324,7 +22324,7 @@ Create a plstore instance associated with FILE. ;;;*** ;;;### (autoloads (po-find-file-coding-system) "po" "textmodes/po.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/po.el (autoload 'po-find-file-coding-system "po" "\ @@ -22335,7 +22335,7 @@ Called through `file-coding-system-alist', before the file is visited for real. ;;;*** -;;;### (autoloads (pong) "pong" "play/pong.el" (20352 65510)) +;;;### (autoloads (pong) "pong" "play/pong.el" (20355 10320)) ;;; Generated autoloads from play/pong.el (autoload 'pong "pong" "\ @@ -22351,7 +22351,7 @@ pong-mode keybindings:\\ ;;;*** -;;;### (autoloads (pop3-movemail) "pop3" "gnus/pop3.el" (20352 65510)) +;;;### (autoloads (pop3-movemail) "pop3" "gnus/pop3.el" (20355 10320)) ;;; Generated autoloads from gnus/pop3.el (autoload 'pop3-movemail "pop3" "\ @@ -22364,7 +22364,7 @@ Use streaming commands. ;;;### (autoloads (pp-macroexpand-last-sexp pp-eval-last-sexp pp-macroexpand-expression ;;;;;; pp-eval-expression pp pp-buffer pp-to-string) "pp" "emacs-lisp/pp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/pp.el (autoload 'pp-to-string "pp" "\ @@ -22432,7 +22432,7 @@ Ignores leading comment characters. ;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview ;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript ;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from printing.el (autoload 'pr-interface "printing" "\ @@ -23019,7 +23019,7 @@ are both set to t. ;;;*** -;;;### (autoloads (proced) "proced" "proced.el" (20352 65510)) +;;;### (autoloads (proced) "proced" "proced.el" (20355 10320)) ;;; Generated autoloads from proced.el (autoload 'proced "proced" "\ @@ -23035,7 +23035,7 @@ See `proced-mode' for a description of features available in Proced buffers. ;;;*** ;;;### (autoloads (run-prolog mercury-mode prolog-mode) "prolog" -;;;;;; "progmodes/prolog.el" (20400 62402)) +;;;;;; "progmodes/prolog.el" (20355 10320)) ;;; Generated autoloads from progmodes/prolog.el (autoload 'prolog-mode "prolog" "\ @@ -23070,8 +23070,8 @@ With prefix argument ARG, restart the Prolog process if running before. ;;;*** -;;;### (autoloads (bdf-directory-list) "ps-bdf" "ps-bdf.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (bdf-directory-list) "ps-bdf" "ps-bdf.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from ps-bdf.el (defvar bdf-directory-list (if (memq system-type '(ms-dos windows-nt)) (list (expand-file-name "fonts/bdf" installation-directory)) '("/usr/local/share/emacs/fonts/bdf")) "\ @@ -23082,8 +23082,8 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") ;;;*** -;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/ps-mode.el (autoload 'ps-mode "ps-mode" "\ @@ -23134,8 +23134,8 @@ Typing \\\\[ps-run-goto-error] when the cursor is at the number ;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type -;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (20352 -;;;;;; 65510)) +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from ps-print.el (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\ @@ -23332,7 +23332,7 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** ;;;### (autoloads (jython-mode python-mode python-after-info-look -;;;;;; run-python) "python" "progmodes/python.el" (20400 62402)) +;;;;;; run-python) "python" "progmodes/python.el" (20355 10320)) ;;; Generated autoloads from progmodes/python.el (add-to-list 'interpreter-mode-alist (cons (purecopy "jython") 'jython-mode)) @@ -23418,7 +23418,7 @@ Runs `jython-mode-hook' after `python-mode-hook'. ;;;*** ;;;### (autoloads (quoted-printable-decode-region) "qp" "gnus/qp.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/qp.el (autoload 'quoted-printable-decode-region "qp" "\ @@ -23441,7 +23441,7 @@ them into characters should be done separately. ;;;;;; quail-defrule quail-install-decode-map quail-install-map ;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout ;;;;;; quail-define-package quail-use-package quail-title) "quail" -;;;;;; "international/quail.el" (20400 62402)) +;;;;;; "international/quail.el" (20355 10320)) ;;; Generated autoloads from international/quail.el (autoload 'quail-title "quail" "\ @@ -23672,8 +23672,8 @@ of each directory. ;;;### (autoloads (quickurl-list quickurl-list-mode quickurl-edit-urls ;;;;;; quickurl-browse-url-ask quickurl-browse-url quickurl-add-url -;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (20400 -;;;;;; 62402)) +;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from net/quickurl.el (defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))\n;; End:\n" "\ @@ -23745,7 +23745,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'. ;;;*** ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc" -;;;;;; "net/rcirc.el" (20523 50225)) +;;;;;; "net/rcirc.el" (20523 61801)) ;;; Generated autoloads from net/rcirc.el (autoload 'rcirc "rcirc" "\ @@ -23783,8 +23783,8 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from net/rcompile.el (autoload 'remote-compile "rcompile" "\ @@ -23796,7 +23796,7 @@ See \\[compile]. ;;;*** ;;;### (autoloads (re-builder) "re-builder" "emacs-lisp/re-builder.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/re-builder.el (defalias 'regexp-builder 're-builder) @@ -23814,7 +23814,7 @@ matching parts of the target buffer will be highlighted. ;;;*** -;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (20400 62402)) +;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (20355 10320)) ;;; Generated autoloads from recentf.el (defvar recentf-mode nil "\ @@ -23844,7 +23844,7 @@ were operated on recently. ;;;;;; string-rectangle delete-whitespace-rectangle open-rectangle ;;;;;; insert-rectangle yank-rectangle kill-rectangle extract-rectangle ;;;;;; delete-extract-rectangle delete-rectangle) "rect" "rect.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from rect.el (define-key ctl-x-r-map "c" 'clear-rectangle) (define-key ctl-x-r-map "k" 'kill-rectangle) @@ -23980,8 +23980,8 @@ with a prefix argument, prompt for START-AT and FORMAT. ;;;*** -;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from textmodes/refill.el (autoload 'refill-mode "refill" "\ @@ -24002,7 +24002,7 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead. ;;;*** ;;;### (autoloads (reftex-reset-scanning-information reftex-mode -;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20352 65510)) +;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20355 10320)) ;;; Generated autoloads from textmodes/reftex.el (autoload 'turn-on-reftex "reftex" "\ @@ -24058,7 +24058,7 @@ This enforces rescanning the buffer on next use. ;;;*** ;;;### (autoloads (reftex-citation) "reftex-cite" "textmodes/reftex-cite.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/reftex-cite.el (autoload 'reftex-citation "reftex-cite" "\ @@ -24088,7 +24088,7 @@ While entering the regexp, completion on knows citation keys is possible. ;;;*** ;;;### (autoloads (reftex-isearch-minor-mode) "reftex-global" "textmodes/reftex-global.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/reftex-global.el (autoload 'reftex-isearch-minor-mode "reftex-global" "\ @@ -24105,7 +24105,7 @@ With no argument, this command toggles ;;;*** ;;;### (autoloads (reftex-index-phrases-mode) "reftex-index" "textmodes/reftex-index.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/reftex-index.el (autoload 'reftex-index-phrases-mode "reftex-index" "\ @@ -24138,7 +24138,7 @@ Here are all local bindings. ;;;*** ;;;### (autoloads (reftex-all-document-files) "reftex-parse" "textmodes/reftex-parse.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/reftex-parse.el (autoload 'reftex-all-document-files "reftex-parse" "\ @@ -24150,8 +24150,8 @@ of master file. ;;;*** -;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20400 -;;;;;; 62402)) +;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from textmodes/reftex-vars.el (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) @@ -24161,7 +24161,7 @@ of master file. ;;;*** ;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/regexp-opt.el (autoload 'regexp-opt "regexp-opt" "\ @@ -24192,7 +24192,7 @@ This means the number of non-shy regexp grouping constructs ;;;### (autoloads (remember-diary-extract-entries remember-clipboard ;;;;;; remember-other-frame remember) "remember" "textmodes/remember.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/remember.el (autoload 'remember "remember" "\ @@ -24223,7 +24223,7 @@ Extract diary entries from the region. ;;;*** -;;;### (autoloads (repeat) "repeat" "repeat.el" (20400 62402)) +;;;### (autoloads (repeat) "repeat" "repeat.el" (20355 10320)) ;;; Generated autoloads from repeat.el (autoload 'repeat "repeat" "\ @@ -24246,7 +24246,7 @@ recently executed command not bound to an input event\". ;;;*** ;;;### (autoloads (reporter-submit-bug-report) "reporter" "mail/reporter.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/reporter.el (autoload 'reporter-submit-bug-report "reporter" "\ @@ -24278,7 +24278,7 @@ mail-sending package is used for editing and sending the message. ;;;*** ;;;### (autoloads (reposition-window) "reposition" "reposition.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from reposition.el (autoload 'reposition-window "reposition" "\ @@ -24305,7 +24305,7 @@ first comment line visible (if point is in a comment). ;;;*** ;;;### (autoloads (global-reveal-mode reveal-mode) "reveal" "reveal.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from reveal.el (autoload 'reveal-mode "reveal" "\ @@ -24341,7 +24341,7 @@ the mode if ARG is omitted or nil. ;;;*** ;;;### (autoloads (make-ring ring-p) "ring" "emacs-lisp/ring.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/ring.el (autoload 'ring-p "ring" "\ @@ -24356,7 +24356,7 @@ Make a ring that can contain SIZE elements. ;;;*** -;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (20398 608)) +;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (20398 18099)) ;;; Generated autoloads from net/rlogin.el (autoload 'rlogin "rlogin" "\ @@ -24405,7 +24405,7 @@ variable. ;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers ;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers ;;;;;; rmail-user-mail-address-regexp rmail-movemail-variant-p) -;;;;;; "rmail" "mail/rmail.el" (20436 17935)) +;;;;;; "rmail" "mail/rmail.el" (20436 33338)) ;;; Generated autoloads from mail/rmail.el (autoload 'rmail-movemail-variant-p "rmail" "\ @@ -24589,7 +24589,7 @@ Set PASSWORD to be used for retrieving mail from a POP or IMAP server. ;;;*** ;;;### (autoloads (rmail-output-body-to-file rmail-output-as-seen -;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20352 65510)) +;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20355 10320)) ;;; Generated autoloads from mail/rmailout.el (put 'rmail-output-file-alist 'risky-local-variable t) @@ -24654,7 +24654,7 @@ than appending to it. Deletes the message after writing if ;;;*** ;;;### (autoloads (rng-c-load-schema) "rng-cmpct" "nxml/rng-cmpct.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from nxml/rng-cmpct.el (autoload 'rng-c-load-schema "rng-cmpct" "\ @@ -24666,7 +24666,7 @@ Return a pattern. ;;;*** ;;;### (autoloads (rng-nxml-mode-init) "rng-nxml" "nxml/rng-nxml.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from nxml/rng-nxml.el (autoload 'rng-nxml-mode-init "rng-nxml" "\ @@ -24679,7 +24679,7 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil. ;;;*** ;;;### (autoloads (rng-validate-mode) "rng-valid" "nxml/rng-valid.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from nxml/rng-valid.el (autoload 'rng-validate-mode "rng-valid" "\ @@ -24709,8 +24709,8 @@ to use for finding the schema. ;;;*** -;;;### (autoloads (rng-xsd-compile) "rng-xsd" "nxml/rng-xsd.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (rng-xsd-compile) "rng-xsd" "nxml/rng-xsd.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from nxml/rng-xsd.el (put 'http://www\.w3\.org/2001/XMLSchema-datatypes 'rng-dt-compile 'rng-xsd-compile) @@ -24738,7 +24738,7 @@ must be equal. ;;;*** ;;;### (autoloads (robin-use-package robin-modify-package robin-define-package) -;;;;;; "robin" "international/robin.el" (20352 65510)) +;;;;;; "robin" "international/robin.el" (20355 10320)) ;;; Generated autoloads from international/robin.el (autoload 'robin-define-package "robin" "\ @@ -24771,7 +24771,7 @@ Start using robin package NAME, which is a string. ;;;*** ;;;### (autoloads (toggle-rot13-mode rot13-other-window rot13-region -;;;;;; rot13-string rot13) "rot13" "rot13.el" (20352 65510)) +;;;;;; rot13-string rot13) "rot13" "rot13.el" (20355 10320)) ;;; Generated autoloads from rot13.el (autoload 'rot13 "rot13" "\ @@ -24809,7 +24809,7 @@ Toggle the use of ROT13 encoding for the current window. ;;;*** ;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/rst.el (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) @@ -24846,7 +24846,7 @@ for modes derived from Text mode, like Mail mode. ;;;*** ;;;### (autoloads (ruby-mode) "ruby-mode" "progmodes/ruby-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/ruby-mode.el (autoload 'ruby-mode "ruby-mode" "\ @@ -24867,8 +24867,8 @@ The variable `ruby-indent-level' controls the amount of indentation. ;;;*** -;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from ruler-mode.el (defvar ruler-mode nil "\ @@ -24885,8 +24885,8 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/rx.el (autoload 'rx-to-string "rx" "\ @@ -25197,8 +25197,8 @@ enclosed in `(and ...)'. ;;;*** -;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from savehist.el (defvar savehist-mode nil "\ @@ -25230,7 +25230,7 @@ histories, which is probably undesirable. ;;;*** ;;;### (autoloads (dsssl-mode scheme-mode) "scheme" "progmodes/scheme.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/scheme.el (autoload 'scheme-mode "scheme" "\ @@ -25272,7 +25272,7 @@ that variable's value is a string. ;;;*** ;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/score-mode.el (autoload 'gnus-score-mode "score-mode" "\ @@ -25286,7 +25286,7 @@ This mode is an extended emacs-lisp mode. ;;;*** ;;;### (autoloads (scroll-all-mode) "scroll-all" "scroll-all.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from scroll-all.el (defvar scroll-all-mode nil "\ @@ -25312,7 +25312,7 @@ one window apply to all visible windows in the same frame. ;;;*** ;;;### (autoloads (scroll-lock-mode) "scroll-lock" "scroll-lock.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from scroll-lock.el (autoload 'scroll-lock-mode "scroll-lock" "\ @@ -25328,7 +25328,7 @@ vertically fixed relative to window boundaries during scrolling. ;;;*** -;;;### (autoloads nil "secrets" "net/secrets.el" (20352 65510)) +;;;### (autoloads nil "secrets" "net/secrets.el" (20355 10320)) ;;; Generated autoloads from net/secrets.el (when (featurep 'dbusbind) (autoload 'secrets-show-secrets "secrets" nil t)) @@ -25336,7 +25336,7 @@ vertically fixed relative to window boundaries during scrolling. ;;;*** ;;;### (autoloads (semantic-mode semantic-default-submodes) "semantic" -;;;;;; "cedet/semantic.el" (20400 62402)) +;;;;;; "cedet/semantic.el" (20355 10320)) ;;; Generated autoloads from cedet/semantic.el (defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\ @@ -25390,7 +25390,7 @@ Semantic mode. ;;;;;; mail-personal-alias-file mail-default-reply-to mail-archive-file-name ;;;;;; mail-header-separator send-mail-function mail-interactive ;;;;;; mail-self-blind mail-specify-envelope-from mail-from-style) -;;;;;; "sendmail" "mail/sendmail.el" (20420 42151)) +;;;;;; "sendmail" "mail/sendmail.el" (20406 12211)) ;;; Generated autoloads from mail/sendmail.el (defvar mail-from-style 'default "\ @@ -25672,8 +25672,8 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** ;;;### (autoloads (server-save-buffers-kill-terminal server-mode -;;;;;; server-force-delete server-start) "server" "server.el" (20400 -;;;;;; 62402)) +;;;;;; server-force-delete server-start) "server" "server.el" (20362 +;;;;;; 44597)) ;;; Generated autoloads from server.el (put 'server-host 'risky-local-variable t) @@ -25740,7 +25740,7 @@ only these files will be asked to be saved. ;;;*** -;;;### (autoloads (ses-mode) "ses" "ses.el" (20400 62402)) +;;;### (autoloads (ses-mode) "ses" "ses.el" (20355 10320)) ;;; Generated autoloads from ses.el (autoload 'ses-mode "ses" "\ @@ -25759,7 +25759,7 @@ These are active only in the minibuffer, when entering or editing a formula: ;;;*** ;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/sgml-mode.el (autoload 'sgml-mode "sgml-mode" "\ @@ -25825,7 +25825,7 @@ To work around that, do: ;;;*** ;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el" -;;;;;; (20487 24216)) +;;;;;; (20542 48866)) ;;; Generated autoloads from progmodes/sh-script.el (put 'sh-shell 'safe-local-variable 'symbolp) @@ -25890,7 +25890,7 @@ with your script for an edit-interpret-debug cycle. ;;;*** ;;;### (autoloads (list-load-path-shadows) "shadow" "emacs-lisp/shadow.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/shadow.el (autoload 'list-load-path-shadows "shadow" "\ @@ -25940,8 +25940,8 @@ function, `load-path-shadows-find'. ;;;*** ;;;### (autoloads (shadow-initialize shadow-define-regexp-group shadow-define-literal-group -;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (20352 -;;;;;; 65510)) +;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from shadowfile.el (autoload 'shadow-define-cluster "shadowfile" "\ @@ -25980,7 +25980,7 @@ Set up file shadowing. ;;;*** ;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el" -;;;;;; (20396 34067)) +;;;;;; (20395 41908)) ;;; Generated autoloads from shell.el (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\ @@ -26028,8 +26028,8 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** -;;;### (autoloads (shr-insert-document) "shr" "gnus/shr.el" (20487 -;;;;;; 24216)) +;;;### (autoloads (shr-insert-document) "shr" "gnus/shr.el" (20476 +;;;;;; 3891)) ;;; Generated autoloads from gnus/shr.el (autoload 'shr-insert-document "shr" "\ @@ -26042,7 +26042,7 @@ DOM should be a parse tree as generated by ;;;*** ;;;### (autoloads (sieve-upload-and-bury sieve-upload sieve-manage) -;;;;;; "sieve" "gnus/sieve.el" (20352 65510)) +;;;;;; "sieve" "gnus/sieve.el" (20355 10320)) ;;; Generated autoloads from gnus/sieve.el (autoload 'sieve-manage "sieve" "\ @@ -26063,7 +26063,7 @@ DOM should be a parse tree as generated by ;;;*** ;;;### (autoloads (sieve-mode) "sieve-mode" "gnus/sieve-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/sieve-mode.el (autoload 'sieve-mode "sieve-mode" "\ @@ -26078,8 +26078,8 @@ Turning on Sieve mode runs `sieve-mode-hook'. ;;;*** -;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from progmodes/simula.el (autoload 'simula-mode "simula" "\ @@ -26128,7 +26128,7 @@ with no arguments, if that value is non-nil. ;;;*** ;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new -;;;;;; define-skeleton) "skeleton" "skeleton.el" (20400 62402)) +;;;;;; define-skeleton) "skeleton" "skeleton.el" (20539 22323)) ;;; Generated autoloads from skeleton.el (defvar skeleton-filter-function 'identity "\ @@ -26238,7 +26238,7 @@ symmetrical ones, and the same character twice for the others. ;;;*** ;;;### (autoloads (smerge-start-session smerge-mode smerge-ediff) -;;;;;; "smerge-mode" "vc/smerge-mode.el" (20400 62402)) +;;;;;; "smerge-mode" "vc/smerge-mode.el" (20355 10320)) ;;; Generated autoloads from vc/smerge-mode.el (autoload 'smerge-ediff "smerge-mode" "\ @@ -26266,7 +26266,7 @@ If no conflict maker is found, turn off `smerge-mode'. ;;;*** ;;;### (autoloads (smiley-buffer smiley-region) "smiley" "gnus/smiley.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/smiley.el (autoload 'smiley-region "smiley" "\ @@ -26284,7 +26284,7 @@ interactively. If there's no argument, do it at the current buffer. ;;;*** ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" -;;;;;; "mail/smtpmail.el" (20396 34067)) +;;;;;; "mail/smtpmail.el" (20395 41908)) ;;; Generated autoloads from mail/smtpmail.el (autoload 'smtpmail-send-it "smtpmail" "\ @@ -26299,7 +26299,7 @@ Send mail that was queued as a result of setting `smtpmail-queue-mail'. ;;;*** -;;;### (autoloads (snake) "snake" "play/snake.el" (20352 65510)) +;;;### (autoloads (snake) "snake" "play/snake.el" (20355 10320)) ;;; Generated autoloads from play/snake.el (autoload 'snake "snake" "\ @@ -26323,7 +26323,7 @@ Snake mode keybindings: ;;;*** ;;;### (autoloads (snmpv2-mode snmp-mode) "snmp-mode" "net/snmp-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/snmp-mode.el (autoload 'snmp-mode "snmp-mode" "\ @@ -26352,8 +26352,8 @@ then `snmpv2-mode-hook'. ;;;*** -;;;### (autoloads (sunrise-sunset) "solar" "calendar/solar.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (sunrise-sunset) "solar" "calendar/solar.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from calendar/solar.el (autoload 'sunrise-sunset "solar" "\ @@ -26368,8 +26368,8 @@ This function is suitable for execution in a .emacs file. ;;;*** -;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from play/solitaire.el (autoload 'solitaire "solitaire" "\ @@ -26446,7 +26446,7 @@ Pick your favorite shortcuts: ;;;### (autoloads (reverse-region sort-columns sort-regexp-fields ;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs -;;;;;; sort-lines sort-subr) "sort" "sort.el" (20352 65510)) +;;;;;; sort-lines sort-subr) "sort" "sort.el" (20355 10320)) ;;; Generated autoloads from sort.el (put 'sort-fold-case 'safe-local-variable 'booleanp) @@ -26590,8 +26590,8 @@ From a program takes two point or marker arguments, BEG and END. ;;;*** -;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from gnus/spam.el (autoload 'spam-initialize "spam" "\ @@ -26607,7 +26607,7 @@ installed through `spam-necessary-extra-headers'. ;;;### (autoloads (spam-report-deagentize spam-report-agentize spam-report-url-to-file ;;;;;; spam-report-url-ping-mm-url spam-report-process-queue) "spam-report" -;;;;;; "gnus/spam-report.el" (20352 65510)) +;;;;;; "gnus/spam-report.el" (20355 10320)) ;;; Generated autoloads from gnus/spam-report.el (autoload 'spam-report-process-queue "spam-report" "\ @@ -26650,7 +26650,7 @@ Spam reports will be queued with the method used when ;;;*** ;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar" -;;;;;; "speedbar.el" (20400 62402)) +;;;;;; "speedbar.el" (20355 10320)) ;;; Generated autoloads from speedbar.el (defalias 'speedbar 'speedbar-frame-mode) @@ -26674,8 +26674,8 @@ selected. If the speedbar frame is active, then select the attached frame. ;;;*** -;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from play/spook.el (autoload 'spook "spook" "\ @@ -26694,7 +26694,7 @@ Return a vector containing the lines from `spook-phrases-file'. ;;;;;; sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix ;;;;;; sql-sybase sql-oracle sql-product-interactive sql-connect ;;;;;; sql-mode sql-help sql-add-product-keywords) "sql" "progmodes/sql.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/sql.el (autoload 'sql-add-product-keywords "sql" "\ @@ -27190,7 +27190,7 @@ buffer. ;;;*** ;;;### (autoloads (srecode-template-mode) "srecode/srt-mode" "cedet/srecode/srt-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from cedet/srecode/srt-mode.el (autoload 'srecode-template-mode "srecode/srt-mode" "\ @@ -27203,7 +27203,7 @@ Major-mode for writing SRecode macros. ;;;*** ;;;### (autoloads (starttls-open-stream) "starttls" "gnus/starttls.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from gnus/starttls.el (autoload 'starttls-open-stream "starttls" "\ @@ -27230,8 +27230,8 @@ GnuTLS requires a port number. ;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes ;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke ;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke -;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20352 -;;;;;; 65510)) +;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from strokes.el (autoload 'strokes-global-set-stroke "strokes" "\ @@ -27345,7 +27345,7 @@ Read a complex stroke and insert its glyph into the current buffer. ;;;*** ;;;### (autoloads (studlify-buffer studlify-word studlify-region) -;;;;;; "studly" "play/studly.el" (20352 65510)) +;;;;;; "studly" "play/studly.el" (20355 10320)) ;;; Generated autoloads from play/studly.el (autoload 'studlify-region "studly" "\ @@ -27366,7 +27366,7 @@ Studlify-case the current buffer. ;;;*** ;;;### (autoloads (global-subword-mode subword-mode) "subword" "progmodes/subword.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/subword.el (autoload 'subword-mode "subword" "\ @@ -27422,7 +27422,7 @@ See `subword-mode' for more information on Subword mode. ;;;*** ;;;### (autoloads (sc-cite-original) "supercite" "mail/supercite.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/supercite.el (autoload 'sc-cite-original "supercite" "\ @@ -27454,8 +27454,8 @@ and `sc-post-hook' is run after the guts of this function. ;;;*** -;;;### (autoloads (gpm-mouse-mode) "t-mouse" "t-mouse.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (gpm-mouse-mode) "t-mouse" "t-mouse.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from t-mouse.el (define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1") @@ -27483,7 +27483,7 @@ It relies on the `gpm' daemon being activated. ;;;*** -;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (20352 65510)) +;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (20355 10320)) ;;; Generated autoloads from tabify.el (autoload 'untabify "tabify" "\ @@ -27518,7 +27518,7 @@ The variable `tab-width' controls the spacing of tab stops. ;;;;;; table-recognize table-insert-row-column table-insert-column ;;;;;; table-insert-row table-insert table-point-left-cell-hook ;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook) -;;;;;; "table" "textmodes/table.el" (20400 62402)) +;;;;;; "table" "textmodes/table.el" (20355 10320)) ;;; Generated autoloads from textmodes/table.el (defvar table-cell-map-hook nil "\ @@ -28107,7 +28107,7 @@ converts a table into plain text without frames. It is a companion to ;;;*** ;;;### (autoloads (tabulated-list-mode) "tabulated-list" "emacs-lisp/tabulated-list.el" -;;;;;; (20400 62402)) +;;;;;; (20366 41661)) ;;; Generated autoloads from emacs-lisp/tabulated-list.el (autoload 'tabulated-list-mode "tabulated-list" "\ @@ -28149,7 +28149,7 @@ as the ewoc pretty-printer. ;;;*** -;;;### (autoloads (talk talk-connect) "talk" "talk.el" (20352 65510)) +;;;### (autoloads (talk talk-connect) "talk" "talk.el" (20355 10320)) ;;; Generated autoloads from talk.el (autoload 'talk-connect "talk" "\ @@ -28164,7 +28164,7 @@ Connect to the Emacs talk group from the current X display or tty frame. ;;;*** -;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20400 62402)) +;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20355 10320)) ;;; Generated autoloads from tar-mode.el (autoload 'tar-mode "tar-mode" "\ @@ -28188,7 +28188,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. ;;;*** ;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" -;;;;;; "progmodes/tcl.el" (20400 62402)) +;;;;;; "progmodes/tcl.el" (20355 10320)) ;;; Generated autoloads from progmodes/tcl.el (autoload 'tcl-mode "tcl" "\ @@ -28236,7 +28236,7 @@ Prefix argument means invert sense of `tcl-use-smart-word-finder'. ;;;*** -;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (20352 65510)) +;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (20355 10320)) ;;; Generated autoloads from net/telnet.el (autoload 'telnet "telnet" "\ @@ -28262,7 +28262,7 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** ;;;### (autoloads (serial-term ansi-term term make-term) "term" "term.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from term.el (autoload 'make-term "term" "\ @@ -28304,8 +28304,8 @@ use in that buffer. ;;;*** -;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from terminal.el (autoload 'terminal-emulator "terminal" "\ @@ -28342,7 +28342,7 @@ subprocess started. ;;;*** ;;;### (autoloads (testcover-this-defun) "testcover" "emacs-lisp/testcover.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/testcover.el (autoload 'testcover-this-defun "testcover" "\ @@ -28352,7 +28352,7 @@ Start coverage on function under point. ;;;*** -;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20352 65510)) +;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20355 10320)) ;;; Generated autoloads from play/tetris.el (autoload 'tetris "tetris" "\ @@ -28383,7 +28383,7 @@ tetris-mode keybindings: ;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command ;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp ;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/tex-mode.el (defvar tex-shell-file-name nil "\ @@ -28685,7 +28685,7 @@ Major mode to edit DocTeX files. ;;;*** ;;;### (autoloads (texi2info texinfo-format-region texinfo-format-buffer) -;;;;;; "texinfmt" "textmodes/texinfmt.el" (20400 62402)) +;;;;;; "texinfmt" "textmodes/texinfmt.el" (20355 10320)) ;;; Generated autoloads from textmodes/texinfmt.el (autoload 'texinfo-format-buffer "texinfmt" "\ @@ -28725,7 +28725,7 @@ if large. You can use `Info-split' to do this manually. ;;;*** ;;;### (autoloads (texinfo-mode texinfo-close-quote texinfo-open-quote) -;;;;;; "texinfo" "textmodes/texinfo.el" (20352 65510)) +;;;;;; "texinfo" "textmodes/texinfo.el" (20355 10320)) ;;; Generated autoloads from textmodes/texinfo.el (defvar texinfo-open-quote (purecopy "``") "\ @@ -28811,7 +28811,7 @@ value of `texinfo-mode-hook'. ;;;### (autoloads (thai-composition-function thai-compose-buffer ;;;;;; thai-compose-string thai-compose-region) "thai-util" "language/thai-util.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from language/thai-util.el (autoload 'thai-compose-region "thai-util" "\ @@ -28840,7 +28840,7 @@ Compose Thai characters in the current buffer. ;;;### (autoloads (list-at-point number-at-point symbol-at-point ;;;;;; sexp-at-point thing-at-point bounds-of-thing-at-point forward-thing) -;;;;;; "thingatpt" "thingatpt.el" (20352 65510)) +;;;;;; "thingatpt" "thingatpt.el" (20355 10320)) ;;; Generated autoloads from thingatpt.el (autoload 'forward-thing "thingatpt" "\ @@ -28903,7 +28903,7 @@ Return the Lisp list at point, or nil if none is found. ;;;### (autoloads (thumbs-dired-setroot thumbs-dired-show thumbs-dired-show-marked ;;;;;; thumbs-show-from-dir thumbs-find-thumb) "thumbs" "thumbs.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from thumbs.el (autoload 'thumbs-find-thumb "thumbs" "\ @@ -28941,8 +28941,8 @@ In dired, call the setroot program on the image at point. ;;;;;; tibetan-post-read-conversion tibetan-compose-buffer tibetan-decompose-buffer ;;;;;; tibetan-decompose-string tibetan-decompose-region tibetan-compose-region ;;;;;; tibetan-compose-string tibetan-transcription-to-tibetan tibetan-tibetan-to-transcription -;;;;;; tibetan-char-p) "tibet-util" "language/tibet-util.el" (20400 -;;;;;; 62402)) +;;;;;; tibetan-char-p) "tibet-util" "language/tibet-util.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from language/tibet-util.el (autoload 'tibetan-char-p "tibet-util" "\ @@ -29016,7 +29016,7 @@ See also docstring of the function tibetan-compose-region. ;;;*** ;;;### (autoloads (tildify-buffer tildify-region) "tildify" "textmodes/tildify.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from textmodes/tildify.el (autoload 'tildify-region "tildify" "\ @@ -29041,7 +29041,7 @@ This function performs no refilling of the changed text. ;;;### (autoloads (emacs-init-time emacs-uptime display-time-world ;;;;;; display-time-mode display-time display-time-day-and-date) -;;;;;; "time" "time.el" (20400 62402)) +;;;;;; "time" "time.el" (20355 10320)) ;;; Generated autoloads from time.el (defvar display-time-day-and-date nil "\ @@ -29107,7 +29107,7 @@ Return a string giving the duration of the Emacs initialization. ;;;;;; time-to-day-in-year date-leap-year-p days-between date-to-day ;;;;;; time-add time-subtract time-since days-to-time time-less-p ;;;;;; seconds-to-time date-to-time) "time-date" "calendar/time-date.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from calendar/time-date.el (autoload 'date-to-time "time-date" "\ @@ -29221,7 +29221,7 @@ This function does not work for SECONDS greater than `most-positive-fixnum'. ;;;*** ;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp" -;;;;;; "time-stamp.el" (20352 65510)) +;;;;;; "time-stamp.el" (20355 10320)) ;;; Generated autoloads from time-stamp.el (put 'time-stamp-format 'safe-local-variable 'stringp) (put 'time-stamp-time-zone 'safe-local-variable 'string-or-null-p) @@ -29265,7 +29265,7 @@ With ARG, turn time stamping on if and only if arg is positive. ;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out ;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in ;;;;;; timeclock-modeline-display) "timeclock" "calendar/timeclock.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from calendar/timeclock.el (autoload 'timeclock-modeline-display "timeclock" "\ @@ -29365,7 +29365,7 @@ relative only to the time worked today, and not to past time. ;;;*** ;;;### (autoloads (batch-titdic-convert titdic-convert) "titdic-cnv" -;;;;;; "international/titdic-cnv.el" (20352 65510)) +;;;;;; "international/titdic-cnv.el" (20355 10320)) ;;; Generated autoloads from international/titdic-cnv.el (autoload 'titdic-convert "titdic-cnv" "\ @@ -29388,7 +29388,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\". ;;;*** ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" -;;;;;; "tmm.el" (20400 62402)) +;;;;;; "tmm.el" (20355 10320)) ;;; Generated autoloads from tmm.el (define-key global-map "\M-`" 'tmm-menubar) (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse) @@ -29428,7 +29428,7 @@ Its value should be an event that has a binding in MENU. ;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities ;;;;;; todo-insert-item todo-add-item-non-interactively todo-add-category) -;;;;;; "todo-mode" "calendar/todo-mode.el" (20352 65510)) +;;;;;; "todo-mode" "calendar/todo-mode.el" (20355 10320)) ;;; Generated autoloads from calendar/todo-mode.el (autoload 'todo-add-category "todo-mode" "\ @@ -29488,7 +29488,7 @@ Show TODO list. ;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu ;;;;;; tool-bar-local-item tool-bar-add-item toggle-tool-bar-mode-from-frame) -;;;;;; "tool-bar" "tool-bar.el" (20352 65510)) +;;;;;; "tool-bar" "tool-bar.el" (20355 10320)) ;;; Generated autoloads from tool-bar.el (autoload 'toggle-tool-bar-mode-from-frame "tool-bar" "\ @@ -29559,7 +29559,7 @@ holds a keymap. ;;;*** ;;;### (autoloads (tpu-edt-on tpu-edt-mode) "tpu-edt" "emulation/tpu-edt.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emulation/tpu-edt.el (defvar tpu-edt-mode nil "\ @@ -29589,7 +29589,7 @@ Turn on TPU/edt emulation. ;;;*** ;;;### (autoloads (tpu-mapper) "tpu-mapper" "emulation/tpu-mapper.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emulation/tpu-mapper.el (autoload 'tpu-mapper "tpu-mapper" "\ @@ -29623,7 +29623,7 @@ your local X guru can try to figure out why the key is being ignored. ;;;*** -;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (20352 65510)) +;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/tq.el (autoload 'tq-create "tq" "\ @@ -29637,7 +29637,7 @@ to a tcp server on another machine. ;;;*** ;;;### (autoloads (trace-function-background trace-function trace-buffer) -;;;;;; "trace" "emacs-lisp/trace.el" (20352 65510)) +;;;;;; "trace" "emacs-lisp/trace.el" (20355 10320)) ;;; Generated autoloads from emacs-lisp/trace.el (defvar trace-buffer (purecopy "*trace-output*") "\ @@ -29674,7 +29674,7 @@ BUFFER defaults to `trace-buffer'. ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion ;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers ;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp" -;;;;;; "net/tramp.el" (20400 62402)) +;;;;;; "net/tramp.el" (20355 10320)) ;;; Generated autoloads from net/tramp.el (defvar tramp-mode t "\ @@ -29807,7 +29807,7 @@ Discard Tramp from loading remote files. ;;;*** ;;;### (autoloads (tramp-ftp-enable-ange-ftp) "tramp-ftp" "net/tramp-ftp.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from net/tramp-ftp.el (autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\ @@ -29817,8 +29817,8 @@ Discard Tramp from loading remote files. ;;;*** -;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20517 -;;;;;; 48515)) +;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20516 +;;;;;; 60858)) ;;; Generated autoloads from tutorial.el (autoload 'help-with-tutorial "tutorial" "\ @@ -29843,7 +29843,7 @@ resumed later. ;;;*** ;;;### (autoloads (tai-viet-composition-function) "tv-util" "language/tv-util.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from language/tv-util.el (autoload 'tai-viet-composition-function "tv-util" "\ @@ -29854,7 +29854,7 @@ resumed later. ;;;*** ;;;### (autoloads (2C-split 2C-associate-buffer 2C-two-columns) "two-column" -;;;;;; "textmodes/two-column.el" (20400 62402)) +;;;;;; "textmodes/two-column.el" (20355 10320)) ;;; Generated autoloads from textmodes/two-column.el (autoload '2C-command "two-column" () t 'keymap) (global-set-key "\C-x6" '2C-command) @@ -29905,7 +29905,7 @@ First column's text sSs Second column's text ;;;;;; type-break type-break-mode type-break-keystroke-threshold ;;;;;; type-break-good-break-interval type-break-good-rest-interval ;;;;;; type-break-interval type-break-mode) "type-break" "type-break.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from type-break.el (defvar type-break-mode nil "\ @@ -30087,7 +30087,7 @@ FRAC should be the inverse of the fractional value; for example, a value of ;;;*** -;;;### (autoloads (uce-reply-to-uce) "uce" "mail/uce.el" (20352 65510)) +;;;### (autoloads (uce-reply-to-uce) "uce" "mail/uce.el" (20355 10320)) ;;; Generated autoloads from mail/uce.el (autoload 'uce-reply-to-uce "uce" "\ @@ -30105,7 +30105,7 @@ You might need to set `uce-mail-reader' before using this. ;;;;;; ucs-normalize-NFKC-string ucs-normalize-NFKC-region ucs-normalize-NFKD-string ;;;;;; ucs-normalize-NFKD-region ucs-normalize-NFC-string ucs-normalize-NFC-region ;;;;;; ucs-normalize-NFD-string ucs-normalize-NFD-region) "ucs-normalize" -;;;;;; "international/ucs-normalize.el" (20352 65510)) +;;;;;; "international/ucs-normalize.el" (20355 10320)) ;;; Generated autoloads from international/ucs-normalize.el (autoload 'ucs-normalize-NFD-region "ucs-normalize" "\ @@ -30171,7 +30171,7 @@ Normalize the string STR by the Unicode NFC and Mac OS's HFS Plus. ;;;*** ;;;### (autoloads (ununderline-region underline-region) "underline" -;;;;;; "textmodes/underline.el" (20352 65510)) +;;;;;; "textmodes/underline.el" (20355 10320)) ;;; Generated autoloads from textmodes/underline.el (autoload 'underline-region "underline" "\ @@ -30192,7 +30192,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (unrmail batch-unrmail) "unrmail" "mail/unrmail.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/unrmail.el (autoload 'batch-unrmail "unrmail" "\ @@ -30211,8 +30211,8 @@ Convert old-style Rmail Babyl file FILE to system inbox format file TO-FILE. ;;;*** -;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emacs-lisp/unsafep.el (autoload 'unsafep "unsafep" "\ @@ -30225,7 +30225,7 @@ UNSAFEP-VARS is a list of symbols with local bindings. ;;;*** ;;;### (autoloads (url-retrieve-synchronously url-retrieve) "url" -;;;;;; "url/url.el" (20400 62402)) +;;;;;; "url/url.el" (20355 10320)) ;;; Generated autoloads from url/url.el (autoload 'url-retrieve "url" "\ @@ -30269,7 +30269,7 @@ no further processing). URL is either a string or a parsed URL. ;;;*** ;;;### (autoloads (url-register-auth-scheme url-get-authentication) -;;;;;; "url-auth" "url/url-auth.el" (20352 65510)) +;;;;;; "url-auth" "url/url-auth.el" (20355 10320)) ;;; Generated autoloads from url/url-auth.el (autoload 'url-get-authentication "url-auth" "\ @@ -30311,7 +30311,7 @@ RATING a rating between 1 and 10 of the strength of the authentication. ;;;*** ;;;### (autoloads (url-cache-extract url-is-cached url-store-in-cache) -;;;;;; "url-cache" "url/url-cache.el" (20352 65510)) +;;;;;; "url-cache" "url/url-cache.el" (20355 10320)) ;;; Generated autoloads from url/url-cache.el (autoload 'url-store-in-cache "url-cache" "\ @@ -30332,7 +30332,7 @@ Extract FNAM from the local disk cache. ;;;*** -;;;### (autoloads (url-cid) "url-cid" "url/url-cid.el" (20352 65510)) +;;;### (autoloads (url-cid) "url-cid" "url/url-cid.el" (20355 10320)) ;;; Generated autoloads from url/url-cid.el (autoload 'url-cid "url-cid" "\ @@ -30343,7 +30343,7 @@ Extract FNAM from the local disk cache. ;;;*** ;;;### (autoloads (url-dav-vc-registered url-dav-supported-p) "url-dav" -;;;;;; "url/url-dav.el" (20400 62402)) +;;;;;; "url/url-dav.el" (20355 10320)) ;;; Generated autoloads from url/url-dav.el (autoload 'url-dav-supported-p "url-dav" "\ @@ -30358,8 +30358,8 @@ Extract FNAM from the local disk cache. ;;;*** -;;;### (autoloads (url-file) "url-file" "url/url-file.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (url-file) "url-file" "url/url-file.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from url/url-file.el (autoload 'url-file "url-file" "\ @@ -30370,7 +30370,7 @@ Handle file: and ftp: URLs. ;;;*** ;;;### (autoloads (url-open-stream url-gateway-nslookup-host) "url-gw" -;;;;;; "url/url-gw.el" (20352 65510)) +;;;;;; "url/url-gw.el" (20355 10320)) ;;; Generated autoloads from url/url-gw.el (autoload 'url-gateway-nslookup-host "url-gw" "\ @@ -30390,7 +30390,7 @@ Might do a non-blocking connection; use `process-status' to check. ;;;### (autoloads (url-insert-file-contents url-file-local-copy url-copy-file ;;;;;; url-file-handler url-handler-mode) "url-handlers" "url/url-handlers.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from url/url-handlers.el (defvar url-handler-mode nil "\ @@ -30445,7 +30445,7 @@ accessible. ;;;*** ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p -;;;;;; url-http) "url-http" "url/url-http.el" (20461 49352)) +;;;;;; url-http) "url-http" "url/url-http.el" (20454 63285)) ;;; Generated autoloads from url/url-http.el (autoload 'url-http "url-http" "\ @@ -30514,7 +30514,7 @@ HTTPS retrievals are asynchronous.") ;;;*** -;;;### (autoloads (url-irc) "url-irc" "url/url-irc.el" (20352 65510)) +;;;### (autoloads (url-irc) "url-irc" "url/url-irc.el" (20355 10320)) ;;; Generated autoloads from url/url-irc.el (autoload 'url-irc "url-irc" "\ @@ -30524,8 +30524,8 @@ HTTPS retrievals are asynchronous.") ;;;*** -;;;### (autoloads (url-ldap) "url-ldap" "url/url-ldap.el" (20400 -;;;;;; 62402)) +;;;### (autoloads (url-ldap) "url-ldap" "url/url-ldap.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from url/url-ldap.el (autoload 'url-ldap "url-ldap" "\ @@ -30539,7 +30539,7 @@ URL can be a URL string, or a URL vector of the type returned by ;;;*** ;;;### (autoloads (url-mailto url-mail) "url-mailto" "url/url-mailto.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from url/url-mailto.el (autoload 'url-mail "url-mailto" "\ @@ -30555,7 +30555,7 @@ Handle the mailto: URL syntax. ;;;*** ;;;### (autoloads (url-data url-generic-emulator-loader url-info -;;;;;; url-man) "url-misc" "url/url-misc.el" (20352 65510)) +;;;;;; url-man) "url-misc" "url/url-misc.el" (20355 10320)) ;;; Generated autoloads from url/url-misc.el (autoload 'url-man "url-misc" "\ @@ -30587,7 +30587,7 @@ Fetch a data URL (RFC 2397). ;;;*** ;;;### (autoloads (url-snews url-news) "url-news" "url/url-news.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from url/url-news.el (autoload 'url-news "url-news" "\ @@ -30604,7 +30604,7 @@ Fetch a data URL (RFC 2397). ;;;### (autoloads (url-ns-user-pref url-ns-prefs isInNet isResolvable ;;;;;; dnsResolve dnsDomainIs isPlainHostName) "url-ns" "url/url-ns.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from url/url-ns.el (autoload 'isPlainHostName "url-ns" "\ @@ -30645,7 +30645,7 @@ Fetch a data URL (RFC 2397). ;;;*** ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" -;;;;;; "url/url-parse.el" (20400 62402)) +;;;;;; "url/url-parse.el" (20355 10320)) ;;; Generated autoloads from url/url-parse.el (autoload 'url-recreate-url "url-parse" "\ @@ -30663,7 +30663,7 @@ TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS. ;;;*** ;;;### (autoloads (url-setup-privacy-info) "url-privacy" "url/url-privacy.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from url/url-privacy.el (autoload 'url-setup-privacy-info "url-privacy" "\ @@ -30674,7 +30674,7 @@ Setup variables that expose info about you and your system. ;;;*** ;;;### (autoloads (url-queue-retrieve) "url-queue" "url/url-queue.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from url/url-queue.el (autoload 'url-queue-retrieve "url-queue" "\ @@ -30694,7 +30694,7 @@ The variable `url-queue-timeout' sets a timeout. ;;;;;; url-pretty-length url-strip-leading-spaces url-eat-trailing-space ;;;;;; url-get-normalized-date url-lazy-message url-normalize-url ;;;;;; url-insert-entities-in-string url-parse-args url-debug url-debug) -;;;;;; "url-util" "url/url-util.el" (20400 62402)) +;;;;;; "url-util" "url/url-util.el" (20355 10320)) ;;; Generated autoloads from url/url-util.el (defvar url-debug nil "\ @@ -30830,7 +30830,7 @@ This uses `url-current-object', set locally to the buffer. ;;;*** ;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) -;;;;;; "userlock" "userlock.el" (20487 24216)) +;;;;;; "userlock" "userlock.el" (20487 60609)) ;;; Generated autoloads from userlock.el (autoload 'ask-user-about-lock "userlock" "\ @@ -30860,7 +30860,7 @@ The buffer in question is current when this function is called. ;;;### (autoloads (utf-7-imap-pre-write-conversion utf-7-pre-write-conversion ;;;;;; utf-7-imap-post-read-conversion utf-7-post-read-conversion) -;;;;;; "utf-7" "international/utf-7.el" (20352 65510)) +;;;;;; "utf-7" "international/utf-7.el" (20355 10320)) ;;; Generated autoloads from international/utf-7.el (autoload 'utf-7-post-read-conversion "utf-7" "\ @@ -30885,7 +30885,7 @@ The buffer in question is current when this function is called. ;;;*** -;;;### (autoloads (utf7-encode) "utf7" "gnus/utf7.el" (20352 65510)) +;;;### (autoloads (utf7-encode) "utf7" "gnus/utf7.el" (20355 10320)) ;;; Generated autoloads from gnus/utf7.el (autoload 'utf7-encode "utf7" "\ @@ -30897,7 +30897,7 @@ Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil. ;;;### (autoloads (uudecode-decode-region uudecode-decode-region-internal ;;;;;; uudecode-decode-region-external) "uudecode" "mail/uudecode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from mail/uudecode.el (autoload 'uudecode-decode-region-external "uudecode" "\ @@ -30927,8 +30927,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;;;; vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers ;;;;;; vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff ;;;;;; vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook -;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20400 -;;;;;; 62402)) +;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from vc/vc.el (defvar vc-checkout-hook nil "\ @@ -31206,7 +31206,7 @@ Return the branch part of a revision number REV. ;;;*** ;;;### (autoloads (vc-annotate) "vc-annotate" "vc/vc-annotate.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/vc-annotate.el (autoload 'vc-annotate "vc-annotate" "\ @@ -31243,7 +31243,7 @@ mode-specific menu. `vc-annotate-color-map' and ;;;*** -;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (20400 62402)) +;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (20355 10320)) ;;; Generated autoloads from vc/vc-arch.el (defun vc-arch-registered (file) (if (vc-find-root file "{arch}/=tagging-method") @@ -31253,7 +31253,7 @@ mode-specific menu. `vc-annotate-color-map' and ;;;*** -;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20400 62402)) +;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20355 10320)) ;;; Generated autoloads from vc/vc-bzr.el (defconst vc-bzr-admin-dirname ".bzr" "\ @@ -31269,7 +31269,7 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20400 62402)) +;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20355 10320)) ;;; Generated autoloads from vc/vc-cvs.el (defun vc-cvs-registered (f) "Return non-nil if file F is registered with CVS." @@ -31280,7 +31280,7 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20400 62402)) +;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20355 10320)) ;;; Generated autoloads from vc/vc-dir.el (autoload 'vc-dir "vc-dir" "\ @@ -31305,7 +31305,7 @@ These are the commands available for use in the file status buffer: ;;;*** ;;;### (autoloads (vc-do-command) "vc-dispatcher" "vc/vc-dispatcher.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/vc-dispatcher.el (autoload 'vc-do-command "vc-dispatcher" "\ @@ -31328,7 +31328,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20400 62402)) +;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20377 11956)) ;;; Generated autoloads from vc/vc-git.el (defun vc-git-registered (file) "Return non-nil if FILE is registered with git." @@ -31339,7 +31339,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20400 62402)) +;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20355 10320)) ;;; Generated autoloads from vc/vc-hg.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." @@ -31350,7 +31350,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20400 62402)) +;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20355 10320)) ;;; Generated autoloads from vc/vc-mtn.el (defconst vc-mtn-admin-dir "_MTN" "\ @@ -31367,7 +31367,7 @@ Name of the monotone directory's format file.") ;;;*** ;;;### (autoloads (vc-rcs-master-templates) "vc-rcs" "vc/vc-rcs.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/vc-rcs.el (defvar vc-rcs-master-templates (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\ @@ -31381,7 +31381,7 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** ;;;### (autoloads (vc-sccs-master-templates) "vc-sccs" "vc/vc-sccs.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from vc/vc-sccs.el (defvar vc-sccs-master-templates (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\ @@ -31398,7 +31398,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** -;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20352 65510)) +;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20355 10320)) ;;; Generated autoloads from vc/vc-svn.el (defun vc-svn-registered (f) (let ((admin-dir (cond ((and (eq system-type 'windows-nt) @@ -31412,7 +31412,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** ;;;### (autoloads (vera-mode) "vera-mode" "progmodes/vera-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/vera-mode.el (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode)) @@ -31470,7 +31470,7 @@ Key bindings: ;;;*** ;;;### (autoloads (verilog-mode) "verilog-mode" "progmodes/verilog-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/verilog-mode.el (autoload 'verilog-mode "verilog-mode" "\ @@ -31609,7 +31609,7 @@ Key bindings specific to `verilog-mode-map' are: ;;;*** ;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload 'vhdl-mode "vhdl-mode" "\ @@ -32150,7 +32150,7 @@ Key bindings: ;;;*** -;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (20352 65510)) +;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (20355 10320)) ;;; Generated autoloads from emulation/vi.el (autoload 'vi-mode "vi" "\ @@ -32205,7 +32205,7 @@ Syntax table and abbrevs while in vi mode remain as they were in Emacs. ;;;### (autoloads (viqr-pre-write-conversion viqr-post-read-conversion ;;;;;; viet-encode-viqr-buffer viet-encode-viqr-region viet-decode-viqr-buffer ;;;;;; viet-decode-viqr-region viet-encode-viscii-char) "viet-util" -;;;;;; "language/viet-util.el" (20352 65510)) +;;;;;; "language/viet-util.el" (20355 10320)) ;;; Generated autoloads from language/viet-util.el (autoload 'viet-encode-viscii-char "viet-util" "\ @@ -32253,7 +32253,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics. ;;;;;; view-mode view-buffer-other-frame view-buffer-other-window ;;;;;; view-buffer view-file-other-frame view-file-other-window ;;;;;; view-file kill-buffer-if-not-modified view-remove-frame-by-deleting) -;;;;;; "view" "view.el" (20352 65510)) +;;;;;; "view" "view.el" (20355 10320)) ;;; Generated autoloads from view.el (defvar view-remove-frame-by-deleting t "\ @@ -32507,8 +32507,8 @@ Exit View mode and make the current buffer editable. ;;;*** -;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from emulation/vip.el (autoload 'vip-setup "vip" "\ @@ -32524,7 +32524,7 @@ Turn on VIP emulation of VI. ;;;*** ;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el" -;;;;;; (20400 62402)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emulation/viper.el (autoload 'toggle-viper-mode "viper" "\ @@ -32541,7 +32541,7 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'. ;;;*** ;;;### (autoloads (warn lwarn display-warning) "warnings" "emacs-lisp/warnings.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emacs-lisp/warnings.el (defvar warning-prefix-function nil "\ @@ -32631,7 +32631,7 @@ this is equivalent to `display-warning', using ;;;*** ;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from wdired.el (autoload 'wdired-change-to-wdired-mode "wdired" "\ @@ -32647,7 +32647,7 @@ See `wdired-mode'. ;;;*** -;;;### (autoloads (webjump) "webjump" "net/webjump.el" (20400 62402)) +;;;### (autoloads (webjump) "webjump" "net/webjump.el" (20355 10320)) ;;; Generated autoloads from net/webjump.el (autoload 'webjump "webjump" "\ @@ -32664,7 +32664,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ;;;*** ;;;### (autoloads (which-function-mode which-func-mode) "which-func" -;;;;;; "progmodes/which-func.el" (20461 49352)) +;;;;;; "progmodes/which-func.el" (20456 18614)) ;;; Generated autoloads from progmodes/which-func.el (put 'which-func-format 'risky-local-variable t) (put 'which-func-current 'risky-local-variable t) @@ -32700,7 +32700,7 @@ in certain major modes. ;;;### (autoloads (whitespace-report-region whitespace-report whitespace-cleanup-region ;;;;;; whitespace-cleanup global-whitespace-toggle-options whitespace-toggle-options ;;;;;; global-whitespace-newline-mode global-whitespace-mode whitespace-newline-mode -;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20352 65510)) +;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20355 10320)) ;;; Generated autoloads from whitespace.el (autoload 'whitespace-mode "whitespace" "\ @@ -33099,7 +33099,7 @@ cleaning up these problems. ;;;*** ;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse -;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (20352 65510)) +;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (20355 10320)) ;;; Generated autoloads from wid-browse.el (autoload 'widget-browse-at "wid-browse" "\ @@ -33128,8 +33128,8 @@ if ARG is omitted or nil. ;;;*** ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create -;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (20400 -;;;;;; 62402)) +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from wid-edit.el (autoload 'widgetp "wid-edit" "\ @@ -33172,8 +33172,8 @@ Setup current buffer so editing string widgets works. ;;;*** ;;;### (autoloads (windmove-default-keybindings windmove-down windmove-right -;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (20352 -;;;;;; 65510)) +;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from windmove.el (autoload 'windmove-left "windmove" "\ @@ -33226,7 +33226,7 @@ Default MODIFIER is 'shift. ;;;*** ;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from winner.el (defvar winner-mode nil "\ @@ -33245,7 +33245,7 @@ With arg, turn Winner mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (woman-bookmark-jump woman-find-file woman-dired-find-file -;;;;;; woman woman-locale) "woman" "woman.el" (20400 62402)) +;;;;;; woman woman-locale) "woman" "woman.el" (20355 10320)) ;;; Generated autoloads from woman.el (defvar woman-locale nil "\ @@ -33294,7 +33294,7 @@ Default bookmark handler for Woman buffers. ;;;*** ;;;### (autoloads (wordstar-mode) "ws-mode" "emulation/ws-mode.el" -;;;;;; (20352 65510)) +;;;;;; (20355 10320)) ;;; Generated autoloads from emulation/ws-mode.el (autoload 'wordstar-mode "ws-mode" "\ @@ -33406,7 +33406,7 @@ The key bindings are: ;;;*** -;;;### (autoloads (xesam-search) "xesam" "net/xesam.el" (20400 62402)) +;;;### (autoloads (xesam-search) "xesam" "net/xesam.el" (20355 10320)) ;;; Generated autoloads from net/xesam.el (autoload 'xesam-search "xesam" "\ @@ -33426,7 +33426,7 @@ Example: ;;;*** ;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" -;;;;;; (20370 33496)) +;;;;;; (20370 38715)) ;;; Generated autoloads from xml.el (autoload 'xml-parse-file "xml" "\ @@ -33452,7 +33452,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded. ;;;*** ;;;### (autoloads (xmltok-get-declared-encoding-position) "xmltok" -;;;;;; "nxml/xmltok.el" (20352 65510)) +;;;;;; "nxml/xmltok.el" (20355 10320)) ;;; Generated autoloads from nxml/xmltok.el (autoload 'xmltok-get-declared-encoding-position "xmltok" "\ @@ -33470,8 +33470,8 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT. ;;;*** -;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (20352 -;;;;;; 65510)) +;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (20355 +;;;;;; 10320)) ;;; Generated autoloads from xt-mouse.el (defvar xterm-mouse-mode nil "\ @@ -33501,7 +33501,7 @@ down the SHIFT key while pressing the mouse button. ;;;*** ;;;### (autoloads (yenc-extract-filename yenc-decode-region) "yenc" -;;;;;; "gnus/yenc.el" (20352 65510)) +;;;;;; "gnus/yenc.el" (20355 10320)) ;;; Generated autoloads from gnus/yenc.el (autoload 'yenc-decode-region "yenc" "\ @@ -33517,7 +33517,7 @@ Extract file name from an yenc header. ;;;*** ;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism -;;;;;; yow) "yow" "play/yow.el" (20400 62402)) +;;;;;; yow) "yow" "play/yow.el" (20355 10320)) ;;; Generated autoloads from play/yow.el (autoload 'yow "yow" "\ @@ -33543,7 +33543,7 @@ Zippy goes to the analyst. ;;;*** -;;;### (autoloads (zone) "zone" "play/zone.el" (20400 62402)) +;;;### (autoloads (zone) "zone" "play/zone.el" (20355 10320)) ;;; Generated autoloads from play/zone.el (autoload 'zone "zone" "\ @@ -33559,46 +33559,47 @@ Zone out, completely. ;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" ;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" ;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" -;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el" -;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el" -;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el" -;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" -;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" -;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el" -;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el" -;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el" -;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el" -;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el" -;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el" -;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el" -;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el" -;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el" -;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el" -;;;;;; "cedet/cedet.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" -;;;;;; "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" -;;;;;; "cedet/ede/dired.el" "cedet/ede/emacs.el" "cedet/ede/files.el" -;;;;;; "cedet/ede/generic.el" "cedet/ede/linux.el" "cedet/ede/locate.el" -;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" -;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" -;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" -;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" -;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el" -;;;;;; "cedet/ede/project-am.el" "cedet/ede/shell.el" "cedet/ede/simple.el" -;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el" -;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/inversion.el" -;;;;;; "cedet/mode-local.el" "cedet/pulse.el" "cedet/semantic/analyze.el" -;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el" -;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el" -;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el" -;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" -;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el" -;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el" -;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el" -;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" -;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el" -;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" -;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el" -;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el" +;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" +;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" +;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" +;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" +;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" +;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" +;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" +;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" +;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" +;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" +;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" +;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" +;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" +;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el" +;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" +;;;;;; "cedet/cedet-idutils.el" "cedet/cedet.el" "cedet/ede/auto.el" +;;;;;; "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" "cedet/ede/cpp-root.el" +;;;;;; "cedet/ede/custom.el" "cedet/ede/dired.el" "cedet/ede/emacs.el" +;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el" +;;;;;; "cedet/ede/loaddefs.el" "cedet/ede/locate.el" "cedet/ede/make.el" +;;;;;; "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" "cedet/ede/pmake.el" +;;;;;; "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" +;;;;;; "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" +;;;;;; "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" +;;;;;; "cedet/ede/proj-shared.el" "cedet/ede/proj.el" "cedet/ede/project-am.el" +;;;;;; "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el" +;;;;;; "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el" +;;;;;; "cedet/ede/util.el" "cedet/inversion.el" "cedet/mode-local.el" +;;;;;; "cedet/pulse.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" +;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el" +;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" +;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el" +;;;;;; "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el" +;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el" +;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el" +;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el" +;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el" +;;;;;; "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el" +;;;;;; "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el" +;;;;;; "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el" +;;;;;; "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el" ;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el" ;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el" ;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el" @@ -33606,13 +33607,13 @@ Zone out, completely. ;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" ;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" ;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" -;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el" -;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el" -;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" -;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el" -;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" -;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" -;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" +;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el" +;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el" +;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" +;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el" +;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" +;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" +;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" @@ -33624,32 +33625,33 @@ Zone out, completely. ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" -;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el" -;;;;;; "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" -;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" -;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el" -;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" "emacs-lisp/authors.el" -;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" -;;;;;; "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" -;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" -;;;;;; "emacs-lisp/cust-print.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-custom.el" -;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el" -;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" -;;;;;; "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" -;;;;;; "emacs-lisp/regi.el" "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" -;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" -;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" -;;;;;; "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el" -;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" -;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" -;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" -;;;;;; "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el" -;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" -;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" -;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" -;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" -;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" -;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-io.el" +;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" +;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" +;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el" +;;;;;; "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" +;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" +;;;;;; "emacs-lisp/authors.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" +;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el" +;;;;;; "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" +;;;;;; "emacs-lisp/cl-specs.el" "emacs-lisp/cust-print.el" "emacs-lisp/eieio-base.el" +;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el" +;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el" +;;;;;; "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" +;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/regi.el" +;;;;;; "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" +;;;;;; "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el" +;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el" +;;;;;; "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el" +;;;;;; "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el" +;;;;;; "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el" +;;;;;; "erc/erc-goodies.el" "erc/erc-ibuffer.el" "erc/erc-lang.el" +;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" +;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" +;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" +;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" +;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el" +;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" +;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" ;;;;;; "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el" ;;;;;; "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "foldout.el" ;;;;;; "format-spec.el" "forms-d2.el" "forms-pass.el" "fringe.el" @@ -33754,7 +33756,7 @@ Zone out, completely. ;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" ;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" ;;;;;; "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el" -;;;;;; "w32-vars.el" "x-dnd.el") (20523 50589 129181)) +;;;;;; "w32-vars.el" "x-dnd.el") (20545 61134 411881)) ;;;*** From f278d339c9aea397620179bda2c396aaae073be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 2 Sep 2012 13:13:24 +0200 Subject: [PATCH 006/216] * configure.ac (HAVE_GOBJECT): Check for gobject-2.0. Fixes: debbugs:12332 --- ChangeLog | 4 ++++ configure.ac | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index cf4506f0c77..62e64622d1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-09-02 Jan Djärv + + * configure.ac (HAVE_GOBJECT): Check for gobject-2.0 (Bug#12332). + 2012-09-01 Paul Eggert * configure.ac (_FORTIFY_SOURCE): Define only when optimizing. diff --git a/configure.ac b/configure.ac index 43686361d07..0e2154aab6e 100644 --- a/configure.ac +++ b/configure.ac @@ -2053,6 +2053,11 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then fi if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then + PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= 2.0, HAVE_GOBJECT=yes, HAVE_GOBJECT=no) + if test "$HAVE_GOBJECT" = "yes"; then + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS" + fi SAVE_CFLAGS="$CFLAGS" SAVE_LIBS="$LIBS" CFLAGS="$SETTINGS_CFLAGS $CFLAGS" From c04889f8e34e69ed496fcaaab285eac34e96acc1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Sep 2012 07:26:47 -0700 Subject: [PATCH 007/216] * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS) when building globals.h, as the objects that are not built on this host are not needed to compile C files on this host. --- src/ChangeLog | 6 ++++++ src/Makefile.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2ea13df1261..4986726d7c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-02 Paul Eggert + + * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS) + when building globals.h, as the objects that are not built on + this host are not needed to compile C files on this host. + 2012-09-02 Jan Djärv * gtkutil.h: Remove prototype for x_wm_set_size_hint. diff --git a/src/Makefile.in b/src/Makefile.in index a809216f095..fe4cff5d8cc 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -448,7 +448,7 @@ GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) @rm -f gl-tmp - $(libsrc)/make-docfile -d $(srcdir) -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp + $(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl-tmp $(srcdir)/../build-aux/move-if-change gl-tmp globals.h echo timestamp > $@ From a411ac43d3667d042fa36361275eccbe9aca80af Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Sep 2012 09:56:31 -0700 Subject: [PATCH 008/216] Clean up some extern decls. Mostly, this hoists extern decls out of .c files and into .h files. That way, we're more likely to catch errors if the interfaces change. * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not declare xg_mark_data. * dispextern.h (x_frame_parm_handlers): * font.h (Qxft): * lisp.h (Qlexical_binding, Qinternal_interpreter_environment) (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold) (Qultra_bold, Qoblique, Qitalic): Move extern decl here from .c file. * alloc.c (xg_mark_data) [USE_GTK]: * doc.c (Qclosure): * eval.c (Qlexical_binding): * fns.c (time) [!HAVE_UNISTD_H]: * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light) (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic): * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]: * lread.c (Qinternal_interpreter_environment): * minibuf.c (Qbuffer): * process.c (QCfamily, QCfilter): * widget.c (free_frame_faces): * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]: * xfont.c (x_clear_errors): * xterm.c (x_frame_parm_handlers): Remove now-redundant extern decls. * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]: * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic): Now static. * xfaces.c: Remove unnecessary static decls. * xterm.c (updating_frame): Remove decl of nonexistent object. --- src/ChangeLog | 32 ++++++++++++++++++++++++++++++++ src/alloc.c | 8 ++++---- src/dispextern.h | 3 +++ src/doc.c | 1 - src/eval.c | 1 - src/fns.c | 4 ---- src/font.h | 1 + src/gtkutil.c | 5 ----- src/image.c | 1 - src/keyboard.c | 2 +- src/keyboard.h | 2 +- src/lisp.h | 6 +++++- src/lread.c | 2 -- src/minibuf.c | 1 - src/process.c | 10 ---------- src/widget.c | 2 -- src/xfaces.c | 43 +++---------------------------------------- src/xfont.c | 1 - src/xterm.c | 9 --------- 19 files changed, 50 insertions(+), 84 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4986726d7c8..a5978e6456b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,37 @@ 2012-09-02 Paul Eggert + Clean up some extern decls. + Mostly, this hoists extern decls out of .c files and into .h files. + That way, we're more likely to catch errors if the interfaces change. + * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not + declare xg_mark_data. + * dispextern.h (x_frame_parm_handlers): + * font.h (Qxft): + * lisp.h (Qlexical_binding, Qinternal_interpreter_environment) + (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold) + (Qultra_bold, Qoblique, Qitalic): + Move extern decl here from .c file. + * alloc.c (xg_mark_data) [USE_GTK]: + * doc.c (Qclosure): + * eval.c (Qlexical_binding): + * fns.c (time) [!HAVE_UNISTD_H]: + * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light) + (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic): + * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]: + * lread.c (Qinternal_interpreter_environment): + * minibuf.c (Qbuffer): + * process.c (QCfamily, QCfilter): + * widget.c (free_frame_faces): + * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]: + * xfont.c (x_clear_errors): + * xterm.c (x_frame_parm_handlers): + Remove now-redundant extern decls. + * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]: + * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic): + Now static. + * xfaces.c: Remove unnecessary static decls. + * xterm.c (updating_frame): Remove decl of nonexistent object. + * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS) when building globals.h, as the objects that are not built on this host are not needed to compile C files on this host. diff --git a/src/alloc.c b/src/alloc.c index e8637471bc7..188a514376d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -69,6 +69,9 @@ extern void *sbrk (); #include +#ifdef USE_GTK +# include "gtkutil.h" +#endif #ifdef WINDOWSNT #include "w32.h" #endif @@ -5478,10 +5481,7 @@ See Info node `(elisp)Garbage Collection'. */) mark_kboards (); #ifdef USE_GTK - { - extern void xg_mark_data (void); - xg_mark_data (); - } + xg_mark_data (); #endif #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ diff --git a/src/dispextern.h b/src/dispextern.h index 1140d98f8a7..e74e7deb591 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3251,9 +3251,12 @@ void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); extern Lisp_Object tip_frame; extern Window tip_window; +extern frame_parm_handler x_frame_parm_handlers[]; + extern void start_hourglass (void); extern void cancel_hourglass (void); extern int hourglass_shown_p; + struct atimer; /* Defined in atimer.h. */ /* If non-null, an asynchronous timer that, when it expires, displays an hourglass cursor on all frames. */ diff --git a/src/doc.c b/src/doc.c index b4eadfff875..02a5b4b8143 100644 --- a/src/doc.c +++ b/src/doc.c @@ -37,7 +37,6 @@ along with GNU Emacs. If not, see . */ Lisp_Object Qfunction_documentation; -extern Lisp_Object Qclosure; /* Buffer used for reading from documentation file. */ static char *get_doc_string_buffer; static ptrdiff_t get_doc_string_buffer_size; diff --git a/src/eval.c b/src/eval.c index c56be10c5a0..ad1daf721b8 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2232,7 +2232,6 @@ eval_sub (Lisp_Object form) if (EQ (funcar, Qmacro)) { ptrdiff_t count = SPECPDL_INDEX (); - extern Lisp_Object Qlexical_binding; Lisp_Object exp; /* Bind lexical-binding during expansion of the macro, so the macro can know reliably if the code it outputs will be diff --git a/src/fns.c b/src/fns.c index 2dee8515799..4d82e4e6e1d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -52,10 +52,6 @@ static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512; static int internal_equal (Lisp_Object , Lisp_Object, int, int); - -#ifndef HAVE_UNISTD_H -extern long time (); -#endif DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, doc: /* Return the argument unchanged. */) diff --git a/src/font.h b/src/font.h index 6e9387f7632..3b90bc2ab8a 100644 --- a/src/font.h +++ b/src/font.h @@ -817,6 +817,7 @@ extern struct font_driver xfont_driver; extern void syms_of_xfont (void); extern void syms_of_ftxfont (void); #ifdef HAVE_XFT +extern Lisp_Object Qxft; extern struct font_driver xftfont_driver; extern void syms_of_xftfont (void); #elif defined HAVE_FREETYPE diff --git a/src/gtkutil.c b/src/gtkutil.c index 939e472d6d2..48a83725fd9 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2019,11 +2019,6 @@ xg_get_file_name (FRAME_PTR f, #if USE_NEW_GTK_FONT_CHOOSER -extern Lisp_Object Qxft, Qnormal; -extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; -extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; -extern Lisp_Object Qoblique, Qitalic; - #define XG_WEIGHT_TO_SYMBOL(w) \ (w <= PANGO_WEIGHT_THIN ? Qextra_light \ : w <= PANGO_WEIGHT_ULTRALIGHT ? Qlight \ diff --git a/src/image.c b/src/image.c index d4e78d41000..a067dae7737 100644 --- a/src/image.c +++ b/src/image.c @@ -570,7 +570,6 @@ static void x_emboss (struct frame *, struct image *); static int x_build_heuristic_mask (struct frame *, struct image *, Lisp_Object); #ifdef HAVE_NTGUI -extern Lisp_Object Vlibrary_cache, QCloaded_from; #define CACHE_IMAGE_TYPE(type, status) \ do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) #else diff --git a/src/keyboard.c b/src/keyboard.c index ff2b75e351c..464c3ae0d66 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1315,7 +1315,7 @@ usage: (track-mouse BODY...) */) If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement after resizing the tool-bar window. */ -#if !defined HAVE_WINDOW_SYSTEM +#if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS static #endif int ignore_mouse_drag_p; diff --git a/src/keyboard.h b/src/keyboard.h index 98b1933f3f9..91484b3649b 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -469,7 +469,7 @@ extern int waiting_for_input; happens. */ extern EMACS_TIME *input_available_clear_time; -#if defined HAVE_WINDOW_SYSTEM +#if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS extern int ignore_mouse_drag_p; #endif diff --git a/src/lisp.h b/src/lisp.h index b906e4a1dfd..75f1b5e802d 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2988,6 +2988,7 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t, /* Defined in lread.c. */ extern Lisp_Object Qvariable_documentation, Qstandard_input; extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; +extern Lisp_Object Qlexical_binding; extern Lisp_Object check_obarray (Lisp_Object); extern Lisp_Object intern_1 (const char *, ptrdiff_t); extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); @@ -3021,7 +3022,7 @@ intern_c_string (const char *str) /* Defined in eval.c. */ extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro; -extern Lisp_Object Qinhibit_quit, Qclosure; +extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure; extern Lisp_Object Qand_rest; extern Lisp_Object Vautoload_queue; extern Lisp_Object Vsignaling_function; @@ -3466,6 +3467,9 @@ extern Lisp_Object Qface; extern Lisp_Object Qnormal; extern Lisp_Object QCfamily, QCweight, QCslant; extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; +extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; +extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; +extern Lisp_Object Qoblique, Qitalic; extern Lisp_Object Vface_alternative_font_family_alist; extern Lisp_Object Vface_alternative_font_registry_alist; extern void syms_of_xfaces (void); diff --git a/src/lread.c b/src/lread.c index aa3e0cfc5b8..1dd6275684b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -89,8 +89,6 @@ static Lisp_Object Qget_emacs_mule_file_char; static Lisp_Object Qload_force_doc_strings; -extern Lisp_Object Qinternal_interpreter_environment; - static Lisp_Object Qload_in_progress; /* The association list of objects read with the #n=object form. diff --git a/src/minibuf.c b/src/minibuf.c index 41cc48017eb..2035a3e3985 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1860,7 +1860,6 @@ the values STRING, PREDICATE and `lambda'. */) } static Lisp_Object Qmetadata; -extern Lisp_Object Qbuffer; DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, doc: /* Perform completion on buffer names. diff --git a/src/process.c b/src/process.c index bfac054c3c2..81fa98a028d 100644 --- a/src/process.c +++ b/src/process.c @@ -165,16 +165,6 @@ static Lisp_Object QClocal, QCremote, QCcoding; static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; static Lisp_Object QCsentinel, QClog, QCoptions, QCplist; static Lisp_Object Qlast_nonmenu_event; -/* QCfamily is declared and initialized in xfaces.c, - QCfilter in keyboard.c. */ -extern Lisp_Object QCfamily, QCfilter; - -/* Qexit is declared and initialized in eval.c. */ - -/* QCfamily is defined in xfaces.c. */ -extern Lisp_Object QCfamily; -/* QCfilter is defined in keyboard.c. */ -extern Lisp_Object QCfilter; #define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) #define NETCONN1_P(p) (EQ (p->type, Qnetwork)) diff --git a/src/widget.c b/src/widget.c index b94c30f4e9c..ea9bdb61b13 100644 --- a/src/widget.c +++ b/src/widget.c @@ -671,8 +671,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs update_wm_hints (ew); } -extern void free_frame_faces (struct frame *); - static void EmacsFrameDestroy (Widget widget) { diff --git a/src/xfaces.c b/src/xfaces.c index 5554c4aa705..4df5caf6f2a 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -315,9 +315,10 @@ static Lisp_Object QCfontset; Lisp_Object Qnormal; Lisp_Object Qbold; static Lisp_Object Qline, Qwave; -Lisp_Object Qultra_light, Qextra_light, Qlight; +static Lisp_Object Qultra_light, Qreverse_oblique, Qreverse_italic; +Lisp_Object Qextra_light, Qlight; Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; -Lisp_Object Qoblique, Qreverse_oblique, Qreverse_italic; +Lisp_Object Qoblique; Lisp_Object Qitalic; static Lisp_Object Qultra_condensed, Qextra_condensed; Lisp_Object Qcondensed; @@ -452,18 +453,7 @@ static int menu_face_changed_default; struct table_entry; struct named_merge_point; -static void map_tty_color (struct frame *, struct face *, - enum lface_attribute_index, int *); -static Lisp_Object resolve_face_name (Lisp_Object, int); static void set_font_frame_param (Lisp_Object, Lisp_Object); -static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *, - int, struct named_merge_point *); -static ptrdiff_t load_pixmap (struct frame *, Lisp_Object, - unsigned *, unsigned *); -static struct frame *frame_or_selected_frame (Lisp_Object, int); -static void load_face_colors (struct frame *, struct face *, Lisp_Object *); -static void free_face_colors (struct frame *, struct face *); -static int face_color_gray_p (struct frame *, const char *); static struct face *realize_face (struct face_cache *, Lisp_Object *, int); static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, @@ -473,38 +463,11 @@ static struct face *realize_tty_face (struct face_cache *, Lisp_Object *); static int realize_basic_faces (struct frame *); static int realize_default_face (struct frame *); static void realize_named_face (struct frame *, Lisp_Object, int); -static int lface_fully_specified_p (Lisp_Object *); -static int lface_equal_p (Lisp_Object *, Lisp_Object *); -static unsigned hash_string_case_insensitive (Lisp_Object); -static unsigned lface_hash (Lisp_Object *); -static int lface_same_font_attributes_p (Lisp_Object *, Lisp_Object *); static struct face_cache *make_face_cache (struct frame *); static void clear_face_gcs (struct face_cache *); static void free_face_cache (struct face_cache *); -static int face_fontset (Lisp_Object *); -static void merge_face_vectors (struct frame *, Lisp_Object *, Lisp_Object*, - struct named_merge_point *); static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, int, struct named_merge_point *); -static int set_lface_from_font (struct frame *, Lisp_Object, Lisp_Object, - int); -static Lisp_Object lface_from_face_name (struct frame *, Lisp_Object, int); -static struct face *make_realized_face (Lisp_Object *); -static void cache_face (struct face_cache *, struct face *, unsigned); -static void uncache_face (struct face_cache *, struct face *); - -#ifdef HAVE_WINDOW_SYSTEM - -static GC x_create_gc (struct frame *, unsigned long, XGCValues *); -static void x_free_gc (struct frame *, GC); - -#ifdef USE_X_TOOLKIT -static void x_update_menu_appearance (struct frame *); - -extern void free_frame_menubar (struct frame *); -#endif /* USE_X_TOOLKIT */ - -#endif /* HAVE_WINDOW_SYSTEM */ /*********************************************************************** diff --git a/src/xfont.c b/src/xfont.c index cbb24622ae9..be9556d585a 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -46,7 +46,6 @@ struct xfont_info }; /* Prototypes of support functions. */ -extern void x_clear_errors (Display *); static XCharStruct *xfont_get_pcm (XFontStruct *, XChar2b *); diff --git a/src/xterm.c b/src/xterm.c index 7e61cc4d8ea..052db0f3e63 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -165,13 +165,6 @@ struct x_display_info *x_display_list; Lisp_Object x_display_name_list; -/* Frame being updated by update_frame. This is declared in term.c. - This is set by update_begin and looked at by all the XT functions. - It is zero while not inside an update. In that case, the XT - functions assume that `selected_frame' is the frame to apply to. */ - -extern struct frame *updating_frame; - /* This is a frame waiting to be auto-raised, within XTread_socket. */ static struct frame *pending_autoraise_frame; @@ -10609,8 +10602,6 @@ x_activate_timeout_atimer (void) /* Set up use of X before we make the first connection. */ -extern frame_parm_handler x_frame_parm_handlers[]; - static struct redisplay_interface x_redisplay_interface = { x_frame_parm_handlers, From 1882aa387874f0ac0965fa7bec1c5760dc37e48f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Sep 2012 10:10:35 -0700 Subject: [PATCH 009/216] * emacs.c, eval.c: Use bool for boolean. * emacs.c (initialized, inhibit_window_system, running_asynch_code): (malloc_using_checking) [DOUG_LEA_MALLOC]: (display_arg) [HAVE_X_WINDOWS || HAVE_NS]: (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch) (main, decode_env_path, Fdaemon_initialized): * eval.c (call_debugger, Finteractive_p, interactive_p): (unwind_to_catch, Fsignal, wants_debugger, skip_debugger) (maybe_call_debugger, Fbacktrace): * process.c (read_process_output, exec_sentinel): Use bool for booleans. * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X. All callers changed. * eval.c (interactive_p): Omit always-true boolean argument EXCLUDE_SUBRS_P. All callers changed. * dispextern.h, lisp.h: Reflect above API changes. * firstfile.c (dummy): Use the address of 'main', whose signature won't change, instead of the address of 'initialize', whose signature just changed from int to bool. * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ... * msdos.c (fatal_error_in_progress): ... from here. * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead of incrementing it. (redisplay_internal, unwind_redisplay): Simply clear REDISPLAYING_P when unwinding, instead of saving its previous, always-false value and then restoring it. --- src/ChangeLog | 27 +++++++++++++++++++++ src/dispextern.h | 2 +- src/emacs.c | 63 ++++++++++++++++++++---------------------------- src/eval.c | 58 +++++++++++++++++++++----------------------- src/firstfile.c | 5 ++-- src/lisp.h | 28 ++++++++++++--------- src/msdos.c | 1 - src/process.c | 6 ++--- src/w32.c | 2 +- src/xdisp.c | 25 +++++++------------ src/xterm.c | 2 +- 11 files changed, 114 insertions(+), 105 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a5978e6456b..2053c258df4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,32 @@ 2012-09-02 Paul Eggert + * emacs.c, eval.c: Use bool for boolean. + * emacs.c (initialized, inhibit_window_system, running_asynch_code): + (malloc_using_checking) [DOUG_LEA_MALLOC]: + (display_arg) [HAVE_X_WINDOWS || HAVE_NS]: + (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch) + (main, decode_env_path, Fdaemon_initialized): + * eval.c (call_debugger, Finteractive_p, interactive_p): + (unwind_to_catch, Fsignal, wants_debugger, skip_debugger) + (maybe_call_debugger, Fbacktrace): + * process.c (read_process_output, exec_sentinel): + Use bool for booleans. + * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X. + All callers changed. + * eval.c (interactive_p): Omit always-true boolean argument + EXCLUDE_SUBRS_P. All callers changed. + * dispextern.h, lisp.h: Reflect above API changes. + * firstfile.c (dummy): Use the address of 'main', whose signature + won't change, instead of the address of 'initialize', whose + signature just changed from int to bool. + * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ... + * msdos.c (fatal_error_in_progress): ... from here. + * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead + of incrementing it. + (redisplay_internal, unwind_redisplay): Simply clear + REDISPLAYING_P when unwinding, instead of saving its previous, + always-false value and then restoring it. + Clean up some extern decls. Mostly, this hoists extern decls out of .c files and into .h files. That way, we're more likely to catch errors if the interfaces change. diff --git a/src/dispextern.h b/src/dispextern.h index e74e7deb591..73f3350713f 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3055,7 +3055,7 @@ void move_it_in_display_line (struct it *it, int in_display_vector_p (struct it *); int frame_mode_line_height (struct frame *); extern Lisp_Object Qtool_bar; -extern int redisplaying_p; +extern bool redisplaying_p; extern int help_echo_showing_p; extern int current_mode_line_height, current_header_line_height; extern Lisp_Object help_echo_string, help_echo_window; diff --git a/src/emacs.c b/src/emacs.c index adfff6ff3ed..dac5edd544f 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -95,10 +95,10 @@ static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundati /* Empty lisp strings. To avoid having to build any others. */ Lisp_Object empty_unibyte_string, empty_multibyte_string; -/* Set nonzero after Emacs has started up the first time. - Prevents reinitialization of the Lisp world and keymaps - on subsequent starts. */ -int initialized; +/* Set after Emacs has started up the first time. + Prevents reinitialization of the Lisp world and keymaps + on subsequent starts. */ +bool initialized; #ifdef DARWIN_OS extern void unexec_init_emacs_zone (void); @@ -112,9 +112,9 @@ static void *malloc_state_ptr; extern void *malloc_get_state (void); /* From glibc, a routine that overwrites the malloc internal state. */ extern int malloc_set_state (void*); -/* Non-zero if the MALLOC_CHECK_ environment variable was set while +/* True if the MALLOC_CHECK_ environment variable was set while dumping. Used to work around a bug in glibc's malloc. */ -static int malloc_using_checking; +static bool malloc_using_checking; #endif Lisp_Object Qfile_name_handler_alist; @@ -123,17 +123,17 @@ Lisp_Object Qrisky_local_variable; Lisp_Object Qkill_emacs; -/* If non-zero, Emacs should not attempt to use a window-specific code, +/* If true, Emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ -int inhibit_window_system; +bool inhibit_window_system; -/* If non-zero, a filter or a sentinel is running. Tested to save the match +/* If true, a filter or a sentinel is running. Tested to save the match data on the first attempt to change it inside asynchronous code. */ -int running_asynch_code; +bool running_asynch_code; #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) -/* If non-zero, -d was specified, meaning we're using some window system. */ -int display_arg; +/* If true, -d was specified, meaning we're using some window system. */ +bool display_arg; #endif /* An address near the bottom of the stack. @@ -150,11 +150,11 @@ static void *my_heap_start; static uprintmax_t heap_bss_diff; #endif -/* Nonzero means running Emacs without interactive terminal. */ -int noninteractive; +/* True means running Emacs without interactive terminal. */ +bool noninteractive; -/* Nonzero means remove site-lisp directories from load-path. */ -int no_site_lisp; +/* True means remove site-lisp directories from load-path. */ +bool no_site_lisp; /* Name for the server started by the daemon.*/ static char *daemon_name; @@ -272,8 +272,8 @@ section of the Emacs manual or the file BUGS.\n" /* Signal code for the fatal signal that was received. */ static int fatal_error_code; -/* Nonzero if handling a fatal error already. */ -int fatal_error_in_progress; +/* True if handling a fatal error already. */ +bool fatal_error_in_progress; #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD /* When compiled with GTK and running under Gnome, @@ -311,7 +311,7 @@ fatal_error_signal (int sig) if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) Fkill_emacs (make_number (sig)); - shut_down_emacs (sig, 0, Qnil); + shut_down_emacs (sig, Qnil); } /* Signal the same code; this time it will really be fatal. @@ -568,7 +568,7 @@ DEFINE_DUMMY_FUNCTION (__main) Too bad we can't just use getopt for all of this, but we don't have enough information to do it right. */ -static int +static bool argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr) { @@ -675,12 +675,12 @@ main (int argc, char **argv) Lisp_Object dummy; #endif char stack_bottom_variable; - int do_initial_setlocale; + bool do_initial_setlocale; int skip_args = 0; #ifdef HAVE_SETRLIMIT struct rlimit rlim; #endif - int no_loadup = 0; + bool no_loadup = 0; char *junk = 0; char *dname_arg = 0; #ifdef NS_IMPL_COCOA @@ -1955,7 +1955,7 @@ all of which are called before Emacs is actually killed. */) x_clipboard_manager_save_all (); #endif - shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); + shut_down_emacs (0, STRINGP (arg) ? arg : Qnil); #ifdef HAVE_NS ns_release_autorelease_pool (ns_pool); @@ -1991,7 +1991,7 @@ all of which are called before Emacs is actually killed. */) and Fkill_emacs. */ void -shut_down_emacs (int sig, int no_x, Lisp_Object stuff) +shut_down_emacs (int sig, Lisp_Object stuff) { /* Prevent running of hooks from now on. */ Vrun_hooks = Qnil; @@ -2026,17 +2026,6 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff) unlock_all_files (); #endif -#if 0 /* This triggers a bug in XCloseDisplay and is not needed. */ -#ifdef HAVE_X_WINDOWS - /* It's not safe to call intern here. Maybe we are crashing. */ - if (!noninteractive && SYMBOLP (Vinitial_window_system) - && SCHARS (SYMBOL_NAME (Vinitial_window_system)) == 1 - && SREF (SYMBOL_NAME (Vinitial_window_system), 0) == 'x' - && ! no_x) - Fx_close_current_connection (); -#endif /* HAVE_X_WINDOWS */ -#endif - #ifdef SIGIO /* There is a tendency for a SIGIO signal to arrive within exit, and cause a SIGHUP because the input descriptor is already closed. */ @@ -2228,7 +2217,7 @@ decode_env_path (const char *evarname, const char *defalt) const char *path, *p; Lisp_Object lpath, element, tem; #ifdef WINDOWSNT - int defaulted = 0; + bool defaulted = 0; const char *emacs_dir = egetenv ("emacs_dir"); static const char *emacs_dir_env = "%emacs_dir%/"; const size_t emacs_dir_len = strlen (emacs_dir_env); @@ -2324,7 +2313,7 @@ from the parent process and its tty file descriptors. */) (void) { int nfd; - int err = 0; + bool err = 0; if (!IS_DAEMON) error ("This function can only be called if emacs is run as a daemon"); diff --git a/src/eval.c b/src/eval.c index ad1daf721b8..3a4953665e3 100644 --- a/src/eval.c +++ b/src/eval.c @@ -131,7 +131,7 @@ int handling_signal; Lisp_Object inhibit_lisp_code; static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); -static int interactive_p (int); +static bool interactive_p (void); static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); /* Functions to set Lisp_Object slots of struct specbinding. */ @@ -194,7 +194,7 @@ restore_stack_limits (Lisp_Object data) static Lisp_Object call_debugger (Lisp_Object arg) { - int debug_while_redisplaying; + bool debug_while_redisplaying; ptrdiff_t count = SPECPDL_INDEX (); Lisp_Object val; EMACS_INT old_max = max_specpdl_size; @@ -525,7 +525,7 @@ spec that specifies non-nil unconditionally (such as \"p\"); or (ii) use `called-interactively-p'. */) (void) { - return interactive_p (1) ? Qt : Qnil; + return interactive_p () ? Qt : Qnil; } @@ -550,19 +550,17 @@ non-nil unconditionally (\"p\" is a good way to do this), or via \(not (or executing-kbd-macro noninteractive)). */) (Lisp_Object kind) { - return ((INTERACTIVE || !EQ (kind, intern ("interactive"))) - && interactive_p (1)) ? Qt : Qnil; + return (((INTERACTIVE || !EQ (kind, intern ("interactive"))) + && interactive_p ()) + ? Qt : Qnil); } -/* Return 1 if function in which this appears was called using - call-interactively. +/* Return true if function in which this appears was called using + call-interactively and is not a built-in. */ - EXCLUDE_SUBRS_P non-zero means always return 0 if the function - called is a built-in. */ - -static int -interactive_p (int exclude_subrs_p) +static bool +interactive_p (void) { struct backtrace *btp; Lisp_Object fun; @@ -591,9 +589,9 @@ interactive_p (int exclude_subrs_p) /* `btp' now points at the frame of the innermost function that isn't a special form, ignoring frames for Finteractive_p and/or Fbytecode at the top. If this frame is for a built-in function - (such as load or eval-region) return nil. */ + (such as load or eval-region) return false. */ fun = Findirect_function (*btp->function, Qnil); - if (exclude_subrs_p && SUBRP (fun)) + if (SUBRP (fun)) return 0; /* `btp' points to the frame of a Lisp function that called interactive-p. @@ -1101,7 +1099,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object static _Noreturn void unwind_to_catch (struct catchtag *catch, Lisp_Object value) { - int last_time; + bool last_time; /* Save the value in the tag. */ catch->val = value; @@ -1450,8 +1448,8 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object); -static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, - Lisp_Object data); +static bool maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, + Lisp_Object data); void process_quit_flag (void) @@ -1556,7 +1554,7 @@ See also the function `condition-case'. */) if requested". */ || EQ (h->handler, Qerror))) { - int debugger_called + bool debugger_called = maybe_call_debugger (conditions, error_symbol, data); /* We can't return values to code which signaled an error, but we can continue code which has signaled a quit. */ @@ -1650,10 +1648,10 @@ signal_error (const char *s, Lisp_Object arg) } -/* Return nonzero if LIST is a non-nil atom or +/* Return true if LIST is a non-nil atom or a list containing one of CONDITIONS. */ -static int +static bool wants_debugger (Lisp_Object list, Lisp_Object conditions) { if (NILP (list)) @@ -1673,15 +1671,15 @@ wants_debugger (Lisp_Object list, Lisp_Object conditions) return 0; } -/* Return 1 if an error with condition-symbols CONDITIONS, +/* Return true if an error with condition-symbols CONDITIONS, and described by SIGNAL-DATA, should skip the debugger according to debugger-ignored-errors. */ -static int +static bool skip_debugger (Lisp_Object conditions, Lisp_Object data) { Lisp_Object tail; - int first_string = 1; + bool first_string = 1; Lisp_Object error_message; error_message = Qnil; @@ -1716,7 +1714,7 @@ skip_debugger (Lisp_Object conditions, Lisp_Object data) = SIG is the error symbol, and DATA is the rest of the data. = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA). This is for memory-full errors only. */ -static int +static bool maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) { Lisp_Object combined_data; @@ -2939,7 +2937,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object val, syms_left, next, lexenv; ptrdiff_t count = SPECPDL_INDEX (); ptrdiff_t i; - int optional, rest; + bool optional, rest; if (CONSP (fun)) { @@ -3342,13 +3340,13 @@ Output stream used is value of `standard-output'. */) write_string ("(", -1); if (backlist->nargs == MANY) { /* FIXME: Can this happen? */ - int i; - for (tail = *backlist->args, i = 0; - !NILP (tail); - tail = Fcdr (tail), i = 1) + bool later_arg = 0; + for (tail = *backlist->args; !NILP (tail); tail = Fcdr (tail)) { - if (i) write_string (" ", -1); + if (later_arg) + write_string (" ", -1); Fprin1 (Fcar (tail), Qnil); + later_arg = 1; } } else diff --git a/src/firstfile.c b/src/firstfile.c index 84511cfe0ad..444fb71b55d 100644 --- a/src/firstfile.c +++ b/src/firstfile.c @@ -27,7 +27,6 @@ static char _my_begbss[1]; char * my_begbss_static = _my_begbss; /* Add a dummy reference to ensure emacs.obj is linked in. */ -extern int initialized; -static int * dummy = &initialized; +extern int main (int, char **); +static int (*dummy) (int, char **) = main; #endif - diff --git a/src/lisp.h b/src/lisp.h index 75f1b5e802d..35a07c838fb 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3258,7 +3258,7 @@ extern void syms_of_frame (void); extern char **initial_argv; extern int initial_argc; #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) -extern int display_arg; +extern bool display_arg; #endif extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object empty_unibyte_string, empty_multibyte_string; @@ -3277,22 +3277,26 @@ void synchronize_system_time_locale (void); #define synchronize_system_messages_locale() #define synchronize_system_time_locale() #endif -void shut_down_emacs (int, int, Lisp_Object); -/* Nonzero means don't do interactive redisplay and don't change tty modes. */ -extern int noninteractive; +extern void shut_down_emacs (int, Lisp_Object); -/* Nonzero means remove site-lisp directories from load-path. */ -extern int no_site_lisp; +/* True means don't do interactive redisplay and don't change tty modes. */ +extern bool noninteractive; + +/* True means remove site-lisp directories from load-path. */ +extern bool no_site_lisp; /* Pipe used to send exit notification to the daemon parent at startup. */ extern int daemon_pipe[2]; #define IS_DAEMON (daemon_pipe[1] != 0) -/* Nonzero means don't do use window-system-specific display code. */ -extern int inhibit_window_system; -/* Nonzero means that a filter or a sentinel is running. */ -extern int running_asynch_code; +/* True if handling a fatal error already. */ +extern bool fatal_error_in_progress; + +/* True means don't do use window-system-specific display code. */ +extern bool inhibit_window_system; +/* True means that a filter or a sentinel is running. */ +extern bool running_asynch_code; /* Defined in process.c. */ extern Lisp_Object QCtype, Qlocal; @@ -3514,9 +3518,9 @@ void syms_of_dbusbind (void); extern char *emacs_root_dir (void); #endif /* DOS_NT */ -/* Nonzero means Emacs has already been initialized. +/* True means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ -extern int initialized; +extern bool initialized; extern int immediate_quit; /* Nonzero means ^G can quit instantly */ diff --git a/src/msdos.c b/src/msdos.c index a214456d104..ac348e94375 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1029,7 +1029,6 @@ IT_clear_end_of_line (struct frame *f, int first_unused) { char *spaces, *sp; int i, j, offset = 2 * (new_pos_X + screen_size_X * new_pos_Y); - extern int fatal_error_in_progress; struct tty_display_info *tty = FRAME_TTY (f); if (new_pos_X >= first_unused || fatal_error_in_progress) diff --git a/src/process.c b/src/process.c index 81fa98a028d..04b6abe50a7 100644 --- a/src/process.c +++ b/src/process.c @@ -5194,7 +5194,7 @@ read_process_output (Lisp_Object proc, register int channel) if (!NILP (outstream)) { Lisp_Object text; - int outer_running_asynch_code = running_asynch_code; + bool outer_running_asynch_code = running_asynch_code; int waiting = waiting_for_user_input_p; /* No need to gcpro these, because all we do with them later @@ -6558,9 +6558,9 @@ static void exec_sentinel (Lisp_Object proc, Lisp_Object reason) { Lisp_Object sentinel, odeactivate; - register struct Lisp_Process *p = XPROCESS (proc); + struct Lisp_Process *p = XPROCESS (proc); ptrdiff_t count = SPECPDL_INDEX (); - int outer_running_asynch_code = running_asynch_code; + bool outer_running_asynch_code = running_asynch_code; int waiting = waiting_for_user_input_p; if (inhibit_sentinels) diff --git a/src/w32.c b/src/w32.c index 84a46e522bb..fe612687f48 100644 --- a/src/w32.c +++ b/src/w32.c @@ -6773,7 +6773,7 @@ shutdown_handler (DWORD type) || type == CTRL_SHUTDOWN_EVENT) /* User shutsdown. */ { /* Shut down cleanly, making sure autosave files are up to date. */ - shut_down_emacs (0, 0, Qnil); + shut_down_emacs (0, Qnil); } /* Allow other handlers to handle this signal. */ diff --git a/src/xdisp.c b/src/xdisp.c index 13b03736bde..86f041dea4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -768,9 +768,9 @@ static int clear_image_cache_count; static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; #endif -/* Non-zero while redisplay_internal is in progress. */ +/* True while redisplay_internal is in progress. */ -int redisplaying_p; +bool redisplaying_p; static Lisp_Object Qinhibit_free_realized_faces; static Lisp_Object Qmode_line_default_help_echo; @@ -12966,12 +12966,11 @@ redisplay_internal (void) if (redisplaying_p) return; - /* Record a function that resets redisplaying_p to its old value + /* Record a function that clears redisplaying_p when we leave this function. */ count = SPECPDL_INDEX (); - record_unwind_protect (unwind_redisplay, - Fcons (make_number (redisplaying_p), selected_frame)); - ++redisplaying_p; + record_unwind_protect (unwind_redisplay, selected_frame); + redisplaying_p = 1; specbind (Qinhibit_free_realized_faces, Qnil); { @@ -13709,21 +13708,15 @@ redisplay_preserve_echo_area (int from_where) } -/* Function registered with record_unwind_protect in - redisplay_internal. Reset redisplaying_p to the value it had - before redisplay_internal was called, and clear - prevent_freeing_realized_faces_p. It also selects the previously +/* Function registered with record_unwind_protect in redisplay_internal. + Clear redisplaying_p. Also, select the previously selected frame, unless it has been deleted (by an X connection failure during redisplay, for example). */ static Lisp_Object -unwind_redisplay (Lisp_Object val) +unwind_redisplay (Lisp_Object old_frame) { - Lisp_Object old_redisplaying_p, old_frame; - - old_redisplaying_p = XCAR (val); - redisplaying_p = XFASTINT (old_redisplaying_p); - old_frame = XCDR (val); + redisplaying_p = 0; if (! EQ (old_frame, selected_frame) && FRAME_LIVE_P (XFRAME (old_frame))) select_frame_for_redisplay (old_frame); diff --git a/src/xterm.c b/src/xterm.c index 052db0f3e63..f497b5322bf 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7843,7 +7843,7 @@ x_connection_closed (Display *dpy, const char *error_message) (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, the resulting Glib error message loop filled a user's disk. To avoid this, kill Emacs unconditionally on disconnect. */ - shut_down_emacs (0, 0, Qnil); + shut_down_emacs (0, Qnil); fprintf (stderr, "%s\n\ When compiled with GTK, Emacs cannot recover from X disconnects.\n\ This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ From 3eab3ca987b74c54788052bbace0fc5c8e93363c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 3 Sep 2012 16:13:33 +0800 Subject: [PATCH 010/216] * gtkutil.c: Add extern decl for Qxft. --- src/ChangeLog | 4 ++++ src/gtkutil.c | 1 + 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2053c258df4..c781204e679 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-03 Chong Yidong + + * gtkutil.c: Add extern decl for Qxft. + 2012-09-02 Paul Eggert * emacs.c, eval.c: Use bool for boolean. diff --git a/src/gtkutil.c b/src/gtkutil.c index 48a83725fd9..f0d2c022f0c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2038,6 +2038,7 @@ xg_get_file_name (FRAME_PTR f, static char *x_last_font_name; +extern Lisp_Object Qxft; /* Pop up a GTK font selector and return the name of the font the user selects, as a C string. The returned font name follows GTK's own From c5e28e39275c4a5a63adbe3e1e3b23a58c4a4bb8 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 3 Sep 2012 10:54:25 +0200 Subject: [PATCH 011/216] New macro with-temp-buffer-window and related fixes. * buffer.c (Fdelete_all_overlays): New function. * window.el (temp-buffer-window-setup-hook) (temp-buffer-window-show-hook): New hooks. (temp-buffer-window-setup, temp-buffer-window-show) (with-temp-buffer-window): New functions. (fit-window-to-buffer): Remove unused optional argument OVERRIDE. (special-display-popup-frame): Make sure the window used shows BUFFER. * help.el (temp-buffer-resize-mode): Fix doc-string. (resize-temp-buffer-window): New optional argument WINDOW. * files.el (recover-file, save-buffers-kill-emacs): * dired.el (dired-mark-pop-up): Use with-temp-buffer-window. --- etc/NEWS | 4 ++ lisp/ChangeLog | 17 ++++++ lisp/dired.el | 49 +++++++++-------- lisp/files.el | 48 ++++++++++------- lisp/help.el | 40 +++++++------- lisp/window.el | 141 +++++++++++++++++++++++++++++++++++++++++-------- src/ChangeLog | 4 ++ src/buffer.c | 20 +++++++ 8 files changed, 244 insertions(+), 79 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 45966e53882..a2d0ffe232c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -631,6 +631,10 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'. *** The functions get-lru-window, get-mru-window and get-largest-window now accept a third argument to avoid choosing the selected window. +*** New macro with-temp-buffer-window. + +*** New display action function display-buffer-below-selected. + *** New display action alist `inhibit-switch-frame', if non-nil, tells display action functions to avoid changing which frame is selected. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62d3097ccaa..87904b8313b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2012-09-03 Martin Rudalics + + * window.el (temp-buffer-window-setup-hook) + (temp-buffer-window-show-hook): New hooks. + (temp-buffer-window-setup, temp-buffer-window-show) + (with-temp-buffer-window): New functions. + (fit-window-to-buffer): Remove unused optional argument + OVERRIDE. + (special-display-popup-frame): Make sure the window used shows + BUFFER. + + * help.el (temp-buffer-resize-mode): Fix doc-string. + (resize-temp-buffer-window): New optional argument WINDOW. + + * files.el (recover-file, save-buffers-kill-emacs): + * dired.el (dired-mark-pop-up): Use with-temp-buffer-window. + 2012-09-02 Michael Albinus * eshell/em-unix.el (eshell/sudo): When we have an ad-hoc diff --git a/lisp/dired.el b/lisp/dired.el index 5ae0e026172..cd27b6b6404 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2973,36 +2973,43 @@ If t, confirmation is never needed." (const shell) (const symlink) (const touch) (const uncompress)))) -(defun dired-mark-pop-up (bufname op-symbol files function &rest args) +(defun dired-mark-pop-up (buffer-or-name op-symbol files function &rest args) "Return FUNCTION's result on ARGS after showing which files are marked. -Displays the file names in a buffer named BUFNAME; - nil gives \" *Marked Files*\". -This uses function `dired-pop-to-buffer' to do that. +Displays the file names in a window showing a buffer named +BUFFER-OR-NAME; the default name being \" *Marked Files*\". The +window is not shown if there is just one file, `dired-no-confirm' +is t, or OP-SYMBOL is a member of the list in `dired-no-confirm'. -FUNCTION should not manipulate files, just read input - (an argument or confirmation). -The window is not shown if there is just one file or - OP-SYMBOL is a member of the list in `dired-no-confirm'. FILES is the list of marked files. It can also be (t FILENAME) in the case of one marked file, to distinguish that from using -just the current file." - (or bufname (setq bufname " *Marked Files*")) +just the current file. + +FUNCTION should not manipulate files, just read input \(an +argument or confirmation)." (if (or (eq dired-no-confirm t) (memq op-symbol dired-no-confirm) ;; If FILES defaulted to the current line's file. (= (length files) 1)) (apply function args) - (with-current-buffer (get-buffer-create bufname) - (erase-buffer) - ;; Handle (t FILE) just like (FILE), here. - ;; That value is used (only in some cases), to mean - ;; just one file that was marked, rather than the current line file. - (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files)) - (remove-text-properties (point-min) (point-max) - '(mouse-face nil help-echo nil))) - (save-window-excursion - (dired-pop-to-buffer bufname) - (apply function args)))) + (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))) + (with-current-buffer buffer + (let ((split-height-threshold 0)) + (with-temp-buffer-window + buffer + (cons 'display-buffer-below-selected nil) + #'(lambda (window _value) + (with-selected-window window + (unwind-protect + (apply function args) + (when (window-live-p window) + (quit-restore-window window 'kill))))) + ;; Handle (t FILE) just like (FILE), here. That value is + ;; used (only in some cases), to mean just one file that was + ;; marked, rather than the current line file. + (dired-format-columns-of-files + (if (eq (car files) t) (cdr files) files)) + (remove-text-properties (point-min) (point-max) + '(mouse-face nil help-echo nil)))))))) (defun dired-format-columns-of-files (files) (let ((beg (point))) diff --git a/lisp/files.el b/lisp/files.el index ef7f8e43a41..6528632c841 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5350,23 +5350,26 @@ non-nil, it is called instead of rereading visited file contents." (not (file-exists-p file-name))) (error "Auto-save file %s not current" (abbreviate-file-name file-name))) - ((save-window-excursion - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (save-excursion - (let ((switches dired-listing-switches)) - (if (file-symlink-p file) - (setq switches (concat switches " -L"))) - (set-buffer standard-output) - ;; Use insert-directory-safely, not insert-directory, - ;; because these files might not exist. In particular, - ;; FILE might not exist if the auto-save file was for - ;; a buffer that didn't visit a file, such as "*mail*". - ;; The code in v20.x called `ls' directly, so we need - ;; to emulate what `ls' did in that case. - (insert-directory-safely file switches) - (insert-directory-safely file-name switches)))) - (yes-or-no-p (format "Recover auto save file %s? " file-name))) + ((with-temp-buffer-window + "*Directory*" nil + #'(lambda (window _value) + (with-selected-window window + (unwind-protect + (yes-or-no-p (format "Recover auto save file %s? " file-name)) + (when (window-live-p window) + (quit-restore-window window 'kill))))) + (with-current-buffer standard-output + (let ((switches dired-listing-switches)) + (if (file-symlink-p file) + (setq switches (concat switches " -L"))) + ;; Use insert-directory-safely, not insert-directory, + ;; because these files might not exist. In particular, + ;; FILE might not exist if the auto-save file was for + ;; a buffer that didn't visit a file, such as "*mail*". + ;; The code in v20.x called `ls' directly, so we need + ;; to emulate what `ls' did in that case. + (insert-directory-safely file switches) + (insert-directory-safely file-name switches)))) (switch-to-buffer (find-file-noselect file t)) (let ((inhibit-read-only t) ;; Keep the current buffer-file-coding-system. @@ -6327,8 +6330,15 @@ if any returns nil. If `confirm-kill-emacs' is non-nil, calls it." (setq active t)) (setq processes (cdr processes))) (or (not active) - (progn (list-processes t) - (yes-or-no-p "Active processes exist; kill them and exit anyway? "))))) + (with-temp-buffer-window + (get-buffer-create "*Process List*") nil + #'(lambda (window _value) + (with-selected-window window + (unwind-protect + (yes-or-no-p "Active processes exist; kill them and exit anyway? ") + (when (window-live-p window) + (quit-restore-window window 'kill))))) + (list-processes t))))) ;; Query the user for other things, perhaps. (run-hook-with-args-until-failure 'kill-emacs-query-functions) (or (null confirm-kill-emacs) diff --git a/lisp/help.el b/lisp/help.el index 19db7c255d1..9740f8996c1 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -39,9 +39,10 @@ ;; `help-window-point-marker' is a marker you can move to a valid ;; position of the buffer shown in the help window in order to override ;; the standard positioning mechanism (`point-min') chosen by -;; `with-output-to-temp-buffer'. `with-help-window' has this point -;; nowhere before exiting. Currently used by `view-lossage' to assert -;; that the last keystrokes are always visible. +;; `with-output-to-temp-buffer' and `with-temp-buffer-window'. +;; `with-help-window' has this point nowhere before exiting. Currently +;; used by `view-lossage' to assert that the last keystrokes are always +;; visible. (defvar help-window-point-marker (make-marker) "Marker to override default `window-point' in help windows.") @@ -975,13 +976,13 @@ function is called, the window to be resized is selected." :version "20.4") (define-minor-mode temp-buffer-resize-mode - "Toggle auto-shrinking temp buffer windows (Temp Buffer Resize mode). + "Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode). With a prefix argument ARG, enable Temp Buffer Resize mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. When Temp Buffer Resize mode is enabled, the windows in which we -show a temporary buffer are automatically reduced in height to +show a temporary buffer are automatically resized in height to fit the buffer's contents, but never more than `temp-buffer-max-height' nor less than `window-min-height'. @@ -994,19 +995,22 @@ and some others." (add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append) (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) -(defun resize-temp-buffer-window () - "Resize the selected window to fit its contents. -Will not make it higher than `temp-buffer-max-height' nor smaller -than `window-min-height'. Do nothing if the selected window is -not vertically combined or some of its contents are scrolled out -of view." - (when (and (pos-visible-in-window-p (point-min)) - (window-combined-p)) - (fit-window-to-buffer - nil - (if (functionp temp-buffer-max-height) - (funcall temp-buffer-max-height (window-buffer)) - temp-buffer-max-height)))) +(defun resize-temp-buffer-window (&optional window) + "Resize WINDOW to fit its contents. +WINDOW can be any live window and defaults to the selected one. + +Do not make WINDOW higher than `temp-buffer-max-height' nor +smaller than `window-min-height'. Do nothing if WINDOW is not +vertically combined or some of its contents are scrolled out of +view." + (setq window (window-normalize-window window t)) + (let ((height (if (functionp temp-buffer-max-height) + (with-selected-window window + (funcall temp-buffer-max-height (window-buffer))) + temp-buffer-max-height))) + (when (and (pos-visible-in-window-p (point-min) window) + (window-combined-p window)) + (fit-window-to-buffer window height)))) ;;; Help windows. (defcustom help-window-select 'other diff --git a/lisp/window.el b/lisp/window.el index 2fce874e987..f73c85e991b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -73,6 +73,108 @@ are not altered by this macro (unless they are altered in BODY)." (when (window-live-p save-selected-window-window) (select-window save-selected-window-window 'norecord)))))) +(defvar temp-buffer-window-setup-hook nil + "Normal hook run by `with-temp-buffer-window' before buffer display. +This hook is run by `with-temp-buffer-window' with the buffer to be +displayed current.") + +(defvar temp-buffer-window-show-hook nil + "Normal hook run by `with-temp-buffer-window' after buffer display. +This hook is run by `with-temp-buffer-window' with the buffer +displayed and current and its window selected.") + +(defun temp-buffer-window-setup (buffer-or-name) + "Set up temporary buffer specified by BUFFER-OR-NAME +Return the buffer." + (let ((old-dir default-directory) + (buffer (get-buffer-create buffer-or-name))) + (with-current-buffer buffer + (kill-all-local-variables) + (setq default-directory old-dir) + (delete-all-overlays) + (setq buffer-read-only nil) + (setq buffer-file-name nil) + (setq buffer-undo-list t) + (let ((inhibit-read-only t) + (inhibit-modification-hooks t)) + (erase-buffer) + (run-hooks 'temp-buffer-window-setup-hook)) + ;; Return the buffer. + buffer))) + +(defun temp-buffer-window-show (&optional buffer action) + "Show temporary buffer BUFFER in a window. +Return the window showing BUFFER. Pass ACTION as action argument +to `display-buffer'." + (let (window frame) + (with-current-buffer buffer + (set-buffer-modified-p nil) + (setq buffer-read-only t) + (goto-char (point-min)) + (when (setq window (display-buffer buffer action)) + (setq frame (window-frame window)) + (unless (eq frame (selected-frame)) + (raise-frame frame)) + (setq minibuffer-scroll-window window) + (set-window-hscroll window 0) + (with-selected-window window + (run-hooks 'temp-buffer-window-show-hook) + (when temp-buffer-resize-mode + (resize-temp-buffer-window window))) + ;; Return the window. + window)))) + +(defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body) + "Evaluate BODY and display buffer specified by BUFFER-OR-NAME. +BUFFER-OR-NAME must specify either a live buffer or the name of a +buffer. If no buffer with such a name exists, create one. + +Make sure the specified buffer is empty before evaluating BODY. +Do not make that buffer current for BODY. Instead, bind +`standard-output' to that buffer, so that output generated with +`prin1' and similar functions in BODY goes into that buffer. + +After evaluating BODY, mark the specified buffer unmodified and +read-only, and display it in a window via `display-buffer'. Pass +ACTION as action argument to `display-buffer'. Automatically +shrink the window used if `temp-buffer-resize-mode' is enabled. + +Return the value returned by BODY unless QUIT-FUNCTION specifies +a function. In that case, run the function with two arguments - +the window showing the specified buffer and the value returned by +BODY - and return the value returned by that function. + +If the buffer is displayed on a new frame, the window manager may +decide to select that frame. In that case, it's usually a good +strategy if the function specified by QUIT-FUNCTION selects the +window showing the buffer before reading a value from the +minibuffer, for example, when asking a `yes-or-no-p' question. + +This construct is similar to `with-output-to-temp-buffer' but +does neither put the buffer in help mode nor does it call +`temp-buffer-show-function'. It also runs different hooks, +namely `temp-buffer-window-setup-hook' (with the specified buffer +current) and `temp-buffer-window-show-hook' (with the specified +buffer current and the window showing it selected). + +Since this macro calls `display-buffer', the window displaying +the buffer is usually not selected and the specified buffer +usually not made current. QUIT-FUNCTION can override that." + (declare (debug t)) + (let ((buffer (make-symbol "buffer")) + (window (make-symbol "window")) + (value (make-symbol "value"))) + `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name)) + (standard-output ,buffer) + ,window ,value) + (with-current-buffer ,buffer + (setq ,value (progn ,@body)) + (setq ,window (temp-buffer-window-show ,buffer ,action))) + + (if (functionp ,quit-function) + (funcall ,quit-function ,window ,value) + ,value)))) + ;; The following two functions are like `window-next-sibling' and ;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so ;; they don't substitute the selected window for nil), and they return @@ -4696,6 +4798,9 @@ and (cdr ARGS) as second." (make-frame (append args special-display-frame-alist)))) (window (frame-selected-window frame))) (display-buffer-record-window 'frame window buffer) + (unless (eq buffer (window-buffer window)) + (set-window-buffer window buffer) + (set-window-prev-buffers window nil)) (set-window-dedicated-p window t) window))))) @@ -5710,7 +5815,7 @@ WINDOW must be a live window and defaults to the selected one." window)))) ;;; Resizing buffers to fit their contents exactly. -(defun fit-window-to-buffer (&optional window max-height min-height override) +(defun fit-window-to-buffer (&optional window max-height min-height) "Adjust height of WINDOW to display its buffer's contents exactly. WINDOW must be a live window and defaults to the selected one. @@ -5721,10 +5826,6 @@ defaults to `window-min-height'. Both MAX-HEIGHT and MIN-HEIGHT are specified in lines and include the mode line and header line, if any. -Optional argument OVERRIDE non-nil means override restrictions -imposed by `window-min-height' and `window-min-width' on the size -of WINDOW. - Return the number of lines by which WINDOW was enlarged or shrunk. If an error occurs during resizing, return nil but don't signal an error. @@ -5733,28 +5834,27 @@ Note that even if this function makes WINDOW large enough to show _all_ lines of its buffer you might not see the first lines when WINDOW was scrolled." (interactive) - ;; Do all the work in WINDOW and its buffer and restore the selected - ;; window and the current buffer when we're done. (setq window (window-normalize-window window t)) ;; Can't resize a full height or fixed-size window. (unless (or (window-size-fixed-p window) (window-full-height-p window)) - ;; `with-selected-window' should orderly restore the current buffer. (with-selected-window window - ;; We are in WINDOW's buffer now. - (let* (;; Adjust MIN-HEIGHT. + (let* ((height (window-total-size)) (min-height - (if override - (window-min-size window nil window) - (max (or min-height window-min-height) - window-safe-min-height))) - (max-window-height - (window-total-size (frame-root-window window))) - ;; Adjust MAX-HEIGHT. + ;; Adjust MIN-HEIGHT. + (if (numberp min-height) + ;; Can't get smaller than `window-safe-min-height'. + (max min-height window-safe-min-height) + ;; Preserve header and mode line if present. + (window-min-size nil nil t))) (max-height - (if (or override (not max-height)) - max-window-height - (min max-height max-window-height))) + ;; Adjust MAX-HEIGHT. + (if (numberp max-height) + ;; Can't get larger than height of frame. + (min max-height + (window-total-size (frame-root-window window))) + ;, Don't delete other windows. + (+ height (window-max-delta nil nil window)))) ;; Make `desired-height' the height necessary to show ;; all of WINDOW's buffer, constrained by MIN-HEIGHT ;; and MAX-HEIGHT. @@ -5779,7 +5879,6 @@ WINDOW was scrolled." (window-max-delta window nil window)) (max desired-delta (- (window-min-delta window nil window)))))) - ;; This `condition-case' shouldn't be necessary, but who knows? (condition-case nil (if (zerop delta) ;; Return zero if DELTA became zero in the process. diff --git a/src/ChangeLog b/src/ChangeLog index c781204e679..203e5dca018 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-03 Martin Rudalics + + * buffer.c (Fdelete_all_overlays): New function. + 2012-09-03 Chong Yidong * gtkutil.c: Add extern decl for Qxft. diff --git a/src/buffer.c b/src/buffer.c index 0e2e50d9f51..ce6f42f136f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4073,6 +4073,25 @@ DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, return unbind_to (count, Qnil); } + +DEFUN ("delete-all-overlays", Fdelete_all_overlays, Sdelete_all_overlays, 0, 1, 0, + doc: /* Delete all overlays of BUFFER. +BUFFER omitted or nil means delete all overlays of the current +buffer. */) + (Lisp_Object buffer) +{ + register struct buffer *buf; + + if (NILP (buffer)) + buf = current_buffer; + else + { + CHECK_BUFFER (buffer); + buf = XBUFFER (buffer); + } + + delete_all_overlays (buf); +} /* Overlay dissection functions. */ @@ -6286,6 +6305,7 @@ and `bury-buffer-internal'. */); defsubr (&Soverlayp); defsubr (&Smake_overlay); defsubr (&Sdelete_overlay); + defsubr (&Sdelete_all_overlays); defsubr (&Smove_overlay); defsubr (&Soverlay_start); defsubr (&Soverlay_end); From 26d4541d4c0c9a71453143c17d392291c41856ff Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 02:22:43 -0700 Subject: [PATCH 012/216] Fix minor problems found by static checking. * buffer.c (Fdelete_all_overlays): Return nil. * doc.c (Fsubstitute_command_keys): * regex.c (WEAK_ALIAS): * xdisp.c (redisplay_internal): Move initialization down, to pacify GCC 4.7.1 -Wjump-misses-init. --- src/ChangeLog | 9 +++++++++ src/buffer.c | 1 + src/doc.c | 3 ++- src/regex.c | 6 ++++-- src/xdisp.c | 3 ++- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 203e5dca018..43e629eb5f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-09-03 Paul Eggert + + Fix minor problems found by static checking. + * buffer.c (Fdelete_all_overlays): Return nil. + * doc.c (Fsubstitute_command_keys): + * regex.c (WEAK_ALIAS): + * xdisp.c (redisplay_internal): + Move initialization down, to pacify GCC 4.7.1 -Wjump-misses-init. + 2012-09-03 Martin Rudalics * buffer.c (Fdelete_all_overlays): New function. diff --git a/src/buffer.c b/src/buffer.c index ce6f42f136f..f4d38e50a47 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4091,6 +4091,7 @@ buffer. */) } delete_all_overlays (buf); + return Qnil; } /* Overlay dissection functions. */ diff --git a/src/doc.c b/src/doc.c index 02a5b4b8143..c21935577f2 100644 --- a/src/doc.c +++ b/src/doc.c @@ -848,9 +848,10 @@ Otherwise, return a new string, without any text properties. */) struct buffer *oldbuf; ptrdiff_t start_idx; /* This is for computing the SHADOWS arg for describe_map_tree. */ - Lisp_Object active_maps = Fcurrent_active_maps (Qnil, Qnil); + Lisp_Object active_maps; Lisp_Object earlier_maps; + active_maps = Fcurrent_active_maps (Qnil, Qnil); changed = 1; strp += 2; /* skip \{ or \< */ start = strp; diff --git a/src/regex.c b/src/regex.c index 472ef727979..28813304c8a 100644 --- a/src/regex.c +++ b/src/regex.c @@ -5160,11 +5160,13 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, { /* 1 if this match ends in the same string (string1 or string2) as the best previous match. */ - boolean same_str_p = (FIRST_STRING_P (match_end) - == FIRST_STRING_P (d)); + boolean same_str_p; /* 1 if this match is the best seen so far. */ boolean best_match_p; + same_str_p = (FIRST_STRING_P (match_end) + == FIRST_STRING_P (d)); + /* AIX compiler got confused when this was combined with the previous declaration. */ if (same_str_p) diff --git a/src/xdisp.c b/src/xdisp.c index 86f041dea4d..81322f498ef 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13511,9 +13511,10 @@ redisplay_internal (void) } else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) { - Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); + Lisp_Object mini_window; struct frame *mini_frame; + mini_window = FRAME_MINIBUF_WINDOW (sf); displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); /* Use list_of_error, not Qerror, so that we catch only errors and don't run the debugger. */ From 7f50777729a9c25893826b45ab941d987e36971e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 02:26:56 -0700 Subject: [PATCH 013/216] Merge from gnulib. This incorporates: 2012-08-29 stdbool: be more compatible with mixed C/C++ compiles 2011-11-30 manywarnings: update the list of "all" warnings --- ChangeLog | 6 ++ lib/stdbool.in.h | 51 +++++++++------ m4/manywarnings.m4 | 157 ++++++++++++++++++++++++++------------------- 3 files changed, 127 insertions(+), 87 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62e64622d1f..8af393d4393 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-03 Paul Eggert + + Merge from gnulib, incorporating: + 2012-08-29 stdbool: be more compatible with mixed C/C++ compiles + 2011-11-30 manywarnings: update the list of "all" warnings + 2012-09-02 Jan Djärv * configure.ac (HAVE_GOBJECT): Check for gobject-2.0 (Bug#12332). diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h index ed1f9aa488b..1f8caee4f2d 100644 --- a/lib/stdbool.in.h +++ b/lib/stdbool.in.h @@ -66,24 +66,19 @@ # undef true #endif -/* For the sake of symbolic names in gdb, we define true and false as - enum constants, not only as macros. - It is tempting to write - typedef enum { false = 0, true = 1 } _Bool; - so that gdb prints values of type 'bool' symbolically. But if we do - this, values of type '_Bool' may promote to 'int' or 'unsigned int' - (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' - (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the - enum; this ensures that '_Bool' promotes to 'int'. */ -#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) +#ifdef __cplusplus +# define _Bool bool +# define bool bool +#else +# if defined __BEOS__ && !defined __HAIKU__ /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ -# if !@HAVE__BOOL@ +# if !@HAVE__BOOL@ typedef bool _Bool; -# endif -#else -# if !defined __GNUC__ +# endif +# else +# if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See @@ -103,19 +98,35 @@ typedef bool _Bool; "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ -# define _Bool signed char -# else +# define _Bool signed char +# else /* With this compiler, trust the _Bool type if the compiler has it. */ -# if !@HAVE__BOOL@ +# if !@HAVE__BOOL@ + /* For the sake of symbolic names in gdb, define true and false as + enum constants, not only as macros. + It is tempting to write + typedef enum { false = 0, true = 1 } _Bool; + so that gdb prints values of type 'bool' symbolically. But then + values of type '_Bool' might promote to 'int' or 'unsigned int' + (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' + (see ISO C 99 6.3.1.1.(2)). So add a negative value to the + enum; this ensures that '_Bool' promotes to 'int'. */ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; +# endif # endif # endif +# define bool _Bool #endif -#define bool _Bool /* The other macros must be usable in preprocessor directives. */ -#define false 0 -#define true 1 +#ifdef __cplusplus +# define false false +# define true true +#else +# define false 0 +# define true 1 +#endif + #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index 864fc851982..2760efb3f27 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 @@ -81,95 +81,118 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], gl_manywarn_set= for gl_manywarn_item in \ - -Wall \ -W \ - -Wformat-y2k \ - -Wformat-nonliteral \ - -Wformat-security \ - -Winit-self \ - -Wmissing-include-dirs \ - -Wswitch-default \ - -Wswitch-enum \ - -Wunused \ - -Wunknown-pragmas \ - -Wstrict-aliasing \ - -Wstrict-overflow \ - -Wsystem-headers \ - -Wfloat-equal \ - -Wtraditional \ - -Wtraditional-conversion \ - -Wdeclaration-after-statement \ - -Wundef \ - -Wshadow \ - -Wunsafe-loop-optimizations \ - -Wpointer-arith \ - -Wbad-function-cast \ - -Wc++-compat \ - -Wcast-qual \ - -Wcast-align \ - -Wwrite-strings \ - -Wconversion \ - -Wsign-conversion \ - -Wlogical-op \ - -Waggregate-return \ - -Wstrict-prototypes \ - -Wold-style-definition \ - -Wmissing-prototypes \ - -Wmissing-declarations \ - -Wmissing-noreturn \ - -Wmissing-format-attribute \ - -Wpacked \ - -Wpadded \ - -Wredundant-decls \ - -Wnested-externs \ - -Wunreachable-code \ - -Winline \ - -Winvalid-pch \ - -Wlong-long \ - -Wvla \ - -Wvolatile-register-var \ - -Wdisabled-optimization \ - -Wstack-protector \ - -Woverlength-strings \ - -Wbuiltin-macro-redefined \ - -Wmudflap \ - -Wpacked-bitfield-compat \ - -Wsync-nand \ - ; do - gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" - done - # The following are not documented in the manual but are included in - # output from gcc --help=warnings. - for gl_manywarn_item in \ - -Wattributes \ - -Wcoverage-mismatch \ - -Wunused-macros \ - ; do - gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" - done - # More warnings from gcc 4.6.2 --help=warnings. - for gl_manywarn_item in \ -Wabi \ + -Waddress \ + -Wall \ + -Warray-bounds \ + -Wattributes \ + -Wbad-function-cast \ + -Wbuiltin-macro-redefined \ + -Wcast-align \ + -Wchar-subscripts \ + -Wclobbered \ + -Wcomment \ + -Wcomments \ + -Wcoverage-mismatch \ -Wcpp \ -Wdeprecated \ -Wdeprecated-declarations \ + -Wdisabled-optimization \ -Wdiv-by-zero \ -Wdouble-promotion \ + -Wempty-body \ -Wendif-labels \ + -Wenum-compare \ -Wextra \ -Wformat-contains-nul \ -Wformat-extra-args \ + -Wformat-nonliteral \ + -Wformat-security \ + -Wformat-y2k \ -Wformat-zero-length \ -Wformat=2 \ + -Wfree-nonheap-object \ + -Wignored-qualifiers \ + -Wimplicit \ + -Wimplicit-function-declaration \ + -Wimplicit-int \ + -Winit-self \ + -Winline \ + -Wint-to-pointer-cast \ + -Winvalid-memory-model \ + -Winvalid-pch \ + -Wjump-misses-init \ + -Wlogical-op \ + -Wmain \ + -Wmaybe-uninitialized \ + -Wmissing-braces \ + -Wmissing-declarations \ + -Wmissing-field-initializers \ + -Wmissing-format-attribute \ + -Wmissing-include-dirs \ + -Wmissing-noreturn \ + -Wmissing-parameter-type \ + -Wmissing-prototypes \ + -Wmudflap \ -Wmultichar \ + -Wnarrowing \ + -Wnested-externs \ + -Wnonnull \ -Wnormalized=nfc \ + -Wold-style-declaration \ + -Wold-style-definition \ -Woverflow \ + -Woverlength-strings \ + -Woverride-init \ + -Wpacked \ + -Wpacked-bitfield-compat \ + -Wparentheses \ + -Wpointer-arith \ + -Wpointer-sign \ -Wpointer-to-int-cast \ -Wpragmas \ + -Wreturn-type \ + -Wsequence-point \ + -Wshadow \ + -Wsizeof-pointer-memaccess \ + -Wstack-protector \ + -Wstrict-aliasing \ + -Wstrict-overflow \ + -Wstrict-prototypes \ -Wsuggest-attribute=const \ + -Wsuggest-attribute=format \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ + -Wswitch \ + -Wswitch-default \ + -Wsync-nand \ + -Wsystem-headers \ -Wtrampolines \ + -Wtrigraphs \ + -Wtype-limits \ + -Wuninitialized \ + -Wunknown-pragmas \ + -Wunreachable-code \ + -Wunsafe-loop-optimizations \ + -Wunused \ + -Wunused-but-set-parameter \ + -Wunused-but-set-variable \ + -Wunused-function \ + -Wunused-label \ + -Wunused-local-typedefs \ + -Wunused-macros \ + -Wunused-parameter \ + -Wunused-result \ + -Wunused-value \ + -Wunused-variable \ + -Wvarargs \ + -Wvariadic-macros \ + -Wvector-operation-performance \ + -Wvla \ + -Wvolatile-register-var \ + -Wwrite-strings \ + \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done From dcde497f27945c3ca4ce8c21f655ef6f627acdd2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 3 Sep 2012 06:17:43 -0400 Subject: [PATCH 014/216] Auto-commit of generated files. --- autogen/Makefile.in | 2 + autogen/configure | 213 ++++++++++++++++++++++++++++++-------------- 2 files changed, 148 insertions(+), 67 deletions(-) diff --git a/autogen/Makefile.in b/autogen/Makefile.in index d52d1543c55..dbedb5d12e5 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in @@ -359,6 +359,8 @@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@ GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ +GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ +GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ GSETTINGS_LIBS = @GSETTINGS_LIBS@ diff --git a/autogen/configure b/autogen/configure index 11bca94ea05..12239818695 100755 --- a/autogen/configure +++ b/autogen/configure @@ -1181,6 +1181,8 @@ LIBGNUTLS_CFLAGS LIBSELINUX_LIBS SETTINGS_LIBS SETTINGS_CFLAGS +GOBJECT_LIBS +GOBJECT_CFLAGS GCONF_LIBS GCONF_CFLAGS GSETTINGS_LIBS @@ -7305,95 +7307,118 @@ $as_echo "$gl_cv_cc_nomfi_needed" >&6; } gl_manywarn_set= for gl_manywarn_item in \ - -Wall \ -W \ - -Wformat-y2k \ - -Wformat-nonliteral \ - -Wformat-security \ - -Winit-self \ - -Wmissing-include-dirs \ - -Wswitch-default \ - -Wswitch-enum \ - -Wunused \ - -Wunknown-pragmas \ - -Wstrict-aliasing \ - -Wstrict-overflow \ - -Wsystem-headers \ - -Wfloat-equal \ - -Wtraditional \ - -Wtraditional-conversion \ - -Wdeclaration-after-statement \ - -Wundef \ - -Wshadow \ - -Wunsafe-loop-optimizations \ - -Wpointer-arith \ - -Wbad-function-cast \ - -Wc++-compat \ - -Wcast-qual \ - -Wcast-align \ - -Wwrite-strings \ - -Wconversion \ - -Wsign-conversion \ - -Wlogical-op \ - -Waggregate-return \ - -Wstrict-prototypes \ - -Wold-style-definition \ - -Wmissing-prototypes \ - -Wmissing-declarations \ - -Wmissing-noreturn \ - -Wmissing-format-attribute \ - -Wpacked \ - -Wpadded \ - -Wredundant-decls \ - -Wnested-externs \ - -Wunreachable-code \ - -Winline \ - -Winvalid-pch \ - -Wlong-long \ - -Wvla \ - -Wvolatile-register-var \ - -Wdisabled-optimization \ - -Wstack-protector \ - -Woverlength-strings \ - -Wbuiltin-macro-redefined \ - -Wmudflap \ - -Wpacked-bitfield-compat \ - -Wsync-nand \ - ; do - gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" - done - # The following are not documented in the manual but are included in - # output from gcc --help=warnings. - for gl_manywarn_item in \ - -Wattributes \ - -Wcoverage-mismatch \ - -Wunused-macros \ - ; do - gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" - done - # More warnings from gcc 4.6.2 --help=warnings. - for gl_manywarn_item in \ -Wabi \ + -Waddress \ + -Wall \ + -Warray-bounds \ + -Wattributes \ + -Wbad-function-cast \ + -Wbuiltin-macro-redefined \ + -Wcast-align \ + -Wchar-subscripts \ + -Wclobbered \ + -Wcomment \ + -Wcomments \ + -Wcoverage-mismatch \ -Wcpp \ -Wdeprecated \ -Wdeprecated-declarations \ + -Wdisabled-optimization \ -Wdiv-by-zero \ -Wdouble-promotion \ + -Wempty-body \ -Wendif-labels \ + -Wenum-compare \ -Wextra \ -Wformat-contains-nul \ -Wformat-extra-args \ + -Wformat-nonliteral \ + -Wformat-security \ + -Wformat-y2k \ -Wformat-zero-length \ -Wformat=2 \ + -Wfree-nonheap-object \ + -Wignored-qualifiers \ + -Wimplicit \ + -Wimplicit-function-declaration \ + -Wimplicit-int \ + -Winit-self \ + -Winline \ + -Wint-to-pointer-cast \ + -Winvalid-memory-model \ + -Winvalid-pch \ + -Wjump-misses-init \ + -Wlogical-op \ + -Wmain \ + -Wmaybe-uninitialized \ + -Wmissing-braces \ + -Wmissing-declarations \ + -Wmissing-field-initializers \ + -Wmissing-format-attribute \ + -Wmissing-include-dirs \ + -Wmissing-noreturn \ + -Wmissing-parameter-type \ + -Wmissing-prototypes \ + -Wmudflap \ -Wmultichar \ + -Wnarrowing \ + -Wnested-externs \ + -Wnonnull \ -Wnormalized=nfc \ + -Wold-style-declaration \ + -Wold-style-definition \ -Woverflow \ + -Woverlength-strings \ + -Woverride-init \ + -Wpacked \ + -Wpacked-bitfield-compat \ + -Wparentheses \ + -Wpointer-arith \ + -Wpointer-sign \ -Wpointer-to-int-cast \ -Wpragmas \ + -Wreturn-type \ + -Wsequence-point \ + -Wshadow \ + -Wsizeof-pointer-memaccess \ + -Wstack-protector \ + -Wstrict-aliasing \ + -Wstrict-overflow \ + -Wstrict-prototypes \ -Wsuggest-attribute=const \ + -Wsuggest-attribute=format \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ + -Wswitch \ + -Wswitch-default \ + -Wsync-nand \ + -Wsystem-headers \ -Wtrampolines \ + -Wtrigraphs \ + -Wtype-limits \ + -Wuninitialized \ + -Wunknown-pragmas \ + -Wunreachable-code \ + -Wunsafe-loop-optimizations \ + -Wunused \ + -Wunused-but-set-parameter \ + -Wunused-but-set-variable \ + -Wunused-function \ + -Wunused-label \ + -Wunused-local-typedefs \ + -Wunused-macros \ + -Wunused-parameter \ + -Wunused-result \ + -Wunused-value \ + -Wunused-variable \ + -Wvarargs \ + -Wvariadic-macros \ + -Wvector-operation-performance \ + -Wvla \ + -Wvolatile-register-var \ + -Wwrite-strings \ + \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done @@ -10950,6 +10975,60 @@ $as_echo "#define HAVE_GCONF 1" >>confdefs.h fi if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_GOBJECT=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5 +$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; } + + if $PKG_CONFIG --exists "gobject-2.0 >= 2.0" 2>&5 && + GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.0" 2>&5` && + GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.0" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"` + GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5 +$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GOBJECT_CFLAGS="" + GOBJECT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GOBJECT=yes + else + HAVE_GOBJECT=no + fi + + if test "$HAVE_GOBJECT" = "yes"; then + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS" + fi SAVE_CFLAGS="$CFLAGS" SAVE_LIBS="$LIBS" CFLAGS="$SETTINGS_CFLAGS $CFLAGS" From 79a7bafe62de094b745a47c2b90b17ada5fc5a21 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 12:34:49 -0700 Subject: [PATCH 015/216] * configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init. It generates false alarms in doc.c, regex.c, xdisp.c. See . --- ChangeLog | 4 ++++ configure.ac | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8af393d4393..2fb825ccdda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-09-03 Paul Eggert + * configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init. + It generates false alarms in doc.c, regex.c, xdisp.c. See + . + Merge from gnulib, incorporating: 2012-08-29 stdbool: be more compatible with mixed C/C++ compiles 2011-11-30 manywarnings: update the list of "all" warnings diff --git a/configure.ac b/configure.ac index 0e2154aab6e..77e11910553 100644 --- a/configure.ac +++ b/configure.ac @@ -705,6 +705,7 @@ else nw="$nw -Wswitch-default" # Too many warnings for now nw="$nw -Wfloat-equal" # warns about high-quality code nw="$nw -Winline" # OK to ignore 'inline' + nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations From d42f4f0fb374051f2f80228821e5c0b824451807 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 12:36:09 -0700 Subject: [PATCH 016/216] Revert changes prompted only by gcc -Wjump-misses-init. --- src/ChangeLog | 6 +----- src/doc.c | 3 +-- src/regex.c | 6 ++---- src/xdisp.c | 3 +-- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 43e629eb5f6..17dec525156 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,11 +1,7 @@ 2012-09-03 Paul Eggert - Fix minor problems found by static checking. + Fix minor problem found by static checking. * buffer.c (Fdelete_all_overlays): Return nil. - * doc.c (Fsubstitute_command_keys): - * regex.c (WEAK_ALIAS): - * xdisp.c (redisplay_internal): - Move initialization down, to pacify GCC 4.7.1 -Wjump-misses-init. 2012-09-03 Martin Rudalics diff --git a/src/doc.c b/src/doc.c index c21935577f2..02a5b4b8143 100644 --- a/src/doc.c +++ b/src/doc.c @@ -848,10 +848,9 @@ Otherwise, return a new string, without any text properties. */) struct buffer *oldbuf; ptrdiff_t start_idx; /* This is for computing the SHADOWS arg for describe_map_tree. */ - Lisp_Object active_maps; + Lisp_Object active_maps = Fcurrent_active_maps (Qnil, Qnil); Lisp_Object earlier_maps; - active_maps = Fcurrent_active_maps (Qnil, Qnil); changed = 1; strp += 2; /* skip \{ or \< */ start = strp; diff --git a/src/regex.c b/src/regex.c index 28813304c8a..472ef727979 100644 --- a/src/regex.c +++ b/src/regex.c @@ -5160,13 +5160,11 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, { /* 1 if this match ends in the same string (string1 or string2) as the best previous match. */ - boolean same_str_p; + boolean same_str_p = (FIRST_STRING_P (match_end) + == FIRST_STRING_P (d)); /* 1 if this match is the best seen so far. */ boolean best_match_p; - same_str_p = (FIRST_STRING_P (match_end) - == FIRST_STRING_P (d)); - /* AIX compiler got confused when this was combined with the previous declaration. */ if (same_str_p) diff --git a/src/xdisp.c b/src/xdisp.c index 81322f498ef..86f041dea4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13511,10 +13511,9 @@ redisplay_internal (void) } else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) { - Lisp_Object mini_window; + Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); struct frame *mini_frame; - mini_window = FRAME_MINIBUF_WINDOW (sf); displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); /* Use list_of_error, not Qerror, so that we catch only errors and don't run the debugger. */ From 8a8507e9b726ac9eb347270b04cb9daafb093cbe Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 3 Sep 2012 22:12:02 +0000 Subject: [PATCH 017/216] [Gnus] Silence XEmacs compilation warnings --- lisp/gnus/ChangeLog | 9 +++++++++ lisp/gnus/gnus-fun.el | 4 ++++ lisp/gnus/gnus-notifications.el | 16 +++++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a4e3d9bde2b..37d89ba8cad 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2012-09-03 Lars Ingebrigtsen + + * dgnushack.el: XEmacs 21.5 compilation fix. + + * gnus-notifications.el (gnus-notifications-notify): Use it. + + * gnus-fun.el (gnus-funcall-no-warning): New function to silence + warnings on XEmacs. + 2012-09-01 Paul Eggert Better seeds for (random). diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index f33eb910c6a..f5e1c5ad691 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -278,6 +278,10 @@ colors of the displayed X-Faces." values)) (mapconcat 'identity values " "))) +(defun gnus-funcall-no-warning (function &rest args) + (when (fboundp function) + (apply function args))) + (provide 'gnus-fun) ;;; gnus-fun.el ends here diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index c5129958997..f9c2d309a35 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el @@ -29,13 +29,16 @@ ;;; Code: -(require 'notifications nil t) +(ignore-errors + (require 'notifications)) (require 'gnus-sum) (require 'gnus-group) (require 'gnus-int) (require 'gnus-art) (require 'gnus-util) -(require 'google-contacts nil t) ; Optional +(ignore-errors + (require 'google-contacts)) ; Optional +(require 'gnus-fun) (defgroup gnus-notifications nil "Send notifications on new message in Gnus." @@ -81,12 +84,14 @@ not get notifications." "Send a notification about a new mail. Return a notification id if any, or t on success." (if (fboundp 'notifications-notify) - (notifications-notify + (gnus-funcall-no-warning + 'notifications-notify :title from :body subject :actions '("read" "Read") :on-action 'gnus-notifications-action - :app-icon (image-search-load-path "gnus/gnus.png") + :app-icon (gnus-funcall-no-warning + 'image-search-load-path "gnus/gnus.png") :app-name "Gnus" :category "email.arrived" :timeout gnus-notifications-timeout @@ -100,7 +105,8 @@ Return a notification id if any, or t on success." (let ((google-photo (when (and gnus-notifications-use-google-contacts (fboundp 'google-contacts-get-photo)) (ignore-errors - (google-contacts-get-photo mail-address))))) + (gnus-funcall-no-warning + 'google-contacts-get-photo mail-address))))) (if google-photo google-photo (when gnus-notifications-use-gravatar From 4489104fe84d8e411fb5fed823aa7bc7ebdfe001 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 4 Sep 2012 08:42:47 +0400 Subject: [PATCH 018/216] * ruby-mode.el: Clean up keybindings. (ruby-mode-map): Don't bind ruby-electric-brace, ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun, backward-kill-word, reindent-then-newline-and-indent. (ruby-mark-defun): Remove. (ruby-electric-brace): Remove. Obsoleted by electric-indent-chars. (ruby-mode): Set local beginning-of-defun-function and end-of-defun-function values. --- lisp/progmodes/ruby-mode.el | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 457c7fee36c..3f93ffa84ba 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -138,18 +138,11 @@ This should only be called after matching against `ruby-here-doc-beg-re'." (defvar ruby-mode-map (let ((map (make-sparse-keymap))) - (define-key map "{" 'ruby-electric-brace) - (define-key map "}" 'ruby-electric-brace) - (define-key map (kbd "M-C-a") 'ruby-beginning-of-defun) - (define-key map (kbd "M-C-e") 'ruby-end-of-defun) (define-key map (kbd "M-C-b") 'ruby-backward-sexp) (define-key map (kbd "M-C-f") 'ruby-forward-sexp) (define-key map (kbd "M-C-p") 'ruby-beginning-of-block) (define-key map (kbd "M-C-n") 'ruby-end-of-block) - (define-key map (kbd "M-C-h") 'ruby-mark-defun) (define-key map (kbd "M-C-q") 'ruby-indent-exp) - (define-key map (kbd "C-M-h") 'backward-kill-word) - (define-key map (kbd "C-j") 'reindent-then-newline-and-indent) (define-key map (kbd "C-c {") 'ruby-toggle-block) map) "Keymap used in Ruby mode.") @@ -840,12 +833,6 @@ and `\\' when preceded by `?'." (+ indent ruby-indent-level) indent)))) -(defun ruby-electric-brace (arg) - "Insert a brace and re-indent the current line." - (interactive "P") - (self-insert-command (prefix-numeric-value arg)) - (ruby-indent-line t)) - ;; TODO: Why isn't one ruby-*-of-defun written in terms of the other? (defun ruby-beginning-of-defun (&optional arg) "Move backward to the beginning of the current top-level defun. @@ -1024,15 +1011,6 @@ With ARG, do it many times. Negative ARG means move forward." ((error))) i))) -(defun ruby-mark-defun () - "Put mark at end of this Ruby function, point at beginning." - (interactive) - (push-mark (point)) - (ruby-end-of-defun) - (push-mark (point) nil t) - (ruby-beginning-of-defun) - (re-search-backward "^\n" (- (point) 1) t)) - (defun ruby-indent-exp (&optional ignored) "Indent each line in the balanced expression following the point." (interactive "*P") @@ -1586,6 +1564,10 @@ The variable `ruby-indent-level' controls the amount of indentation. 'ruby-imenu-create-index) (set (make-local-variable 'add-log-current-defun-function) 'ruby-add-log-current-method) + (set (make-local-variable 'beginning-of-defun-function) + 'ruby-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) + 'ruby-end-of-defun) (add-hook (cond ((boundp 'before-save-hook) 'before-save-hook) From 6578b4d8428cf00cd5a2f452bfc3099c95f0981a Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 4 Sep 2012 08:44:43 +0400 Subject: [PATCH 019/216] * progmodes/ruby-mode.el: Clean up keybindings (ChangeLog entry). --- lisp/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87904b8313b..d4630d36691 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2012-09-04 Dmitry Gutov + + * progmodes/ruby-mode.el: Clean up keybindings. + (ruby-mode-map): Don't bind ruby-electric-brace, + ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun, + backward-kill-word, reindent-then-newline-and-indent. + (ruby-mark-defun): Remove. + (ruby-electric-brace): Remove. Obsoleted by electric-indent-chars. + (ruby-mode): Set local beginning-of-defun-function and + end-of-defun-function values. + 2012-09-03 Martin Rudalics * window.el (temp-buffer-window-setup-hook) From 7b6c362efe6e32b6a3a68f6f827c9cc558a2fcf0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 23:25:44 -0700 Subject: [PATCH 020/216] * configure.ac (_setjmp, _longjmp): Check by compiling instead of by guessing. The guesses were wrong for recent versions of Solaris, such as Solaris 11. --- ChangeLog | 6 ++++++ configure.ac | 22 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fb825ccdda..a6b66dbc3e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-04 Paul Eggert + + * configure.ac (_setjmp, _longjmp): Check by compiling + instead of by guessing. The guesses were wrong for + recent versions of Solaris, such as Solaris 11. + 2012-09-03 Paul Eggert * configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init. diff --git a/configure.ac b/configure.ac index 77e11910553..1694c98d897 100644 --- a/configure.ac +++ b/configure.ac @@ -3791,13 +3791,27 @@ else esac fi dnl GCC? +AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[jmp_buf j; + if (! _setjmp (j)) + _longjmp (j, 1);]])], + [emacs_cv_func__setjmp=yes], + [emacs_cv_func__setjmp=no])]) +if test $emacs_cv_func__setjmp = no; then + AC_DEFINE([_setjmp], [setjmp], + [Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.]) + AC_DEFINE([_longjmp], [longjmp], + [Define to longjmp if _setjmp and _longjmp do not work. + Because longjmp may alter signal masks, callers of _longjmp + should not assume that it leaves signal masks alone.]) +fi case $opsys in sol2* | unixware ) - dnl setjmp and longjmp can safely replace _setjmp and _longjmp, - dnl but they will run more slowly. - AC_DEFINE(_setjmp, setjmp, [Some platforms redefine this.]) - AC_DEFINE(_longjmp, longjmp, [Some platforms redefine this.]) dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs, dnl and this is all we need. From af26b72c1187a93cdacc6abb6561f3c331346cef Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Sep 2012 23:34:19 -0700 Subject: [PATCH 021/216] Be more systematic about _setjmp vs setjmp. * alloc.c (test_setjmp, mark_stack): * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]: (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]: (png_load, my_error_exit, jpeg_load): * process.c (send_process_trap, send_process): Uniformly prefer _setjmp and _longjmp to setjmp and longjmp. The underscored versions are up to 30x faster on some hosts. Formerly, the code used setjmp+longjmp sometimes and _setjmp+_longjmp at other times, with no particular reason to prefer setjmp+longjmp. --- src/ChangeLog | 14 ++++++++++++++ src/alloc.c | 6 +++--- src/image.c | 14 +++++++------- src/process.c | 4 ++-- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 17dec525156..a8d6a4026a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2012-09-04 Paul Eggert + + Be more systematic about _setjmp vs setjmp. + * alloc.c (test_setjmp, mark_stack): + * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]: + (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]: + (png_load, my_error_exit, jpeg_load): + * process.c (send_process_trap, send_process): + Uniformly prefer _setjmp and _longjmp to setjmp and longjmp. + The underscored versions are up to 30x faster on some hosts. + Formerly, the code used setjmp+longjmp sometimes and + _setjmp+_longjmp at other times, with no particular reason to + prefer setjmp+longjmp. + 2012-09-03 Paul Eggert Fix minor problem found by static checking. diff --git a/src/alloc.c b/src/alloc.c index 188a514376d..edecd51f1ac 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4764,7 +4764,7 @@ test_setjmp (void) x = strlen (buf); x = 2 * x - 1; - setjmp (jbuf); + _setjmp (jbuf); if (longjmps_done == 1) { /* Came here after the longjmp at the end of the function. @@ -4789,7 +4789,7 @@ test_setjmp (void) ++longjmps_done; x = 2; if (longjmps_done == 1) - longjmp (jbuf, 1); + _longjmp (jbuf, 1); } #endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */ @@ -4931,7 +4931,7 @@ mark_stack (void) } #endif /* GC_SETJMP_WORKS */ - setjmp (j.j); + _setjmp (j.j); end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; #endif /* not GC_SAVE_REGISTERS_ON_STACK */ #endif /* not HAVE___BUILTIN_UNWIND_INIT */ diff --git a/src/image.c b/src/image.c index a067dae7737..3e021677e09 100644 --- a/src/image.c +++ b/src/image.c @@ -5517,13 +5517,13 @@ init_png_functions (Lisp_Object libraries) #if (PNG_LIBPNG_VER < 10500) -#define PNG_LONGJMP(ptr) (longjmp ((ptr)->jmpbuf, 1)) +#define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1)) #define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) #else /* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ #define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) #define PNG_JMPBUF(ptr) \ - (*fn_png_set_longjmp_fn ((ptr), longjmp, sizeof (jmp_buf))) + (*fn_png_set_longjmp_fn ((ptr), _longjmp, sizeof (jmp_buf))) #endif /* Error and warning handlers installed when the PNG library @@ -5696,7 +5696,7 @@ png_load (struct frame *f, struct image *img) /* Set error jump-back. We come back here when the PNG library detects an error. */ - if (setjmp (PNG_JMPBUF (png_ptr))) + if (_setjmp (PNG_JMPBUF (png_ptr))) { error: if (png_ptr) @@ -6114,7 +6114,7 @@ static _Noreturn void my_error_exit (j_common_ptr cinfo) { struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; - longjmp (mgr->setjmp_buffer, 1); + _longjmp (mgr->setjmp_buffer, 1); } @@ -6365,7 +6365,7 @@ jpeg_load (struct frame *f, struct image *img) cinfo.err = fn_jpeg_std_error (&mgr.pub); mgr.pub.error_exit = my_error_exit; - if ((rc = setjmp (mgr.setjmp_buffer)) != 0) + if ((rc = _setjmp (mgr.setjmp_buffer)) != 0) { if (rc == 1) { @@ -6411,12 +6411,12 @@ jpeg_load (struct frame *f, struct image *img) if (!check_image_size (f, width, height)) { image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); - longjmp (mgr.setjmp_buffer, 2); + _longjmp (mgr.setjmp_buffer, 2); } /* Create X image and pixmap. */ if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - longjmp (mgr.setjmp_buffer, 2); + _longjmp (mgr.setjmp_buffer, 2); /* Allocate colors. When color quantization is used, cinfo.actual_number_of_colors has been set with the number of diff --git a/src/process.c b/src/process.c index 04b6abe50a7..2d144b410ed 100644 --- a/src/process.c +++ b/src/process.c @@ -5431,7 +5431,7 @@ send_process_trap (int ignore) { SIGNAL_THREAD_CHECK (SIGPIPE); sigunblock (sigmask (SIGPIPE)); - longjmp (send_process_frame, 1); + _longjmp (send_process_frame, 1); } /* In send_process, when a write fails temporarily, @@ -5634,7 +5634,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, CFLAGS="-g -O": The value of the parameter `proc' is clobbered when returning with longjmp despite being declared volatile. */ - if (!setjmp (send_process_frame)) + if (!_setjmp (send_process_frame)) { p = XPROCESS (proc); /* Repair any setjmp clobbering. */ process_sent_to = proc; From 6ec9a5a7b5efb129807f567709ca858211ed7840 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 4 Sep 2012 06:17:39 -0400 Subject: [PATCH 022/216] Auto-commit of generated files. --- autogen/config.in | 6 ++++-- autogen/configure | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index c39453938be..59bc8dca231 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -1542,10 +1542,12 @@ along with GNU Emacs. If not, see . */ declarations. Define as empty for no equivalent. */ #undef __restrict_arr -/* Some platforms redefine this. */ +/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may + alter signal masks, callers of _longjmp should not assume that it leaves + signal masks alone. */ #undef _longjmp -/* Some platforms redefine this. */ +/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ #undef _setjmp /* Some platforms that do not use configure define this to include extra diff --git a/autogen/configure b/autogen/configure index 12239818695..885b6f4b471 100755 --- a/autogen/configure +++ b/autogen/configure @@ -7218,6 +7218,7 @@ fi nw="$nw -Wswitch-default" # Too many warnings for now nw="$nw -Wfloat-equal" # warns about high-quality code nw="$nw -Winline" # OK to ignore 'inline' + nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations @@ -15480,15 +15481,46 @@ else ;; esac fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5 +$as_echo_n "checking for _setjmp... " >&6; } +if test "${emacs_cv_func__setjmp+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -case $opsys in - sol2* | unixware ) +int +main () +{ +jmp_buf j; + if (! _setjmp (j)) + _longjmp (j, 1); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_func__setjmp=yes +else + emacs_cv_func__setjmp=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 +$as_echo "$emacs_cv_func__setjmp" >&6; } +if test $emacs_cv_func__setjmp = no; then $as_echo "#define _setjmp setjmp" >>confdefs.h $as_echo "#define _longjmp longjmp" >>confdefs.h +fi + +case $opsys in + sol2* | unixware ) $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h From 8ce192e317f321834851e31571833f33aa332aa2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 4 Sep 2012 18:00:10 +0200 Subject: [PATCH 023/216] Have smtpmail.el prefer the From: header for the MAIL FROM envelope * mail/smtpmail.el (smtpmail-send-it): Prefer the From: header over `user-mail-address' for the SMTP MAIL FROM envelope. (smtpmail-via-smtp): Ditto. --- etc/NEWS | 4 ++++ lisp/ChangeLog | 6 ++++++ lisp/mail/smtpmail.el | 12 +++++------- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a2d0ffe232c..16e078fa639 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1403,6 +1403,10 @@ If you had that set, you need to put in your ~/.authinfo file instead. +*** SMTPmail defaults to using the address in the From: header as the +SMTP MAIL FROM envelope. To override this, set `mail-envelope-from' +to the address you wish to use instead. + ** SQL mode *** New options `sql-port', `sql-connection-alist', `sql-send-terminator', diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d4630d36691..4707834fe6b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-04 Lars Ingebrigtsen + + * mail/smtpmail.el (smtpmail-send-it): Prefer the From: header + over `user-mail-address' for the SMTP MAIL FROM envelope. + (smtpmail-via-smtp): Ditto. + 2012-09-04 Dmitry Gutov * progmodes/ruby-mode.el: Clean up keybindings. diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 804fe7a8798..69a405436a7 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -200,10 +200,10 @@ The list is in preference order.") ;; local binding in the mail buffer will take effect. (smtpmail-mail-address (or (and mail-specify-envelope-from (mail-envelope-from)) - (smtpmail-user-mail-address) - (let ((from (mail-fetch-field "from"))) + (let ((from (mail-fetch-field "from"))) (and from - (cadr (mail-extract-address-components from)))))) + (cadr (mail-extract-address-components from)))) + (smtpmail-user-mail-address))) (smtpmail-code-conv-from (if enable-multibyte-characters (let ((sendmail-coding-system smtpmail-code-conv-from)) @@ -653,12 +653,10 @@ Returns an error if the server cannot be contacted." (or smtpmail-mail-address (and mail-specify-envelope-from (mail-envelope-from)) - (smtpmail-user-mail-address) - ;; Fall back on the From: header as the envelope From - ;; address. (let ((from (mail-fetch-field "from"))) (and from - (cadr (mail-extract-address-components from)))))) + (cadr (mail-extract-address-components from)))) + (smtpmail-user-mail-address))) response-code process-buffer result From 30934d334e8a67c8992d910428758d5b93e0f04f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 4 Sep 2012 20:15:45 +0300 Subject: [PATCH 024/216] Fix display of Arabic diacriticals on Windows, per bug #11860. src/w32uniscribe.c (uniscribe_shape): Reverse the sign of offsets[j].dv, since the y axis of the screen coordinates points down, while the y axis of the font definition coordinates points up. This fixes display of Arabic diacritics such as KASRA and KASRATAN. --- src/ChangeLog | 8 ++++++++ src/w32uniscribe.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a8d6a4026a0..f905cc3b5a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2012-09-04 Eli Zaretskii + + * w32uniscribe.c (uniscribe_shape): Reverse the sign of + offsets[j].dv, since the y axis of the screen coordinates points + down, while the y axis of the font definition coordinates points + up. This fixes display of Arabic diacritics such as KASRA and + KASRATAN. (Bug#11860) + 2012-09-04 Paul Eggert Be more systematic about _setjmp vs setjmp. diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index bc45e2c648c..cf99d14dc77 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -454,7 +454,11 @@ uniscribe_shape (Lisp_Object lgstring) } else ASET (vec, 0, make_number (offsets[j].du + adj_offset)); - ASET (vec, 1, make_number (offsets[j].dv)); + /* In the font definition coordinate system, the + Y coordinate points up, while in our screen + coordinates Y grows downwards. So we need to + reverse the sign of Y-OFFSET here. */ + ASET (vec, 1, make_number (-offsets[j].dv)); /* Based on what ftfont.c does... */ ASET (vec, 2, make_number (advances[j])); LGLYPH_SET_ADJUSTMENT (lglyph, vec); From 1088b9226e7dac7314dab52ef0696a5f540900cd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 4 Sep 2012 10:34:54 -0700 Subject: [PATCH 025/216] Simplify redefinition of 'abort' (Bug#12316). Do not try to redefine the 'abort' function. Instead, redo the code so that it calls 'emacs_abort' rather than 'abort'. This removes the need for the NO_ABORT configure-time macro and makes it easier to change the abort code to do a backtrace. * configure.ac (NO_ABRT): Remove. * admin/CPP-DEFINES (NO_ABORT): Remove. * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove. * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort. * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]: Remove; sysdep.c's emacs_abort now takes its place. * src/lisp.h (emacs_abort): New decl. All calls from Emacs code to 'abort' changed to use 'emacs_abort'. * src/msdos.c (dos_abort) [defined abort]: Remove; not used. (abort) [!defined abort]: Rename to ... (emacs_abort): ... new name. * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking the place of the old 'abort' in emacs.c. * src/w32.c, src/w32fns.c (abort): Do not #undef. * src/w32.c (emacs_abort): Rename from w32_abort. --- ChangeLog | 3 ++ admin/CPP-DEFINES | 1 - admin/ChangeLog | 5 +++ configure.ac | 6 ---- nt/ChangeLog | 5 +++ nt/inc/ms-w32.h | 9 ------ nt/inc/unistd.h | 6 +++- src/.gdbinit | 11 ++----- src/ChangeLog | 20 ++++++++++++ src/alloc.c | 64 ++++++++++++++++++------------------- src/bidi.c | 79 +++++++++++++++++++++++----------------------- src/blockinput.h | 3 +- src/buffer.c | 12 +++---- src/buffer.h | 6 ++-- src/bytecode.c | 16 +++++----- src/character.c | 2 +- src/charset.c | 6 ++-- src/cm.c | 2 +- src/coding.c | 20 ++++++------ src/conf_post.h | 3 -- src/data.c | 36 ++++++++++----------- src/dired.c | 2 +- src/dispnew.c | 18 +++++------ src/editfns.c | 6 ++-- src/emacs.c | 18 +---------- src/eval.c | 14 ++++---- src/fileio.c | 2 +- src/fns.c | 12 +++---- src/frame.c | 22 ++++++------- src/frame.h | 2 +- src/ftfont.c | 2 +- src/gtkutil.c | 8 ++--- src/image.c | 2 +- src/indent.c | 4 +-- src/insdel.c | 22 ++++++------- src/intervals.c | 18 +++++------ src/keyboard.c | 44 +++++++++++++------------- src/keymap.c | 2 +- src/lisp.h | 3 +- src/lread.c | 4 +-- src/marker.c | 18 +++++------ src/menu.c | 4 +-- src/minibuf.c | 2 +- src/msdos.c | 29 +++-------------- src/nsfont.m | 4 +-- src/nsmenu.m | 2 +- src/nsterm.m | 38 +++++++++++----------- src/print.c | 2 +- src/process.c | 14 ++++---- src/ralloc.c | 20 ++++++------ src/region-cache.c | 24 +++++++------- src/scroll.c | 4 +-- src/search.c | 6 ++-- src/sound.c | 4 +-- src/sysdep.c | 9 ++++++ src/term.c | 22 ++++++------- src/termchar.h | 2 +- src/terminal.c | 8 ++--- src/terminfo.c | 2 +- src/tparam.c | 2 +- src/w32.c | 31 +++++++++--------- src/w32fns.c | 26 +++++++-------- src/w32menu.c | 2 +- src/w32proc.c | 14 ++++---- src/w32select.c | 2 +- src/w32term.c | 16 +++++----- src/w32xfns.c | 2 +- src/widget.c | 8 ++--- src/window.c | 8 ++--- src/xdisp.c | 48 ++++++++++++++-------------- src/xfaces.c | 26 +++++++-------- src/xmenu.c | 26 +++++++-------- src/xselect.c | 6 ++-- src/xterm.c | 28 ++++++++-------- 74 files changed, 482 insertions(+), 497 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6b66dbc3e2..55223ab8c5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-09-04 Paul Eggert + Simplify redefinition of 'abort' (Bug#12316). + * configure.ac (NO_ABRT): Remove. + * configure.ac (_setjmp, _longjmp): Check by compiling instead of by guessing. The guesses were wrong for recent versions of Solaris, such as Solaris 11. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index be73d1a9bf5..d87feb9b866 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -428,7 +428,6 @@ MAIL_USE_POP MAIL_USE_SYSTEM_LOCK MAXPATHLEN NLIST_STRUCT -NO_ABORT NO_EDITRES NO_MATHERR NO_TERMIO diff --git a/admin/ChangeLog b/admin/ChangeLog index 145028ec815..54fea2615fd 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2012-09-04 Paul Eggert + + Simplify redefinition of 'abort' (Bug#12316). + * CPP-DEFINES (NO_ABORT): Remove. + 2012-08-28 Glenn Morris * bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree. diff --git a/configure.ac b/configure.ac index 1694c98d897..16e579c862a 100644 --- a/configure.ac +++ b/configure.ac @@ -3351,12 +3351,6 @@ case $opsys in AC_DEFINE(BROKEN_PTY_READ_AFTER_EAGAIN, 1, [Define on FreeBSD to work around an issue when reading from a PTY.]) ;; - - dnl Define the following so emacs symbols will not conflict with those - dnl in the System framework. Otherwise -prebind will not work. - darwin) - AC_DEFINE(NO_ABORT, 1, [Do not define abort in emacs.c.]) - ;; esac case $opsys in diff --git a/nt/ChangeLog b/nt/ChangeLog index 4ceb74ed0b5..97b6128f32d 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2012-09-04 Paul Eggert + + Simplify redefinition of 'abort' (Bug#12316). + * inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove. + 2012-09-02 Juanma Barranquero * config.nt: Sync with autogen/config.in. diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 8945fb7be4d..a18cf23374c 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -334,16 +334,7 @@ extern char *get_emacs_configuration_options (void); #include #endif -/* stdlib.h must be included after redefining malloc & friends, but - before redefining abort. Isn't library redefinition funny? */ #include - -/* Redefine abort. */ -#ifdef HAVE_NTGUI -#define abort w32_abort -extern _Noreturn void w32_abort (void); -#endif - #include /* Define for those source files that do not include enough NT system files. */ diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index fb1f1c4b3bf..7db6cf08bea 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h @@ -3,8 +3,12 @@ #ifndef _UNISTD_H #define _UNISTD_H +/* On Microsoft platforms, declares 'environ'; on POSIX + platforms, does. Every file in Emacs that includes + also includes , so there's no need to declare + 'environ' here. */ + extern ssize_t readlink (const char *, char *, size_t); extern int symlink (char const *, char const *); #endif /* _UNISTD_H */ - diff --git a/src/.gdbinit b/src/.gdbinit index de980c6345f..79419f66ac1 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1222,14 +1222,9 @@ if ($ptr != 0) set $tem = (struct Lisp_String *) $ptr set $tem = (char *) $tem->data - # Don't let abort actually run, as it will make stdio stop working and - # therefore the `pr' command above as well. - if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd' - # The windows-nt build replaces abort with its own function. - break w32_abort - else - break abort - end + # Don't let emacs_abort actually run, as it will make stdio stop + # working and therefore the 'pr' command above as well. + break emacs_abort end # x_error_quitter is defined only on X. But window-system is set up diff --git a/src/ChangeLog b/src/ChangeLog index f905cc3b5a2..1dd307b16de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,23 @@ +2012-09-04 Paul Eggert + + Simplify redefinition of 'abort' (Bug#12316). + Do not try to redefine the 'abort' function. Instead, redo + the code so that it calls 'emacs_abort' rather than 'abort'. + This removes the need for the NO_ABORT configure-time macro + and makes it easier to change the abort code to do a backtrace. + * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort. + * emacs.c (abort) [!DOS_NT && !NO_ABORT]: + Remove; sysdep.c's emacs_abort now takes its place. + * lisp.h (emacs_abort): New decl. All calls from Emacs code to + 'abort' changed to use 'emacs_abort'. + * msdos.c (dos_abort) [defined abort]: Remove; not used. + (abort) [!defined abort]: Rename to ... + (emacs_abort): ... new name. + * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking + the place of the old 'abort' in emacs.c. + * w32.c, w32fns.c (abort): Do not #undef. + * w32.c (emacs_abort): Rename from w32_abort. + 2012-09-04 Eli Zaretskii * w32uniscribe.c (uniscribe_shape): Reverse the sign of diff --git a/src/alloc.c b/src/alloc.c index edecd51f1ac..2a831cea62a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -613,7 +613,7 @@ overrun_check_malloc (size_t size) register unsigned char *val; int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0; if (SIZE_MAX - overhead < size) - abort (); + emacs_abort (); val = malloc (size + overhead); if (val && check_depth == 1) @@ -638,7 +638,7 @@ overrun_check_realloc (void *block, size_t size) register unsigned char *val = (unsigned char *) block; int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0; if (SIZE_MAX - overhead < size) - abort (); + emacs_abort (); if (val && check_depth == 1 @@ -649,7 +649,7 @@ overrun_check_realloc (void *block, size_t size) size_t osize = xmalloc_get_size (val); if (memcmp (xmalloc_overrun_check_trailer, val + osize, XMALLOC_OVERRUN_CHECK_SIZE)) - abort (); + emacs_abort (); memset (val + osize, 0, XMALLOC_OVERRUN_CHECK_SIZE); val -= XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE; memset (val, 0, XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE); @@ -686,7 +686,7 @@ overrun_check_free (void *block) size_t osize = xmalloc_get_size (val); if (memcmp (xmalloc_overrun_check_trailer, val + osize, XMALLOC_OVERRUN_CHECK_SIZE)) - abort (); + emacs_abort (); #ifdef XMALLOC_CLEAR_FREE_MEMORY val -= XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE; memset (val, 0xff, osize + XMALLOC_OVERRUN_CHECK_OVERHEAD); @@ -1272,7 +1272,7 @@ emacs_blocked_free (void *ptr, const void *ptr2) { fprintf (stderr, "Freeing `%p' which wasn't allocated with malloc\n", ptr); - abort (); + emacs_abort (); } else { @@ -1331,7 +1331,7 @@ emacs_blocked_malloc (size_t size, const void *ptr) fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n", m->start, m->end, (char *) m->end - (char *) m->start, m->type); - abort (); + emacs_abort (); } if (!dont_register_blocks) @@ -1369,7 +1369,7 @@ emacs_blocked_realloc (void *ptr, size_t size, const void *ptr2) fprintf (stderr, "Realloc of %p which wasn't allocated with malloc\n", ptr); - abort (); + emacs_abort (); } mem_delete (m); @@ -1391,7 +1391,7 @@ emacs_blocked_realloc (void *ptr, size_t size, const void *ptr2) if (m != MEM_NIL) { fprintf (stderr, "Realloc returns memory that is already in use\n"); - abort (); + emacs_abort (); } /* Can't handle zero size regions in the red-black tree. */ @@ -1804,7 +1804,7 @@ string_bytes (struct Lisp_String *s) if (!PURE_POINTER_P (s) && s->data && nbytes != SDATA_NBYTES (SDATA_OF_STRING (s))) - abort (); + emacs_abort (); return nbytes; } @@ -1878,7 +1878,7 @@ check_string_free_list (void) while (s != NULL) { if ((uintptr_t) s < 1024) - abort (); + emacs_abort (); s = NEXT_FREE_LISP_STRING (s); } } @@ -2107,7 +2107,7 @@ sweep_strings (void) back-pointer so that we know it's free. */ #ifdef GC_CHECK_STRING_BYTES if (string_bytes (s) != SDATA_NBYTES (data)) - abort (); + emacs_abort (); #else data->u.nbytes = STRING_BYTES (s); #endif @@ -2218,7 +2218,7 @@ compact_small_strings (void) /* Check that the string size recorded in the string is the same as the one recorded in the sdata structure. */ if (s && string_bytes (s) != SDATA_NBYTES (from)) - abort (); + emacs_abort (); #endif /* GC_CHECK_STRING_BYTES */ nbytes = s ? STRING_BYTES (s) : SDATA_NBYTES (from); @@ -2231,7 +2231,7 @@ compact_small_strings (void) if (memcmp (string_overrun_cookie, (char *) from_end - GC_STRING_OVERRUN_COOKIE_SIZE, GC_STRING_OVERRUN_COOKIE_SIZE)) - abort (); + emacs_abort (); #endif /* Non-NULL S means it's alive. Copy its data. */ @@ -2488,7 +2488,7 @@ make_uninit_multibyte_string (EMACS_INT nchars, EMACS_INT nbytes) struct Lisp_String *s; if (nchars < 0) - abort (); + emacs_abort (); if (!nbytes) return empty_multibyte_string; @@ -2809,7 +2809,7 @@ listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...) else if (type == CONSTYPE_HEAP) val = Fcons (objp[i], val); else - abort (); + emacs_abort (); } return val; } @@ -3919,7 +3919,7 @@ mem_insert (void *start, void *end, enum mem_type type) while (c != MEM_NIL) { if (start >= c->start && start < c->end) - abort (); + emacs_abort (); parent = c; c = start < c->start ? c->left : c->right; } @@ -3938,7 +3938,7 @@ mem_insert (void *start, void *end, enum mem_type type) #ifdef GC_MALLOC_CHECK x = _malloc_internal (sizeof *x); if (x == NULL) - abort (); + emacs_abort (); #else x = xmalloc (sizeof *x); #endif @@ -4613,7 +4613,7 @@ mark_maybe_pointer (void *p) break; default: - abort (); + emacs_abort (); } if (!NILP (obj)) @@ -4810,7 +4810,7 @@ check_gcpros (void) if (!survives_gc_p (p->var[i])) /* FIXME: It's not necessarily a bug. It might just be that the GCPRO is unnecessary or should release the object sooner. */ - abort (); + emacs_abort (); } #elif GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES @@ -5351,7 +5351,7 @@ staticpro (Lisp_Object *varaddress) { staticvec[staticidx++] = varaddress; if (staticidx >= NSTATICS) - abort (); + emacs_abort (); } @@ -5406,7 +5406,7 @@ See Info node `(elisp)Garbage Collection'. */) Lisp_Object retval = Qnil; if (abort_on_gc) - abort (); + emacs_abort (); /* Can't GC if pure storage overflowed because we can't determine if something is a pure object or not. */ @@ -5887,7 +5887,7 @@ mark_object (Lisp_Object arg) do { \ m = mem_find (po); \ if (m == MEM_NIL) \ - abort (); \ + emacs_abort (); \ } while (0) /* Check that the object pointed to by PO is live, using predicate @@ -5895,7 +5895,7 @@ mark_object (Lisp_Object arg) #define CHECK_LIVE(LIVEP) \ do { \ if (!LIVEP (m, po)) \ - abort (); \ + emacs_abort (); \ } while (0) /* Check both of the above conditions. */ @@ -5943,7 +5943,7 @@ mark_object (Lisp_Object arg) if (m == MEM_NIL && !SUBRP (obj) && po != &buffer_defaults && po != &buffer_local_symbols) - abort (); + emacs_abort (); #endif /* GC_CHECK_MARKED_OBJECTS */ if (ptr->header.size & PSEUDOVECTOR_FLAG) @@ -5966,7 +5966,7 @@ mark_object (Lisp_Object arg) if (b == po) break; if (b == NULL) - abort (); + emacs_abort (); } #endif /* GC_CHECK_MARKED_OBJECTS */ mark_buffer ((struct buffer *) ptr); @@ -6042,7 +6042,7 @@ mark_object (Lisp_Object arg) break; case PVEC_FREE: - abort (); + emacs_abort (); default: mark_vectorlike (ptr); @@ -6089,7 +6089,7 @@ mark_object (Lisp_Object arg) And if it's forwarded to a C variable, either it's not a Lisp_Object var, or it's staticpro'd already. */ break; - default: abort (); + default: emacs_abort (); } if (!PURE_POINTER_P (XSTRING (ptr->name))) MARK_STRING (XSTRING (ptr->name)); @@ -6143,7 +6143,7 @@ mark_object (Lisp_Object arg) break; default: - abort (); + emacs_abort (); } break; @@ -6165,7 +6165,7 @@ mark_object (Lisp_Object arg) obj = ptr->u.cdr; cdr_count++; if (cdr_count == mark_object_loop_halt) - abort (); + emacs_abort (); goto loop; } @@ -6178,7 +6178,7 @@ mark_object (Lisp_Object arg) break; default: - abort (); + emacs_abort (); } #undef CHECK_LIVE @@ -6247,7 +6247,7 @@ survives_gc_p (Lisp_Object obj) break; default: - abort (); + emacs_abort (); } return survives_p || PURE_POINTER_P ((void *) XPNTR (obj)); @@ -6699,7 +6699,7 @@ die (const char *msg, const char *file, int line) file, line, msg); npointers = backtrace (buffer, NPOINTERS_MAX); backtrace_symbols_fd (buffer, npointers, STDERR_FILENO); - abort (); + emacs_abort (); } #endif diff --git a/src/bidi.c b/src/bidi.c index 6b3ac53d318..73fec3533a4 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -105,7 +105,7 @@ bidi_get_type (int ch, bidi_dir_t override) if (ch == BIDI_EOB) return NEUTRAL_B; if (ch < 0 || ch > MAX_CHAR) - abort (); + emacs_abort (); default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); /* Every valid character code, even those that are unassigned by the @@ -113,7 +113,7 @@ bidi_get_type (int ch, bidi_dir_t override) DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT (= zero) code from CHAR_TABLE_REF, that's a bug. */ if (default_type == UNKNOWN_BT) - abort (); + emacs_abort (); if (override == NEUTRAL_DIR) return default_type; @@ -141,7 +141,7 @@ bidi_get_type (int ch, bidi_dir_t override) else if (override == R2L) return STRONG_R; else - abort (); /* can't happen: handled above */ + emacs_abort (); /* can't happen: handled above */ } } } @@ -183,7 +183,7 @@ bidi_get_category (bidi_type_t type) case NEUTRAL_ON: return NEUTRAL; default: - abort (); + emacs_abort (); } } @@ -199,7 +199,7 @@ bidi_mirror_char (int c) if (c == BIDI_EOB) return c; if (c < 0 || c > MAX_CHAR) - abort (); + emacs_abort (); val = CHAR_TABLE_REF (bidi_mirror_table, c); if (INTEGERP (val)) @@ -215,7 +215,7 @@ bidi_mirror_char (int c) /* Minimal test we must do in optimized builds, to prevent weird crashes further down the road. */ if (v < 0 || v > MAX_CHAR) - abort (); + emacs_abort (); return v; } @@ -373,7 +373,7 @@ bidi_cache_fetch_state (ptrdiff_t idx, struct bidi_it *bidi_it) int current_scan_dir = bidi_it->scan_dir; if (idx < bidi_cache_start || idx >= bidi_cache_idx) - abort (); + emacs_abort (); bidi_copy_it (bidi_it, &bidi_cache[idx]); bidi_it->scan_dir = current_scan_dir; @@ -518,7 +518,7 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, bool resolved) /* We should never cache on backward scans. */ if (bidi_it->scan_dir == -1) - abort (); + emacs_abort (); idx = bidi_cache_search (bidi_it->charpos, -1, 1); if (idx < 0) @@ -537,7 +537,7 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, bool resolved) idx = bidi_cache_start; } if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); bidi_copy_it (&bidi_cache[idx], bidi_it); if (!resolved) bidi_cache[idx].resolved_level = -1; @@ -592,7 +592,7 @@ static inline int bidi_peek_at_next_level (struct bidi_it *bidi_it) { if (bidi_cache_idx == bidi_cache_start || bidi_cache_last_idx == -1) - abort (); + emacs_abort (); return bidi_cache[bidi_cache_last_idx + bidi_it->scan_dir].resolved_level; } @@ -629,7 +629,7 @@ void bidi_pop_it (struct bidi_it *bidi_it) { if (bidi_cache_start <= 0) - abort (); + emacs_abort (); /* Reset the next free cache slot index to what it was before the call to bidi_push_it. */ @@ -640,7 +640,7 @@ bidi_pop_it (struct bidi_it *bidi_it) /* Pop the previous cache start from the stack. */ if (bidi_cache_sp <= 0) - abort (); + emacs_abort (); bidi_cache_start = bidi_cache_start_stack[--bidi_cache_sp]; /* Invalidate the last-used cache slot data. */ @@ -762,12 +762,12 @@ bidi_initialize (void) { bidi_type_table = uniprop_table (intern ("bidi-class")); if (NILP (bidi_type_table)) - abort (); + emacs_abort (); staticpro (&bidi_type_table); bidi_mirror_table = uniprop_table (intern ("mirroring")); if (NILP (bidi_mirror_table)) - abort (); + emacs_abort (); staticpro (&bidi_mirror_table); Qparagraph_start = intern ("paragraph-start"); @@ -885,7 +885,7 @@ bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg, else { if (!CHAR_HEAD_P (*p)) - abort (); + emacs_abort (); while (pos < end) { @@ -965,7 +965,7 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, /* We don't expect to find ourselves in the middle of a display property. Hopefully, it will never be needed. */ if (charpos > *disp_pos) - abort (); + emacs_abort (); /* Text covered by `display' properties and overlays with display properties or display strings is handled as a single character that represents the entire run of characters @@ -995,7 +995,7 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, } *nchars = disp_end_pos - *disp_pos; if (*nchars <= 0) - abort (); + emacs_abort (); if (string->s) *ch_len = bidi_count_bytes (string->s, *disp_pos, bytepos, disp_end_pos, string->unibyte); @@ -1160,7 +1160,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, bool no_default_p) dir = L2R; /* We should never be called at EOB or before BEGV. */ else if (bidi_it->charpos >= end || bytepos < begbyte) - abort (); + emacs_abort (); if (dir == L2R) { @@ -1298,7 +1298,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, bool no_default_p) && no_default_p && bidi_it->paragraph_dir == NEUTRAL_DIR); } else - abort (); + emacs_abort (); /* Contrary to UAX#9 clause P3, we only default the paragraph direction to L2R if we have no previous usable paragraph @@ -1325,7 +1325,7 @@ bidi_explicit_dir_char (int ch) bidi_type_t ch_type; if (!bidi_initialized) - abort (); + emacs_abort (); ch_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); return (ch_type == LRE || ch_type == LRO || ch_type == RLE || ch_type == RLO @@ -1378,10 +1378,10 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it) /* Advance to the next character, skipping characters covered by display strings (nchars > 1). */ if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); bidi_it->charpos += bidi_it->nchars; if (bidi_it->ch_len == 0) - abort (); + emacs_abort (); bidi_it->bytepos += bidi_it->ch_len; } @@ -1581,7 +1581,7 @@ bidi_resolve_explicit (struct bidi_it *bidi_it) } if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); if (level == prev_level) /* empty embedding */ saved_it.ignore_bn_limit = bidi_it->charpos + bidi_it->nchars; else /* this embedding is non-empty */ @@ -1644,7 +1644,7 @@ bidi_resolve_weak (struct bidi_it *bidi_it) || type == RLE || type == RLO || type == PDF) - abort (); + emacs_abort (); if (new_level != prev_level || bidi_it->type == NEUTRAL_B) @@ -1685,7 +1685,7 @@ bidi_resolve_weak (struct bidi_it *bidi_it) else if (bidi_it->sor == L2R) type = STRONG_L; else /* shouldn't happen! */ - abort (); + emacs_abort (); } if (type == WEAK_EN /* W2 */ && bidi_it->last_strong.type_after_w1 == STRONG_AL) @@ -1767,7 +1767,7 @@ bidi_resolve_weak (struct bidi_it *bidi_it) : bidi_it->string.s); if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); next_char = (bidi_it->charpos + bidi_it->nchars >= eob ? BIDI_EOB @@ -1875,7 +1875,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) || type == NEUTRAL_S || type == NEUTRAL_WS || type == NEUTRAL_ON)) - abort (); + emacs_abort (); if ((type != NEUTRAL_B /* Don't risk entering the long loop below if we are already at paragraph end. */ @@ -1930,7 +1930,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) bidi_type_t next_type; if (bidi_it->scan_dir == -1) - abort (); + emacs_abort (); bidi_copy_it (&saved_it, bidi_it); /* Scan the text forward until we find the first non-neutral @@ -1979,7 +1979,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) break; case WEAK_BN: if (!bidi_explicit_dir_char (bidi_it->ch)) - abort (); /* can't happen: BNs are skipped */ + emacs_abort (); /* can't happen: BNs are skipped */ /* FALLTHROUGH */ case NEUTRAL_B: /* Marched all the way to the end of this level run. @@ -1998,7 +1998,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) } break; default: - abort (); + emacs_abort (); } type = bidi_resolve_neutral_1 (saved_it.prev_for_neutral.type, next_type, current_level); @@ -2023,7 +2023,7 @@ bidi_type_of_next_char (struct bidi_it *bidi_it) /* This should always be called during a forward scan. */ if (bidi_it->scan_dir != 1) - abort (); + emacs_abort (); /* Reset the limit until which to ignore BNs if we step out of the area where we found only empty levels. */ @@ -2107,7 +2107,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) if (bidi_it->scan_dir > 0) { if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); next_char_pos = bidi_it->charpos + bidi_it->nchars; } else if (bidi_it->charpos >= bob) @@ -2143,7 +2143,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) if (bidi_it->scan_dir == -1) /* If we are going backwards, the iterator state is already cached from previous scans, and should be fully resolved. */ - abort (); + emacs_abort (); if (type == UNKNOWN_BT) type = bidi_type_of_next_char (bidi_it); @@ -2156,7 +2156,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) || (type == WEAK_BN && prev_level == level)) { if (bidi_it->next_for_neutral.type == UNKNOWN_BT) - abort (); + emacs_abort (); /* If the cached state shows a neutral character, it was not resolved by bidi_resolve_neutral, so do it now. */ @@ -2170,7 +2170,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) || type == WEAK_BN || type == WEAK_EN || type == WEAK_AN)) - abort (); + emacs_abort (); bidi_it->type = type; bidi_check_type (bidi_it->type); @@ -2192,7 +2192,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) int dpp = bidi_it->disp_prop; if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); do { ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &dpp, &bs, fwp, &clen, &nc); @@ -2301,8 +2301,9 @@ bidi_find_other_level_edge (struct bidi_it *bidi_it, int level, bool end_flag) { int new_level; + /* If we are at end of level, its edges must be cached. */ if (end_flag) - abort (); /* if we are at end of level, its edges must be cached */ + emacs_abort (); bidi_cache_iterator_state (bidi_it, 1); do { @@ -2320,7 +2321,7 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it) struct gcpro gcpro1; if (bidi_it->charpos < 0 || bidi_it->bytepos < 0) - abort (); + emacs_abort (); if (bidi_it->scan_dir == 0) { @@ -2431,7 +2432,7 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it) = bidi_at_paragraph_end (bidi_it->charpos + bidi_it->nchars, bidi_it->bytepos + bidi_it->ch_len); if (bidi_it->nchars <= 0) - abort (); + emacs_abort (); if (sep_len >= 0) { bidi_it->new_paragraph = 1; diff --git a/src/blockinput.h b/src/blockinput.h index dc02919cf4f..3f61b2b27b9 100644 --- a/src/blockinput.h +++ b/src/blockinput.h @@ -89,7 +89,7 @@ extern int pending_atimers; do_pending_atimers (); \ } \ else if (interrupt_input_blocked < 0) \ - abort (); \ + emacs_abort (); \ } \ while (0) @@ -124,4 +124,3 @@ extern int pending_atimers; extern void reinvoke_input_signal (void); #endif /* EMACS_BLOCKINPUT_H */ - diff --git a/src/buffer.c b/src/buffer.c index f4d38e50a47..7698b72a3c6 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1242,7 +1242,7 @@ buffer_local_value_1 (Lisp_Object variable, Lisp_Object buffer) result = Fdefault_value (variable); break; } - default: abort (); + default: emacs_abort (); } return result; @@ -2671,7 +2671,7 @@ current buffer is cleared. */) /* Make sure no markers were put on the chain while the chain value was incorrect. */ if (BUF_MARKERS (current_buffer)) - abort (); + emacs_abort (); BUF_MARKERS (current_buffer) = markers; @@ -3413,7 +3413,7 @@ overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr) } } if (p != overlay_str_buf + total) - abort (); + emacs_abort (); if (pstr) *pstr = overlay_str_buf; return total; @@ -4596,7 +4596,7 @@ buffer_slot_type_mismatch (Lisp_Object newval, int type) case_Lisp_Int: predicate = Qintegerp; break; case Lisp_String: predicate = Qstringp; break; case Lisp_Symbol: predicate = Qsymbolp; break; - default: abort (); + default: emacs_abort (); } wrong_type_argument (predicate, newval); @@ -5277,7 +5277,7 @@ init_buffer_once (void) /* Need more room? */ if (idx >= MAX_PER_BUFFER_VARS) - abort (); + emacs_abort (); last_per_buffer_idx = idx; Vbuffer_alist = Qnil; @@ -5418,7 +5418,7 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, if (PER_BUFFER_IDX (offset) == 0) /* Did a DEFVAR_PER_BUFFER without initializing the corresponding slot of buffer_local_flags */ - abort (); + emacs_abort (); } diff --git a/src/buffer.h b/src/buffer.h index 3acf1423816..da40a7ce3d8 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1149,7 +1149,7 @@ BUF_FETCH_MULTIBYTE_CHAR (struct buffer *buf, ptrdiff_t pos) We assume you know which buffer it's pointing into. */ #define OVERLAY_POSITION(P) \ - (MARKERP (P) ? marker_position (P) : (abort (), 0)) + (MARKERP (P) ? marker_position (P) : (emacs_abort (), 0)) /*********************************************************************** @@ -1189,7 +1189,7 @@ extern int last_per_buffer_idx; #define PER_BUFFER_VALUE_P(B, IDX) \ (((IDX) < 0 || IDX >= last_per_buffer_idx) \ - ? (abort (), 0) \ + ? (emacs_abort (), 0) \ : ((B)->local_flags[IDX] != 0)) /* Set whether per-buffer variable with index IDX has a buffer-local @@ -1198,7 +1198,7 @@ extern int last_per_buffer_idx; #define SET_PER_BUFFER_VALUE_P(B, IDX, VAL) \ do { \ if ((IDX) < 0 || (IDX) >= last_per_buffer_idx) \ - abort (); \ + emacs_abort (); \ (B)->local_flags[IDX] = (VAL); \ } while (0) diff --git a/src/bytecode.c b/src/bytecode.c index 40729cbd453..97730636d0e 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -435,7 +435,7 @@ unmark_byte_stack (void) #ifdef BYTE_CODE_SAFE #define CHECK_RANGE(ARG) \ - if (ARG >= bytestr_length) abort () + if (ARG >= bytestr_length) emacs_abort () #else /* not BYTE_CODE_SAFE */ @@ -508,7 +508,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, if (FRAME_X_P (f) && FRAME_FONT (f)->direction != 0 && FRAME_FONT (f)->direction != 1) - abort (); + emacs_abort (); } #endif @@ -600,9 +600,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, { #ifdef BYTE_CODE_SAFE if (top > stacke) - abort (); + emacs_abort (); else if (top < stack.bottom - 1) - abort (); + emacs_abort (); #endif #ifdef BYTE_CODE_METER @@ -1875,7 +1875,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, /* Actually this is Bstack_ref with offset 0, but we use Bdup for that instead. */ /* CASE (Bstack_ref): */ - abort (); + emacs_abort (); /* Handy byte-codes for lexical binding. */ CASE (Bstack_ref1): @@ -1928,11 +1928,11 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, #ifdef BYTE_CODE_SAFE if (op < Bconstant) { - abort (); + emacs_abort (); } if ((op -= Bconstant) >= const_length) { - abort (); + emacs_abort (); } PUSH (vectorp[op]); #else @@ -1951,7 +1951,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, #ifdef BYTE_CODE_SAFE error ("binding stack not balanced (serious byte compiler bug)"); #else - abort (); + emacs_abort (); #endif return result; diff --git a/src/character.c b/src/character.c index cfaaf8eeca9..37963d1878c 100644 --- a/src/character.c +++ b/src/character.c @@ -541,7 +541,7 @@ multibyte_chars_in_text (const unsigned char *ptr, ptrdiff_t nbytes) int len = MULTIBYTE_LENGTH (ptr, endp); if (len == 0) - abort (); + emacs_abort (); ptr += len; chars++; } diff --git a/src/charset.c b/src/charset.c index 0673790e91c..972a0598059 100644 --- a/src/charset.c +++ b/src/charset.c @@ -636,7 +636,7 @@ load_charset (struct charset *charset, int control_flag) else { if (! CHARSET_UNIFIED_P (charset)) - abort (); + emacs_abort (); map = CHARSET_UNIFY_MAP (charset); } if (STRINGP (map)) @@ -2025,10 +2025,10 @@ CH in the charset. */) c = XFASTINT (ch); charset = CHAR_CHARSET (c); if (! charset) - abort (); + emacs_abort (); code = ENCODE_CHAR (charset, c); if (code == CHARSET_INVALID_CODE (charset)) - abort (); + emacs_abort (); dimension = CHARSET_DIMENSION (charset); for (val = Qnil; dimension > 0; dimension--) { diff --git a/src/cm.c b/src/cm.c index 1922cd8140a..4b17b92eebc 100644 --- a/src/cm.c +++ b/src/cm.c @@ -119,7 +119,7 @@ cmcheckmagic (struct tty_display_info *tty) if (curX (tty) == FrameCols (tty)) { if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1) - abort (); + emacs_abort (); if (tty->termscript) putc ('\r', tty->termscript); putc ('\r', tty->output); diff --git a/src/coding.c b/src/coding.c index 02e7b34695e..94a2d9fea80 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2051,7 +2051,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, break; default: - abort (); + emacs_abort (); } CODING_DECODE_CHAR (coding, src, src_base, src_end, CHARSET_FROM_ID (charset_ID), code, c); @@ -2345,7 +2345,7 @@ decode_coding_emacs_mule (struct coding_system *coding) int i; if (charbuf_end - charbuf < cmp_status->length) - abort (); + emacs_abort (); for (i = 0; i < cmp_status->length; i++) *charbuf++ = cmp_status->carryover[i]; coding->annotated = 1; @@ -2619,7 +2619,7 @@ encode_coding_emacs_mule (struct coding_system *coding) preferred_charset_id = -1; break; default: - abort (); + emacs_abort (); } charbuf += -c - 1; continue; @@ -3482,7 +3482,7 @@ decode_coding_iso_2022 (struct coding_system *coding) if (cmp_status->state != COMPOSING_NO) { if (charbuf_end - charbuf < cmp_status->length) - abort (); + emacs_abort (); for (i = 0; i < cmp_status->length; i++) *charbuf++ = cmp_status->carryover[i]; coding->annotated = 1; @@ -3864,7 +3864,7 @@ decode_coding_iso_2022 (struct coding_system *coding) break; default: - abort (); + emacs_abort (); } if (cmp_status->state == COMPOSING_NO @@ -4419,7 +4419,7 @@ encode_coding_iso_2022 (struct coding_system *coding) preferred_charset_id = -1; break; default: - abort (); + emacs_abort (); } charbuf += -c - 1; continue; @@ -4933,7 +4933,7 @@ encode_coding_sjis (struct coding_system *coding) } } if (code == CHARSET_INVALID_CODE (charset)) - abort (); + emacs_abort (); if (charset == charset_kanji) { int c1, c2; @@ -5023,7 +5023,7 @@ encode_coding_big5 (struct coding_system *coding) } } if (code == CHARSET_INVALID_CODE (charset)) - abort (); + emacs_abort (); if (charset == charset_big5) { int c1, c2; @@ -7190,7 +7190,7 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit, *buf++ = XINT (XCAR (components)); } else - abort (); + emacs_abort (); *head -= len; } } @@ -9428,7 +9428,7 @@ usage: (set-coding-system-priority &rest coding-systems) */) && changed[coding_priorities[j]]) j++; if (j == coding_category_max) - abort (); + emacs_abort (); priorities[i] = coding_priorities[j]; } diff --git a/src/conf_post.h b/src/conf_post.h index f90ef90fb83..ead7298e98d 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -178,9 +178,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #endif #include -/* If you think about removing the line below, note that the - MS-Windows build relies on it for declaration of 'environ' needed - by a few source files. */ #include #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ diff --git a/src/data.c b/src/data.c index d8b7f42ea3f..415a8962350 100644 --- a/src/data.c +++ b/src/data.c @@ -108,7 +108,7 @@ wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) to try and do that by checking the tagbits, but nowadays all tagbits are potentially valid. */ /* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit) - * abort (); */ + * emacs_abort (); */ xsignal2 (Qwrong_type_argument, predicate, value); } @@ -182,7 +182,7 @@ for example, (type-of 1) returns `integer'. */) case Lisp_Misc_Float: return Qfloat; } - abort (); + emacs_abort (); case Lisp_Vectorlike: if (WINDOW_CONFIGURATIONP (object)) @@ -217,7 +217,7 @@ for example, (type-of 1) returns `integer'. */) return Qfloat; default: - abort (); + emacs_abort (); } } @@ -551,7 +551,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, /* In set_internal, we un-forward vars when their value is set to Qunbound. */ return Qt; - default: abort (); + default: emacs_abort (); } return (EQ (valcontents, Qunbound) ? Qnil : Qt); @@ -864,7 +864,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents) don't think anything will break. --lorentey */ return *(Lisp_Object *)(XKBOARD_OBJFWD (valcontents)->offset + (char *)FRAME_KBOARD (SELECTED_FRAME ())); - default: abort (); + default: emacs_abort (); } } @@ -950,7 +950,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva break; default: - abort (); /* goto def; */ + emacs_abort (); /* goto def; */ } } @@ -1055,7 +1055,7 @@ find_symbol_value (Lisp_Object symbol) /* FALLTHROUGH */ case SYMBOL_FORWARDED: return do_symval_forwarding (SYMBOL_FWD (sym)); - default: abort (); + default: emacs_abort (); } } @@ -1265,7 +1265,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, store_symval_forwarding (/* sym, */ innercontents, newval, buf); break; } - default: abort (); + default: emacs_abort (); } return; } @@ -1316,7 +1316,7 @@ default_value (Lisp_Object symbol) /* For other variables, get the current value. */ return do_symval_forwarding (valcontents); } - default: abort (); + default: emacs_abort (); } } @@ -1414,7 +1414,7 @@ for this variable. */) else return Fset (symbol, value); } - default: abort (); + default: emacs_abort (); } } @@ -1538,7 +1538,7 @@ The function `default-value' gets the default value and `set-default' sets it. else if (BUFFER_OBJFWDP (valcontents.fwd)) return variable; break; - default: abort (); + default: emacs_abort (); } if (sym->constant) @@ -1611,7 +1611,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME (variable))); break; - default: abort (); + default: emacs_abort (); } if (sym->constant) @@ -1718,7 +1718,7 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) if (blv->frame_local) return variable; break; - default: abort (); + default: emacs_abort (); } /* Get rid of this buffer's alist element, if any. */ @@ -1800,7 +1800,7 @@ frame-local bindings). */) error ("Symbol %s may not be frame-local", SDATA (SYMBOL_NAME (variable))); break; - default: abort (); + default: emacs_abort (); } if (sym->constant) @@ -1877,7 +1877,7 @@ BUFFER defaults to the current buffer. */) } return Qnil; } - default: abort (); + default: emacs_abort (); } } @@ -1912,7 +1912,7 @@ BUFFER defaults to the current buffer. */) case SYMBOL_FORWARDED: /* All BUFFER_OBJFWD slots become local if they are set. */ return (BUFFER_OBJFWDP (SYMBOL_FWD (sym)) ? Qt : Qnil); - default: abort (); + default: emacs_abort (); } } @@ -1956,7 +1956,7 @@ If the current binding is global (the default), the value is nil. */) return SYMBOL_BLV (sym)->where; else return Qnil; - default: abort (); + default: emacs_abort (); } } @@ -2272,7 +2272,7 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) return Qnil; default: - abort (); + emacs_abort (); } } diff --git a/src/dired.c b/src/dired.c index fa293258107..9af5f76821b 100644 --- a/src/dired.c +++ b/src/dired.c @@ -275,7 +275,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, /* Some bug somewhere. */ if (nchars > nbytes) - abort (); + emacs_abort (); STRING_SET_CHARS (fullname, nchars); if (nchars == nbytes) diff --git a/src/dispnew.c b/src/dispnew.c index cac4c2da4c4..17e6c85ac75 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -297,7 +297,7 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history, void __executable_start (void) { - abort (); + emacs_abort (); } #endif @@ -347,7 +347,7 @@ free_glyph_matrix (struct glyph_matrix *matrix) /* Detect the case that more matrices are freed than were allocated. */ if (--glyph_matrix_count < 0) - abort (); + emacs_abort (); /* Free glyph memory if MATRIX owns it. */ if (matrix->pool == NULL) @@ -2339,9 +2339,9 @@ check_glyph_memory (void) /* Check that nothing is left allocated. */ if (glyph_matrix_count) - abort (); + emacs_abort (); if (glyph_pool_count) - abort (); + emacs_abort (); } @@ -3024,7 +3024,7 @@ check_matrix_pointers (struct glyph_matrix *window_matrix, { if (!glyph_row_slice_p (window_matrix->rows + i, frame_matrix->rows + j)) - abort (); + emacs_abort (); ++i, ++j; } } @@ -3453,7 +3453,7 @@ check_current_matrix_flags (struct window *w) if (!last_seen_p && MATRIX_ROW_BOTTOM_Y (row) >= yb) last_seen_p = 1; else if (last_seen_p && row->enabled_p) - abort (); + emacs_abort (); } } @@ -4809,7 +4809,7 @@ scrolling (struct frame *frame) struct glyph_matrix *desired_matrix = frame->desired_matrix; if (!current_matrix) - abort (); + emacs_abort (); /* Compute hash codes of all the lines. Also calculate number of changed lines, number of unchanged lines at the beginning, and @@ -5477,7 +5477,7 @@ marginal_area_string (struct window *w, enum window_part part, else if (part == ON_RIGHT_MARGIN) area = RIGHT_MARGIN_AREA; else - abort (); + emacs_abort (); for (i = 0; row->enabled_p && i < w->current_matrix->nrows; ++i, ++row) if (wy >= row->y && wy < MATRIX_ROW_BOTTOM_Y (row)) @@ -6277,7 +6277,7 @@ init_display (void) /* Convert the initial frame to use the new display. */ if (f->output_method != output_initial) - abort (); + emacs_abort (); f->output_method = t->type; f->terminal = t; diff --git a/src/editfns.c b/src/editfns.c index a14e043c1bf..2d1a3cbfa0c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4263,7 +4263,7 @@ usage: (format STRING &rest OBJECTS) */) } if (bufsize < p - buf) - abort (); + emacs_abort (); if (maybe_combine_byte) nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf); @@ -4603,7 +4603,7 @@ Transposing beyond buffer boundaries is an error. */) len1_byte, end2, start2_byte + len2_byte) || count_combining_after (BYTE_POS_ADDR (start1_byte), len1_byte, end2, start2_byte + len2_byte)) - abort (); + emacs_abort (); } else { @@ -4615,7 +4615,7 @@ Transposing beyond buffer boundaries is an error. */) len2_byte, end1, start1_byte + len1_byte) || count_combining_after (BYTE_POS_ADDR (start1_byte), len1_byte, end2, start2_byte + len2_byte)) - abort (); + emacs_abort (); } #endif diff --git a/src/emacs.c b/src/emacs.c index dac5edd544f..b242cbf8844 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -340,22 +340,6 @@ memory_warning_signal (int sig) force_auto_save_soon (); } #endif - -/* We define abort, rather than using it from the library, - so that GDB can return from a breakpoint here. - MSDOS has its own definition in msdos.c. */ - -#if ! defined (DOS_NT) && ! defined (NO_ABORT) - -void -abort (void) -{ - kill (getpid (), SIGABRT); - /* This shouldn't be executed, but it prevents a warning. */ - exit (1); -} -#endif - /* Code for dealing with Lisp access to the Unix command line. */ @@ -1892,7 +1876,7 @@ sort_args (int argc, char **argv) } if (best < 0) - abort (); + emacs_abort (); /* Copy the highest priority remaining option, with its args, to NEW. Unless it is a duplicate of the previous one. */ diff --git a/src/eval.c b/src/eval.c index 3a4953665e3..1015b013a26 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1493,7 +1493,7 @@ See also the function `condition-case'. */) immediate_quit = handling_signal = 0; abort_on_gc = 0; if (gc_in_progress || waiting_for_input) - abort (); + emacs_abort (); #if 0 /* rms: I don't know why this was here, but it is surely wrong for an error that is handled. */ @@ -1590,7 +1590,7 @@ void xsignal (Lisp_Object error_symbol, Lisp_Object data) { Fsignal (error_symbol, data); - abort (); + emacs_abort (); } /* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */ @@ -2043,7 +2043,7 @@ eval_sub (Lisp_Object form) struct gcpro gcpro1, gcpro2, gcpro3; if (handling_signal) - abort (); + emacs_abort (); if (SYMBOLP (form)) { @@ -2207,7 +2207,7 @@ eval_sub (Lisp_Object form) is supported by this code. We need to either rewrite the subr to use a different argument protocol, or add more cases to this switch. */ - abort (); + emacs_abort (); } } } @@ -2850,7 +2850,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) /* If a subr takes more than 8 arguments without using MANY or UNEVALLED, we need to extend this function to support it. Until this is done, there is no way to call the function. */ - abort (); + emacs_abort (); } } } @@ -2981,7 +2981,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, lexenv = Qnil; } else - abort (); + emacs_abort (); i = optional = rest = 0; for (; CONSP (syms_left); syms_left = XCDR (syms_left)) @@ -3195,7 +3195,7 @@ specbind (Lisp_Object symbol, Lisp_Object value) set_internal (symbol, value, Qnil, 1); break; } - default: abort (); + default: emacs_abort (); } } diff --git a/src/fileio.c b/src/fileio.c index 7466914af1c..d193d2ed19f 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1294,7 +1294,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1]))) #endif /* WINDOWSNT */ { - if (!drive) abort (); + if (!drive) emacs_abort (); target -= 2; target[0] = DRIVE_LETTER (drive); target[1] = ':'; diff --git a/src/fns.c b/src/fns.c index 4d82e4e6e1d..fc0044106cd 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2953,7 +2953,7 @@ into shorter lines. */) encoded, length, NILP (no_line_break), !NILP (BVAR (current_buffer, enable_multibyte_characters))); if (encoded_length > allength) - abort (); + emacs_abort (); if (encoded_length < 0) { @@ -3009,7 +3009,7 @@ into shorter lines. */) encoded, length, NILP (no_line_break), STRING_MULTIBYTE (string)); if (encoded_length > allength) - abort (); + emacs_abort (); if (encoded_length < 0) { @@ -3154,7 +3154,7 @@ If the region can't be decoded, signal an error and don't modify the buffer. */ decoded, length, multibyte, &inserted_chars); if (decoded_length > allength) - abort (); + emacs_abort (); if (decoded_length < 0) { @@ -3204,7 +3204,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string, decoded_length = base64_decode_1 (SSDATA (string), decoded, length, 0, NULL); if (decoded_length > length) - abort (); + emacs_abort (); else if (decoded_length >= 0) decoded_string = make_unibyte_string (decoded, decoded_length); else @@ -3960,7 +3960,7 @@ sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p) else if (EQ (h->weak, Qkey_and_value)) remove_p = !(key_known_to_survive_p && value_known_to_survive_p); else - abort (); + emacs_abort (); next = HASH_NEXT (h, i); @@ -4256,7 +4256,7 @@ sxhash (Lisp_Object obj, int depth) break; default: - abort (); + emacs_abort (); } return hash; diff --git a/src/frame.c b/src/frame.c index 968cb4905a2..9b12842bf89 100644 --- a/src/frame.c +++ b/src/frame.c @@ -214,7 +214,7 @@ See also `frame-live-p'. */) case output_ns: return Qns; default: - abort (); + emacs_abort (); } } @@ -620,7 +620,7 @@ affects all frames on the same terminal device. */) #ifdef MSDOS if (sf->output_method != output_msdos_raw && sf->output_method != output_termcap) - abort (); + emacs_abort (); #else /* not MSDOS */ #ifdef WINDOWSNT /* This should work now! */ @@ -767,7 +767,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor Lisp_Object focus; if (!FRAMEP (XCAR (tail))) - abort (); + emacs_abort (); focus = FRAME_FOCUS_FRAME (XFRAME (XCAR (tail))); @@ -897,7 +897,7 @@ next_frame (Lisp_Object frame, Lisp_Object minibuf) /* There must always be at least one frame in Vframe_list. */ if (! CONSP (Vframe_list)) - abort (); + emacs_abort (); /* If this frame is dead, it won't be in Vframe_list, and we'll loop forever. Forestall that. */ @@ -975,7 +975,7 @@ prev_frame (Lisp_Object frame, Lisp_Object minibuf) /* There must always be at least one frame in Vframe_list. */ if (! CONSP (Vframe_list)) - abort (); + emacs_abort (); prev = Qnil; for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) @@ -984,7 +984,7 @@ prev_frame (Lisp_Object frame, Lisp_Object minibuf) f = XCAR (tail); if (!FRAMEP (f)) - abort (); + emacs_abort (); if (EQ (frame, f) && !NILP (prev)) return prev; @@ -1385,7 +1385,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) this = XCAR (frames); if (!FRAMEP (this)) - abort (); + emacs_abort (); f1 = XFRAME (this); if (kb == FRAME_KBOARD (f1)) @@ -1421,7 +1421,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) this = XCAR (frames); if (!FRAMEP (this)) - abort (); + emacs_abort (); f1 = XFRAME (this); /* Consider only frames on the same kboard @@ -1447,7 +1447,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) that is prohibited at the top; you can't delete surrogate minibuffer frames. */ if (NILP (frame_with_minibuf)) - abort (); + emacs_abort (); kset_default_minibuffer_frame (kb, frame_with_minibuf); } @@ -2108,7 +2108,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val) swap_in_global_binding (sym); break; } - default: abort (); + default: emacs_abort (); } } @@ -3835,7 +3835,7 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, } default: - abort (); + emacs_abort (); } } else diff --git a/src/frame.h b/src/frame.h index 1fe3ebd9182..94498e9efcf 100644 --- a/src/frame.h +++ b/src/frame.h @@ -981,7 +981,7 @@ extern Lisp_Object selected_frame; ((FRAMEP (selected_frame) \ && FRAME_LIVE_P (XFRAME (selected_frame))) \ ? XFRAME (selected_frame) \ - : (abort (), (struct frame *) 0)) + : (emacs_abort (), (struct frame *) 0)) /*********************************************************************** diff --git a/src/ftfont.c b/src/ftfont.c index e16f967f596..10b53411248 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1630,7 +1630,7 @@ ftfont_get_metrics (MFLTFont *font, MFLTGlyphString *gstring, FT_Glyph_Metrics *m; if (FT_Load_Glyph (ft_face, g->code, FT_LOAD_DEFAULT) != 0) - abort (); + emacs_abort (); m = &ft_face->glyph->metrics; if (flt_font_ft->matrix) { diff --git a/src/gtkutil.c b/src/gtkutil.c index f0d2c022f0c..3bce5be9cd0 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -254,7 +254,7 @@ void free_widget_value (widget_value *wv) { if (wv->free_list) - abort (); + emacs_abort (); if (malloc_cpt > 25) { @@ -3519,7 +3519,7 @@ xg_store_widget_in_map (GtkWidget *w) } /* Should never end up here */ - abort (); + emacs_abort (); } /* Remove pointer at IDX from id_to_widget. @@ -4087,7 +4087,7 @@ xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data) else { fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n"); - abort (); + emacs_abort (); } } else if (store_type == GTK_IMAGE_ICON_NAME) @@ -4102,7 +4102,7 @@ xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data) else { fprintf (stderr, "internal error: store_type is %d\n", store_type); - abort (); + emacs_abort (); } } if (wmenuimage) diff --git a/src/image.c b/src/image.c index 3e021677e09..fc99f882973 100644 --- a/src/image.c +++ b/src/image.c @@ -841,7 +841,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords, break; default: - abort (); + emacs_abort (); break; } diff --git a/src/indent.c b/src/indent.c index 160b8c7479e..c60315a7f6e 100644 --- a/src/indent.c +++ b/src/indent.c @@ -122,7 +122,7 @@ disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *w int i; if (widthtab->header.size != 256) - abort (); + emacs_abort (); for (i = 0; i < 256; i++) if (character_width (i, disptab) @@ -144,7 +144,7 @@ recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab) bset_width_table (buf, Fmake_vector (make_number (256), make_number (0))); widthtab = XVECTOR (BVAR (buf, width_table)); if (widthtab->header.size != 256) - abort (); + emacs_abort (); for (i = 0; i < 256; i++) XSETFASTINT (widthtab->contents[i], character_width (i, disptab)); diff --git a/src/insdel.c b/src/insdel.c index da258c19a1e..604a9bbf3df 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -69,13 +69,13 @@ check_markers (void) for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) { if (tail->buffer->text != current_buffer->text) - abort (); + emacs_abort (); if (tail->charpos > Z) - abort (); + emacs_abort (); if (tail->bytepos > Z_BYTE) - abort (); + emacs_abort (); if (multibyte && ! CHAR_HEAD_P (FETCH_BYTE (tail->bytepos))) - abort (); + emacs_abort (); } } @@ -808,7 +808,7 @@ insert_1_both (const char *string, #ifdef BYTE_COMBINING_DEBUG if (count_combining_before (string, nbytes, PT, PT_BYTE) || count_combining_after (string, nbytes, PT, PT_BYTE)) - abort (); + emacs_abort (); #endif /* Record deletion of the surrounding text that combines with @@ -943,7 +943,7 @@ insert_from_string_1 (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, the text that has been stored by copy_text. */ if (count_combining_before (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE) || count_combining_after (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE)) - abort (); + emacs_abort (); #endif record_insert (PT, nchars); @@ -1126,7 +1126,7 @@ insert_from_buffer_1 (struct buffer *buf, the text that has been stored by copy_text. */ if (count_combining_before (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE) || count_combining_after (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE)) - abort (); + emacs_abort (); #endif record_insert (PT, nchars); @@ -1187,7 +1187,7 @@ adjust_after_replace (ptrdiff_t from, ptrdiff_t from_byte, #ifdef BYTE_COMBINING_DEBUG if (count_combining_before (GPT_ADDR, len_byte, from, from_byte) || count_combining_after (GPT_ADDR, len_byte, from, from_byte)) - abort (); + emacs_abort (); #endif if (STRINGP (prev_text)) @@ -1370,7 +1370,7 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, the text that has been stored by copy_text. */ if (count_combining_before (GPT_ADDR, outgoing_insbytes, from, from_byte) || count_combining_after (GPT_ADDR, outgoing_insbytes, from, from_byte)) - abort (); + emacs_abort (); #endif if (! EQ (BVAR (current_buffer, undo_list), Qt)) @@ -1496,7 +1496,7 @@ replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, the text that has been stored by copy_text. */ if (count_combining_before (GPT_ADDR, insbytes, from, from_byte) || count_combining_after (GPT_ADDR, insbytes, from, from_byte)) - abort (); + emacs_abort (); #endif GAP_SIZE -= insbytes; @@ -1704,7 +1704,7 @@ del_range_2 (ptrdiff_t from, ptrdiff_t from_byte, #ifdef BYTE_COMBINING_DEBUG if (count_combining_before (BUF_BYTE_ADDRESS (current_buffer, to_byte), Z_BYTE - to_byte, from, from_byte)) - abort (); + emacs_abort (); #endif if (ret_string || ! EQ (BVAR (current_buffer, undo_list), Qt)) diff --git a/src/intervals.c b/src/intervals.c index 49d61b2f9b0..e508f968963 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -199,13 +199,13 @@ intervals_equal (INTERVAL i0, INTERVAL i1) i0_sym = XCAR (i0_cdr); i0_cdr = XCDR (i0_cdr); if (!CONSP (i0_cdr)) - return 0; /* abort (); */ + return 0; i1_val = i1->plist; while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym)) { i1_val = XCDR (i1_val); if (!CONSP (i1_val)) - return 0; /* abort (); */ + return 0; i1_val = XCDR (i1_val); } @@ -223,7 +223,7 @@ intervals_equal (INTERVAL i0, INTERVAL i1) i1_cdr = XCDR (i1_cdr); if (!CONSP (i1_cdr)) - return 0; /* abort (); */ + return 0; i1_cdr = XCDR (i1_cdr); } @@ -1253,7 +1253,7 @@ delete_interval (register INTERVAL i) else if (STRINGP (owner)) set_string_intervals (owner, parent); else - abort (); + emacs_abort (); return; } @@ -1408,7 +1408,7 @@ offset_intervals (struct buffer *buffer, ptrdiff_t start, ptrdiff_t length) start, length); else { - IF_LINT (if (length < - TYPE_MAXIMUM (ptrdiff_t)) abort ();) + lint_assume (- TYPE_MAXIMUM (ptrdiff_t) <= length); adjust_intervals_for_deletion (buffer, start, -length); } } @@ -1468,7 +1468,7 @@ merge_interval_right (register INTERVAL i) /* This must be the rightmost or last interval and cannot be merged right. The caller should have known. */ - abort (); + emacs_abort (); } /* Merge interval I with its lexicographic predecessor. The resulting @@ -1524,7 +1524,7 @@ merge_interval_left (register INTERVAL i) /* This must be the leftmost or first interval and cannot be merged left. The caller should have known. */ - abort (); + emacs_abort (); } /* Create a copy of SOURCE but with the default value of UP. */ @@ -2170,7 +2170,7 @@ get_property_and_range (ptrdiff_t pos, Lisp_Object prop, Lisp_Object *val, else if (STRINGP (object)) i = find_interval (string_intervals (object), pos); else - abort (); + emacs_abort (); if (!i || (i->position + LENGTH (i) <= pos)) return 0; @@ -2209,7 +2209,7 @@ get_local_map (register ptrdiff_t position, register struct buffer *buffer, /* Perhaps we should just change `position' to the limit. */ if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer)) - abort (); + emacs_abort (); /* Ignore narrowing, so that a local map continues to be valid even if the visible region contains no characters and hence no properties. */ diff --git a/src/keyboard.c b/src/keyboard.c index 464c3ae0d66..fe5372e008c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1023,7 +1023,7 @@ restore_kboard_configuration (Lisp_Object was_locked) pop_kboard (); /* The pop should not change the kboard. */ if (single_kboard && current_kboard != prev) - abort (); + emacs_abort (); } return Qnil; } @@ -2605,13 +2605,13 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, Lisp_Object last = KVAR (kb, kbd_queue); /* We shouldn't get here if we were in single-kboard mode! */ if (single_kboard) - abort (); + emacs_abort (); if (CONSP (last)) { while (CONSP (XCDR (last))) last = XCDR (last); if (!NILP (XCDR (last))) - abort (); + emacs_abort (); } if (!CONSP (last)) kset_kbd_queue (kb, Fcons (c, Qnil)); @@ -2784,7 +2784,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, if (current_kboard->kbd_queue_has_data) { if (!CONSP (KVAR (current_kboard, kbd_queue))) - abort (); + emacs_abort (); c = XCAR (KVAR (current_kboard, kbd_queue)); kset_kbd_queue (current_kboard, XCDR (KVAR (current_kboard, kbd_queue))); @@ -2851,7 +2851,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, while (CONSP (XCDR (last))) last = XCDR (last); if (!NILP (XCDR (last))) - abort (); + emacs_abort (); } if (!CONSP (last)) kset_kbd_queue (kb, Fcons (c, Qnil)); @@ -3560,7 +3560,7 @@ kbd_buffer_store_event_hold (register struct input_event *event, struct input_event *hold_quit) { if (event->kind == NO_EVENT) - abort (); + emacs_abort (); if (hold_quit && hold_quit->kind != NO_EVENT) return; @@ -3955,7 +3955,7 @@ kbd_buffer_get_event (KBOARD **kbp, #else /* We're getting selection request events, but we don't have a window system. */ - abort (); + emacs_abort (); #endif } @@ -4192,7 +4192,7 @@ kbd_buffer_get_event (KBOARD **kbp, else /* We were promised by the above while loop that there was something for us to read! */ - abort (); + emacs_abort (); input_pending = readable_events (0); @@ -4261,7 +4261,7 @@ process_special_events (void) #else /* We're getting selection request events, but we don't have a window system. */ - abort (); + emacs_abort (); #endif } } @@ -5614,7 +5614,7 @@ make_lispy_event (struct input_event *event) else if (FRAMEP (event->frame_or_window)) f = XFRAME (event->frame_or_window); else - abort (); + emacs_abort (); if (FRAME_WINDOW_P (f)) fuzz = double_click_fuzz; @@ -5721,7 +5721,7 @@ make_lispy_event (struct input_event *event) else /* Every mouse event should either have the down_modifier or the up_modifier set. */ - abort (); + emacs_abort (); { /* Get the symbol we should use for the mouse click. */ @@ -5782,7 +5782,7 @@ make_lispy_event (struct input_event *event) else if (FRAMEP (event->frame_or_window)) fr = XFRAME (event->frame_or_window); else - abort (); + emacs_abort (); fuzz = FRAME_WINDOW_P (fr) ? double_click_fuzz : double_click_fuzz / 8; @@ -5802,7 +5802,7 @@ make_lispy_event (struct input_event *event) else /* Every wheel event should either have the down_modifier or the up_modifier set. */ - abort (); + emacs_abort (); if (event->kind == HORIZ_WHEEL_EVENT) symbol_num += 2; @@ -5971,7 +5971,7 @@ make_lispy_event (struct input_event *event) { char *name = find_user_signal_name (event->code); if (!name) - abort (); + emacs_abort (); return intern (name); } @@ -6052,7 +6052,7 @@ make_lispy_event (struct input_event *event) /* The 'kind' field of the event is something we don't recognize. */ default: - abort (); + emacs_abort (); } } @@ -6229,7 +6229,7 @@ apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_ /* Only the event queue may use the `up' modifier; it should always be turned into a click or drag event before presented to lisp code. */ if (modifiers & up_modifier) - abort (); + emacs_abort (); if (modifiers & alt_modifier) { *p++ = 'A'; *p++ = '-'; } if (modifiers & ctrl_modifier) { *p++ = 'C'; *p++ = '-'; } @@ -6324,7 +6324,7 @@ parse_modifiers (Lisp_Object symbol) Qnil); if (modifiers & ~INTMASK) - abort (); + emacs_abort (); XSETFASTINT (mask, modifiers); elements = Fcons (unmodified, Fcons (mask, Qnil)); @@ -7001,7 +7001,7 @@ tty_read_avail_input (struct terminal *terminal, if (terminal->type != output_termcap && terminal->type != output_msdos_raw) - abort (); + emacs_abort (); /* XXX I think the following code should be moved to separate hook functions in system-dependent files. */ @@ -10902,7 +10902,7 @@ handle_interrupt (void) #endif /* not MSDOS */ fflush (stdout); if (((c = getchar ()) & ~040) == 'Y') - abort (); + emacs_abort (); while (c != '\n') c = getchar (); #ifdef MSDOS printf ("\r\nContinuing...\r\n"); @@ -10983,7 +10983,7 @@ quit_throw_to_read_char (int from_signal) #ifdef POLL_FOR_INPUT /* May be > 1 if in recursive minibuffer. */ if (poll_suppress_count == 0) - abort (); + emacs_abort (); #endif #endif if (FRAMEP (internal_last_event_frame) @@ -11341,7 +11341,7 @@ delete_kboard (KBOARD *kb) for (kbp = &all_kboards; *kbp != kb; kbp = &(*kbp)->next_kboard) if (*kbp == NULL) - abort (); + emacs_abort (); *kbp = kb->next_kboard; /* Prevent a dangling reference to KB. */ @@ -11352,7 +11352,7 @@ delete_kboard (KBOARD *kb) current_kboard = FRAME_KBOARD (XFRAME (selected_frame)); single_kboard = 0; if (current_kboard == kb) - abort (); + emacs_abort (); } wipe_kboard (kb); diff --git a/src/keymap.c b/src/keymap.c index 85c384b8180..d79ff89ed67 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2923,7 +2923,7 @@ You type Translation\n\ char *title, *p; if (!SYMBOLP (modes[i])) - abort (); + emacs_abort (); p = title = alloca (42 + SCHARS (SYMBOL_NAME (modes[i]))); *p++ = '\f'; diff --git a/src/lisp.h b/src/lisp.h index 35a07c838fb..0835795a26d 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2288,7 +2288,7 @@ extern int gcpro_level; #define UNGCPRO \ ((--gcpro_level != gcpro1.level) \ - ? (abort (), 0) \ + ? (emacs_abort (), 0) \ : ((gcprolist = gcpro1.next), 0)) #endif /* DEBUG_GCPRO */ @@ -3412,6 +3412,7 @@ extern int set_window_size (int, int, int); extern EMACS_INT get_random (void); extern void seed_random (void *, ptrdiff_t); extern void init_random (void); +extern _Noreturn void emacs_abort (void) NO_INLINE; extern int emacs_open (const char *, int, int); extern int emacs_close (int); extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); diff --git a/src/lread.c b/src/lread.c index 1dd6275684b..c15c8da3f7b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1694,7 +1694,7 @@ readevalloop (Lisp_Object readcharfun, /* We assume START is nil when input is not from a buffer. */ if (! NILP (start) && !b) - abort (); + emacs_abort (); specbind (Qstandard_input, readcharfun); /* GCPROs readcharfun. */ specbind (Qcurrent_load_list, Qnil); @@ -3671,7 +3671,7 @@ intern_c_string_1 (const char *str, ptrdiff_t len) /* Creating a non-pure string from a string literal not implemented yet. We could just use make_string here and live with the extra copy. */ - abort (); + emacs_abort (); return Fintern (make_pure_c_string (str, len), obarray); } diff --git a/src/marker.c b/src/marker.c index 4ea06c7cd57..de3c19c3bcb 100644 --- a/src/marker.c +++ b/src/marker.c @@ -59,7 +59,7 @@ byte_char_debug_check (struct buffer *b, ptrdiff_t charpos, ptrdiff_t bytepos) bytepos - BUF_BEG_BYTE (b)); if (charpos - 1 != nchars) - abort (); + emacs_abort (); } #else /* not MARKER_DEBUG */ @@ -67,7 +67,7 @@ byte_char_debug_check (struct buffer *b, ptrdiff_t charpos, ptrdiff_t bytepos) #define byte_char_debug_check(b, charpos, bytepos) do { } while (0) #endif /* MARKER_DEBUG */ - + void clear_charpos_cache (struct buffer *b) { @@ -142,7 +142,7 @@ buf_charpos_to_bytepos (struct buffer *b, ptrdiff_t charpos) ptrdiff_t best_below, best_below_byte; if (charpos < BUF_BEG (b) || charpos > BUF_Z (b)) - abort (); + emacs_abort (); best_above = BUF_Z (b); best_above_byte = BUF_Z_BYTE (b); @@ -296,7 +296,7 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos) ptrdiff_t best_below, best_below_byte; if (bytepos < BUF_BEG_BYTE (b) || bytepos > BUF_Z_BYTE (b)) - abort (); + emacs_abort (); best_above = BUF_Z (b); best_above_byte = BUF_Z_BYTE (b); @@ -506,7 +506,7 @@ set_marker_internal (Lisp_Object marker, Lisp_Object position, else { register ptrdiff_t charpos, bytepos; - + CHECK_NUMBER_COERCE_MARKER (position); charpos = clip_to_bounds (restricted ? BUF_BEGV (b) : BUF_BEG (b), XINT (position), @@ -570,8 +570,8 @@ set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, if (b) { - attach_marker - (m, b, + attach_marker + (m, b, clip_to_bounds (BUF_BEGV (b), charpos, BUF_ZV (b)), clip_to_bounds (BUF_BEGV_BYTE (b), bytepos, BUF_ZV_BYTE (b))); } @@ -605,12 +605,12 @@ unchain_marker (register struct Lisp_Marker *marker) { if (*prev == BUF_MARKERS (b)) { - /* Deleting first marker from the buffer's chain. Crash + /* Deleting first marker from the buffer's chain. Crash if new first marker in chain does not say it belongs to the same buffer, or at least that they have the same base buffer. */ if (tail->next && b->text != tail->next->buffer->text) - abort (); + emacs_abort (); } *prev = tail->next; /* We have removed the marker from the chain; diff --git a/src/menu.c b/src/menu.c index 20770537326..bfdc68ca118 100644 --- a/src/menu.c +++ b/src/menu.c @@ -733,7 +733,7 @@ digest_single_submenu (int start, int end, int top_level_items) /* All items should be contained in panes. */ if (panes_seen == 0) - abort (); + emacs_abort (); item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME); enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE); @@ -807,7 +807,7 @@ digest_single_submenu (int start, int end, int top_level_items) else if (EQ (type, QCtoggle)) wv->button_type = BUTTON_TYPE_TOGGLE; else - abort (); + emacs_abort (); wv->selected = !NILP (selected); if (! STRINGP (help)) diff --git a/src/minibuf.c b/src/minibuf.c index 2035a3e3985..655a02f5eca 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -110,7 +110,7 @@ choose_minibuf_frame (void) /* I don't think that any frames may validly have a null minibuffer window anymore. */ if (NILP (sf->minibuffer_window)) - abort (); + emacs_abort (); /* Under X, we come here with minibuf_window being the minibuffer window of the unused termcap window created in diff --git a/src/msdos.c b/src/msdos.c index ac348e94375..ed5d3240aa1 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -796,7 +796,7 @@ IT_set_face (int face) /* The default face for the frame should always be realized and cached. */ if (!fp) - abort (); + emacs_abort (); } screen_face = face; fg = fp->foreground; @@ -1393,7 +1393,7 @@ IT_insert_glyphs (struct frame *f, struct glyph *start, int len) static void IT_delete_glyphs (struct frame *f, int n) { - abort (); + emacs_abort (); } /* set-window-configuration on window.c needs this. */ @@ -3013,7 +3013,7 @@ XMenuAddPane (Display *foo, XMenu *menu, const char *txt, int enable) const char *p; if (!enable) - abort (); + emacs_abort (); IT_menu_make_room (menu); menu->submenu[menu->count] = IT_menu_create (); @@ -4119,7 +4119,7 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, FD_ZERO (efds); if (nfds != 1) - abort (); + emacs_abort (); /* If we are looking only for the terminal, with no timeout, just read it and wait -- that's more efficient. */ @@ -4214,26 +4214,8 @@ init_gettimeofday (void) } #endif -#ifdef abort -#undef abort void -dos_abort (char *file, int line) -{ - char buffer1[200], buffer2[400]; - int i, j; - - sprintf (buffer1, "", file, line); - for (i = j = 0; buffer1[i]; i++) { - buffer2[j++] = buffer1[i]; - buffer2[j++] = 0x70; - } - dosmemput (buffer2, j, (int)ScreenPrimary); - ScreenSetCursor (2, 0); - abort (); -} -#else -void -abort (void) +emacs_abort (void) { dos_ttcooked (); ScreenSetCursor (10, 0); @@ -4249,7 +4231,6 @@ abort (void) #endif /* __DJGPP_MINOR__ >= 2 */ exit (2); } -#endif void syms_of_msdos (void) diff --git a/src/nsfont.m b/src/nsfont.m index 412a6777c64..5bf4c01c961 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -1330,7 +1330,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block) font_info->glyphs[block] = xmalloc (0x100 * sizeof (unsigned short)); if (!unichars || !(font_info->glyphs[block])) - abort (); + emacs_abort (); /* create a string containing all Unicode characters in this block */ for (idx = block<<8, i = 0; i < 0x100; idx++, i++) @@ -1405,7 +1405,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block) font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics)); if (!(font_info->metrics[block])) - abort (); + emacs_abort (); metrics = font_info->metrics[block]; for (g = block<<8, i =0; i<0x100 && g < numGlyphs; g++, i++, metrics++) diff --git a/src/nsmenu.m b/src/nsmenu.m index 9e290486213..d0f3e45e939 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -948,7 +948,7 @@ ns_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, else if (EQ (type, QCradio)) wv->button_type = BUTTON_TYPE_RADIO; else - abort (); + emacs_abort (); wv->selected = !NILP (selected); diff --git a/src/nsterm.m b/src/nsterm.m index c892a5486a7..a7d6732d5bd 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3340,7 +3340,7 @@ ns_draw_glyph_string (struct glyph_string *s) break; default: - abort (); + emacs_abort (); } /* Draw box if not done already. */ @@ -3475,7 +3475,7 @@ ns_read_socket (struct terminal *terminal, int expected, if (++apploopnr != 1) { - abort (); + emacs_abort (); } [NSApp run]; --apploopnr; @@ -3515,7 +3515,7 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds, [outerpool release]; outerpool = [[NSAutoreleasePool alloc] init]; - + send_appdefined = YES; if (nr > 0) { @@ -3568,7 +3568,7 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds, emacs_event = &event; if (++apploopnr != 1) { - abort(); + emacs_abort (); } [NSApp run]; --apploopnr; @@ -3586,7 +3586,7 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds, { int t; if ([ev type] != NSApplicationDefined) - abort (); + emacs_abort (); t = [ev data1]; last_appdefined_event = 0; @@ -4053,7 +4053,7 @@ ns_term_init (Lisp_Object display_name) { fprintf (stderr, "Failed to create pipe: %s\n", emacs_strerror (errno)); - abort (); + emacs_abort (); } fcntl (selfds[0], F_SETFL, O_NONBLOCK|fcntl (selfds[0], F_GETFL)); @@ -4273,7 +4273,7 @@ ns_term_shutdown (int sig) } else // force a stack trace to happen { - abort(); + emacs_abort (); } } @@ -4534,10 +4534,10 @@ not_in_argv (NSString *arg) /* Don't open files from the command line unconditionally, Cocoa parses the command line wrong, --option value tries to open value if --option is the last option. */ - while ((file = [files nextObject]) != nil) + while ((file = [files nextObject]) != nil) if (ns_do_open_file || not_in_argv (file)) [ns_pending_files addObject: file]; - + [self replyToOpenOrPrint: NSApplicationDelegateReplySuccess]; } @@ -4604,7 +4604,7 @@ not_in_argv (NSString *arg) /* NSTRACE (fd_handler); */ - for (;;) + for (;;) { [pool release]; pool = [[NSAutoreleasePool alloc] init]; @@ -4889,7 +4889,7 @@ not_in_argv (NSString *arg) is_right_key = (flags & NSRightCommandKeyMask) == NSRightCommandKeyMask; is_left_key = (flags & NSLeftCommandKeyMask) == NSLeftCommandKeyMask || (! is_right_key && (flags & NSCommandKeyMask) == NSCommandKeyMask); - + if (is_right_key) emacs_event->modifiers |= parse_solitary_modifier (EQ (ns_right_command_modifier, Qleft) @@ -5853,7 +5853,7 @@ not_in_argv (NSString *arg) NSTRACE (menuDown); if (context_menu_value == -1) context_menu_value = [sender tag]; - else + else { NSInteger tag = [sender tag]; find_and_call_menu_selection (emacsframe, emacsframe->menu_bar_items_used, @@ -6180,7 +6180,7 @@ not_in_argv (NSString *arg) Lisp_Object str = Qnil; struct frame *f = SELECTED_FRAME (); struct buffer *curbuf = XBUFFER (XWINDOW (f->selected_window)->buffer); - + if ([attribute isEqualToString:NSAccessibilityRoleAttribute]) return NSAccessibilityTextFieldRole; @@ -6193,13 +6193,13 @@ not_in_argv (NSString *arg) { if (! NILP (BVAR (curbuf, mark_active))) str = ns_get_local_selection (QPRIMARY, QUTF8_STRING); - + if (NILP (str)) { ptrdiff_t start_byte = BUF_BEGV_BYTE (curbuf); ptrdiff_t byte_range = BUF_ZV_BYTE (curbuf) - start_byte; ptrdiff_t range = BUF_ZV (curbuf) - BUF_BEGV (curbuf); - + if (! NILP (BVAR (curbuf, enable_multibyte_characters))) str = make_uninit_multibyte_string (range, byte_range); else @@ -6209,9 +6209,9 @@ not_in_argv (NSString *arg) memcpy (SDATA (str), BYTE_POS_ADDR (start_byte), byte_range); } } - - - if (! NILP (str)) + + + if (! NILP (str)) { if (CONSP (str) && SYMBOLP (XCAR (str))) { @@ -6226,7 +6226,7 @@ not_in_argv (NSString *arg) return nsStr; } } - + return [super accessibilityAttributeValue:attribute]; } #endif /* NS_IMPL_COCOA */ diff --git a/src/print.c b/src/print.c index 52c07c79122..72e536e4278 100644 --- a/src/print.c +++ b/src/print.c @@ -2060,7 +2060,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag { int len; /* We're in trouble if this happens! - Probably should just abort () */ + Probably should just emacs_abort (). */ strout ("#ai_addrlen); datagram_address[s].len = lres->ai_addrlen; if (is_server) @@ -3973,7 +3973,7 @@ deactivate_process (Lisp_Object proc) FD_CLR (inchannel, &connect_wait_mask); FD_CLR (inchannel, &write_mask); if (--num_pending_connects < 0) - abort (); + emacs_abort (); } #endif if (inchannel == max_process_desc) @@ -4752,7 +4752,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, Cleanup occurs c/o status_notify after SIGCLD. */ no_avail = 1; /* Cannot depend on values returned */ #else - abort (); + emacs_abort (); #endif } else @@ -4993,7 +4993,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, FD_CLR (channel, &connect_wait_mask); FD_CLR (channel, &write_mask); if (--num_pending_connects < 0) - abort (); + emacs_abort (); proc = chan_process[channel]; if (NILP (proc)) @@ -6354,7 +6354,7 @@ process has been transmitted to the serial port. */) #endif /* not HAVE_SHUTDOWN */ new_outfd = emacs_open (NULL_DEVICE, O_WRONLY, 0); if (new_outfd < 0) - abort (); + emacs_abort (); old_outfd = XPROCESS (proc)->outfd; if (!proc_encode_coding_system[new_outfd]) diff --git a/src/ralloc.c b/src/ralloc.c index 3877e21d4f6..74834333aa3 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -237,7 +237,7 @@ obtain (POINTER address, SIZE size) } if (! heap) - abort (); + emacs_abort (); /* If we can't fit SIZE bytes in that heap, try successive later heaps. */ @@ -330,7 +330,7 @@ relinquish (void) /* This heap should have no blocs in it. */ if (last_heap->first_bloc != NIL_BLOC || last_heap->last_bloc != NIL_BLOC) - abort (); + emacs_abort (); /* Return the last heap, with its header, to the system. */ excess = (char *)last_heap->end - (char *)last_heap->start; @@ -355,7 +355,7 @@ relinquish (void) which returns the entire last heap to the system, seems unlikely to trigger this mode of failure. */ if (last_heap->end != (*real_morecore) (0)) - abort (); + emacs_abort (); } } } @@ -452,7 +452,7 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address) /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) - abort (); + emacs_abort (); while (b) { @@ -576,7 +576,7 @@ resize_bloc (bloc_ptr bloc, SIZE size) /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) - abort (); + emacs_abort (); if (bloc == NIL_BLOC || size == bloc->size) return 1; @@ -588,7 +588,7 @@ resize_bloc (bloc_ptr bloc, SIZE size) } if (heap == NIL_HEAP) - abort (); + emacs_abort (); old_size = bloc->size; bloc->size = size; @@ -937,7 +937,7 @@ r_alloc_free (register POINTER *ptr) dead_bloc = find_bloc (ptr); if (dead_bloc == NIL_BLOC) - abort (); /* Double free? PTR not originally used to allocate? */ + emacs_abort (); /* Double free? PTR not originally used to allocate? */ free_bloc (dead_bloc); *ptr = 0; @@ -979,7 +979,7 @@ r_re_alloc (POINTER *ptr, SIZE size) bloc = find_bloc (ptr); if (bloc == NIL_BLOC) - abort (); /* Already freed? PTR not originally used to allocate? */ + emacs_abort (); /* Already freed? PTR not originally used to allocate? */ if (size < bloc->size) { @@ -1152,7 +1152,7 @@ r_alloc_reset_variable (POINTER *old, POINTER *new) } if (bloc == NIL_BLOC || bloc->variable != old) - abort (); /* Already freed? OLD not originally used to allocate? */ + emacs_abort (); /* Already freed? OLD not originally used to allocate? */ /* Update variable to point to the new location. */ bloc->variable = new; @@ -1193,7 +1193,7 @@ r_alloc_init (void) first_heap->start = first_heap->bloc_start = virtual_break_value = break_value = (*real_morecore) (0); if (break_value == NIL) - abort (); + emacs_abort (); extra_bytes = ROUNDUP (50000); #endif diff --git a/src/region-cache.c b/src/region-cache.c index d2bba8c11b2..c3eb087aade 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -194,7 +194,7 @@ find_cache_boundary (struct region_cache *c, ptrdiff_t pos) if (BOUNDARY_POS (c, low) > pos || (low + 1 < c->cache_len && BOUNDARY_POS (c, low + 1) <= pos)) - abort (); + emacs_abort (); return low; } @@ -217,12 +217,12 @@ move_cache_gap (struct region_cache *c, ptrdiff_t pos, ptrdiff_t min_size) if (pos < 0 || pos > c->cache_len) - abort (); + emacs_abort (); /* We mustn't ever try to put the gap before the dummy start boundary. That must always be start-relative. */ if (pos == 0) - abort (); + emacs_abort (); /* Need we move the gap right? */ while (gap_start < pos) @@ -291,24 +291,24 @@ insert_cache_boundary (struct region_cache *c, ptrdiff_t i, ptrdiff_t pos, { /* i must be a valid cache index. */ if (i < 0 || i > c->cache_len) - abort (); + emacs_abort (); /* We must never want to insert something before the dummy first boundary. */ if (i == 0) - abort (); + emacs_abort (); /* We must only be inserting things in order. */ if (! (BOUNDARY_POS (c, i - 1) < pos && (i == c->cache_len || pos < BOUNDARY_POS (c, i)))) - abort (); + emacs_abort (); /* The value must be different from the ones around it. However, we temporarily create boundaries that establish the same value as the subsequent boundary, so we're not going to flag that case. */ if (BOUNDARY_VALUE (c, i - 1) == value) - abort (); + emacs_abort (); move_cache_gap (c, i, 1); @@ -331,16 +331,16 @@ delete_cache_boundaries (struct region_cache *c, /* Gotta be in range. */ if (start < 0 || end > c->cache_len) - abort (); + emacs_abort (); /* Gotta be in order. */ if (start > end) - abort (); + emacs_abort (); /* Can't delete the dummy entry. */ if (start == 0 && end >= 1) - abort (); + emacs_abort (); /* Minimize gap motion. If we're deleting nothing, do nothing. */ if (len == 0) @@ -380,10 +380,10 @@ set_cache_region (struct region_cache *c, ptrdiff_t start, ptrdiff_t end, int value) { if (start > end) - abort (); + emacs_abort (); if (start < c->buffer_beg || end > c->buffer_end) - abort (); + emacs_abort (); /* Eliminate this case; then we can assume that start and end-1 are both the locations of real characters in the buffer. */ diff --git a/src/scroll.c b/src/scroll.c index 78ebe65bdcc..79dd464b29e 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -195,13 +195,13 @@ calculate_scrolling (FRAME_PTR frame, { cost = p1->writecost + first_insert_cost[i]; if ((int) p1->insertcount > i) - abort (); + emacs_abort (); cost1 = p1->insertcost + next_insert_cost[i - p1->insertcount]; } p->insertcost = min (cost, cost1) + draw_cost[i] + extra_cost; p->insertcount = (cost < cost1) ? 1 : p1->insertcount + 1; if ((int) p->insertcount > i) - abort (); + emacs_abort (); /* Calculate the cost if we do a delete line after outputting this line. diff --git a/src/search.c b/src/search.c index 0b4f635066c..72bd5605709 100644 --- a/src/search.c +++ b/src/search.c @@ -1009,7 +1009,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, if (!EQ (noerror, Qt)) { if (lim < BEGV || lim > ZV) - abort (); + emacs_abort (); SET_PT_BOTH (lim, lim_byte); return Qnil; #if 0 /* This would be clean, but maybe programs depend on @@ -1022,7 +1022,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, } if (np < BEGV || np > ZV) - abort (); + emacs_abort (); SET_PT (np); @@ -2770,7 +2770,7 @@ Return value is undefined if the last search failed. */) } else /* last_thing_searched must always be Qt, a buffer, or Qnil. */ - abort (); + emacs_abort (); len = 2 * i + 2; } diff --git a/src/sound.c b/src/sound.c index 403f08240ce..d20fa5ee8eb 100644 --- a/src/sound.c +++ b/src/sound.c @@ -843,7 +843,7 @@ vox_choose_format (struct sound_device *sd, struct sound *s) } } else - abort (); + emacs_abort (); } @@ -1138,7 +1138,7 @@ alsa_choose_format (struct sound_device *sd, struct sound *s) } } else - abort (); + emacs_abort (); } diff --git a/src/sysdep.c b/src/sysdep.c index b84e6a4ea3a..78164a8f02a 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1856,6 +1856,15 @@ snprintf (char *buf, size_t bufsize, char const *format, ...) } #endif +#ifndef HAVE_NTGUI +/* Using emacs_abort lets GDB return from a breakpoint here. */ +void +emacs_abort (void) +{ + abort (); +} +#endif + int emacs_open (const char *path, int oflag, int mode) { diff --git a/src/term.c b/src/term.c index f1a09b39cf9..8cc5dfd2a87 100644 --- a/src/term.c +++ b/src/term.c @@ -1498,7 +1498,7 @@ append_glyph (struct it *it) { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } else @@ -1695,7 +1695,7 @@ append_composite_glyph (struct it *it) { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } else @@ -1780,7 +1780,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str) { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } else @@ -2250,7 +2250,7 @@ get_named_tty (const char *name) struct terminal *t; if (!name) - abort (); + emacs_abort (); for (t = terminal_list; t; t = t->next_terminal) { @@ -2798,7 +2798,7 @@ create_tty_output (struct frame *f) struct tty_output *t = xzalloc (sizeof *t); if (! FRAME_TERMCAP_P (f)) - abort (); + emacs_abort (); t->display_info = FRAME_TERMINAL (f)->display_info.tty; @@ -2811,7 +2811,7 @@ static void tty_free_frame_resources (struct frame *f) { if (! FRAME_TERMCAP_P (f)) - abort (); + emacs_abort (); if (FRAME_FACE_CACHE (f)) free_frame_faces (f); @@ -2827,7 +2827,7 @@ static void tty_free_frame_resources (struct frame *f) { if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f)) - abort (); + emacs_abort (); if (FRAME_FACE_CACHE (f)) free_frame_faces (f); @@ -3108,7 +3108,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ #ifndef TERMINFO if (strlen (tty->termcap_term_buffer) >= buffer_size) - abort (); + emacs_abort (); buffer_size = strlen (tty->termcap_term_buffer); #endif tty->termcap_strings_buffer = area = xmalloc (buffer_size); @@ -3467,7 +3467,7 @@ maybe_fatal (int must_succeed, struct terminal *terminal, verror (str1, ap); va_end (ap); - abort (); + emacs_abort (); } void @@ -3494,7 +3494,7 @@ delete_tty (struct terminal *terminal) return; if (terminal->type != output_termcap) - abort (); + emacs_abort (); tty = terminal->display_info.tty; @@ -3508,7 +3508,7 @@ delete_tty (struct terminal *terminal) if (! p) /* This should not happen. */ - abort (); + emacs_abort (); p->next = tty->next; tty->next = 0; diff --git a/src/termchar.h b/src/termchar.h index 102fe45350e..5c57593c04f 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -207,6 +207,6 @@ extern struct tty_display_info *tty_list; (((f)->output_method == output_termcap \ || (f)->output_method == output_msdos_raw) \ ? (f)->terminal->display_info.tty \ - : (abort (), (struct tty_display_info *) 0)) + : (emacs_abort (), (struct tty_display_info *) 0)) #define CURTTY() FRAME_TTY (SELECTED_FRAME()) diff --git a/src/terminal.c b/src/terminal.c index d94164a4e40..c51a18dfa61 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -294,7 +294,7 @@ delete_terminal (struct terminal *terminal) for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal) if (! *tp) - abort (); + emacs_abort (); *tp = terminal->next_terminal; xfree (terminal->keyboard_coding); @@ -411,7 +411,7 @@ possible return values. */) case output_ns: return Qns; default: - abort (); + emacs_abort (); } } @@ -519,7 +519,7 @@ struct terminal * init_initial_terminal (void) { if (initialized || terminal_list || tty_list) - abort (); + emacs_abort (); initial_terminal = create_terminal (); initial_terminal->type = output_initial; @@ -538,7 +538,7 @@ static void delete_initial_terminal (struct terminal *terminal) { if (terminal != initial_terminal) - abort (); + emacs_abort (); delete_terminal (terminal); initial_terminal = NULL; diff --git a/src/terminfo.c b/src/terminfo.c index dce7af77bcf..ca2d89a000b 100644 --- a/src/terminfo.c +++ b/src/terminfo.c @@ -46,7 +46,7 @@ tparam (const char *string, char *outstring, int len, /* Emacs always should pass a null OUTSTRING and zero LEN. */ if (outstring || len) - abort (); + emacs_abort (); temp = tparm (string, arg1, arg2, arg3, arg4); return xstrdup (temp); diff --git a/src/tparam.c b/src/tparam.c index 9492d9dee36..58a825c90d7 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -247,7 +247,7 @@ tparam1 (const char *string, char *outstring, int len, break; default: - abort (); + emacs_abort (); } } else diff --git a/src/w32.c b/src/w32.c index fe612687f48..4505afc18b3 100644 --- a/src/w32.c +++ b/src/w32.c @@ -1273,9 +1273,9 @@ init_user_info (void) /* Ensure HOME and SHELL are defined. */ if (getenv ("HOME") == NULL) - abort (); + emacs_abort (); if (getenv ("SHELL") == NULL) - abort (); + emacs_abort (); /* Set dir and shell from environment variables. */ strcpy (dflt_passwd.pw_dir, getenv ("HOME")); @@ -1788,9 +1788,9 @@ init_environment (char ** argv) char modname[MAX_PATH]; if (!GetModuleFileName (NULL, modname, MAX_PATH)) - abort (); + emacs_abort (); if ((p = strrchr (modname, '\\')) == NULL) - abort (); + emacs_abort (); *p = 0; if ((p = strrchr (modname, '\\')) && xstrcasecmp (p, "\\bin") == 0) @@ -1902,13 +1902,13 @@ init_environment (char ** argv) /* FIXME: Do we need to resolve possible symlinks in startup_dir? Does it matter anywhere in Emacs? */ if (!GetCurrentDirectory (MAXPATHLEN, startup_dir)) - abort (); + emacs_abort (); { static char modname[MAX_PATH]; if (!GetModuleFileName (NULL, modname, MAX_PATH)) - abort (); + emacs_abort (); argv[0] = modname; } @@ -1930,7 +1930,7 @@ emacs_root_dir (void) p = getenv ("emacs_dir"); if (p == NULL) - abort (); + emacs_abort (); strcpy (root_dir, p); root_dir[parse_root (root_dir, NULL)] = '\0'; dostounix_filename (root_dir); @@ -3287,7 +3287,7 @@ generate_inode_val (const char * name) doesn't resolve aliasing due to subst commands, or recognize hard links. */ if (!w32_get_long_filename ((char *)name, fullname, MAX_PATH)) - abort (); + emacs_abort (); parse_root (fullname, &p); /* Normal W32 filesystems are still case insensitive. */ @@ -5587,7 +5587,7 @@ socket_to_fd (SOCKET s) if (fd_info[ fd ].cp != NULL) { DebPrint (("sys_socket: fd_info[%d] apparently in use!\n", fd)); - abort (); + emacs_abort (); } fd_info[ fd ].cp = cp; @@ -5966,7 +5966,7 @@ sys_close (int fd) { if (fd_info[fd].flags & FILE_SOCKET) { - if (winsock_lib == NULL) abort (); + if (winsock_lib == NULL) emacs_abort (); pfn_shutdown (SOCK_HANDLE (fd), 2); rc = pfn_closesocket (SOCK_HANDLE (fd)); @@ -6084,7 +6084,7 @@ _sys_read_ahead (int fd) || (fd_info[fd].flags & FILE_READ) == 0) { DebPrint (("_sys_read_ahead: internal error: fd %d is not a pipe, serial port, or socket!\n", fd)); - abort (); + emacs_abort (); } cp->status = STATUS_READ_IN_PROGRESS; @@ -6220,7 +6220,7 @@ sys_read (int fd, char * buffer, unsigned int count) /* re-read CR carried over from last read */ if (fd_info[fd].flags & FILE_LAST_CR) { - if (fd_info[fd].flags & FILE_BINARY) abort (); + if (fd_info[fd].flags & FILE_BINARY) emacs_abort (); *buffer++ = 0x0d; count--; nchars++; @@ -6323,7 +6323,7 @@ sys_read (int fd, char * buffer, unsigned int count) } else /* FILE_SOCKET */ { - if (winsock_lib == NULL) abort (); + if (winsock_lib == NULL) emacs_abort (); /* do the equivalent of a non-blocking read */ pfn_ioctlsocket (SOCK_HANDLE (fd), FIONREAD, &waiting); @@ -6474,7 +6474,7 @@ sys_write (int fd, const void * buffer, unsigned int count) else if (fd < MAXDESC && fd_info[fd].flags & FILE_SOCKET) { unsigned long nblock = 0; - if (winsock_lib == NULL) abort (); + if (winsock_lib == NULL) emacs_abort (); /* TODO: implement select() properly so non-blocking I/O works. */ /* For now, make sure the write blocks. */ @@ -6640,8 +6640,7 @@ check_windows_init_file (void) buffer, "Emacs Abort Dialog", MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); - /* Use the low-level Emacs abort. */ -#undef abort + /* Use the low-level system abort. */ abort (); } else diff --git a/src/w32fns.c b/src/w32fns.c index 5a1b6dfabab..ec1acbd89d9 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -2280,7 +2280,7 @@ w32_msg_pump (deferred_msg * msg_buf) CoInitialize (NULL); w32_createwindow ((struct frame *) msg.wParam); if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) - abort (); + emacs_abort (); break; case WM_EMACS_SETLOCALE: SetThreadLocale (msg.wParam); @@ -2290,7 +2290,7 @@ w32_msg_pump (deferred_msg * msg_buf) result = (int) ActivateKeyboardLayout ((HKL) msg.wParam, 0); if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, result, 0)) - abort (); + emacs_abort (); break; case WM_EMACS_REGISTER_HOT_KEY: focus_window = GetFocus (); @@ -2311,7 +2311,7 @@ w32_msg_pump (deferred_msg * msg_buf) GC. */ XSETCAR ((Lisp_Object) ((EMACS_INT) msg.lParam), Qnil); if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) - abort (); + emacs_abort (); break; case WM_EMACS_TOGGLE_LOCK_KEY: { @@ -2343,7 +2343,7 @@ w32_msg_pump (deferred_msg * msg_buf) } if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, cur_state, 0)) - abort (); + emacs_abort (); } break; #ifdef MSG_DEBUG @@ -2398,11 +2398,11 @@ send_deferred_msg (deferred_msg * msg_buf, { /* Only input thread can send deferred messages. */ if (GetCurrentThreadId () != dwWindowsThreadId) - abort (); + emacs_abort (); /* It is an error to send a message that is already deferred. */ if (find_deferred_msg (hwnd, msg) != NULL) - abort (); + emacs_abort (); /* Enforced synchronization is not needed because this is the only function that alters deferred_msg_head, and the following critical @@ -2475,7 +2475,7 @@ w32_msg_worker (void *arg) PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE); if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) - abort (); + emacs_abort (); memset (&dummy_buf, 0, sizeof (dummy_buf)); dummy_buf.w32msg.msg.hwnd = NULL; @@ -3136,7 +3136,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) msg = WM_MBUTTONUP; button_state &= ~MMOUSE; - if (button_state) abort (); + if (button_state) emacs_abort (); } else return 0; @@ -3367,7 +3367,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) /* Detect if message has already been deferred; in this case we cannot return any sensible value to ignore this. */ if (find_deferred_msg (hwnd, msg) != NULL) - abort (); + emacs_abort (); menubar_in_use = 1; @@ -3842,7 +3842,7 @@ my_create_window (struct frame * f) MSG msg; if (!PostThreadMessage (dwWindowsThreadId, WM_EMACS_CREATEWINDOW, (WPARAM)f, 0)) - abort (); + emacs_abort (); GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); } @@ -6287,7 +6287,7 @@ w32_parse_hot_key (Lisp_Object key) lisp_modifiers = XINT (Fcar (Fcdr (c))); c = Fcar (c); if (!SYMBOLP (c)) - abort (); + emacs_abort (); vk_code = lookup_vk_code (SDATA (SYMBOL_NAME (c))); } else if (INTEGERP (c)) @@ -7194,10 +7194,8 @@ globals_of_w32fns (void) syms_of_w32uniscribe (); } -#undef abort - void -w32_abort (void) +emacs_abort (void) { int button; button = MessageBox (NULL, diff --git a/src/w32menu.c b/src/w32menu.c index 3aa4c8bc96d..d4de73a0de7 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -820,7 +820,7 @@ w32_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, else if (EQ (type, QCradio)) wv->button_type = BUTTON_TYPE_RADIO; else - abort (); + emacs_abort (); wv->selected = !NILP (selected); diff --git a/src/w32proc.c b/src/w32proc.c index 33aed5eb8e3..f83e81aedff 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -176,7 +176,7 @@ delete_child (child_process *cp) /* Should not be deleting a child that is still needed. */ for (i = 0; i < MAXDESC; i++) if (fd_info[i].cp == cp) - abort (); + emacs_abort (); if (!CHILD_ACTIVE (cp)) return; @@ -316,7 +316,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app, DWORD flags; char dir[ MAXPATHLEN ]; - if (cp == NULL) abort (); + if (cp == NULL) emacs_abort (); memset (&start, 0, sizeof (start)); start.cb = sizeof (start); @@ -405,7 +405,7 @@ register_child (int pid, int fd) if (fd_info[fd].cp != NULL) { DebPrint (("register_child: fd_info[%d] apparently in use!\n", fd)); - abort (); + emacs_abort (); } fd_info[fd].cp = cp; @@ -459,7 +459,7 @@ sys_wait (int *status) /* We want to wait for a specific child */ wait_hnd[nh] = dead_child->procinfo.hProcess; cps[nh] = dead_child; - if (!wait_hnd[nh]) abort (); + if (!wait_hnd[nh]) emacs_abort (); nh++; active = 0; goto get_result; @@ -507,7 +507,7 @@ sys_wait (int *status) active -= WAIT_ABANDONED_0; } else - abort (); + emacs_abort (); get_result: if (!GetExitCodeProcess (wait_hnd[active], &retval)) @@ -1189,7 +1189,7 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, #endif wait_hnd[nh] = cp->char_avail; fdindex[nh] = i; - if (!wait_hnd[nh]) abort (); + if (!wait_hnd[nh]) emacs_abort (); nh++; #ifdef FULL_DEBUG DebPrint (("select waiting on child %d fd %d\n", @@ -1276,7 +1276,7 @@ count_children: active -= WAIT_ABANDONED_0; } else - abort (); + emacs_abort (); /* Loop over all handles after active (now officially documented as being the first signaled handle in the array). We do this to diff --git a/src/w32select.c b/src/w32select.c index 59ff4405368..3fb88d4f17f 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -394,7 +394,7 @@ run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg) BLOCK_INPUT; - /* Fsignal calls abort() if it sees that waiting_for_input is + /* Fsignal calls emacs_abort () if it sees that waiting_for_input is set. */ owfi = waiting_for_input; waiting_for_input = 0; diff --git a/src/w32term.c b/src/w32term.c index 6948a98998e..571db3cbe8e 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2426,7 +2426,7 @@ x_draw_glyph_string (struct glyph_string *s) break; default: - abort (); + emacs_abort (); } if (!s->for_overlaps) @@ -2626,7 +2626,7 @@ x_delete_glyphs (struct frame *f, register int n) if (! FRAME_W32_P (f)) return; - abort (); + emacs_abort (); } @@ -2709,7 +2709,7 @@ x_ins_del_lines (struct frame *f, int vpos, int n) if (! FRAME_W32_P (f)) return; - abort (); + emacs_abort (); } @@ -3431,7 +3431,7 @@ x_window_to_scroll_bar (Window window_id) frame = XCAR (tail); /* All elements of Vframe_list should be frames. */ if (! FRAMEP (frame)) - abort (); + emacs_abort (); /* Scan this frame's scroll bar list for a scroll bar with the right window ID. */ @@ -3854,7 +3854,7 @@ w32_redeem_scroll_bar (struct window *window) /* We can't redeem this window's scroll bar if it doesn't have one. */ if (NILP (window->vertical_scroll_bar)) - abort (); + emacs_abort (); bar = XSCROLL_BAR (window->vertical_scroll_bar); @@ -3873,7 +3873,7 @@ w32_redeem_scroll_bar (struct window *window) else /* If its prev pointer is nil, it must be at the front of one or the other! */ - abort (); + emacs_abort (); } else XSCROLL_BAR (bar->prev)->next = bar->next; @@ -3928,7 +3928,7 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, struct input_event *emacs_event) { if (! WINDOWP (bar->window)) - abort (); + emacs_abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->code = 0; @@ -5233,7 +5233,7 @@ w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, break; default: - abort (); + emacs_abort (); } } } diff --git a/src/w32xfns.c b/src/w32xfns.c index 62e45dd987b..820dbcc76c6 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -122,7 +122,7 @@ get_frame_dc (FRAME_PTR f) HDC hdc; if (f->output_method != output_w32) - abort (); + emacs_abort (); enter_crit (); diff --git a/src/widget.c b/src/widget.c index ea9bdb61b13..9eaf6d1df6a 100644 --- a/src/widget.c +++ b/src/widget.c @@ -226,7 +226,7 @@ get_wm_shell (Widget w) static void mark_shell_size_user_specified (Widget wmshell) { - if (! XtIsWMShell (wmshell)) abort (); + if (! XtIsWMShell (wmshell)) emacs_abort (); /* This is kind of sleazy, but I can't see how else to tell it to make it mark the WM_SIZE_HINTS size as user specified when appropriate. */ ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize; @@ -290,7 +290,7 @@ set_frame_size (EmacsFrame ew) Widget wmshell = get_wm_shell ((Widget) ew); /* Each Emacs shell is now independent and top-level. */ - if (! XtIsSubclass (wmshell, shellWidgetClass)) abort (); + if (! XtIsSubclass (wmshell, shellWidgetClass)) emacs_abort (); /* We don't need this for the moment. The geometry is computed in xfns.c. */ @@ -677,8 +677,8 @@ EmacsFrameDestroy (Widget widget) EmacsFrame ew = (EmacsFrame) widget; struct frame* s = ew->emacs_frame.frame; - if (! s) abort (); - if (! s->output_data.x) abort (); + if (! s) emacs_abort (); + if (! s->output_data.x) emacs_abort (); BLOCK_INPUT; x_free_gcs (s); diff --git a/src/window.c b/src/window.c index 38124cb13a9..08608e0d451 100644 --- a/src/window.c +++ b/src/window.c @@ -386,7 +386,7 @@ the first window of that frame. */) else if (! NILP (XWINDOW (window)->vchild)) window = XWINDOW (window)->vchild; else - abort (); + emacs_abort (); } return window; @@ -1289,7 +1289,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ return Qnil; default: - abort (); + emacs_abort (); } } @@ -1948,7 +1948,7 @@ unshow_buffer (register struct window *w) buf = w->buffer; b = XBUFFER (buf); if (b != XMARKER (w->pointm)->buffer) - abort (); + emacs_abort (); #if 0 if (w == XWINDOW (selected_window) @@ -2669,7 +2669,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame case CHECK_ALL_WINDOWS: if (! NILP (w->buffer) && NILP (BVAR (XBUFFER (w->buffer), name))) - abort (); + emacs_abort (); break; case WINDOW_LOOP_UNUSED: diff --git a/src/xdisp.c b/src/xdisp.c index 86f041dea4d..f543a96d6b3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7306,7 +7306,7 @@ set_iterator_to_next (struct it *it, int reseat_p) default: /* There are no other methods defined, so this should be a bug. */ - abort (); + emacs_abort (); } eassert (it->method != GET_FROM_STRING @@ -7761,7 +7761,7 @@ compute_stop_pos_backwards (struct it *it) compute_stop_pos (it); /* We must advance forward, right? */ if (it->stop_charpos <= charpos) - abort (); + emacs_abort (); } while (charpos > BEGV && it->stop_charpos >= it->end_charpos); @@ -7810,7 +7810,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos) compute_stop_pos (it); /* We must advance forward, right? */ if (it->stop_charpos <= it->prev_stop) - abort (); + emacs_abort (); charpos = it->stop_charpos; } while (charpos <= where_we_are); @@ -8898,7 +8898,7 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos break; default: - abort (); + emacs_abort (); } /* Reset/increment for the next run. */ @@ -10532,7 +10532,7 @@ void check_message_stack (void) { if (!NILP (Vmessage_stack)) - abort (); + emacs_abort (); } @@ -14415,7 +14415,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, for (g = row->glyphs[TEXT_AREA], x = row->x; g < glyph; g++) { if (g >= row->glyphs[TEXT_AREA] + row->used[TEXT_AREA]) - abort (); + emacs_abort (); x += g->pixel_width; } } @@ -14536,7 +14536,7 @@ run_window_scroll_functions (Lisp_Object window, struct text_pos startp) SET_MARKER_FROM_TEXT_POS (w->start, startp); if (current_buffer != XBUFFER (w->buffer)) - abort (); + emacs_abort (); if (!NILP (Vwindow_scroll_functions)) { @@ -15505,9 +15505,9 @@ redisplay_window (Lisp_Object window, int just_this_one_p) /* Some sanity checks. */ CHECK_WINDOW_END (w); if (Z == Z_BYTE && CHARPOS (opoint) != BYTEPOS (opoint)) - abort (); + emacs_abort (); if (BYTEPOS (opoint) < CHARPOS (opoint)) - abort (); + emacs_abort (); /* If %c is in mode line, update it if needed. */ if (!NILP (w->column_number_displayed) @@ -15719,7 +15719,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) goto try_to_scroll; default: - abort (); + emacs_abort (); } } /* If current starting point was originally the beginning of a line @@ -15882,7 +15882,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) break; default: - abort (); + emacs_abort (); } } @@ -17330,7 +17330,7 @@ try_window_id (struct window *w) if (row) set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); else - abort (); + emacs_abort (); return 1; } } @@ -17374,7 +17374,7 @@ try_window_id (struct window *w) if (row) set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); else - abort (); + emacs_abort (); return 2; } } @@ -17863,7 +17863,7 @@ try_window_id (struct window *w) IF_DEBUG (debug_method_add (w, "C")); } else - abort (); + emacs_abort (); IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos); debug_end_vpos = XFASTINT (w->window_end_vpos)); @@ -19240,7 +19240,7 @@ find_row_edges (struct it *it, struct glyph_row *row, /* A line that is entirely from a string/image/stretch... */ row->maxpos = row->minpos; else - abort (); + emacs_abort (); } else row->maxpos = it->current.pos; @@ -20081,7 +20081,7 @@ See also `bidi-paragraph-direction'. */) return Qright_to_left; break; default: - abort (); + emacs_abort (); } } } @@ -21994,7 +21994,7 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st { /* Glyph is off the left margin of the display area. Should not happen. */ - abort (); + emacs_abort (); } row->ascent = max (row->ascent, it->max_ascent); @@ -23359,7 +23359,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p) break; \ \ default: \ - abort (); \ + emacs_abort (); \ } \ \ if (s) \ @@ -23700,7 +23700,7 @@ append_glyph (struct it *it) { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } else @@ -23774,7 +23774,7 @@ append_composite_glyph (struct it *it) { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } ++it->glyph_row->used[area]; @@ -23953,7 +23953,7 @@ produce_image_glyph (struct it *it) { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } ++it->glyph_row->used[area]; @@ -24014,7 +24014,7 @@ append_stretch_glyph (struct it *it, Lisp_Object object, { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } else @@ -24269,7 +24269,7 @@ produce_special_glyphs (struct it *it, enum display_element_type what) } } else - abort (); + emacs_abort (); #ifdef HAVE_WINDOW_SYSTEM /* On a GUI frame, when the right fringe (left fringe for R2L rows) @@ -24466,7 +24466,7 @@ append_glyphless_glyph (struct it *it, int face_id, int for_no_font, int len, { glyph->resolved_level = it->bidi_it.resolved_level; if ((it->bidi_it.type & 7) != it->bidi_it.type) - abort (); + emacs_abort (); glyph->bidi_type = it->bidi_it.type; } ++it->glyph_row->used[area]; diff --git a/src/xfaces.c b/src/xfaces.c index 4df5caf6f2a..aee5158036f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -510,7 +510,7 @@ unregister_color (unsigned long pixel) if (color_count[pixel] > 0) --color_count[pixel]; else - abort (); + emacs_abort (); } @@ -727,7 +727,7 @@ init_frame_faces (struct frame *f) if (!FRAME_NS_P (f) || FRAME_NS_WINDOW (f)) #endif if (!realize_basic_faces (f)) - abort (); + emacs_abort (); } @@ -771,7 +771,7 @@ recompute_basic_faces (struct frame *f) { clear_face_cache (0); if (!realize_basic_faces (f)) - abort (); + emacs_abort (); } } @@ -1108,7 +1108,7 @@ defined_color (struct frame *f, const char *color_name, XColor *color_def, return ns_defined_color (f, color_name, color_def, alloc, 1); #endif else - abort (); + emacs_abort (); } @@ -1304,7 +1304,7 @@ load_color (struct frame *f, struct face *face, Lisp_Object name, break; default: - abort (); + emacs_abort (); } } #ifdef GLYPH_DEBUG @@ -4548,7 +4548,7 @@ lookup_named_face (struct frame *f, Lisp_Object symbol, int signal_p) return -1; default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); if (default_face == NULL) - abort (); /* realize_basic_faces must have set it up */ + emacs_abort (); /* realize_basic_faces must have set it up */ } if (! get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0)) @@ -4591,7 +4591,7 @@ lookup_basic_face (struct frame *f, int face_id) case MENU_FACE_ID: name = Qmenu; break; default: - abort (); /* the caller is supposed to pass us a basic face id */ + emacs_abort (); /* the caller is supposed to pass us a basic face id */ } /* Do a quick scan through Vface_remapping_alist, and return immediately @@ -4712,7 +4712,7 @@ lookup_derived_face (struct frame *f, Lisp_Object symbol, int face_id, struct face *default_face = FACE_FROM_ID (f, face_id); if (!default_face) - abort (); + emacs_abort (); if (!get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0)) return -1; @@ -5102,7 +5102,7 @@ face for italic. */) error ("Cannot realize default face"); def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); if (def_face == NULL) - abort (); /* realize_basic_faces must have set it up */ + emacs_abort (); /* realize_basic_faces must have set it up */ } /* Dispatch to the appropriate handler. */ @@ -5387,7 +5387,7 @@ realize_default_face (struct frame *f) else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) ASET (lface, LFACE_FOREGROUND_INDEX, build_string (unspecified_fg)); else - abort (); + emacs_abort (); } if (UNSPECIFIEDP (LFACE_BACKGROUND (lface))) @@ -5402,7 +5402,7 @@ realize_default_face (struct frame *f) else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) ASET (lface, LFACE_BACKGROUND_INDEX, build_string (unspecified_bg)); else - abort (); + emacs_abort (); } if (UNSPECIFIEDP (LFACE_STIPPLE (lface))) @@ -5502,7 +5502,7 @@ realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id) face = make_realized_face (attrs); } else - abort (); + emacs_abort (); /* Insert the new face. */ cache_face (cache, face, lface_hash (attrs)); @@ -5597,7 +5597,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object *attrs) if (default_face) fontset = default_face->fontset; if (fontset == -1) - abort (); + emacs_abort (); } if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) attrs[LFACE_FONT_INDEX] diff --git a/src/xmenu.c b/src/xmenu.c index 54a7849218a..6f92da1b814 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -169,7 +169,7 @@ mouse_position_for_popup (FRAME_PTR f, int *x, int *y) int dummy; if (! FRAME_X_P (f)) - abort (); + emacs_abort (); BLOCK_INPUT; @@ -636,7 +636,7 @@ void x_activate_menubar (FRAME_PTR f) { if (! FRAME_X_P (f)) - abort (); + emacs_abort (); if (!f->output_data.x->saved_menu_event->type) return; @@ -852,7 +852,7 @@ update_frame_menubar (FRAME_PTR f) int columns, rows; if (! FRAME_X_P (f)) - abort (); + emacs_abort (); x = f->output_data.x; @@ -940,7 +940,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) int *submenu_top_level_items, *submenu_n_panes; if (! FRAME_X_P (f)) - abort (); + emacs_abort (); menubar_widget = f->output_data.x->menubar_widget; @@ -1299,7 +1299,7 @@ free_frame_menubar (FRAME_PTR f) Widget menubar_widget; if (! FRAME_X_P (f)) - abort (); + emacs_abort (); menubar_widget = f->output_data.x->menubar_widget; @@ -1450,7 +1450,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, #endif if (! FRAME_X_P (f)) - abort (); + emacs_abort (); xg_crazy_callback_abort = 1; menu = xg_create_widget ("popup", first_wv->name, f, first_wv, @@ -1557,7 +1557,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, Widget menu; if (! FRAME_X_P (f)) - abort (); + emacs_abort (); #ifdef USE_LUCID apply_systemfont_to_menu (f, f->output_data.x->widget); @@ -1646,7 +1646,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, ptrdiff_t specpdl_count = SPECPDL_INDEX (); if (! FRAME_X_P (f)) - abort (); + emacs_abort (); *error_name = NULL; @@ -1792,7 +1792,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, else if (EQ (type, QCradio)) wv->button_type = BUTTON_TYPE_RADIO; else - abort (); + emacs_abort (); wv->selected = !NILP (selected); @@ -1930,7 +1930,7 @@ create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) GtkWidget *menu; if (! FRAME_X_P (f)) - abort (); + emacs_abort (); menu = xg_create_widget ("dialog", first_wv->name, f, first_wv, G_CALLBACK (dialog_selection_callback), @@ -1977,7 +1977,7 @@ create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) LWLIB_ID dialog_id; if (!FRAME_X_P (f)) - abort (); + emacs_abort (); dialog_id = widget_id_tick++; #ifdef USE_LUCID @@ -2036,7 +2036,7 @@ xdialog_show (FRAME_PTR f, ptrdiff_t specpdl_count = SPECPDL_INDEX (); if (! FRAME_X_P (f)) - abort (); + emacs_abort (); *error_name = NULL; @@ -2301,7 +2301,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, ptrdiff_t specpdl_count = SPECPDL_INDEX (); if (! FRAME_X_P (f) && ! FRAME_MSDOS_P (f)) - abort (); + emacs_abort (); *error_name = 0; if (menu_items_n_panes == 0) diff --git a/src/xselect.c b/src/xselect.c index 463bd6e37b0..5a3b7452c6d 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -193,7 +193,7 @@ static void x_start_queuing_selection_requests (void) { if (x_queue_selection_requests) - abort (); + emacs_abort (); x_queue_selection_requests++; TRACE1 ("x_start_queuing_selection_requests %d", x_queue_selection_requests); @@ -245,7 +245,7 @@ symbol_to_x_atom (struct x_display_info *dpyinfo, Lisp_Object sym) if (EQ (sym, QEMACS_TMP)) return dpyinfo->Xatom_EMACS_TMP; if (EQ (sym, QTARGETS)) return dpyinfo->Xatom_TARGETS; if (EQ (sym, QNULL)) return dpyinfo->Xatom_NULL; - if (!SYMBOLP (sym)) abort (); + if (!SYMBOLP (sym)) emacs_abort (); TRACE1 (" XInternAtom %s", SSDATA (SYMBOL_NAME (sym))); BLOCK_INPUT; @@ -1138,7 +1138,7 @@ wait_for_property_change (struct prop_location *location) ptrdiff_t count = SPECPDL_INDEX (); if (property_change_reply_object) - abort (); + emacs_abort (); /* Make sure to do unexpect_property_change if we quit or err. */ record_unwind_protect (wait_for_property_change_unwind, diff --git a/src/xterm.c b/src/xterm.c index f497b5322bf..047b5569bf4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1467,7 +1467,7 @@ x_frame_of_widget (Widget widget) && f->output_data.x->widget == widget) return f; - abort (); + emacs_abort (); } /* Allocate a color which is lighter or darker than *PIXEL by FACTOR @@ -2696,7 +2696,7 @@ x_draw_underwave (struct glyph_string *s) y2 += dy; if (INT_MAX - dx < xmax) - abort (); + emacs_abort (); while (x1 <= xmax) { @@ -2805,7 +2805,7 @@ x_draw_glyph_string (struct glyph_string *s) break; default: - abort (); + emacs_abort (); } if (!s->for_overlaps) @@ -3005,7 +3005,7 @@ x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, static void x_delete_glyphs (struct frame *f, register int n) { - abort (); + emacs_abort (); } @@ -3278,7 +3278,7 @@ XTset_terminal_window (struct frame *f, int n) static void x_ins_del_lines (struct frame *f, int vpos, int n) { - abort (); + emacs_abort (); } @@ -4115,7 +4115,7 @@ x_window_to_scroll_bar (Display *display, Window window_id) frame = XCAR (tail); /* All elements of Vframe_list should be frames. */ if (! FRAMEP (frame)) - abort (); + emacs_abort (); if (! FRAME_X_P (XFRAME (frame))) continue; @@ -5434,7 +5434,7 @@ XTredeem_scroll_bar (struct window *window) /* We can't redeem this window's scroll bar if it doesn't have one. */ if (NILP (window->vertical_scroll_bar)) - abort (); + emacs_abort (); bar = XSCROLL_BAR (window->vertical_scroll_bar); @@ -5453,7 +5453,7 @@ XTredeem_scroll_bar (struct window *window) else /* If its prev pointer is nil, it must be at the front of one or the other! */ - abort (); + emacs_abort (); } else XSCROLL_BAR (bar->prev)->next = bar->next; @@ -5551,7 +5551,7 @@ static void x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event) { if (! WINDOWP (bar->window)) - abort (); + emacs_abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->code = event->xbutton.button - Button1; @@ -6457,7 +6457,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, } else if (status_return != XLookupKeySym && status_return != XLookupBoth) - abort (); + emacs_abort (); } else nbytes = XLookupString (&event.xkey, (char *) copy_bufptr, @@ -7496,7 +7496,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int break; default: - abort (); + emacs_abort (); } } @@ -7849,7 +7849,7 @@ When compiled with GTK, Emacs cannot recover from X disconnects.\n\ This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ For details, see etc/PROBLEMS.\n", error_msg); - abort (); + emacs_abort (); #endif /* USE_GTK */ /* Indicate that this display is dead. */ @@ -7859,7 +7859,7 @@ For details, see etc/PROBLEMS.\n", dpyinfo->terminal->reference_count--; if (dpyinfo->reference_count != 0) /* We have just closed all frames on this display. */ - abort (); + emacs_abort (); { Lisp_Object tmp; @@ -10436,7 +10436,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) to.addr = (XPointer)&font; x_catch_errors (dpy); if (!XtCallConverter (dpy, XtCvtStringToFont, &d, 1, &fr, &to, NULL)) - abort (); + emacs_abort (); if (x_had_errors_p (dpy) || !XQueryFont (dpy, font)) XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15"); x_uncatch_errors (); From 972debf2e7381b4fd2c70f9c1fd585d8bd137917 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 4 Sep 2012 13:40:25 -0400 Subject: [PATCH 026/216] Macro-expand interpreted code during load. * src/lread.c (readevalloop): Call internal-macroexpand-for-load to perform eager (load-time) macro-expansion. * src/lisp.mk (lisp): Add macroexp. * lisp/loadup.el: Load macroexp. Remove hack. * lisp/emacs-lisp/macroexp.el (macroexp--eval-if-compile): New function. (macroexp--expand-all): Use it to get better warnings. (macroexp--backtrace, macroexp--trim-backtrace-frame) (internal-macroexpand-for-load): New functions. (macroexp--pending-eager-loads): New var. (emacs-startup-hook): New hack to replace one in loadup.el. * lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-list*) (cl--compiler-macro-cXXr): Move to top, before they can be used. (cl-psetf): Simplify. (cl-defstruct): Add indent rule. --- etc/NEWS | 7 +++ lisp/ChangeLog | 24 +++++-- lisp/emacs-lisp/cl-loaddefs.el | 28 +++++---- lisp/emacs-lisp/cl-macs.el | 56 +++++++++-------- lisp/emacs-lisp/macroexp.el | 110 ++++++++++++++++++++++++++++++--- lisp/emacs-lisp/pcase.el | 2 + lisp/loadup.el | 28 ++++----- src/ChangeLog | 6 ++ src/lisp.mk | 1 + src/lread.c | 13 ++++ 10 files changed, 206 insertions(+), 69 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 16e078fa639..e4a612f6a9e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -601,6 +601,13 @@ are deprecated and will be removed eventually. * Lisp changes in Emacs 24.3 +** Interpreted files get eagerly macro-expanded during load. +This can significantly speed up execution of non-byte-compiled code, but can +also bump into harmless and previously unnoticed cyclic dependencies. +These should not be fatal: they will simply cause the macro-calls to be left +for later expansion (as before), but will also result in a warning describing +the cycle. + ** New minor mode `read-only-mode' to replace toggle-read-only (now obsolete). ** New functions `autoloadp' and `autoload-do-load'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4707834fe6b..64dda45276c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2012-09-04 Stefan Monnier + + * loadup.el: Load macroexp. Remove hack. + * emacs-lisp/macroexp.el (macroexp--eval-if-compile): New function. + (macroexp--expand-all): Use it to get better warnings. + (macroexp--backtrace, macroexp--trim-backtrace-frame) + (internal-macroexpand-for-load): New functions. + (macroexp--pending-eager-loads): New var. + (emacs-startup-hook): New hack to replace one in loadup.el. + * emacs-lisp/cl-macs.el (cl--compiler-macro-list*) + (cl--compiler-macro-cXXr): Move to top, before they can be used. + (cl-psetf): Simplify. + (cl-defstruct): Add indent rule. + 2012-09-04 Lars Ingebrigtsen * mail/smtpmail.el (smtpmail-send-it): Prefer the From: header @@ -21,10 +35,8 @@ (temp-buffer-window-show-hook): New hooks. (temp-buffer-window-setup, temp-buffer-window-show) (with-temp-buffer-window): New functions. - (fit-window-to-buffer): Remove unused optional argument - OVERRIDE. - (special-display-popup-frame): Make sure the window used shows - BUFFER. + (fit-window-to-buffer): Remove unused optional argument OVERRIDE. + (special-display-popup-frame): Make sure the window used shows BUFFER. * help.el (temp-buffer-resize-mode): Fix doc-string. (resize-temp-buffer-window): New optional argument WINDOW. @@ -166,8 +178,8 @@ 2012-08-29 Michael Albinus * eshell/esh-ext.el (eshell-external-command): Do not examine - remote shell scripts. See - . + remote shell scripts. + See . * net/tramp-sh.el (tramp-remote-path): Add "/sbin" and "/usr/local/sbin". diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 470ca17d3a0..7d70d22c9cd 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -249,8 +249,7 @@ Remove from SYMBOL's plist the property PROPNAME and its value. ;;;*** -;;;### (autoloads (cl--compiler-macro-cXXr cl--compiler-macro-list* -;;;;;; cl--compiler-macro-adjoin cl-defsubst cl-compiler-macroexpand +;;;### (autoloads (cl--compiler-macro-adjoin cl-defsubst cl-compiler-macroexpand ;;;;;; cl-define-compiler-macro cl-assert cl-check-type cl-typep ;;;;;; cl-deftype cl-defstruct cl-callf2 cl-callf cl-letf* cl-letf ;;;;;; cl-rotatef cl-shiftf cl-remf cl-psetf cl-declare cl-the cl-locally @@ -260,9 +259,20 @@ Remove from SYMBOL's plist the property PROPNAME and its value. ;;;;;; cl-do cl-loop cl-return-from cl-return cl-block cl-etypecase ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp -;;;;;; cl-gensym) "cl-macs" "cl-macs.el" "9676d5517e8b9246c09fe78984c68bef") +;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) +;;;;;; "cl-macs" "cl-macs.el" "e09b4be5072a8b52d40af6e073876e76") ;;; Generated autoloads from cl-macs.el +(autoload 'cl--compiler-macro-list* "cl-macs" "\ + + +\(fn FORM ARG &rest OTHERS)" nil nil) + +(autoload 'cl--compiler-macro-cXXr "cl-macs" "\ + + +\(fn FORM X)" nil nil) + (autoload 'cl-gensym "cl-macs" "\ Generate a new uninterned symbol. The name is made by appending a number to PREFIX, default \"G\". @@ -659,6 +669,8 @@ value, that slot cannot be set via `setf'. (put 'cl-defstruct 'doc-string-elt '2) +(put 'cl-defstruct 'lisp-indent-function '1) + (autoload 'cl-deftype "cl-macs" "\ Define NAME as a new data type. The type name can then be used in `cl-typecase', `cl-check-type', etc. @@ -722,16 +734,6 @@ surrounded by (cl-block NAME ...). \(fn FORM A LIST &rest KEYS)" nil nil) -(autoload 'cl--compiler-macro-list* "cl-macs" "\ - - -\(fn FORM ARG &rest OTHERS)" nil nil) - -(autoload 'cl--compiler-macro-cXXr "cl-macs" "\ - - -\(fn FORM X)" nil nil) - ;;;*** ;;;### (autoloads (cl-tree-equal cl-nsublis cl-sublis cl-nsubst-if-not diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 9a59aa0c6db..aba412cc8f5 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -58,6 +58,33 @@ ;;; Initialization. +;; Place compiler macros at the beginning, otherwise uses of the corresponding +;; functions can lead to recursive-loads that prevent the calls from +;; being optimized. + +;;;###autoload +(defun cl--compiler-macro-list* (_form arg &rest others) + (let* ((args (reverse (cons arg others))) + (form (car args))) + (while (setq args (cdr args)) + (setq form `(cons ,(car args) ,form))) + form)) + +;;;###autoload +(defun cl--compiler-macro-cXXr (form x) + (let* ((head (car form)) + (n (symbol-name (car form))) + (i (- (length n) 2))) + (if (not (string-match "c[ad]+r\\'" n)) + (if (and (fboundp head) (symbolp (symbol-function head))) + (cl--compiler-macro-cXXr (cons (symbol-function head) (cdr form)) + x) + (error "Compiler macro for cXXr applied to non-cXXr form")) + (while (> i (match-beginning 0)) + (setq x (list (if (eq (aref n i) ?a) 'car 'cdr) x)) + (setq i (1- i))) + x))) + ;;; Some predicates for analyzing Lisp forms. ;; These are used by various ;; macro expanders to optimize the results in certain common cases. @@ -1905,8 +1932,6 @@ See Info node `(cl)Declarations' for details." (cl-do-proclaim (pop specs) nil))) nil) - - ;;; The standard modify macros. ;; `setf' is now part of core Elisp, defined in gv.el. @@ -1929,7 +1954,7 @@ before assigning any PLACEs to the corresponding values. (or p (error "Odd number of arguments to cl-psetf")) (pop p)) (if simple - `(progn (setf ,@args) nil) + `(progn (setq ,@args) nil) (setq args (reverse args)) (let ((expr `(setf ,(cadr args) ,(car args)))) (while (setq args (cddr args)) @@ -2119,7 +2144,7 @@ one keyword is supported, `:read-only'. If this has a non-nil value, that slot cannot be set via `setf'. \(fn NAME SLOTS...)" - (declare (doc-string 2) + (declare (doc-string 2) (indent 1) (debug (&define ;Makes top-level form not be wrapped. [&or symbolp @@ -2597,14 +2622,6 @@ surrounded by (cl-block NAME ...). `(if (cl-member ,a ,list ,@keys) ,list (cons ,a ,list)) form)) -;;;###autoload -(defun cl--compiler-macro-list* (_form arg &rest others) - (let* ((args (reverse (cons arg others))) - (form (car args))) - (while (setq args (cdr args)) - (setq form `(cons ,(car args) ,form))) - form)) - (defun cl--compiler-macro-get (_form sym prop &optional def) (if def `(cl-getf (symbol-plist ,sym) ,prop ,def) @@ -2616,21 +2633,6 @@ surrounded by (cl-block NAME ...). (cl--make-type-test temp (cl--const-expr-val type))) form)) -;;;###autoload -(defun cl--compiler-macro-cXXr (form x) - (let* ((head (car form)) - (n (symbol-name (car form))) - (i (- (length n) 2))) - (if (not (string-match "c[ad]+r\\'" n)) - (if (and (fboundp head) (symbolp (symbol-function head))) - (cl--compiler-macro-cXXr (cons (symbol-function head) (cdr form)) - x) - (error "Compiler macro for cXXr applied to non-cXXr form")) - (while (> i (match-beginning 0)) - (setq x (list (if (eq (aref n i) ?a) 'car 'cdr) x)) - (setq i (1- i))) - x))) - (dolist (y '(cl-first cl-second cl-third cl-fourth cl-fifth cl-sixth cl-seventh cl-eighth cl-ninth cl-tenth diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 70eab149837..394225d697e 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -100,6 +100,17 @@ each clause." (error (message "Compiler-macro error for %S: %S" (car form) err) form))) +(defun macroexp--eval-if-compile (&rest _forms) + "Pseudo function used internally by macroexp to delay warnings. +The purpose is to delay warnings to bytecomp.el, so they can use things +like `byte-compile-log-warning' to get better file-and-line-number data +and also to avoid outputting the warning during normal execution." + nil) +(put 'macroexp--eval-if-compile 'byte-compile + (lambda (form) + (mapc (lambda (x) (funcall (eval x))) (cdr form)) + (byte-compile-constant nil))) + (defun macroexp--expand-all (form) "Expand all macros in FORM. This is an internal version of `macroexpand-all'. @@ -112,14 +123,17 @@ Assumes the caller has bound `macroexpand-all-environment'." (macroexpand (macroexp--all-forms form 1) macroexpand-all-environment) ;; Normal form; get its expansion, and then expand arguments. - (let ((new-form (macroexpand form macroexpand-all-environment))) - (when (and (not (eq form new-form)) ;It was a macro call. - (car-safe form) - (symbolp (car form)) - (get (car form) 'byte-obsolete-info) - (fboundp 'byte-compile-warn-obsolete)) - (byte-compile-warn-obsolete (car form))) - (setq form new-form)) + (let ((new-form + (macroexpand form macroexpand-all-environment))) + (setq form + (if (and (not (eq form new-form)) ;It was a macro call. + (car-safe form) + (symbolp (car form)) + (get (car form) 'byte-obsolete-info)) + `(progn (macroexp--eval-if-compile + (lambda () (byte-compile-warn-obsolete ',(car form)))) + ,new-form) + new-form))) (pcase form (`(cond . ,clauses) (macroexp--cons 'cond (macroexp--all-clauses clauses) form)) @@ -323,6 +337,86 @@ symbol itself." "Return non-nil if EXP can be copied without extra cost." (or (symbolp exp) (macroexp-const-p exp))) +;;; Load-time macro-expansion. + +;; Because macro-expansion used to be more lazy, eager macro-expansion +;; tends to bump into previously harmless/unnoticeable cyclic-dependencies. +;; So, we have to delay macro-expansion like we used to when we detect +;; such a cycle, and we also want to help coders resolve those cycles (since +;; they can be non-obvious) by providing a usefully trimmed backtrace +;; (hopefully) highlighting the problem. + +(defun macroexp--backtrace () + "Return the Elisp backtrace, more recent frames first." + (let ((bt ()) + (i 0)) + (while + (let ((frame (backtrace-frame i))) + (when frame + (push frame bt) + (setq i (1+ i))))) + (nreverse bt))) + +(defun macroexp--trim-backtrace-frame (frame) + (pcase frame + (`(,_ macroexpand (,head . ,_) . ,_) `(macroexpand (,head …))) + (`(,_ internal-macroexpand-for-load (,head ,second . ,_) . ,_) + (if (or (symbolp second) + (and (eq 'quote (car-safe second)) + (symbolp (cadr second)))) + `(macroexpand-all (,head ,second …)) + '(macroexpand-all …))) + (`(,_ load-with-code-conversion ,name . ,_) + `(load ,(file-name-nondirectory name))))) + +(defvar macroexp--pending-eager-loads nil + "Stack of files currently undergoing eager macro-expansion.") + +(defun internal-macroexpand-for-load (form) + ;; Called from the eager-macroexpansion in readevalloop. + (cond + ;; Don't repeat the same warning for every top-level element. + ((eq 'skip (car macroexp--pending-eager-loads)) form) + ;; If we detect a cycle, skip macro-expansion for now, and output a warning + ;; with a trimmed backtrace. + ((and load-file-name (member load-file-name macroexp--pending-eager-loads)) + (let* ((bt (delq nil + (mapcar #'macroexp--trim-backtrace-frame + (macroexp--backtrace)))) + (elem `(load ,(file-name-nondirectory load-file-name))) + (tail (member elem (cdr (member elem bt))))) + (if tail (setcdr tail (list '…))) + (if (eq (car-safe (car bt)) 'macroexpand-all) (setq bt (cdr bt))) + (message "Warning: Eager macro-expansion skipped due to cycle:\n %s" + (mapconcat #'prin1-to-string (nreverse bt) " => ")) + (push 'skip macroexp--pending-eager-loads) + form)) + (t + (condition-case err + (let ((macroexp--pending-eager-loads + (cons load-file-name macroexp--pending-eager-loads))) + (macroexpand-all form)) + (error + ;; Hopefully this shouldn't happen thanks to the cycle detection, + ;; but in case it does happen, let's catch the error and give the + ;; code a chance to macro-expand later. + (message "Eager macro-expansion failure: %S" err) + form))))) + +;; ¡¡¡ Big Ugly Hack !!! +;; src/bootstrap-emacs is mostly used to compile .el files, so it needs +;; macroexp, bytecomp, cconv, and byte-opt to be fast. Generally this is done +;; by compiling those files first, but this only makes a difference if those +;; files are not preloaded. But macroexp.el is preloaded so we reload it if +;; the current version is interpreted and there's a compiled version available. +(eval-when-compile + (add-hook 'emacs-startup-hook + (lambda () + (and (not (byte-code-function-p + (symbol-function 'macroexpand-all))) + (locate-library "macroexp.elc") + (load "macroexp.elc"))))) + (provide 'macroexp) ;;; macroexp.el ends here diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 4aeed7e4d0e..09e47b69b91 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -60,6 +60,8 @@ ;; is in a loop, the repeated macro-expansion becomes terribly costly, so we ;; memoize previous macro expansions to try and avoid recomputing them ;; over and over again. +;; FIXME: Now that macroexpansion is also performed when loading an interpreted +;; file, this is not a real problem any more. (defconst pcase--memoize (make-hash-table :weakness 'key :test 'eq)) ;; (defconst pcase--memoize-1 (make-hash-table :test 'eq)) ;; (defconst pcase--memoize-2 (make-hash-table :weakness 'key :test 'equal)) diff --git a/lisp/loadup.el b/lisp/loadup.el index a460fcab339..d389427bafd 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -102,6 +102,19 @@ (setq load-source-file-function 'load-with-code-conversion) (load "files") +;; Load-time macro-expansion can only take effect after setting +;; load-source-file-function because of where it is called in lread.c. +(load "emacs-lisp/macroexp") +(if (byte-code-function-p (symbol-function 'macroexpand-all)) + nil + ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply + ;; fail until pcase is explicitly loaded. This also means that we have to + ;; disable eager macro-expansion while loading pcase. + (let ((macroexp--pending-eager-loads '(skip))) + (load "emacs-lisp/pcase")) + ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase. + (load "emacs-lisp/macroexp")) + (load "cus-face") (load "faces") ; after here, `defface' may be used. @@ -266,21 +279,6 @@ ;For other systems, you must edit ../src/Makefile.in. (load "site-load" t) -;; ¡¡¡ Big Ugly Hack !!! -;; src/bootstrap-emacs is mostly used to compile .el files, so it needs -;; macroexp, bytecomp, cconv, and byte-opt to be fast. Generally this is done -;; by compiling those files first, but this only makes a difference if those -;; files are not preloaded. As it so happens, macroexp.el tends to be -;; accidentally preloaded in src/bootstrap-emacs because cl.el and cl-macs.el -;; require it. So let's unload it here, if needed, to make sure the -;; byte-compiled version is used. -(if (or (not (fboundp 'macroexpand-all)) - (byte-code-function-p (symbol-function 'macroexpand-all))) - nil - (fmakunbound 'macroexpand-all) - (setq features (delq 'macroexp features)) - (autoload 'macroexpand-all "macroexp")) - ;; Determine which last version number to use ;; based on the executables that now exist. (if (and (or (equal (nth 3 command-line-args) "dump") diff --git a/src/ChangeLog b/src/ChangeLog index 1dd307b16de..b2634c4fdc4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-04 Stefan Monnier + + * lread.c (readevalloop): Call internal-macroexpand-for-load to perform + eager (load-time) macro-expansion. + * lisp.mk (lisp): Add macroexp. + 2012-09-04 Paul Eggert Simplify redefinition of 'abort' (Bug#12316). diff --git a/src/lisp.mk b/src/lisp.mk index 162d8819917..3d60e07dea3 100644 --- a/src/lisp.mk +++ b/src/lisp.mk @@ -65,6 +65,7 @@ lisp = \ $(lispsource)/format.elc \ $(lispsource)/bindings.elc \ $(lispsource)/files.elc \ + $(lispsource)/emacs-lisp/macroexp.elc \ $(lispsource)/cus-face.elc \ $(lispsource)/faces.elc \ $(lispsource)/button.elc \ diff --git a/src/lread.c b/src/lread.c index c15c8da3f7b..4f3a93b16b4 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1680,6 +1680,17 @@ readevalloop (Lisp_Object readcharfun, int whole_buffer = 0; /* 1 on the first time around. */ int first_sexp = 1; + Lisp_Object macroexpand = intern ("internal-macroexpand-for-load"); + + if (NILP (Ffboundp (macroexpand)) + /* Don't macroexpand in .elc files, since it should have been done + already. We actually don't know whether we're in a .elc file or not, + so we use circumstancial evidence: .el files normally go through + Vload_source_file_function -> load-with-code-conversion + -> eval-buffer. */ + || EQ (readcharfun, Qget_file_char) + || EQ (readcharfun, Qget_emacs_mule_file_char)) + macroexpand = Qnil; if (MARKERP (readcharfun)) { @@ -1809,6 +1820,8 @@ readevalloop (Lisp_Object readcharfun, unbind_to (count1, Qnil); /* Now eval what we just read. */ + if (!NILP (macroexpand)) + val = call1 (macroexpand, val); val = eval_sub (val); if (printflag) From cf29dd84d205e1c78fed5d1ea0006a382658598c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 4 Sep 2012 11:29:04 -0700 Subject: [PATCH 027/216] Give more-useful info on a fatal error (Bug#12328). * doc/emacs/trouble.texi (Crashing): New section, documenting this. * etc/NEWS: Document the change. * src/alloc.c [ENABLE_CHECKING]: Do not include . (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead of doing the work ourselves. * src/emacs.c (fatal_error_signal): Let fatal_error_backtrace do most of the work. (fatal_error_backtrace): New function, taken from the guts of the old fatal_error_signal, but with a new option to output a backtrace. (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful info about the signal than just its number. * src/lisp.h (fatal_error_backtrace, emacs_backtrace): New decls. * src/sysdep.c: Include (emacs_backtrace): New function, taken partly from the previous code of the 'die' function. (emacs_abort): Call fatal_error_backtrace rather than abort. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/emacs.texi | 3 ++- doc/emacs/trouble.texi | 39 +++++++++++++++++++++++++++++++++++++++ etc/ChangeLog | 5 +++++ etc/NEWS | 5 +++++ src/ChangeLog | 19 +++++++++++++++++++ src/alloc.c | 9 +-------- src/emacs.c | 14 +++++++++++++- src/lisp.h | 2 ++ src/sysdep.c | 21 ++++++++++++++++++++- 10 files changed, 111 insertions(+), 11 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a4f9985ad85..78f1d2c8e3b 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2012-09-04 Paul Eggert + + Give more-useful info on a fatal error (Bug#12328). + * trouble.texi (Crashing): New section, documenting this. + 2012-08-24 Michael Albinus * cmdargs.texi (General Variables): Setting diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 6357aebc6ff..192a9a2bb28 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1136,6 +1136,7 @@ Dealing with Emacs Trouble * Screen Garbled:: Garbage on the screen. * Text Garbled:: Garbage in the text. * Memory Full:: How to cope when you run out of memory. +* Crashing:: What Emacs does when it crashes. * After a Crash:: Recovering editing in an Emacs session that crashed. * Emergency Escape:: What to do if Emacs stops responding. @@ -1320,7 +1321,7 @@ when you get it, not just free for the manufacturer. If you find GNU Emacs useful, please @strong{send a donation} to the Free Software Foundation to support our work. Donations to the Free Software Foundation are tax deductible in the US. If you use GNU Emacs -at your workplace, please suggest that the company make a donation. +at your workplace, please suggest that the company make a donation. For more information on how you can help, see @url{http://www.gnu.org/help/help.html}. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 025185c583f..1806339e45d 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -149,6 +149,7 @@ Emacs. * Screen Garbled:: Garbage on the screen. * Text Garbled:: Garbage in the text. * Memory Full:: How to cope when you run out of memory. +* Crashing:: What Emacs does when it crashes. * After a Crash:: Recovering editing in an Emacs session that crashed. * Emergency Escape:: What to do if Emacs stops responding. @end menu @@ -277,6 +278,44 @@ editing in the same Emacs session. out of memory, because the buffer menu needs a fair amount of memory itself, and the reserve supply may not be enough. +@node Crashing +@subsection When Emacs Crashes + + Emacs is not supposed to crash, but if it does, before it exits it +reports some information about the crash to the standard error stream +@code{stderr}. This report may be useful to someone who later debugs +the same version of Emacs on the same platform. The format of this +report depends on the platform, and some platforms support backtraces. +Here is an example, generated on x86-64 GNU/Linux with version 2.15 of +the GNU C Library: + +@example +Fatal error 11: Segmentation fault +Backtrace: +emacs[0x5094e4] +emacs[0x4ed3e6] +emacs[0x4ed504] +/lib64/libpthread.so.0[0x375220efe0] +/lib64/libpthread.so.0(read+0xe)[0x375220e08e] +emacs[0x509af6] +emacs[0x5acc26] +emacs[0x5adbfb] +emacs[0x56566b] +emacs[0x59bac3] +emacs[0x565151] +... +@end example + +@noindent +The number @samp{11} is the system signal number that corresponds to +the problem, a segmentation fault here. The hexadecimal program +addresses can be useful in debugging sessions. For example, the GDB +command @samp{list *0x509af6} prints the source-code lines +corresponding to the @samp{emacs[0x509af6]} entry in the backtrace. + +The three dots at the end indicate that Emacs suppressed further +backtrace entries, in the interest of brevity. + @node After a Crash @subsection Recovery After a Crash diff --git a/etc/ChangeLog b/etc/ChangeLog index f3f244c7e39..aa788275256 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2012-09-04 Paul Eggert + + Give more-useful info on a fatal error (Bug#12328). + * NEWS: Document the change. + 2012-09-01 Paul Eggert Better seeds for (random). diff --git a/etc/NEWS b/etc/NEWS index e4a612f6a9e..9a38deef05c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -97,6 +97,11 @@ machines. Other functions that use this format, such as file-attributes and format-time-string, have been changed accordingly. Old-format time stamps are still accepted. +** Emacs now generates backtraces on fatal errors. +On encountering a fatal error, Emacs now outputs a textual description +of the fatal signal, and a short backtrace on platforms like glibc +that support backtraces. + ** New functions `system-users', `system-groups' return lists of the user name, group names known to the system (where possible). diff --git a/src/ChangeLog b/src/ChangeLog index b2634c4fdc4..ea3b3a92e01 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2012-09-04 Paul Eggert + + Give more-useful info on a fatal error (Bug#12328). + * alloc.c [ENABLE_CHECKING]: Do not include . + (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead + of doing the work ourselves. + * emacs.c (fatal_error_signal): Let fatal_error_backtrace + do most of the work. + (fatal_error_backtrace): New function, taken from the guts + of the old fatal_error_signal, but with a new option to output + a backtrace. + (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful + info about the signal than just its number. + * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls. + * sysdep.c: Include + (emacs_backtrace): New function, taken partly from the previous + code of the 'die' function. + (emacs_abort): Call fatal_error_backtrace rather than abort. + 2012-09-04 Stefan Monnier * lread.c (readevalloop): Call internal-macroexpand-for-load to perform diff --git a/src/alloc.c b/src/alloc.c index 2a831cea62a..157d3a1d799 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6685,21 +6685,14 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) #ifdef ENABLE_CHECKING -# include - bool suppress_checking; void die (const char *msg, const char *file, int line) { - enum { NPOINTERS_MAX = 500 }; - void *buffer[NPOINTERS_MAX]; - int npointers; fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", file, line, msg); - npointers = backtrace (buffer, NPOINTERS_MAX); - backtrace_symbols_fd (buffer, npointers, STDERR_FILENO); - emacs_abort (); + fatal_error_backtrace (SIGABRT, INT_MAX); } #endif diff --git a/src/emacs.c b/src/emacs.c index b242cbf8844..18f249dc899 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -298,6 +298,14 @@ void fatal_error_signal (int sig) { SIGNAL_THREAD_CHECK (sig); + fatal_error_backtrace (sig, 10); +} + +/* Report a fatal error due to signal SIG, output a backtrace of at + most BACKTRACE_LIMIT lines, and exit. */ +_Noreturn void +fatal_error_backtrace (int sig, int backtrace_limit) +{ fatal_error_code = sig; signal (sig, SIG_DFL); @@ -312,6 +320,7 @@ fatal_error_signal (int sig) Fkill_emacs (make_number (sig)); shut_down_emacs (sig, Qnil); + emacs_backtrace (backtrace_limit); } /* Signal the same code; this time it will really be fatal. @@ -323,6 +332,9 @@ fatal_error_signal (int sig) #endif kill (getpid (), fatal_error_code); + + /* This shouldn't be executed, but it prevents a warning. */ + exit (1); } #ifdef SIGDANGER @@ -1992,7 +2004,7 @@ shut_down_emacs (int sig, Lisp_Object stuff) { reset_all_sys_modes (); if (sig && sig != SIGTERM) - fprintf (stderr, "Fatal error (%d)", sig); + fprintf (stderr, "Fatal error %d: %s", sig, strsignal (sig)); } } #else diff --git a/src/lisp.h b/src/lisp.h index 0835795a26d..9ee9cd74b56 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3266,6 +3266,7 @@ extern Lisp_Object Qfile_name_handler_alist; #ifdef FLOAT_CATCH_SIGILL extern void fatal_error_signal (int); #endif +extern _Noreturn void fatal_error_backtrace (int, int); extern Lisp_Object Qkill_emacs; #if HAVE_SETLOCALE void fixup_locale (void); @@ -3412,6 +3413,7 @@ extern int set_window_size (int, int, int); extern EMACS_INT get_random (void); extern void seed_random (void *, ptrdiff_t); extern void init_random (void); +extern void emacs_backtrace (int); extern _Noreturn void emacs_abort (void) NO_INLINE; extern int emacs_open (const char *, int, int); extern int emacs_close (int); diff --git a/src/sysdep.c b/src/sysdep.c index 78164a8f02a..1f4de194c64 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see . */ #define SYSTIME_INLINE EXTERN_INLINE +#include #include #include #include @@ -1856,12 +1857,30 @@ snprintf (char *buf, size_t bufsize, char const *format, ...) } #endif +/* If a backtrace is available, output the top lines of it to stderr. + Do not output more than BACKTRACE_LIMIT or BACKTRACE_LIMIT_MAX lines. + This function may be called from a signal handler, so it should + not invoke async-unsafe functions like malloc. */ +void +emacs_backtrace (int backtrace_limit) +{ + enum { BACKTRACE_LIMIT_MAX = 500 }; + void *buffer[BACKTRACE_LIMIT_MAX + 1]; + int bounded_limit = min (backtrace_limit, BACKTRACE_LIMIT_MAX); + int npointers = backtrace (buffer, bounded_limit + 1); + if (npointers) + ignore_value (write (STDERR_FILENO, "\nBacktrace:\n", 12)); + backtrace_symbols_fd (buffer, bounded_limit, STDERR_FILENO); + if (bounded_limit < npointers) + ignore_value (write (STDERR_FILENO, "...\n", 4)); +} + #ifndef HAVE_NTGUI /* Using emacs_abort lets GDB return from a breakpoint here. */ void emacs_abort (void) { - abort (); + fatal_error_backtrace (SIGABRT, 10); } #endif From 7f7e0167cf664f2d66ac3fa8a7301e05f09883d2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 4 Sep 2012 23:21:00 +0200 Subject: [PATCH 028/216] Implement `debug-on-message'. This allows tracking down what piece of code is outputting stuff in the echo area. * eval.c (call_debugger): Make the function non-static so that we can call it from set_message. * xdisp.c (set_message): Implement the new variable `debug-on-message'. (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/debugging.texi | 5 +++++ etc/NEWS | 4 ++++ src/ChangeLog | 8 ++++++++ src/eval.c | 2 +- src/lisp.h | 1 + src/xdisp.c | 22 +++++++++++++++++++++- 7 files changed, 44 insertions(+), 2 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b0156e5ac7e..50f9853b7eb 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2012-09-04 Lars Ingebrigtsen + + * debugging.texi (Explicit Debug): Document `debug-on-message'. + 2012-09-02 Chong Yidong * windows.texi (Window Configurations): Recommend against using diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 00e8d84e9b3..5aeff576d09 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -298,6 +298,11 @@ of @code{(debug)} isn't ignored, it will alter the execution of the program!) The most common suitable places are inside a @code{progn} or an implicit @code{progn} (@pxref{Sequencing}). + If you don't know exactly where in the source code you want to put +the debug statement, but you want to display a backtrace when a +certain message is displayed, you can set @code{debug-on-message} to a +regular expression matching the desired message. + @node Using Debugger @subsection Using the Debugger diff --git a/etc/NEWS b/etc/NEWS index 9a38deef05c..e137ebc0665 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1916,6 +1916,10 @@ instead of jumping all the way to the top-level. *** Set `debug-on-event' to enter the debugger on events like SIGUSR1. This can be useful when `inhibit-quit' is set. +*** Set `debug-on-message' to enter the debugger when a certain +message is displayed in the echo area. This can be useful when trying +to work out which code is doing something. + ** The new function `server-eval-at' allows evaluation of Lisp forms on named Emacs server instances. diff --git a/src/ChangeLog b/src/ChangeLog index ea3b3a92e01..d7a263df229 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2012-09-04 Lars Ingebrigtsen + + * eval.c (call_debugger): Make the function non-static so that we + can call it from set_message. + + * xdisp.c (set_message): Implement the new variable `debug-on-message'. + (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'. + 2012-09-04 Paul Eggert Give more-useful info on a fatal error (Bug#12328). diff --git a/src/eval.c b/src/eval.c index 1015b013a26..4f0d6c69a51 100644 --- a/src/eval.c +++ b/src/eval.c @@ -191,7 +191,7 @@ restore_stack_limits (Lisp_Object data) /* Call the Lisp debugger, giving it argument ARG. */ -static Lisp_Object +Lisp_Object call_debugger (Lisp_Object arg) { bool debug_while_redisplaying; diff --git a/src/lisp.h b/src/lisp.h index 9ee9cd74b56..78c418f3051 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3076,6 +3076,7 @@ extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern _Noreturn void verror (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); extern Lisp_Object un_autoload (Lisp_Object); +extern Lisp_Object call_debugger (Lisp_Object arg); extern void init_eval_once (void); extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...); extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); diff --git a/src/xdisp.c b/src/xdisp.c index f543a96d6b3..90a8de0be27 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -364,6 +364,7 @@ static Lisp_Object Qslice; Lisp_Object Qcenter; static Lisp_Object Qmargin, Qpointer; static Lisp_Object Qline_height; +Lisp_Object Qinhibit_debug_on_message; /* These setters are used only in this file, so they can be private. */ static inline void @@ -10571,7 +10572,6 @@ truncate_message_1 (ptrdiff_t nchars, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4 return 0; } - /* Set the current message to a substring of S or STRING. If STRING is a Lisp string, set the message to the first NBYTES @@ -10590,6 +10590,8 @@ static void set_message (const char *s, Lisp_Object string, ptrdiff_t nbytes, int multibyte_p) { + ptrdiff_t count = SPECPDL_INDEX (); + message_enable_multibyte = ((s && multibyte_p) || (STRINGP (string) && STRING_MULTIBYTE (string))); @@ -10598,6 +10600,15 @@ set_message (const char *s, Lisp_Object string, (intptr_t) s, string, nbytes, multibyte_p); message_buf_print = 0; help_echo_showing_p = 0; + + if (NILP (Vinhibit_debug_on_message) && + STRINGP (Vdebug_on_message) && + fast_string_match (Vdebug_on_message, string) >= 0) { + specbind (Qinhibit_debug_on_message, Qt); + call_debugger (Fcons (Qerror, Fcons (string, Qnil))); + } + + unbind_to (count, Qnil); } @@ -29299,6 +29310,15 @@ Its value should be an ASCII acronym string, `hex-code', `empty-box', or Vglyphless_char_display = Fmake_char_table (Qglyphless_char_display, Qnil); Fset_char_table_extra_slot (Vglyphless_char_display, make_number (0), Qempty_box); + + DEFVAR_LISP ("debug-on-message", Vdebug_on_message, + doc: /* If non-nil, debug if a message matching this regexp is displayed. */); + Vdebug_on_message = Qnil; + + DEFVAR_LISP ("inhibit-debug-on-message", Vinhibit_debug_on_message, + doc: /* If non-nil, inhibit `debug-on-message' from entering the debugger. */); + Vinhibit_debug_on_message = Qnil; + DEFSYM(Qinhibit_debug_on_message, "inhibit-debug-on-message"); } From 5dbaffae0c72f1c059b5c6a66198a95e288ae743 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 5 Sep 2012 02:17:57 +0200 Subject: [PATCH 029/216] nt/config.nt: Sync with autogen/config.in. --- nt/ChangeLog | 4 ++++ nt/config.nt | 16 +++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 97b6128f32d..6367df7d043 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2012-09-05 Juanma Barranquero + + * config.nt: Sync with autogen/config.in. + 2012-09-04 Paul Eggert Simplify redefinition of 'abort' (Bug#12316). diff --git a/nt/config.nt b/nt/config.nt index 7658275f2d6..e97d10d9cec 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -165,6 +165,13 @@ along with GNU Emacs. If not, see . */ or signaling SIGFPE/SIGILL. */ #undef FLOAT_CHECK_DOMAIN +/* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting glibc 2.15+. */ + #if defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + + /* Define to 1 if futimesat mishandles a NULL file name. */ #undef FUTIMESAT_NULL_BUG @@ -1468,9 +1475,6 @@ along with GNU Emacs. If not, see . */ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS -/* enable compile-time and run-time bounds-checking, and some warnings */ -#undef _FORTIFY_SOURCE - /* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct stat.st_size becomes 64-bit. */ #undef _GL_WINDOWS_64_BIT_ST_SIZE @@ -1547,10 +1551,12 @@ along with GNU Emacs. If not, see . */ declarations. Define as empty for no equivalent. */ #undef __restrict_arr -/* Some platforms redefine this. */ +/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may + alter signal masks, callers of _longjmp should not assume that it leaves + signal masks alone. */ #undef _longjmp -/* Some platforms redefine this. */ +/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ #undef _setjmp /* Some platforms that do not use configure define this to include extra From 776f29e171a93dac78b15397393bf40d8fcfd584 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 5 Sep 2012 02:30:14 +0200 Subject: [PATCH 030/216] src/makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies. --- src/ChangeLog | 4 ++++ src/makefile.w32-in | 1 + 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d7a263df229..7922a92d0fc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-05 Juanma Barranquero + + * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies. + 2012-09-04 Lars Ingebrigtsen * eval.c (call_debugger): Make the function non-static so that we diff --git a/src/makefile.w32-in b/src/makefile.w32-in index a8dcf5f2ae8..7b9c67bf135 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -1365,6 +1365,7 @@ $(BLD)/sysdep.$(O) : \ $(NT_INC)/sys/stat.h \ $(NT_INC)/unistd.h \ $(GNU_LIB)/allocator.h \ + $(GNU_LIB)/execinfo.h \ $(GNU_LIB)/ignore-value.h \ $(GNU_LIB)/utimens.h \ $(BLOCKINPUT_H) \ From 014d93beeff943c5b5f34995002ec575cd15c244 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 4 Sep 2012 20:37:32 -0700 Subject: [PATCH 031/216] * xdisp.c (set_message): Simplify and reindent last change. --- src/ChangeLog | 4 ++++ src/xdisp.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7922a92d0fc..5ff49aadd87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-05 Paul Eggert + + * xdisp.c (set_message): Simplify and reindent last change. + 2012-09-05 Juanma Barranquero * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies. diff --git a/src/xdisp.c b/src/xdisp.c index 90a8de0be27..bec9ec91d2f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10601,12 +10601,12 @@ set_message (const char *s, Lisp_Object string, message_buf_print = 0; help_echo_showing_p = 0; - if (NILP (Vinhibit_debug_on_message) && - STRINGP (Vdebug_on_message) && - fast_string_match (Vdebug_on_message, string) >= 0) { - specbind (Qinhibit_debug_on_message, Qt); - call_debugger (Fcons (Qerror, Fcons (string, Qnil))); - } + if (NILP (Vinhibit_debug_on_message) && STRINGP (Vdebug_on_message) + && fast_string_match (Vdebug_on_message, string) >= 0) + { + specbind (Qinhibit_debug_on_message, Qt); + call_debugger (list2 (Qerror, string)); + } unbind_to (count, Qnil); } From 1a1ecd2b14f38fcd995516a71b49c8810eac5828 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 4 Sep 2012 23:56:55 -0700 Subject: [PATCH 032/216] ChangeLog fixes --- lisp/gnus/ChangeLog | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 37d89ba8cad..0587469a08e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,7 +1,5 @@ 2012-09-03 Lars Ingebrigtsen - * dgnushack.el: XEmacs 21.5 compilation fix. - * gnus-notifications.el (gnus-notifications-notify): Use it. * gnus-fun.el (gnus-funcall-no-warning): New function to silence @@ -2300,8 +2298,6 @@ 2011-06-30 Lars Magne Ingebrigtsen - * dgnushack.el: Autoload sha1 on XEmacs. - * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional quit window configuration. From f75d7a913dd0fae7a739d12f704fca024c065c3e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 5 Sep 2012 00:18:46 -0700 Subject: [PATCH 033/216] * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean. * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name) (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file) (file_name_absolute_p, Fsubstitute_in_file_name): (check_executable, check_writable, Ffile_accessible_directory_p) (Fset_file_selinux_context, Fdefault_file_modes) (Finsert_file_contents, choose_write_coding_system) (Fwrite_region, build_annotations, a_write, e_write) (Fdo_auto_save): * filelock.c (boot_time_initialized, get_boot_time) (get_boot_time_1, lock_file_1, within_one_second): * floatfns.c (in_float): * fns.c (concat, internal_equal, Frequire, base64_encode_1) (base64_decode_1, cmpfn_eql, cmpfn_user_defined) (sweep_weak_table, sweep_weak_hash_tables, secure_hash): * lisp.h (struct Lisp_Hash_Table.cmpfn): * window.c (compare_window_configurations): Use bool for booleans. * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits) (Fdefault_file_modes): Now mode_t, not int, for modes. (Fdo_auto_save): Set a boolean to 1 rather than using ++. (internal_delete_file): Now returns void, not a (boolean) int, since nobody was looking at the return value. * lisp.h, window.h: Adjust to above API changes. --- src/ChangeLog | 25 +++++++ src/fileio.c | 199 +++++++++++++++++++++++-------------------------- src/filelock.c | 24 +++--- src/floatfns.c | 4 +- src/fns.c | 70 ++++++++--------- src/lisp.h | 10 +-- src/window.c | 8 +- src/window.h | 2 +- 8 files changed, 178 insertions(+), 164 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5ff49aadd87..cb4f1071c70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,30 @@ 2012-09-05 Paul Eggert + * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean. + * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name) + (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file) + (file_name_absolute_p, Fsubstitute_in_file_name): + (check_executable, check_writable, Ffile_accessible_directory_p) + (Fset_file_selinux_context, Fdefault_file_modes) + (Finsert_file_contents, choose_write_coding_system) + (Fwrite_region, build_annotations, a_write, e_write) + (Fdo_auto_save): + * filelock.c (boot_time_initialized, get_boot_time) + (get_boot_time_1, lock_file_1, within_one_second): + * floatfns.c (in_float): + * fns.c (concat, internal_equal, Frequire, base64_encode_1) + (base64_decode_1, cmpfn_eql, cmpfn_user_defined) + (sweep_weak_table, sweep_weak_hash_tables, secure_hash): + * lisp.h (struct Lisp_Hash_Table.cmpfn): + * window.c (compare_window_configurations): + Use bool for booleans. + * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits) + (Fdefault_file_modes): Now mode_t, not int, for modes. + (Fdo_auto_save): Set a boolean to 1 rather than using ++. + (internal_delete_file): Now returns void, not a (boolean) int, + since nobody was looking at the return value. + * lisp.h, window.h: Adjust to above API changes. + * xdisp.c (set_message): Simplify and reindent last change. 2012-09-05 Juanma Barranquero diff --git a/src/fileio.c b/src/fileio.c index d193d2ed19f..f0b3f0cc2fd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -85,18 +85,18 @@ along with GNU Emacs. If not, see . */ #include "commands.h" -/* Nonzero during writing of auto-save files. */ -static int auto_saving; +/* True during writing of auto-save files. */ +static bool auto_saving; /* Nonzero umask during creation of auto-save directories. */ -static int auto_saving_dir_umask; +static mode_t auto_saving_dir_umask; /* Set by auto_save_1 to mode of original file so Fwrite_region will create a new file with the same mode as the original. */ -static int auto_save_mode_bits; +static mode_t auto_save_mode_bits; /* Set by auto_save_1 if an error occurred during the last auto-save. */ -static int auto_save_error_occurred; +static bool auto_save_error_occurred; /* The symbol bound to coding-system-for-read when insert-file-contents is called for recovering a file. This is not @@ -145,10 +145,10 @@ Lisp_Object Qfile_name_history; static Lisp_Object Qcar_less_than_car; -static int a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, - Lisp_Object *, struct coding_system *); -static int e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, - struct coding_system *); +static bool a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, + Lisp_Object *, struct coding_system *); +static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, + struct coding_system *); void @@ -595,7 +595,7 @@ static unsigned make_temp_name_count, make_temp_name_count_initialized_p; which has no existing file. To make this work, PREFIX should be an absolute file name. - BASE64_P non-zero means add the pid as 3 characters in base64 + BASE64_P means add the pid as 3 characters in base64 encoding. In this case, 6 characters will be added to PREFIX to form the file name. Otherwise, if Emacs is running on a system with long file names, add the pid as a decimal number. @@ -604,7 +604,7 @@ static unsigned make_temp_name_count, make_temp_name_count_initialized_p; generated. */ Lisp_Object -make_temp_name (Lisp_Object prefix, int base64_p) +make_temp_name (Lisp_Object prefix, bool base64_p) { Lisp_Object val; int len, clen; @@ -761,8 +761,8 @@ filesystem tree, not (expand-file-name ".." dirname). */) struct passwd *pw; #ifdef DOS_NT int drive = 0; - int collapse_newdir = 1; - int is_escaped = 0; + bool collapse_newdir = 1; + bool is_escaped = 0; #endif /* DOS_NT */ ptrdiff_t length; Lisp_Object handler, result, handled_name; @@ -920,10 +920,9 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* If it turns out that the filename we want to return is just a suffix of FILENAME, we don't need to go through and edit things; we just need to construct a new string using data - starting at the middle of FILENAME. If we set lose to a - non-zero value, that means we've discovered that we can't do - that cool trick. */ - int lose = 0; + starting at the middle of FILENAME. If we set LOSE, that + means we've discovered that we can't do that cool trick. */ + bool lose = 0; char *p = nm; while (*p) @@ -1360,7 +1359,6 @@ See also the function `substitute-in-file-name'.") ptrdiff_t tlen; unsigned char *target; struct passwd *pw; - int lose; CHECK_STRING (name); nm = SDATA (name); @@ -1369,8 +1367,8 @@ See also the function `substitute-in-file-name'.") If no /./ or /../ we can return right away. */ if (nm[0] == '/') { + bool lose = 0; p = nm; - lose = 0; while (*p) { if (p[0] == '/' && p[1] == '/' @@ -1494,7 +1492,7 @@ See also the function `substitute-in-file-name'.") #endif /* If /~ or // appears, discard everything through first slash. */ -static int +static bool file_name_absolute_p (const char *filename) { return @@ -1560,12 +1558,10 @@ If `//' appears, everything up to and including the first of those `/' is discarded. */) (Lisp_Object filename) { - char *nm; - - register char *s, *p, *o, *x, *endp; + char *nm, *s, *p, *o, *x, *endp; char *target = NULL; int total = 0; - int substituted = 0; + bool substituted = 0; bool multibyte; char *xnm; Lisp_Object handler; @@ -1780,7 +1776,7 @@ expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir) } /* Signal an error if the file ABSNAME already exists. - If INTERACTIVE is nonzero, ask the user whether to proceed, + If INTERACTIVE, ask the user whether to proceed, and bypass the error if the user says to go ahead. QUERYSTRING is a name for the action that is being considered to alter the file. @@ -1789,13 +1785,14 @@ expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir) If the file does not exist, STATPTR->st_mode is set to 0. If STATPTR is null, we don't store into it. - If QUICK is nonzero, we ask for y or n, not yes or no. */ + If QUICK, ask for y or n, not yes or no. */ static void barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring, - int interactive, struct stat *statptr, int quick) + bool interactive, struct stat *statptr, + bool quick) { - register Lisp_Object tem, encoded_filename; + Lisp_Object tem, encoded_filename; struct stat statbuf; struct gcpro gcpro1; @@ -1869,11 +1866,11 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) Lisp_Object handler; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; ptrdiff_t count = SPECPDL_INDEX (); - int input_file_statable_p; + bool input_file_statable_p; Lisp_Object encoded_file, encoded_newname; #if HAVE_LIBSELINUX security_context_t con; - int fail, conlength = 0; + int conlength = 0; #endif encoded_file = encoded_newname = Qnil; @@ -1988,7 +1985,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) S_IREAD | S_IWRITE); #else /* not MSDOS */ { - int new_mask = 0666; + mode_t new_mask = 0666; if (input_file_statable_p) { if (!NILP (preserve_uid_gid)) @@ -2018,7 +2015,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) owner and group. */ if (input_file_statable_p) { - int mode_mask = 07777; + mode_t mode_mask = 07777; if (!NILP (preserve_uid_gid)) { /* Attempt to change owner and group. If that doesn't work @@ -2041,7 +2038,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) if (conlength > 0) { /* Set the modified context back to the file. */ - fail = fsetfilecon (ofd, con); + bool fail = fsetfilecon (ofd, con) != 0; /* See http://debbugs.gnu.org/11245 for ENOTSUP. */ if (fail && errno != ENOTSUP) report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil)); @@ -2184,17 +2181,14 @@ internal_delete_file_1 (Lisp_Object ignore) return Qt; } -/* Delete file FILENAME, returning 1 if successful and 0 if failed. +/* Delete file FILENAME. This ignores `delete-by-moving-to-trash'. */ -int +void internal_delete_file (Lisp_Object filename) { - Lisp_Object tem; - - tem = internal_condition_case_2 (Fdelete_file, filename, Qnil, - Qt, internal_delete_file_1); - return NILP (tem); + internal_condition_case_2 (Fdelete_file, filename, Qnil, + Qt, internal_delete_file_1); } DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, @@ -2430,9 +2424,9 @@ On Unix, this is a name starting with a `/' or a `~'. */) return file_name_absolute_p (SSDATA (filename)) ? Qt : Qnil; } -/* Return nonzero if file FILENAME exists and can be executed. */ +/* Return true if file FILENAME exists and can be executed. */ -static int +static bool check_executable (char *filename) { #ifdef DOS_NT @@ -2452,9 +2446,9 @@ check_executable (char *filename) #endif /* not DOS_NT */ } -/* Return nonzero if file FILENAME exists and can be written. */ +/* Return true if file FILENAME exists and can be written. */ -static int +static bool check_writable (const char *filename) { #ifdef MSDOS @@ -2464,7 +2458,7 @@ check_writable (const char *filename) return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode)); #else /* not MSDOS */ #ifdef HAVE_EUIDACCESS - int res = (euidaccess (filename, 2) >= 0); + bool res = (euidaccess (filename, 2) >= 0); #ifdef CYGWIN /* euidaccess may have returned failure because Cygwin couldn't determine the file's UID or GID; if so, we return success. */ @@ -2732,7 +2726,7 @@ searchable directory. */) (Lisp_Object filename) { Lisp_Object handler; - int tem; + bool tem; struct gcpro gcpro1; /* If the file name has special constructs in it, @@ -2868,7 +2862,8 @@ compiled with SELinux support. */) Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); security_context_t con; - int fail, conlength; + bool fail; + int conlength; context_t parsed_con; #endif @@ -2912,8 +2907,9 @@ compiled with SELinux support. */) } /* Set the modified context back to the file. */ - fail = lsetfilecon (SSDATA (encoded_absname), - context_str (parsed_con)); + fail = (lsetfilecon (SSDATA (encoded_absname), + context_str (parsed_con)) + != 0); /* See http://debbugs.gnu.org/11245 for ENOTSUP. */ if (fail && errno != ENOTSUP) report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); @@ -3004,7 +3000,7 @@ DEFUN ("default-file-modes", Fdefault_file_modes, Sdefault_file_modes, 0, 0, 0, The value is an integer. */) (void) { - int realmask; + mode_t realmask; Lisp_Object value; BLOCK_INPUT; @@ -3246,29 +3242,29 @@ variable `last-coding-system-used' to the coding system actually used. */) struct stat st; int file_status; EMACS_TIME mtime; - register int fd; + int fd; ptrdiff_t inserted = 0; - int nochange = 0; - register ptrdiff_t how_much; + bool nochange = 0; + ptrdiff_t how_much; off_t beg_offset, end_offset; - register int unprocessed; + int unprocessed; ptrdiff_t count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; Lisp_Object handler, val, insval, orig_filename, old_undo; Lisp_Object p; ptrdiff_t total = 0; - int not_regular = 0; + bool not_regular = 0; int save_errno = 0; char read_buf[READ_BUF_SIZE]; struct coding_system coding; char buffer[1 << 14]; - int replace_handled = 0; - int set_coding_system = 0; + bool replace_handled = 0; + bool set_coding_system = 0; Lisp_Object coding_system; - int read_quit = 0; + bool read_quit = 0; Lisp_Object old_Vdeactivate_mark = Vdeactivate_mark; - int we_locked_file = 0; - int deferred_remove_unwind_protect = 0; + bool we_locked_file = 0; + bool deferred_remove_unwind_protect = 0; if (current_buffer->base_buffer && ! NILP (visit)) error ("Cannot do file visiting in an indirect buffer"); @@ -3569,9 +3565,9 @@ variable `last-coding-system-used' to the coding system actually used. */) ptrdiff_t same_at_end = ZV_BYTE; ptrdiff_t overlap; /* There is still a possibility we will find the need to do code - conversion. If that happens, we set this variable to 1 to + conversion. If that happens, set this variable to give up on handling REPLACE in the optimized way. */ - int giveup_match_end = 0; + bool giveup_match_end = 0; if (beg_offset != 0) { @@ -4427,8 +4423,8 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file If it is not set locally, we anyway have to convert EOL format if the default value of `buffer-file-coding-system' tells that it is not Unix-like (LF only) format. */ - int using_default_coding = 0; - int force_raw_text = 0; + bool using_default_coding = 0; + bool force_raw_text = 0; val = BVAR (current_buffer, buffer_file_coding_system); if (NILP (val) @@ -4537,8 +4533,8 @@ This calls `write-region-annotate-functions' at the start, and `write-region-post-annotation-function' at the end. */) (Lisp_Object start, Lisp_Object end, Lisp_Object filename, Lisp_Object append, Lisp_Object visit, Lisp_Object lockname, Lisp_Object mustbenew) { - register int desc; - int failure; + int desc; + bool ok; int save_errno = 0; const char *fn; struct stat st; @@ -4548,8 +4544,8 @@ This calls `write-region-annotate-functions' at the start, and Lisp_Object visit_file; Lisp_Object annotations; Lisp_Object encoded_filename; - int visiting = (EQ (visit, Qt) || STRINGP (visit)); - int quietly = !NILP (visit); + bool visiting = (EQ (visit, Qt) || STRINGP (visit)); + bool quietly = !NILP (visit); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; struct buffer *given_buffer; struct coding_system coding; @@ -4713,37 +4709,27 @@ This calls `write-region-annotate-functions' at the start, and UNGCPRO; - failure = 0; immediate_quit = 1; if (STRINGP (start)) - { - failure = 0 > a_write (desc, start, 0, SCHARS (start), - &annotations, &coding); - save_errno = errno; - } + ok = a_write (desc, start, 0, SCHARS (start), &annotations, &coding); else if (XINT (start) != XINT (end)) - { - failure = 0 > a_write (desc, Qnil, - XINT (start), XINT (end) - XINT (start), - &annotations, &coding); - save_errno = errno; - } + ok = a_write (desc, Qnil, XINT (start), XINT (end) - XINT (start), + &annotations, &coding); else { - /* If file was empty, still need to write the annotations */ + /* If file was empty, still need to write the annotations. */ coding.mode |= CODING_MODE_LAST_BLOCK; - failure = 0 > a_write (desc, Qnil, XINT (end), 0, &annotations, &coding); - save_errno = errno; + ok = a_write (desc, Qnil, XINT (end), 0, &annotations, &coding); } + save_errno = errno; - if (CODING_REQUIRE_FLUSHING (&coding) - && !(coding.mode & CODING_MODE_LAST_BLOCK) - && ! failure) + if (ok && CODING_REQUIRE_FLUSHING (&coding) + && !(coding.mode & CODING_MODE_LAST_BLOCK)) { /* We have to flush out a data. */ coding.mode |= CODING_MODE_LAST_BLOCK; - failure = 0 > e_write (desc, Qnil, 1, 1, &coding); + ok = e_write (desc, Qnil, 1, 1, &coding); save_errno = errno; } @@ -4760,13 +4746,13 @@ This calls `write-region-annotate-functions' at the start, and ignore EINVAL which happens when fsync is not supported on this file. */ if (errno != EINTR && errno != EINVAL) - failure = 1, save_errno = errno; + ok = 0, save_errno = errno; } #endif /* NFS can report a write failure now. */ if (emacs_close (desc) < 0) - failure = 1, save_errno = errno; + ok = 0, save_errno = errno; stat (fn, &st); @@ -4803,7 +4789,7 @@ This calls `write-region-annotate-functions' at the start, and current_buffer->modtime_size = st.st_size; } - if (failure) + if (! ok) error ("IO error writing %s: %s", SDATA (filename), emacs_strerror (save_errno)); @@ -4859,7 +4845,8 @@ build_annotations (Lisp_Object start, Lisp_Object end) Lisp_Object p, res; struct gcpro gcpro1, gcpro2; Lisp_Object original_buffer; - int i, used_global = 0; + int i; + bool used_global = 0; XSETBUFFER (original_buffer, current_buffer); @@ -4939,11 +4926,11 @@ build_annotations (Lisp_Object start, Lisp_Object end) We modify *ANNOT by discarding elements as we use them up. - The return value is negative in case of system call failure. */ + Return true if successful. */ -static int +static bool a_write (int desc, Lisp_Object string, ptrdiff_t pos, - register ptrdiff_t nchars, Lisp_Object *annot, + ptrdiff_t nchars, Lisp_Object *annot, struct coding_system *coding) { Lisp_Object tem; @@ -4965,29 +4952,29 @@ a_write (int desc, Lisp_Object string, ptrdiff_t pos, /* Output buffer text up to the next annotation's position. */ if (nextpos > pos) { - if (0 > e_write (desc, string, pos, nextpos, coding)) - return -1; + if (!e_write (desc, string, pos, nextpos, coding)) + return 0; pos = nextpos; } /* Output the annotation. */ tem = Fcdr (Fcar (*annot)); if (STRINGP (tem)) { - if (0 > e_write (desc, tem, 0, SCHARS (tem), coding)) - return -1; + if (!e_write (desc, tem, 0, SCHARS (tem), coding)) + return 0; } *annot = Fcdr (*annot); } - return 0; + return 1; } /* Write text in the range START and END into descriptor DESC, encoding them with coding system CODING. If STRING is nil, START and END are character positions of the current buffer, else they - are indexes to the string STRING. */ + are indexes to the string STRING. Return true if successful. */ -static int +static bool e_write (int desc, Lisp_Object string, ptrdiff_t start, ptrdiff_t end, struct coding_system *coding) { @@ -5056,12 +5043,12 @@ e_write (int desc, Lisp_Object string, ptrdiff_t start, ptrdiff_t end, coding->produced); if (coding->produced) - return -1; + return 0; } start += coding->consumed_char; } - return 0; + return 1; } DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, @@ -5300,12 +5287,12 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) { struct buffer *old = current_buffer, *b; Lisp_Object tail, buf, hook; - int auto_saved = 0; + bool auto_saved = 0; int do_handled_files; Lisp_Object oquit; FILE *stream = NULL; ptrdiff_t count = SPECPDL_INDEX (); - int orig_minibuffer_auto_raise = minibuffer_auto_raise; + bool orig_minibuffer_auto_raise = minibuffer_auto_raise; bool old_message_p = 0; struct gcpro gcpro1, gcpro2; @@ -5452,7 +5439,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) if (!auto_saved && NILP (no_message)) message1 ("Auto-saving..."); internal_condition_case (auto_save_1, Qt, auto_save_error); - auto_saved++; + auto_saved = 1; BUF_AUTOSAVE_MODIFF (b) = BUF_MODIFF (b); XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); set_buffer_internal (old); diff --git a/src/filelock.c b/src/filelock.c index d21d8e7ba02..1f599c68912 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -100,10 +100,10 @@ along with GNU Emacs. If not, see . */ /* Return the time of the last system boot. */ static time_t boot_time; -static int boot_time_initialized; +static bool boot_time_initialized; #ifdef BOOT_TIME -static void get_boot_time_1 (const char *, int); +static void get_boot_time_1 (const char *, bool); #endif static time_t @@ -170,7 +170,7 @@ get_boot_time (void) { char cmd_string[sizeof WTMP_FILE ".19.gz"]; Lisp_Object tempname, filename; - int delete_flag = 0; + bool delete_flag = 0; filename = Qnil; @@ -225,13 +225,13 @@ get_boot_time (void) If FILENAME is zero, use the same file as before; if no FILENAME has ever been specified, this is the utmp file. - Use the newest reboot record if NEWEST is nonzero, + Use the newest reboot record if NEWEST, the first reboot record otherwise. Ignore all reboot records on or before BOOT_TIME. Success is indicated by setting BOOT_TIME to a larger value. */ void -get_boot_time_1 (const char *filename, int newest) +get_boot_time_1 (const char *filename, bool newest) { struct utmp ut, *utp; int desc; @@ -331,11 +331,11 @@ fill_in_lock_file_name (register char *lockfile, register Lisp_Object fn) } /* Lock the lock file named LFNAME. - If FORCE is nonzero, we do so even if it is already locked. - Return 1 if successful, 0 if not. */ + If FORCE, do so even if it is already locked. + Return true if successful. */ -static int -lock_file_1 (char *lfname, int force) +static bool +lock_file_1 (char *lfname, bool force) { int err; int symlink_errno; @@ -370,9 +370,9 @@ lock_file_1 (char *lfname, int force) return err == 0; } -/* Return 1 if times A and B are no more than one second apart. */ +/* Return true if times A and B are no more than one second apart. */ -static int +static bool within_one_second (time_t a, time_t b) { return (a - b >= -1 && a - b <= 1); @@ -491,7 +491,7 @@ current_lock_owner (lock_info_type *owner, char *lfname) static int lock_if_free (lock_info_type *clasher, register char *lfname) { - while (lock_file_1 (lfname, 0) == 0) + while (! lock_file_1 (lfname, 0)) { int locker; diff --git a/src/floatfns.c b/src/floatfns.c index cad071f1e15..706fe7ae1a0 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -103,10 +103,10 @@ extern double logb (double); static void float_error (); #endif -/* Nonzero while executing in floating point. +/* True while executing in floating point. This tells float_error what to do. */ -static int in_float; +static bool in_float; /* If an argument is out of range for a mathematical function, here is the actual argument value to use in the error message. diff --git a/src/fns.c b/src/fns.c index fc0044106cd..20770af67d4 100644 --- a/src/fns.c +++ b/src/fns.c @@ -51,7 +51,7 @@ static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512; -static int internal_equal (Lisp_Object , Lisp_Object, int, int); +static bool internal_equal (Lisp_Object, Lisp_Object, int, bool); DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, doc: /* Return the argument unchanged. */) @@ -352,7 +352,7 @@ Symbols are also allowed; their print names are used instead. */) } static Lisp_Object concat (ptrdiff_t nargs, Lisp_Object *args, - enum Lisp_Type target_type, int last_special); + enum Lisp_Type target_type, bool last_special); /* ARGSUSED */ Lisp_Object @@ -450,19 +450,19 @@ struct textprop_rec static Lisp_Object concat (ptrdiff_t nargs, Lisp_Object *args, - enum Lisp_Type target_type, int last_special) + enum Lisp_Type target_type, bool last_special) { Lisp_Object val; - register Lisp_Object tail; - register Lisp_Object this; + Lisp_Object tail; + Lisp_Object this; ptrdiff_t toindex; ptrdiff_t toindex_byte = 0; - register EMACS_INT result_len; - register EMACS_INT result_len_byte; + EMACS_INT result_len; + EMACS_INT result_len_byte; ptrdiff_t argnum; Lisp_Object last_tail; Lisp_Object prev; - int some_multibyte; + bool some_multibyte; /* When we make a multibyte string, we can't copy text properties while concatenating each string because the length of resulting string can't be decided until we finish the whole concatenation. @@ -1988,10 +1988,10 @@ of strings. (`equal' ignores text properties.) */) /* DEPTH is current depth of recursion. Signal an error if it gets too deep. - PROPS, if non-nil, means compare string text properties too. */ + PROPS means compare string text properties too. */ -static int -internal_equal (register Lisp_Object o1, register Lisp_Object o2, int depth, int props) +static bool +internal_equal (Lisp_Object o1, Lisp_Object o2, int depth, bool props) { if (depth > 200) error ("Stack overflow in equal"); @@ -2589,9 +2589,9 @@ Normally the return value is FEATURE. The normal messages at start and end of loading FILENAME are suppressed. */) (Lisp_Object feature, Lisp_Object filename, Lisp_Object noerror) { - register Lisp_Object tem; + Lisp_Object tem; struct gcpro gcpro1, gcpro2; - int from_file = load_in_progress; + bool from_file = load_in_progress; CHECK_SYMBOL (feature); @@ -2917,8 +2917,8 @@ static const short base64_char_to_value[128] = base64 characters. */ -static ptrdiff_t base64_encode_1 (const char *, char *, ptrdiff_t, int, int); -static ptrdiff_t base64_decode_1 (const char *, char *, ptrdiff_t, int, +static ptrdiff_t base64_encode_1 (const char *, char *, ptrdiff_t, bool, bool); +static ptrdiff_t base64_decode_1 (const char *, char *, ptrdiff_t, bool, ptrdiff_t *); DEFUN ("base64-encode-region", Fbase64_encode_region, Sbase64_encode_region, @@ -3026,7 +3026,7 @@ into shorter lines. */) static ptrdiff_t base64_encode_1 (const char *from, char *to, ptrdiff_t length, - int line_break, int multibyte) + bool line_break, bool multibyte) { int counter = 0; ptrdiff_t i = 0; @@ -3133,7 +3133,7 @@ If the region can't be decoded, signal an error and don't modify the buffer. */ ptrdiff_t old_pos = PT; ptrdiff_t decoded_length; ptrdiff_t inserted_chars; - int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); + bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); USE_SAFE_ALLOCA; validate_region (&beg, &end); @@ -3218,13 +3218,13 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string, } /* Base64-decode the data at FROM of LENGTH bytes into TO. If - MULTIBYTE is nonzero, the decoded result should be in multibyte + MULTIBYTE, the decoded result should be in multibyte form. If NCHARS_RETURN is not NULL, store the number of produced characters in *NCHARS_RETURN. */ static ptrdiff_t base64_decode_1 (const char *from, char *to, ptrdiff_t length, - int multibyte, ptrdiff_t *nchars_return) + bool multibyte, ptrdiff_t *nchars_return) { ptrdiff_t i = 0; /* Used inside READ_QUADRUPLET_BYTE */ char *e = to; @@ -3340,7 +3340,7 @@ static Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); static ptrdiff_t get_key_arg (Lisp_Object, ptrdiff_t, Lisp_Object *, char *); static void maybe_resize_hash_table (struct Lisp_Hash_Table *); -static int sweep_weak_table (struct Lisp_Hash_Table *, int); +static bool sweep_weak_table (struct Lisp_Hash_Table *, bool); @@ -3432,10 +3432,10 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max) ***********************************************************************/ /* Compare KEY1 which has hash code HASH1 and KEY2 with hash code - HASH2 in hash table H using `eql'. Value is non-zero if KEY1 and + HASH2 in hash table H using `eql'. Value is true if KEY1 and KEY2 are the same. */ -static int +static bool cmpfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key1, EMACS_UINT hash1, Lisp_Object key2, EMACS_UINT hash2) @@ -3447,10 +3447,10 @@ cmpfn_eql (struct Lisp_Hash_Table *h, /* Compare KEY1 which has hash code HASH1 and KEY2 with hash code - HASH2 in hash table H using `equal'. Value is non-zero if KEY1 and + HASH2 in hash table H using `equal'. Value is true if KEY1 and KEY2 are the same. */ -static int +static bool cmpfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key1, EMACS_UINT hash1, Lisp_Object key2, EMACS_UINT hash2) @@ -3460,10 +3460,10 @@ cmpfn_equal (struct Lisp_Hash_Table *h, /* Compare KEY1 which has hash code HASH1, and KEY2 with hash code - HASH2 in hash table H using H->user_cmp_function. Value is non-zero + HASH2 in hash table H using H->user_cmp_function. Value is true if KEY1 and KEY2 are the same. */ -static int +static bool cmpfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key1, EMACS_UINT hash1, Lisp_Object key2, EMACS_UINT hash2) @@ -3923,16 +3923,16 @@ hash_clear (struct Lisp_Hash_Table *h) Weak Hash Tables ************************************************************************/ -/* Sweep weak hash table H. REMOVE_ENTRIES_P non-zero means remove +/* Sweep weak hash table H. REMOVE_ENTRIES_P means remove entries from the table that don't survive the current GC. - REMOVE_ENTRIES_P zero means mark entries that are in use. Value is - non-zero if anything was marked. */ + !REMOVE_ENTRIES_P means mark entries that are in use. Value is + true if anything was marked. */ -static int -sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p) +static bool +sweep_weak_table (struct Lisp_Hash_Table *h, bool remove_entries_p) { ptrdiff_t bucket, n; - int marked; + bool marked; n = ASIZE (h->index) & ~ARRAY_MARK_FLAG; marked = 0; @@ -3949,7 +3949,7 @@ sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p) ptrdiff_t i = XFASTINT (idx); bool key_known_to_survive_p = survives_gc_p (HASH_KEY (h, i)); bool value_known_to_survive_p = survives_gc_p (HASH_VALUE (h, i)); - int remove_p; + bool remove_p; if (EQ (h->weak, Qkey)) remove_p = !key_known_to_survive_p; @@ -4022,7 +4022,7 @@ void sweep_weak_hash_tables (void) { struct Lisp_Hash_Table *h, *used, *next; - int marked; + bool marked; /* Mark all keys and values that are in use. Keep on marking until there is no more change. This is necessary for cases like @@ -4674,7 +4674,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_ coding_system = Vcoding_system_for_write; else { - int force_raw_text = 0; + bool force_raw_text = 0; coding_system = BVAR (XBUFFER (object), buffer_file_coding_system); if (NILP (coding_system) diff --git a/src/lisp.h b/src/lisp.h index 78c418f3051..a8ed4b6cabc 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1205,9 +1205,9 @@ struct Lisp_Hash_Table struct Lisp_Hash_Table *next_weak; /* C function to compare two keys. */ - int (*cmpfn) (struct Lisp_Hash_Table *, - Lisp_Object, EMACS_UINT, - Lisp_Object, EMACS_UINT); + bool (*cmpfn) (struct Lisp_Hash_Table *, + Lisp_Object, EMACS_UINT, + Lisp_Object, EMACS_UINT); /* C function to compute hash code. */ EMACS_UINT (*hashfn) (struct Lisp_Hash_Table *, Lisp_Object); @@ -3151,9 +3151,9 @@ EXFUN (Fread_file_name, 6); /* not a normal DEFUN */ extern Lisp_Object close_file_unwind (Lisp_Object); extern Lisp_Object restore_point_unwind (Lisp_Object); extern _Noreturn void report_file_error (const char *, Lisp_Object); -extern int internal_delete_file (Lisp_Object); +extern void internal_delete_file (Lisp_Object); extern void syms_of_fileio (void); -extern Lisp_Object make_temp_name (Lisp_Object, int); +extern Lisp_Object make_temp_name (Lisp_Object, bool); extern Lisp_Object Qdelete_file; /* Defined in search.c */ diff --git a/src/window.c b/src/window.c index 08608e0d451..1869a3b65cf 100644 --- a/src/window.c +++ b/src/window.c @@ -6576,15 +6576,17 @@ freeze_window_starts (struct frame *f, int freeze_p) /* Return 1 if window configurations CONFIGURATION1 and CONFIGURATION2 describe the same state of affairs. This is used by Fequal. - ignore_positions non-zero means ignore non-matching scroll positions + IGNORE_POSITIONS means ignore non-matching scroll positions and the like. This ignores a couple of things like the dedication status of window, combination_limit and the like. This might have to be fixed. */ -int -compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) +bool +compare_window_configurations (Lisp_Object configuration1, + Lisp_Object configuration2, + bool ignore_positions) { register struct save_window_data *d1, *d2; struct Lisp_Vector *sws1, *sws2; diff --git a/src/window.h b/src/window.h index dfb88b2cf3c..f0a3a15f442 100644 --- a/src/window.h +++ b/src/window.h @@ -973,7 +973,7 @@ extern Lisp_Object Qwindowp, Qwindow_live_p; extern Lisp_Object Vwindow_list; extern struct window *decode_live_window (Lisp_Object); -extern int compare_window_configurations (Lisp_Object, Lisp_Object, int); +extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); extern void mark_window_cursors_off (struct window *); extern int window_internal_height (struct window *); extern int window_body_cols (struct window *w); From ef6544601a7305acb1690e3a790bb00f5366c674 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 5 Sep 2012 11:22:20 +0200 Subject: [PATCH 034/216] Provide support for fitting frames to buffers. * help.el (temp-buffer-max-height): New default value. (temp-buffer-resize-frames): New option. (resize-temp-buffer-window): Optionally resize frame. * window.el (fit-frame-to-buffer-bottom-margin): New option. (fit-frame-to-buffer): New function. --- etc/NEWS | 5 +++ lisp/ChangeLog | 9 ++++++ lisp/help.el | 35 ++++++++++++++++++--- lisp/window.el | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 126 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e137ebc0665..5ddb4ed4a1e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -645,6 +645,11 @@ now accept a third argument to avoid choosing the selected window. *** New macro with-temp-buffer-window. +*** New option temp-buffer-resize-frames. + +*** New function fit-frame-to-buffer and new option + fit-frame-to-buffer-bottom-margin. + *** New display action function display-buffer-below-selected. *** New display action alist `inhibit-switch-frame', if non-nil, tells diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 817175ebfeb..23cb32e1464 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2012-09-05 Martin Rudalics + + * help.el (temp-buffer-max-height): New default value. + (temp-buffer-resize-frames): New option. + (resize-temp-buffer-window): Optionally resize frame. + + * window.el (fit-frame-to-buffer-bottom-margin): New option. + (fit-frame-to-buffer): New function. + 2012-09-05 Glenn Morris * emulation/cua-rect.el (cua--init-rectangles): diff --git a/lisp/help.el b/lisp/help.el index 9740f8996c1..cacbf185963 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -962,7 +962,11 @@ is currently activated with completion." result)) ;;; Automatic resizing of temporary buffers. -(defcustom temp-buffer-max-height (lambda (buffer) (/ (- (frame-height) 2) 2)) +(defcustom temp-buffer-max-height + (lambda (buffer) + (if (eq (selected-window) (frame-root-window)) + (/ (x-display-pixel-height) (frame-char-height) 2) + (/ (- (frame-height) 2) 2))) "Maximum height of a window displaying a temporary buffer. This is effective only when Temp Buffer Resize mode is enabled. The value is the maximum height (in lines) which @@ -973,7 +977,16 @@ buffer, and should return a positive integer. At the time the function is called, the window to be resized is selected." :type '(choice integer function) :group 'help - :version "20.4") + :version "24.2") + +(defcustom temp-buffer-resize-frames nil + "Non-nil means `temp-buffer-resize-mode' can resize frames. +A frame can be resized if and only if its root window is a live +window. The height of the root window is subject to the values of +`temp-buffer-max-height' and `window-min-height'." + :type 'boolean + :version "24.2" + :group 'help) (define-minor-mode temp-buffer-resize-mode "Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode). @@ -1008,9 +1021,21 @@ view." (with-selected-window window (funcall temp-buffer-max-height (window-buffer))) temp-buffer-max-height))) - (when (and (pos-visible-in-window-p (point-min) window) - (window-combined-p window)) - (fit-window-to-buffer window height)))) + (cond + ((and (pos-visible-in-window-p (point-min) window) + (window-combined-p window)) + (fit-window-to-buffer window height)) + ((and temp-buffer-resize-frames + (eq window (frame-root-window window)) + (memq (car (window-parameter window 'quit-restore)) + ;; If 'same is too strong, we might additionally check + ;; whether the second element is 'frame. + '(same frame))) + (let ((frame (window-frame window))) + (fit-frame-to-buffer + frame (+ (frame-height frame) + (- (window-total-size window)) + height))))))) ;;; Help windows. (defcustom help-window-select 'other diff --git a/lisp/window.el b/lisp/window.el index f73c85e991b..66b86f45e77 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5918,6 +5918,88 @@ WINDOW was scrolled." (error (setq delta nil))) delta)))) +(defcustom fit-frame-to-buffer-bottom-margin 4 + "Bottom margin for `fit-frame-to-buffer'. +This is the number of lines `fit-frame-to-buffer' leaves free at the +bottom of the display in order to not obscure the system task bar." + :type 'integer + :version "24.2" + :group 'windows) + +(defun fit-frame-to-buffer (&optional frame max-height min-height) + "Adjust height of FRAME to display its buffer's contents exactly. +FRAME can be any live frame and defaults to the selected one. + +Optional argument MAX-HEIGHT specifies the maximum height of +FRAME and defaults to the height of the display below the current +top line of FRAME minus FIT-FRAME-TO-BUFFER-BOTTOM-MARGIN. +Optional argument MIN-HEIGHT specifies the minimum height of +FRAME." + (interactive) + (setq frame (window-normalize-frame frame)) + (let* ((root (frame-root-window frame)) + (frame-min-height + (+ (- (frame-height frame) (window-total-size root)) + window-min-height)) + (frame-top (frame-parameter frame 'top)) + (top (if (consp frame-top) + (funcall (car frame-top) (cadr frame-top)) + frame-top)) + (frame-max-height + (- (/ (- (x-display-pixel-height frame) top) + (frame-char-height frame)) + fit-frame-to-buffer-bottom-margin)) + (compensate 0) + delta) + (when (and (window-live-p root) (not (window-size-fixed-p root))) + (with-selected-window root + (cond + ((not max-height) + (setq max-height frame-max-height)) + ((numberp max-height) + (setq max-height (min max-height frame-max-height))) + (t + (error "%s is an invalid maximum height" max-height))) + (cond + ((not min-height) + (setq min-height frame-min-height)) + ((numberp min-height) + (setq min-height (min min-height frame-min-height))) + (t + (error "%s is an invalid minimum height" min-height))) + ;; When tool-bar-mode is enabled and we have just created a new + ;; frame, reserve lines for toolbar resizing. This is needed + ;; because for reasons unknown to me Emacs (1) reserves one line + ;; for the toolbar when making the initial frame and toolbars + ;; are enabled, and (2) later adds the remaining lines needed. + ;; Our code runs IN BETWEEN (1) and (2). YMMV when you're on a + ;; system that behaves differently. + (let ((quit-restore (window-parameter root 'quit-restore)) + (lines (tool-bar-lines-needed frame))) + (when (and quit-restore (eq (car quit-restore) 'frame) + (not (zerop lines))) + (setq compensate (1- lines)))) + (message "%s" compensate) + (setq delta + ;; Always count a final newline - we don't do any + ;; post-processing, so let's play safe. + (+ (count-screen-lines nil nil t) + (- (window-body-size)) + compensate))) + ;; Move away from final newline. + (when (and (eobp) (bolp) (not (bobp))) + (set-window-point root (line-beginning-position 0))) + (set-window-start root (point-min)) + (set-window-vscroll root 0) + (condition-case nil + (set-frame-height + frame + (min (max (+ (frame-height frame) delta) + min-height) + max-height)) + (error (setq delta nil)))) + delta)) + (defun window-safely-shrinkable-p (&optional window) "Return t if WINDOW can be shrunk without shrinking other windows. WINDOW defaults to the selected window." From e4996ae924960b92743d3e677aea6be7f9aac94d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 5 Sep 2012 06:17:38 -0400 Subject: [PATCH 035/216] Auto-commit of generated files. --- autogen/config.in | 3 --- autogen/configure | 6 ------ 2 files changed, 9 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index 59bc8dca231..b6f1ad1ed60 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -1179,9 +1179,6 @@ along with GNU Emacs. If not, see . */ `NO'. */ #undef NARROWPROTO -/* Do not define abort in emacs.c. */ -#undef NO_ABORT - /* Define if XEditRes should not be used. */ #undef NO_EDITRES diff --git a/autogen/configure b/autogen/configure index 885b6f4b471..5fbbf1185cc 100755 --- a/autogen/configure +++ b/autogen/configure @@ -14972,12 +14972,6 @@ $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h ;; - - darwin) - -$as_echo "#define NO_ABORT 1" >>confdefs.h - - ;; esac case $opsys in From c1ca42cae6eb3f13b0bf513c7131778cba228b8a Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 5 Sep 2012 16:55:03 +0400 Subject: [PATCH 036/216] * alloc.c (valid_lisp_object_p): Treat killed buffers, buffer_defaults and buffer_local_symbols as valid objects. Return special value to denote them. --- src/ChangeLog | 6 ++++++ src/alloc.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cb4f1071c70..3d2e25f7828 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-05 Dmitry Antipov + + * alloc.c (valid_lisp_object_p): Treat killed buffers, + buffer_defaults and buffer_local_symbols as valid objects. + Return special value to denote them. + 2012-09-05 Paul Eggert * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean. diff --git a/src/alloc.c b/src/alloc.c index 157d3a1d799..80ab2d2cb97 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4981,7 +4981,8 @@ valid_pointer_p (void *p) #endif } -/* Return 1 if OBJ is a valid lisp object. +/* Return 2 if OBJ is a killed or special buffer object. + Return 1 if OBJ is a valid lisp object. Return 0 if OBJ is NOT a valid lisp object. Return -1 if we cannot validate OBJ. This function can be quite slow, @@ -5002,6 +5003,9 @@ valid_lisp_object_p (Lisp_Object obj) if (PURE_POINTER_P (p)) return 1; + if (p == &buffer_defaults || p == &buffer_local_symbols) + return 2; + #if !GC_MARK_STACK return valid_pointer_p (p); #else @@ -5027,7 +5031,7 @@ valid_lisp_object_p (Lisp_Object obj) return 0; case MEM_TYPE_BUFFER: - return live_buffer_p (m, p); + return live_buffer_p (m, p) ? 1 : 2; case MEM_TYPE_CONS: return live_cons_p (m, p); From 697e1e393c9cd70acf35da9700a25b6367b7da40 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 5 Sep 2012 19:34:45 +0400 Subject: [PATCH 037/216] Do not mark objects from deleted buffers, windows and frames. * alloc.c (mark_buffer): Mark just the buffer if it is dead. (mark_object): Likewise for windows and frames. --- src/ChangeLog | 6 +++++ src/alloc.c | 64 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3d2e25f7828..a0c3f3537bb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-05 Dmitry Antipov + + Do not mark objects from deleted buffers, windows and frames. + * alloc.c (mark_buffer): Mark just the buffer if it is dead. + (mark_object): Likewise for windows and frames. + 2012-09-05 Dmitry Antipov * alloc.c (valid_lisp_object_p): Treat killed buffers, diff --git a/src/alloc.c b/src/alloc.c index 80ab2d2cb97..e90cca637df 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5838,23 +5838,29 @@ mark_overlay (struct Lisp_Overlay *ptr) static void mark_buffer (struct buffer *buffer) { - /* This is handled much like other pseudovectors... */ - mark_vectorlike ((struct Lisp_Vector *) buffer); + if (NILP (BVAR (buffer, name))) + /* If the buffer is killed, mark just the buffer itself. */ + VECTOR_MARK (buffer); + else + { + /* This is handled much like other pseudovectors... */ + mark_vectorlike ((struct Lisp_Vector *) buffer); - /* ...but there are some buffer-specific things. */ + /* ...but there are some buffer-specific things. */ - MARK_INTERVAL_TREE (buffer_intervals (buffer)); + MARK_INTERVAL_TREE (buffer_intervals (buffer)); - /* For now, we just don't mark the undo_list. It's done later in - a special way just before the sweep phase, and after stripping - some of its elements that are not needed any more. */ + /* For now, we just don't mark the undo_list. It's done later in + a special way just before the sweep phase, and after stripping + some of its elements that are not needed any more. */ - mark_overlay (buffer->overlays_before); - mark_overlay (buffer->overlays_after); + mark_overlay (buffer->overlays_before); + mark_overlay (buffer->overlays_after); - /* If this is an indirect buffer, mark its base buffer. */ - if (buffer->base_buffer && !VECTOR_MARKED_P (buffer->base_buffer)) - mark_buffer (buffer->base_buffer); + /* If this is an indirect buffer, mark its base buffer. */ + if (buffer->base_buffer && !VECTOR_MARKED_P (buffer->base_buffer)) + mark_buffer (buffer->base_buffer); + } } /* Determine type of generic Lisp_Object and mark it accordingly. */ @@ -5997,24 +6003,38 @@ mark_object (Lisp_Object arg) case PVEC_FRAME: { - mark_vectorlike (ptr); - mark_face_cache (((struct frame *) ptr)->face_cache); + struct frame *f = (struct frame *) ptr; + + if (FRAME_LIVE_P (f)) + { + mark_vectorlike (ptr); + mark_face_cache (f->face_cache); + } + else + /* If the frame is deleted, mark just the frame itself. */ + VECTOR_MARK (ptr); } break; case PVEC_WINDOW: { struct window *w = (struct window *) ptr; + bool leaf = NILP (w->hchild) && NILP (w->vchild); - mark_vectorlike (ptr); - /* Mark glyphs for leaf windows. Marking window - matrices is sufficient because frame matrices - use the same glyph memory. */ - if (NILP (w->hchild) && NILP (w->vchild) - && w->current_matrix) + if (leaf && NILP (w->buffer)) + /* If the window is deleted, mark just the window itself. */ + VECTOR_MARK (ptr); + else { - mark_glyph_matrix (w->current_matrix); - mark_glyph_matrix (w->desired_matrix); + mark_vectorlike (ptr); + /* Mark glyphs for leaf windows. Marking window + matrices is sufficient because frame matrices + use the same glyph memory. */ + if (leaf && w->current_matrix) + { + mark_glyph_matrix (w->current_matrix); + mark_glyph_matrix (w->desired_matrix); + } } } break; From e3ccf108a942456b3ce4540e8691e5d08c00b720 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 5 Sep 2012 21:05:32 +0400 Subject: [PATCH 038/216] Remove redundant or unused things here and there. * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove. * conf_post.h (RE_TRANSLATE): Use char_table_translate. * editfns.c (Fcompare_buffer_substrings): Likewise. * frame.h (struct terminal, struct font_driver_list): Remove redundant declarations. * window.h (Qleft, Qright): Likewise. --- src/ChangeLog | 10 ++++++++++ src/conf_post.h | 2 +- src/editfns.c | 4 ++-- src/frame.h | 3 --- src/lisp.h | 34 ---------------------------------- src/window.h | 2 -- 6 files changed, 13 insertions(+), 42 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a0c3f3537bb..96e3fdd5b45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2012-09-05 Dmitry Antipov + + Remove redundant or unused things here and there. + * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove. + * conf_post.h (RE_TRANSLATE): Use char_table_translate. + * editfns.c (Fcompare_buffer_substrings): Likewise. + * frame.h (struct terminal, struct font_driver_list): + Remove redundant declarations. + * window.h (Qleft, Qright): Likewise. + 2012-09-05 Dmitry Antipov Do not mark objects from deleted buffers, windows and frames. diff --git a/src/conf_post.h b/src/conf_post.h index ead7298e98d..cef55863752 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -167,7 +167,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #ifdef emacs /* Don't do this for lib-src. */ /* Tell regex.c to use a type compatible with Emacs. */ #define RE_TRANSLATE_TYPE Lisp_Object -#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) +#define RE_TRANSLATE(TBL, C) char_table_translate (TBL, C) #ifdef make_number /* If make_number is a macro, use it. */ #define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0))) diff --git a/src/editfns.c b/src/editfns.c index 2d1a3cbfa0c..65baaf4e3f8 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2783,8 +2783,8 @@ determines whether case is significant or ignored. */) if (!NILP (trt)) { - c1 = CHAR_TABLE_TRANSLATE (trt, c1); - c2 = CHAR_TABLE_TRANSLATE (trt, c2); + c1 = char_table_translate (trt, c1); + c2 = char_table_translate (trt, c2); } if (c1 < c2) return make_number (- 1 - chars); diff --git a/src/frame.h b/src/frame.h index 94498e9efcf..661ea2ea67c 100644 --- a/src/frame.h +++ b/src/frame.h @@ -81,9 +81,6 @@ enum fullscreen_type #define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel) #define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel) -struct terminal; - -struct font_driver_list; struct frame { diff --git a/src/lisp.h b/src/lisp.h index a8ed4b6cabc..bc622ba5212 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -909,14 +909,6 @@ enum (ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \ : char_table_ref ((CT), (IDX))) -/* Almost equivalent to Faref (CT, IDX). However, if the result is - not a character, return IDX. - - For these characters, do not check validity of CT - and do not follow parent. */ -#define CHAR_TABLE_TRANSLATE(CT, IDX) \ - char_table_translate (CT, IDX) - /* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and 8-bit European characters. Do not check validity of CT. */ #define CHAR_TABLE_SET(CT, IDX, VAL) \ @@ -3556,32 +3548,6 @@ extern void init_system_name (void); #define make_fixnum_or_float(val) \ (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val)) - -/* Checks the `cycle check' variable CHECK to see if it indicates that - EL is part of a cycle; CHECK must be either Qnil or a value returned - by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of - elements after which a cycle might be suspected; after that many - elements, this macro begins consing in order to keep more precise - track of elements. - - Returns nil if a cycle was detected, otherwise a new value for CHECK - that includes EL. - - CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so - the caller should make sure that's ok. */ - -#define CYCLE_CHECK(check, el, suspicious) \ - (NILP (check) \ - ? make_number (0) \ - : (INTEGERP (check) \ - ? (XFASTINT (check) < (suspicious) \ - ? make_number (XFASTINT (check) + 1) \ - : Fcons (el, Qnil)) \ - : (!NILP (Fmemq ((el), (check))) \ - ? Qnil \ - : Fcons ((el), (check))))) - - /* SAFE_ALLOCA normally allocates memory on the stack, but if size is larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */ diff --git a/src/window.h b/src/window.h index f0a3a15f442..a70bc55bac5 100644 --- a/src/window.h +++ b/src/window.h @@ -27,8 +27,6 @@ INLINE_HEADER_BEGIN # define WINDOW_INLINE INLINE #endif -extern Lisp_Object Qleft, Qright; - /* Windows are allocated as if they were vectors, but then the Lisp data type is changed to Lisp_Window. They are garbage collected along with the vectors. From a4e6c042f8f66c47209d76d863adbf5ea3f84a96 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 5 Sep 2012 21:05:16 +0300 Subject: [PATCH 039/216] leim/quail/hebrew.el ("yiddish-royal"): Fix several bogus entries. --- leim/ChangeLog | 4 ++++ leim/quail/hebrew.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/leim/ChangeLog b/leim/ChangeLog index 5c29052d98b..6a67c99b5c0 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2012-09-05 Eli Zaretskii + + * quail/hebrew.el ("yiddish-royal"): Fix several bogus entries. + 2012-08-17 Daniel Bergey (tiny change) * quail/indian.el (quail-define-inscript-package): diff --git a/leim/quail/hebrew.el b/leim/quail/hebrew.el index aed9910000a..307f7fa0c28 100644 --- a/leim/quail/hebrew.el +++ b/leim/quail/hebrew.el @@ -773,9 +773,9 @@ Better for yiddish than Hebrew methods. ("@" ?,Y%(B) ; Double Low-9 Quotation Mark ("(" ?\)) ; mirroring (")" ?\() ; mirroring - ("Q" ?,A=(B) ; Right Double Quotation Mark - ("W" ?,A<(B) - ("E" ?,A>(B) ; Yiddish Double Yod (x2) + ("Q" ?,Y4(B) ; Left Double Quotation Mark + ("W" ?,Y!(B) ; Right Double Quotation Mark + ("E" ?$,1-2(B) ; Yiddish Double Yod (x2) ("R" [ ",H`$,1,W(B" ]) ; Patah Alef (Pasekh Alef) ; ("T" "") ("Y" ?$,1-1(B) ; Ligature Yiddish Vav Yod (vov yud) From 20ef56dbc88f517ebf60d89577fc89870d9fe888 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 5 Sep 2012 14:33:53 -0700 Subject: [PATCH 040/216] Fix race conditions with signal handlers and errno. Be more systematic about preserving errno whenever a signal handler returns, even if it's not in the main thread. Do this by renaming signal handlers to distinguish between signal delivery and signal handling. All uses changed. * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler. * data.c (deliver_arith_signal): Rename from arith_error. * dispnew.c (deliver_window_change_signal): Rename from window_change_signal. * emacs.c (deliver_error_signal): Rename from fatal_error_signal. (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal. * keyboard.c (deliver_input_available_signal): Rename from input_available_signal. (deliver_user_signal): Rename from handle_user_signal. (deliver_interrupt_signal): Rename from interrupt_signal. * process.c (deliver_pipe_signal): Rename from send_process_trap. (deliver_child_signal): Rename from sigchld_handler. * atimer.c (handle_alarm_signal): * data.c (handle_arith_signal): * dispnew.c (handle_window_change_signal): * emacs.c (handle_fatal_signal, handle_danger_signal): * keyboard.c (handle_input_available_signal): * keyboard.c (handle_user_signal, handle_interrupt_signal): * process.c (handle_pipe_signal, handle_child_signal): New functions, with the actual signal-handling code taken from the original respective signal handlers, sans the sporadic attempts to preserve errno, since that's now done by handle_on_main_thread. * atimer.c (alarm_signal_handler): Remove unnecessary decl. * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft. * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Move to sysdep.c. (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Move initialization of main_thread to sysdep.c's init_signals. * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for our usage, and simplifies the mainline code. (record_child_status_change): New static function, as a helper for handle_child_signal, and with most of the old child handler's contents. (CAN_HANDLE_MULTIPLE_CHILDREN): New constant. (handle_child_signal): Use the above. * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Moved here from emacs.c. (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it; code moved here from emacs.c's main function. * sysdep.c, syssignal.h (handle_on_main_thread): New function, replacing the old SIGNAL_THREAD_CHECK. All uses changed. This lets callers save and restore errno properly. --- src/ChangeLog | 50 +++++++++ src/atimer.c | 24 ++--- src/data.c | 17 ++-- src/dispnew.c | 20 ++-- src/emacs.c | 98 +++++++++--------- src/floatfns.c | 35 ------- src/keyboard.c | 56 +++++------ src/lisp.h | 3 - src/process.c | 262 ++++++++++++++++++++++++------------------------ src/sysdep.c | 38 +++++++ src/syssignal.h | 23 +---- 11 files changed, 328 insertions(+), 298 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 96e3fdd5b45..24d290e163d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,53 @@ +2012-09-05 Paul Eggert + + Fix race conditions with signal handlers and errno. + Be more systematic about preserving errno whenever a signal + handler returns, even if it's not in the main thread. Do this by + renaming signal handlers to distinguish between signal delivery + and signal handling. All uses changed. + * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler. + * data.c (deliver_arith_signal): Rename from arith_error. + * dispnew.c (deliver_window_change_signal): Rename from + window_change_signal. + * emacs.c (deliver_error_signal): Rename from fatal_error_signal. + (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal. + * keyboard.c (deliver_input_available_signal): Rename from + input_available_signal. + (deliver_user_signal): Rename from handle_user_signal. + (deliver_interrupt_signal): Rename from interrupt_signal. + * process.c (deliver_pipe_signal): Rename from send_process_trap. + (deliver_child_signal): Rename from sigchld_handler. + * atimer.c (handle_alarm_signal): + * data.c (handle_arith_signal): + * dispnew.c (handle_window_change_signal): + * emacs.c (handle_fatal_signal, handle_danger_signal): + * keyboard.c (handle_input_available_signal): + * keyboard.c (handle_user_signal, handle_interrupt_signal): + * process.c (handle_pipe_signal, handle_child_signal): + New functions, with the actual signal-handling code taken from the + original respective signal handlers, sans the sporadic attempts to + preserve errno, since that's now done by handle_on_main_thread. + * atimer.c (alarm_signal_handler): Remove unnecessary decl. + * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft. + * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: + Move to sysdep.c. + (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: + Move initialization of main_thread to sysdep.c's init_signals. + * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for + our usage, and simplifies the mainline code. + (record_child_status_change): New static function, as a helper + for handle_child_signal, and with most of the old child handler's + contents. + (CAN_HANDLE_MULTIPLE_CHILDREN): New constant. + (handle_child_signal): Use the above. + * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: + Moved here from emacs.c. + (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it; + code moved here from emacs.c's main function. + * sysdep.c, syssignal.h (handle_on_main_thread): New function, + replacing the old SIGNAL_THREAD_CHECK. All uses changed. This + lets callers save and restore errno properly. + 2012-09-05 Dmitry Antipov Remove redundant or unused things here and there. diff --git a/src/atimer.c b/src/atimer.c index eb3136ae55d..060dead9b17 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -41,7 +41,7 @@ static struct atimer *stopped_atimers; static struct atimer *atimers; -/* Non-zero means alarm_signal_handler has found ripe timers but +/* Non-zero means alarm signal handler has found ripe timers but interrupt_input_blocked was non-zero. In this case, timer functions are not called until the next UNBLOCK_INPUT because timer functions are expected to call X, and X cannot be assumed to be @@ -60,8 +60,6 @@ static void set_alarm (void); static void schedule_atimer (struct atimer *); static struct atimer *append_atimer_lists (struct atimer *, struct atimer *); -static void alarm_signal_handler (int signo); - /* Start a new atimer of type TYPE. TIME specifies when the timer is ripe. FN is the function to call when the timer fires. @@ -374,13 +372,9 @@ run_timers (void) /* Signal handler for SIGALRM. SIGNO is the signal number, i.e. SIGALRM. */ -void -alarm_signal_handler (int signo) +static void +handle_alarm_signal (int sig) { -#ifndef SYNC_INPUT - SIGNAL_THREAD_CHECK (signo); -#endif - pending_atimers = 1; #ifdef SYNC_INPUT pending_signals = 1; @@ -389,8 +383,14 @@ alarm_signal_handler (int signo) #endif } +static void +deliver_alarm_signal (int sig) +{ + handle_on_main_thread (sig, handle_alarm_signal); +} -/* Call alarm_signal_handler for pending timers. */ + +/* Call alarm signal handler for pending timers. */ void do_pending_atimers (void) @@ -412,7 +412,7 @@ turn_on_atimers (bool on) { if (on) { - signal (SIGALRM, alarm_signal_handler); + signal (SIGALRM, deliver_alarm_signal); set_alarm (); } else @@ -426,5 +426,5 @@ init_atimer (void) free_atimers = stopped_atimers = atimers = NULL; pending_atimers = 0; /* pending_signals is initialized in init_keyboard.*/ - signal (SIGALRM, alarm_signal_handler); + signal (SIGALRM, deliver_alarm_signal); } diff --git a/src/data.c b/src/data.c index 415a8962350..6151d815b29 100644 --- a/src/data.c +++ b/src/data.c @@ -3207,18 +3207,19 @@ syms_of_data (void) XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; } -#ifndef FORWARD_SIGNAL_TO_MAIN_THREAD -_Noreturn -#endif -static void -arith_error (int signo) +static _Noreturn void +handle_arith_signal (int sig) { sigsetmask (SIGEMPTYMASK); - - SIGNAL_THREAD_CHECK (signo); xsignal0 (Qarith_error); } +static void +deliver_arith_signal (int sig) +{ + handle_on_main_thread (sig, handle_arith_signal); +} + void init_data (void) { @@ -3230,5 +3231,5 @@ init_data (void) if (!initialized) return; #endif /* CANNOT_DUMP */ - signal (SIGFPE, arith_error); + signal (SIGFPE, deliver_arith_signal); } diff --git a/src/dispnew.c b/src/dispnew.c index 17e6c85ac75..e02b33000d8 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5552,17 +5552,15 @@ marginal_area_string (struct window *w, enum window_part part, #ifdef SIGWINCH +static void deliver_window_change_signal (int); + static void -window_change_signal (int signalnum) /* If we don't have an argument, */ - /* some compilers complain in signal calls. */ +handle_window_change_signal (int sig) { int width, height; - int old_errno = errno; - struct tty_display_info *tty; - signal (SIGWINCH, window_change_signal); - SIGNAL_THREAD_CHECK (signalnum); + signal (SIGWINCH, deliver_window_change_signal); /* The frame size change obviously applies to a single termcap-controlled terminal, but we can't decide which. @@ -5591,8 +5589,12 @@ window_change_signal (int signalnum) /* If we don't have an argument, */ change_frame_size (XFRAME (frame), height, width, 0, 1, 0); } } +} - errno = old_errno; +static void +deliver_window_change_signal (int sig) +{ + handle_on_main_thread (sig, handle_window_change_signal); } #endif /* SIGWINCH */ @@ -5604,7 +5606,7 @@ window_change_signal (int signalnum) /* If we don't have an argument, */ void do_pending_window_change (bool safe) { - /* If window_change_signal should have run before, run it now. */ + /* If window change signal handler should have run before, run it now. */ if (redisplaying_p && !safe) return; @@ -6173,7 +6175,7 @@ init_display (void) #ifndef CANNOT_DUMP if (initialized) #endif /* CANNOT_DUMP */ - signal (SIGWINCH, window_change_signal); + signal (SIGWINCH, deliver_window_change_signal); #endif /* SIGWINCH */ /* If running as a daemon, no need to initialize any frames/terminal. */ diff --git a/src/emacs.c b/src/emacs.c index 18f249dc899..fc92b30af26 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -275,14 +275,6 @@ static int fatal_error_code; /* True if handling a fatal error already. */ bool fatal_error_in_progress; -#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD -/* When compiled with GTK and running under Gnome, - multiple threads may be created. Keep track of our main - thread to make sure signals are delivered to it (see syssignal.h). */ - -pthread_t main_thread; -#endif - #ifdef HAVE_NS /* NS autrelease pool, for memory management. */ static void *ns_pool; @@ -291,16 +283,18 @@ static void *ns_pool; /* Handle bus errors, invalid instruction, etc. */ -#ifndef FLOAT_CATCH_SIGILL -static -#endif -void -fatal_error_signal (int sig) +static void +handle_fatal_signal (int sig) { - SIGNAL_THREAD_CHECK (sig); fatal_error_backtrace (sig, 10); } +static void +deliver_fatal_signal (int sig) +{ + handle_on_main_thread (sig, handle_fatal_signal); +} + /* Report a fatal error due to signal SIG, output a backtrace of at most BACKTRACE_LIMIT lines, and exit. */ _Noreturn void @@ -340,17 +334,23 @@ fatal_error_backtrace (int sig, int backtrace_limit) #ifdef SIGDANGER /* Handler for SIGDANGER. */ -void -memory_warning_signal (int sig) -{ - signal (sig, memory_warning_signal); - SIGNAL_THREAD_CHECK (sig); +static void deliver_danger_signal (int); +static void +handle_danger_signal (int sig) +{ + signal (sig, deliver_danger_signal); malloc_warning ("Operating system warns that virtual memory is running low.\n"); /* It might be unsafe to call do_auto_save now. */ force_auto_save_soon (); } + +static void +deliver_danger_signal (int sig) +{ + handle_on_main_thread (sig, handle_danger_signal); +} #endif /* Code for dealing with Lisp access to the Unix command line. */ @@ -851,10 +851,6 @@ main (int argc, char **argv) # endif /* not SYNC_INPUT */ #endif /* not SYSTEM_MALLOC */ -#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD - main_thread = pthread_self (); -#endif /* FORWARD_SIGNAL_TO_MAIN_THREAD */ - #if defined (MSDOS) || defined (WINDOWSNT) /* We do all file input/output as binary files. When we need to translate newlines, we do that manually. */ @@ -1120,7 +1116,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem That makes nohup work. */ if (! noninteractive || signal (SIGHUP, SIG_IGN) != SIG_IGN) - signal (SIGHUP, fatal_error_signal); + signal (SIGHUP, deliver_fatal_signal); sigunblock (sigmask (SIGHUP)); } @@ -1135,9 +1131,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem /* Don't catch these signals in batch mode if dumping. On some machines, this sets static data that would make signal fail to work right when the dumped Emacs is run. */ - signal (SIGQUIT, fatal_error_signal); - signal (SIGILL, fatal_error_signal); - signal (SIGTRAP, fatal_error_signal); + signal (SIGQUIT, deliver_fatal_signal); + signal (SIGILL, deliver_fatal_signal); + signal (SIGTRAP, deliver_fatal_signal); #ifdef SIGUSR1 add_user_signal (SIGUSR1, "sigusr1"); #endif @@ -1145,68 +1141,68 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem add_user_signal (SIGUSR2, "sigusr2"); #endif #ifdef SIGABRT - signal (SIGABRT, fatal_error_signal); + signal (SIGABRT, deliver_fatal_signal); #endif #ifdef SIGHWE - signal (SIGHWE, fatal_error_signal); + signal (SIGHWE, deliver_fatal_signal); #endif #ifdef SIGPRE - signal (SIGPRE, fatal_error_signal); + signal (SIGPRE, deliver_fatal_signal); #endif #ifdef SIGORE - signal (SIGORE, fatal_error_signal); + signal (SIGORE, deliver_fatal_signal); #endif #ifdef SIGUME - signal (SIGUME, fatal_error_signal); + signal (SIGUME, deliver_fatal_signal); #endif #ifdef SIGDLK - signal (SIGDLK, fatal_error_signal); + signal (SIGDLK, deliver_fatal_signal); #endif #ifdef SIGCPULIM - signal (SIGCPULIM, fatal_error_signal); + signal (SIGCPULIM, deliver_fatal_signal); #endif #ifdef SIGIOT /* This is missing on some systems - OS/2, for example. */ - signal (SIGIOT, fatal_error_signal); + signal (SIGIOT, deliver_fatal_signal); #endif #ifdef SIGEMT - signal (SIGEMT, fatal_error_signal); + signal (SIGEMT, deliver_fatal_signal); #endif - signal (SIGFPE, fatal_error_signal); + signal (SIGFPE, deliver_fatal_signal); #ifdef SIGBUS - signal (SIGBUS, fatal_error_signal); + signal (SIGBUS, deliver_fatal_signal); #endif - signal (SIGSEGV, fatal_error_signal); + signal (SIGSEGV, deliver_fatal_signal); #ifdef SIGSYS - signal (SIGSYS, fatal_error_signal); + signal (SIGSYS, deliver_fatal_signal); #endif /* May need special treatment on MS-Windows. See http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01062.html Please update the doc of kill-emacs, kill-emacs-hook, and NEWS if you change this. */ - if (noninteractive) signal (SIGINT, fatal_error_signal); - signal (SIGTERM, fatal_error_signal); + if (noninteractive) signal (SIGINT, deliver_fatal_signal); + signal (SIGTERM, deliver_fatal_signal); #ifdef SIGXCPU - signal (SIGXCPU, fatal_error_signal); + signal (SIGXCPU, deliver_fatal_signal); #endif #ifdef SIGXFSZ - signal (SIGXFSZ, fatal_error_signal); + signal (SIGXFSZ, deliver_fatal_signal); #endif /* SIGXFSZ */ #ifdef SIGDANGER /* This just means available memory is getting low. */ - signal (SIGDANGER, memory_warning_signal); + signal (SIGDANGER, deliver_danger_signal); #endif #ifdef AIX /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */ - signal (SIGXCPU, fatal_error_signal); - signal (SIGIOINT, fatal_error_signal); - signal (SIGGRANT, fatal_error_signal); - signal (SIGRETRACT, fatal_error_signal); - signal (SIGSOUND, fatal_error_signal); - signal (SIGMSG, fatal_error_signal); + signal (SIGXCPU, deliver_fatal_signal); + signal (SIGIOINT, deliver_fatal_signal); + signal (SIGGRANT, deliver_fatal_signal); + signal (SIGRETRACT, deliver_fatal_signal); + signal (SIGSOUND, deliver_fatal_signal); + signal (SIGMSG, deliver_fatal_signal); #endif /* AIX */ } diff --git a/src/floatfns.c b/src/floatfns.c index 706fe7ae1a0..f59cf58228a 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -37,9 +37,6 @@ along with GNU Emacs. If not, see . */ Define FLOAT_CHECK_ERRNO if the float library routines set errno. This has no effect if HAVE_MATHERR is defined. - Define FLOAT_CATCH_SIGILL if the float library routines signal SIGILL. - (What systems actually do this? Please let us know.) - Define FLOAT_CHECK_DOMAIN if the float library doesn't handle errors by either setting errno, or signaling SIGFPE/SIGILL. Otherwise, domain and range checking will happen before calling the float routines. This has @@ -99,10 +96,6 @@ extern double logb (double); # include #endif -#ifdef FLOAT_CATCH_SIGILL -static void float_error (); -#endif - /* True while executing in floating point. This tells float_error what to do. */ @@ -947,31 +940,6 @@ Rounds the value toward zero. */) return make_float (d); } -#ifdef FLOAT_CATCH_SIGILL -static void -float_error (int signo) -{ - if (! in_float) - fatal_error_signal (signo); - -#ifdef BSD_SYSTEM - sigsetmask (SIGEMPTYMASK); -#else - /* Must reestablish handler each time it is called. */ - signal (SIGILL, float_error); -#endif /* BSD_SYSTEM */ - - SIGNAL_THREAD_CHECK (signo); - in_float = 0; - - xsignal1 (Qarith_error, float_error_arg); -} - -/* Another idea was to replace the library function `infnan' - where SIGILL is signaled. */ - -#endif /* FLOAT_CATCH_SIGILL */ - #ifdef HAVE_MATHERR int matherr (struct exception *x) @@ -1006,9 +974,6 @@ matherr (struct exception *x) void init_floatfns (void) { -#ifdef FLOAT_CATCH_SIGILL - signal (SIGILL, float_error); -#endif in_float = 0; } diff --git a/src/keyboard.c b/src/keyboard.c index fe5372e008c..128f9280911 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -449,9 +449,8 @@ static void restore_getcjmp (jmp_buf); static Lisp_Object apply_modifiers (int, Lisp_Object); static void clear_event (struct input_event *); static Lisp_Object restore_kboard_configuration (Lisp_Object); -static void interrupt_signal (int signalnum); #ifdef SIGIO -static void input_available_signal (int signo); +static void deliver_input_available_signal (int signo); #endif static void handle_interrupt (void); static _Noreturn void quit_throw_to_read_char (int); @@ -459,7 +458,7 @@ static void process_special_events (void); static void timer_start_idle (void); static void timer_stop_idle (void); static void timer_resume_idle (void); -static void handle_user_signal (int); +static void deliver_user_signal (int); static char *find_user_signal_name (int); static int store_user_signal_events (void); @@ -3833,7 +3832,7 @@ kbd_buffer_get_event (KBOARD **kbp, unhold_keyboard_input (); #ifdef SIGIO if (!noninteractive) - signal (SIGIO, input_available_signal); + signal (SIGIO, deliver_input_available_signal); #endif /* SIGIO */ start_polling (); } @@ -7236,12 +7235,8 @@ process_pending_signals (void) /* Note SIGIO has been undef'd if FIONREAD is missing. */ static void -input_available_signal (int signo) +handle_input_available_signal (int sig) { - /* Must preserve main program's value of errno. */ - int old_errno = errno; - SIGNAL_THREAD_CHECK (signo); - #ifdef SYNC_INPUT interrupt_input_pending = 1; pending_signals = 1; @@ -7253,8 +7248,12 @@ input_available_signal (int signo) #ifndef SYNC_INPUT handle_async_input (); #endif +} - errno = old_errno; +static void +deliver_input_available_signal (int sig) +{ + handle_on_main_thread (sig, handle_input_available_signal); } #endif /* SIGIO */ @@ -7310,18 +7309,15 @@ add_user_signal (int sig, const char *name) p->next = user_signals; user_signals = p; - signal (sig, handle_user_signal); + signal (sig, deliver_user_signal); } static void handle_user_signal (int sig) { - int old_errno = errno; struct user_signal_info *p; const char *special_event_name = NULL; - SIGNAL_THREAD_CHECK (sig); - if (SYMBOLP (Vdebug_on_event)) special_event_name = SSDATA (SYMBOL_NAME (Vdebug_on_event)); @@ -7355,8 +7351,12 @@ handle_user_signal (int sig) } break; } +} - errno = old_errno; +static void +deliver_user_signal (int sig) +{ + handle_on_main_thread (sig, handle_user_signal); } static char * @@ -10776,17 +10776,10 @@ clear_waiting_for_input (void) Otherwise, tell QUIT to kill Emacs. */ static void -interrupt_signal (int signalnum) /* If we don't have an argument, some */ - /* compilers complain in signal calls. */ +handle_interrupt_signal (int sig) { - /* Must preserve main program's value of errno. */ - int old_errno = errno; - struct terminal *terminal; - - SIGNAL_THREAD_CHECK (signalnum); - /* See if we have an active terminal on our controlling tty. */ - terminal = get_named_tty ("/dev/tty"); + struct terminal *terminal = get_named_tty ("/dev/tty"); if (!terminal) { /* If there are no frames there, let's pretend that we are a @@ -10807,10 +10800,15 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */ handle_interrupt (); } - - errno = old_errno; } +static void +deliver_interrupt_signal (int sig) +{ + handle_on_main_thread (sig, handle_interrupt_signal); +} + + /* If Emacs is stuck because `inhibit-quit' is true, then keep track of the number of times C-g has been requested. If C-g is pressed enough times, then quit anyway. See bug#6585. */ @@ -11404,17 +11402,17 @@ init_keyboard (void) SIGINT. There is special code in interrupt_signal to exit Emacs on SIGINT when there are no termcap frames on the controlling terminal. */ - signal (SIGINT, interrupt_signal); + signal (SIGINT, deliver_interrupt_signal); #ifndef DOS_NT /* For systems with SysV TERMIO, C-g is set up for both SIGINT and SIGQUIT and we can't tell which one it will give us. */ - signal (SIGQUIT, interrupt_signal); + signal (SIGQUIT, deliver_interrupt_signal); #endif /* not DOS_NT */ } /* Note SIGIO has been undef'd if FIONREAD is missing. */ #ifdef SIGIO if (!noninteractive) - signal (SIGIO, input_available_signal); + signal (SIGIO, deliver_input_available_signal); #endif /* SIGIO */ /* Use interrupt input by default, if it works and noninterrupt input diff --git a/src/lisp.h b/src/lisp.h index bc622ba5212..28e8c1cd1e8 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3256,9 +3256,6 @@ extern bool display_arg; extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; -#ifdef FLOAT_CATCH_SIGILL -extern void fatal_error_signal (int); -#endif extern _Noreturn void fatal_error_backtrace (int, int); extern Lisp_Object Qkill_emacs; #if HAVE_SETLOCALE diff --git a/src/process.c b/src/process.c index 5677da36881..3a6615fb505 100644 --- a/src/process.c +++ b/src/process.c @@ -124,6 +124,14 @@ along with GNU Emacs. If not, see . */ #include "xgselect.h" #endif +#ifndef WNOHANG +# undef waitpid +# define waitpid(pid, status, options) wait (status) +#endif +#ifndef WUNTRACED +# define WUNTRACED 0 +#endif + /* Work around GCC 4.7.0 bug with strict overflow checking; see . These lines can be removed once the GCC bug is fixed. */ @@ -801,7 +809,7 @@ get_process (register Lisp_Object name) #ifdef SIGCHLD /* Fdelete_process promises to immediately forget about the process, but in reality, Emacs needs to remember those processes until they have been - treated by sigchld_handler; otherwise this handler would consider the + treated by the SIGCHLD handler; otherwise this handler would consider the process as being synchronous and say that the synchronous process is dead. */ static Lisp_Object deleted_pid_list; @@ -849,7 +857,8 @@ nil, indicating the current buffer's process. */) #endif { Fkill_process (process, Qnil); - /* Do this now, since remove_process will make sigchld_handler do nothing. */ + /* Do this now, since remove_process will make the + SIGCHLD handler do nothing. */ pset_status (p, Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil))); p->tick = ++process_tick; status_notify (p); @@ -1728,7 +1737,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) if (inchannel > max_process_desc) max_process_desc = inchannel; - /* Until we store the proper pid, enable sigchld_handler + /* Until we store the proper pid, enable the SIGCHLD handler to recognize an unknown pid as standing for this process. It is very important not to let this `marker' value stay in the table after this function has returned; if it does @@ -4956,8 +4965,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (p->pid == -2) { - /* If the EIO occurs on a pty, sigchld_handler's - waitpid() will not find the process object to + /* If the EIO occurs on a pty, the SIGCHLD handler's + waitpid call will not find the process object to delete. Do it here. */ p->tick = ++process_tick; pset_status (p, Qfailed); @@ -5422,18 +5431,19 @@ read_process_output (Lisp_Object proc, register int channel) static jmp_buf send_process_frame; static Lisp_Object process_sent_to; -#ifndef FORWARD_SIGNAL_TO_MAIN_THREAD -static _Noreturn void send_process_trap (int); -#endif - -static void -send_process_trap (int ignore) +static _Noreturn void +handle_pipe_signal (int sig) { - SIGNAL_THREAD_CHECK (SIGPIPE); sigunblock (sigmask (SIGPIPE)); _longjmp (send_process_frame, 1); } +static void +deliver_pipe_signal (int sig) +{ + handle_on_main_thread (sig, handle_pipe_signal); +} + /* In send_process, when a write fails temporarily, wait_reading_process_output is called. It may execute user code, e.g. timers, that attempts to write new data to the same process. @@ -5663,7 +5673,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, /* Send this batch, using one or more write calls. */ ptrdiff_t written = 0; int outfd = p->outfd; - old_sigpipe = (void (*) (int)) signal (SIGPIPE, send_process_trap); + old_sigpipe = signal (SIGPIPE, deliver_pipe_signal); #ifdef DATAGRAM_SOCKETS if (DATAGRAM_CHAN_P (outfd)) { @@ -6397,143 +6407,135 @@ process has been transmitted to the serial port. */) indirectly; if it does, that is a bug */ #ifdef SIGCHLD -static void -sigchld_handler (int signo) + +/* Record one child's changed status. Return true if a child was found. */ +static bool +record_child_status_change (void) { - int old_errno = errno; Lisp_Object proc; struct Lisp_Process *p; + pid_t pid; + int w; + Lisp_Object tail; - SIGNAL_THREAD_CHECK (signo); + do + pid = waitpid (-1, &w, WNOHANG | WUNTRACED); + while (pid < 0 && errno == EINTR); - while (1) + /* PID == 0 means no processes found, PID == -1 means a real failure. + Either way, we have done all our job. */ + if (pid <= 0) + return false; + + /* Find the process that signaled us, and record its status. */ + + /* The process can have been deleted by Fdelete_process. */ + for (tail = deleted_pid_list; CONSP (tail); tail = XCDR (tail)) { - pid_t pid; - int w; - Lisp_Object tail; - -#ifdef WNOHANG -#ifndef WUNTRACED -#define WUNTRACED 0 -#endif /* no WUNTRACED */ - /* Keep trying to get a status until we get a definitive result. */ - do + Lisp_Object xpid = XCAR (tail); + if ((INTEGERP (xpid) && pid == XINT (xpid)) + || (FLOATP (xpid) && pid == XFLOAT_DATA (xpid))) { - errno = 0; - pid = waitpid (-1, &w, WNOHANG | WUNTRACED); + XSETCAR (tail, Qnil); + return true; } - while (pid < 0 && errno == EINTR); + } - if (pid <= 0) - { - /* PID == 0 means no processes found, PID == -1 means a real - failure. We have done all our job, so return. */ - - errno = old_errno; - return; - } -#else - pid = wait (&w); -#endif /* no WNOHANG */ - - /* Find the process that signaled us, and record its status. */ - - /* The process can have been deleted by Fdelete_process. */ - for (tail = deleted_pid_list; CONSP (tail); tail = XCDR (tail)) - { - Lisp_Object xpid = XCAR (tail); - if ((INTEGERP (xpid) && pid == XINT (xpid)) - || (FLOATP (xpid) && pid == XFLOAT_DATA (xpid))) - { - XSETCAR (tail, Qnil); - goto sigchld_end_of_loop; - } - } - - /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ + /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ + p = 0; + for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) + { + proc = XCDR (XCAR (tail)); + p = XPROCESS (proc); + if (EQ (p->type, Qreal) && p->pid == pid) + break; p = 0; - for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) + } + + /* Look for an asynchronous process whose pid hasn't been filled + in yet. */ + if (! p) + for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) + { + proc = XCDR (XCAR (tail)); + p = XPROCESS (proc); + if (p->pid == -1) + break; + p = 0; + } + + /* Change the status of the process that was found. */ + if (p) + { + int clear_desc_flag = 0; + + p->tick = ++process_tick; + p->raw_status = w; + p->raw_status_new = 1; + + /* If process has terminated, stop waiting for its output. */ + if ((WIFSIGNALED (w) || WIFEXITED (w)) + && p->infd >= 0) + clear_desc_flag = 1; + + /* We use clear_desc_flag to avoid a compiler bug in Microsoft C. */ + if (clear_desc_flag) { - proc = XCDR (XCAR (tail)); - p = XPROCESS (proc); - if (EQ (p->type, Qreal) && p->pid == pid) - break; - p = 0; + FD_CLR (p->infd, &input_wait_mask); + FD_CLR (p->infd, &non_keyboard_wait_mask); } - /* Look for an asynchronous process whose pid hasn't been filled - in yet. */ - if (p == 0) - for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) - { - proc = XCDR (XCAR (tail)); - p = XPROCESS (proc); - if (p->pid == -1) - break; - p = 0; - } + /* Tell wait_reading_process_output that it needs to wake up and + look around. */ + if (input_available_clear_time) + *input_available_clear_time = make_emacs_time (0, 0); + } + /* There was no asynchronous process found for that pid: we have + a synchronous process. */ + else + { + synch_process_alive = 0; - /* Change the status of the process that was found. */ - if (p != 0) - { - int clear_desc_flag = 0; + /* Report the status of the synchronous process. */ + if (WIFEXITED (w)) + synch_process_retcode = WEXITSTATUS (w); + else if (WIFSIGNALED (w)) + synch_process_termsig = WTERMSIG (w); - p->tick = ++process_tick; - p->raw_status = w; - p->raw_status_new = 1; + /* Tell wait_reading_process_output that it needs to wake up and + look around. */ + if (input_available_clear_time) + *input_available_clear_time = make_emacs_time (0, 0); + } - /* If process has terminated, stop waiting for its output. */ - if ((WIFSIGNALED (w) || WIFEXITED (w)) - && p->infd >= 0) - clear_desc_flag = 1; + return true; +} - /* We use clear_desc_flag to avoid a compiler bug in Microsoft C. */ - if (clear_desc_flag) - { - FD_CLR (p->infd, &input_wait_mask); - FD_CLR (p->infd, &non_keyboard_wait_mask); - } - - /* Tell wait_reading_process_output that it needs to wake up and - look around. */ - if (input_available_clear_time) - *input_available_clear_time = make_emacs_time (0, 0); - } - - /* There was no asynchronous process found for that pid: we have - a synchronous process. */ - else - { - synch_process_alive = 0; - - /* Report the status of the synchronous process. */ - if (WIFEXITED (w)) - synch_process_retcode = WEXITSTATUS (w); - else if (WIFSIGNALED (w)) - synch_process_termsig = WTERMSIG (w); - - /* Tell wait_reading_process_output that it needs to wake up and - look around. */ - if (input_available_clear_time) - *input_available_clear_time = make_emacs_time (0, 0); - } - - sigchld_end_of_loop: - ; - - /* On some systems, we must return right away. - If any more processes want to signal us, we will - get another signal. - Otherwise (on systems that have WNOHANG), loop around - to use up all the processes that have something to tell us. */ +/* On some systems, the SIGCHLD handler must return right away. If + any more processes want to signal us, we will get another signal. + Otherwise, loop around to use up all the processes that have + something to tell us. */ #if (defined WINDOWSNT \ || (defined USG && !defined GNU_LINUX \ && !(defined HPUX && defined WNOHANG))) - errno = old_errno; - return; -#endif /* USG, but not HPUX with WNOHANG */ - } +enum { CAN_HANDLE_MULTIPLE_CHILDREN = 1 }; +#else +enum { CAN_HANDLE_MULTIPLE_CHILDREN = 0 }; +#endif + +static void +handle_child_signal (int sig) +{ + while (record_child_status_change () && CAN_HANDLE_MULTIPLE_CHILDREN) + continue; } + +static void +deliver_child_signal (int sig) +{ + handle_on_main_thread (sig, handle_child_signal); +} + #endif /* SIGCHLD */ @@ -7387,7 +7389,7 @@ init_process_emacs (void) #ifndef CANNOT_DUMP if (! noninteractive || initialized) #endif - signal (SIGCHLD, sigchld_handler); + signal (SIGCHLD, deliver_child_signal); #endif FD_ZERO (&input_wait_mask); diff --git a/src/sysdep.c b/src/sysdep.c index 1f4de194c64..42b8baf78e0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1551,6 +1551,40 @@ sys_sigsetmask (sigset_t new_mask) return (old_mask); } +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD +pthread_t main_thread; +#endif + +/* If we are on the main thread, handle the signal SIG with HANDLER. + Otherwise, redirect the signal to the main thread, blocking it from + this thread. POSIX says any thread can receive a signal that is + associated with a process, process group, or asynchronous event. + On GNU/Linux that is not true, but for other systems (FreeBSD at + least) it is. */ +void +handle_on_main_thread (int sig, signal_handler_t handler) +{ + /* Preserve errno, to avoid race conditions with signal handlers that + might change errno. Races can occur even in single-threaded hosts. */ + int old_errno = errno; + + bool on_main_thread = true; +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD + if (! pthread_equal (pthread_self (), main_thread)) + { + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, sig); + pthread_sigmask (SIG_BLOCK, &blocked, 0); + pthread_kill (main_thread, sig); + on_main_thread = false; + } +#endif + if (on_main_thread) + handler (sig); + + errno = old_errno; +} #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST static char *my_sys_siglist[NSIG]; @@ -1565,6 +1599,10 @@ init_signals (void) { sigemptyset (&empty_mask); +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD + main_thread = pthread_self (); +#endif + #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST if (! initialized) { diff --git a/src/syssignal.h b/src/syssignal.h index 71151ed4c6a..504aff43083 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -133,24 +133,5 @@ char *strsignal (int); #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD extern pthread_t main_thread; -#define SIGNAL_THREAD_CHECK(signo) \ - do { \ - if (!pthread_equal (pthread_self (), main_thread)) \ - { \ - /* POSIX says any thread can receive the signal. On GNU/Linux \ - that is not true, but for other systems (FreeBSD at least) \ - it is. So direct the signal to the correct thread and block \ - it from this thread. */ \ - sigset_t new_mask; \ - \ - sigemptyset (&new_mask); \ - sigaddset (&new_mask, signo); \ - pthread_sigmask (SIG_BLOCK, &new_mask, 0); \ - pthread_kill (main_thread, signo); \ - return; \ - } \ - } while (0) - -#else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ -#define SIGNAL_THREAD_CHECK(signo) -#endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ +void handle_on_main_thread (int, signal_handler_t); +#endif From 350a188850c4eeceab0220ba1f6fdf98f0f57e93 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Wed, 5 Sep 2012 22:35:32 +0000 Subject: [PATCH 041/216] Merge changes made in Gnus master 2012-09-05 Julien Danjou * gnus-srvr.el (gnus-server-open-server): Don't message on failure: this hide the real reason with a message giving absolutely no hint. 2012-09-05 Lars Ingebrigtsen * gnus-group.el (gnus-group-mark-article-read): Propagate the read mark to the backend (bug#11804). * message.el (message-insert-newsgroups): Don't insert newsgroup duplicates (bug#12275). 2012-09-05 John Wiegley * gnus.el (gnus-expand-group-parameters): Allow regexp substitutions in sieve rules. 2012-09-05 Jan Tatarik * gnus-score.el (gnus-score-decode-text-parts): Use #' for the local function. * gnus-logic.el (gnus-advanced-body): Allow scoring on decoded bodies. * gnus-score.el (gnus-score-decode-text-parts): Ditto. 2012-09-05 Magnus Henoch * nnmaildir.el: Make nnmaildir understand and write maildir flags. That is, rename files from "unique:2," to "unique:2,S" for "seen", etc. This should make nnmaildir more usable with offlineimap. --- lisp/gnus/ChangeLog | 33 +++++ lisp/gnus/gnus-group.el | 2 + lisp/gnus/gnus-logic.el | 73 +++++----- lisp/gnus/gnus-score.el | 231 ++++++++++++++++++-------------- lisp/gnus/gnus-srvr.el | 3 +- lisp/gnus/gnus.el | 45 +++++-- lisp/gnus/message.el | 32 ++++- lisp/gnus/nnmaildir.el | 286 ++++++++++++++++++++++++++++++---------- 8 files changed, 487 insertions(+), 218 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0587469a08e..c6220204511 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,36 @@ +2012-09-05 Julien Danjou + + * gnus-srvr.el (gnus-server-open-server): Don't message on failure: + this hide the real reason with a message giving absolutely no hint. + +2012-09-05 Lars Ingebrigtsen + + * gnus-group.el (gnus-group-mark-article-read): Propagate the read mark + to the backend (bug#11804). + + * message.el (message-insert-newsgroups): Don't insert newsgroup + duplicates (bug#12275). + +2012-09-05 John Wiegley + + * gnus.el (gnus-expand-group-parameters): Allow regexp substitutions in + sieve rules. + +2012-09-05 Jan Tatarik + + * gnus-score.el (gnus-score-decode-text-parts): Use #' for the local + function. + + * gnus-logic.el (gnus-advanced-body): Allow scoring on decoded bodies. + + * gnus-score.el (gnus-score-decode-text-parts): Ditto. + +2012-09-05 Magnus Henoch + + * nnmaildir.el: Make nnmaildir understand and write maildir flags. + That is, rename files from "unique:2," to "unique:2,S" for "seen", etc. + This should make nnmaildir more usable with offlineimap. + 2012-09-03 Lars Ingebrigtsen * gnus-notifications.el (gnus-notifications-notify): Use it. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2f6fc0ccd19..37e4470239e 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -4670,6 +4670,8 @@ you the groups that have both dormant articles and cached articles." (setq mark gnus-expirable-mark)) (setq mark (gnus-request-update-mark group article mark)) + (gnus-request-set-mark + group (list (list (list article) 'add '(read)))) (gnus-mark-article-as-read article mark) (setq gnus-newsgroup-active (gnus-active group)) (when active diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el index 954295438c9..a440b779930 100644 --- a/lisp/gnus/gnus-logic.el +++ b/lisp/gnus/gnus-logic.el @@ -180,46 +180,51 @@ (setq header "article")) (with-current-buffer nntp-server-buffer (let* ((request-func (cond ((string= "head" header) - 'gnus-request-head) - ((string= "body" header) - 'gnus-request-body) - (t 'gnus-request-article))) - ofunc article) + 'gnus-request-head) + ;; We need to peek at the headers to detect the + ;; content encoding + ((string= "body" header) + 'gnus-request-article) + (t 'gnus-request-article))) + ofunc article handles) ;; Not all backends support partial fetching. In that case, we ;; just fetch the entire article. (unless (gnus-check-backend-function - (intern (concat "request-" header)) - gnus-newsgroup-name) - (setq ofunc request-func) - (setq request-func 'gnus-request-article)) + (intern (concat "request-" header)) + gnus-newsgroup-name) + (setq ofunc request-func) + (setq request-func 'gnus-request-article)) (setq article (mail-header-number gnus-advanced-headers)) (gnus-message 7 "Scoring article %s..." article) (when (funcall request-func article gnus-newsgroup-name) - (goto-char (point-min)) - ;; If just parts of the article is to be searched and the - ;; backend didn't support partial fetching, we just narrow to - ;; the relevant parts. - (when ofunc - (if (eq ofunc 'gnus-request-head) - (narrow-to-region - (point) - (or (search-forward "\n\n" nil t) (point-max))) - (narrow-to-region - (or (search-forward "\n\n" nil t) (point)) - (point-max)))) - (let* ((case-fold-search (not (eq (downcase (symbol-name type)) - (symbol-name type)))) - (search-func - (cond ((memq type '(r R regexp Regexp)) - 're-search-forward) - ((memq type '(s S string String)) - 'search-forward) - (t - (error "Invalid match type: %s" type))))) - (goto-char (point-min)) - (prog1 - (funcall search-func match nil t) - (widen))))))) + (when (string= "body" header) + (setq handles (gnus-score-decode-text-parts))) + (goto-char (point-min)) + ;; If just parts of the article is to be searched and the + ;; backend didn't support partial fetching, we just narrow to + ;; the relevant parts. + (when ofunc + (if (eq ofunc 'gnus-request-head) + (narrow-to-region + (point) + (or (search-forward "\n\n" nil t) (point-max))) + (narrow-to-region + (or (search-forward "\n\n" nil t) (point)) + (point-max)))) + (let* ((case-fold-search (not (eq (downcase (symbol-name type)) + (symbol-name type)))) + (search-func + (cond ((memq type '(r R regexp Regexp)) + 're-search-forward) + ((memq type '(s S string String)) + 'search-forward) + (t + (error "Invalid match type: %s" type))))) + (goto-char (point-min)) + (prog1 + (funcall search-func match nil t) + (widen))) + (when handles (mm-destroy-parts handles)))))) (provide 'gnus-logic) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index f24d889216e..bc35cf3dea5 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1717,105 +1717,140 @@ score in `gnus-newsgroup-scored' by SCORE." (setq entries rest))))) nil) +(defun gnus-score-decode-text-parts () + (labels ((mm-text-parts (handle) + (cond ((stringp (car handle)) + (let ((parts (mapcan 'mm-text-parts (cdr handle)))) + (if (equal "multipart/alternative" (car handle)) + ;; pick the first supported alternative + (list (car parts)) + parts))) + + ((bufferp (car handle)) + (when (string-match "^text/" (mm-handle-media-type handle)) + (list handle))) + + (t (mapcan 'mm-text-parts handle)))) + (my-mm-display-part (handle) + (when handle + (save-restriction + (narrow-to-region (point) (point)) + (mm-display-inline handle) + (goto-char (point-max)))))) + + (let (;(mm-text-html-renderer 'w3m-standalone) + (handles (mm-dissect-buffer t))) + (save-excursion + (article-goto-body) + (delete-region (point) (point-max)) + (mapc #'my-mm-display-part (mm-text-parts handles)) + handles)))) + (defun gnus-score-body (scores header now expire &optional trace) - (if gnus-agent-fetching - nil - (save-excursion - (setq gnus-scores-articles - (sort gnus-scores-articles - (lambda (a1 a2) - (< (mail-header-number (car a1)) - (mail-header-number (car a2)))))) - (set-buffer nntp-server-buffer) - (save-restriction - (let* ((buffer-read-only nil) - (articles gnus-scores-articles) - (all-scores scores) - (request-func (cond ((string= "head" header) - 'gnus-request-head) - ((string= "body" header) - 'gnus-request-body) - (t 'gnus-request-article))) - entries alist ofunc article last) - (when articles - (setq last (mail-header-number (caar (last articles)))) - ;; Not all backends support partial fetching. In that case, - ;; we just fetch the entire article. - (unless (gnus-check-backend-function - (and (string-match "^gnus-" (symbol-name request-func)) - (intern (substring (symbol-name request-func) - (match-end 0)))) - gnus-newsgroup-name) - (setq ofunc request-func) - (setq request-func 'gnus-request-article)) - (while articles - (setq article (mail-header-number (caar articles))) - (gnus-message 7 "Scoring article %s of %s..." article last) - (widen) - (when (funcall request-func article gnus-newsgroup-name) - (goto-char (point-min)) - ;; If just parts of the article is to be searched, but the - ;; backend didn't support partial fetching, we just narrow - ;; to the relevant parts. - (when ofunc - (if (eq ofunc 'gnus-request-head) - (narrow-to-region - (point) - (or (search-forward "\n\n" nil t) (point-max))) - (narrow-to-region - (or (search-forward "\n\n" nil t) (point)) - (point-max)))) - (setq scores all-scores) - ;; Find matches. - (while scores - (setq alist (pop scores) - entries (assoc header alist)) - (while (cdr entries) ;First entry is the header index. - (let* ((rest (cdr entries)) - (kill (car rest)) - (match (nth 0 kill)) - (type (or (nth 3 kill) 's)) - (score (or (nth 1 kill) - gnus-score-interactive-default-score)) - (date (nth 2 kill)) - (found nil) - (case-fold-search - (not (or (eq type 'R) (eq type 'S) - (eq type 'Regexp) (eq type 'String)))) - (search-func - (cond ((or (eq type 'r) (eq type 'R) - (eq type 'regexp) (eq type 'Regexp)) - 're-search-forward) - ((or (eq type 's) (eq type 'S) - (eq type 'string) (eq type 'String)) - 'search-forward) - (t - (error "Invalid match type: %s" type))))) - (goto-char (point-min)) - (when (funcall search-func match nil t) - ;; Found a match, update scores. - (setcdr (car articles) (+ score (cdar articles))) - (setq found t) - (when trace - (push - (cons (car-safe (rassq alist gnus-score-cache)) - kill) - gnus-score-trace))) - ;; Update expire date - (unless trace - (cond - ((null date)) ;Permanent entry. - ((and found gnus-update-score-entry-dates) - ;; Match, update date. - (gnus-score-set 'touched '(t) alist) - (setcar (nthcdr 2 kill) now)) - ((and expire (< date expire)) ;Old entry, remove. - (gnus-score-set 'touched '(t) alist) - (setcdr entries (cdr rest)) - (setq rest entries)))) - (setq entries rest))))) - (setq articles (cdr articles))))))) - nil)) + (if gnus-agent-fetching + nil + (save-excursion + (setq gnus-scores-articles + (sort gnus-scores-articles + (lambda (a1 a2) + (< (mail-header-number (car a1)) + (mail-header-number (car a2)))))) + (set-buffer nntp-server-buffer) + (save-restriction + (let* ((buffer-read-only nil) + (articles gnus-scores-articles) + (all-scores scores) + (request-func (cond ((string= "head" header) + 'gnus-request-head) + ;; We need to peek at the headers to detect + ;; the content encoding + ((string= "body" header) + 'gnus-request-article) + (t 'gnus-request-article))) + entries alist ofunc article last) + (when articles + (setq last (mail-header-number (caar (last articles)))) + ;; Not all backends support partial fetching. In that case, + ;; we just fetch the entire article. + (unless (gnus-check-backend-function + (and (string-match "^gnus-" (symbol-name request-func)) + (intern (substring (symbol-name request-func) + (match-end 0)))) + gnus-newsgroup-name) + (setq ofunc request-func) + (setq request-func 'gnus-request-article)) + (while articles + (setq article (mail-header-number (caar articles))) + (gnus-message 7 "Scoring article %s of %s..." article last) + (widen) + (let (handles) + (when (funcall request-func article gnus-newsgroup-name) + (when (string= "body" header) + (setq handles (gnus-score-decode-text-parts))) + (goto-char (point-min)) + ;; If just parts of the article is to be searched, but the + ;; backend didn't support partial fetching, we just narrow + ;; to the relevant parts. + (when ofunc + (if (eq ofunc 'gnus-request-head) + (narrow-to-region + (point) + (or (search-forward "\n\n" nil t) (point-max))) + (narrow-to-region + (or (search-forward "\n\n" nil t) (point)) + (point-max)))) + (setq scores all-scores) + ;; Find matches. + (while scores + (setq alist (pop scores) + entries (assoc header alist)) + (while (cdr entries) ;First entry is the header index. + (let* ((rest (cdr entries)) + (kill (car rest)) + (match (nth 0 kill)) + (type (or (nth 3 kill) 's)) + (score (or (nth 1 kill) + gnus-score-interactive-default-score)) + (date (nth 2 kill)) + (found nil) + (case-fold-search + (not (or (eq type 'R) (eq type 'S) + (eq type 'Regexp) (eq type 'String)))) + (search-func + (cond ((or (eq type 'r) (eq type 'R) + (eq type 'regexp) (eq type 'Regexp)) + 're-search-forward) + ((or (eq type 's) (eq type 'S) + (eq type 'string) (eq type 'String)) + 'search-forward) + (t + (error "Invalid match type: %s" type))))) + (goto-char (point-min)) + (when (funcall search-func match nil t) + ;; Found a match, update scores. + (setcdr (car articles) (+ score (cdar articles))) + (setq found t) + (when trace + (push + (cons (car-safe (rassq alist gnus-score-cache)) + kill) + gnus-score-trace))) + ;; Update expire date + (unless trace + (cond + ((null date)) ;Permanent entry. + ((and found gnus-update-score-entry-dates) + ;; Match, update date. + (gnus-score-set 'touched '(t) alist) + (setcar (nthcdr 2 kill) now)) + ((and expire (< date expire)) ;Old entry, remove. + (gnus-score-set 'touched '(t) alist) + (setcdr entries (cdr rest)) + (setq rest entries)))) + (setq entries rest)))) + (when handles (mm-destroy-parts handles)))) + (setq articles (cdr articles))))))) + nil)) (defun gnus-score-thread (scores header now expire &optional trace) (gnus-score-followup scores header now expire trace t)) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 66509c939dc..f58cb80311a 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -490,8 +490,7 @@ The following commands are available: (error "No such server: %s" server)) (gnus-server-set-status method 'ok) (prog1 - (or (gnus-open-server method) - (progn (message "Couldn't open %s" server) nil)) + (gnus-open-server method) (gnus-server-update-server server) (gnus-server-position-point)))) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 5862e7807a2..8fbde5c8ecc 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3824,12 +3824,28 @@ You should probably use `gnus-find-method-for-group' instead." "Go through PARAMETERS and expand them according to the match data." (let (new) (dolist (elem parameters) - (if (and (stringp (cdr elem)) - (string-match "\\\\[0-9&]" (cdr elem))) - (push (cons (car elem) - (gnus-expand-group-parameter match (cdr elem) group)) - new) - (push elem new))) + (cond + ((and (stringp (cdr elem)) + (string-match "\\\\[0-9&]" (cdr elem))) + (push (cons (car elem) + (gnus-expand-group-parameter match (cdr elem) group)) + new)) + ;; For `sieve' group parameters, perform substitutions for every + ;; string within the match rule. This allows for parameters such + ;; as: + ;; ("list\\.\\(.*\\)" + ;; (sieve header :is "list-id" "<\\1.domain.org>")) + ((eq 'sieve (car elem)) + (push (mapcar (lambda (sieve-elem) + (if (and (stringp sieve-elem) + (string-match "\\\\[0-9&]" sieve-elem)) + (gnus-expand-group-parameter match sieve-elem + group) + sieve-elem)) + (cdr elem)) + new)) + (t + (push elem new)))) new)) (defun gnus-group-fast-parameter (group symbol &optional allow-list) @@ -3861,9 +3877,20 @@ The function `gnus-group-find-parameter' will do that for you." (when this-result (setq result (car this-result)) ;; Expand if necessary. - (if (and (stringp result) (string-match "\\\\[0-9&]" result)) - (setq result (gnus-expand-group-parameter - (car head) result group))))))) + (cond + ((and (stringp result) (string-match "\\\\[0-9&]" result)) + (setq result (gnus-expand-group-parameter + (car head) result group))) + ;; For `sieve' group parameters, perform substitutions + ;; for every string within the match rule (see above). + ((eq symbol 'sieve) + (setq result + (mapcar (lambda (elem) + (if (stringp elem) + (gnus-expand-group-parameter (car head) + elem group) + elem)) + result)))))))) ;; Done. result)))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 18088423eb0..42911ce0648 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3292,11 +3292,33 @@ or in the synonym headers, defined by `message-header-synonyms'." (defun message-insert-newsgroups () "Insert the Newsgroups header from the article being replied to." (interactive) - (when (and (message-position-on-field "Newsgroups") - (mail-fetch-field "newsgroups") - (not (string-match "\\` *\\'" (mail-fetch-field "newsgroups")))) - (insert ",")) - (insert (or (message-fetch-reply-field "newsgroups") ""))) + (let ((old-newsgroups (mail-fetch-field "newsgroups")) + (new-newsgroups (message-fetch-reply-field "newsgroups")) + (first t) + insert-newsgroups) + (message-position-on-field "Newsgroups") + (cond + ((not new-newsgroups) + (error "No Newsgroups to insert")) + ((not old-newsgroups) + (insert new-newsgroups)) + (t + (setq new-newsgroups (split-string new-newsgroups "[, ]+") + old-newsgroups (split-string old-newsgroups "[, ]+")) + (dolist (group new-newsgroups) + (unless (member group old-newsgroups) + (push group insert-newsgroups))) + (if (null insert-newsgroups) + (error "Newgroup%s already in the header" + (if (> (length new-newsgroups) 1) + "s" "")) + (when old-newsgroups + (setq first nil)) + (dolist (group insert-newsgroups) + (unless first + (insert ",")) + (setq first nil) + (insert group))))))) diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 7139a528e11..caf28202f04 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -77,6 +77,66 @@ (defconst nnmaildir-version "Gnus") +(defconst nnmaildir-flag-mark-mapping + '((?F . tick) + (?R . reply) + (?S . read)) + "Alist mapping Maildir filename flags to Gnus marks. +Maildir filenames are of the form \"unique-id:2,FLAGS\", +where FLAGS are a string of characters in ASCII order. +Some of the FLAGS correspond to Gnus marks.") + +(defsubst nnmaildir--mark-to-flag (mark) + "Find the Maildir flag that corresponds to MARK (an atom). +Return a character, or `nil' if not found. +See `nnmaildir-flag-mark-mapping'." + (car (rassq mark nnmaildir-flag-mark-mapping))) + +(defsubst nnmaildir--flag-to-mark (flag) + "Find the Gnus mark that corresponds to FLAG (a character). +Return an atom, or `nil' if not found. +See `nnmaildir-flag-mark-mapping'." + (cdr (assq flag nnmaildir-flag-mark-mapping))) + +(defun nnmaildir--ensure-suffix (filename) + "Ensure that FILENAME contains the suffix \":2,\"." + (if (string-match-p ":2," filename) + filename + (concat filename ":2,"))) + +(defun nnmaildir--add-flag (flag suffix) + "Return a copy of SUFFIX where FLAG is set. +SUFFIX should start with \":2,\"." + (unless (string-match-p "^:2," suffix) + (error "Invalid suffix `%s'" suffix)) + (let* ((flags (substring suffix 3)) + (flags-as-list (append flags nil)) + (new-flags + (concat (gnus-delete-duplicates + ;; maildir flags must be sorted + (sort (cons flag flags-as-list) '<))))) + (concat ":2," new-flags))) + +(defun nnmaildir--remove-flag (flag suffix) + "Return a copy of SUFFIX where FLAG is cleared. +SUFFIX should start with \":2,\"." + (unless (string-match-p "^:2," suffix) + (error "Invalid suffix `%s'" suffix)) + (let* ((flags (substring suffix 3)) + (flags-as-list (append flags nil)) + (new-flags (concat (delq flag flags-as-list)))) + (concat ":2," new-flags))) + +(defun nnmaildir--article-set-flags (article new-suffix curdir) + (let* ((prefix (nnmaildir--art-prefix article)) + (suffix (nnmaildir--art-suffix article)) + (article-file (concat curdir prefix suffix)) + (new-name (concat curdir prefix new-suffix))) + (unless (file-exists-p article-file) + (error "Couldn't find article file %s" article-file)) + (rename-file article-file new-name 'replace) + (setf (nnmaildir--art-suffix article) new-suffix))) + (defvar nnmaildir-article-file-name nil "*The filename of the most recently requested article. This variable is set by nnmaildir-request-article.") @@ -208,29 +268,33 @@ by nnmaildir-request-article.") (eval param)) (defmacro nnmaildir--with-nntp-buffer (&rest body) + (declare (debug (body))) `(with-current-buffer nntp-server-buffer ,@body)) (defmacro nnmaildir--with-work-buffer (&rest body) + (declare (debug (body))) `(with-current-buffer (get-buffer-create " *nnmaildir work*") ,@body)) (defmacro nnmaildir--with-nov-buffer (&rest body) + (declare (debug (body))) `(with-current-buffer (get-buffer-create " *nnmaildir nov*") ,@body)) (defmacro nnmaildir--with-move-buffer (&rest body) + (declare (debug (body))) `(with-current-buffer (get-buffer-create " *nnmaildir move*") ,@body)) -(defmacro nnmaildir--subdir (dir subdir) - `(file-name-as-directory (concat ,dir ,subdir))) -(defmacro nnmaildir--srvgrp-dir (srv-dir gname) - `(nnmaildir--subdir ,srv-dir ,gname)) -(defmacro nnmaildir--tmp (dir) `(nnmaildir--subdir ,dir "tmp")) -(defmacro nnmaildir--new (dir) `(nnmaildir--subdir ,dir "new")) -(defmacro nnmaildir--cur (dir) `(nnmaildir--subdir ,dir "cur")) -(defmacro nnmaildir--nndir (dir) `(nnmaildir--subdir ,dir ".nnmaildir")) -(defmacro nnmaildir--nov-dir (dir) `(nnmaildir--subdir ,dir "nov")) -(defmacro nnmaildir--marks-dir (dir) `(nnmaildir--subdir ,dir "marks")) -(defmacro nnmaildir--num-dir (dir) `(nnmaildir--subdir ,dir "num")) +(defsubst nnmaildir--subdir (dir subdir) + (file-name-as-directory (concat dir subdir))) +(defsubst nnmaildir--srvgrp-dir (srv-dir gname) + (nnmaildir--subdir srv-dir gname)) +(defsubst nnmaildir--tmp (dir) (nnmaildir--subdir dir "tmp")) +(defsubst nnmaildir--new (dir) (nnmaildir--subdir dir "new")) +(defsubst nnmaildir--cur (dir) (nnmaildir--subdir dir "cur")) +(defsubst nnmaildir--nndir (dir) (nnmaildir--subdir dir ".nnmaildir")) +(defsubst nnmaildir--nov-dir (dir) (nnmaildir--subdir dir "nov")) +(defsubst nnmaildir--marks-dir (dir) (nnmaildir--subdir dir "marks")) +(defsubst nnmaildir--num-dir (dir) (nnmaildir--subdir dir "num")) (defmacro nnmaildir--unlink (file-arg) `(let ((file ,file-arg)) @@ -305,6 +369,7 @@ by nnmaildir-request-article.") string) (defmacro nnmaildir--condcase (errsym body &rest handler) + (declare (debug (sexp form body))) `(condition-case ,errsym (let ((system-messages-locale "C")) ,body) (error . ,handler))) @@ -759,7 +824,7 @@ by nnmaildir-request-article.") (dolist (file (funcall ls ndir nil "\\`[^.]" 'nosort)) (setq x (concat ndir file)) (and (time-less-p (nth 5 (file-attributes x)) (current-time)) - (rename-file x (concat cdir file ":2,")))) + (rename-file x (concat cdir (nnmaildir--ensure-suffix file))))) (setf (nnmaildir--grp-new group) nattr)) (setq cattr (nth 5 (file-attributes cdir))) (if (equal cattr (nnmaildir--grp-cur group)) @@ -784,11 +849,23 @@ by nnmaildir-request-article.") cdir (nnmaildir--marks-dir nndir) ndir (nnmaildir--subdir cdir "tick") cdir (nnmaildir--subdir cdir "read")) - (dolist (file files) - (setq file (car file)) - (if (or (not (file-exists-p (concat cdir file))) - (file-exists-p (concat ndir file))) - (setq num (1+ num))))) + (dolist (prefix-suffix files) + (let ((prefix (car prefix-suffix)) + (suffix (cdr prefix-suffix))) + ;; increase num for each unread or ticked article + (when (or + ;; first look for marks in suffix, if it's valid... + (when (and (stringp suffix) + (string-prefix-p ":2," suffix)) + (or + (not (string-match-p + (string (nnmaildir--mark-to-flag 'read)) suffix)) + (string-match-p + (string (nnmaildir--mark-to-flag 'tick)) suffix))) + ;; then look in marks directories + (not (file-exists-p (concat cdir prefix))) + (file-exists-p (concat ndir prefix))) + (incf num))))) (setf (nnmaildir--grp-cache group) (make-vector num nil)) (let ((inhibit-quit t)) (set (intern gname groups) group)) @@ -916,12 +993,15 @@ by nnmaildir-request-article.") "\n"))))) 'group) -(defun nnmaildir-request-marks (gname info &optional server) - (let ((group (nnmaildir--prepare server gname)) - pgname flist always-marks never-marks old-marks dotfile num dir - markdirs marks mark ranges markdir article read end new-marks ls - old-mmth new-mmth mtime mark-sym existing missing deactivate-mark - article-list) +(defun nnmaildir-request-update-info (gname info &optional server) + (let* ((group (nnmaildir--prepare server gname)) + (curdir (nnmaildir--cur + (nnmaildir--srvgrp-dir + (nnmaildir--srv-dir nnmaildir--cur-server) gname))) + (curdir-mtime (nth 5 (file-attributes curdir))) + pgname flist always-marks never-marks old-marks dotfile num dir + all-marks marks mark ranges markdir read end new-marks ls + old-mmth new-mmth mtime mark-sym existing missing deactivate-mark) (catch 'return (unless group (setf (nnmaildir--srv-error nnmaildir--cur-server) @@ -950,34 +1030,71 @@ by nnmaildir-request-article.") dir (nnmaildir--nndir dir) dir (nnmaildir--marks-dir dir) ls (nnmaildir--group-ls nnmaildir--cur-server pgname) - markdirs (funcall ls dir nil "\\`[^.]" 'nosort) - new-mmth (nnmaildir--up2-1 (length markdirs)) + all-marks (gnus-delete-duplicates + ;; get mark names from mark dirs and from flag + ;; mappings + (append + (mapcar 'cdr nnmaildir-flag-mark-mapping) + (mapcar 'intern (funcall ls dir nil "\\`[^.]" 'nosort)))) + new-mmth (nnmaildir--up2-1 (length all-marks)) new-mmth (make-vector new-mmth 0) old-mmth (nnmaildir--grp-mmth group)) - (dolist (mark markdirs) - (setq markdir (nnmaildir--subdir dir mark) - mark-sym (intern mark) + (dolist (mark all-marks) + (setq markdir (nnmaildir--subdir dir (symbol-name mark)) ranges nil) (catch 'got-ranges - (if (memq mark-sym never-marks) (throw 'got-ranges nil)) - (when (memq mark-sym always-marks) + (if (memq mark never-marks) (throw 'got-ranges nil)) + (when (memq mark always-marks) (setq ranges existing) (throw 'got-ranges nil)) - (setq mtime (nth 5 (file-attributes markdir))) - (set (intern mark new-mmth) mtime) - (when (equal mtime (symbol-value (intern-soft mark old-mmth))) - (setq ranges (assq mark-sym old-marks)) + ;; Find the mtime for this mark. If this mark can be expressed as + ;; a filename flag, get the later of the mtimes for markdir and + ;; curdir, otherwise only the markdir counts. + (setq mtime + (let ((markdir-mtime (nth 5 (file-attributes markdir)))) + (cond + ((null (nnmaildir--mark-to-flag mark)) + markdir-mtime) + ((null markdir-mtime) + curdir-mtime) + ((null curdir-mtime) + ;; this should never happen... + markdir-mtime) + ((time-less-p markdir-mtime curdir-mtime) + curdir-mtime) + (t + markdir-mtime)))) + (set (intern (symbol-name mark) new-mmth) mtime) + (when (equal mtime (symbol-value (intern-soft (symbol-name mark) old-mmth))) + (setq ranges (assq mark old-marks)) (if ranges (setq ranges (cdr ranges))) (throw 'got-ranges nil)) - (setq article-list nil) - (dolist (prefix (funcall ls markdir nil "\\`[^.]" 'nosort)) - (setq article (nnmaildir--flist-art flist prefix)) - (if article - (setq article-list - (cons (nnmaildir--art-num article) article-list)))) - (setq ranges (gnus-add-to-range ranges (sort article-list '<)))) - (if (eq mark-sym 'read) (setq read ranges) - (if ranges (setq marks (cons (cons mark-sym ranges) marks))))) + (let ((article-list nil)) + ;; Consider the article marked if it either has the flag in the + ;; filename, or is in the markdir. As you'd rarely remove a + ;; flag/mark, this should avoid losing information in the most + ;; common usage pattern. + (or + (let ((flag (nnmaildir--mark-to-flag mark))) + ;; If this mark has a corresponding maildir flag... + (when flag + (let ((regexp + (concat "\\`[^.].*:2,[A-Z]*" (string flag)))) + ;; ...then find all files with that flag. + (dolist (filename (funcall ls curdir nil regexp 'nosort)) + (let* ((prefix (car (split-string filename ":2,"))) + (article (nnmaildir--flist-art flist prefix))) + (when article + (push (nnmaildir--art-num article) article-list))))))) + ;; Also check Gnus-specific mark directory, if it exists. + (when (file-directory-p markdir) + (dolist (prefix (funcall ls markdir nil "\\`[^.]" 'nosort)) + (let ((article (nnmaildir--flist-art flist prefix))) + (when article + (push (nnmaildir--art-num article) article-list)))))) + (setq ranges (gnus-add-to-range ranges (sort article-list '<))))) + (if (eq mark 'read) (setq read ranges) + (if ranges (setq marks (cons (cons mark ranges) marks))))) (gnus-info-set-read info (gnus-range-add read missing)) (gnus-info-set-marks info marks 'extend) (setf (nnmaildir--grp-mmth group) new-mmth) @@ -1525,39 +1642,63 @@ by nnmaildir-request-article.") didnt))) (defun nnmaildir-request-set-mark (gname actions &optional server) - (let ((group (nnmaildir--prepare server gname)) - (coding-system-for-write nnheader-file-coding-system) - (buffer-file-coding-system nil) - (file-coding-system-alist nil) - del-mark del-action add-action set-action marksdir nlist - ranges begin end article all-marks todo-marks mdir mfile - pgname ls permarkfile deactivate-mark) + (let* ((group (nnmaildir--prepare server gname)) + (curdir (nnmaildir--cur + (nnmaildir--srvgrp-dir + (nnmaildir--srv-dir nnmaildir--cur-server) + gname))) + (coding-system-for-write nnheader-file-coding-system) + (buffer-file-coding-system nil) + (file-coding-system-alist nil) + del-mark del-action add-action set-action marksdir nlist + ranges begin end article all-marks todo-marks mdir mfile + pgname ls permarkfile deactivate-mark) (setq del-mark (lambda (mark) - (setq mfile (nnmaildir--subdir marksdir (symbol-name mark)) - mfile (concat mfile (nnmaildir--art-prefix article))) - (nnmaildir--unlink mfile)) + (let ((prefix (nnmaildir--art-prefix article)) + (suffix (nnmaildir--art-suffix article)) + (flag (nnmaildir--mark-to-flag mark))) + (when flag + ;; If this mark corresponds to a flag, remove the flag from + ;; the file name. + (nnmaildir--article-set-flags + article (nnmaildir--remove-flag flag suffix) curdir)) + ;; We still want to delete the hardlink in the marks dir if + ;; present, regardless of whether this mark has a maildir flag or + ;; not, to avoid getting out of sync. + (setq mfile (nnmaildir--subdir marksdir (symbol-name mark)) + mfile (concat mfile prefix)) + (nnmaildir--unlink mfile))) del-action (lambda (article) (mapcar del-mark todo-marks)) add-action (lambda (article) (mapcar (lambda (mark) - (setq mdir (nnmaildir--subdir marksdir (symbol-name mark)) - permarkfile (concat mdir ":") - mfile (concat mdir (nnmaildir--art-prefix article))) - (nnmaildir--condcase err (add-name-to-file permarkfile mfile) - (cond - ((nnmaildir--eexist-p err)) - ((nnmaildir--enoent-p err) - (nnmaildir--mkdir mdir) - (nnmaildir--mkfile permarkfile) - (add-name-to-file permarkfile mfile)) - ((nnmaildir--emlink-p err) - (let ((permarkfilenew (concat permarkfile "{new}"))) - (nnmaildir--mkfile permarkfilenew) - (rename-file permarkfilenew permarkfile 'replace) - (add-name-to-file permarkfile mfile))) - (t (signal (car err) (cdr err)))))) + (let ((prefix (nnmaildir--art-prefix article)) + (suffix (nnmaildir--art-suffix article)) + (flag (nnmaildir--mark-to-flag mark))) + (if flag + ;; If there is a corresponding maildir flag, just rename + ;; the file. + (nnmaildir--article-set-flags + article (nnmaildir--add-flag flag suffix) curdir) + ;; Otherwise, use nnmaildir-specific marks dir. + (setq mdir (nnmaildir--subdir marksdir (symbol-name mark)) + permarkfile (concat mdir ":") + mfile (concat mdir prefix)) + (nnmaildir--condcase err (add-name-to-file permarkfile mfile) + (cond + ((nnmaildir--eexist-p err)) + ((nnmaildir--enoent-p err) + (nnmaildir--mkdir mdir) + (nnmaildir--mkfile permarkfile) + (add-name-to-file permarkfile mfile)) + ((nnmaildir--emlink-p err) + (let ((permarkfilenew (concat permarkfile "{new}"))) + (nnmaildir--mkfile permarkfilenew) + (rename-file permarkfilenew permarkfile 'replace) + (add-name-to-file permarkfile mfile))) + (t (signal (car err) (cdr err)))))))) todo-marks)) set-action (lambda (article) (funcall add-action article) @@ -1581,7 +1722,12 @@ by nnmaildir-request-article.") pgname (nnmaildir--pgname nnmaildir--cur-server gname) ls (nnmaildir--group-ls nnmaildir--cur-server pgname) all-marks (funcall ls marksdir nil "\\`[^.]" 'nosort) - all-marks (mapcar 'intern all-marks)) + all-marks (gnus-delete-duplicates + ;; get mark names from mark dirs and from flag + ;; mappings + (append + (mapcar 'cdr nnmaildir-flag-mark-mapping) + (mapcar 'intern all-marks)))) (dolist (action actions) (setq ranges (car action) todo-marks (caddr action)) From 067b39d4296765e83f9530eca456168f6cda95fc Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Wed, 5 Sep 2012 22:45:43 +0000 Subject: [PATCH 042/216] Merge changes made in Gnus master 2012-09-05 Magnus Henoch * nnmaildir.el (nnmaildir--article-set-flags): Fix compilation error. 2012-09-05 Martin Stjernholm * gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and TIME is set. 2012-09-05 Juri Linkov * gnus-group.el (gnus-read-ephemeral-bug-group): Allow opening more than one group at a time (bug#11961). --- lisp/gnus/ChangeLog | 14 ++++++++++++++ lisp/gnus/gnus-demon.el | 9 ++++++--- lisp/gnus/gnus-group.el | 3 ++- lisp/gnus/nnmaildir.el | 20 ++++++++++---------- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c6220204511..d3398aa1d8d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,17 @@ +2012-09-05 Magnus Henoch + + * nnmaildir.el (nnmaildir--article-set-flags): Fix compilation error. + +2012-09-05 Martin Stjernholm + + * gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and + TIME is set. + +2012-09-05 Juri Linkov + + * gnus-group.el (gnus-read-ephemeral-bug-group): Allow opening more + than one group at a time (bug#11961). + 2012-09-05 Julien Danjou * gnus-srvr.el (gnus-server-open-server): Don't message on failure: diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index 115c5777448..671c566d09f 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -144,9 +144,12 @@ marked with SPECIAL." (* (gnus-demon-time-to-step time) gnus-demon-timestep)) (t (* time gnus-demon-timestep)))) - (idle (if (numberp idle) - (* idle gnus-demon-timestep) - idle)) + (idle (cond ((numberp idle) + (* idle gnus-demon-timestep)) + ((and (eq idle t) (numberp time)) + time) + (t + idle))) (timer (cond diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 37e4470239e..71af5792d2c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2481,7 +2481,8 @@ the bug number, and browsing the URL must return mbox output." "/.*$" "")))) (write-region (point-min) (point-max) tmpfile) (gnus-group-read-ephemeral-group - "gnus-read-ephemeral-bug" + (format "gnus-read-ephemeral-bug:%s" + (mapconcat 'number-to-string ids ",")) `(nndoc ,tmpfile (nndoc-article-type mbox)) nil window-conf)) diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index caf28202f04..327649d41a1 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -127,16 +127,6 @@ SUFFIX should start with \":2,\"." (new-flags (concat (delq flag flags-as-list)))) (concat ":2," new-flags))) -(defun nnmaildir--article-set-flags (article new-suffix curdir) - (let* ((prefix (nnmaildir--art-prefix article)) - (suffix (nnmaildir--art-suffix article)) - (article-file (concat curdir prefix suffix)) - (new-name (concat curdir prefix new-suffix))) - (unless (file-exists-p article-file) - (error "Couldn't find article file %s" article-file)) - (rename-file article-file new-name 'replace) - (setf (nnmaildir--art-suffix article) new-suffix))) - (defvar nnmaildir-article-file-name nil "*The filename of the most recently requested article. This variable is set by nnmaildir-request-article.") @@ -212,6 +202,16 @@ by nnmaildir-request-article.") (gnm nil) ;; flag: split from mail-sources? (target-prefix nil :type string)) ;; symlink target prefix +(defun nnmaildir--article-set-flags (article new-suffix curdir) + (let* ((prefix (nnmaildir--art-prefix article)) + (suffix (nnmaildir--art-suffix article)) + (article-file (concat curdir prefix suffix)) + (new-name (concat curdir prefix new-suffix))) + (unless (file-exists-p article-file) + (error "Couldn't find article file %s" article-file)) + (rename-file article-file new-name 'replace) + (setf (nnmaildir--art-suffix article) new-suffix))) + (defun nnmaildir--expired-article (group article) (setf (nnmaildir--art-nov article) nil) (let ((flist (nnmaildir--grp-flist group)) From f41d6f9db69ce77fe9b3a637de407e8b589e0dc4 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 6 Sep 2012 10:45:33 +0900 Subject: [PATCH 043/216] qp.el (quoted-printable-decode-region): Fix previous change; handle lowercase a..f. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/qp.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 37d89ba8cad..fe025210c2a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2012-09-06 Kenichi Handa + + * qp.el (quoted-printable-decode-region): Fix previous change; handle + lowercase a..f. + 2012-09-03 Lars Ingebrigtsen * dgnushack.el: XEmacs 21.5 compilation fix. diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index 87252684a48..bfa1fe0a6d4 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -55,8 +55,12 @@ them into characters should be done separately." ;; recognize them as the corresponding uppercase letters.'' (let ((case-fold-search t) (decode-hex #'(lambda (n1 n2) - (+ (* (if (<= n1 ?9) (- n1 ?0) (+ (- n1 ?A) 10)) 16) - (if (<= n2 ?9) (- n2 ?0) (+ (- n2 ?A) 10)))))) + (+ (* (if (<= n1 ?9) (- n1 ?0) + (if (<= n1 ?F) (+ (- n1 ?A) 10) + (+ (- n1 ?a) 10))) 16) + (if (<= n2 ?9) (- n2 ?0) + (if (<= n2 ?F) (+ (- n2 ?A) 10) + (+ (- n2 ?a) 10))))))) (narrow-to-region from to) ;; Do this in case we're called from Gnus, say, in a buffer ;; which already contains non-ASCII characters which would From 4fd78b62d1c815e4dfd7ffe4e7862ef4c4fceaca Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 6 Sep 2012 02:20:21 +0000 Subject: [PATCH 044/216] [Gnus] XEmacs 21.5 compilation fix * gnus-score.el (gnus-score-decode-text-parts): Use #' for mm-text-parts used in labels macro to make it work with XEmacs 21.5. * gnus-util.el (gnus-string-prefix-p): New function, an alias to string-prefix-p in Emacs >=23.2. * nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag) (nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p instead of string-match-p. (nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p. --- lisp/gnus/ChangeLog | 13 +++++++++++++ lisp/gnus/gnus-score.el | 4 ++-- lisp/gnus/gnus-util.el | 9 +++++++++ lisp/gnus/nnmaildir.el | 12 ++++++------ 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0a7866794a8..ddb0143b37a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,16 @@ +2012-09-06 Katsumi Yamaoka + + * gnus-score.el (gnus-score-decode-text-parts): Use #' for + mm-text-parts used in labels macro to make it work with XEmacs 21.5. + + * gnus-util.el (gnus-string-prefix-p): New function, an alias to + string-prefix-p in Emacs >=23.2. + + * nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag) + (nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p + instead of string-match-p. + (nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p. + 2012-09-06 Kenichi Handa * qp.el (quoted-printable-decode-region): Fix previous change; handle diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index bc35cf3dea5..f215b845514 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1720,7 +1720,7 @@ score in `gnus-newsgroup-scored' by SCORE." (defun gnus-score-decode-text-parts () (labels ((mm-text-parts (handle) (cond ((stringp (car handle)) - (let ((parts (mapcan 'mm-text-parts (cdr handle)))) + (let ((parts (mapcan #'mm-text-parts (cdr handle)))) (if (equal "multipart/alternative" (car handle)) ;; pick the first supported alternative (list (car parts)) @@ -1730,7 +1730,7 @@ score in `gnus-newsgroup-scored' by SCORE." (when (string-match "^text/" (mm-handle-media-type handle)) (list handle))) - (t (mapcan 'mm-text-parts handle)))) + (t (mapcan #'mm-text-parts handle)))) (my-mm-display-part (handle) (when handle (save-restriction diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 26178afa864..3c4af9b4e50 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1926,6 +1926,15 @@ Same as `string-match' except this function does not change the match data." (save-match-data (string-match regexp string start)))) +(if (fboundp 'string-prefix-p) + (defalias 'gnus-string-prefix-p 'string-prefix-p) + (defun gnus-string-prefix-p (str1 str2 &optional ignore-case) + "Return non-nil if STR1 is a prefix of STR2. +If IGNORE-CASE is non-nil, the comparison is done without paying attention +to case differences." + (eq t (compare-strings str1 nil nil + str2 0 (length str1) ignore-case)))) + (eval-and-compile (if (fboundp 'macroexpand-all) (defalias 'gnus-macroexpand-all 'macroexpand-all) diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 327649d41a1..74a693a9c61 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -100,14 +100,14 @@ See `nnmaildir-flag-mark-mapping'." (defun nnmaildir--ensure-suffix (filename) "Ensure that FILENAME contains the suffix \":2,\"." - (if (string-match-p ":2," filename) + (if (gnus-string-match-p ":2," filename) filename (concat filename ":2,"))) (defun nnmaildir--add-flag (flag suffix) "Return a copy of SUFFIX where FLAG is set. SUFFIX should start with \":2,\"." - (unless (string-match-p "^:2," suffix) + (unless (gnus-string-match-p "^:2," suffix) (error "Invalid suffix `%s'" suffix)) (let* ((flags (substring suffix 3)) (flags-as-list (append flags nil)) @@ -120,7 +120,7 @@ SUFFIX should start with \":2,\"." (defun nnmaildir--remove-flag (flag suffix) "Return a copy of SUFFIX where FLAG is cleared. SUFFIX should start with \":2,\"." - (unless (string-match-p "^:2," suffix) + (unless (gnus-string-match-p "^:2," suffix) (error "Invalid suffix `%s'" suffix)) (let* ((flags (substring suffix 3)) (flags-as-list (append flags nil)) @@ -856,11 +856,11 @@ by nnmaildir-request-article.") (when (or ;; first look for marks in suffix, if it's valid... (when (and (stringp suffix) - (string-prefix-p ":2," suffix)) + (gnus-string-prefix-p ":2," suffix)) (or - (not (string-match-p + (not (gnus-string-match-p (string (nnmaildir--mark-to-flag 'read)) suffix)) - (string-match-p + (gnus-string-match-p (string (nnmaildir--mark-to-flag 'tick)) suffix))) ;; then look in marks directories (not (file-exists-p (concat cdir prefix))) From 0699fc18a5ea00b9a6d64b0e0ebf33b4723beb10 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Thu, 6 Sep 2012 11:10:25 +0400 Subject: [PATCH 045/216] * alloc.c (mark_object): Revert window marking code since it's unsafe for the Fset_window_configuration. --- src/ChangeLog | 5 +++++ src/alloc.c | 26 +++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 24d290e163d..990cba396e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-06 Dmitry Antipov + + * alloc.c (mark_object): Revert window marking code + since it's unsafe for the Fset_window_configuration. + 2012-09-05 Paul Eggert Fix race conditions with signal handlers and errno. diff --git a/src/alloc.c b/src/alloc.c index e90cca637df..aca0a82d1b5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6019,22 +6019,18 @@ mark_object (Lisp_Object arg) case PVEC_WINDOW: { struct window *w = (struct window *) ptr; - bool leaf = NILP (w->hchild) && NILP (w->vchild); - - if (leaf && NILP (w->buffer)) - /* If the window is deleted, mark just the window itself. */ - VECTOR_MARK (ptr); - else + + /* Even if the window is deleted, we can't mark just the window + itself because set-window-configuration can resurrect it. */ + mark_vectorlike (ptr); + /* Mark glyphs for leaf windows. Marking window + matrices is sufficient because frame matrices + use the same glyph memory. */ + if (NILP (w->hchild) && NILP (w->vchild) + && w->current_matrix) { - mark_vectorlike (ptr); - /* Mark glyphs for leaf windows. Marking window - matrices is sufficient because frame matrices - use the same glyph memory. */ - if (leaf && w->current_matrix) - { - mark_glyph_matrix (w->current_matrix); - mark_glyph_matrix (w->desired_matrix); - } + mark_glyph_matrix (w->current_matrix); + mark_glyph_matrix (w->desired_matrix); } } break; From a864ef14570715dc3233fbbf2e9da7aa8f29729e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 6 Sep 2012 01:04:49 -0700 Subject: [PATCH 046/216] Use bool for booleans in font-related modules. * font.c (font_intern_prop, font_style_to_value) (font_style_symbolic, font_parse_xlfd, font_parse_fcname) (generate_otf_features, font_check_otf_features, font_check_otf) (font_match_p, font_list_entities, font_at): * fontset.c (fontset_id_valid_p, reorder_font_vector (fontset_find_font, Fset_fontset_font) (face_suitable_for_char_p) [0]: * ftfont.c (fc_initialized, ftfont_get_open_type_spec) (ftfont_open, ftfont_text_extents, ftfont_check_otf): (m17n_flt_initialized, ftfont_shape_by_flt): * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw): * nsfont.m (nsfont_draw): * w32font.c (w32font_draw): * w32term.c (x_draw_glyphless_glyph_string_foreground): Use bool for booleans. * font.h: Adjust to above API changes. (struct font, struct font_driver, struct font_driver_list): Use bool for booleans. (struct font): Remove useless member encoding_type. All users removed. * fontset.c, xftfont.c: Omit unnecessary static decls. --- src/ChangeLog | 25 +++++++++++++++++++++++++ src/font.c | 41 +++++++++++++++++++++-------------------- src/font.h | 45 ++++++++++++++++++--------------------------- src/fontset.c | 28 ++++++++++------------------ src/ftfont.c | 28 ++++++++++++++++------------ src/ftxfont.c | 22 +++++----------------- src/nsfont.m | 11 +++++------ src/w32font.c | 11 +++++------ src/w32font.h | 2 +- src/xfont.c | 13 +++++++------ src/xftfont.c | 32 +++++++++++--------------------- 11 files changed, 124 insertions(+), 134 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 990cba396e3..2ca75d416af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,28 @@ +2012-09-06 Paul Eggert + + Use bool for booleans in font-related modules. + * font.c (font_intern_prop, font_style_to_value) + (font_style_symbolic, font_parse_xlfd, font_parse_fcname) + (generate_otf_features, font_check_otf_features, font_check_otf) + (font_match_p, font_list_entities, font_at): + * fontset.c (fontset_id_valid_p, reorder_font_vector + (fontset_find_font, Fset_fontset_font) + (face_suitable_for_char_p) [0]: + * ftfont.c (fc_initialized, ftfont_get_open_type_spec) + (ftfont_open, ftfont_text_extents, ftfont_check_otf): + (m17n_flt_initialized, ftfont_shape_by_flt): + * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw): + * nsfont.m (nsfont_draw): + * w32font.c (w32font_draw): + * w32term.c (x_draw_glyphless_glyph_string_foreground): + Use bool for booleans. + * font.h: Adjust to above API changes. + (struct font, struct font_driver, struct font_driver_list): + Use bool for booleans. + (struct font): Remove useless member encoding_type. + All users removed. + * fontset.c, xftfont.c: Omit unnecessary static decls. + 2012-09-06 Dmitry Antipov * alloc.c (mark_object): Revert window marking code diff --git a/src/font.c b/src/font.c index cf9964f08f3..49a09bced28 100644 --- a/src/font.c +++ b/src/font.c @@ -216,13 +216,12 @@ static int num_font_drivers; /* Return a Lispy value of a font property value at STR and LEN bytes. - If STR is "*", return nil. - If FORCE_SYMBOL is zero and all characters in STR are digits, - return an integer. Otherwise, return a symbol interned from - STR. */ + If STR is "*", return nil. If FORCE_SYMBOL, or if STR does not + consist entirely of one or more digits, return a symbol interned + from STR. Otherwise, return an integer. */ Lisp_Object -font_intern_prop (const char *str, ptrdiff_t len, int force_symbol) +font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol) { ptrdiff_t i; Lisp_Object tem; @@ -306,7 +305,8 @@ font_pixel_size (FRAME_PTR f, Lisp_Object spec) VAL is an integer. */ int -font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror) +font_style_to_value (enum font_property_index prop, Lisp_Object val, + bool noerror) { Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); int len; @@ -385,7 +385,8 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror } Lisp_Object -font_style_symbolic (Lisp_Object font, enum font_property_index prop, int for_face) +font_style_symbolic (Lisp_Object font, enum font_property_index prop, + bool for_face) { Lisp_Object val = AREF (font, prop); Lisp_Object table, elt; @@ -1101,7 +1102,7 @@ font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font) } else { - int wild_card_found = 0; + bool wild_card_found = 0; Lisp_Object prop[XLFD_LAST_INDEX]; if (FONT_ENTITY_P (font)) @@ -1337,7 +1338,7 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font) } else if (*p == '-') { - int decimal = 0, size_found = 1; + bool decimal = 0, size_found = 1; for (q = p + 1; *q && *q != ':'; q++) if (! c_isdigit (*q)) { @@ -1938,7 +1939,7 @@ generate_otf_features (Lisp_Object spec, char *features) { Lisp_Object val; char *p; - int asterisk; + bool asterisk; p = features; *p = '\0'; @@ -2302,11 +2303,12 @@ font_update_sort_order (int *order) } } -static int -font_check_otf_features (Lisp_Object script, Lisp_Object langsys, Lisp_Object features, Lisp_Object table) +static bool +font_check_otf_features (Lisp_Object script, Lisp_Object langsys, + Lisp_Object features, Lisp_Object table) { Lisp_Object val; - int negative; + bool negative; table = assq_no_quit (script, table); if (NILP (table)) @@ -2342,7 +2344,7 @@ font_check_otf_features (Lisp_Object script, Lisp_Object langsys, Lisp_Object fe /* Check if OTF_CAPABILITY satisfies SPEC (otf-spec). */ -static int +static bool font_check_otf (Lisp_Object spec, Lisp_Object otf_capability) { Lisp_Object script, langsys = Qnil, gsub = Qnil, gpos = Qnil; @@ -2376,7 +2378,7 @@ font_check_otf (Lisp_Object spec, Lisp_Object otf_capability) /* Check if FONT (font-entity or font-object) matches with the font specification SPEC. */ -int +bool font_match_p (Lisp_Object spec, Lisp_Object font) { Lisp_Object prop[FONT_SPEC_MAX], *props; @@ -2694,7 +2696,7 @@ font_list_entities (Lisp_Object frame, Lisp_Object spec) Lisp_Object ftype, val; Lisp_Object list = Qnil; int size; - int need_filtering = 0; + bool need_filtering = 0; int i; eassert (FONT_SPEC_P (spec)); @@ -3036,15 +3038,14 @@ font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, { Lisp_Object font_entity; Lisp_Object prefer; - int result, i; + int i; FRAME_PTR f = XFRAME (frame); if (NILP (XCDR (entities)) && ASIZE (XCAR (entities)) == 1) { font_entity = AREF (XCAR (entities), 0); - if (c < 0 - || (result = font_has_char (f, font_entity, c)) > 0) + if (c < 0 || font_has_char (f, font_entity, c) > 0) return font_entity; return Qnil; } @@ -3618,7 +3619,7 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w, Lisp_Object string) { FRAME_PTR f; - int multibyte; + bool multibyte; Lisp_Object font_object; multibyte = (NILP (string) diff --git a/src/font.h b/src/font.h index 3b90bc2ab8a..0475eb665dd 100644 --- a/src/font.h +++ b/src/font.h @@ -320,19 +320,10 @@ struct font negative if that information is not in the font. */ int underline_position; - /* 1 if `vertical-centering-font-regexp' matches this font name. + /* True if `vertical-centering-font-regexp' matches this font name. In this case, we render characters at vertical center positions of lines. */ - int vertical_centering; - - /* Encoding type of the font. The value is one of - 0, 1, 2, or 3: - 0: code points 0x20..0x7F or 0x2020..0x7F7F are used - 1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used - 2: code points 0x20A0..0x7FFF are used - 3: code points 0xA020..0xFF7F are used - If the member `font_encoder' is not NULL, this member is ignored. */ - unsigned char encoding_type; + bool vertical_centering; /* The baseline position of a font is normally `ascent' value of the font. However, there exist many fonts which don't set `ascent' to @@ -506,9 +497,9 @@ struct font_driver /* Symbol indicating the type of the font-driver. */ Lisp_Object type; - /* 1 iff the font's foundry, family, and adstyle names are case + /* True iff the font's foundry, family, and adstyle names are case sensitive. */ - int case_sensitive; + bool case_sensitive; /* Return a cache of font-entities on frame F. The cache must be a cons whose cdr part is the actual cache area. */ @@ -592,11 +583,11 @@ struct font_driver /* Optional. Draw glyphs between FROM and TO of S->char2b at (X Y) pixel - position of frame F with S->FACE and S->GC. If WITH_BACKGROUND - is nonzero, fill the background in advance. It is assured that - WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */ + position of frame F with S->FACE and S->GC. If WITH_BACKGROUND, + fill the background in advance. It is assured that WITH_BACKGROUND + is false when (FROM > 0 || TO < S->nchars). */ int (*draw) (struct glyph_string *s, int from, int to, - int x, int y, int with_background); + int x, int y, bool with_background); /* Optional. Store bitmap data for glyph-code CODE of FONT in BITMAP. It is @@ -648,7 +639,7 @@ struct font_driver short, return -1. */ int (*otf_drive) (struct font *font, Lisp_Object features, Lisp_Object gstring_in, int from, int to, - Lisp_Object gstring_out, int idx, int alternate_subst); + Lisp_Object gstring_out, int idx, bool alternate_subst); /* Optional. Make the font driver ready for frame F. Usually this function @@ -699,9 +690,9 @@ struct font_driver Return non-zero if FONT_OBJECT can be used as a (cached) font for ENTITY on frame F. */ - int (*cached_font_ok) (struct frame *f, - Lisp_Object font_object, - Lisp_Object entity); + bool (*cached_font_ok) (struct frame *f, + Lisp_Object font_object, + Lisp_Object entity); }; @@ -711,9 +702,9 @@ struct font_driver struct font_driver_list { - /* 1 iff this driver is currently used. It is ignored in the global + /* True iff this driver is currently used. It is ignored in the global font driver list.*/ - int on; + bool on; /* Pointer to the font driver. */ struct font_driver *driver; /* Pointer to the next element of the chain. */ @@ -744,12 +735,12 @@ extern Lisp_Object find_font_encoding (Lisp_Object); extern int font_registry_charsets (Lisp_Object, struct charset **, struct charset **); extern int font_style_to_value (enum font_property_index prop, - Lisp_Object name, int noerror); + Lisp_Object name, bool noerror); extern Lisp_Object font_style_symbolic (Lisp_Object font, enum font_property_index prop, - int for_face); + bool for_face); -extern int font_match_p (Lisp_Object spec, Lisp_Object font); +extern bool font_match_p (Lisp_Object spec, Lisp_Object font); extern Lisp_Object font_list_entities (Lisp_Object frame, Lisp_Object spec); @@ -774,7 +765,7 @@ extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec); extern Lisp_Object font_open_by_name (FRAME_PTR f, Lisp_Object name); extern Lisp_Object font_intern_prop (const char *str, ptrdiff_t len, - int force_symbol); + bool force_symbol); extern void font_update_sort_order (int *order); extern void font_parse_family_registry (Lisp_Object family, diff --git a/src/fontset.c b/src/fontset.c index 01e38fe45e5..2b955fe6b11 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -185,21 +185,12 @@ void (*check_window_system_func) (void); /* Prototype declarations for static functions. */ -static void fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); -static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *, - int, int); -static void reorder_font_vector (Lisp_Object, struct font *); -static Lisp_Object fontset_font (Lisp_Object, int, struct face *, int); static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object); -static Lisp_Object fontset_pattern_regexp (Lisp_Object); -static void accumulate_script_ranges (Lisp_Object, Lisp_Object, - Lisp_Object); -static void set_fontset_font (Lisp_Object, Lisp_Object); -/* Return 1 if ID is a valid fontset id, else return 0. +/* Return true if ID is a valid fontset id. Optimized away if ENABLE_CHECKING is not defined. */ -static int +static bool fontset_id_valid_p (int id) { return (id >= 0 && id < ASIZE (Vfontset_table) - 1); @@ -413,7 +404,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) Lisp_Object vec, font_object; int size; int i; - int score_changed = 0; + bool score_changed = 0; if (font) XSETFONT (font_object, font); @@ -544,10 +535,11 @@ fontset_get_font_group (Lisp_Object fontset, int c) ID is a charset-id that must be preferred, or -1 meaning no preference. - If FALLBACK is nonzero, search only fallback fonts. */ + If FALLBACK, search only fallback fonts. */ static Lisp_Object -fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fallback) +fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, + bool fallback) { Lisp_Object vec, font_group; int i, charset_matched = 0, found_index; @@ -919,11 +911,11 @@ free_face_fontset (FRAME_PTR f, struct face *face) #if 0 -/* Return 1 if FACE is suitable for displaying character C. - Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P +/* Return true if FACE is suitable for displaying character C. + Called from the macro FACE_SUITABLE_FOR_CHAR_P when C is not an ASCII character. */ -int +bool face_suitable_for_char_p (struct face *face, int c) { Lisp_Object fontset, rfont_def; @@ -1470,7 +1462,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) Lisp_Object range_list; struct charset *charset = NULL; Lisp_Object fontname; - int ascii_changed = 0; + bool ascii_changed = 0; fontset = check_fontset_name (name, &frame); diff --git a/src/ftfont.c b/src/ftfont.c index 10b53411248..a85773a9a21 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -45,7 +45,7 @@ static Lisp_Object Qfreetype; static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif; /* Flag to tell if FcInit is already called or not. */ -static int fc_initialized; +static bool fc_initialized; /* Handle to a FreeType library instance. */ static FT_Library ft_library; @@ -65,7 +65,7 @@ struct ftfont_info #ifdef HAVE_LIBOTF /* The following four members must be here in this order to be compatible with struct xftfont_info (in xftfont.c). */ - int maybe_otf; /* Flag to tell if this may be OTF or not. */ + bool maybe_otf; /* Flag to tell if this may be OTF or not. */ OTF *otf; #endif /* HAVE_LIBOTF */ FT_Size ft_size; @@ -543,9 +543,9 @@ struct font_driver ftfont_driver = /* We can't draw a text without device dependent functions. */ NULL, /* draw */ ftfont_get_bitmap, - NULL, /* get_bitmap */ NULL, /* free_bitmap */ NULL, /* get_outline */ + NULL, /* free_outline */ ftfont_anchor_point, #ifdef HAVE_LIBOTF ftfont_otf_capability, @@ -661,7 +661,8 @@ ftfont_get_open_type_spec (Lisp_Object otf_spec) { struct OpenTypeSpec *spec = malloc (sizeof *spec); Lisp_Object val; - int i, j, negative; + int i, j; + bool negative; if (! spec) return NULL; @@ -1185,7 +1186,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) FT_Size ft_size; FT_UInt size; Lisp_Object val, filename, idx, cache, font_object; - int scalable; + bool scalable; int spacing; char name[256]; int i, len; @@ -1243,7 +1244,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) ftfont_info->ft_size = ft_face->size; ftfont_info->index = XINT (idx); #ifdef HAVE_LIBOTF - ftfont_info->maybe_otf = ft_face->face_flags & FT_FACE_FLAG_SFNT; + ftfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0; ftfont_info->otf = NULL; #endif /* HAVE_LIBOTF */ /* This means that there's no need of transformation. */ @@ -1392,7 +1393,8 @@ ftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct struct ftfont_info *ftfont_info = (struct ftfont_info *) font; FT_Face ft_face = ftfont_info->ft_size->face; int width = 0; - int i, first; + int i; + bool first; if (ftfont_info->ft_size != ft_face->size) FT_Activate_Size (ftfont_info->ft_size); @@ -1682,10 +1684,12 @@ ftfont_check_otf (MFLTFont *font, MFLTOtfSpec *spec) struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font; OTF *otf = flt_font_ft->otf; OTF_Tag *tags; - int i, n, negative; + int i, n; + bool negative; if (FEATURE_ANY (0) && FEATURE_ANY (1)) - /* Return 1 iff any of GSUB or GPOS support the script (and language). */ + /* Return true iff any of GSUB or GPOS support the script (and + language). */ return (otf && (OTF_check_features (otf, 0, spec->script, spec->langsys, NULL, 0) > 0 @@ -2390,7 +2394,7 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in, static MFLTGlyphString gstring; -static int m17n_flt_initialized; +static bool m17n_flt_initialized; static Lisp_Object ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, @@ -2400,7 +2404,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, ptrdiff_t i; struct MFLTFontFT flt_font_ft; MFLT *flt = NULL; - int with_variation_selector = 0; + bool with_variation_selector = 0; if (! m17n_flt_initialized) { @@ -2421,7 +2425,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, break; c = LGLYPH_CHAR (g); if (CHAR_VARIATION_SELECTOR_P (c)) - with_variation_selector++; + with_variation_selector = 1; } len = i; diff --git a/src/ftxfont.c b/src/ftxfont.c index 6ebe0798b4e..c705ede62c4 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -43,14 +43,6 @@ static #endif struct font_driver ftxfont_driver; -/* Prototypes for helper function. */ -static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); -static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, - unsigned, int, int, XPoint *, int, int *, - int); -static void ftxfont_draw_background (FRAME_PTR, struct font *, GC, - int, int, int); - struct ftxfont_frame_data { /* Background and foreground colors. */ @@ -143,7 +135,9 @@ ftxfont_get_gcs (FRAME_PTR f, long unsigned int foreground, long unsigned int ba } static int -ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsigned int code, int x, int y, XPoint *p, int size, int *n, int flush) +ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, + unsigned int code, int x, int y, XPoint *p, int size, + int *n, bool flush) { struct font_bitmap bitmap; unsigned char *b; @@ -232,13 +226,6 @@ ftxfont_draw_background (FRAME_PTR f, struct font *font, GC gc, int x, int y, XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground); } -/* Prototypes for font-driver methods. */ -static Lisp_Object ftxfont_list (Lisp_Object, Lisp_Object); -static Lisp_Object ftxfont_match (Lisp_Object, Lisp_Object); -static Lisp_Object ftxfont_open (FRAME_PTR, Lisp_Object, int); -static void ftxfont_close (FRAME_PTR, struct font *); -static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); - static Lisp_Object ftxfont_list (Lisp_Object frame, Lisp_Object spec) { @@ -280,7 +267,8 @@ ftxfont_close (FRAME_PTR f, struct font *font) } static int -ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) +ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, + bool with_background) { FRAME_PTR f = s->f; struct face *face = s->face; diff --git a/src/nsfont.m b/src/nsfont.m index 5bf4c01c961..1c9976ec6cc 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -625,7 +625,7 @@ static unsigned int nsfont_encode_char (struct font *font, int c); static int nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics); static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, - int with_background); + bool with_background); struct font_driver nsfont_driver = { @@ -833,7 +833,6 @@ nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) font = (struct font *) font_info; font->pixel_size = [sfont pointSize]; font->driver = &nsfont_driver; - font->encoding_type = FONT_ENCODING_NOT_DECIDED; font->encoding_charset = -1; font->repertory_charset = -1; font->default_ascent = 0; @@ -1042,12 +1041,12 @@ nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs, /* Draw glyphs between FROM and TO of S->char2b at (X Y) pixel - position of frame F with S->FACE and S->GC. If WITH_BACKGROUND - is nonzero, fill the background in advance. It is assured that - WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */ + position of frame F with S->FACE and S->GC. If WITH_BACKGROUND, + fill the background in advance. It is assured that WITH_BACKGROUND + is false when (FROM > 0 || TO < S->nchars). */ static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, - int with_background) + bool with_background) /* NOTE: focus and clip must be set also, currently assumed (true in nsterm.m call) from ==0, to ==nchars */ { diff --git a/src/w32font.c b/src/w32font.c index cfd453282dd..8b3a0e4312e 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -635,9 +635,9 @@ w32font_text_extents (struct font *font, unsigned *code, /* w32 implementation of draw for font backend. Optional. Draw glyphs between FROM and TO of S->char2b at (X Y) pixel - position of frame F with S->FACE and S->GC. If WITH_BACKGROUND - is nonzero, fill the background in advance. It is assured that - WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). + position of frame F with S->FACE and S->GC. If WITH_BACKGROUND, + fill the background in advance. It is assured that WITH_BACKGROUND + is false when (FROM > 0 || TO < S->nchars). TODO: Currently this assumes that the colors and fonts are already set in the DC. This seems to be true now, but maybe only due to @@ -647,7 +647,7 @@ w32font_text_extents (struct font *font, unsigned *code, int w32font_draw (struct glyph_string *s, int from, int to, - int x, int y, int with_background) + int x, int y, bool with_background) { UINT options; HRGN orig_clip = NULL; @@ -804,7 +804,7 @@ static int w32font_otf_drive (struct font *font, Lisp_Object features, Lisp_Object gstring_in, int from, int to, Lisp_Object gstring_out, int idx, - int alternate_subst); + bool alternate_subst); */ /* Internal implementation of w32font_list. @@ -987,7 +987,6 @@ w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, font->space_width = font->average_width = w32_font->metrics.tmAveCharWidth; font->vertical_centering = 0; - font->encoding_type = 0; font->baseline_offset = 0; font->relative_compose = 0; font->default_ascent = w32_font->metrics.tmAscent; diff --git a/src/w32font.h b/src/w32font.h index a29ddbe778c..8fa00a9b524 100644 --- a/src/w32font.h +++ b/src/w32font.h @@ -77,7 +77,7 @@ int w32font_has_char (Lisp_Object entity, int c); int w32font_text_extents (struct font *font, unsigned *code, int nglyphs, struct font_metrics *metrics); int w32font_draw (struct glyph_string *s, int from, int to, - int x, int y, int with_background); + int x, int y, bool with_background); int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec); diff --git a/src/xfont.c b/src/xfont.c index be9556d585a..7755b780815 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -126,7 +126,7 @@ static int xfont_has_char (Lisp_Object, int); static unsigned xfont_encode_char (struct font *, int); static int xfont_text_extents (struct font *, unsigned *, int, struct font_metrics *); -static int xfont_draw (struct glyph_string *, int, int, int, int, int); +static int xfont_draw (struct glyph_string *, int, int, int, int, bool); static int xfont_check (FRAME_PTR, struct font *); struct font_driver xfont_driver = @@ -217,9 +217,9 @@ xfont_encode_coding_xlfd (char *xlfd) /* Check if CHARS (cons or vector) is supported by XFONT whose encoding charset is ENCODING (XFONT is NULL) or by a font whose registry corresponds to ENCODING and REPERTORY. - Return 1 if supported, return 0 otherwise. */ + Return true if supported. */ -static int +static bool xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont, struct charset *encoding, struct charset *repertory) { @@ -1019,7 +1019,8 @@ xfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct f } static int -xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) +xfont_draw (struct glyph_string *s, int from, int to, int x, int y, + bool with_background) { XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont; int len = to - from; @@ -1040,7 +1041,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_bac for (i = 0; i < len ; i++) str[i] = XCHAR2B_BYTE2 (s->char2b + from + i); BLOCK_INPUT; - if (with_background > 0) + if (with_background) { if (s->padding_p) for (i = 0; i < len; i++) @@ -1066,7 +1067,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_bac } BLOCK_INPUT; - if (with_background > 0) + if (with_background) { if (s->padding_p) for (i = 0; i < len; i++) diff --git a/src/xftfont.c b/src/xftfont.c index 5e60ab0c4d3..404b9124099 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -52,7 +52,7 @@ struct xftfont_info /* The following five members must be here in this order to be compatible with struct ftfont_info (in ftfont.c). */ #ifdef HAVE_LIBOTF - int maybe_otf; /* Flag to tell if this may be OTF or not. */ + bool maybe_otf; /* Flag to tell if this may be OTF or not. */ OTF *otf; #endif /* HAVE_LIBOTF */ FT_Size ft_size; @@ -92,7 +92,7 @@ xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info * else { XGCValues xgcv; - int fg_done = 0, bg_done = 0; + bool fg_done = 0, bg_done = 0; BLOCK_INPUT; XGetGCValues (FRAME_X_DISPLAY (f), gc, @@ -111,7 +111,7 @@ xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info * *bg = xftface_info->xft_fg, bg_done = 1; } - if (fg_done + bg_done < 2) + if (! (fg_done & bg_done)) { XColor colors[2]; @@ -137,19 +137,6 @@ xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info * } -static Lisp_Object xftfont_list (Lisp_Object, Lisp_Object); -static Lisp_Object xftfont_match (Lisp_Object, Lisp_Object); -static Lisp_Object xftfont_open (FRAME_PTR, Lisp_Object, int); -static void xftfont_close (FRAME_PTR, struct font *); -static int xftfont_prepare_face (FRAME_PTR, struct face *); -static void xftfont_done_face (FRAME_PTR, struct face *); -static int xftfont_has_char (Lisp_Object, int); -static unsigned xftfont_encode_char (struct font *, int); -static int xftfont_text_extents (struct font *, unsigned *, int, - struct font_metrics *); -static int xftfont_draw (struct glyph_string *, int, int, int, int, int); -static int xftfont_end_for_frame (FRAME_PTR f); - struct font_driver xftfont_driver; static Lisp_Object @@ -470,7 +457,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) font->underline_thickness = 0; } #ifdef HAVE_LIBOTF - xftfont_info->maybe_otf = ft_face->face_flags & FT_FACE_FLAG_SFNT; + xftfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0; xftfont_info->otf = NULL; #endif /* HAVE_LIBOTF */ xftfont_info->ft_size = ft_face->size; @@ -630,7 +617,8 @@ xftfont_get_xft_draw (FRAME_PTR f) } static int -xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) +xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, + bool with_background) { FRAME_PTR f = s->f; struct face *face = s->face; @@ -711,15 +699,17 @@ xftfont_end_for_frame (FRAME_PTR f) return 0; } -static int -xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, Lisp_Object entity) +static bool +xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, + Lisp_Object entity) { struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object); FcPattern *oldpat = info->xftfont->pattern; Display *display = FRAME_X_DISPLAY (f); FcPattern *pat = FcPatternCreate (); FcBool b1, b2; - int ok = 0, i1, i2, r1, r2; + bool ok = 0; + int i1, i2, r1, r2; xftfont_add_rendering_parameters (pat, entity); XftDefaultSubstitute (display, FRAME_X_SCREEN_NUMBER (f), pat); From 1ec5e41d0ec506abe02ac223596430f98cb3b951 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 6 Sep 2012 11:33:17 +0300 Subject: [PATCH 047/216] Use `isearch-search-fun' in `perform-replace' (bug#10885, bug#10887). * lisp/replace.el (replace-search-function) (replace-re-search-function): Set default values to nil. (perform-replace): Let-bind isearch-related variables based on replace-related values, call `isearch-search-fun' and let-bind the result to `search-function'. Remove code that sets `search-function' and `search-string' separately for `delimited-flag'. (replace-highlight): Add new argument `delimited-flag' and rename other arguments to the names used in `perform-replace'. Let-bind `isearch-word' to the argument `delimited-flag'. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/replace.el | 43 ++++++++++++++++++------------------------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23cb32e1464..b1dff7e5dc4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2012-09-06 Juri Linkov + + * replace.el (replace-search-function) + (replace-re-search-function): Set default values to nil. + (perform-replace): Let-bind isearch-related variables based on + replace-related values, call `isearch-search-fun' and let-bind + the result to `search-function'. Remove code that sets + `search-function' and `search-string' separately for + `delimited-flag'. + (replace-highlight): Add new argument `delimited-flag' and + rename other arguments to the names used in `perform-replace'. + Let-bind `isearch-word' to the argument `delimited-flag'. + (Bug#10885, bug#10887) + 2012-09-05 Martin Rudalics * help.el (temp-buffer-max-height): New default value. diff --git a/lisp/replace.el b/lisp/replace.el index 3373ee8e512..f9f97dfe485 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1717,12 +1717,12 @@ passed in. If LITERAL is set, no checking is done, anyway." (replace-match newtext fixedcase literal) noedit) -(defvar replace-search-function 'search-forward +(defvar replace-search-function nil "Function to use when searching for strings to replace. It is used by `query-replace' and `replace-string', and is called with three arguments, as if it were `search-forward'.") -(defvar replace-re-search-function 're-search-forward +(defvar replace-re-search-function nil "Function to use when searching for regexps to replace. It is used by `query-replace-regexp', `replace-regexp', `query-replace-regexp-eval', and `map-query-replace-regexp'. @@ -1755,9 +1755,14 @@ make, or the user didn't cancel the call." (nocasify (not (and case-replace case-fold-search))) (literal (or (not regexp-flag) (eq regexp-flag 'literal))) (search-function - (if regexp-flag - replace-re-search-function - replace-search-function)) + (or (if regexp-flag + replace-re-search-function + replace-search-function) + (let ((isearch-regexp regexp-flag) + (isearch-word delimited-flag) + (isearch-case-fold-search case-fold-search) + (isearch-forward t)) + (isearch-search-fun)))) (search-string from-string) (real-match-data nil) ; The match data for the current match. (next-replacement nil) @@ -1811,12 +1816,6 @@ make, or the user didn't cancel the call." (vector repeat-count repeat-count replacements replacements))))) - (if delimited-flag - (setq search-function 're-search-forward - search-string (concat "\\b" - (if regexp-flag from-string - (regexp-quote from-string)) - "\\b"))) (when query-replace-lazy-highlight (setq isearch-lazy-highlight-last-string nil)) @@ -1898,7 +1897,7 @@ make, or the user didn't cancel the call." (replace-highlight (nth 0 real-match-data) (nth 1 real-match-data) start end search-string - (or delimited-flag regexp-flag) case-fold-search)) + regexp-flag delimited-flag case-fold-search)) (setq noedit (replace-match-maybe-edit next-replacement nocasify literal @@ -1917,7 +1916,7 @@ make, or the user didn't cancel the call." (replace-highlight (match-beginning 0) (match-end 0) start end search-string - (or delimited-flag regexp-flag) case-fold-search) + regexp-flag delimited-flag case-fold-search) ;; Bind message-log-max so we don't fill up the message log ;; with a bunch of identical messages. (let ((message-log-max nil) @@ -2099,15 +2098,11 @@ make, or the user didn't cancel the call." (if (= replace-count 1) "" "s"))) (or (and keep-going stack) multi-buffer))) -(defvar isearch-error) -(defvar isearch-forward) -(defvar isearch-case-fold-search) -(defvar isearch-string) - (defvar replace-overlay nil) (defun replace-highlight (match-beg match-end range-beg range-end - string regexp case-fold) + search-string regexp-flag delimited-flag + case-fold-search) (if query-replace-highlight (if replace-overlay (move-overlay replace-overlay match-beg match-end (current-buffer)) @@ -2115,13 +2110,11 @@ make, or the user didn't cancel the call." (overlay-put replace-overlay 'priority 1001) ;higher than lazy overlays (overlay-put replace-overlay 'face 'query-replace))) (if query-replace-lazy-highlight - (let ((isearch-string string) - (isearch-regexp regexp) - ;; Set isearch-word to nil because word-replace is regexp-based, - ;; so `isearch-search-fun' should not use `word-search-forward'. - (isearch-word nil) + (let ((isearch-string search-string) + (isearch-regexp regexp-flag) + (isearch-word delimited-flag) (search-whitespace-regexp nil) - (isearch-case-fold-search case-fold) + (isearch-case-fold-search case-fold-search) (isearch-forward t) (isearch-error nil)) (isearch-lazy-highlight-new-loop range-beg range-end)))) From 826b32357739a0ce755a5a2cadb3552b6914f4b3 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 6 Sep 2012 11:49:40 +0300 Subject: [PATCH 048/216] * lisp/replace.el (replace-lax-whitespace): New defcustom. (query-replace, query-replace-regexp, query-replace-regexp-eval) (replace-string, replace-regexp): Mention it in docstrings. (perform-replace, replace-highlight): Let-bind isearch-lax-whitespace and isearch-regexp-lax-whitespace according to the values of replace-lax-whitespace and regexp-flag. Don't let-bind search-whitespace-regexp. * lisp/isearch.el (isearch-query-replace): Let-bind replace-lax-whitespace instead of let-binding replace-search-function and replace-re-search-function. (isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace and isearch-regexp-lax-whitespace to lazy-highlight variables. (isearch-toggle-symbol): Set isearch-regexp to nil in isearch-word mode (like in isearch-toggle-word). Fixes: debbugs:10885 --- etc/NEWS | 7 +++++++ lisp/ChangeLog | 18 ++++++++++++++++++ lisp/isearch.el | 20 +++++++++++--------- lisp/replace.el | 37 ++++++++++++++++++++++++++++++++++++- 4 files changed, 72 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 5ddb4ed4a1e..ed59f3264ab 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -197,6 +197,13 @@ of one or more whitespace characters defined by the variable `isearch-lax-whitespace'. In regexp incremental search, it toggles the value of the variable `isearch-regexp-lax-whitespace'. +** query-replace changes + +*** When new option `replace-lax-whitespace' is non-nil, +and you enter a space or spaces in the strings or regexps +to be replaced, `query-replace' will match any sequence matched +by the regexp `search-whitespace-regexp'. + ** M-x move-to-column, if called interactively with no prefix arg, now prompts for a column number. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1dff7e5dc4..ccc517973b3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2012-09-06 Juri Linkov + + * replace.el (replace-lax-whitespace): New defcustom. + (query-replace, query-replace-regexp, query-replace-regexp-eval) + (replace-string, replace-regexp): Mention it in docstrings. + (perform-replace, replace-highlight): Let-bind + isearch-lax-whitespace and isearch-regexp-lax-whitespace according + to the values of replace-lax-whitespace and regexp-flag. + Don't let-bind search-whitespace-regexp. (Bug#10885) + + * isearch.el (isearch-query-replace): Let-bind + replace-lax-whitespace instead of let-binding + replace-search-function and replace-re-search-function. + (isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace + and isearch-regexp-lax-whitespace to lazy-highlight variables. + (isearch-toggle-symbol): Set isearch-regexp to nil + in isearch-word mode (like in isearch-toggle-word). + 2012-09-06 Juri Linkov * replace.el (replace-search-function) diff --git a/lisp/isearch.el b/lisp/isearch.el index e6e0a01566a..328e4eb447f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1405,6 +1405,7 @@ Use `isearch-exit' to quit without signaling." (interactive) (setq isearch-word (unless (eq isearch-word 'isearch-symbol-regexp) 'isearch-symbol-regexp)) + (if isearch-word (setq isearch-regexp nil)) (setq isearch-success t isearch-adjusted t) (isearch-update)) @@ -1579,14 +1580,11 @@ way to run word replacements from Isearch is `M-s w ... M-%'." ;; set `search-upper-case' to nil to not call ;; `isearch-no-upper-case-p' in `perform-replace' (search-upper-case nil) - (replace-search-function - (if (and isearch-lax-whitespace (not regexp-flag)) - #'search-forward-lax-whitespace - replace-search-function)) - (replace-re-search-function - (if (and isearch-regexp-lax-whitespace regexp-flag) - #'re-search-forward-lax-whitespace - replace-re-search-function)) + (replace-lax-whitespace + (and search-whitespace-regexp + (if isearch-regexp + isearch-regexp-lax-whitespace + isearch-lax-whitespace))) ;; Set `isearch-recursive-edit' to nil to prevent calling ;; `exit-recursive-edit' in `isearch-done' that terminates ;; the execution of this command when it is non-nil. @@ -2956,10 +2954,14 @@ Attempt to do the search exactly the way the pending Isearch would." (let ((case-fold-search isearch-lazy-highlight-case-fold-search) (isearch-regexp isearch-lazy-highlight-regexp) (isearch-word isearch-lazy-highlight-word) + (isearch-lax-whitespace + isearch-lazy-highlight-lax-whitespace) + (isearch-regexp-lax-whitespace + isearch-lazy-highlight-regexp-lax-whitespace) + (isearch-forward isearch-lazy-highlight-forward) (search-invisible nil) ; don't match invisible text (retry t) (success nil) - (isearch-forward isearch-lazy-highlight-forward) (bound (if isearch-lazy-highlight-forward (min (or isearch-lazy-highlight-end-limit (point-max)) (if isearch-lazy-highlight-wrapped diff --git a/lisp/replace.el b/lisp/replace.el index f9f97dfe485..194805a8f3e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -33,6 +33,14 @@ :type 'boolean :group 'matching) +(defcustom replace-lax-whitespace nil + "Non-nil means `query-replace' matches a sequence of whitespace chars. +When you enter a space or spaces in the strings or regexps to be replaced, +it will match any sequence matched by the regexp `search-whitespace-regexp'." + :type 'boolean + :group 'matching + :version "24.3") + (defvar query-replace-history nil "Default history list for query-replace commands. See `query-replace-from-history-variable' and @@ -226,6 +234,10 @@ letters. \(Transferring the case pattern means that if the old text matched is all caps, or capitalized, then its replacement is upcased or capitalized.) +If `replace-lax-whitespace' is non-nil, a space or spaces in the string +to be replaced will match a sequence of whitespace chars defined by the +regexp in `search-whitespace-regexp'. + Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches surrounded by word boundaries. Fourth and fifth arg START and END specify the region to operate on. @@ -270,6 +282,10 @@ pattern of the old text to the new text, if `case-replace' and all caps, or capitalized, then its replacement is upcased or capitalized.) +If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp +to be replaced will match a sequence of whitespace chars defined by the +regexp in `search-whitespace-regexp'. + Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches surrounded by word boundaries. Fourth and fifth arg START and END specify the region to operate on. @@ -346,6 +362,10 @@ minibuffer. Preserves case in each replacement if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. +If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp +to be replaced will match a sequence of whitespace chars defined by the +regexp in `search-whitespace-regexp'. + Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches that are surrounded by word boundaries. Fourth and fifth arg START and END specify the region to operate on." @@ -437,6 +457,10 @@ are non-nil and FROM-STRING has no uppercase letters. \(Preserving case means that if the string matched is all caps, or capitalized, then its replacement is upcased or capitalized.) +If `replace-lax-whitespace' is non-nil, a space or spaces in the string +to be replaced will match a sequence of whitespace chars defined by the +regexp in `search-whitespace-regexp'. + In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of the buffer. @@ -475,6 +499,10 @@ and TO-STRING is also null.)" Preserve case in each match if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. +If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp +to be replaced will match a sequence of whitespace chars defined by the +regexp in `search-whitespace-regexp'. + In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of the buffer. @@ -1760,6 +1788,10 @@ make, or the user didn't cancel the call." replace-search-function) (let ((isearch-regexp regexp-flag) (isearch-word delimited-flag) + (isearch-lax-whitespace + (and replace-lax-whitespace (not regexp-flag))) + (isearch-regexp-lax-whitespace + (and replace-lax-whitespace regexp-flag)) (isearch-case-fold-search case-fold-search) (isearch-forward t)) (isearch-search-fun)))) @@ -2113,7 +2145,10 @@ make, or the user didn't cancel the call." (let ((isearch-string search-string) (isearch-regexp regexp-flag) (isearch-word delimited-flag) - (search-whitespace-regexp nil) + (isearch-lax-whitespace + (and replace-lax-whitespace (not regexp-flag))) + (isearch-regexp-lax-whitespace + (and replace-lax-whitespace regexp-flag)) (isearch-case-fold-search case-fold-search) (isearch-forward t) (isearch-error nil)) From c752cfa916879f7415990855b52862dd585242ec Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Thu, 6 Sep 2012 13:15:44 +0400 Subject: [PATCH 049/216] Explicitly mark buffer_defaults and buffer_local_symbols. * alloc.c (Fgarbage_collect): Mark buffer_defaults and mark_local_symbols here. (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking since special buffers aren't marked here any more. (allocate_buffer): Chain new buffer with all_buffers here... * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and not here. (Vbuffer_defaults, Vbuffer_local_symbols): Remove. (syms_of_buffer): Remove staticpro of the above. (init_buffer_once): Set names for buffer_defaults and buffer_local_symbols. --- src/ChangeLog | 15 +++++++++++++++ src/alloc.c | 30 +++++++++++++++++------------- src/buffer.c | 22 +++------------------- 3 files changed, 35 insertions(+), 32 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2ca75d416af..a017ef7fdab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2012-09-06 Dmitry Antipov + + Explicitly mark buffer_defaults and buffer_local_symbols. + * alloc.c (Fgarbage_collect): Mark buffer_defaults and + mark_local_symbols here. + (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking + since special buffers aren't marked here any more. + (allocate_buffer): Chain new buffer with all_buffers here... + * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and + not here. + (Vbuffer_defaults, Vbuffer_local_symbols): Remove. + (syms_of_buffer): Remove staticpro of the above. + (init_buffer_once): Set names for buffer_defaults and + buffer_local_symbols. + 2012-09-06 Paul Eggert Use bool for booleans in font-related modules. diff --git a/src/alloc.c b/src/alloc.c index aca0a82d1b5..1a9718bcb25 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -278,6 +278,7 @@ static void gc_sweep (void); static Lisp_Object make_pure_vector (ptrdiff_t); static void mark_glyph_matrix (struct glyph_matrix *); static void mark_face_cache (struct face_cache *); +static void mark_buffer (struct buffer *); #if !defined REL_ALLOC || defined SYSTEM_MALLOC static void refill_memory_reserve (void); @@ -3281,7 +3282,10 @@ allocate_buffer (void) XSETPVECTYPESIZE (b, PVEC_BUFFER, (offsetof (struct buffer, own_text) - header_size) / word_size); - /* Note that the fields of B are not initialized. */ + /* Put B on the chain of all buffers including killed ones. */ + b->header.next.buffer = all_buffers; + all_buffers = b; + /* Note that the rest fields of B are not initialized. */ return b; } @@ -5473,6 +5477,9 @@ See Info node `(elisp)Garbage Collection'. */) /* Mark all the special slots that serve as the roots of accessibility. */ + mark_buffer (&buffer_defaults); + mark_buffer (&buffer_local_symbols); + for (i = 0; i < staticidx; i++) mark_object (*staticvec[i]); @@ -5950,9 +5957,7 @@ mark_object (Lisp_Object arg) #ifdef GC_CHECK_MARKED_OBJECTS m = mem_find (po); - if (m == MEM_NIL && !SUBRP (obj) - && po != &buffer_defaults - && po != &buffer_local_symbols) + if (m == MEM_NIL && !SUBRP (obj)) emacs_abort (); #endif /* GC_CHECK_MARKED_OBJECTS */ @@ -5969,15 +5974,14 @@ mark_object (Lisp_Object arg) { case PVEC_BUFFER: #ifdef GC_CHECK_MARKED_OBJECTS - if (po != &buffer_defaults && po != &buffer_local_symbols) - { - struct buffer *b; - FOR_EACH_BUFFER (b) - if (b == po) - break; - if (b == NULL) - emacs_abort (); - } + { + struct buffer *b; + FOR_EACH_BUFFER (b) + if (b == po) + break; + if (b == NULL) + emacs_abort (); + } #endif /* GC_CHECK_MARKED_OBJECTS */ mark_buffer ((struct buffer *) ptr); break; diff --git a/src/buffer.c b/src/buffer.c index 7698b72a3c6..187277d663b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -60,10 +60,6 @@ struct buffer *all_buffers; struct buffer alignas (GCALIGNMENT) buffer_defaults; -/* A Lisp_Object pointer to the above, used for staticpro */ - -static Lisp_Object Vbuffer_defaults; - /* This structure marks which slots in a buffer have corresponding default values in buffer_defaults. Each such slot has a nonzero value in this structure. @@ -87,9 +83,6 @@ struct buffer buffer_local_flags; struct buffer alignas (GCALIGNMENT) buffer_local_symbols; -/* A Lisp_Object pointer to the above, used for staticpro */ -static Lisp_Object Vbuffer_local_symbols; - /* Return the symbol of the per-buffer variable at offset OFFSET in the buffer structure. */ @@ -595,10 +588,6 @@ even if it is dead. The return value is never nil. */) bset_width_table (b, Qnil); b->prevent_redisplay_optimizations_p = 1; - /* Put this on the chain of all buffers including killed ones. */ - b->header.next.buffer = all_buffers; - all_buffers = b; - /* An ordinary buffer normally doesn't need markers to handle BEGV and ZV. */ bset_pt_marker (b, Qnil); @@ -819,10 +808,6 @@ CLONE nil means the indirect buffer's state is reset to default values. */) b->width_run_cache = 0; bset_width_table (b, Qnil); - /* Put this on the chain of all buffers including killed ones. */ - b->header.next.buffer = all_buffers; - all_buffers = b; - name = Fcopy_sequence (name); set_string_intervals (name, NULL); bset_name (b, name); @@ -5145,10 +5130,11 @@ init_buffer_once (void) buffer_local_symbols.indirections = 0; set_buffer_intervals (&buffer_defaults, NULL); set_buffer_intervals (&buffer_local_symbols, NULL); + /* This is not strictly necessary, but let's make them initialized. */ + bset_name (&buffer_defaults, build_pure_c_string (" *buffer-defaults*")); + bset_name (&buffer_local_symbols, build_pure_c_string (" *buffer-local-symbols*")); XSETPVECTYPESIZE (&buffer_defaults, PVEC_BUFFER, pvecsize); - XSETBUFFER (Vbuffer_defaults, &buffer_defaults); XSETPVECTYPESIZE (&buffer_local_symbols, PVEC_BUFFER, pvecsize); - XSETBUFFER (Vbuffer_local_symbols, &buffer_local_symbols); /* Set up the default values of various buffer slots. */ /* Must do these before making the first buffer! */ @@ -5430,8 +5416,6 @@ syms_of_buffer (void) last_overlay_modification_hooks = Fmake_vector (make_number (10), Qnil); - staticpro (&Vbuffer_defaults); - staticpro (&Vbuffer_local_symbols); staticpro (&Qfundamental_mode); staticpro (&Qmode_class); staticpro (&QSFundamental); From 3424a4f61edc1aac5a5a59c2c8f52c8a7139232a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 6 Sep 2012 17:29:32 +0800 Subject: [PATCH 050/216] * frame.el (window-system-version): Mark as obsolete. See http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00412.html --- etc/NEWS | 1 + lisp/ChangeLog | 4 ++++ lisp/frame.el | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index ed59f3264ab..bc1c49fe946 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -695,6 +695,7 @@ by the underlying C implementation. ** `automount-dir-prefix' is obsolete. ** `buffer-has-markers-at' is obsolete. +** `window-system-version' is obsolete. * Changes in Emacs 24.3 on non-free operating systems diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ccc517973b3..1f5f41c0e35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-06 Chong Yidong + + * frame.el (window-system-version): Mark as obsolete. + 2012-09-06 Juri Linkov * replace.el (replace-lax-whitespace): New defcustom. diff --git a/lisp/frame.el b/lisp/frame.el index 01225639ecf..c182a964820 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1657,6 +1657,10 @@ terminals, cursor blinking is controlled by the terminal." (make-variable-buffer-local 'show-trailing-whitespace) +;; Defined in dispnew.c. +(make-obsolete-variable + 'window-system-version "it does not give useful information." "24.3") + (provide 'frame) ;;; frame.el ends here From 20367d28f5264cd88dbb4cee821466e34355fad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Sonderfeld?= Date: Thu, 6 Sep 2012 17:36:40 +0800 Subject: [PATCH 051/216] Fix use of obsolete variables in vhdl-mode.el. * progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use obsolete alias speedbar-key-map. (vhdl-doc-variable, vhdl-doc-mode): Use called-interactively-p. (vhdl-index-menu-init): Don't use obsolete variable font-lock-maximum-size. --- lisp/ChangeLog | 12 ++++++++++++ lisp/progmodes/vhdl-mode.el | 15 +++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1f5f41c0e35..5a30583a9dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2012-09-06 Chong Yidong + + * progmodes/vhdl-mode.el + +2012-09-06 Rüdiger Sonderfeld + + * progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use + obsolete alias speedbar-key-map. + (vhdl-doc-variable, vhdl-doc-mode): Use called-interactively-p. + (vhdl-index-menu-init): Don't use obsolete variable + font-lock-maximum-size. + 2012-09-06 Chong Yidong * frame.el (window-system-version): Mark as obsolete. diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 607ccd8b7e7..0ca3439dd60 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -4138,10 +4138,7 @@ STRING are replaced by `-' and substrings are converted to lower case." (set (make-local-variable 'imenu-generic-expression) vhdl-imenu-generic-expression) (when (and vhdl-index-menu (fboundp 'imenu)) - (if (or (not (boundp 'font-lock-maximum-size)) - (> font-lock-maximum-size (buffer-size))) - (imenu-add-to-menubar "Index") - (message "Scanning buffer for index...buffer too big")))) + (imenu-add-to-menubar "Index"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Source file menu (using `easy-menu.el') @@ -14385,10 +14382,10 @@ if required." (define-key vhdl-speedbar-key-map (int-to-string key) `(lambda () (interactive) (vhdl-speedbar-set-depth ,key))) (setq key (1+ key))))) - (define-key speedbar-key-map "h" + (define-key speedbar-mode-map "h" (lambda () (interactive) (speedbar-change-initial-expansion-list "vhdl directory"))) - (define-key speedbar-key-map "H" + (define-key speedbar-mode-map "H" (lambda () (interactive) (speedbar-change-initial-expansion-list "vhdl project"))) ;; menu @@ -17400,7 +17397,8 @@ to visually support naming conventions.") "Display VARIABLE's documentation in *Help* buffer." (interactive) (unless (featurep 'xemacs) - (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p))) + (help-setup-xref (list #'vhdl-doc-variable variable) + (called-interactively-p 'interactive))) (with-output-to-temp-buffer (if (fboundp 'help-buffer) (help-buffer) "*Help*") (princ (documentation-property variable 'variable-documentation)) @@ -17412,7 +17410,8 @@ to visually support naming conventions.") "Display VHDL Mode documentation in *Help* buffer." (interactive) (unless (featurep 'xemacs) - (help-setup-xref (list #'vhdl-doc-mode) (interactive-p))) + (help-setup-xref (list #'vhdl-doc-mode) + (called-interactively-p 'interactive))) (with-output-to-temp-buffer (if (fboundp 'help-buffer) (help-buffer) "*Help*") (princ mode-name) From fcbfbdea93bf0a9ba7bc0ab3e4e3f37e3d089588 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 6 Sep 2012 17:38:56 +0800 Subject: [PATCH 052/216] Remove references to obsolete variable speedbar-key-map. * speedbar.el (speedbar-update-flag, speedbar-mode): Remove references to obsolete variable speedbar-key-map. --- lisp/ChangeLog | 7 +++---- lisp/speedbar.el | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a30583a9dc..1e09fe0850d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,3 @@ -2012-09-06 Chong Yidong - - * progmodes/vhdl-mode.el - 2012-09-06 Rüdiger Sonderfeld * progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use @@ -14,6 +10,9 @@ * frame.el (window-system-version): Mark as obsolete. + * speedbar.el (speedbar-update-flag, speedbar-mode): Remove uses + of obsolete variable speedbar-key-map. + 2012-09-06 Juri Linkov * replace.el (replace-lax-whitespace): New defcustom. diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 16993ce1891..90cdea63e85 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -763,7 +763,7 @@ DIRECTORY-EXPRESSION to `speedbar-ignored-directory-expressions'." "Non-nil means to automatically update the display. When this is nil then speedbar will not follow the attached frame's directory. If you want to change this while speedbar is active, either use -\\[customize] or call \\ `\\[speedbar-toggle-updates]'." +\\[customize] or call \\ `\\[speedbar-toggle-updates]'." :group 'speedbar :initialize 'custom-initialize-default :set (lambda (sym val) @@ -1083,7 +1083,7 @@ Return nil if it doesn't exist." (define-derived-mode speedbar-mode fundamental-mode "Speedbar" "Major mode for managing a display of directories and tags. -\\ +\\ The first line represents the default directory of the speedbar frame. Each directory segment is a button which jumps speedbar's default directory to that directory. Buttons are activated by clicking `\\[speedbar-click]'. @@ -1120,7 +1120,7 @@ category of tags. Click the {+} to expand the category. Jump-able tags start with >. Click the name of the tag to go to that position in the selected file. -\\{speedbar-key-map}" +\\{speedbar-mode-map}" (save-excursion (setq font-lock-keywords nil) ;; no font-locking please (setq truncate-lines t) From d458ef98df8da78f9f102da5f4a066df400ca8cd Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 6 Sep 2012 11:35:08 -0400 Subject: [PATCH 053/216] * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args. (cl--make-usage-args): Strip _ from argument names. Fixes: debbugs:12367 --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/cl-macs.el | 19 +++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e09fe0850d..37064b6680b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-06 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args + (bug#12367). + (cl--make-usage-args): Strip _ from argument names. + 2012-09-06 Rüdiger Sonderfeld * progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index aba412cc8f5..312c37261e2 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -393,9 +393,14 @@ its argument list allows full Common Lisp conventions." (mapcar (lambda (x) (cond ((symbolp x) - (if (eq ?\& (aref (symbol-name x) 0)) - (setq state x) - (make-symbol (upcase (symbol-name x))))) + (let ((first (aref (symbol-name x) 0))) + (if (eq ?\& first) + (setq state x) + ;; Strip a leading underscore, since it only + ;; means that this argument is unused. + (make-symbol (upcase (if (eq ?_ first) + (substring (symbol-name x) 1) + (symbol-name x))))))) ((not (consp x)) x) ((memq state '(nil &rest)) (cl--make-usage-args x)) (t ;(VAR INITFORM SVAR) or ((KEYWORD VAR) INITFORM SVAR). @@ -479,7 +484,13 @@ its argument list allows full Common Lisp conventions." (let ((arg (pop args))) (or (consp arg) (setq arg (list arg))) (let* ((karg (if (consp (car arg)) (caar arg) - (intern (format ":%s" (car arg))))) + (let ((name (symbol-name (car arg)))) + ;; Strip a leading underscore, since it only + ;; means that this argument is unused, but + ;; shouldn't affect the key's name (bug#12367). + (if (eq ?_ (aref name 0)) + (setq name (substring name 1))) + (intern (format ":%s" name))))) (varg (if (consp (car arg)) (cl-cadar arg) (car arg))) (def (if (cdr arg) (cadr arg) (or (car cl--bind-defs) (cadr (assq varg cl--bind-defs))))) From 0216c1289b6ff1aa692ab5e7e8fe3f56e760a278 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 6 Sep 2012 19:42:48 +0300 Subject: [PATCH 054/216] Fix bug #12327 with SIGCHLD handling on Windows and some other systems. src/process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke SIGCHLD handling on systems that don't have WNOHANG. --- src/ChangeLog | 5 +++++ src/process.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a017ef7fdab..479fb38e60b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-06 Eli Zaretskii + + * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke + SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327) + 2012-09-06 Dmitry Antipov Explicitly mark buffer_defaults and buffer_local_symbols. diff --git a/src/process.c b/src/process.c index 3a6615fb505..9ab8d2720b2 100644 --- a/src/process.c +++ b/src/process.c @@ -6518,9 +6518,9 @@ record_child_status_change (void) #if (defined WINDOWSNT \ || (defined USG && !defined GNU_LINUX \ && !(defined HPUX && defined WNOHANG))) -enum { CAN_HANDLE_MULTIPLE_CHILDREN = 1 }; -#else enum { CAN_HANDLE_MULTIPLE_CHILDREN = 0 }; +#else +enum { CAN_HANDLE_MULTIPLE_CHILDREN = 1 }; #endif static void From 845ce106c0ab157e25416964330875ad6c24b699 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Thu, 6 Sep 2012 22:13:45 +0000 Subject: [PATCH 055/216] Misc changes made in Gnus master Use combining faces for highlighting. Change ephemeral Gnus group names to be prettier. gnus-util.el: Fix compilation error on XEmacs 21.4. --- lisp/gnus/ChangeLog | 24 ++++++++++++++++++++++++ lisp/gnus/gnus-group.el | 8 +++----- lisp/gnus/gnus-salt.el | 4 +--- lisp/gnus/gnus-sum.el | 5 ++--- lisp/gnus/gnus-util.el | 20 +++++--------------- 5 files changed, 35 insertions(+), 26 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ddb0143b37a..48d57da8f8d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,27 @@ +2012-09-06 Lars Ingebrigtsen + + * gnus-util.el: Fix compilation error on XEmacs 21.4. + +2012-09-06 Juri Linkov + + * gnus-group.el (gnus-read-ephemeral-gmane-group): Change the naming + scheme for buffer names to be more consistent with other group and + article buffer names in Gnus. + +2012-09-06 Lars Ingebrigtsen + + * gnus-util.el + (gnus-put-text-property-excluding-characters-with-faces): Remove. + + * gnus-compat.el: Define compat function `add-face' from Wolfgang + Jenkner. + + * gnus-group.el (gnus-group-highlight-line): Use combining faces. + + * gnus-sum.el (gnus-summary-highlight-line): Ditto. + + * gnus-salt.el (gnus-tree-highlight-node): Ditto. + 2012-09-06 Katsumi Yamaoka * gnus-score.el (gnus-score-decode-text-parts): Use #' for diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 71af5792d2c..24406fcc04e 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1669,9 +1669,7 @@ and ends at END." gnus-group-highlight)))) (unless (eq face (get-text-property beg 'face)) (let ((inhibit-read-only t)) - (gnus-put-text-property-excluding-characters-with-faces - beg end 'face - (if (boundp face) (symbol-value face) face))) + (add-face beg end (if (boundp face) (symbol-value face) face))) (gnus-extent-start-open beg)))) (defun gnus-group-get-icon (group) @@ -2388,7 +2386,7 @@ specified by `gnus-gmane-group-download-format'." group start (+ start range))) (write-region (point-min) (point-max) tmpfile) (gnus-group-read-ephemeral-group - (format "%s.start-%s.range-%s" group start range) + (format "nndoc+ephemeral:%s.start-%s.range-%s" group start range) `(nndoc ,tmpfile (nndoc-article-type mbox)))) (delete-file tmpfile))) @@ -2481,7 +2479,7 @@ the bug number, and browsing the URL must return mbox output." "/.*$" "")))) (write-region (point-min) (point-max) tmpfile) (gnus-group-read-ephemeral-group - (format "gnus-read-ephemeral-bug:%s" + (format "nndoc+ephemeral:bug#%s" (mapconcat 'number-to-string ids ",")) `(nndoc ,tmpfile (nndoc-article-type mbox)) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 760a7a0942e..87a120279bc 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -660,9 +660,7 @@ Two predefined functions are available: (not (eval (caar list)))) (setq list (cdr list))))) (unless (eq (setq face (cdar list)) (get-text-property beg 'face)) - (gnus-put-text-property-excluding-characters-with-faces - beg end 'face - (if (boundp face) (symbol-value face) face))))) + (add-face beg end (if (boundp face) (symbol-value face) face))))) (defun gnus-tree-indent (level) (insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? ))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index b44b953bec6..bc0addd1559 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12522,9 +12522,8 @@ If REVERSE, save parts that do not match TYPE." (not (memq article gnus-newsgroup-cached))))) (let ((face (funcall (gnus-summary-highlight-line-0)))) (unless (eq face (get-text-property beg 'face)) - (gnus-put-text-property-excluding-characters-with-faces - beg (point-at-eol) 'face - (setq face (if (boundp face) (symbol-value face) face))) + (add-face beg (point-at-eol) + (setq face (if (boundp face) (symbol-value face) face))) (when gnus-summary-highlight-line-function (funcall gnus-summary-highlight-line-function article face)))))) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 3c4af9b4e50..0c048e63bdf 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -866,19 +866,6 @@ If there's no subdirectory, delete DIRECTORY as well." (setq beg (point))) (gnus-overlay-put (gnus-make-overlay beg (point)) prop val))))) -(defun gnus-put-text-property-excluding-characters-with-faces (beg end - prop val) - "The same as `put-text-property', but don't put props on characters with the `gnus-face' property." - (let ((b beg)) - (while (/= b end) - (when (get-text-property b 'gnus-face) - (setq b (next-single-property-change b 'gnus-face nil end))) - (when (/= b end) - (inline - (gnus-put-text-property - b (setq b (next-single-property-change b 'gnus-face nil end)) - prop val)))))) - (defmacro gnus-faces-at (position) "Return a list of faces at POSITION." (if (featurep 'xemacs) @@ -1932,8 +1919,11 @@ Same as `string-match' except this function does not change the match data." "Return non-nil if STR1 is a prefix of STR2. If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences." - (eq t (compare-strings str1 nil nil - str2 0 (length str1) ignore-case)))) + (and (<= (length str1) (length str2)) + (let ((prefix (substring str2 0 (length str1)))) + (if ignore-case + (string-equal (downcase str1) (downcase prefix)) + (string-equal str1 prefix)))))) (eval-and-compile (if (fboundp 'macroexpand-all) From 2fe282993cf9c84f5be424dc93d03f9705a7edd8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 6 Sep 2012 18:27:44 -0700 Subject: [PATCH 056/216] Signal-handler cleanup. Emacs's signal handlers were written in the old 4.2BSD style with sigblock and sigmask and so forth, and this led to some inefficiencies and confusion. Rewrite these to use pthread_sigmask etc. without copying signal sets around. Also, get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and 'signal', and instead use functions that do not attempt to take over the system name space. This patch causes Emacs's text segment to shrink by 0.7% on my platform, Fedora 17 x86-64. * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF): Adjust to syssignal.h changes. (SIGNAL_H_AB): Remove; no longer needed. * src/alloc.c, src/emacsgtkfixed.c, src/nsfns.m, src/widget.c, src/xmenu.c: Do not include or "syssignal.h", as these modules do not use signals. * src/atimer.c, src/callproc.c, src/data.c, src/dispnew.c, src/emacs.c: * src/floatfns.c, src/gtkutil.c, src/keyboard.c, src/process.c, src/sound.c: * src/sysdep.c, src/term.c, src/xterm.c: Do not include , as "syssignal.h" does that for us now. * src/atimer.c (sigmask_atimers): New function. (block_atimers, unblock_atimers): New functions, replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS. All uses replaced. * src/conf_post.h [SIGNAL_H_AHB]: Do not include ; no longer needed here. * src/emacs.c (main): Inspect existing signal handler with sigaction, so that there's no need to block and unblock SIGHUP. * src/sysdep.c (struct save_signal): New member 'action', replacing old member 'handler'. (save_signal_handlers, restore_signal_handlers): Use sigaction instead of 'signal' to save and restore. (get_set_sighandler, set_sighandler) [!WINDOWSNT]: New function. All users of 'signal' modified to use set_sighandler if they're writeonly, and to use sys_signal if they're read+write. (emacs_sigaction_init, forwarded_signal): New functions. (sys_signal): Remove. All uses replaced by calls to sigaction and emacs_sigaction_init, or by direct calls to 'signal'. (sys_sigmask) [!__GNUC__]: Remove; no longer needed. (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove; all uses replaced by pthread_sigmask etc. calls. * src/syssignal.h: Include . (emacs_sigaction_init, forwarded_signal): New decls. (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t. (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask. (sigmask, sys_sigmask): Remove; no longer needed. (sigpause): Remove. All uses replaced by its definiens, sigsuspend. (sigblock, sigunblock, sigfree): (sigsetmask) [!defined sigsetmask]: Remove. All uses replaced by pthread_sigmask. (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN) no longer need to be replaced, and its typical old uses are now done via emacs_sigaction_init and sigaction. (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls. (sys_sigdel): Remove; unused. (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef. Fixes: debbugs:12327 --- ChangeLog | 7 +++ configure.ac | 18 ++----- src/ChangeLog | 56 +++++++++++++++++++++- src/alloc.c | 3 -- src/atimer.c | 49 +++++++++++++------ src/callproc.c | 4 -- src/conf_post.h | 5 -- src/data.c | 7 +-- src/dispnew.c | 11 +++-- src/emacs.c | 82 +++++++++++++++++++------------- src/emacsgtkfixed.c | 1 - src/floatfns.c | 1 - src/gtkutil.c | 15 ++++-- src/keyboard.c | 72 ++++++++++++++++++---------- src/nsfns.m | 1 - src/process.c | 33 ++++++------- src/sound.c | 24 +++++++--- src/sysdep.c | 111 +++++++++++++++----------------------------- src/syssignal.h | 59 ++--------------------- src/term.c | 19 +++++--- src/widget.c | 3 -- src/xmenu.c | 5 -- src/xterm.c | 22 +++++---- 23 files changed, 325 insertions(+), 283 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55223ab8c5e..112532e7ece 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-09-06 Paul Eggert + + Signal-handler cleanup (Bug#12327). + * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF): + Adjust to syssignal.h changes. + (SIGNAL_H_AB): Remove; no longer needed. + 2012-09-04 Paul Eggert Simplify redefinition of 'abort' (Bug#12316). diff --git a/configure.ac b/configure.ac index 16e579c862a..dd5e322194a 100644 --- a/configure.ac +++ b/configure.ac @@ -3445,7 +3445,7 @@ case $opsys in cygwin ) AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)]) dnl multi-line AC_DEFINEs are hard. :( - AC_DEFINE(PTY_OPEN, [ do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)]) + AC_DEFINE(PTY_OPEN, [ do { int dummy; sigset_t blocked, procmask; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) emacs_close (dummy); } while (0)]) AC_DEFINE(PTY_NAME_SPRINTF, []) AC_DEFINE(PTY_TTY_NAME_SPRINTF, []) ;; @@ -3474,7 +3474,7 @@ case $opsys in AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)]) dnl Note that grantpt and unlockpt may fork. We must block SIGCHLD dnl to prevent sigchld_handler from intercepting the child's death. - AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); sigunblock (sigmask (SIGCHLD)); }]) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }]) dnl if HAVE_POSIX_OPENPT if test "x$ac_cv_func_posix_openpt" = xyes; then AC_DEFINE(PTY_OPEN, [fd = posix_openpt (O_RDWR | O_NOCTTY)]) @@ -3519,18 +3519,15 @@ case $opsys in ;; sol2* ) - dnl Uses sigblock/sigunblock rather than sighold/sigrelse, - dnl which appear to be BSD4.1 specific. It may also be appropriate - dnl for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com dnl On SysVr4, grantpt(3) forks a subprocess, so keep sigchld_handler() dnl from intercepting that death. If any child but grantpt's should die dnl within, it should be caught after sigrelse(2). - AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }]) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }]) ;; unixware ) dnl Comments are as per sol2*. - AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal("could not grant slave pty"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }]) + AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }]) ;; esac @@ -3820,13 +3817,6 @@ case $opsys in AC_DEFINE(XOS_NEEDS_TIME_H, 1, [Compensate for a bug in Xos.h on some systems, where it requires time.h.]) ;; - - netbsd | openbsd ) - dnl Greg A. Woods says we must include signal.h - dnl before syssignal.h is included, to work around interface conflicts - dnl that are handled with CPP __RENAME() macro in signal.h. - AC_DEFINE(SIGNAL_H_AHB, 1, [Define if AH_BOTTOM should include signal.h.]) - ;; esac diff --git a/src/ChangeLog b/src/ChangeLog index 479fb38e60b..3bfa9e929d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,57 @@ +2012-09-06 Paul Eggert + + Signal-handler cleanup (Bug#12327). + Emacs's signal handlers were written in the old 4.2BSD style with + sigblock and sigmask and so forth, and this led to some + inefficiencies and confusion. Rewrite these to use + pthread_sigmask etc. without copying signal sets around. Also, + get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and + 'signal', and instead use functions that do not attempt to take + over the system name space. This patch causes Emacs's text + segment to shrink by 0.7% on my platform, Fedora 17 x86-64. + * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c: + Do not include or "syssignal.h", as these + modules do not use signals. + * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c: + * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c: + Do not include , as "syssignal.h" does that for us now. + * atimer.c (sigmask_atimers): New function. + (block_atimers, unblock_atimers): New functions, + replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS. + All uses replaced. + * conf_post.h [SIGNAL_H_AHB]: Do not include ; + no longer needed here. + * emacs.c (main): Inspect existing signal handler with sigaction, + so that there's no need to block and unblock SIGHUP. + * sysdep.c (struct save_signal): New member 'action', replacing + old member 'handler'. + (save_signal_handlers, restore_signal_handlers): + Use sigaction instead of 'signal' to save and restore. + (get_set_sighandler, set_sighandler) [!WINDOWSNT]: + New function. All users of 'signal' modified to use set_sighandler + if they're writeonly, and to use sys_signal if they're read+write. + (emacs_sigaction_init, forwarded_signal): New functions. + (sys_signal): Remove. All uses replaced by calls to sigaction + and emacs_sigaction_init, or by direct calls to 'signal'. + (sys_sigmask) [!__GNUC__]: Remove; no longer needed. + (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove; + all uses replaced by pthread_sigmask etc. calls. + * syssignal.h: Include . + (emacs_sigaction_init, forwarded_signal): New decls. + (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t. + (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask. + (sigmask, sys_sigmask): Remove; no longer needed. + (sigpause): Remove. All uses replaced by its definiens, sigsuspend. + (sigblock, sigunblock, sigfree): + (sigsetmask) [!defined sigsetmask]: + Remove. All uses replaced by pthread_sigmask. + (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN) + no longer need to be replaced, and its typical old uses + are now done via emacs_sigaction_init and sigaction. + (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls. + (sys_sigdel): Remove; unused. + (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef. + 2012-09-06 Eli Zaretskii * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke @@ -50,7 +104,7 @@ 2012-09-05 Paul Eggert - Fix race conditions with signal handlers and errno. + Fix race conditions with signal handlers and errno (Bug#12327). Be more systematic about preserving errno whenever a signal handler returns, even if it's not in the main thread. Do this by renaming signal handlers to distinguish between signal delivery diff --git a/src/alloc.c b/src/alloc.c index 1a9718bcb25..bf7c156d321 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -26,8 +26,6 @@ along with GNU Emacs. If not, see . */ #include /* For CHAR_BIT. */ #include -#include - #ifdef HAVE_PTHREAD #include #endif @@ -42,7 +40,6 @@ along with GNU Emacs. If not, see . */ #include "keyboard.h" #include "frame.h" #include "blockinput.h" -#include "syssignal.h" #include "termhooks.h" /* For struct terminal. */ #include #include diff --git a/src/atimer.c b/src/atimer.c index 060dead9b17..34731920af5 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include -#include #include #include #include "lisp.h" @@ -51,8 +50,24 @@ int pending_atimers; /* Block/unblock SIGALRM. */ -#define BLOCK_ATIMERS sigblock (sigmask (SIGALRM)) -#define UNBLOCK_ATIMERS sigunblock (sigmask (SIGALRM)) +static void +sigmask_atimers (int how) +{ + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGALRM); + pthread_sigmask (how, &blocked, 0); +} +static void +block_atimers (void) +{ + sigmask_atimers (SIG_BLOCK); +} +static void +unblock_atimers (void) +{ + sigmask_atimers (SIG_UNBLOCK); +} /* Function prototypes. */ @@ -109,7 +124,7 @@ start_atimer (enum atimer_type type, EMACS_TIME timestamp, atimer_callback fn, t->fn = fn; t->client_data = client_data; - BLOCK_ATIMERS; + block_atimers (); /* Compute the timer's expiration time. */ switch (type) @@ -130,7 +145,7 @@ start_atimer (enum atimer_type type, EMACS_TIME timestamp, atimer_callback fn, /* Insert the timer in the list of active atimers. */ schedule_atimer (t); - UNBLOCK_ATIMERS; + unblock_atimers (); /* Arrange for a SIGALRM at the time the next atimer is ripe. */ set_alarm (); @@ -146,7 +161,7 @@ cancel_atimer (struct atimer *timer) { int i; - BLOCK_ATIMERS; + block_atimers (); for (i = 0; i < 2; ++i) { @@ -173,7 +188,7 @@ cancel_atimer (struct atimer *timer) } } - UNBLOCK_ATIMERS; + unblock_atimers (); } @@ -204,7 +219,7 @@ append_atimer_lists (struct atimer *list_1, struct atimer *list_2) void stop_other_atimers (struct atimer *t) { - BLOCK_ATIMERS; + block_atimers (); if (t) { @@ -229,7 +244,7 @@ stop_other_atimers (struct atimer *t) stopped_atimers = append_atimer_lists (atimers, stopped_atimers); atimers = t; - UNBLOCK_ATIMERS; + unblock_atimers (); } @@ -244,7 +259,7 @@ run_all_atimers (void) struct atimer *t = atimers; struct atimer *next; - BLOCK_ATIMERS; + block_atimers (); atimers = stopped_atimers; stopped_atimers = NULL; @@ -255,7 +270,7 @@ run_all_atimers (void) t = next; } - UNBLOCK_ATIMERS; + unblock_atimers (); } } @@ -397,9 +412,9 @@ do_pending_atimers (void) { if (pending_atimers) { - BLOCK_ATIMERS; + block_atimers (); run_timers (); - UNBLOCK_ATIMERS; + unblock_atimers (); } } @@ -412,7 +427,9 @@ turn_on_atimers (bool on) { if (on) { - signal (SIGALRM, deliver_alarm_signal); + struct sigaction action; + emacs_sigaction_init (&action, deliver_alarm_signal); + sigaction (SIGALRM, &action, 0); set_alarm (); } else @@ -423,8 +440,10 @@ turn_on_atimers (bool on) void init_atimer (void) { + struct sigaction action; free_atimers = stopped_atimers = atimers = NULL; pending_atimers = 0; /* pending_signals is initialized in init_keyboard.*/ - signal (SIGALRM, deliver_alarm_signal); + emacs_sigaction_init (&action, deliver_alarm_signal); + sigaction (SIGALRM, &action, 0); } diff --git a/src/callproc.c b/src/callproc.c index 2e9a8950700..a92959a1559 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include -#include #include #include #include @@ -506,9 +505,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (fd_output >= 0) fd1 = fd_output; -#if 0 /* Some systems don't have sigblock. */ - mask = sigblock (sigmask (SIGCHLD)); -#endif /* Record that we're about to create a synchronous process. */ synch_process_alive = 1; diff --git a/src/conf_post.h b/src/conf_post.h index cef55863752..1bf40af260b 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -40,11 +40,6 @@ along with GNU Emacs. If not, see . */ #endif #endif -#ifdef SIGNAL_H_AHB -#undef SIGNAL_H_AHB -#include -#endif - /* This silences a few compilation warnings on FreeBSD. */ #ifdef BSD_SYSTEM_AHB #undef BSD_SYSTEM_AHB diff --git a/src/data.c b/src/data.c index 6151d815b29..5fbf43e424e 100644 --- a/src/data.c +++ b/src/data.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include -#include #include #include @@ -3210,7 +3209,7 @@ syms_of_data (void) static _Noreturn void handle_arith_signal (int sig) { - sigsetmask (SIGEMPTYMASK); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); xsignal0 (Qarith_error); } @@ -3223,6 +3222,7 @@ deliver_arith_signal (int sig) void init_data (void) { + struct sigaction action; /* Don't do this if just dumping out. We don't want to call `signal' in this case so that we don't have trouble with dumping @@ -3231,5 +3231,6 @@ init_data (void) if (!initialized) return; #endif /* CANNOT_DUMP */ - signal (SIGFPE, deliver_arith_signal); + emacs_sigaction_init (&action, deliver_arith_signal); + sigaction (SIGFPE, &action, 0); } diff --git a/src/dispnew.c b/src/dispnew.c index e02b33000d8..85b3254aae3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #define DISPEXTERN_INLINE EXTERN_INLINE -#include #include #include #include @@ -5560,7 +5559,9 @@ handle_window_change_signal (int sig) int width, height; struct tty_display_info *tty; - signal (SIGWINCH, deliver_window_change_signal); + struct sigaction action; + emacs_sigaction_init (&action, deliver_window_change_signal); + sigaction (SIGWINCH, &action, 0); /* The frame size change obviously applies to a single termcap-controlled terminal, but we can't decide which. @@ -6175,7 +6176,11 @@ init_display (void) #ifndef CANNOT_DUMP if (initialized) #endif /* CANNOT_DUMP */ - signal (SIGWINCH, deliver_window_change_signal); + { + struct sigaction action; + emacs_sigaction_init (&action, deliver_window_change_signal); + sigaction (SIGWINCH, &action, 0); + } #endif /* SIGWINCH */ /* If running as a daemon, no need to initialize any frames/terminal. */ diff --git a/src/emacs.c b/src/emacs.c index fc92b30af26..ff50f409d5c 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include -#include #include #include @@ -322,7 +321,12 @@ fatal_error_backtrace (int sig, int backtrace_limit) going to send is probably blocked, so we have to unblock it if we want to really receive it. */ #ifndef MSDOS - sigunblock (sigmask (fatal_error_code)); + { + sigset_t unblocked; + sigemptyset (&unblocked); + sigaddset (&unblocked, fatal_error_code); + pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); + } #endif kill (getpid (), fatal_error_code); @@ -339,7 +343,10 @@ static void deliver_danger_signal (int); static void handle_danger_signal (int sig) { - signal (sig, deliver_danger_signal); + struct sigaction action; + emacs_sigaction_init (&action, deliver_danger_signal); + sigaction (sig, &action, 0); + malloc_warning ("Operating system warns that virtual memory is running low.\n"); /* It might be unsafe to call do_auto_save now. */ @@ -683,6 +690,7 @@ main (int argc, char **argv) char dname_arg2[80]; #endif char *ch_to_dir; + struct sigaction fatal_error_action; #if GC_MARK_STACK stack_base = &dummy; @@ -1103,6 +1111,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem } init_signals (); + emacs_sigaction_init (&fatal_error_action, deliver_fatal_signal); /* Don't catch SIGHUP if dumping. */ if (1 @@ -1111,13 +1120,17 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem #endif ) { - sigblock (sigmask (SIGHUP)); /* In --batch mode, don't catch SIGHUP if already ignored. That makes nohup work. */ - if (! noninteractive - || signal (SIGHUP, SIG_IGN) != SIG_IGN) - signal (SIGHUP, deliver_fatal_signal); - sigunblock (sigmask (SIGHUP)); + bool catch_SIGHUP = !noninteractive; + if (!catch_SIGHUP) + { + struct sigaction old_action; + sigaction (SIGHUP, 0, &old_action); + catch_SIGHUP = old_action.sa_handler != SIG_IGN; + } + if (catch_SIGHUP) + sigaction (SIGHUP, &fatal_error_action, 0); } if ( @@ -1141,68 +1154,73 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem add_user_signal (SIGUSR2, "sigusr2"); #endif #ifdef SIGABRT - signal (SIGABRT, deliver_fatal_signal); + sigaction (SIGABRT, &fatal_error_action, 0); #endif #ifdef SIGHWE - signal (SIGHWE, deliver_fatal_signal); + sigaction (SIGHWE, &fatal_error_action, 0); #endif #ifdef SIGPRE - signal (SIGPRE, deliver_fatal_signal); + sigaction (SIGPRE, &fatal_error_action, 0); #endif #ifdef SIGORE - signal (SIGORE, deliver_fatal_signal); + sigaction (SIGORE, &fatal_error_action, 0); #endif #ifdef SIGUME - signal (SIGUME, deliver_fatal_signal); + sigaction (SIGUME, &fatal_error_action, 0); #endif #ifdef SIGDLK - signal (SIGDLK, deliver_fatal_signal); + sigaction (SIGDLK, &fatal_error_action, 0); #endif #ifdef SIGCPULIM - signal (SIGCPULIM, deliver_fatal_signal); + sigaction (SIGCPULIM, &fatal_error_action, 0); #endif #ifdef SIGIOT /* This is missing on some systems - OS/2, for example. */ - signal (SIGIOT, deliver_fatal_signal); + sigaction (SIGIOT, &fatal_error_action, 0); #endif #ifdef SIGEMT - signal (SIGEMT, deliver_fatal_signal); + sigaction (SIGEMT, &fatal_error_action, 0); #endif - signal (SIGFPE, deliver_fatal_signal); + sigaction (SIGFPE, &fatal_error_action, 0); #ifdef SIGBUS - signal (SIGBUS, deliver_fatal_signal); + sigaction (SIGBUS, &fatal_error_action, 0); #endif - signal (SIGSEGV, deliver_fatal_signal); + sigaction (SIGSEGV, &fatal_error_action, 0); #ifdef SIGSYS - signal (SIGSYS, deliver_fatal_signal); + sigaction (SIGSYS, &fatal_error_action, 0); #endif /* May need special treatment on MS-Windows. See http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01062.html Please update the doc of kill-emacs, kill-emacs-hook, and NEWS if you change this. */ - if (noninteractive) signal (SIGINT, deliver_fatal_signal); - signal (SIGTERM, deliver_fatal_signal); + if (noninteractive) + sigaction (SIGINT, &fatal_error_action, 0); + sigaction (SIGTERM, &fatal_error_action, 0); #ifdef SIGXCPU - signal (SIGXCPU, deliver_fatal_signal); + sigaction (SIGXCPU, &fatal_error_action, 0); #endif #ifdef SIGXFSZ - signal (SIGXFSZ, deliver_fatal_signal); + sigaction (SIGXFSZ, &fatal_error_action, 0); #endif /* SIGXFSZ */ #ifdef SIGDANGER /* This just means available memory is getting low. */ - signal (SIGDANGER, deliver_danger_signal); + { + struct sigaction action; + emacs_sigaction_init (&action, deliver_danger_signal); + sigaction (SIGDANGER, &action, 0); + } #endif #ifdef AIX /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */ - signal (SIGXCPU, deliver_fatal_signal); - signal (SIGIOINT, deliver_fatal_signal); - signal (SIGGRANT, deliver_fatal_signal); - signal (SIGRETRACT, deliver_fatal_signal); - signal (SIGSOUND, deliver_fatal_signal); - signal (SIGMSG, deliver_fatal_signal); + sigaction (SIGXCPU, &fatal_error_action, 0); + sigaction (SIGIOINT, &fatal_error_action, 0); + sigaction (SIGGRANT, &fatal_error_action, 0); + sigaction (SIGRETRACT, &fatal_error_action, 0); + sigaction (SIGSOUND, &fatal_error_action, 0); + sigaction (SIGMSG, &fatal_error_action, 0); #endif /* AIX */ } diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index 1a62b59b7af..940482654b3 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include "emacsgtkfixed.h" -#include #include #include #include "lisp.h" diff --git a/src/floatfns.c b/src/floatfns.c index f59cf58228a..e956dc22353 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -45,7 +45,6 @@ along with GNU Emacs. If not, see . */ */ #include -#include #include #include "lisp.h" #include "syssignal.h" diff --git a/src/gtkutil.c b/src/gtkutil.c index 3bce5be9cd0..884574e1062 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #ifdef USE_GTK #include -#include #include #include @@ -1979,7 +1978,10 @@ xg_get_file_name (FRAME_PTR f, /* I really don't know why this is needed, but without this the GLIBC add on library linuxthreads hangs when the Gnome file chooser backend creates threads. */ - sigblock (sigmask (__SIGRTMIN)); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, __SIGRTMIN); + pthread_sigmask (SIG_BLOCK, &blocked, 0); #endif /* HAVE_PTHREAD */ #ifdef HAVE_GTK_FILE_SELECTION_NEW @@ -2001,7 +2003,7 @@ xg_get_file_name (FRAME_PTR f, filesel_done = xg_dialog_run (f, w); #if defined (HAVE_PTHREAD) && defined (__SIGRTMIN) - sigunblock (sigmask (__SIGRTMIN)); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #endif if (filesel_done == GTK_RESPONSE_OK) @@ -2057,7 +2059,10 @@ xg_get_font (FRAME_PTR f, const char *default_name) Lisp_Object font = Qnil; #if defined (HAVE_PTHREAD) && defined (__SIGRTMIN) - sigblock (sigmask (__SIGRTMIN)); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, __SIGRTMIN); + pthread_sigmask (SIG_BLOCK, &blocked, 0); #endif /* HAVE_PTHREAD */ w = gtk_font_chooser_dialog_new @@ -2086,7 +2091,7 @@ xg_get_font (FRAME_PTR f, const char *default_name) done = xg_dialog_run (f, w); #if defined (HAVE_PTHREAD) && defined (__SIGRTMIN) - sigunblock (sigmask (__SIGRTMIN)); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #endif if (done == GTK_RESPONSE_OK) diff --git a/src/keyboard.c b/src/keyboard.c index 128f9280911..d26cf35e108 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #define KEYBOARD_INLINE EXTERN_INLINE -#include #include #include #include "lisp.h" @@ -3680,7 +3679,7 @@ kbd_buffer_store_event_hold (register struct input_event *event, if (immediate_quit && NILP (Vinhibit_quit)) { immediate_quit = 0; - sigfree (); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); QUIT; } } @@ -3832,7 +3831,11 @@ kbd_buffer_get_event (KBOARD **kbp, unhold_keyboard_input (); #ifdef SIGIO if (!noninteractive) - signal (SIGIO, deliver_input_available_signal); + { + struct sigaction action; + emacs_sigaction_init (&action, deliver_input_available_signal); + sigaction (SIGIO, &action, 0); + } #endif /* SIGIO */ start_polling (); } @@ -6780,10 +6783,12 @@ gobble_input (int expected) #ifdef SIGIO if (interrupt_input) { - SIGMASKTYPE mask; - mask = sigblock (sigmask (SIGIO)); + sigset_t blocked, procmask; + sigemptyset (&blocked); + sigaddset (&blocked, SIGIO); + pthread_sigmask (SIG_BLOCK, &blocked, &procmask); read_avail_input (expected); - sigsetmask (mask); + pthread_sigmask (SIG_SETMASK, &procmask, 0); } else #ifdef POLL_FOR_INPUT @@ -6792,10 +6797,12 @@ gobble_input (int expected) it's always set. */ if (!interrupt_input && poll_suppress_count == 0) { - SIGMASKTYPE mask; - mask = sigblock (sigmask (SIGALRM)); + sigset_t blocked, procmask; + sigemptyset (&blocked); + sigaddset (&blocked, SIGALRM); + pthread_sigmask (SIG_BLOCK, &blocked, &procmask); read_avail_input (expected); - sigsetmask (mask); + pthread_sigmask (SIG_SETMASK, &procmask, 0); } else #endif @@ -6831,10 +6838,12 @@ record_asynch_buffer_change (void) #ifdef SIGIO if (interrupt_input) { - SIGMASKTYPE mask; - mask = sigblock (sigmask (SIGIO)); + sigset_t blocked, procmask; + sigemptyset (&blocked); + sigaddset (&blocked, SIGIO); + pthread_sigmask (SIG_BLOCK, &blocked, &procmask); kbd_buffer_store_event (&event); - sigsetmask (mask); + pthread_sigmask (SIG_SETMASK, &procmask, 0); } else #endif @@ -7295,6 +7304,7 @@ static struct user_signal_info *user_signals = NULL; void add_user_signal (int sig, const char *name) { + struct sigaction action; struct user_signal_info *p; for (p = user_signals; p; p = p->next) @@ -7309,7 +7319,8 @@ add_user_signal (int sig, const char *name) p->next = user_signals; user_signals = p; - signal (sig, deliver_user_signal); + emacs_sigaction_init (&action, deliver_user_signal); + sigaction (sig, &action, 0); } static void @@ -7381,7 +7392,7 @@ store_user_signal_events (void) for (p = user_signals; p; p = p->next) if (p->npending > 0) { - SIGMASKTYPE mask; + sigset_t blocked, procmask; if (nstored == 0) { @@ -7391,7 +7402,10 @@ store_user_signal_events (void) } nstored += p->npending; - mask = sigblock (sigmask (p->sig)); + sigemptyset (&blocked); + sigaddset (&blocked, p->sig); + pthread_sigmask (SIG_BLOCK, &blocked, &procmask); + do { buf.code = p->sig; @@ -7399,7 +7413,8 @@ store_user_signal_events (void) p->npending--; } while (p->npending > 0); - sigsetmask (mask); + + pthread_sigmask (SIG_SETMASK, &procmask, 0); } return nstored; @@ -10838,7 +10853,10 @@ handle_interrupt (void) /* If SIGINT isn't blocked, don't let us be interrupted by another SIGINT, it might be harmful due to non-reentrancy in I/O functions. */ - sigblock (sigmask (SIGINT)); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGINT); + pthread_sigmask (SIG_BLOCK, &blocked, 0); fflush (stdout); reset_all_sys_modes (); @@ -10909,7 +10927,7 @@ handle_interrupt (void) #endif /* not MSDOS */ fflush (stdout); init_all_sys_modes (); - sigfree (); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); } else { @@ -10922,7 +10940,7 @@ handle_interrupt (void) struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; immediate_quit = 0; - sigfree (); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); saved = gl_state; GCPRO4 (saved.object, saved.global_code, saved.current_syntax_table, saved.old_prop); @@ -10967,7 +10985,7 @@ quit_throw_to_read_char (int from_signal) if (!from_signal && EQ (Vquit_flag, Qkill_emacs)) Fkill_emacs (Qnil); - sigfree (); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); /* Prevent another signal from doing this before we finish. */ clear_waiting_for_input (); input_pending = 0; @@ -11402,17 +11420,23 @@ init_keyboard (void) SIGINT. There is special code in interrupt_signal to exit Emacs on SIGINT when there are no termcap frames on the controlling terminal. */ - signal (SIGINT, deliver_interrupt_signal); + struct sigaction action; + emacs_sigaction_init (&action, deliver_interrupt_signal); + sigaction (SIGINT, &action, 0); #ifndef DOS_NT /* For systems with SysV TERMIO, C-g is set up for both SIGINT and SIGQUIT and we can't tell which one it will give us. */ - signal (SIGQUIT, deliver_interrupt_signal); + sigaction (SIGQUIT, &action, 0); #endif /* not DOS_NT */ } /* Note SIGIO has been undef'd if FIONREAD is missing. */ #ifdef SIGIO if (!noninteractive) - signal (SIGIO, deliver_input_available_signal); + { + struct sigaction action; + emacs_sigaction_init (&action, deliver_input_available_signal); + sigaction (SIGIO, &action, 0); + } #endif /* SIGIO */ /* Use interrupt input by default, if it works and noninterrupt input @@ -11424,7 +11448,7 @@ init_keyboard (void) interrupt_input = 0; #endif - sigfree (); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); dribble = 0; if (keyboard_init_hook) diff --git a/src/nsfns.m b/src/nsfns.m index e8b5d22077a..f73086eeee9 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -30,7 +30,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) interpretation of even the system includes. */ #include -#include #include #include #include diff --git a/src/process.c b/src/process.c index 9ab8d2720b2..0cc9bc353a1 100644 --- a/src/process.c +++ b/src/process.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #define PROCESS_INLINE EXTERN_INLINE -#include #include #include #include @@ -1612,8 +1611,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) int wait_child_setup[2]; #endif - sigset_t procmask; - sigset_t blocked; + sigset_t blocked, procmask; struct sigaction sigint_action; struct sigaction sigquit_action; struct sigaction sigpipe_action; @@ -1765,12 +1763,6 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) int xforkin = forkin; int xforkout = forkout; -#if 0 /* This was probably a mistake--it duplicates code later on, - but fails to handle all the cases. */ - /* Make sure SIGCHLD is not blocked in the child. */ - sigsetmask (SIGEMPTYMASK); -#endif - /* Make the pty be the controlling terminal of the process. */ #ifdef HAVE_PTYS /* First, disconnect its current controlling terminal. */ @@ -5434,7 +5426,10 @@ static Lisp_Object process_sent_to; static _Noreturn void handle_pipe_signal (int sig) { - sigunblock (sigmask (SIGPIPE)); + sigset_t unblocked; + sigemptyset (&unblocked); + sigaddset (&unblocked, SIGPIPE); + pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); _longjmp (send_process_frame, 1); } @@ -5534,7 +5529,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, struct Lisp_Process *p = XPROCESS (proc); ssize_t rv; struct coding_system *coding; - void (*volatile old_sigpipe) (int); + struct sigaction old_sigpipe_action; if (p->raw_status_new) update_status (p); @@ -5673,7 +5668,9 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, /* Send this batch, using one or more write calls. */ ptrdiff_t written = 0; int outfd = p->outfd; - old_sigpipe = signal (SIGPIPE, deliver_pipe_signal); + struct sigaction action; + emacs_sigaction_init (&action, deliver_pipe_signal); + sigaction (SIGPIPE, &action, &old_sigpipe_action); #ifdef DATAGRAM_SOCKETS if (DATAGRAM_CHAN_P (outfd)) { @@ -5684,7 +5681,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, written = rv; else if (errno == EMSGSIZE) { - signal (SIGPIPE, old_sigpipe); + sigaction (SIGPIPE, &old_sigpipe_action, 0); report_file_error ("sending datagram", Fcons (proc, Qnil)); } @@ -5709,7 +5706,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, } #endif } - signal (SIGPIPE, old_sigpipe); + sigaction (SIGPIPE, &old_sigpipe_action, 0); if (rv < 0) { @@ -5769,7 +5766,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, } else { - signal (SIGPIPE, old_sigpipe); + sigaction (SIGPIPE, &old_sigpipe_action, 0); proc = process_sent_to; p = XPROCESS (proc); p->raw_status_new = 0; @@ -7389,7 +7386,11 @@ init_process_emacs (void) #ifndef CANNOT_DUMP if (! noninteractive || initialized) #endif - signal (SIGCHLD, deliver_child_signal); + { + struct sigaction action; + emacs_sigaction_init (&action, deliver_child_signal); + sigaction (SIGCHLD, &action, 0); + } #endif FD_ZERO (&input_wait_mask); diff --git a/src/sound.c b/src/sound.c index d20fa5ee8eb..5729d704b6a 100644 --- a/src/sound.c +++ b/src/sound.c @@ -48,7 +48,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "dispextern.h" #include "atimer.h" -#include #include "syssignal.h" /* END: Common Includes */ @@ -316,7 +315,12 @@ sound_perror (const char *msg) turn_on_atimers (1); #ifdef SIGIO - sigunblock (sigmask (SIGIO)); + { + sigset_t unblocked; + sigemptyset (&unblocked); + sigaddset (&unblocked, SIGIO); + pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); + } #endif if (saved_errno != 0) error ("%s: %s", msg, strerror (saved_errno)); @@ -728,6 +732,9 @@ static void vox_configure (struct sound_device *sd) { int val; +#ifdef SIGIO + sigset_t blocked; +#endif eassert (sd->fd >= 0); @@ -736,7 +743,9 @@ vox_configure (struct sound_device *sd) troubles. */ turn_on_atimers (0); #ifdef SIGIO - sigblock (sigmask (SIGIO)); + sigemptyset (&blocked); + sigaddset (&blocked, SIGIO); + pthread_sigmask (SIG_BLOCK, &blocked, 0); #endif val = sd->format; @@ -770,7 +779,7 @@ vox_configure (struct sound_device *sd) turn_on_atimers (1); #ifdef SIGIO - sigunblock (sigmask (SIGIO)); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #endif } @@ -786,7 +795,10 @@ vox_close (struct sound_device *sd) be interrupted by a signal. Block the ones we know to cause troubles. */ #ifdef SIGIO - sigblock (sigmask (SIGIO)); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGIO); + pthread_sigmask (SIG_BLOCK, &blocked, 0); #endif turn_on_atimers (0); @@ -795,7 +807,7 @@ vox_close (struct sound_device *sd) turn_on_atimers (1); #ifdef SIGIO - sigunblock (sigmask (SIGIO)); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #endif /* Close the device. */ diff --git a/src/sysdep.c b/src/sysdep.c index 42b8baf78e0..0f16d1a7645 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #define SYSTIME_INLINE EXTERN_INLINE #include -#include #include #include #ifdef HAVE_PWD_H @@ -303,27 +302,34 @@ wait_for_termination_1 (pid_t pid, int interruptible) termination of subprocesses, perhaps involving a kernel bug too, but no idea what it is. Just as a hunch we signal SIGCHLD to see if that causes the problem to go away or get worse. */ - sigsetmask (sigmask (SIGCHLD)); + sigset_t sigchild_mask; + sigemptyset (&sigchild_mask); + sigaddset (&sigchild_mask, SIGCHLD); + pthread_sigmask (SIG_SETMASK, &sigchild_mask, 0); + if (0 > kill (pid, 0)) { - sigsetmask (SIGEMPTYMASK); + pthread_sigmask (SIG_SETMASK, &empty_mask, 0); kill (getpid (), SIGCHLD); break; } if (wait_debugging) sleep (1); else - sigpause (SIGEMPTYMASK); + sigsuspend (&empty_mask); #else /* not BSD_SYSTEM, and not HPUX version >= 6 */ #ifdef WINDOWSNT wait (0); break; #else /* not WINDOWSNT */ - sigblock (sigmask (SIGCHLD)); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGCHLD); + pthread_sigmask (SIG_BLOCK, &blocked, 0); errno = 0; if (kill (pid, 0) == -1 && errno == ESRCH) { - sigunblock (sigmask (SIGCHLD)); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); break; } @@ -457,11 +463,11 @@ child_setup_tty (int out) #endif /* not MSDOS */ -/* Record a signal code and the handler for it. */ +/* Record a signal code and the action for it. */ struct save_signal { int code; - void (*handler) (int); + struct sigaction action; }; static void save_signal_handlers (struct save_signal *); @@ -619,8 +625,9 @@ save_signal_handlers (struct save_signal *saved_handlers) { while (saved_handlers->code) { - saved_handlers->handler - = (void (*) (int)) signal (saved_handlers->code, SIG_IGN); + struct sigaction action; + emacs_sigaction_init (&action, SIG_IGN); + sigaction (saved_handlers->code, &action, &saved_handlers->action); saved_handlers++; } } @@ -630,7 +637,7 @@ restore_signal_handlers (struct save_signal *saved_handlers) { while (saved_handlers->code) { - signal (saved_handlers->code, saved_handlers->handler); + sigaction (saved_handlers->code, &saved_handlers->action, 0); saved_handlers++; } } @@ -687,13 +694,17 @@ reset_sigio (int fd) void request_sigio (void) { + sigset_t unblocked; + if (noninteractive) return; + sigemptyset (&unblocked); #ifdef SIGWINCH - sigunblock (sigmask (SIGWINCH)); + sigaddset (&unblocked, SIGWINCH); #endif - sigunblock (sigmask (SIGIO)); + sigaddset (&unblocked, SIGIO); + pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); interrupts_deferred = 0; } @@ -701,6 +712,8 @@ request_sigio (void) void unrequest_sigio (void) { + sigset_t blocked; + if (noninteractive) return; @@ -709,10 +722,12 @@ unrequest_sigio (void) return; #endif + sigemptyset (&blocked); #ifdef SIGWINCH - sigblock (sigmask (SIGWINCH)); + sigaddset (&blocked, SIGWINCH); #endif - sigblock (sigmask (SIGIO)); + sigaddset (&blocked, SIGIO); + pthread_sigmask (SIG_BLOCK, &blocked, 0); interrupts_deferred = 1; } @@ -1471,20 +1486,16 @@ init_system_name (void) } } -/* POSIX signals support - DJB */ -/* Anyone with POSIX signals should have ANSI C declarations */ - sigset_t empty_mask; -#ifndef WINDOWSNT - -signal_handler_t -sys_signal (int signal_number, signal_handler_t action) +/* Store into *ACTION a signal action suitable for Emacs, with handler + HANDLER. */ +void +emacs_sigaction_init (struct sigaction *action, signal_handler_t handler) { - struct sigaction new_action, old_action; - sigemptyset (&new_action.sa_mask); - new_action.sa_handler = action; - new_action.sa_flags = 0; + sigemptyset (&action->sa_mask); + action->sa_handler = handler; + action->sa_flags = 0; #if defined (SA_RESTART) /* Emacs mostly works better with restartable system services. If this flag exists, we probably want to turn it on here. @@ -1501,54 +1512,8 @@ sys_signal (int signal_number, signal_handler_t action) # if defined (BROKEN_SA_RESTART) || defined (SYNC_INPUT) if (noninteractive) # endif - new_action.sa_flags = SA_RESTART; + action->sa_flags = SA_RESTART; #endif - sigaction (signal_number, &new_action, &old_action); - return (old_action.sa_handler); -} - -#endif /* WINDOWSNT */ - -#ifndef __GNUC__ -/* If we're compiling with GCC, we don't need this function, since it - can be written as a macro. */ -sigset_t -sys_sigmask (int sig) -{ - sigset_t mask; - sigemptyset (&mask); - sigaddset (&mask, sig); - return mask; -} -#endif - -/* I'd like to have these guys return pointers to the mask storage in here, - but there'd be trouble if the code was saving multiple masks. I'll be - safe and pass the structure. It normally won't be more than 2 bytes - anyhow. - DJB */ - -sigset_t -sys_sigblock (sigset_t new_mask) -{ - sigset_t old_mask; - pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask); - return (old_mask); -} - -sigset_t -sys_sigunblock (sigset_t new_mask) -{ - sigset_t old_mask; - pthread_sigmask (SIG_UNBLOCK, &new_mask, &old_mask); - return (old_mask); -} - -sigset_t -sys_sigsetmask (sigset_t new_mask) -{ - sigset_t old_mask; - pthread_sigmask (SIG_SETMASK, &new_mask, &old_mask); - return (old_mask); } #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD diff --git a/src/syssignal.h b/src/syssignal.h index 504aff43083..58290ee3fc7 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -17,6 +17,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ +#include + extern void init_signals (void); #ifdef HAVE_PTHREAD @@ -26,63 +28,16 @@ extern void init_signals (void); #define FORWARD_SIGNAL_TO_MAIN_THREAD #endif -/* Don't #include . That header should always be #included - before "config.h", because some configuration files (like s/hpux.h) - indicate that SIGIO doesn't work by #undef-ing SIGIO. If this file - #includes , then that will re-#define SIGIO and confuse - things. */ -/* XXX This is not correct anymore, there is a BROKEN_SIGIO macro. */ - -#define SIGMASKTYPE sigset_t - -#define SIGEMPTYMASK (empty_mask) extern sigset_t empty_mask; -/* POSIX pretty much destroys any possibility of writing sigmask as a - macro in standard C. We always define our own version because the - predefined macro in Glibc 2.1 is only provided for compatibility for old - programs that use int as signal mask type. */ -#undef sigmask -#ifdef __GNUC__ -#define sigmask(SIG) \ - ({ \ - sigset_t _mask; \ - sigemptyset (&_mask); \ - sigaddset (&_mask, SIG); \ - _mask; \ - }) -#else /* ! defined (__GNUC__) */ -extern sigset_t sys_sigmask (); -#define sigmask(SIG) (sys_sigmask (SIG)) -#endif /* ! defined (__GNUC__) */ - -#undef sigpause -#define sigpause(MASK) sigsuspend (&(MASK)) - -#define sigblock(SIG) sys_sigblock (SIG) -#define sigunblock(SIG) sys_sigunblock (SIG) -#ifndef sigsetmask -#define sigsetmask(SIG) sys_sigsetmask (SIG) -#endif -#undef signal -#define signal(SIG,ACT) sys_signal(SIG,ACT) - -/* Whether this is what all systems want or not, this is what - appears to be assumed in the source, for example data.c:arith_error. */ typedef void (*signal_handler_t) (int); -signal_handler_t sys_signal (int signal_number, signal_handler_t action); -sigset_t sys_sigblock (sigset_t new_mask); -sigset_t sys_sigunblock (sigset_t new_mask); -sigset_t sys_sigsetmask (sigset_t new_mask); +extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); + #if ! (defined TIOCNOTTY || defined USG5 || defined CYGWIN) _Noreturn void croak (char *); #endif -#define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) - -#define sigfree() sigsetmask (SIGEMPTYMASK) - #if defined (SIGIO) && defined (BROKEN_SIGIO) # undef SIGIO #endif @@ -97,12 +52,8 @@ _Noreturn void croak (char *); #undef SIGPTY #endif - -/* FIXME? Emacs only defines NSIG_MINIMUM on some platforms? */ #if NSIG < NSIG_MINIMUM -# ifdef NSIG -# undef NSIG -# endif +# undef NSIG # define NSIG NSIG_MINIMUM #endif diff --git a/src/term.c b/src/term.c index 8cc5dfd2a87..0eaf76a13df 100644 --- a/src/term.c +++ b/src/term.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #include "lisp.h" @@ -2932,7 +2931,10 @@ dissociate_if_controlling_tty (int fd) no_controlling_tty = 1; #else #ifdef TIOCNOTTY /* Try BSD ioctls. */ - sigblock (sigmask (SIGTTOU)); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGTTOU); + pthread_sigmask (SIG_BLOCK, &blocked, 0); fd = emacs_open (DEV_TTY, O_RDWR, 0); if (fd != -1 && ioctl (fd, TIOCNOTTY, 0) != -1) { @@ -2940,7 +2942,7 @@ dissociate_if_controlling_tty (int fd) } if (fd != -1) emacs_close (fd); - sigunblock (sigmask (SIGTTOU)); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #else /* Unknown system. */ croak (); @@ -3074,9 +3076,14 @@ init_tty (const char *name, const char *terminal_type, int must_succeed) /* On some systems, tgetent tries to access the controlling terminal. */ - sigblock (sigmask (SIGTTOU)); - status = tgetent (tty->termcap_term_buffer, terminal_type); - sigunblock (sigmask (SIGTTOU)); + { + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGTTOU); + pthread_sigmask (SIG_BLOCK, &blocked, 0); + status = tgetent (tty->termcap_term_buffer, terminal_type); + pthread_sigmask (SIG_UNBLOCK, &blocked, 0); + } if (status < 0) { diff --git a/src/widget.c b/src/widget.c index 9eaf6d1df6a..0100acc8143 100644 --- a/src/widget.c +++ b/src/widget.c @@ -50,9 +50,6 @@ along with GNU Emacs. If not, see . */ #include #include "../lwlib/lwlib.h" -#include -#include "syssignal.h" - #include "character.h" #include "font.h" diff --git a/src/xmenu.c b/src/xmenu.c index 6f92da1b814..605db13e149 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -32,11 +32,6 @@ along with GNU Emacs. If not, see . */ #include -#if 0 /* Why was this included? And without syssignal.h? */ -/* On 4.3 this loses if it comes after xterm.h. */ -#include -#endif - #include #include diff --git a/src/xterm.c b/src/xterm.c index 047b5569bf4..f0f6702cd67 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ /* Xt features made by Fred Pierresteguy. */ #include -#include #include #include @@ -29,9 +28,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "blockinput.h" - -/* Need syssignal.h for various externs and definitions that may be required - by some configurations for calls to signal later in this source file. */ #include "syssignal.h" /* This may include sys/types.h, and that somehow loses @@ -7766,7 +7762,9 @@ x_connection_signal (int signalnum) /* If we don't have an argument, */ #ifdef USG /* USG systems forget handlers when they are used; must reestablish each time */ - signal (signalnum, x_connection_signal); + struct sigaction action; + emacs_sigaction_init (&action, x_connection_signal); + sigaction (signalnum, &action, 0); #endif /* USG */ } @@ -7876,10 +7874,15 @@ For details, see etc/PROBLEMS.\n", } /* Ordinary stack unwind doesn't deal with these. */ + { + sigset_t unblocked; + sigemptyset (&unblocked); #ifdef SIGIO - sigunblock (sigmask (SIGIO)); + sigaddset (&unblocked, SIGIO); #endif - sigunblock (sigmask (SIGALRM)); + sigaddset (&unblocked, SIGALRM); + pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); + } TOTALLY_UNBLOCK_INPUT; unbind_to (idx, Qnil); @@ -10759,6 +10762,8 @@ x_create_terminal (struct x_display_info *dpyinfo) void x_initialize (void) { + struct sigaction action; + baud_rate = 19200; x_noop_count = 0; @@ -10805,7 +10810,8 @@ x_initialize (void) XSetErrorHandler (x_error_handler); XSetIOErrorHandler (x_io_error_quitter); - signal (SIGPIPE, x_connection_signal); + emacs_sigaction_init (&action, x_connection_signal); + sigaction (SIGPIPE, &action, 0); } From 1d43a35f49f7403f7f50f36dddf88167a7c81f11 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 12:07:00 +0800 Subject: [PATCH 057/216] Partially revert last Gnus merge. The add-face function has been added gnus-compat.el, but is not in Emacs; this leaves Gnus in an unusable state. * lisp/gnus/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus/gnus-group.el (gnus-group-highlight-line): Revert use of add-face. * lisp/gnus/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Restore. --- lisp/gnus/ChangeLog | 9 +++++++++ lisp/gnus/gnus-group.el | 4 +++- lisp/gnus/gnus-salt.el | 4 +++- lisp/gnus/gnus-sum.el | 5 +++-- lisp/gnus/gnus-util.el | 13 +++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 48d57da8f8d..d9f80103435 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2012-09-07 Chong Yidong + + * gnus-util.el + (gnus-put-text-property-excluding-characters-with-faces): Restore. + + * gnus-salt.el (gnus-tree-highlight-node): + * gnus-sum.el (gnus-summary-highlight-line): + * gnus-group.el (gnus-group-highlight-line): Revert use of add-face. + 2012-09-06 Lars Ingebrigtsen * gnus-util.el: Fix compilation error on XEmacs 21.4. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 24406fcc04e..8c7d0165976 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1669,7 +1669,9 @@ and ends at END." gnus-group-highlight)))) (unless (eq face (get-text-property beg 'face)) (let ((inhibit-read-only t)) - (add-face beg end (if (boundp face) (symbol-value face) face))) + (gnus-put-text-property-excluding-characters-with-faces + beg end 'face + (if (boundp face) (symbol-value face) face))) (gnus-extent-start-open beg)))) (defun gnus-group-get-icon (group) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 87a120279bc..760a7a0942e 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -660,7 +660,9 @@ Two predefined functions are available: (not (eval (caar list)))) (setq list (cdr list))))) (unless (eq (setq face (cdar list)) (get-text-property beg 'face)) - (add-face beg end (if (boundp face) (symbol-value face) face))))) + (gnus-put-text-property-excluding-characters-with-faces + beg end 'face + (if (boundp face) (symbol-value face) face))))) (defun gnus-tree-indent (level) (insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? ))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index bc0addd1559..b44b953bec6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12522,8 +12522,9 @@ If REVERSE, save parts that do not match TYPE." (not (memq article gnus-newsgroup-cached))))) (let ((face (funcall (gnus-summary-highlight-line-0)))) (unless (eq face (get-text-property beg 'face)) - (add-face beg (point-at-eol) - (setq face (if (boundp face) (symbol-value face) face))) + (gnus-put-text-property-excluding-characters-with-faces + beg (point-at-eol) 'face + (setq face (if (boundp face) (symbol-value face) face))) (when gnus-summary-highlight-line-function (funcall gnus-summary-highlight-line-function article face)))))) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 0c048e63bdf..4c5eabab723 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -866,6 +866,19 @@ If there's no subdirectory, delete DIRECTORY as well." (setq beg (point))) (gnus-overlay-put (gnus-make-overlay beg (point)) prop val))))) +(defun gnus-put-text-property-excluding-characters-with-faces (beg end + prop val) + "The same as `put-text-property', but don't put props on characters with the `gnus-face' property." + (let ((b beg)) + (while (/= b end) + (when (get-text-property b 'gnus-face) + (setq b (next-single-property-change b 'gnus-face nil end))) + (when (/= b end) + (inline + (gnus-put-text-property + b (setq b (next-single-property-change b 'gnus-face nil end)) + prop val)))))) + (defmacro gnus-faces-at (position) "Return a list of faces at POSITION." (if (featurep 'xemacs) From 0ba2d4b6465b0b66d34e6ef47c151bd5920fbe54 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Fri, 7 Sep 2012 08:15:56 +0400 Subject: [PATCH 058/216] * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from ruby-beginning-of-indent, simplify, allow all keywords to have indentation before them. (ruby-beginning-of-indent): Adjust for above. Search until the found point is not inside a string or comment. (ruby-font-lock-keywords): Allow symbols to start with "@" character, give them higher priority than variables. (ruby-syntax-propertize-function) (ruby-font-lock-syntactic-keywords): Remove the "not comments" matchers. Expression expansions are not comments when inside a string, and there comment syntax status is irrelevant. (ruby-match-expression-expansion): New function. Check that expression expansion is inside a string, and it's not escaped. (ruby-font-lock-keywords): Use it. * test/automated/ruby-mode-tests.el: New tests (Bug#11613). --- lisp/ChangeLog | 17 ++++++++++++++ lisp/progmodes/ruby-mode.el | 38 +++++++++++++++---------------- test/ChangeLog | 4 ++++ test/automated/ruby-mode-tests.el | 25 ++++++++++++++++++++ 4 files changed, 65 insertions(+), 19 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37064b6680b..2f7dac68467 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -51,6 +51,23 @@ Let-bind `isearch-word' to the argument `delimited-flag'. (Bug#10885, bug#10887) +2012-09-07 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from + ruby-beginning-of-indent, simplify, allow all keywords to have + indentation before them. + (ruby-beginning-of-indent): Adjust for above. Search until the + found point is not inside a string or comment. + (ruby-font-lock-keywords): Allow symbols to start with "@" + character, give them higher priority than variables. + (ruby-syntax-propertize-function) + (ruby-font-lock-syntactic-keywords): Remove the "not comments" + matchers. Expression expansions are not comments when inside a + string, and there comment syntax status is irrelevant. + (ruby-match-expression-expansion): New function. Check that + expression expansion is inside a string, and it's not escaped. + (ruby-font-lock-keywords): Use it. + 2012-09-05 Martin Rudalics * help.el (temp-buffer-max-height): New default value. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 3f93ffa84ba..bcebada5e86 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -64,8 +64,8 @@ "Regexp to match keywords that nest without blocks.") (defconst ruby-indent-beg-re - (concat "\\(\\s *" (regexp-opt '("class" "module" "def") t) "\\)\\|" - (regexp-opt '("if" "unless" "case" "while" "until" "for" "begin"))) + (concat "^\\s *" (regexp-opt '("class" "module" "def" "if" "unless" "case" + "while" "until" "for" "begin")) "\\_>") "Regexp to match where the indentation gets deeper.") (defconst ruby-modifier-beg-keywords @@ -848,19 +848,18 @@ move forward." With ARG, move forward multiple defuns. Negative ARG means move backward." (interactive "p") - (and (re-search-forward (concat "^\\(" ruby-block-end-re "\\)\\($\\|\\b[^_]\\)") - nil 'move (or arg 1)) + (and (re-search-forward ruby-indent-beg-re nil 'move (or arg 1)) (beginning-of-line)) (forward-line 1)) (defun ruby-beginning-of-indent () - "TODO: document" - ;; I don't understand this function. - ;; It seems like it should move to the line where indentation should deepen, - ;; but ruby-indent-beg-re only accounts for whitespace before class, module and def, - ;; so this will only match other block beginners at the beginning of the line. - (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\_>") nil 'move) - (beginning-of-line))) + "Backtrack to a line which can be used as a reference for +calculating indentation on the lines after it." + (while (and (re-search-backward ruby-indent-beg-re nil 'move) + (if (ruby-in-ppss-context-p 'anything) + t + ;; We can stop, then. + (beginning-of-line))))) (defun ruby-move-to-block (n) "Move to the beginning (N < 0) or the end (N > 0) of the current block @@ -1171,8 +1170,6 @@ It will be properly highlighted even when the call omits parens.")) (ruby-syntax-enclosing-percent-literal end) (funcall (syntax-propertize-rules - ;; #{ }, #$hoge, #@foo are not comments. - ("\\(#\\)[{$@]" (1 ".")) ;; $' $" $` .... are variables. ;; ?' ?" ?` are ascii codes. ("\\([?$]\\)[#\"'`]" @@ -1304,8 +1301,7 @@ This should only be called after matching against `ruby-here-doc-end-re'." (concat "-?\\([\"']\\|\\)" contents "\\1")))))) (defconst ruby-font-lock-syntactic-keywords - `( ;; #{ }, #$hoge, #@foo are not comments - ("\\(#\\)[{$@]" 1 (1 . nil)) + `( ;; the last $', $", $` in the respective string is not variable ;; the last ?', ?", ?` in the respective string is not ascii code ("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)" @@ -1527,6 +1523,9 @@ See `font-lock-syntax-table'.") ;; variables '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>" 2 font-lock-variable-name-face) + ;; symbols + '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" + 2 font-lock-reference-face) ;; variables '("\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W" 1 font-lock-variable-name-face) @@ -1535,12 +1534,9 @@ See `font-lock-syntax-table'.") ;; constants '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)" 2 font-lock-type-face) - ;; symbols - '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" - 2 font-lock-reference-face) '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-reference-face) ;; expression expansion - '("#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)" + '(ruby-match-expression-expansion 0 font-lock-variable-name-face t) ;; warn lower camel case ;'("\\<[a-z]+[a-z0-9]*[A-Z][A-Za-z0-9]*\\([!?]?\\|\\>\\)" @@ -1548,6 +1544,10 @@ See `font-lock-syntax-table'.") ) "Additional expressions to highlight in Ruby mode.") +(defun ruby-match-expression-expansion (limit) + (when (re-search-forward "[^\\]\\(\\\\\\\\\\)*\\(#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)\\)" limit 'move) + (ruby-in-ppss-context-p 'string))) + ;;;###autoload (define-derived-mode ruby-mode prog-mode "Ruby" "Major mode for editing Ruby scripts. diff --git a/test/ChangeLog b/test/ChangeLog index f523f6f59a9..541937ec4e7 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-09-07 Dmitry Gutov + + * automated/ruby-mode-tests.el: New tests (Bug#11613). + 2012-08-28 Chong Yidong * automated/files.el: Test every combination of values for diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index df51aa0d15a..1adc4acdfa0 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -57,6 +57,13 @@ VALUES-PLIST is a list with alternating index and value elements." (cadr values-plist))) (setq values-plist (cddr values-plist))))) +(defun ruby-assert-face (content pos face) + (with-temp-buffer + (insert content) + (ruby-mode) + (font-lock-fontify-buffer) + (should (eq face (get-text-property pos 'face))))) + (ert-deftest ruby-indent-after-symbol-made-from-string-interpolation () "It can indent the line after symbol made using string interpolation." (ruby-should-indent "def foo(suffix)\n :\"bar#{suffix}\"\n" @@ -84,6 +91,11 @@ VALUES-PLIST is a list with alternating index and value elements." (ruby-should-indent "foo = {\na: b" ruby-indent-level) (ruby-should-indent "foo(\na" ruby-indent-level))) +(ert-deftest ruby-indent-after-keyword-in-a-string () + (ruby-should-indent "a = \"abc\nif\"\n " 0) + (ruby-should-indent "a = %w[abc\n def]\n " 0) + (ruby-should-indent "a = \"abc\n def\"\n " 0)) + (ert-deftest ruby-indent-simple () (ruby-should-indent-buffer "if foo @@ -217,6 +229,19 @@ VALUES-PLIST is a list with alternating index and value elements." (should (string= "foo {|b|\n}\n" (buffer-substring-no-properties (point-min) (point-max)))))) +(ert-deftest ruby-recognize-symbols-starting-with-at-character () + (ruby-assert-face ":@abc" 3 'font-lock-constant-face)) + +(ert-deftest ruby-hash-character-not-interpolation () + (ruby-assert-face "\"This is #{interpolation}\"" 15 + 'font-lock-variable-name-face) + (ruby-assert-face "\"This is \\#{no interpolation} despite the #\"" + 15 'font-lock-string-face) + (ruby-assert-face "#@comment, not ruby code" 3 'font-lock-comment-face) + (ruby-assert-state "#@comment, not ruby code" 4 t) + (ruby-assert-face "# A comment cannot have #{an interpolation} in it" + 30 'font-lock-comment-face)) + (provide 'ruby-mode-tests) ;;; ruby-mode-tests.el ends here From d81ceaaf7e3d85dc31a67b4b40a557b56901cde8 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Fri, 7 Sep 2012 08:36:20 +0400 Subject: [PATCH 059/216] * lisp/progmodes/ruby-mode.el (ruby-end-of-defun) (ruby-beginning-of-defun): Simplify, allow indentation before block beginning and end keywords. Also, fix accidental change in the former. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ruby-mode.el | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f7dac68467..5f8a6135fdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-07 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-end-of-defun) + (ruby-beginning-of-defun): Simplify, allow indentation before + block beginning and end keywords. + 2012-09-06 Stefan Monnier * emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index bcebada5e86..e8e6b3dbaef 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -839,8 +839,8 @@ and `\\' when preceded by `?'." With ARG, move backward multiple defuns. Negative ARG means move forward." (interactive "p") - (and (re-search-backward (concat "^\\(" ruby-block-beg-re "\\)\\b") - nil 'move (or arg 1)) + (and (re-search-backward (concat "^\\s *\\(" ruby-block-beg-re "\\)\\_>") + nil t (or arg 1)) (beginning-of-line))) (defun ruby-end-of-defun (&optional arg) @@ -848,7 +848,7 @@ move forward." With ARG, move forward multiple defuns. Negative ARG means move backward." (interactive "p") - (and (re-search-forward ruby-indent-beg-re nil 'move (or arg 1)) + (and (re-search-forward (concat "^\\s *" ruby-block-end-re) nil t (or arg 1)) (beginning-of-line)) (forward-line 1)) From 52404181acc9d4c31eb0d1cf35db7d10e3a4afde Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 12:51:26 +0800 Subject: [PATCH 060/216] Add a couple of xrefs to the Lisp manual. * markers.texi (Moving Markers): Add xref to Point. * syntax.texi (Low-Level Parsing): Add xref to Parser State. Fixes: debbugs:12269 --- doc/lispref/ChangeLog | 7 +++++++ doc/lispref/markers.texi | 6 +++--- doc/lispref/syntax.texi | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 50f9853b7eb..bd21100dd4c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,10 @@ +2012-09-07 Chong Yidong + + * markers.texi (Moving Markers): Add xref to Point (Bug#7151). + + * syntax.texi (Low-Level Parsing): Add xref to Parser State + (Bug#12269). + 2012-09-04 Lars Ingebrigtsen * debugging.texi (Explicit Debug): Document `debug-on-message'. diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index 22e806defec..80136f2e6f4 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi @@ -355,9 +355,9 @@ the current buffer. If @var{position} is less than 1, @code{set-marker} moves @var{marker} to the beginning of the buffer. If @var{position} is greater than the -size of the buffer, @code{set-marker} moves marker to the end of the -buffer. If @var{position} is @code{nil} or a marker that points -nowhere, then @var{marker} is set to point nowhere. +size of the buffer (@pxref{Point}), @code{set-marker} moves marker to +the end of the buffer. If @var{position} is @code{nil} or a marker +that points nowhere, then @var{marker} is set to point nowhere. The value returned is @var{marker}. diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index ab685290901..91ae4359af7 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -878,6 +878,9 @@ This function parses a sexp in the current buffer starting at @var{start}, not scanning past @var{limit}. It stops at position @var{limit} or when certain criteria described below are met, and sets point to the location where parsing stops. It returns a parser state +@ifinfo +(@pxref{Parser State}) +@end ifinfo describing the status of the parse at the point where it stops. @cindex parenthesis depth From 74c582e64c6b14545fd4188a604e313cbe56a89f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 13:00:32 +0800 Subject: [PATCH 061/216] Fix for invoking C-h c from the minibuffer. * help.el (describe-key-briefly): Allow the message to be seen when invoked from the minibuffer. Fixes: debbugs:7014 --- lisp/ChangeLog | 5 +++++ lisp/help.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5f8a6135fdc..219fd382e50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-07 Chong Yidong + + * help.el (describe-key-briefly): Allow the message to be seen + when invoked from the minibuffer (Bug#7014). + 2012-09-07 Dmitry Gutov * progmodes/ruby-mode.el (ruby-end-of-defun) diff --git a/lisp/help.el b/lisp/help.el index cacbf185963..da11389d87c 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -585,6 +585,8 @@ temporarily enables it to allow getting help on disabled items and buttons." (setq saved-yank-menu (copy-sequence yank-menu)) (menu-bar-update-yank-menu "(any string)" nil)) (setq key (read-key-sequence "Describe key (or click or menu item): ")) + ;; Clear the echo area message (Bug#7014). + (message nil) ;; If KEY is a down-event, read and discard the ;; corresponding up-event. Note that there are also ;; down-events on scroll bars and mode lines: the actual From 8f06accefa669c323731525946eeaef4a3decf6d Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Fri, 7 Sep 2012 09:06:05 +0400 Subject: [PATCH 062/216] * lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun): Only consider 3 keywords defun beginners. (ruby-end-of-defun): Expect that the point is at the beginning of the defun. --- lisp/ChangeLog | 3 +++ lisp/progmodes/ruby-mode.el | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 219fd382e50..179d5be11ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,9 @@ * progmodes/ruby-mode.el (ruby-end-of-defun) (ruby-beginning-of-defun): Simplify, allow indentation before block beginning and end keywords. + (ruby-beginning-of-defun): Only consider 3 keywords defun beginners. + (ruby-end-of-defun): Expect that the point is at the beginning of + the defun. 2012-09-06 Stefan Monnier diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e8e6b3dbaef..ef1daa5e936 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -98,6 +98,10 @@ (defconst ruby-block-end-re "\\_") +(defconst ruby-defun-beg-re + '"\\(def\\|class\\|module\\)" + "Regexp to match the beginning of a defun, in the general sense.") + (eval-and-compile (defconst ruby-here-doc-beg-re "\\(<\\)<\\(-\\)?\\(\\([a-zA-Z0-9_]+\\)\\|[\"]\\([^\"]+\\)[\"]\\|[']\\([^']+\\)[']\\)" @@ -833,13 +837,12 @@ and `\\' when preceded by `?'." (+ indent ruby-indent-level) indent)))) -;; TODO: Why isn't one ruby-*-of-defun written in terms of the other? (defun ruby-beginning-of-defun (&optional arg) "Move backward to the beginning of the current top-level defun. With ARG, move backward multiple defuns. Negative ARG means move forward." (interactive "p") - (and (re-search-backward (concat "^\\s *\\(" ruby-block-beg-re "\\)\\_>") + (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>") nil t (or arg 1)) (beginning-of-line))) @@ -848,9 +851,9 @@ move forward." With ARG, move forward multiple defuns. Negative ARG means move backward." (interactive "p") - (and (re-search-forward (concat "^\\s *" ruby-block-end-re) nil t (or arg 1)) - (beginning-of-line)) - (forward-line 1)) + (ruby-forward-sexp) + (when (looking-back (concat "^\\s *" ruby-block-end-re)) + (forward-line 1))) (defun ruby-beginning-of-indent () "Backtrack to a line which can be used as a reference for @@ -1050,7 +1053,7 @@ See `add-log-current-defun-function'." (let (mname mlist (indent 0)) ;; get current method (or class/module) (if (re-search-backward - (concat "^[ \t]*\\(def\\|class\\|module\\)[ \t]+" + (concat "^[ \t]*" ruby-defun-beg-re "[ \t]+" "\\(" ;; \\. and :: for class method "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)" From 30730c93a08089674c0507aa80dc33691badd2df Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 6 Sep 2012 23:47:30 -0700 Subject: [PATCH 063/216] * syssignal.h (handle_on_main_thread): Always declare, even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined. This ports to platforms without HAVE_PTHREAD. --- src/ChangeLog | 6 ++++++ src/syssignal.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3bfa9e929d5..9c86090adbf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-07 Paul Eggert + + * syssignal.h (handle_on_main_thread): Always declare, + even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined. + This ports to platforms without HAVE_PTHREAD. + 2012-09-06 Paul Eggert Signal-handler cleanup (Bug#12327). diff --git a/src/syssignal.h b/src/syssignal.h index 58290ee3fc7..fe7b5f0e150 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -84,5 +84,6 @@ char *strsignal (int); #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD extern pthread_t main_thread; -void handle_on_main_thread (int, signal_handler_t); #endif + +void handle_on_main_thread (int, signal_handler_t); From b4fa72f2796476e089a57545e0d6dce912b504d3 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 7 Sep 2012 11:05:56 +0400 Subject: [PATCH 064/216] * alloc.c (mark_buffer): Revert unsafe marking optimization. (mark_object): Likewise for frame objects. --- src/ChangeLog | 5 +++++ src/alloc.c | 48 +++++++++++++++--------------------------------- 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9c86090adbf..5c9d350d7bb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-07 Dmitry Antipov + + * alloc.c (mark_buffer): Revert unsafe marking optimization. + (mark_object): Likewise for frame objects. + 2012-09-07 Paul Eggert * syssignal.h (handle_on_main_thread): Always declare, diff --git a/src/alloc.c b/src/alloc.c index bf7c156d321..aaf2f0846dc 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5842,29 +5842,23 @@ mark_overlay (struct Lisp_Overlay *ptr) static void mark_buffer (struct buffer *buffer) { - if (NILP (BVAR (buffer, name))) - /* If the buffer is killed, mark just the buffer itself. */ - VECTOR_MARK (buffer); - else - { - /* This is handled much like other pseudovectors... */ - mark_vectorlike ((struct Lisp_Vector *) buffer); + /* This is handled much like other pseudovectors... */ + mark_vectorlike ((struct Lisp_Vector *) buffer); - /* ...but there are some buffer-specific things. */ + /* ...but there are some buffer-specific things. */ - MARK_INTERVAL_TREE (buffer_intervals (buffer)); + MARK_INTERVAL_TREE (buffer_intervals (buffer)); - /* For now, we just don't mark the undo_list. It's done later in - a special way just before the sweep phase, and after stripping - some of its elements that are not needed any more. */ + /* For now, we just don't mark the undo_list. It's done later in + a special way just before the sweep phase, and after stripping + some of its elements that are not needed any more. */ - mark_overlay (buffer->overlays_before); - mark_overlay (buffer->overlays_after); + mark_overlay (buffer->overlays_before); + mark_overlay (buffer->overlays_after); - /* If this is an indirect buffer, mark its base buffer. */ - if (buffer->base_buffer && !VECTOR_MARKED_P (buffer->base_buffer)) - mark_buffer (buffer->base_buffer); - } + /* If this is an indirect buffer, mark its base buffer. */ + if (buffer->base_buffer && !VECTOR_MARKED_P (buffer->base_buffer)) + mark_buffer (buffer->base_buffer); } /* Determine type of generic Lisp_Object and mark it accordingly. */ @@ -6003,26 +5997,14 @@ mark_object (Lisp_Object arg) break; case PVEC_FRAME: - { - struct frame *f = (struct frame *) ptr; - - if (FRAME_LIVE_P (f)) - { - mark_vectorlike (ptr); - mark_face_cache (f->face_cache); - } - else - /* If the frame is deleted, mark just the frame itself. */ - VECTOR_MARK (ptr); - } + mark_vectorlike (ptr); + mark_face_cache (((struct frame *) ptr)->face_cache); break; case PVEC_WINDOW: { struct window *w = (struct window *) ptr; - - /* Even if the window is deleted, we can't mark just the window - itself because set-window-configuration can resurrect it. */ + mark_vectorlike (ptr); /* Mark glyphs for leaf windows. Marking window matrices is sufficient because frame matrices From bc8000ff702f2161253c1f5b54313e32619a2a44 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 7 Sep 2012 10:24:08 +0300 Subject: [PATCH 065/216] Fix compilation failure under ENABLE_CHECKING. src/alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT. Fixes: debbugs:12327 --- src/ChangeLog | 4 ++++ src/alloc.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 5c9d350d7bb..1ff58232538 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-07 Eli Zaretskii + + * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT. + 2012-09-07 Dmitry Antipov * alloc.c (mark_buffer): Revert unsafe marking optimization. diff --git a/src/alloc.c b/src/alloc.c index aaf2f0846dc..33dc68df48e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -26,6 +26,10 @@ along with GNU Emacs. If not, see . */ #include /* For CHAR_BIT. */ #include +#ifdef ENABLE_CHECKING +#include /* For SIGABRT. */ +#endif + #ifdef HAVE_PTHREAD #include #endif From 3e6d6928bdb9d823cdd54512990e6951f377713a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 7 Sep 2012 11:20:07 +0300 Subject: [PATCH 066/216] MS-Windows followup for 2012-09-07T01:27:44Z!eggert@cs.ucla.edu, signal-handler cleanup. src/w32proc.c (sigaction): New function, emulates Posix 'sigaction'. src/w32.c (sigemptyset): Empty the set. (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions. nt/inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl. Fixes: debbugs:12327 --- nt/ChangeLog | 4 ++++ nt/inc/ms-w32.h | 2 +- src/ChangeLog | 5 +++++ src/w32.c | 26 +------------------------- src/w32proc.c | 23 +++++++++++++++++++++++ 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 6367df7d043..7ec327f3029 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2012-09-07 Eli Zaretskii + + * inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl. + 2012-09-05 Juanma Barranquero * config.nt: Sync with autogen/config.in. diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index a18cf23374c..22255843f13 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -127,7 +127,7 @@ typedef int ssize_t; struct sigaction { int sa_flags; - void (*sa_handler)(int); + void (_CALLBACK_ *sa_handler)(int); sigset_t sa_mask; }; #define SIG_BLOCK 1 diff --git a/src/ChangeLog b/src/ChangeLog index 1ff58232538..068584969f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2012-09-07 Eli Zaretskii + * w32proc.c (sigaction): New function, emulates Posix 'sigaction'. + + * w32.c (sigemptyset): Empty the set. + (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions. + * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT. 2012-09-07 Dmitry Antipov diff --git a/src/w32.c b/src/w32.c index 4505afc18b3..04f7471577c 100644 --- a/src/w32.c +++ b/src/w32.c @@ -1530,34 +1530,10 @@ is_unc_volume (const char *filename) } /* Routines that are no-ops on NT but are defined to get Emacs to compile. */ - -int -sigsetmask (int signal_mask) -{ - return 0; -} - -int -sigmask (int sig) -{ - return 0; -} - -int -sigblock (int sig) -{ - return 0; -} - -int -sigunblock (int sig) -{ - return 0; -} - int sigemptyset (sigset_t *set) { + *set = 0; return 0; } diff --git a/src/w32proc.c b/src/w32proc.c index f83e81aedff..b9239cbb99a 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -103,6 +103,29 @@ sys_signal (int sig, signal_handler handler) return old; } +/* Emulate sigaction. */ +int +sigaction (int sig, const struct sigaction *act, struct sigaction *oact) +{ + signal_handler old; + + if (sig != SIGCHLD) + { + errno = EINVAL; + return -1; + } + old = sig_handlers[sig]; + if (act) + sig_handlers[sig] = act->sa_handler; + if (oact) + { + oact->sa_handler = old; + oact->sa_flags = 0; + oact->sa_mask = empty_mask; + } + return 0; +} + /* Defined in which conflicts with the local copy */ #define _P_NOWAIT 1 From c640e87d077ae51c922b703f4b44f05dfb0d1cfd Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 16:36:25 +0800 Subject: [PATCH 067/216] * lisp/simple.el (count-words--buffer-message): Fix narrowing check. --- lisp/ChangeLog | 2 ++ lisp/simple.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 179d5be11ca..33e641b5fc1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-09-07 Chong Yidong + * simple.el (count-words--buffer-message): Fix narrowing check. + * help.el (describe-key-briefly): Allow the message to be seen when invoked from the minibuffer (Bug#7014). diff --git a/lisp/simple.el b/lisp/simple.el index b7a24f4f970..ca73ba1b03a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1008,7 +1008,7 @@ END, without printing any message." (defun count-words--buffer-message () (count-words--message - (if (= (point-max) (1+ (buffer-size))) + (if (= (- (point-max) (point-min)) (buffer-size)) "Buffer" "Narrowed part of buffer") (point-min) (point-max))) From 1a4f1e9b4805cd80952946b5f4461eeb467d9509 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 7 Sep 2012 01:46:44 -0700 Subject: [PATCH 068/216] More signal-handler cleanup. * configure.ac (FLOAT_CHECK_DOMAIN): Comment fix (Bug#12327). * src/floatfns.c: Comment fix. * src/lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER. SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right, and anyway the declaration is harmless even if SIGDANGER is not defined. * src/syssignal.h (SIGIO): Also #undef if (! defined FIONREAD || defined BROKEN_FIONREAD). systty.h formerly did this, but other source files not surprisingly expected syssignal.h to define, or not define, SIGIO, and it's cleaner to do it that way, for consistency. Include , for FIONREAD. * src/systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job. This eliminates a problem whereby other files mysteriously had to include "syssignal.h" before including "systty.h" if they wanted to use "#ifdef SIGIO". --- ChangeLog | 5 +++++ configure.ac | 2 +- src/ChangeLog | 17 +++++++++++++++++ src/floatfns.c | 2 +- src/lisp.h | 2 -- src/syssignal.h | 5 ++++- src/systty.h | 5 ----- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 112532e7ece..e20edc893e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-07 Paul Eggert + + More signal-handler cleanup (Bug#12327). + * configure.ac (FLOAT_CHECK_DOMAIN): Comment fix (Bug#12327). + 2012-09-06 Paul Eggert Signal-handler cleanup (Bug#12327). diff --git a/configure.ac b/configure.ac index dd5e322194a..5fecea724dc 100644 --- a/configure.ac +++ b/configure.ac @@ -3212,7 +3212,7 @@ AC_DEFINE(CLASH_DETECTION, 1, [Define if you want lock files to be written, someone else has modified in his/her Emacs.]) AH_TEMPLATE(FLOAT_CHECK_DOMAIN, [Define if the float library doesn't - handle errors by either setting errno, or signaling SIGFPE/SIGILL.]) + handle errors by either setting errno, or signaling SIGFPE.]) AH_TEMPLATE(HAVE_INVERSE_HYPERBOLIC, [Define if you have the functions acosh, asinh, and atanh.]) diff --git a/src/ChangeLog b/src/ChangeLog index 068584969f7..8cab03fca50 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2012-09-07 Paul Eggert + + More signal-handler cleanup (Bug#12327). + * floatfns.c: Comment fix. + * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER. + SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right, + and anyway the declaration is harmless even if SIGDANGER is not defined. + * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD || + defined BROKEN_FIONREAD). systty.h formerly did this, but other + source files not surprisingly expected syssignal.h to define, or + not define, SIGIO, and it's cleaner to do it that way, for consistency. + Include , for FIONREAD. + * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job. + This eliminates a problem whereby other files mysteriously had + to include "syssignal.h" before including "systty.h" if they + wanted to use "#ifdef SIGIO". + 2012-09-07 Eli Zaretskii * w32proc.c (sigaction): New function, emulates Posix 'sigaction'. diff --git a/src/floatfns.c b/src/floatfns.c index e956dc22353..3a95d828c0c 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -38,7 +38,7 @@ along with GNU Emacs. If not, see . */ This has no effect if HAVE_MATHERR is defined. Define FLOAT_CHECK_DOMAIN if the float library doesn't handle errors by - either setting errno, or signaling SIGFPE/SIGILL. Otherwise, domain and + either setting errno, or signaling SIGFPE. Otherwise, domain and range checking will happen before calling the float routines. This has no effect if HAVE_MATHERR is defined (since matherr will be called when a domain error occurs.) diff --git a/src/lisp.h b/src/lisp.h index 28e8c1cd1e8..e6594b5890c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3221,9 +3221,7 @@ extern void cmd_error_internal (Lisp_Object, const char *); extern Lisp_Object command_loop_1 (void); extern Lisp_Object recursive_edit_1 (void); extern void record_auto_save (void); -#ifdef SIGDANGER extern void force_auto_save_soon (void); -#endif extern void init_keyboard (void); extern void syms_of_keyboard (void); extern void keys_of_keyboard (void); diff --git a/src/syssignal.h b/src/syssignal.h index fe7b5f0e150..c5529ae718a 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -38,9 +38,12 @@ extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); _Noreturn void croak (char *); #endif -#if defined (SIGIO) && defined (BROKEN_SIGIO) +/* Interrupt input is not used if there is no FIONREAD. */ +#include +#if defined BROKEN_SIGIO || ! defined FIONREAD || defined BROKEN_FIONREAD # undef SIGIO #endif + /* These are only used by AIX */ #if defined (SIGPOLL) && defined (BROKEN_SIGPOLL) #undef SIGPOLL diff --git a/src/systty.h b/src/systty.h index ae98f123f2a..b660441a91e 100644 --- a/src/systty.h +++ b/src/systty.h @@ -47,11 +47,6 @@ along with GNU Emacs. If not, see . */ #undef ASYNC #endif -/* Interrupt input is not used if there is no FIONREAD. */ -#ifndef FIONREAD -#undef SIGIO -#endif - /* Try to establish the correct character to disable terminal functions in a system-independent manner. Note that USG (at least) define From eddb36a7d58b99e43deadcc808347008fe8a8627 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 7 Sep 2012 01:55:03 -0700 Subject: [PATCH 069/216] * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls. Problem introduced when merging patches. Noted by Eli Zaretskii in . --- src/ChangeLog | 3 +++ src/emacs.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8cab03fca50..e4c94a2616b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,9 @@ 2012-09-07 Paul Eggert More signal-handler cleanup (Bug#12327). + * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls. + Problem introduced when merging patches. Noted by Eli Zaretskii in + . * floatfns.c: Comment fix. * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER. SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right, diff --git a/src/emacs.c b/src/emacs.c index ff50f409d5c..36e51869504 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1144,9 +1144,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem /* Don't catch these signals in batch mode if dumping. On some machines, this sets static data that would make signal fail to work right when the dumped Emacs is run. */ - signal (SIGQUIT, deliver_fatal_signal); - signal (SIGILL, deliver_fatal_signal); - signal (SIGTRAP, deliver_fatal_signal); + sigaction (SIGQUIT, &fatal_error_action, 0); + sigaction (SIGILL, &fatal_error_action, 0); + sigaction (SIGTRAP, &fatal_error_action, 0); #ifdef SIGUSR1 add_user_signal (SIGUSR1, "sigusr1"); #endif From e5c2edf79ba2b75a3572839fcb9de612f93ab630 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 16:58:31 +0800 Subject: [PATCH 070/216] Add a utility function buffer-narrowed-p, and use it. * lisp/subr.el (buffer-narrowed-p): New function. * lisp/ses.el (ses-widen): * lisp/simple.el (count-words--buffer-message): * lisp/net/browse-url.el (browse-url-of-buffer): Use it * lisp/simple.el (count-words-region): Don't signal an error if there is a non-nil prefix arg and the mark is not set. * doc/lispref/positions.texi (Narrowing): Document buffer-narrowed-p. --- doc/lispref/ChangeLog | 2 ++ doc/lispref/positions.texi | 27 ++++++++++++++++----------- etc/NEWS | 3 +++ lisp/ChangeLog | 9 ++++++++- lisp/emacs-lisp/cl-loaddefs.el | 2 +- lisp/net/browse-url.el | 2 +- lisp/ses.el | 4 +--- lisp/simple.el | 8 ++++---- lisp/subr.el | 4 ++++ 9 files changed, 40 insertions(+), 21 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index bd21100dd4c..179f81990a7 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2012-09-07 Chong Yidong + * positions.texi (Narrowing): Document buffer-narrowed-p. + * markers.texi (Moving Markers): Add xref to Point (Bug#7151). * syntax.texi (Low-Level Parsing): Add xref to Parser State diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index a0c65319850..c4576e6456d 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -874,18 +874,18 @@ commands to a limited range of characters in a buffer. The text that remains addressable is called the @dfn{accessible portion} of the buffer. - Narrowing is specified with two buffer positions which become the -beginning and end of the accessible portion. For most editing commands -and most Emacs primitives, these positions replace the values of the -beginning and end of the buffer. While narrowing is in effect, no text -outside the accessible portion is displayed, and point cannot move -outside the accessible portion. + Narrowing is specified with two buffer positions, which become the +beginning and end of the accessible portion. For most editing +commands and primitives, these positions replace the values of the +beginning and end of the buffer. While narrowing is in effect, no +text outside the accessible portion is displayed, and point cannot +move outside the accessible portion. Note that narrowing does not +alter actual buffer positions (@pxref{Point}); it only determines +which positions are considered the accessible portion of the buffer. +Most functions refuse to operate on text that is outside the +accessible portion. - Values such as positions or line numbers, which usually count from the -beginning of the buffer, do so despite narrowing, but the functions -which use them refuse to operate on text that is inaccessible. - - The commands for saving buffers are unaffected by narrowing; they save + Commands for saving buffers are unaffected by narrowing; they save the entire buffer regardless of any narrowing. If you need to display in a single buffer several very different @@ -924,6 +924,11 @@ It is equivalent to the following expression: @end example @end deffn +@defun buffer-narrowed-p +This function returns non-@code{nil} if the buffer is narrowed, and +@code{nil} otherwise. +@end defun + @defspec save-restriction body@dots{} This special form saves the current bounds of the accessible portion, evaluates the @var{body} forms, and finally restores the saved bounds, diff --git a/etc/NEWS b/etc/NEWS index bc1c49fe946..b85d64f83a3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -645,6 +645,9 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'. ** New error type and new function `user-error'. Doesn't trigger the debugger. ++++ +** New utility function `buffer-narrowed-p'. + ** Window changes *** The functions get-lru-window, get-mru-window and get-largest-window diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33e641b5fc1..7aae8fd7854 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,13 @@ 2012-09-07 Chong Yidong - * simple.el (count-words--buffer-message): Fix narrowing check. + * subr.el (buffer-narrowed-p): New function. + + * ses.el (ses-widen): + * simple.el (count-words--buffer-message): + * net/browse-url.el (browse-url-of-buffer): Use it + + * simple.el (count-words-region): Don't signal an error if there + is a non-nil prefix arg and the mark is not set. * help.el (describe-key-briefly): Allow the message to be seen when invoked from the minibuffer (Bug#7014). diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 7d70d22c9cd..a59beaeb7ac 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -260,7 +260,7 @@ Remove from SYMBOL's plist the property PROPNAME and its value. ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) -;;;;;; "cl-macs" "cl-macs.el" "e09b4be5072a8b52d40af6e073876e76") +;;;;;; "cl-macs" "cl-macs.el" "9f9bae5b8ccaf325bd59ba9be2b27c44") ;;; Generated autoloads from cl-macs.el (autoload 'cl--compiler-macro-list* "cl-macs" "\ diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 20d71215926..d1d33bfe566 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -743,7 +743,7 @@ narrowed." (and buffer (set-buffer buffer)) (let ((file-name ;; Ignore real name if restricted - (and (= (- (point-max) (point-min)) (buffer-size)) + (and (not (buffer-narrowed-p)) (or buffer-file-name (and (boundp 'dired-directory) dired-directory))))) (or file-name diff --git a/lisp/ses.el b/lisp/ses.el index 8add16a6996..7cdac74e310 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1270,11 +1270,9 @@ when the width of cell (ROW,COL) has changed." ;; The data area ;;---------------------------------------------------------------------------- -(defun ses-narrowed-p () (/= (- (point-max) (point-min)) (buffer-size))) - (defun ses-widen () "Turn off narrowing, to be reenabled at end of command loop." - (if (ses-narrowed-p) + (if (buffer-narrowed-p) (setq ses--deferred-narrow t)) (widen)) diff --git a/lisp/simple.el b/lisp/simple.el index ca73ba1b03a..d87ae3c5c15 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -974,7 +974,9 @@ rather than the region. If called from Lisp, return the number of words between positions START and END." - (interactive "r\nP") + (interactive (if current-prefix-arg + (list nil nil current-prefix-arg) + (list (region-beginning) (region-end) nil))) (cond ((not (called-interactively-p 'any)) (count-words start end)) (arg @@ -1008,9 +1010,7 @@ END, without printing any message." (defun count-words--buffer-message () (count-words--message - (if (= (- (point-max) (point-min)) (buffer-size)) - "Buffer" - "Narrowed part of buffer") + (if (buffer-narrowed-p) "Narrowed part of buffer" "Buffer") (point-min) (point-max))) (defun count-words--message (str start end) diff --git a/lisp/subr.el b/lisp/subr.el index 74afd59f8d5..621622e70eb 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2647,6 +2647,10 @@ directory if it does not exist." ;;;; Misc. useful functions. +(defsubst buffer-narrowed-p () + "Return non-nil if the current buffer is narrowed." + (/= (- (point-max) (point-min)) (buffer-size))) + (defun find-tag-default () "Determine default tag to search for, based on text at point. If there is no plausible default, return nil." From 843f263443272e8c323909879d4cc498873e33bb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 7 Sep 2012 06:17:37 -0400 Subject: [PATCH 071/216] Auto-commit of generated files. --- autogen/config.in | 5 +---- autogen/configure | 14 ++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index b6f1ad1ed60..5007eed94e8 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -158,7 +158,7 @@ along with GNU Emacs. If not, see . */ #undef FIRST_PTY_LETTER /* Define if the float library doesn't handle errors by either setting errno, - or signaling SIGFPE/SIGILL. */ + or signaling SIGFPE. */ #undef FLOAT_CHECK_DOMAIN /* Enable compile-time and run-time bounds-checking, and some warnings, @@ -1300,9 +1300,6 @@ along with GNU Emacs. If not, see . */ /* Make process_send_signal work by "typing" a signal character on the pty. */ #undef SIGNALS_VIA_CHARACTERS -/* Define if AH_BOTTOM should include signal.h. */ -#undef SIGNAL_H_AHB - /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX diff --git a/autogen/configure b/autogen/configure index 5fbbf1185cc..aa1235d8c27 100755 --- a/autogen/configure +++ b/autogen/configure @@ -15039,7 +15039,7 @@ case $opsys in cygwin ) $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h - $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)" >>confdefs.h + $as_echo "#define PTY_OPEN do { int dummy; sigset_t blocked, procmask; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, &procmask); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; pthread_sigmask (SIG_SETMASK, &procmask, 0); if (fd >= 0) emacs_close (dummy); } while (0)" >>confdefs.h $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h @@ -15072,7 +15072,7 @@ $as_echo "#define UNIX98_PTYS 1" >>confdefs.h $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); }" >>confdefs.h + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h if test "x$ac_cv_func_posix_openpt" = xyes; then $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h @@ -15117,12 +15117,12 @@ $as_echo "#define UNIX98_PTYS 1" >>confdefs.h ;; sol2* ) - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h ;; unixware ) - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h ;; esac @@ -15528,12 +15528,6 @@ case $opsys in $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h ;; - - netbsd | openbsd ) - -$as_echo "#define SIGNAL_H_AHB 1" >>confdefs.h - - ;; esac From 145823ecb2d55a7ea33d4a8482b5941f189d9418 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 18:19:58 +0800 Subject: [PATCH 072/216] Let ESC ESC quit in read-char-choice, and use it in userlock.el. * lisp/subr.el (read-char-choice): Allow quitting via ESC ESC. * lisp/userlock.el (ask-user-about-supersession-threat): Use read-char-choice. Fixes: debbugs:12093 --- lisp/ChangeLog | 7 +++++++ lisp/subr.el | 11 ++++++++--- lisp/userlock.el | 48 +++++++++++++++++++----------------------------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7aae8fd7854..d7004237adf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-09-07 Chong Yidong + + * subr.el (read-char-choice): Allow quitting via ESC ESC. + + * userlock.el (ask-user-about-supersession-threat): Use + read-char-choice (Bug#12093). + 2012-09-07 Chong Yidong * subr.el (buffer-narrowed-p): New function. diff --git a/lisp/subr.el b/lisp/subr.el index 621622e70eb..a3e0897e9fe 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2237,7 +2237,8 @@ keyboard-quit events while waiting for a valid input." (error "Called `read-char-choice' without valid char choices")) (let (char done show-help (helpbuf " *Char Help*")) (let ((cursor-in-echo-area t) - (executing-kbd-macro executing-kbd-macro)) + (executing-kbd-macro executing-kbd-macro) + (esc-flag nil)) (save-window-excursion ; in case we call help-form-show (while (not done) (unless (get-text-property 0 'face prompt) @@ -2261,8 +2262,12 @@ keyboard-quit events while waiting for a valid input." ;; there are no more events in the macro. Attempt to ;; get an event interactively. (setq executing-kbd-macro nil)) - ((and (not inhibit-keyboard-quit) (eq char ?\C-g)) - (keyboard-quit)))))) + ((not inhibit-keyboard-quit) + (cond + ((and (null esc-flag) (eq char ?\e)) + (setq esc-flag t)) + ((memq char '(?\C-g ?\e)) + (keyboard-quit)))))))) ;; Display the question with the answer. But without cursor-in-echo-area. (message "%s%s" prompt (char-to-string char)) char)) diff --git a/lisp/userlock.el b/lisp/userlock.el index 705d9588249..4c003e423aa 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -108,37 +108,27 @@ You can rewrite this to use any criterion you like to choose which one to do. The buffer in question is current when this function is called." (discard-input) (save-window-excursion - (let (answer) + (let ((prompt + (format "%s changed on disk; \ +really edit the buffer? (y, n, r or C-h) " + (file-name-nondirectory fn))) + (choices '(?y ?n ?r ?? ?\C-h)) + answer) (while (null answer) - (message "%s changed on disk; really edit the buffer? (y, n, r or C-h) " - (file-name-nondirectory fn)) - (let ((tem (downcase (let ((cursor-in-echo-area t)) - (read-char-exclusive))))) - (setq answer - (if (= tem help-char) - 'help - (cdr (assoc tem '((?n . yield) - (?\C-g . yield) - (?y . proceed) - (?r . revert) - (?? . help)))))) - (cond ((null answer) - (beep) - (message "Please type y, n or r; or ? for help") - (sit-for 3)) - ((eq answer 'help) - (ask-user-about-supersession-help) - (setq answer nil)) - ((eq answer 'revert) - (revert-buffer nil (not (buffer-modified-p))) - ; ask confirmation if buffer modified - (signal 'file-supersession - (list "File reverted" fn))) - ((eq answer 'yield) - (signal 'file-supersession - (list "File changed on disk" fn)))))) + (setq answer (read-char-choice prompt choices)) + (cond ((memq answer '(?? ?\C-h)) + (ask-user-about-supersession-help) + (setq answer nil)) + ((eq answer ?r) + ;; Ask for confirmation if buffer modified + (revert-buffer nil (not (buffer-modified-p))) + (signal 'file-supersession + (list "File reverted" fn))) + ((eq answer ?n) + (signal 'file-supersession + (list "File changed on disk" fn))))) (message - "File on disk now will become a backup file if you save these changes.") + "File on disk now will become a backup file if you save these changes.") (setq buffer-backed-up nil)))) (defun ask-user-about-supersession-help () From 14ba4cf3b27a32bb1a583510121ac0be44bbff3c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 18:27:11 +0800 Subject: [PATCH 073/216] Remove obsolete display-buffer-reuse-frames from manuals. * doc/emacs/windows.texi (Window Choice): Don't mention obsolete display-buffer-reuse-frames. * doc/lispref/windows.texi (Display Action Functions) (Choosing Window Options): Remove obsolete variable display-buffer-reuse-frames. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/windows.texi | 2 -- doc/lispref/ChangeLog | 4 ++++ doc/lispref/windows.texi | 11 +---------- etc/NEWS | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 78f1d2c8e3b..49c472ca793 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2012-09-07 Chong Yidong + + * windows.texi (Window Choice): Don't mention obsolete + display-buffer-reuse-frames. + 2012-09-04 Paul Eggert Give more-useful info on a fatal error (Bug#12328). diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 2496a505063..04d1353006f 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -378,12 +378,10 @@ adding the desired buffer's name to the list expression to the list @code{same-window-regexps}. By default, these variables are @code{nil}, so this step is skipped. -@vindex display-buffer-reuse-frames @item Otherwise, if the buffer is already displayed in an existing window, ``reuse'' that window. Normally, only windows on the selected frame are considered, but windows on other frames are also reusable if you -change @code{display-buffer-reuse-frames} to @code{t}, or if you change @code{pop-up-frames} (see below) to @code{t}. @item diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 179f81990a7..1e78d20493a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,9 @@ 2012-09-07 Chong Yidong + * windows.texi (Display Action Functions) + (Choosing Window Options): Remove obsolete variable + display-buffer-reuse-frames. + * positions.texi (Narrowing): Document buffer-narrowed-p. * markers.texi (Moving Markers): Add xref to Point (Bug#7151). diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 5fe007ba02d..52bdc9a5fa1 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1728,8 +1728,7 @@ A frame means consider windows on that frame only. @end itemize If @var{alist} contains no @code{reusable-frames} entry, this function -normally searches just the selected frame; however, if either the -variable @code{display-buffer-reuse-frames} or the variable +normally searches just the selected frame; however, if the variable @code{pop-up-frames} is non-@code{nil}, it searches all frames on the current terminal. @xref{Choosing Window Options}. @@ -1769,14 +1768,6 @@ The behavior of the standard display actions of @code{display-buffer} (@pxref{Choosing Window}) can be modified by a variety of user options. -@defopt display-buffer-reuse-frames -If the value of this variable is non-@code{nil}, @code{display-buffer} -may search all frames on the current terminal when looking for a -window already displaying the specified buffer. The default is -@code{nil}. This variable is consulted by the action function -@code{display-buffer-reuse-window} (@pxref{Display Action Functions}). -@end defopt - @defopt pop-up-windows If the value of this variable is non-@code{nil}, @code{display-buffer} is allowed to split an existing window to make a new window for diff --git a/etc/NEWS b/etc/NEWS index b85d64f83a3..55b8388ca27 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -671,7 +671,7 @@ specifies frame parameters to give any newly-created frame. *** The following variables are obsolete, as they can be replaced by appropriate entries in the `display-buffer-alist' function introduced in Emacs 24.1: - ++++ **** `display-buffer-reuse-frames' **** `special-display-regexps' **** `special-display-frame-alist' From 0a6bdaa1572f198b2034830197545087e8499b13 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 18:36:39 +0800 Subject: [PATCH 074/216] * doc/lispref/eval.texi (Intro Eval): Add index entry for sexp. Fixes: debbugs:12233 --- doc/lispref/ChangeLog | 2 ++ doc/lispref/eval.texi | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 1e78d20493a..37e96dde077 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2012-09-07 Chong Yidong + * eval.texi (Intro Eval): Add index entry for sexp (Bug#12233). + * windows.texi (Display Action Functions) (Choosing Window Options): Remove obsolete variable display-buffer-reuse-frames. diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index 6dc6287b803..b373ecfbe62 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -40,6 +40,7 @@ interpreter. @cindex form @cindex expression @cindex S-expression +@cindex sexp A Lisp object that is intended for evaluation is called a @dfn{form} or @dfn{expression}@footnote{It is sometimes also referred to as an @dfn{S-expression} or @dfn{sexp}, but we generally do not use this From 0d7eb2ea07501271ad5aed5ba3e3492e1c145e03 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 18:53:29 +0800 Subject: [PATCH 075/216] Fix handling of require-final-newline in after-find-file. * files.el (after-find-file): Don't fail on a read-only buffer if require-final-newline is `visit' or `visit-save'. Fixes: debbugs:11156 --- lisp/ChangeLog | 3 +++ lisp/files.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7004237adf..db3a3f5d044 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-09-07 Chong Yidong + * files.el (after-find-file): Don't fail on a read-only buffer if + require-final-newline is `visit' or `visit-save' (Bug#11156). + * subr.el (read-char-choice): Allow quitting via ESC ESC. * userlock.el (ask-user-about-supersession-threat): Use diff --git a/lisp/files.el b/lisp/files.el index 6528632c841..fb4549f0399 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2145,7 +2145,7 @@ unless NOMODES is non-nil." (not buffer-read-only) (save-excursion (goto-char (point-max)) - (insert "\n"))) + (ignore-errors (insert "\n")))) (when (and buffer-read-only view-read-only (not (eq (get major-mode 'mode-class) 'special))) From 4d64875a837a2d338bf776872f5f76522b707099 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 7 Sep 2012 14:15:08 +0200 Subject: [PATCH 076/216] nt/config.nt: Sync with autogen/config.in. (NO_ABORT, SIGNAL_H_AHB): Remove. --- nt/ChangeLog | 5 +++++ nt/config.nt | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 7ec327f3029..d861b386b1c 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2012-09-07 Juanma Barranquero + + * config.nt: Sync with autogen/config.in. + (NO_ABORT, SIGNAL_H_AHB): Remove. + 2012-09-07 Eli Zaretskii * inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl. diff --git a/nt/config.nt b/nt/config.nt index e97d10d9cec..5dc171bae44 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -162,7 +162,7 @@ along with GNU Emacs. If not, see . */ #define FIRST_PTY_LETTER 'a' /* Define if the float library doesn't handle errors by either setting errno, - or signaling SIGFPE/SIGILL. */ + or signaling SIGFPE. */ #undef FLOAT_CHECK_DOMAIN /* Enable compile-time and run-time bounds-checking, and some warnings, @@ -1189,9 +1189,6 @@ along with GNU Emacs. If not, see . */ `NO'. */ #undef NARROWPROTO -/* Do not define abort in emacs.c. */ -#undef NO_ABORT - /* Define if XEditRes should not be used. */ #undef NO_EDITRES @@ -1313,9 +1310,6 @@ along with GNU Emacs. If not, see . */ /* Make process_send_signal work by "typing" a signal character on the pty. */ #undef SIGNALS_VIA_CHARACTERS -/* Define if AH_BOTTOM should include signal.h. */ -#undef SIGNAL_H_AHB - /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX From cee2e90d475f6d9dbdb7e92a127b65faa342665c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 21:53:21 +0800 Subject: [PATCH 077/216] Minor doc fix for switch-to-buffer. * doc/lispref/windows.texi (Display Action Functions) (Choosing Window Options): Remove obsolete variable display-buffer-reuse-frames. (Switching Buffers): Minor doc tweak for switch-to-buffer. * lisp/window.el (switch-to-buffer): Doc fix. Fixes: debbugs:12181 --- doc/lispref/ChangeLog | 1 + doc/lispref/windows.texi | 25 ++++++++++++------------- lisp/ChangeLog | 2 ++ lisp/window.el | 30 ++++++++++++++++-------------- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 37e96dde077..9a747838c26 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -5,6 +5,7 @@ * windows.texi (Display Action Functions) (Choosing Window Options): Remove obsolete variable display-buffer-reuse-frames. + (Switching Buffers): Minor doc tweak for switch-to-buffer. * positions.texi (Narrowing): Document buffer-narrowed-p. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 52bdc9a5fa1..ea48a46359c 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1492,12 +1492,10 @@ to make a buffer current to modify it in Lisp, use @code{set-buffer}. @xref{Current Buffer}. @deffn Command switch-to-buffer buffer-or-name &optional norecord force-same-window -This function displays @var{buffer-or-name} in the selected window, -and makes it the current buffer. (In contrast, @code{set-buffer} -makes the buffer current but does not display it; @pxref{Current -Buffer}). It is often used interactively (as the binding of @kbd{C-x -b}), as well as in Lisp programs. The return value is the buffer -switched to. +This command attempts to display @var{buffer-or-name} in the selected +window, and makes it the current buffer. It is often used +interactively (as the binding of @kbd{C-x b}), as well as in Lisp +programs. The return value is the buffer switched to. If @var{buffer-or-name} is @code{nil}, it defaults to the buffer returned by @code{other-buffer} (@pxref{The Buffer List}). If @@ -1506,17 +1504,18 @@ buffer, this function creates a new buffer with that name; the new buffer's major mode is determined by the variable @code{major-mode} (@pxref{Major Modes}). -Normally the specified buffer is put at the front of the buffer +Normally, the specified buffer is put at the front of the buffer list---both the global buffer list and the selected frame's buffer list (@pxref{The Buffer List}). However, this is not done if the optional argument @var{norecord} is non-@code{nil}. -If this function is unable to display the buffer in the selected -window---usually because the selected window is a minibuffer window or -is strongly dedicated to its buffer (@pxref{Dedicated Windows})---then -it normally tries to display the buffer in some other window, in the -manner of @code{pop-to-buffer} (see below). However, if the optional -argument @var{force-same-window} is non-@code{nil}, it signals an error +Sometimes, @code{switch-to-buffer} may be unable to display the buffer +in the selected window. This happens if the selected window is a +minibuffer window, or if the selected window is strongly dedicated to +its buffer (@pxref{Dedicated Windows}). In that case, the command +normally tries to display the buffer in some other window, by invoking +@code{pop-to-buffer} (see below). However, if the optional argument +@var{force-same-window} is non-@code{nil}, it signals an error instead. @end deffn diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db3a3f5d044..95a6c1e7174 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-09-07 Chong Yidong + * window.el (switch-to-buffer): Doc fix (Bug#12181). + * files.el (after-find-file): Don't fail on a read-only buffer if require-final-newline is `visit' or `visit-save' (Bug#11156). diff --git a/lisp/window.el b/lisp/window.el index 66b86f45e77..0e03268029c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5642,26 +5642,28 @@ buffer with the name BUFFER-OR-NAME and return that buffer." (defun switch-to-buffer (buffer-or-name &optional norecord force-same-window) "Switch to buffer BUFFER-OR-NAME in the selected window. -If called interactively, prompt for the buffer name using the +If the selected window cannot display the specified +buffer (e.g. if it is a minibuffer window or strongly dedicated +to another buffer), call `pop-to-buffer' to select the buffer in +another window. + +If called interactively, read the buffer name using the minibuffer. The variable `confirm-nonexistent-file-or-buffer' determines whether to request confirmation before creating a new buffer. -BUFFER-OR-NAME may be a buffer, a string (a buffer name), or -nil. If BUFFER-OR-NAME is a string that does not identify an -existing buffer, create a buffer with that name. If -BUFFER-OR-NAME is nil, switch to the buffer returned by -`other-buffer'. +BUFFER-OR-NAME may be a buffer, a string (a buffer name), or nil. +If BUFFER-OR-NAME is a string that does not identify an existing +buffer, create a buffer with that name. If BUFFER-OR-NAME is +nil, switch to the buffer returned by `other-buffer'. -Optional argument NORECORD non-nil means do not put the buffer -specified by BUFFER-OR-NAME at the front of the buffer list and -do not make the window displaying it the most recently selected -one. +If optional argument NORECORD is non-nil, do not put the buffer +at the front of the buffer list, and do not make the window +displaying it the most recently selected one. -If FORCE-SAME-WINDOW is non-nil, BUFFER-OR-NAME must be displayed -in the selected window; signal an error if that is -impossible (e.g. if the selected window is minibuffer-only). If -nil, BUFFER-OR-NAME may be displayed in another window. +If optional argument FORCE-SAME-WINDOW is non-nil, the buffer +must be displayed in the selected window; if that is impossible, +signal an error rather than calling `pop-to-buffer'. Return the buffer switched to." (interactive From 1a5432bc0480ab64dd7ac5d57d1025bdc3f0402b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 22:15:59 +0800 Subject: [PATCH 078/216] Fix doc of local-variable-if-set-p. * doc/lispref/variables.texi (Creating Buffer-Local): Fix description of local-variable-if-set-p. * src/data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713). --- doc/lispref/ChangeLog | 3 +++ doc/lispref/variables.texi | 7 ++++--- src/ChangeLog | 4 ++++ src/data.c | 12 ++++++------ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 9a747838c26..4bd7210d7d6 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,8 @@ 2012-09-07 Chong Yidong + * variables.texi (Creating Buffer-Local): Fix description of + local-variable-if-set-p (Bug#10713). + * eval.texi (Intro Eval): Add index entry for sexp (Bug#12233). * windows.texi (Display Action Functions) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 3b078e7e19f..c5b66757ace 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1302,9 +1302,10 @@ This returns @code{t} if @var{variable} is buffer-local in buffer @end defun @defun local-variable-if-set-p variable &optional buffer -This returns @code{t} if @var{variable} will become buffer-local in -buffer @var{buffer} (which defaults to the current buffer) if it is -set there. +This returns @code{t} if @var{variable} either has a buffer-local +value in buffer @var{buffer}, or is automatically buffer-local. +Otherwise, it returns @code{nil}. If omitted or @code{nil}, +@var{buffer} defaults to the current buffer. @end defun @defun buffer-local-value variable buffer diff --git a/src/ChangeLog b/src/ChangeLog index e4c94a2616b..829586dc59e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-07 Chong Yidong + + * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713). + 2012-09-07 Paul Eggert More signal-handler cleanup (Bug#12327). diff --git a/src/data.c b/src/data.c index 5fbf43e424e..de107fc04a5 100644 --- a/src/data.c +++ b/src/data.c @@ -1882,12 +1882,12 @@ BUFFER defaults to the current buffer. */) DEFUN ("local-variable-if-set-p", Flocal_variable_if_set_p, Slocal_variable_if_set_p, 1, 2, 0, - doc: /* Non-nil if VARIABLE will be local in buffer BUFFER when set there. -More precisely, this means that setting the variable \(with `set' or`setq'), -while it does not have a `let'-style binding that was made in BUFFER, -will produce a buffer local binding. See Info node -`(elisp)Creating Buffer-Local'. -BUFFER defaults to the current buffer. */) + doc: /* Non-nil if VARIABLE is local in buffer BUFFER when set there. +BUFFER defaults to the current buffer. + +More precisely, return non-nil if either VARIABLE already has a local +value in BUFFER, or if VARIABLE is automatically buffer-local (see +`make-variable-buffer-local'). */) (register Lisp_Object variable, Lisp_Object buffer) { struct Lisp_Symbol *sym; From b4f5313e931a577f5db487ff9bd9c03d3a3c37a7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 7 Sep 2012 22:45:28 +0800 Subject: [PATCH 079/216] * src/textprop.c (Fget_text_property): Minor doc fix. Fixes: debbugs:12323 --- src/ChangeLog | 2 ++ src/textprop.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 829586dc59e..bdbc97fdb1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2012-09-07 Chong Yidong + * textprop.c (Fget_text_property): Minor doc fix (Bug#12323). + * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713). 2012-09-07 Paul Eggert diff --git a/src/textprop.c b/src/textprop.c index b6895fc426a..2a9efba1c45 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -556,7 +556,8 @@ If POSITION is at the end of OBJECT, the value is nil. */) DEFUN ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0, doc: /* Return the value of POSITION's property PROP, in OBJECT. -OBJECT is optional and defaults to the current buffer. +OBJECT should be a buffer or a string; if omitted or nil, it defaults +to the current buffer. If POSITION is at the end of OBJECT, the value is nil. */) (Lisp_Object position, Lisp_Object prop, Lisp_Object object) { From 9dd40b000598aff88c6249ecf2b5a866935e9321 Mon Sep 17 00:00:00 2001 From: Matt McClure Date: Fri, 7 Sep 2012 16:53:15 +0200 Subject: [PATCH 080/216] * progmodes/python.el (python-shell-send-string): When default-directory is remote, create temp file on remote filesystem. (python-shell-send-file): When file is remote, pass local view of file paths to remote Python interpreter. (Bug#12340) --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/python.el | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95a6c1e7174..efdc0b80d13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-09-07 Matt McClure (tiny change) + + * progmodes/python.el (python-shell-send-string): When + default-directory is remote, create temp file on remote + filesystem. + (python-shell-send-file): When file is remote, pass local view of + file paths to remote Python interpreter. (Bug#12340) + 2012-09-07 Chong Yidong * window.el (switch-to-buffer): Doc fix (Bug#12181). diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 601850ed0fb..ffc6c1ac885 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1824,7 +1824,11 @@ When MSG is non-nil messages the first line of STRING." (lines (split-string string "\n" t))) (and msg (message "Sent: %s..." (nth 0 lines))) (if (> (length lines) 1) - (let* ((temp-file-name (make-temp-file "py")) + (let* ((temporary-file-directory + (if (file-remote-p default-directory) + (concat (file-remote-p default-directory) "/tmp") + temporary-file-directory)) + (temp-file-name (make-temp-file "py")) (file-name (or (buffer-file-name) temp-file-name))) (with-temp-file temp-file-name (insert string) @@ -1931,8 +1935,14 @@ FILE-NAME." (interactive "fFile to send: ") (let* ((process (or process (python-shell-get-or-create-process))) (temp-file-name (when temp-file-name - (expand-file-name temp-file-name))) - (file-name (or (expand-file-name file-name) temp-file-name))) + (expand-file-name + (or (file-remote-p temp-file-name 'localname) + temp-file-name)))) + (file-name (or (when file-name + (expand-file-name + (or (file-remote-p file-name 'localname) + file-name))) + temp-file-name))) (when (not file-name) (error "If FILE-NAME is nil then TEMP-FILE-NAME must be non-nil")) (python-shell-send-string From daac280ae09b00e8a218ba3b6f9205d2372e93db Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 7 Sep 2012 16:14:55 -0400 Subject: [PATCH 081/216] * lisp/emacs-lisp/byte-run.el (defun): Tweak message. Simplify code. --- lisp/ChangeLog | 12 ++++++++---- lisp/emacs-lisp/byte-run.el | 7 +++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efdc0b80d13..052b85ef757 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,11 @@ +2012-09-07 Stefan Monnier + + * emacs-lisp/byte-run.el (defun): Tweak message. Simplify code. + 2012-09-07 Matt McClure (tiny change) - * progmodes/python.el (python-shell-send-string): When - default-directory is remote, create temp file on remote + * progmodes/python.el (python-shell-send-string): + When default-directory is remote, create temp file on remote filesystem. (python-shell-send-file): When file is remote, pass local view of file paths to remote Python interpreter. (Bug#12340) @@ -15,8 +19,8 @@ * subr.el (read-char-choice): Allow quitting via ESC ESC. - * userlock.el (ask-user-about-supersession-threat): Use - read-char-choice (Bug#12093). + * userlock.el (ask-user-about-supersession-threat): + Use read-char-choice (Bug#12093). 2012-09-07 Chong Yidong diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 9b66c8ffd60..d1382f42b19 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -185,11 +185,10 @@ The return value is undefined. ((and (featurep 'cl) (memq (car x) ;C.f. cl-do-proclaim. '(special inline notinline optimize warn))) - (if (null (stringp docstring)) - (push (list 'declare x) body) - (setcdr body (cons (list 'declare x) (cdr body)))) + (push (list 'declare x) + (if (stringp docstring) (cdr body) body)) nil) - (t (message "Warning: Unknown defun property %S in %S" + (t (message "Warning: Unknown defun property `%S' in %S" (car x) name))))) decls)) (def (list 'defalias From a30cb5dd2cc88d0c38566ee256ac81856a904150 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 8 Sep 2012 14:20:32 +0300 Subject: [PATCH 082/216] Fix setting of environment variables by nt/configure.bat. nt/configure.bat : Don't leave it set in the environment when the script exits. --- nt/ChangeLog | 5 +++++ nt/configure.bat | 2 ++ 2 files changed, 7 insertions(+) diff --git a/nt/ChangeLog b/nt/ChangeLog index d861b386b1c..fd528315e2a 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2012-09-08 Eli Zaretskii + + * configure.bat : Don't leave it set in the + environment when the script exits. + 2012-09-07 Juanma Barranquero * config.nt: Sync with autogen/config.in. diff --git a/nt/configure.bat b/nt/configure.bat index 56793a0d1c3..5890b12d02e 100755 --- a/nt/configure.bat +++ b/nt/configure.bat @@ -949,4 +949,6 @@ set HAVE_PNG= set HAVE_TIFF= set HAVE_XPM= set dbginfo= +endlocal +set use_extensions= From aa7d57c5079024458c5e25cd5f304d1b967bcbe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 8 Sep 2012 14:48:33 +0200 Subject: [PATCH 083/216] * nsterm.h (EmacsView): Add updateFrameSize. * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe in the internal border. (x_set_window_size): Remove static variables and their usage. (ns_redraw_scroll_bars): Fix NSTRACE arg. (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove fringe/internal border adjustment. (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c). (ns_draw_window_cursor): Remove fringe/internal border adjustment. (ns_fix_rect_ibw): Remove. (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw. (ns_dumpglyphs_box_or_relief): Ditto. (ns_maybe_dumpglyphs_background): Remove fringe/internal border adjustment. (ns_dumpglyphs_image): Ditto. (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal border adjustment. (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and their usage. Add fringe_extended_p and its use as in other terms. (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if scroll bar was removed. (updateFrameSize): New function. (windowDidResize): Move code to updateFrameSize and call it. Fixes: debbugs:11052 --- src/ChangeLog | 27 ++++ src/nsterm.h | 1 + src/nsterm.m | 332 +++++++++++++++++++++----------------------------- 3 files changed, 170 insertions(+), 190 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bdbc97fdb1c..40647d79589 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2012-09-08 Jan Djärv + + * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe + in the internal border. + (x_set_window_size): Remove static variables and their usage. + (ns_redraw_scroll_bars): Fix NSTRACE arg. + (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove + fringe/internal border adjustment (Bug#11052). + (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c). + (ns_draw_window_cursor): Remove fringe/internal border adjustment. + (ns_fix_rect_ibw): Remove. + (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw. + (ns_dumpglyphs_box_or_relief): Ditto. + (ns_maybe_dumpglyphs_background): Remove fringe/internal border + adjustment. + (ns_dumpglyphs_image): Ditto. + (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal + border adjustment. + (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and + their usage. Add fringe_extended_p and its use as in other terms. + (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if + scroll bar was removed. + (updateFrameSize): New function. + (windowDidResize): Move code to updateFrameSize and call it. + + * nsterm.h (EmacsView): Add updateFrameSize. + 2012-09-07 Chong Yidong * textprop.c (Fget_text_property): Minor doc fix (Bug#12323). diff --git a/src/nsterm.h b/src/nsterm.h index f0cae193005..b1836692b2c 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -103,6 +103,7 @@ along with GNU Emacs. If not, see . */ - (void) setWindowClosing: (BOOL)closing; - (EmacsToolbar *) toolbar; - (void) deleteWorkingText; +- (void) updateFrameSize; #ifdef NS_IMPL_GNUSTEP /* Not declared, but useful. */ diff --git a/src/nsterm.m b/src/nsterm.m index a7d6732d5bd..73372238cf4 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -871,25 +871,12 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc) window_box (w, area, &window_x, &window_y, &window_width, 0); - clip_rect.origin.x = window_x - FRAME_INTERNAL_BORDER_WIDTH (f); + clip_rect.origin.x = window_x; clip_rect.origin.y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, row->y)); clip_rect.origin.y = max (clip_rect.origin.y, window_y); - clip_rect.size.width = window_width + 2 * FRAME_INTERNAL_BORDER_WIDTH (f); + clip_rect.size.width = window_width; clip_rect.size.height = row->visible_height; - /* allow a full-height row at the top when requested - (used to draw fringe all the way through internal border area) */ - if (gc && clip_rect.origin.y < 5) - { - clip_rect.origin.y -= FRAME_INTERNAL_BORDER_WIDTH (f); - clip_rect.size.height += FRAME_INTERNAL_BORDER_WIDTH (f); - } - - /* likewise at bottom */ - if (gc && - FRAME_PIXEL_HEIGHT (f) - (clip_rect.origin.y + clip_rect.size.height) < 5) - clip_rect.size.height += FRAME_INTERNAL_BORDER_WIDTH (f); - ns_focus (f, &clip_rect, 1); } @@ -1237,18 +1224,10 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) NSRect wr = [window frame]; int tb = FRAME_EXTERNAL_TOOL_BAR (f); int pixelwidth, pixelheight; - static int oldRows, oldCols, oldFontWidth, oldFontHeight; - static int oldTB; - static struct frame *oldF; NSTRACE (x_set_window_size); - if (view == nil || - (f == oldF - && rows == oldRows && cols == oldCols - && oldFontWidth == FRAME_COLUMN_WIDTH (f) - && oldFontHeight == FRAME_LINE_HEIGHT (f) - && oldTB == tb)) + if (view == nil) return; /*fprintf (stderr, "\tsetWindowSize: %d x %d, font size %d x %d\n", cols, rows, FRAME_COLUMN_WIDTH (f), FRAME_LINE_HEIGHT (f)); */ @@ -1256,12 +1235,6 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) BLOCK_INPUT; check_frame_size (f, &rows, &cols); - oldF = f; - oldRows = rows; - oldCols = cols; - oldFontWidth = FRAME_COLUMN_WIDTH (f); - oldFontHeight = FRAME_LINE_HEIGHT (f); - oldTB = tb; f->scroll_bar_actual_width = NS_SCROLL_BAR_WIDTH (f); compute_fringe_widths (f, 0); @@ -1939,7 +1912,7 @@ ns_redraw_scroll_bars (struct frame *f) int i; id view; NSArray *subviews = [[FRAME_NS_VIEW (f) superview] subviews]; - NSTRACE (ns_judge_scroll_bars); + NSTRACE (ns_redraw_scroll_bars); for (i =[subviews count]-1; i >= 0; i--) { view = [subviews objectAtIndex: i]; @@ -2125,9 +2098,9 @@ ns_after_update_window_line (struct glyph_row *desired_row) desired_row->redraw_fringe_bitmaps_p = 1; /* When a window has disappeared, make sure that no rest of - full-width rows stays visible in the internal border. - Under NS this is drawn inside the fringes. */ + full-width rows stays visible in the internal border. */ if (windows_or_buffers_changed + && desired_row->full_width_p && (f = XFRAME (w->frame), width = FRAME_INTERNAL_BORDER_WIDTH (f), width != 0) @@ -2136,24 +2109,11 @@ ns_after_update_window_line (struct glyph_row *desired_row) { int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); - /* Internal border is drawn below the tool bar. */ - if (WINDOWP (f->tool_bar_window) - && w == XWINDOW (f->tool_bar_window)) - y -= width; - /* end copy from other terms */ - BLOCK_INPUT; - if (!desired_row->full_width_p) - { - int x1 = WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w); - int x2 = WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w) - + FRAME_PIXEL_WIDTH (f) - NS_SCROLL_BAR_WIDTH (f) - - WINDOW_RIGHT_FRINGE_WIDTH (w) - - FRAME_INTERNAL_BORDER_WIDTH (f); - ns_clear_frame_area (f, x1, y, width, height); - ns_clear_frame_area (f, x2, y, width, height); - } + ns_clear_frame_area (f, 0, y, width, height); + ns_clear_frame_area (f, + FRAME_PIXEL_WIDTH (f) - width, + y, width, height); UNBLOCK_INPUT; } } @@ -2238,17 +2198,6 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, int rowY; static EmacsImage **bimgs = NULL; static int nBimgs = 0; - /* NS-specific: move internal border inside fringe */ - int x = p->bx < 0 ? p->x : p->bx; - int wd = p->bx < 0 ? p->wd : p->nx; - BOOL fringeOnVeryLeft - = x - WINDOW_LEFT_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w) - - FRAME_INTERNAL_BORDER_WIDTH (f) < 10; - BOOL fringeOnVeryRight - = FRAME_PIXEL_WIDTH (f) - x - wd - FRAME_INTERNAL_BORDER_WIDTH (f) - - WINDOW_RIGHT_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w) < 10; - int xAdjust = FRAME_INTERNAL_BORDER_WIDTH (f) * - (fringeOnVeryLeft ? -1 : (fringeOnVeryRight ? 1 : 0)); /* grow bimgs if needed */ if (nBimgs < max_used_fringe_bitmap) @@ -2263,22 +2212,68 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); ns_clip_to_row (w, row, -1, YES); - if (p->bx >= 0 && !p->overlay_p) + if (!p->overlay_p) { - int yAdjust = rowY - FRAME_INTERNAL_BORDER_WIDTH (f) < 5 ? - -FRAME_INTERNAL_BORDER_WIDTH (f) : 0; - int yIncr = FRAME_PIXEL_HEIGHT (f) - (p->by+yAdjust + p->ny) < 5 ? - FRAME_INTERNAL_BORDER_WIDTH (f) : 0 - + (yAdjust ? FRAME_INTERNAL_BORDER_WIDTH (f) : 0); - NSRect r = NSMakeRect (p->bx+xAdjust, p->by+yAdjust, p->nx, p->ny+yIncr); - NSRectClip (r); - [ns_lookup_indexed_color(face->background, f) set]; - NSRectFill (r); + int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny; + + /* If the fringe is adjacent to the left (right) scroll bar of a + leftmost (rightmost, respectively) window, then extend its + background to the gap between the fringe and the bar. */ + if ((WINDOW_LEFTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) + || (WINDOW_RIGHTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) + { + int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); + + if (sb_width > 0) + { + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); + + if (bx < 0) + { + /* Bitmap fills the fringe. */ + if (bar_area_x + bar_area_width == p->x) + bx = bar_area_x + sb_width; + else if (p->x + p->wd == bar_area_x) + bx = bar_area_x; + if (bx >= 0) + { + int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); + + nx = bar_area_width - sb_width; + by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, + row->y)); + ny = row->visible_height; + } + } + else + { + if (bar_area_x + bar_area_width == bx) + { + bx = bar_area_x + sb_width; + nx += bar_area_width - sb_width; + } + else if (bx + nx == bar_area_x) + nx += bar_area_width - sb_width; + } + } + } + + if (bx >= 0 && nx > 0) + { + NSRect r = NSMakeRect (bx, by, nx, ny); + NSRectClip (r); + [ns_lookup_indexed_color (face->background, f) set]; + NSRectFill (r); + } } if (p->which) { - NSRect r = NSMakeRect (p->x+xAdjust, p->y, p->wd, p->h); + NSRect r = NSMakeRect (p->x, p->y, p->wd, p->h); EmacsImage *img = bimgs[p->which - 1]; if (!img) @@ -2288,7 +2283,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, int i; unsigned char *cbits = xmalloc (len); - for (i =0; ih flip: NO]; @@ -2386,14 +2381,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, r.size.height = h; r.size.width = w->phys_cursor_width; - /* FIXME: if we overwrite the internal border area, it does not get erased; - fix by truncating cursor, but better would be to erase properly */ - overspill = r.origin.x + r.size.width - - WINDOW_TEXT_TO_FRAME_PIXEL_X (w, WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_TOTAL_FRINGE_WIDTH (w) - FRAME_INTERNAL_BORDER_WIDTH (f)); - if (overspill > 0) - r.size.width -= overspill; - /* TODO: only needed in rare cases with last-resort font in HELLO.. should we do this more efficiently? */ ns_clip_to_row (w, glyph_row, -1, NO); /* do ns_focus(f, &r, 1); if remove */ @@ -2517,31 +2504,6 @@ hide_hourglass (void) ========================================================================== */ - -static inline NSRect -ns_fix_rect_ibw (NSRect r, int fibw, int frame_pixel_width) -/* -------------------------------------------------------------------------- - Under NS we draw internal borders inside fringes, and want full-width - rendering to go all the way to edge. This function makes that correction. - -------------------------------------------------------------------------- */ -{ - if (r.origin.y <= fibw+1) - { - r.size.height += r.origin.y; - r.origin.y = 0; - } - if (r.origin.x <= fibw+1) - { - r.size.width += r.origin.x; - r.origin.x = 0; - } - if (frame_pixel_width - (r.origin.x+r.size.width) <= fibw+1) - r.size.width += fibw; - - return r; -} - - static int ns_get_glyph_string_clip_rect (struct glyph_string *s, NativeRectangle *nr) /* -------------------------------------------------------------------------- @@ -2551,14 +2513,6 @@ ns_get_glyph_string_clip_rect (struct glyph_string *s, NativeRectangle *nr) -------------------------------------------------------------------------- */ { int n = get_glyph_string_clip_rects (s, nr, 2); - if (s->row->full_width_p) - { - *nr = ns_fix_rect_ibw (*nr, FRAME_INTERNAL_BORDER_WIDTH (s->f), - FRAME_PIXEL_WIDTH (s->f)); - if (n == 2) - *nr = ns_fix_rect_ibw (*(nr+1), FRAME_INTERNAL_BORDER_WIDTH (s->f), - FRAME_PIXEL_WIDTH (s->f)); - } return n; } @@ -2883,11 +2837,6 @@ ns_dumpglyphs_box_or_relief (struct glyph_string *s) r = NSMakeRect (s->x, s->y, right_x - s->x + 1, s->height); - /* expand full-width row over internal borders */ - if (s->row->full_width_p) - r = ns_fix_rect_ibw (r, FRAME_INTERNAL_BORDER_WIDTH (s->f), - FRAME_PIXEL_WIDTH (s->f)); - /* TODO: Sometimes box_color is 0 and this seems wrong; should investigate. */ if (s->face->box == FACE_SIMPLE_BOX && s->face->box_color) { @@ -2943,26 +2892,6 @@ ns_maybe_dumpglyphs_background (struct glyph_string *s, char force_p) NSRect r = NSMakeRect (s->x, s->y + box_line_width, s->background_width, s->height-2*box_line_width); - - /* expand full-width row over internal borders */ - if (s->row->full_width_p) - { - int fibw = FRAME_INTERNAL_BORDER_WIDTH (s->f); - if (r.origin.y <= fibw+1 + box_line_width) - { - r.size.height += r.origin.y; - r.origin.y = 0; - } - if (r.origin.x <= fibw+1) - { - r.size.width += 2*r.origin.x; - r.origin.x = 0; - } - if (FRAME_PIXEL_WIDTH (s->f) - (r.origin.x + r.size.width) - <= fibw+1) - r.size.width += fibw; - } - NSRectFill (r); } @@ -3028,24 +2957,6 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) br = NSMakeRect (x, y, s->slice.width, s->slice.height); } - /* expand full-width row over internal borders */ - if (s->row->full_width_p) - { - int fibw = FRAME_INTERNAL_BORDER_WIDTH (s->f); - if (br.origin.y <= fibw+1 + box_line_vwidth) - { - br.size.height += br.origin.y; - br.origin.y = 0; - } - if (br.origin.x <= fibw+1 + box_line_vwidth) - { - br.size.width += br.origin.x; - br.origin.x = 0; - } - if (FRAME_PIXEL_WIDTH (s->f) - (br.origin.x + br.size.width) <= fibw+1) - br.size.width += fibw; - } - NSRectFill (br); /* Draw the image.. do we need to draw placeholder if img ==nil? */ @@ -3143,7 +3054,7 @@ ns_dumpglyphs_stretch (struct glyph_string *s) bgCol = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f); fgCol = ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f); - for (i=0; irow->full_width_p) { @@ -3173,13 +3084,6 @@ ns_dumpglyphs_stretch (struct glyph_string *s) r[i].size.height = min (s->height, s->row->visible_height); } - /* expand full-width rows over internal borders */ - else - { - r[i] = ns_fix_rect_ibw (r[i], FRAME_INTERNAL_BORDER_WIDTH (s->f), - FRAME_PIXEL_WIDTH (s->f)); - } - [bgCol set]; /* NOTE: under NS this is NOT used to draw cursors, but we must avoid @@ -3639,9 +3543,9 @@ ns_set_vertical_scroll_bar (struct window *window, struct frame *f = XFRAME (WINDOW_FRAME (window)); EmacsView *view = FRAME_NS_VIEW (f); int window_y, window_height; - BOOL barOnVeryLeft, barOnVeryRight; int top, left, height, width, sb_width, sb_left; EmacsScroller *bar; + BOOL fringe_extended_p; /* optimization; display engine sends WAY too many of these.. */ if (!NILP (window->vertical_scroll_bar)) @@ -3668,26 +3572,27 @@ ns_set_vertical_scroll_bar (struct window *window, width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f); left = WINDOW_SCROLL_BAR_AREA_X (window); - if (top < 5) /* top scrollbar adjustment */ - { - top -= FRAME_INTERNAL_BORDER_WIDTH (f); - height += FRAME_INTERNAL_BORDER_WIDTH (f); - } - /* allow for displaying a skinnier scrollbar than char area allotted */ sb_width = (WINDOW_CONFIG_SCROLL_BAR_WIDTH (window) > 0) ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (window) : width; - - barOnVeryLeft = left < 5; - barOnVeryRight = FRAME_PIXEL_WIDTH (f) - left - width < 5; - sb_left = left + FRAME_INTERNAL_BORDER_WIDTH (f) - * (barOnVeryLeft ? -1 : (barOnVeryRight ? 1 : 0)); + sb_left = left; r = NSMakeRect (sb_left, top, sb_width, height); /* the parent view is flipped, so we need to flip y value */ v = [view frame]; r.origin.y = (v.size.height - r.size.height - r.origin.y); + if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (window)) + fringe_extended_p = (WINDOW_LEFTMOST_P (window) + && WINDOW_LEFT_FRINGE_WIDTH (window) + && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (window) + || WINDOW_LEFT_MARGIN_COLS (window) == 0)); + else + fringe_extended_p = (WINDOW_RIGHTMOST_P (window) + && WINDOW_RIGHT_FRINGE_WIDTH (window) + && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (window) + || WINDOW_RIGHT_MARGIN_COLS (window) == 0)); + XSETWINDOW (win, window); BLOCK_INPUT; @@ -3707,7 +3612,14 @@ ns_set_vertical_scroll_bar (struct window *window, if (NILP (window->vertical_scroll_bar)) { - ns_clear_frame_area (f, sb_left, top, width, height); + if (width > 0 && height > 0) + { + if (fringe_extended_p) + ns_clear_frame_area (f, sb_left, top, sb_width, height); + else + ns_clear_frame_area (f, left, top, width, height); + } + bar = [[EmacsScroller alloc] initFrame: r window: win]; wset_vertical_scroll_bar (window, make_save_value (bar, 0)); } @@ -3778,14 +3690,21 @@ ns_judge_scroll_bars (struct frame *f) { int i; id view; - NSArray *subviews = [[FRAME_NS_VIEW (f) superview] subviews]; + EmacsView *eview = FRAME_NS_VIEW (f); + NSArray *subviews = [[eview superview] subviews]; + BOOL removed = NO; + NSTRACE (ns_judge_scroll_bars); - for (i =[subviews count]-1; i >= 0; i--) + for (i = [subviews count]-1; i >= 0; --i) { view = [subviews objectAtIndex: i]; if (![view isKindOfClass: [EmacsScroller class]]) continue; [view judge]; + removed = YES; } + + if (removed) + [eview updateFrameSize]; } @@ -5420,6 +5339,48 @@ not_in_argv (NSString *arg) return NO; } +- (void) updateFrameSize +{ + NSWindow *window = [self window]; + NSRect wr = [window frame]; +#ifdef NS_IMPL_GNUSTEP + int extra = 3; +#else + int extra = 0; +#endif + + int oldc = cols, oldr = rows; + int oldw = FRAME_PIXEL_WIDTH (emacsframe), + oldh = FRAME_PIXEL_HEIGHT (emacsframe); + int neww, newh; + + cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (emacsframe, wr.size.width + extra); + + if (cols < MINWIDTH) + cols = MINWIDTH; + + rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES + (emacsframe, wr.size.height + - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) + extra + - FRAME_TOOLBAR_HEIGHT (emacsframe)); + + if (rows < MINHEIGHT) + rows = MINHEIGHT; + + neww = (int)wr.size.width - emacsframe->border_width; + newh = ((int)wr.size.height + - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) + - FRAME_TOOLBAR_HEIGHT (emacsframe)); + + if (oldr != rows || oldc != cols || neww != oldw || newh != oldh) + { + FRAME_PIXEL_WIDTH (emacsframe) = neww; + FRAME_PIXEL_HEIGHT (emacsframe) = newh; + change_frame_size (emacsframe, rows, cols, 0, 0, 1); + SET_FRAME_GARBAGED (emacsframe); + cancel_mouse_face (emacsframe); + } +} - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize /* normalize frame to gridded text size */ @@ -5517,16 +5478,7 @@ not_in_argv (NSString *arg) x_set_window_size (emacsframe, 0, cols, rows); else { - NSWindow *window = [self window]; - NSRect wr = [window frame]; - FRAME_PIXEL_WIDTH (emacsframe) = (int)wr.size.width - - emacsframe->border_width; - FRAME_PIXEL_HEIGHT (emacsframe) = (int)wr.size.height - - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) - - FRAME_TOOLBAR_HEIGHT (emacsframe); - change_frame_size (emacsframe, rows, cols, 0, 0, 1); - SET_FRAME_GARBAGED (emacsframe); - cancel_mouse_face (emacsframe); + [self updateFrameSize]; } } #endif From fa2bcf435d9774c0e8542ba36b11ef4722f9675c Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 8 Sep 2012 15:28:11 +0200 Subject: [PATCH 084/216] Fix handling of debugger window. (Bug#8789) * window.el (display-buffer-in-previous-window): New buffer display action function. * emacs-lisp/debug.el (debugger-bury-or-kill): New option. (debugger-previous-window): New variable. (debug): Rewrite using display-buffer-in-previous-window, quit-restore-window and debugger-bury-or-kill. (Bug#8789) --- etc/NEWS | 25 +++--- lisp/ChangeLog | 10 +++ lisp/emacs-lisp/debug.el | 163 ++++++++++++++++++++++----------------- lisp/window.el | 56 ++++++++++++++ 4 files changed, 174 insertions(+), 80 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 55b8388ca27..7a9c9a21c97 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -645,6 +645,8 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'. ** New error type and new function `user-error'. Doesn't trigger the debugger. +** New option `debugger-bury-or-kill'. + +++ ** New utility function `buffer-narrowed-p'. @@ -653,20 +655,25 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'. *** The functions get-lru-window, get-mru-window and get-largest-window now accept a third argument to avoid choosing the selected window. -*** New macro with-temp-buffer-window. +*** New macro `with-temp-buffer-window'. -*** New option temp-buffer-resize-frames. +*** New option `temp-buffer-resize-frames'. -*** New function fit-frame-to-buffer and new option - fit-frame-to-buffer-bottom-margin. +*** New function `fit-frame-to-buffer' and new option + `fit-frame-to-buffer-bottom-margin'. -*** New display action function display-buffer-below-selected. +*** New display action functions `display-buffer-below-selected' and +`display-buffer-in-previous-window'. -*** New display action alist `inhibit-switch-frame', if non-nil, tells -display action functions to avoid changing which frame is selected. +*** New display action alist entry `inhibit-switch-frame', if non-nil, +tells display action functions to avoid changing which frame is +selected. -*** New display action alist `pop-up-frame-parameters', if non-nil, -specifies frame parameters to give any newly-created frame. +*** New display action alist entry `pop-up-frame-parameters', if +non-nil, specifies frame parameters to give any newly-created frame. + +*** New display action alist entry `previous-window', if non-nil, +specifies window to reuse in `display-buffer-in-previous-window'. *** The following variables are obsolete, as they can be replaced by appropriate entries in the `display-buffer-alist' function introduced diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 052b85ef757..e10fe9166e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2012-09-08 Martin Rudalics + + * window.el (display-buffer-in-previous-window): New buffer + display action function. + + * emacs-lisp/debug.el (debugger-bury-or-kill): New option. + (debugger-previous-window): New variable. + (debug): Rewrite using display-buffer-in-previous-window, + quit-restore-window and debugger-bury-or-kill. (Bug#8789) + 2012-09-07 Stefan Monnier * emacs-lisp/byte-run.el (defun): Tweak message. Simplify code. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 7bc93a19d1a..188c0800eb8 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -48,6 +48,39 @@ the middle is discarded, and just the beginning and end are displayed." :group 'debugger :version "21.1") +(defcustom debugger-bury-or-kill 'bury + "How to proceed with the debugger buffer when exiting `debug'. +The value used here affects the behavior of operations on any +window previously showing the debugger buffer. + +`nil' means that if its window is not deleted when exiting the + debugger, invoking `switch-to-prev-buffer' will usually show + the debugger buffer again. + +`append' means that if the window is not deleted, the debugger + buffer moves to the end of the window's previous buffers so + it's less likely that a future invocation of + `switch-to-prev-buffer' will switch to it. Also, it moves the + buffer to the end of the frame's buffer list. + +`bury' means that if the window is not deleted, its buffer is + removed from the window's list of previous buffers. Also, it + moves the buffer to the end of the frame's buffer list. This + value provides the most reliable remedy to not have + `switch-to-prev-buffer' switch to the debugger buffer again + without killing the buffer. + +`kill' means to kill the debugger buffer. + +The value used here is passed to `quit-restore-window'." + :type '(choice + (const :tag "Keep alive" nil) + (const :tag "Append" 'append) + (const :tag "Bury" 'bury) + (const :tag "Kill" 'kill)) + :group 'debugger + :version "24.2") + (defvar debug-function-list nil "List of functions currently set for debug on entry.") @@ -60,6 +93,9 @@ the middle is discarded, and just the beginning and end are displayed." (defvar debugger-old-buffer nil "This is the buffer that was current when the debugger was entered.") +(defvar debugger-previous-window nil + "This is the window last showing the debugger buffer.") + (defvar debugger-previous-backtrace nil "The contents of the previous backtrace (including text properties). This is to optimize `debugger-make-xrefs'.") @@ -133,7 +169,7 @@ first will be printed into the backtrace buffer." (with-current-buffer (get-buffer "*Backtrace*") (list major-mode (buffer-string))))) (debugger-buffer (get-buffer-create "*Backtrace*")) - (debugger-old-buffer (current-buffer)) + (debugger-window nil) (debugger-step-after-exit nil) (debugger-will-be-back nil) ;; Don't keep reading from an executing kbd macro! @@ -184,78 +220,63 @@ first will be printed into the backtrace buffer." (cursor-in-echo-area nil)) (unwind-protect (save-excursion - (save-window-excursion - (with-no-warnings - (setq unread-command-char -1)) - (when (eq (car debugger-args) 'debug) - ;; Skip the frames for backtrace-debug, byte-code, - ;; and implement-debug-on-entry. - (backtrace-debug 4 t) - ;; Place an extra debug-on-exit for macro's. - (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) - (backtrace-debug 5 t))) - (pop-to-buffer debugger-buffer) - (debugger-mode) - (debugger-setup-buffer debugger-args) - (when noninteractive - ;; If the backtrace is long, save the beginning - ;; and the end, but discard the middle. - (when (> (count-lines (point-min) (point-max)) - debugger-batch-max-lines) - (goto-char (point-min)) - (forward-line (/ 2 debugger-batch-max-lines)) - (let ((middlestart (point))) - (goto-char (point-max)) - (forward-line (- (/ 2 debugger-batch-max-lines) - debugger-batch-max-lines)) - (delete-region middlestart (point))) - (insert "...\n")) + (with-no-warnings + (setq unread-command-char -1)) + (when (eq (car debugger-args) 'debug) + ;; Skip the frames for backtrace-debug, byte-code, + ;; and implement-debug-on-entry. + (backtrace-debug 4 t) + ;; Place an extra debug-on-exit for macro's. + (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) + (backtrace-debug 5 t))) + (pop-to-buffer + debugger-buffer + `((display-buffer-reuse-window + display-buffer-in-previous-window) + . (,(when debugger-previous-window + `(previous-window . ,debugger-previous-window))))) + (setq debugger-window (selected-window)) + (setq debugger-previous-window debugger-window) + (debugger-mode) + (debugger-setup-buffer debugger-args) + (when noninteractive + ;; If the backtrace is long, save the beginning + ;; and the end, but discard the middle. + (when (> (count-lines (point-min) (point-max)) + debugger-batch-max-lines) (goto-char (point-min)) - (message "%s" (buffer-string)) - (kill-emacs -1)) + (forward-line (/ 2 debugger-batch-max-lines)) + (let ((middlestart (point))) + (goto-char (point-max)) + (forward-line (- (/ 2 debugger-batch-max-lines) + debugger-batch-max-lines)) + (delete-region middlestart (point))) + (insert "...\n")) + (goto-char (point-min)) + (message "%s" (buffer-string)) + (kill-emacs -1)) + (message "") + (let ((standard-output nil) + (buffer-read-only t)) (message "") - (let ((standard-output nil) - (buffer-read-only t)) - (message "") - ;; Make sure we unbind buffer-read-only in the right buffer. - (save-excursion - (recursive-edit))))) - ;; Kill or at least neuter the backtrace buffer, so that users - ;; don't try to execute debugger commands in an invalid context. - (if (get-buffer-window debugger-buffer 0) - ;; Still visible despite the save-window-excursion? Maybe it - ;; it's in a pop-up frame. It would be annoying to delete and - ;; recreate it every time the debugger stops, so instead we'll - ;; erase it (and maybe hide it) but keep it alive. - (with-current-buffer debugger-buffer - (with-selected-window (get-buffer-window debugger-buffer 0) - (when (and (window-dedicated-p (selected-window)) - (not debugger-will-be-back)) - ;; If the window is not dedicated, burying the buffer - ;; will mean that the frame created for it is left - ;; around showing some random buffer, and next time we - ;; pop to the debugger buffer we'll create yet - ;; another frame. - ;; If debugger-will-be-back is non-nil, the frame - ;; would need to be de-iconified anyway immediately - ;; after when we re-enter the debugger, so iconifying it - ;; here would cause flashing. - ;; Drew Adams is not happy with this: he wants to frame - ;; to be left at the top-level, still working on how - ;; best to do that. - (bury-buffer)))) - (unless debugger-previous-state - (kill-buffer debugger-buffer))) - ;; Restore the previous state of the debugger-buffer, in case we were - ;; in a recursive invocation of the debugger. - (when (buffer-live-p debugger-buffer) - (with-current-buffer debugger-buffer - (let ((inhibit-read-only t)) - (erase-buffer) - (if (null debugger-previous-state) - (fundamental-mode) - (insert (nth 1 debugger-previous-state)) - (funcall (nth 0 debugger-previous-state)))))) + ;; Make sure we unbind buffer-read-only in the right buffer. + (save-excursion + (recursive-edit)))) + (when (and (window-live-p debugger-window) + (eq (window-buffer debugger-window) debugger-buffer)) + ;; Unshow debugger-buffer. + (quit-restore-window debugger-window debugger-bury-or-kill)) + ;; Restore previous state of debugger-buffer in case we were + ;; in a recursive invocation of the debugger, otherwise just + ;; erase the buffer and put it into fundamental mode. + (when (buffer-live-p debugger-buffer) + (with-current-buffer debugger-buffer + (let ((inhibit-read-only t)) + (erase-buffer) + (if (null debugger-previous-state) + (fundamental-mode) + (insert (nth 1 debugger-previous-state)) + (funcall (nth 0 debugger-previous-state)))))) (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) ;; Put into effect the modified values of these variables diff --git a/lisp/window.el b/lisp/window.el index 0e03268029c..b071a8e9c50 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5521,6 +5521,62 @@ the selected one." (window--display-buffer buffer window 'reuse display-buffer-mark-dedicated))))) +(defun display-buffer-in-previous-window (buffer alist) + "Display BUFFER in a window previously showing it. +If ALIST has a non-nil `inhibit-same-window' entry, the selected +window is not eligible for reuse. + +If ALIST contains a `reusable-frames' entry, its value determines +which frames to search for a reusable window: + nil -- the selected frame (actually the last non-minibuffer frame) + A frame -- just that frame + `visible' -- all visible frames + 0 -- all frames on the current terminal + t -- all frames. + +If ALIST contains no `reusable-frames' entry, search just the +selected frame if `display-buffer-reuse-frames' and +`pop-up-frames' are both nil; search all frames on the current +terminal if either of those variables is non-nil. + +If ALIST has a `previous-window' entry, the window specified by +that entry will override any other window found by the methods +above, even if that window never showed BUFFER before." + (let* ((alist-entry (assq 'reusable-frames alist)) + (inhibit-same-window + (cdr (assq 'inhibit-same-window alist))) + (frames (cond + (alist-entry (cdr alist-entry)) + ((if (eq pop-up-frames 'graphic-only) + (display-graphic-p) + pop-up-frames) + 0) + (display-buffer-reuse-frames 0) + (t (last-nonminibuffer-frame)))) + entry best-window second-best-window window) + ;; Scan windows whether they have shown the buffer recently. + (catch 'best + (dolist (window (window-list-1 (frame-first-window) 'nomini frames)) + (when (and (assq buffer (window-prev-buffers window)) + (not (window-dedicated-p window))) + (if (eq window (selected-window)) + (unless inhibit-same-window + (setq second-best-window window)) + (setq best-window window) + (throw 'best t))))) + ;; When ALIST has a `previous-window' entry, that entry may override + ;; anything we found so far. + (when (and (setq window (cdr (assq 'previous-window alist))) + (window-live-p window) + (not (window-dedicated-p window))) + (if (eq window (selected-window)) + (unless inhibit-same-window + (setq second-best-window window)) + (setq best-window window))) + ;; Return best or second best window found. + (when (setq window (or best-window second-best-window)) + (window--display-buffer buffer window 'reuse)))) + (defun display-buffer-use-some-window (buffer alist) "Display BUFFER in an existing window. Search for a usable window, set that window to the buffer, and From 6dcef6eca79b118976211b05552880be2ddf014a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 8 Sep 2012 22:23:01 +0800 Subject: [PATCH 085/216] Introduce "raw syntax descriptor" terminology, and use it. * syntax.texi (Syntax Table Internals): Define "raw syntax descriptor" terminology. (Syntax Descriptors): Mention raw syntax descriptors. * lisp/subr.el (syntax-after, syntax-class): Doc fix. * syntax.c (Fstring_to_syntax): Doc fix. Fixes: debbugs:12383 --- doc/lispref/ChangeLog | 6 ++++ doc/lispref/syntax.texi | 61 ++++++++++++++++++++++++----------------- lisp/ChangeLog | 4 +++ lisp/subr.el | 9 ++++-- src/ChangeLog | 4 +++ src/syntax.c | 10 +++---- 6 files changed, 62 insertions(+), 32 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4bd7210d7d6..57ee374af49 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2012-09-08 Chong Yidong + + * syntax.texi (Syntax Table Internals): Define "raw syntax + descriptor" terminology (Bug#12383). + (Syntax Descriptors): Mention raw syntax descriptors. + 2012-09-07 Chong Yidong * variables.texi (Creating Buffer-Local): Fix description of diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 91ae4359af7..624b5a92d6e 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -130,6 +130,10 @@ comment-ender), and the entry for @samp{/} is @samp{@w{. 14}} (i.e., punctuation, matching character slot unused, first character of a comment-starter, second character of a comment-ender). + Emacs also defines @dfn{raw syntax descriptors}, which are used to +describe syntax classes at a lower level. @xref{Syntax Table +Internals}. + @menu * Syntax Class Table:: Table of syntax classes. * Syntax Flags:: Additional flags each character can have. @@ -531,8 +535,9 @@ the current buffer's syntax table to determine the syntax for the underlying text character. @item @code{(@var{syntax-code} . @var{matching-char})} -A cons cell of this format specifies the syntax for the underlying -text character. (@pxref{Syntax Table Internals}) +A cons cell of this format is a raw syntax descriptor (@pxref{Syntax +Table Internals}), which directly specifies a syntax class for the +underlying text character. @item @code{nil} If the property is @code{nil}, the character's syntax is determined from @@ -940,16 +945,20 @@ documented in this section. This internal format can also be assigned as syntax properties (@pxref{Syntax Properties}). @cindex syntax code - Each entry in a syntax table is a cons cell of the form -@code{(@var{syntax-code} . @var{matching-char})}. @var{syntax-code} -is an integer that encodes the syntax class and syntax flags, -according to the table below. @var{matching-char}, if non-@code{nil}, -specifies a matching character (similar to the second character in a -syntax descriptor). +@cindex raw syntax descriptor + Each entry in a syntax table is a @dfn{raw syntax descriptor}: a +cons cell of the form @code{(@var{syntax-code} +. @var{matching-char})}. @var{syntax-code} is an integer which +encodes the syntax class and syntax flags, according to the table +below. @var{matching-char}, if non-@code{nil}, specifies a matching +character (similar to the second character in a syntax descriptor). + + Here are the syntax codes corresponding to the various syntax +classes: @multitable @columnfractions .2 .3 .2 .3 @item -@i{Syntax code} @tab @i{Class} @tab @i{Syntax code} @tab @i{Class} +@i{Code} @tab @i{Class} @tab @i{Code} @tab @i{Class} @item 0 @tab whitespace @tab 8 @tab paired delimiter @item @@ -970,7 +979,7 @@ syntax descriptor). @noindent For example, in the standard syntax table, the entry for @samp{(} is -@code{(4 . 41)}. (41 is the character code for @samp{)}.) +@code{(4 . 41)}. 41 is the character code for @samp{)}. Syntax flags are encoded in higher order bits, starting 16 bits from the least significant bit. This table gives the power of two which @@ -990,33 +999,35 @@ corresponds to each syntax flag. @end multitable @defun string-to-syntax @var{desc} -Given a syntax descriptor @var{desc}, this function returns the -corresponding internal form, a cons cell @code{(@var{syntax-code} -. @var{matching-char})}. +Given a syntax descriptor @var{desc} (a string), this function returns +the corresponding raw syntax descriptor. @end defun @defun syntax-after pos -This function returns the syntax code of the character in the buffer -after position @var{pos}, taking account of syntax properties as well -as the syntax table. If @var{pos} is outside the buffer's accessible -portion (@pxref{Narrowing, accessible portion}), this function returns -@code{nil}. +This function returns the raw syntax descriptor for the character in +the buffer after position @var{pos}, taking account of syntax +properties as well as the syntax table. If @var{pos} is outside the +buffer's accessible portion (@pxref{Narrowing, accessible portion}), +the return value is @code{nil}. @end defun @defun syntax-class syntax -This function returns the syntax class of the syntax code -@var{syntax}. (It masks off the high 16 bits that hold the flags -encoded in the syntax descriptor.) If @var{syntax} is @code{nil}, it -returns @code{nil}; this is so evaluating the expression +This function returns the syntax code for the raw syntax descriptor +@var{syntax}. More precisely, it takes the raw syntax descriptor's +@var{syntax-code} component, masks off the high 16 bits which record +the syntax flags, and returns the resulting integer. + +If @var{syntax} is @code{nil}, the return value is returns @code{nil}. +This is so that the expression @example (syntax-class (syntax-after pos)) @end example @noindent -where @code{pos} is outside the buffer's accessible portion, will -yield @code{nil} without throwing errors or producing wrong syntax -class codes. +evaluates to @code{nil} if @code{pos} is outside the buffer's +accessible portion, without throwing errors or returning an incorrect +code. @end defun @node Categories diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e10fe9166e7..4d6210a16b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-08 Chong Yidong + + * subr.el (syntax-after, syntax-class): Doc fix. + 2012-09-08 Martin Rudalics * window.el (display-buffer-in-previous-window): New buffer diff --git a/lisp/subr.el b/lisp/subr.el index a3e0897e9fe..4f273a92a62 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3737,7 +3737,7 @@ from `standard-syntax-table' otherwise." table)) (defun syntax-after (pos) - "Return the raw syntax of the char after POS. + "Return the raw syntax descriptor for the char after POS. If POS is outside the buffer's accessible portion, return nil." (unless (or (< pos (point-min)) (>= pos (point-max))) (let ((st (if parse-sexp-lookup-properties @@ -3746,7 +3746,12 @@ If POS is outside the buffer's accessible portion, return nil." (aref (or st (syntax-table)) (char-after pos)))))) (defun syntax-class (syntax) - "Return the syntax class part of the syntax descriptor SYNTAX. + "Return the code for the syntax class described by SYNTAX. + +SYNTAX should be a raw syntax descriptor; the return value is a +integer which encodes the corresponding syntax class. See Info +node `(elisp)Syntax Table Internals' for a list of codes. + If SYNTAX is nil, return nil." (and syntax (logand (car syntax) 65535))) diff --git a/src/ChangeLog b/src/ChangeLog index 40647d79589..ec6e39ad0b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-08 Chong Yidong + + * syntax.c (Fstring_to_syntax): Doc fix. + 2012-09-08 Jan Djärv * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe diff --git a/src/syntax.c b/src/syntax.c index f995b8f2cac..fdd9353bb87 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -921,11 +921,11 @@ DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, } DEFUN ("string-to-syntax", Fstring_to_syntax, Sstring_to_syntax, 1, 1, 0, - doc: /* Convert a syntax specification STRING into syntax cell form. -STRING should be a string as it is allowed as argument of -`modify-syntax-entry'. Value is the equivalent cons cell -\(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' -text property. */) + doc: /* Convert a syntax descriptor STRING into a raw syntax descriptor. +STRING should be a string of the form allowed as argument of +`modify-syntax-entry'. The return value is a raw syntax descriptor: a +cons cell \(CODE . MATCHING-CHAR) which can be used, for example, as +the value of a `syntax-table' text property. */) (Lisp_Object string) { register const unsigned char *p; From 1715f2dbca4b516432569892b708e9c1c0e9a2dd Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Sat, 8 Sep 2012 22:30:09 +0800 Subject: [PATCH 086/216] * subr.el (add-to-history): Fix delete usage. Fixes: debbugs:12314 --- lisp/ChangeLog | 4 ++++ lisp/subr.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4d6210a16b9..b45d2fd8235 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-08 Drew Adams + + * subr.el (add-to-history): Fix delete usage (Bug#12314). + 2012-09-08 Chong Yidong * subr.el (syntax-after, syntax-class): Doc fix. diff --git a/lisp/subr.el b/lisp/subr.el index 4f273a92a62..21dd270caef 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1548,7 +1548,7 @@ if it is empty or a duplicate." (or keep-all (not (equal (car history) newelt)))) (if history-delete-duplicates - (delete newelt history)) + (setq history (delete newelt history))) (setq history (cons newelt history)) (when (integerp maxelt) (if (= 0 maxelt) From 35d98877f0c972d08e476ac72336ef4107a76356 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 8 Sep 2012 22:48:26 +0800 Subject: [PATCH 087/216] Don't bind M-= in Dired. * lisp/dired.el (dired-mode-map): Don't bind M-=. * lisp/dired-aux.el (dired-diff): Use backup file as default. --- etc/NEWS | 7 +++++++ lisp/ChangeLog | 6 ++++++ lisp/dired-aux.el | 53 ++++++++++++++++++----------------------------- lisp/dired.el | 10 ++++----- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 7a9c9a21c97..5beb47b7b00 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -423,6 +423,13 @@ channel keys found, if any. if the command ends in `;' (when operating on multiple files). Otherwise, it executes the command on each file in parallel. +*** The minibuffer default for `=' (`dired-diff) has changed. +It is now the backup file for the file at point, if one exists, rather +than the file at the mark. + +*** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers. +The global binding for `M-=', `count-words-region' is in effect. + ** Shell *** New option `async-shell-command-buffer' specifies what buffer to use diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b45d2fd8235..f9a0d457003 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-08 Chong Yidong + + * dired.el (dired-mode-map): Don't bind M-=. + + * dired-aux.el (dired-diff): Use backup file as default. + 2012-09-08 Drew Adams * subr.el (add-to-history): Fix delete usage (Bug#12314). diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 6186f762e0a..1f8e8068de3 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -54,43 +54,30 @@ into this list; they also should call `dired-log' to log the errors.") ;;;###autoload (defun dired-diff (file &optional switches) "Compare file at point with file FILE using `diff'. -FILE defaults to the file at the mark. (That's the mark set by -\\[set-mark-command], not by Dired's \\[dired-mark] command.) -The prompted-for FILE is the first file given to `diff'. +If called interactively, prompt for FILE; if the file at point +has a backup file, use that as the default. + +FILE is the first file given to `diff'. With prefix arg, prompt for second argument SWITCHES, which is the string of command switches for `diff'." (interactive (let* ((current (dired-get-filename t)) - ;; Get the file at the mark. - (file-at-mark (if (mark t) - (save-excursion (goto-char (mark t)) - (dired-get-filename t t)))) - ;; Use it as default if it's not the same as the current file, - ;; and the target dir is the current dir or the mark is active. - (default (if (and (not (equal file-at-mark current)) - (or (equal (dired-dwim-target-directory) - (dired-current-directory)) - mark-active)) - file-at-mark)) - (target-dir (if default - (dired-current-directory) - (dired-dwim-target-directory))) - (defaults (dired-dwim-target-defaults (list current) target-dir))) - (require 'diff) - (list - (minibuffer-with-setup-hook - (lambda () - (set (make-local-variable 'minibuffer-default-add-function) nil) - (setq minibuffer-default defaults)) - (read-file-name - (format "Diff %s with%s: " current - (if default (format " (default %s)" default) "")) - target-dir default t)) - (if current-prefix-arg - (read-string "Options for diff: " - (if (stringp diff-switches) - diff-switches - (mapconcat 'identity diff-switches " "))))))) + (oldf (file-newest-backup current)) + (dir (if oldf (file-name-directory oldf)))) + (list (read-file-name + (format "Diff %s with%s: " + (file-name-nondirectory current) + (if oldf + (concat " (default " + (file-name-nondirectory oldf) + ")") + "")) + dir oldf t) + (if current-prefix-arg + (read-string "Options for diff: " + (if (stringp diff-switches) + diff-switches + (mapconcat 'identity diff-switches " "))))))) (let ((current (dired-get-filename t))) (when (or (equal (expand-file-name file) (expand-file-name current)) diff --git a/lisp/dired.el b/lisp/dired.el index cd27b6b6404..f4ae027181a 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1410,7 +1410,6 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map "&" 'dired-do-async-shell-command) ;; Comparison commands (define-key map "=" 'dired-diff) - (define-key map "\M-=" 'dired-backup-diff) ;; Tree Dired commands (define-key map "\M-\C-?" 'dired-unmark-all-files) (define-key map "\M-\C-d" 'dired-tree-down) @@ -3745,14 +3744,15 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "9499f79f5853da0aa93d26465c7bf3a1") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "4b260eda371d319a6c8e8e5ec917e287") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ Compare file at point with file FILE using `diff'. -FILE defaults to the file at the mark. (That's the mark set by -\\[set-mark-command], not by Dired's \\[dired-mark] command.) -The prompted-for FILE is the first file given to `diff'. +If called interactively, prompt for FILE; if the file at point +has a backup file, use that as the default. + +FILE is the first file given to `diff'. With prefix arg, prompt for second argument SWITCHES, which is the string of command switches for `diff'. From 616c6c36aa2571f9f9951401909ba9e748eea578 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 8 Sep 2012 19:13:14 +0400 Subject: [PATCH 088/216] * lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only fail when reached LIMIT. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/ruby-mode.el | 4 +++- test/automated/ruby-mode-tests.el | 8 +++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9a0d457003..10458236c30 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-08 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-match-expression-expansion): Only + fail when reached LIMIT. + 2012-09-08 Chong Yidong * dired.el (dired-mode-map): Don't bind M-=. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index ef1daa5e936..0636212a23f 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1549,7 +1549,9 @@ See `font-lock-syntax-table'.") (defun ruby-match-expression-expansion (limit) (when (re-search-forward "[^\\]\\(\\\\\\\\\\)*\\(#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)\\)" limit 'move) - (ruby-in-ppss-context-p 'string))) + (or (ruby-in-ppss-context-p 'string) + (and (< (point) limit) + (ruby-match-expression-expansion limit))))) ;;;###autoload (define-derived-mode ruby-mode prog-mode "Ruby" diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 1adc4acdfa0..515353bc2d0 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -237,10 +237,12 @@ VALUES-PLIST is a list with alternating index and value elements." 'font-lock-variable-name-face) (ruby-assert-face "\"This is \\#{no interpolation} despite the #\"" 15 'font-lock-string-face) - (ruby-assert-face "#@comment, not ruby code" 3 'font-lock-comment-face) - (ruby-assert-state "#@comment, not ruby code" 4 t) + (ruby-assert-face "\n#@comment, not ruby code" 5 'font-lock-comment-face) + (ruby-assert-state "\n#@comment, not ruby code" 4 t) (ruby-assert-face "# A comment cannot have #{an interpolation} in it" - 30 'font-lock-comment-face)) + 30 'font-lock-comment-face) + (ruby-assert-face "# #{comment}\n \"#{interpolation}\"" 16 + 'font-lock-variable-name-face)) (provide 'ruby-mode-tests) From e6aca219893bfab1ae669f5172738555ac56d3b9 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 8 Sep 2012 19:34:41 +0400 Subject: [PATCH 089/216] * progmodes/ruby-mode.el (ruby-match-expression-expansion): Shorten previous change. --- lisp/progmodes/ruby-mode.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 0636212a23f..947c12560a1 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1550,8 +1550,7 @@ See `font-lock-syntax-table'.") (defun ruby-match-expression-expansion (limit) (when (re-search-forward "[^\\]\\(\\\\\\\\\\)*\\(#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)\\)" limit 'move) (or (ruby-in-ppss-context-p 'string) - (and (< (point) limit) - (ruby-match-expression-expansion limit))))) + (ruby-match-expression-expansion limit)))) ;;;###autoload (define-derived-mode ruby-mode prog-mode "Ruby" From 0b3b1d23224845e760ad7ef6e316cbac05f54093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 8 Sep 2012 19:22:15 +0200 Subject: [PATCH 090/216] * nsterm.m (updateFrameSize): Call setFrame: on the view when size changes. Fixes: debbugs:12088 --- src/ChangeLog | 5 +++++ src/nsterm.m | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ec6e39ad0b5..dd4719e25c6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-08 Jan Djärv + + * nsterm.m (updateFrameSize): Call setFrame: on the view when size + changes (Bug#12088). + 2012-09-08 Chong Yidong * syntax.c (Fstring_to_syntax): Doc fix. diff --git a/src/nsterm.m b/src/nsterm.m index 73372238cf4..583db79b904 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5374,11 +5374,13 @@ not_in_argv (NSString *arg) if (oldr != rows || oldc != cols || neww != oldw || newh != oldh) { + NSView *view = FRAME_NS_VIEW (emacsframe); FRAME_PIXEL_WIDTH (emacsframe) = neww; FRAME_PIXEL_HEIGHT (emacsframe) = newh; change_frame_size (emacsframe, rows, cols, 0, 0, 1); SET_FRAME_GARBAGED (emacsframe); cancel_mouse_face (emacsframe); + [view setFrame: NSMakeRect (0, 0, neww, newh)]; } } From eabf0404414f2828c08d1d5d8fab4740670e7541 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 8 Sep 2012 12:57:32 -0700 Subject: [PATCH 091/216] * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)). This produces more-accurate results. --- src/ChangeLog | 5 +++++ src/floatfns.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dd4719e25c6..0316e7708af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-08 Paul Eggert + + * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)). + This produces more-accurate results. + 2012-09-08 Jan Djärv * nsterm.m (updateFrameSize): Call setFrame: on the view when size diff --git a/src/floatfns.c b/src/floatfns.c index 3a95d828c0c..dfe063b152f 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -265,12 +265,12 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0, (register Lisp_Object arg) { double d = extract_float (arg); - double c = cos (d); #ifdef FLOAT_CHECK_DOMAIN + double c = cos (d); if (c == 0.0) domain_error ("tan", arg); #endif - IN_FLOAT (d = sin (d) / c, "tan", arg); + IN_FLOAT (d = tan (d), "tan", arg); return make_float (d); } From ace2989a842a84483702cbef6284fe7a8300e18a Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 8 Sep 2012 20:00:13 +0000 Subject: [PATCH 092/216] AWK Mode: make auto-newline work when there's "==" in the pattern. cc-cmds.el (c-point-syntax): Handle virtual semicolons correctly. cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test more rigorously for "=" token. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/cc-cmds.el | 17 ++++++++++------- lisp/progmodes/cc-engine.el | 4 ++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10458236c30..ea69865c79f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-09-08 Alan Mackenzie + + AWK Mode: make auto-newline work when there's "==" in the pattern. + * progmodes/cc-cmds.el (c-point-syntax): Handle virtual semicolons + correctly. + * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test + more rigorously for "=" token. + 2012-09-08 Dmitry Gutov * progmodes/ruby-mode.el (ruby-match-expression-expansion): Only diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 7cd0a0b0ae2..eec6873dc19 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -493,13 +493,16 @@ inside a literal or a macro, nothing special happens." (insert-char ?\n 1) ;; In AWK (etc.) or in a macro, make sure this CR hasn't changed ;; the syntax. (There might already be an escaped NL there.) - (when (or (c-at-vsemi-p (1- (point))) - (let ((pt (point))) - (save-excursion - (backward-char) - (and (c-beginning-of-macro) - (progn (c-end-of-macro) - (< (point) pt)))))) + (when (or + (save-excursion + (c-skip-ws-backward (c-point 'bopl)) + (c-at-vsemi-p)) + (let ((pt (point))) + (save-excursion + (backward-char) + (and (c-beginning-of-macro) + (progn (c-end-of-macro) + (< (point) pt)))))) (backward-char) (insert-char ?\\ 1) (forward-char)) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 142ec4cdd66..9188ab2fbfd 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -9579,12 +9579,12 @@ comment at the start of cc-engine.el for more info." (setq tmpsymbol nil) (while (and (> (point) placeholder) (zerop (c-backward-token-2 1 t)) - (/= (char-after) ?=)) + (not (looking-at "=\\([^=]\\|$\\)"))) (and c-opt-inexpr-brace-list-key (not tmpsymbol) (looking-at c-opt-inexpr-brace-list-key) (setq tmpsymbol 'topmost-intro-cont))) - (eq (char-after) ?=)) + (looking-at "=\\([^=]\\|$\\)")) (looking-at c-brace-list-key)) (save-excursion (while (and (< (point) indent-point) From 0979429b332b515b149453277dd7867c76fed51e Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Sat, 8 Sep 2012 16:09:06 -0400 Subject: [PATCH 093/216] * lisp/register.el (increment-register): Route it to `append-to-register', if register contains text so that `C-x r +' can now be used for appending to a text register. (register): New group. (register-separator): New user option. (append-to-register, prepend-to-register): Add separator based on `register-separator. * doc/emacs/regs.texi (Text Registers): `C-x r +' can now be used instead of M-x append-to-register. New option `register-separator'. (Number Registers): Mention that `C-x r +' is polymorphic. Fixes: debbugs:12217 --- doc/emacs/ChangeLog | 12 ++++++++--- doc/emacs/regs.texi | 26 +++++++++++++++++++++-- etc/NEWS | 7 +++++++ lisp/ChangeLog | 18 ++++++++++++---- lisp/register.el | 51 +++++++++++++++++++++++++++++++++++---------- 5 files changed, 94 insertions(+), 20 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 49c472ca793..508dbbf8021 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2012-09-08 Jambunathan K + + * regs.texi (Text Registers): `C-x r +' can now be used instead of + M-x append-to-register. New option `register-separator'. + (Number Registers): Mention that `C-x r +' is polymorphic. + 2012-09-07 Chong Yidong * windows.texi (Window Choice): Don't mention obsolete @@ -10,9 +16,9 @@ 2012-08-24 Michael Albinus - * cmdargs.texi (General Variables): Setting - $DBUS_SESSION_BUS_ADDRESS to a dummy value suppresses connections - to the D-Bus session bus. (Bug#12112) + * cmdargs.texi (General Variables): + Setting $DBUS_SESSION_BUS_ADDRESS to a dummy value suppresses + connections to the D-Bus session bus. (Bug#12112) 2012-08-14 Eli Zaretskii diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index 72fd6458dde..0a83c0bdddd 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -92,6 +92,13 @@ Copy region into register @var{r} (@code{copy-to-register}). Insert text from register @var{r} (@code{insert-register}). @item M-x append-to-register @key{RET} @var{r} Append region to text in register @var{r}. + +@kindex C-x r + +When register @var{r} contains text, you can use @kbd{C-x r +} +(@code{increment-register}) to append to that register. Note that +command @kbd{C-x r +} behaves differently if @var{r} contains a +number. @xref{Number Registers}. + @item M-x prepend-to-register @key{RET} @var{r} Prepend region to text in register @var{r}. @end table @@ -116,6 +123,19 @@ region after appending it to the register. The command the region text to the text in the register instead of @emph{appending} it. +@vindex register-separator + When you are collecting text using @code{append-to-register} and +@code{prepend-to-register}, you may want to separate individual +collected pieces using a separator. In that case, configure a +@code{register-separator} and store the separator text in to that +register. For example, to get double newlines as text separator +during the collection process, you can use the following setting. + +@example +(setq register-separator ?+) +(set-register register-separator "\n\n") +@end example + @kindex C-x r i @findex insert-register @kbd{C-x r i @var{r}} inserts in the buffer the text from register @@ -191,8 +211,10 @@ Store @var{number} into register @var{r} (@code{number-to-register}). @item C-u @var{number} C-x r + @var{r} @kindex C-x r + @findex increment-register -Increment the number in register @var{r} by @var{number} -(@code{increment-register}). +If @var{r} contains a number, increment the number in that register by +@var{number}. Note that command @kbd{C-x r +} +(@code{increment-register}) behaves differently if @var{r} contains +text. @xref{Text Registers}. @item C-x r i @var{r} Insert the number from register @var{r} into the buffer. @end table diff --git a/etc/NEWS b/etc/NEWS index 5beb47b7b00..742744fc9dd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -182,6 +182,13 @@ just removing them, as done by `yank-excluded-properties'. delete-trailing-whitespace command should delete trailing lines at the end of the buffer. It defaults to t. ++++ +** `C-x r +' is now overloaded to invoke `append-to-register. ++++ +** New option `separator-register'. Separator register stores +separator text for use with M-x append-to-register and M-x +prepend-to-register. See manual for details. + ** Search changes *** Global `M-s _' starts a symbol (identifier) incremental search, diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea69865c79f..7104f68e816 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,15 +1,25 @@ +2012-09-08 Jambunathan K + + * register.el (register): New group. + (register-separator): New user option. + (increment-register): Route it to `append-to-register', if + register contains text. Implication is that `C-x r +' can now be + used for appending to a text register (bug#12217). + (append-to-register, prepend-to-register): Add separator based on + `register-separator. + 2012-09-08 Alan Mackenzie AWK Mode: make auto-newline work when there's "==" in the pattern. * progmodes/cc-cmds.el (c-point-syntax): Handle virtual semicolons correctly. - * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test - more rigorously for "=" token. + * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5A.3): + Test more rigorously for "=" token. 2012-09-08 Dmitry Gutov - * progmodes/ruby-mode.el (ruby-match-expression-expansion): Only - fail when reached LIMIT. + * progmodes/ruby-mode.el (ruby-match-expression-expansion): + Only fail when reached LIMIT. 2012-09-08 Chong Yidong diff --git a/lisp/register.el b/lisp/register.el index 2816c9831de..622a3872e54 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -76,6 +76,22 @@ A list of the form (WINDOW-CONFIGURATION POSITION) A list of the form (FRAME-CONFIGURATION POSITION) represents a saved frame configuration plus a saved value of point.") +(defgroup register nil + "Register commands." + :group 'convenience + :version "24.2.50") + +(defcustom separator-register nil + "Use contents of this register to separate collected text. + +When collecting text with +`append-to-register' (resp. `prepend-to-register') contents of +this register is added to the beginning (resp. end) of the marked +text." + :group 'register + :type '(choice (const :tag "None" nil) + (character :tag "Use register" :value ?+))) + (defun get-register (register) "Return contents of Emacs register named REGISTER, or nil if none." (cdr (assq register register-alist))) @@ -192,13 +208,24 @@ Interactively, NUMBER is the prefix arg (none means nil)." (string-to-number (match-string 0))) 0)))) -(defun increment-register (number register) - "Add NUMBER to the contents of register REGISTER. -Interactively, NUMBER is the prefix arg." - (interactive "p\ncIncrement register: ") - (or (numberp (get-register register)) - (error "Register does not contain a number")) - (set-register register (+ number (get-register register)))) +(defun increment-register (prefix register) + "Augment contents of REGISTER. +Interactively, PREFIX is in raw form. + +If REGISTER contains a number, add `prefix-numeric-value' of +PREFIX to it. + +If REGISTER is empty or if it contains text, call +`append-to-register' with `delete-flag' set to PREFIX." + (interactive "P\ncIncrement register: ") + (let ((register-val (get-register register))) + (cond + ((numberp register-val) + (let ((number (prefix-numeric-value prefix))) + (set-register register (+ number register-val)))) + ((or (not register-val) (stringp register-val)) + (append-to-register register (region-beginning) (region-end) prefix)) + (t (error "Register does not contain a number or text"))))) (defun view-register (register) "Display what is contained in register named REGISTER. @@ -349,10 +376,11 @@ Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. START and END are buffer positions indicating what to append." (interactive "cAppend to register: \nr\nP") (let ((reg (get-register register)) - (text (filter-buffer-substring start end))) + (text (filter-buffer-substring start end)) + (separator (and separator-register (get-register separator-register)))) (set-register register (cond ((not reg) text) - ((stringp reg) (concat reg text)) + ((stringp reg) (concat reg separator text)) (t (error "Register does not contain text"))))) (cond (delete-flag (delete-region start end)) @@ -366,10 +394,11 @@ Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. START and END are buffer positions indicating what to prepend." (interactive "cPrepend to register: \nr\nP") (let ((reg (get-register register)) - (text (filter-buffer-substring start end))) + (text (filter-buffer-substring start end)) + (separator (and separator-register (get-register separator-register)))) (set-register register (cond ((not reg) text) - ((stringp reg) (concat text reg)) + ((stringp reg) (concat text separator reg)) (t (error "Register does not contain text"))))) (cond (delete-flag (delete-region start end)) From 9d7f18633a3f36de96bb42d856355c5ce12f2b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 8 Sep 2012 22:16:39 +0200 Subject: [PATCH 094/216] * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back compositeToPoint for OSX < 10.6. Fixes: debbugs:12390 --- src/ChangeLog | 5 +++++ src/nsterm.m | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0316e7708af..56b96fda519 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-08 Jan Djärv + + * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back + compositeToPoint for OSX < 10.6 (Bug#12390). + 2012-09-08 Paul Eggert * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)). diff --git a/src/nsterm.m b/src/nsterm.m index 583db79b904..01303829d2f 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -650,7 +650,7 @@ ns_update_window_begin (struct window *w) struct frame *f = XFRAME (WINDOW_FRAME (w)); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); NSTRACE (ns_update_window_begin); - + fprintf(stderr, "%s\n", __func__); updated_window = w; set_output_cursor (&w->cursor); @@ -683,6 +683,7 @@ ns_update_window_end (struct window *w, int cursor_on_p, { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); + fprintf(stderr, "%s\n", __func__); /* note: this fn is nearly identical in all terms */ if (!w->pseudo_window_p) { @@ -1266,6 +1267,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) wr.origin.y += FRAME_PIXEL_HEIGHT (f) - pixelheight; [view setRows: rows andColumns: cols]; + fprintf(stderr, "%s %d %d\n", __func__, cols, (int)wr.origin.x); [window setFrame: wr display: YES]; /*fprintf (stderr, "\tx_set_window_size %d, %d\t%d, %d\n", cols, rows, pixelwidth, pixelheight); */ @@ -1283,6 +1285,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) - NS_SCROLL_BAR_WIDTH (f), 0) : NSMakePoint (0, 0); [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; + fprintf(stderr, "%s origin %d\n", __func__, (int)origin.x); [view setBoundsOrigin: origin]; } @@ -2297,12 +2300,20 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, [ns_lookup_indexed_color(face->background, f) set]; NSRectFill (r); [img setXBMColor: ns_lookup_indexed_color(face->foreground, f)]; +#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 [img drawInRect: r fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil]; +#else + { + NSPoint pt = r.origin; + pt.y += p->h; + [img compositeToPoint: pt operation: NSCompositeSourceOver]; + } +#endif } ns_unfocus (f); } @@ -2961,12 +2972,19 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) /* Draw the image.. do we need to draw placeholder if img ==nil? */ if (img != nil) + { +#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 [img drawInRect: br - fromRect: NSZeroRect + fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES hints: nil]; +#else + [img compositeToPoint: NSMakePoint (x, y + s->slice.height) + operation: NSCompositeSourceOver]; +#endif + } if (s->hl == DRAW_CURSOR) { @@ -5380,6 +5398,7 @@ not_in_argv (NSString *arg) change_frame_size (emacsframe, rows, cols, 0, 0, 1); SET_FRAME_GARBAGED (emacsframe); cancel_mouse_face (emacsframe); + fprintf(stderr, "%s %d %d\n", __func__, cols, neww); [view setFrame: NSMakeRect (0, 0, neww, newh)]; } } @@ -6196,8 +6215,20 @@ not_in_argv (NSString *arg) NSTRACE (constrainFrameRect); if (nr_screens == 1) - return [super constrainFrameRect:frameRect toScreen:screen]; - + { + NSRect r = [super constrainFrameRect:frameRect toScreen:screen]; + fprintf(stderr, "%s %d/%d %d/%d => %d/%d %d/%d\n", __func__, + (int)frameRect.origin.x, + (int)frameRect.origin.y, + (int)frameRect.size.width, + (int)frameRect.size.height, + (int)r.origin.x, + (int)r.origin.y, + (int)r.size.width, + (int)r.size.height); + return r; + } + if (f->output_data.ns->dont_constrain || ns_menu_bar_should_be_hidden ()) return frameRect; From c3268831411fd68ce4f6f84ecda5eda2814a59a8 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 9 Sep 2012 03:32:25 +0400 Subject: [PATCH 095/216] * lisp/progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block, not just expect to be at its beginning. Adjust callees. Succeed when do-end block has no space before the pipe character. (ruby-brace-to-do-end): When the original block is one-liner, convert to multiline. Reindent the result. * test/automated/ruby-mode-tests.el: (ruby-toggle-block-to-multiline): New test. (ruby-should-indent-buffer, ruby-toggle-block-to-do-end) (ruby-toggle-block-to-brace): Use buffer-string. --- lisp/ChangeLog | 8 +++ lisp/progmodes/ruby-mode.el | 91 +++++++++++++++++++------------ test/ChangeLog | 7 +++ test/automated/ruby-mode-tests.el | 25 +++++---- 4 files changed, 85 insertions(+), 46 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7104f68e816..29fa06c10e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-09-08 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block, + not just expect to be at its beginning. Adjust callees. + Succeed when do-end block has no space before the pipe character. + (ruby-brace-to-do-end): When the original block is one-liner, + convert to multiline. Reindent the result. + 2012-09-08 Jambunathan K * register.el (register): New group. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 947c12560a1..77ec8084ea2 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1107,46 +1107,65 @@ See `add-log-current-defun-function'." (if mlist (concat mlist mname) mname) mlist))))) -(defun ruby-brace-to-do-end () - (when (looking-at "{") - (let ((orig (point)) (end (progn (ruby-forward-sexp) (point)))) - (when (eq (char-before) ?\}) - (delete-char -1) - (if (eq (char-syntax (char-before)) ?w) - (insert " ")) - (insert "end") - (if (eq (char-syntax (char-after)) ?w) - (insert " ")) - (goto-char orig) - (delete-char 1) - (if (eq (char-syntax (char-before)) ?w) - (insert " ")) - (insert "do") - (when (looking-at "\\sw\\||") - (insert " ") - (backward-char)) - t)))) +(defun ruby-brace-to-do-end (orig end) + (let (beg-marker end-marker) + (goto-char end) + (when (eq (char-before) ?\}) + (delete-char -1) + (skip-chars-backward " \t") + (when (not (bolp)) + (insert "\n")) + (insert "end") + (setq end-marker (point-marker)) + (when (and (not (eobp)) (eq (char-syntax (char-after)) ?w)) + (insert " ")) + (goto-char orig) + (delete-char 1) + (when (eq (char-syntax (char-before)) ?w) + (insert " ")) + (insert "do") + (setq beg-marker (point-marker)) + (when (looking-at "\\(\\s \\)*|") + (unless (match-beginning 1) + (insert " ")) + (goto-char (1+ (match-end 0))) + (search-forward "|")) + (unless (looking-at "\\s *$") + (insert "\n")) + (indent-region beg-marker end-marker) + (goto-char beg-marker) + t))) -(defun ruby-do-end-to-brace () - (when (and (or (bolp) - (not (memq (char-syntax (char-before)) '(?w ?_)))) - (looking-at "\\ end start))) + (if (match-beginning 1) + (ruby-brace-to-do-end beg end) + (ruby-do-end-to-brace beg end))) + (goto-char start)))) (declare-function ruby-syntax-propertize-heredoc "ruby-mode" (limit)) (declare-function ruby-syntax-enclosing-percent-literal "ruby-mode" (limit)) diff --git a/test/ChangeLog b/test/ChangeLog index 541937ec4e7..a7e22aa9ae1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2012-09-08 Dmitry Gutov + + * automated/ruby-mode-tests.el: + (ruby-toggle-block-to-multiline): New test. + (ruby-should-indent-buffer, ruby-toggle-block-to-do-end) + (ruby-toggle-block-to-brace): Use buffer-string. + 2012-09-07 Dmitry Gutov * automated/ruby-mode-tests.el: New tests (Bug#11613). diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 515353bc2d0..e711b52fb9c 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -40,8 +40,7 @@ The whitespace before and including \"|\" on each line is removed." (insert (fix-indent content)) (ruby-mode) (indent-region (point-min) (point-max)) - (should (string= (fix-indent expected) (buffer-substring-no-properties - (point-min) (point-max))))))) + (should (string= (fix-indent expected) (buffer-string)))))) (defun ruby-assert-state (content &rest values-plist) "Assert syntax state values at the end of CONTENT. @@ -213,21 +212,27 @@ VALUES-PLIST is a list with alternating index and value elements." (ert-deftest ruby-toggle-block-to-do-end () (with-temp-buffer - (insert "foo {|b|\n}\n") + (insert "foo {|b|\n}") (ruby-mode) - (search-backward "{") + (beginning-of-line) (ruby-toggle-block) - (should (string= "foo do |b|\nend\n" (buffer-substring-no-properties - (point-min) (point-max)))))) + (should (string= "foo do |b|\nend" (buffer-string))))) (ert-deftest ruby-toggle-block-to-brace () (with-temp-buffer - (insert "foo do |b|\nend\n") + (insert "foo do |b|\nend") (ruby-mode) - (search-backward "do") + (beginning-of-line) (ruby-toggle-block) - (should (string= "foo {|b|\n}\n" (buffer-substring-no-properties - (point-min) (point-max)))))) + (should (string= "foo {|b|\n}" (buffer-string))))) + +(ert-deftest ruby-toggle-block-to-multiline () + (with-temp-buffer + (insert "foo {|b| b + 1}") + (ruby-mode) + (beginning-of-line) + (ruby-toggle-block) + (should (string= "foo do |b|\n b + 1\nend" (buffer-string))))) (ert-deftest ruby-recognize-symbols-starting-with-at-character () (ruby-assert-face ":@abc" 3 'font-lock-constant-face)) From a8b7cd8d8b81e8db907bbc17c1121e94624ca70c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 9 Sep 2012 13:50:43 +0800 Subject: [PATCH 096/216] Use quit-window for quitting the *Local Variables* buffer. * lisp/files.el (hack-local-variables-confirm): Use quit-window to kill the *Local Variables* buffer. --- lisp/ChangeLog | 5 ++++ lisp/files.el | 72 +++++++++++++++++++++++++++----------------------- 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29fa06c10e5..d7f730556ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-09 Chong Yidong + + * files.el (hack-local-variables-confirm): Use quit-window to kill + the *Local Variables* buffer. + 2012-09-08 Dmitry Gutov * progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block, diff --git a/lisp/files.el b/lisp/files.el index fb4549f0399..4acdb542089 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2951,20 +2951,16 @@ UNSAFE-VARS is the list of those that aren't marked as safe or risky. RISKY-VARS is the list of those that are marked as risky. If these settings come from directory-local variables, then DIR-NAME is the name of the associated directory. Otherwise it is nil." - (if noninteractive - nil - (save-window-excursion - (let* ((name (or dir-name - (if buffer-file-name - (file-name-nondirectory buffer-file-name) - (concat "buffer " (buffer-name))))) - (offer-save (and (eq enable-local-variables t) - unsafe-vars)) - (exit-chars - (if offer-save '(?! ?y ?n ?\s ?\C-g) '(?y ?n ?\s ?\C-g))) - (buf (pop-to-buffer "*Local Variables*")) - prompt char) - (set (make-local-variable 'cursor-type) nil) + (unless noninteractive + (let ((name (cond (dir-name) + (buffer-file-name + (file-name-nondirectory buffer-file-name)) + ((concat "buffer " (buffer-name))))) + (offer-save (and (eq enable-local-variables t) + unsafe-vars)) + (buf (get-buffer-create "*Local Variables*"))) + ;; Set up the contents of the *Local Variables* buffer. + (with-current-buffer buf (erase-buffer) (cond (unsafe-vars @@ -2999,25 +2995,35 @@ n -- to ignore the local variables list.") (let ((print-escape-newlines t)) (prin1 (cdr elt) buf)) (insert "\n")) - (setq prompt - (format "Please type %s%s: " - (if offer-save "y, n, or !" "y or n") - (if (< (line-number-at-pos) (window-body-height)) - "" - (push ?\C-v exit-chars) - ", or C-v to scroll"))) - (goto-char (point-min)) - (while (null char) - (setq char (read-char-choice prompt exit-chars t)) - (when (eq char ?\C-v) - (condition-case nil - (scroll-up) - (error (goto-char (point-min)))) - (setq char nil))) - (kill-buffer buf) - (when (and offer-save (= char ?!) unsafe-vars) - (customize-push-and-save 'safe-local-variable-values unsafe-vars)) - (memq char '(?! ?\s ?y)))))) + (set (make-local-variable 'cursor-type) nil) + (set-buffer-modified-p nil) + (goto-char (point-min))) + + ;; Display the buffer and read a choice. + (save-window-excursion + (pop-to-buffer buf) + (let* ((exit-chars '(?y ?n ?\s ?\C-g ?\C-v)) + (prompt (format "Please type %s%s: " + (if offer-save "y, n, or !" "y or n") + (if (< (line-number-at-pos (point-max)) + (window-body-height)) + "" + (push ?\C-v exit-chars) + ", or C-v to scroll"))) + char) + (if offer-save (push ?! exit-chars)) + (while (null char) + (setq char (read-char-choice prompt exit-chars t)) + (when (eq char ?\C-v) + (condition-case nil + (scroll-up) + (error (goto-char (point-min)) + (recenter 1))) + (setq char nil))) + (when (and offer-save (= char ?!) unsafe-vars) + (customize-push-and-save 'safe-local-variable-values unsafe-vars)) + (prog1 (memq char '(?! ?\s ?y)) + (quit-window t))))))) (defun hack-local-variables-prop-line (&optional mode-only) "Return local variables specified in the -*- line. From 011474aa5af24faeceac60348315552313774b10 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 9 Sep 2012 14:43:47 +0800 Subject: [PATCH 097/216] Allow scrolling in y-or-n-p. * lisp/replace.el (query-replace-map): Bind four new symbols for requesting window scrolling. * lisp/subr.el (y-or-n-p): Handle the window-scrolling bindings in query-replace-map. * lisp/custom.el (custom-theme-load-confirm): Use y-or-n-p. * lisp/window.el (scroll-other-window-down): Make the arg optional. * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't bind scrolling keys since they are now in query-replace-map. * doc/lispref/minibuf.texi (Yes-or-No Queries): Document recentering and scrolling in y-or-n-p. Remove gratuitous example. * doc/lispref/searching.texi (Search and Replace): Document window scrolling entries in query-replace-map. Fixes: debbugs:8948 --- doc/lispref/ChangeLog | 8 +++++++ doc/lispref/minibuf.texi | 48 +++++++------------------------------- doc/lispref/searching.texi | 8 ++++++- etc/NEWS | 4 ++++ lisp/ChangeLog | 15 ++++++++++++ lisp/custom.el | 45 +++++++++++------------------------ lisp/emacs-lisp/map-ynp.el | 10 -------- lisp/replace.el | 22 +++++++++++++---- lisp/subr.el | 42 ++++++++++++++++++++++++--------- lisp/window.el | 2 +- 10 files changed, 105 insertions(+), 99 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 57ee374af49..79691bfb181 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,11 @@ +2012-09-09 Chong Yidong + + * minibuf.texi (Yes-or-No Queries): Document recentering and + scrolling in y-or-n-p. Remove gratuitous example. + + * searching.texi (Search and Replace): Document window scrolling + entries in query-replace-map. + 2012-09-08 Chong Yidong * syntax.texi (Syntax Table Internals): Define "raw syntax diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 4cf096b8663..cdc47b7c91d 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1888,46 +1888,14 @@ Echo Area}), which uses the same screen space as the minibuffer. The cursor moves to the echo area while the question is being asked. The answers and their meanings, even @samp{y} and @samp{n}, are not -hardwired. The keymap @code{query-replace-map} specifies them. -@xref{Search and Replace}. - -In the following example, the user first types @kbd{q}, which is -invalid. At the next prompt the user types @kbd{y}. - -@c Need an interactive example, because otherwise the return value -@c obscures the display of the valid answer. -@smallexample -@group -(defun ask () - (interactive) - (y-or-n-p "Do you need a lift? ")) - -;; @r{After evaluation of the preceding definition, @kbd{M-x ask}} -;; @r{causes the following prompt to appear in the echo area:} -@end group - -@group ----------- Echo area ---------- -Do you need a lift? (y or n) ----------- Echo area ---------- -@end group - -;; @r{If the user then types @kbd{q}, the following appears:} - -@group ----------- Echo area ---------- -Please answer y or n. Do you need a lift? (y or n) ----------- Echo area ---------- -@end group - -;; @r{When the user types a valid answer,} -;; @r{it is displayed after the question:} - -@group ----------- Echo area ---------- -Do you need a lift? (y or n) y ----------- Echo area ---------- -@end group +hardwired, and are specified by the keymap @code{query-replace-map} +(@pxref{Search and Replace}). In particular, if the user enters the +special responses @code{recenter}, @code{scroll-up}, +@code{scroll-down}, @code{scroll-other-window}, or +@code{scroll-other-window-down} (respectively bound to @kbd{C-l}, +@kbd{C-v}, @kbd{M-v}, @kbd{C-M-v} and @kbd{C-M-S-v} in +@code{query-replace-map}), this function performs the specified window +recentering or scrolling operation, and poses the question again. @end smallexample @noindent diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 0fa681ecb51..edd1d30e28d 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1796,7 +1796,13 @@ Delete the text being considered, then enter a recursive edit to replace it. @item recenter -Redisplay and center the window, then ask the same question again. +@itemx scroll-up +@itemx scroll-down +@itemx scroll-other-window +@itemx scroll-other-window-down +Perform the specified window scroll operation, then ask the same +question again. Only @code{y-or-n-p} and related functions use this +answer. @item quit Perform a quit right away. Only @code{y-or-n-p} and related functions diff --git a/etc/NEWS b/etc/NEWS index 742744fc9dd..dac7915767d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -78,6 +78,10 @@ been adding them there, put them somewhere else, eg site-lisp. * Changes in Emacs 24.3 +** You can now scroll the selected window in most y-or-n prompts. +Typing C-v or M-v at a prompt scrolls forward or backward +respectively, without leaving the y-or-n prompt. + ** Help changes *** `C-h f' (describe-function) can now perform autoloading. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7f730556ac..8f089af6f5c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2012-09-09 Chong Yidong + + * replace.el (query-replace-map): Bind four new symbols for + requesting window scrolling. + + * subr.el (y-or-n-p): Handle the window-scrolling bindings in + query-replace-map (Bug#8948). + + * custom.el (custom-theme-load-confirm): Use y-or-n-p. + + * emacs-lisp/map-ynp.el (map-y-or-n-p): Don't bind scrolling keys + since they are now in query-replace-map. + + * window.el (scroll-other-window-down): Make the arg optional. + 2012-09-09 Chong Yidong * files.el (hack-local-variables-confirm): Use quit-window to kill diff --git a/lisp/custom.el b/lisp/custom.el index fb166dd35f7..3eb2895888d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1223,38 +1223,19 @@ Return t if THEME was successfully loaded, nil otherwise." "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, query also about adding HASH to `custom-safe-themes'." - (if noninteractive - nil - (let ((exit-chars '(?y ?n ?\s)) - window prompt char) - (save-window-excursion - (rename-buffer "*Custom Theme*" t) - (emacs-lisp-mode) - (setq window (display-buffer (current-buffer))) - (setq prompt - (format "Loading a theme can run Lisp code. Really load?%s" - (if (and window - (< (line-number-at-pos (point-max)) - (window-body-height))) - " (y or n) " - (push ?\C-v exit-chars) - "\nType y or n, or C-v to scroll: "))) - (goto-char (point-min)) - (while (null char) - (setq char (read-char-choice prompt exit-chars)) - (when (eq char ?\C-v) - (if window - (with-selected-window window - (condition-case nil - (scroll-up) - (error (goto-char (point-min)))))) - (setq char nil))) - (when (memq char '(?\s ?y)) - ;; Offer to save to `custom-safe-themes'. - (and (or custom-file user-init-file) - (y-or-n-p "Treat this theme as safe in future sessions? ") - (customize-push-and-save 'custom-safe-themes (list hash))) - t))))) + (unless noninteractive + (save-window-excursion + (rename-buffer "*Custom Theme*" t) + (emacs-lisp-mode) + (setq window (pop-to-buffer (current-buffer))) + (goto-char (point-min)) + (prog1 (when (y-or-n-p "Loading a theme can run Lisp code. Really load? ") + ;; Offer to save to `custom-safe-themes'. + (and (or custom-file user-init-file) + (y-or-n-p "Treat this theme as safe in future sessions? ") + (customize-push-and-save 'custom-safe-themes (list hash))) + t) + (quit-window))))) (defun custom-theme-name-valid-p (name) "Return t if NAME is a valid name for a Custom theme, nil otherwise. diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index e7806440bf3..289751f4944 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -123,16 +123,6 @@ Returns the number of actions taken." map (let ((map (make-sparse-keymap))) (set-keymap-parent map query-replace-map) - (define-key map [?\C-\M-v] 'scroll-other-window) - (define-key map [M-next] 'scroll-other-window) - (define-key map [?\C-\M-\S-v] 'scroll-other-window-down) - (define-key map [M-prior] 'scroll-other-window-down) - ;; The above are rather inconvenient, so maybe we should - ;; provide the non-other keys for the other-scroll as well. - ;; (define-key map [?\C-v] 'scroll-other-window) - ;; (define-key map [next] 'scroll-other-window) - ;; (define-key map [?\M-v] 'scroll-other-window-down) - ;; (define-key map [prior] 'scroll-other-window-down) (dolist (elt action-alist) (define-key map (vector (car elt)) (vector (nth 1 elt)))) map))) diff --git a/lisp/replace.el b/lisp/replace.el index 194805a8f3e..b30b671122e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1617,14 +1617,28 @@ E to edit the replacement string" (define-key map "?" 'help) (define-key map "\C-g" 'quit) (define-key map "\C-]" 'quit) - (define-key map "\e" 'exit-prefix) + (define-key map "\C-v" 'scroll-up) + (define-key map "\M-v" 'scroll-down) + (define-key map [next] 'scroll-up) + (define-key map [prior] 'scroll-down) + (define-key map [?\C-\M-v] 'scroll-other-window) + (define-key map [M-next] 'scroll-other-window) + (define-key map [?\C-\M-\S-v] 'scroll-other-window-down) + (define-key map [M-prior] 'scroll-other-window-down) + ;; Binding ESC would prohibit the M-v binding. Instead, callers + ;; should check for ESC specially. + ;; (define-key map "\e" 'exit-prefix) (define-key map [escape] 'exit-prefix) map) - "Keymap that defines the responses to questions in `query-replace'. + "Keymap of responses to questions posed by commands like `query-replace'. The \"bindings\" in this map are not commands; they are answers. The valid answers include `act', `skip', `act-and-show', -`exit', `act-and-exit', `edit', `edit-replacement', `delete-and-edit', -`recenter', `automatic', `backup', `exit-prefix', `quit', and `help'.") +`act-and-exit', `exit', `exit-prefix', `recenter', `scroll-up', +`scroll-down', `scroll-other-window', `scroll-other-window-down', +`edit', `edit-replacement', `delete-and-edit', `automatic', +`backup', `quit', and `help'. + +This keymap is used by `y-or-n-p' as well as `query-replace'.") (defvar multi-query-replace-map (let ((map (make-sparse-keymap))) diff --git a/lisp/subr.el b/lisp/subr.el index 21dd270caef..be785ff8fba 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2319,11 +2319,19 @@ floating point support." PROMPT is the string to display to ask the question. It should end in a space; `y-or-n-p' adds \"(y or n) \" to it. -No confirmation of the answer is requested; a single character is enough. -Also accepts Space to mean yes, or Delete to mean no. \(Actually, it uses -the bindings in `query-replace-map'; see the documentation of that variable -for more information. In this case, the useful bindings are `act', `skip', -`recenter', and `quit'.\) +No confirmation of the answer is requested; a single character is +enough. SPC also means yes, and DEL means no. + +To be precise, this function translates user input into responses +by consulting the bindings in `query-replace-map'; see the +documentation of that variable for more information. In this +case, the useful bindings are `act', `skip', `recenter', +`scroll-up', `scroll-down', and `quit'. +An `act' response means yes, and a `skip' response means no. +A `quit' response means to invoke `keyboard-quit'. +If the user enters `recenter', `scroll-up', or `scroll-down' +responses, perform the requested window recentering or scrolling +and ask again. Under a windowing system a dialog box will be used if `last-nonmenu-event' is nil and `use-dialog-box' is non-nil." @@ -2355,21 +2363,33 @@ is nil and `use-dialog-box' is non-nil." "" " ") "(y or n) ")) (while - (let* ((key + (let* ((scroll-actions '(recenter scroll-up scroll-down + scroll-other-window scroll-other-window-down)) + (key (let ((cursor-in-echo-area t)) (when minibuffer-auto-raise (raise-frame (window-frame (minibuffer-window)))) - (read-key (propertize (if (eq answer 'recenter) + (read-key (propertize (if (memq answer scroll-actions) prompt (concat "Please answer y or n. " prompt)) 'face 'minibuffer-prompt))))) (setq answer (lookup-key query-replace-map (vector key) t)) (cond - ((memq answer '(skip act)) nil) - ((eq answer 'recenter) (recenter) t) - ((memq answer '(exit-prefix quit)) (signal 'quit nil) t) - (t t))) + ((memq answer '(skip act)) nil) + ((eq answer 'recenter) + (recenter) t) + ((eq answer 'scroll-up) + (ignore-errors (scroll-up-command)) t) + ((eq answer 'scroll-down) + (ignore-errors (scroll-down-command)) t) + ((eq answer 'scroll-other-window) + (ignore-errors (scroll-other-window)) t) + ((eq answer 'scroll-other-window-down) + (ignore-errors (scroll-other-window-down)) t) + ((or (memq answer '(exit-prefix quit)) (eq key ?\e)) + (signal 'quit nil) t) + (t t))) (ding) (discard-input)))) (let ((ret (eq answer 'act))) diff --git a/lisp/window.el b/lisp/window.el index b071a8e9c50..dd1f55450c3 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -6301,7 +6301,7 @@ This is different from `scroll-down-command' that scrolls a full screen." (put 'scroll-down-line 'scroll-command t) -(defun scroll-other-window-down (lines) +(defun scroll-other-window-down (&optional lines) "Scroll the \"other window\" down. For more details, see the documentation for `scroll-other-window'." (interactive "P") From e4e55af11e05361f7573a5c7fc16189affe5b08b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 9 Sep 2012 15:09:03 +0800 Subject: [PATCH 098/216] * minibuf.texi: Fix last change. --- doc/lispref/minibuf.texi | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index cdc47b7c91d..3d6e80bf3f0 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1896,7 +1896,6 @@ special responses @code{recenter}, @code{scroll-up}, @kbd{C-v}, @kbd{M-v}, @kbd{C-M-v} and @kbd{C-M-S-v} in @code{query-replace-map}), this function performs the specified window recentering or scrolling operation, and poses the question again. -@end smallexample @noindent We show successive lines of echo area messages, but only one actually From bb6b0efc3490a1e47e69e3afbc115576025f3606 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 9 Sep 2012 15:50:45 +0800 Subject: [PATCH 099/216] Clarify descriptions of delq and delete in Lisp manual. * doc/lispref/lists.texi (Sets And Lists): Explain that the return value for delete should be used, like for delq. --- doc/lispref/ChangeLog | 3 +++ doc/lispref/lists.texi | 33 +++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 79691bfb181..ceb199dae88 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,8 @@ 2012-09-09 Chong Yidong + * lists.texi (Sets And Lists): Explain that the return value for + delete should be used, like for delq. + * minibuf.texi (Yes-or-No Queries): Document recentering and scrolling in y-or-n-p. Remove gratuitous example. diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 023f8ba18dd..d685ce0aa74 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -1293,14 +1293,19 @@ compare @var{object} against the elements of the list. For example: @defun delq object list @cindex deleting list elements This function destructively removes all elements @code{eq} to -@var{object} from @var{list}. The letter @samp{q} in @code{delq} says -that it uses @code{eq} to compare @var{object} against the elements of -the list, like @code{memq} and @code{remq}. +@var{object} from @var{list}, and returns the resulting list. The +letter @samp{q} in @code{delq} says that it uses @code{eq} to compare +@var{object} against the elements of the list, like @code{memq} and +@code{remq}. + +Typically, when you invoke @code{delq}, you should use the return +value by assigning it to the variable which held the original list. +The reason for this is explained below. @end defun -When @code{delq} deletes elements from the front of the list, it does so -simply by advancing down the list and returning a sublist that starts -after those elements: +The @code{delq} function deletes elements from the front of the list +by simply advancing down the list, and returning a sublist that starts +after those elements. For example: @example @group @@ -1308,6 +1313,7 @@ after those elements: @end group @end example +@noindent When an element to be deleted appears in the middle of the list, removing it involves changing the @sc{cdr}s (@pxref{Setcdr}). @@ -1432,12 +1438,15 @@ Compare this with @code{memq}: @end defun @defun delete object sequence -If @code{sequence} is a list, this function destructively removes all -elements @code{equal} to @var{object} from @var{sequence}. For lists, -@code{delete} is to @code{delq} as @code{member} is to @code{memq}: it -uses @code{equal} to compare elements with @var{object}, like -@code{member}; when it finds an element that matches, it cuts the -element out just as @code{delq} would. +This function removes all elements @code{equal} to @var{object} from +@var{sequence}, and returns the resulting sequence. + +If @var{sequence} is a list, @code{delete} is to @code{delq} as +@code{member} is to @code{memq}: it uses @code{equal} to compare +elements with @var{object}, like @code{member}; when it finds an +element that matches, it cuts the element out just as @code{delq} +would. As with @code{delq}, you should typically use the return value +by assigning it to the variable which held the original list. If @code{sequence} is a vector or string, @code{delete} returns a copy of @code{sequence} with all elements @code{equal} to @code{object} From bfabf70a86dc3506011566d9e06f6251328fa05e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 9 Sep 2012 10:10:56 +0200 Subject: [PATCH 100/216] * lisp/register.el (register-separator): Rename from separator-register. All uses changed. Doc fix. (register): Fix version. --- etc/NEWS | 7 ++++--- lisp/ChangeLog | 6 ++++++ lisp/register.el | 10 +++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index dac7915767d..49860eab98a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -188,10 +188,11 @@ end of the buffer. It defaults to t. +++ ** `C-x r +' is now overloaded to invoke `append-to-register. + +++ -** New option `separator-register'. Separator register stores -separator text for use with M-x append-to-register and M-x -prepend-to-register. See manual for details. +** New option `register-separator' specifies the register containing +the text to put between collected texts for use with M-x +append-to-register and M-x prepend-to-register. ** Search changes diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f089af6f5c..c7ff2571f9d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-09 Andreas Schwab + + * register.el (register-separator): Rename from + separator-register. All uses changed. Doc fix. + (register): Fix version. + 2012-09-09 Chong Yidong * replace.el (query-replace-map): Bind four new symbols for diff --git a/lisp/register.el b/lisp/register.el index 622a3872e54..fb35a26a653 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -79,10 +79,10 @@ A list of the form (FRAME-CONFIGURATION POSITION) (defgroup register nil "Register commands." :group 'convenience - :version "24.2.50") + :version "24.3") -(defcustom separator-register nil - "Use contents of this register to separate collected text. +(defcustom register-separator nil + "Register containing the text to put between collected texts, or nil if none. When collecting text with `append-to-register' (resp. `prepend-to-register') contents of @@ -377,7 +377,7 @@ START and END are buffer positions indicating what to append." (interactive "cAppend to register: \nr\nP") (let ((reg (get-register register)) (text (filter-buffer-substring start end)) - (separator (and separator-register (get-register separator-register)))) + (separator (and register-separator (get-register register-separator)))) (set-register register (cond ((not reg) text) ((stringp reg) (concat reg separator text)) @@ -395,7 +395,7 @@ START and END are buffer positions indicating what to prepend." (interactive "cPrepend to register: \nr\nP") (let ((reg (get-register register)) (text (filter-buffer-substring start end)) - (separator (and separator-register (get-register separator-register)))) + (separator (and register-separator (get-register register-separator)))) (set-register register (cond ((not reg) text) ((stringp reg) (concat text separator reg)) From c2cbbdd1656a20cf979a11cbdd1d0a74e570772f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 9 Sep 2012 10:44:22 +0200 Subject: [PATCH 101/216] Remove debug prints --- src/nsterm.m | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 01303829d2f..74a3d858710 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -650,7 +650,6 @@ ns_update_window_begin (struct window *w) struct frame *f = XFRAME (WINDOW_FRAME (w)); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); NSTRACE (ns_update_window_begin); - fprintf(stderr, "%s\n", __func__); updated_window = w; set_output_cursor (&w->cursor); @@ -683,7 +682,6 @@ ns_update_window_end (struct window *w, int cursor_on_p, { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); - fprintf(stderr, "%s\n", __func__); /* note: this fn is nearly identical in all terms */ if (!w->pseudo_window_p) { @@ -1267,7 +1265,6 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) wr.origin.y += FRAME_PIXEL_HEIGHT (f) - pixelheight; [view setRows: rows andColumns: cols]; - fprintf(stderr, "%s %d %d\n", __func__, cols, (int)wr.origin.x); [window setFrame: wr display: YES]; /*fprintf (stderr, "\tx_set_window_size %d, %d\t%d, %d\n", cols, rows, pixelwidth, pixelheight); */ @@ -1285,7 +1282,6 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) - NS_SCROLL_BAR_WIDTH (f), 0) : NSMakePoint (0, 0); [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; - fprintf(stderr, "%s origin %d\n", __func__, (int)origin.x); [view setBoundsOrigin: origin]; } @@ -5398,7 +5394,6 @@ not_in_argv (NSString *arg) change_frame_size (emacsframe, rows, cols, 0, 0, 1); SET_FRAME_GARBAGED (emacsframe); cancel_mouse_face (emacsframe); - fprintf(stderr, "%s %d %d\n", __func__, cols, neww); [view setFrame: NSMakeRect (0, 0, neww, newh)]; } } @@ -6217,15 +6212,6 @@ not_in_argv (NSString *arg) if (nr_screens == 1) { NSRect r = [super constrainFrameRect:frameRect toScreen:screen]; - fprintf(stderr, "%s %d/%d %d/%d => %d/%d %d/%d\n", __func__, - (int)frameRect.origin.x, - (int)frameRect.origin.y, - (int)frameRect.size.width, - (int)frameRect.size.height, - (int)r.origin.x, - (int)r.origin.y, - (int)r.size.width, - (int)r.size.height); return r; } From 8ed43f154827121c624a5a93808340618bd8f03f Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 9 Sep 2012 11:03:37 +0000 Subject: [PATCH 102/216] Correct the handling of two c-state-cache state variables. cc-engine.el (c-state-cache-init): Initialise c-state-semi-nonlit-pos-cache\(-limit\)? properly. (c-record-parse-state-state): record c-state-semi-nonlit-pos-cache\(-limit\)?. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/cc-engine.el | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7ff2571f9d..f06856b475e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-09-09 Alan Mackenzie + + * progmodes/cc-engine.el (c-state-cache-init): Initialise + c-state-semi-nonlit-pos-cache\(-limit\)? properly. + (c-record-parse-state-state): record + c-state-semi-nonlit-pos-cache\(-limit\)?. + 2012-09-09 Andreas Schwab * register.el (register-separator): Rename from diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 9188ab2fbfd..2aa04cb2b0b 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -3091,6 +3091,8 @@ comment at the start of cc-engine.el for more info." c-state-cache-good-pos 1 c-state-nonlit-pos-cache nil c-state-nonlit-pos-cache-limit 1 + c-state-semi-nonlit-pos-cache nil + c-state-semi-nonlit-pos-cache-limit 1 c-state-brace-pair-desert nil c-state-point-min 1 c-state-point-min-lit-type nil @@ -3350,6 +3352,8 @@ comment at the start of cc-engine.el for more info." c-state-cache-good-pos c-state-nonlit-pos-cache c-state-nonlit-pos-cache-limit + c-state-semi-nonlit-pos-cache + c-state-semi-nonlit-pos-cache-limit c-state-brace-pair-desert c-state-point-min c-state-point-min-lit-type From f6196b87e1ceee0d56f2fe6f3aa2b9d1d82c44b0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 9 Sep 2012 09:06:33 -0700 Subject: [PATCH 103/216] Assume C89 or later for math functions. This simplifies the code, and makes it a bit smaller and faster, and (most important) makes it easier to clean up signal handling since we can stop worring about floating-point exceptions in library code. That was a problem before C89, but the problem went away many years ago on all practical Emacs targets. * configure.ac (frexp, fmod): Remove checks for these functions, as we now assume them. (FLOAT_CHECK_DOMAIN, HAVE_INVERSE_HYPERBOLIC, NO_MATHERR) (HAVE_EXCEPTION): Remove; no longer needed. * admin/CPP-DEFINES (HAVE_FMOD, HAVE_FREXP, FLOAT_CHECK_DOMAIN) (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove. * src/data.c, src/image.c, src/lread.c, src/print.c: Don't include ; no longer needed. * src/data.c, src/floatfns.c (IEEE_FLOATING_POINT): Don't worry that it might be autoconfigured, as that never happens. * src/data.c (fmod): * src/doprnt.c (DBL_MAX_10_EXP): * src/print.c (DBL_DIG): Remove. C89 or later always defines these. * src/floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN) (in_float, float_error_arg, float_error_arg2, float_error_fn_name) (arith_error, domain_error, domain_error2): Remove all this pre-C89 cruft. Do not include as that's no longer needed -- we simply return what C returns. All uses removed. (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with the wrapped code. (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2): Remove. All uses expanded, as these macros are no longer used more than once and are now more trouble than they're worth. (Ftan): Use tan, not sin / cos. (Flogb): Assume C89 frexp. (fmod_float): Assume C89 fmod. (matherr) [HAVE_MATHERR]: Remove; no longer needed. (init_floatfns): Remove. All uses removed. --- ChangeLog | 9 + admin/CPP-DEFINES | 5 - admin/ChangeLog | 6 + configure.ac | 19 +- src/ChangeLog | 32 ++++ src/data.c | 27 --- src/doprnt.c | 4 - src/emacs.c | 1 - src/floatfns.c | 435 +++++++++------------------------------------- src/image.c | 1 - src/lisp.h | 1 - src/lread.c | 1 - src/print.c | 6 - 13 files changed, 131 insertions(+), 416 deletions(-) diff --git a/ChangeLog b/ChangeLog index e20edc893e4..198670e59ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-09-09 Paul Eggert + + Assume C89 or later for math functions (Bug#12381). + * configure.ac (frexp, fmod): Remove checks for these functions, + as we now assume them. + (FLOAT_CHECK_DOMAIN, HAVE_INVERSE_HYPERBOLIC, NO_MATHERR) + (HAVE_EXCEPTION): + Remove; no longer needed. + 2012-09-07 Paul Eggert More signal-handler cleanup (Bug#12327). diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index d87feb9b866..b40ba78e20d 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -107,7 +107,6 @@ EMACS_CONFIGURATION EMACS_CONFIG_OPTIONS EMACS_INT EMACS_UINT -FLOAT_CHECK_DOMAIN GC_MARK_SECONDARY_STACK GC_MARK_STACK GC_SETJMP_WORKS @@ -158,12 +157,10 @@ HAVE_ENDPWENT HAVE_ENVIRON_DECL HAVE_EUIDACCESS HAVE_FCNTL_H -HAVE_FMOD HAVE_FORK HAVE_FPATHCONF HAVE_FREEIFADDRS HAVE_FREETYPE -HAVE_FREXP HAVE_FSEEKO HAVE_FSYNC HAVE_FUTIMENS @@ -217,7 +214,6 @@ HAVE_IFADDRS_H HAVE_IMAGEMAGICK HAVE_INET_SOCKETS HAVE_INTTYPES_H -HAVE_INVERSE_HYPERBOLIC HAVE_JPEG HAVE_KERBEROSIV_DES_H HAVE_KERBEROSIV_KRB_H @@ -429,7 +425,6 @@ MAIL_USE_SYSTEM_LOCK MAXPATHLEN NLIST_STRUCT NO_EDITRES -NO_MATHERR NO_TERMIO NSIG NSIG_MINIMUM diff --git a/admin/ChangeLog b/admin/ChangeLog index 54fea2615fd..2c61f437981 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,9 @@ +2012-09-09 Paul Eggert + + Assume C89 or later for math functions (Bug#12381). + * CPP-DEFINES (HAVE_FMOD, HAVE_FREXP, FLOAT_CHECK_DOMAIN) + (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove. + 2012-09-04 Paul Eggert Simplify redefinition of 'abort' (Bug#12316). diff --git a/configure.ac b/configure.ac index 5fecea724dc..97e967d8043 100644 --- a/configure.ac +++ b/configure.ac @@ -1302,17 +1302,6 @@ if test $emacs_cv_speed_t = yes; then [Define to 1 if `speed_t' is declared by .]) fi -AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], -[[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])], - emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) -HAVE_EXCEPTION=$emacs_cv_struct_exception -dnl Define on Darwin so emacs symbols will not conflict with those -dnl in the System framework. Otherwise -prebind will not work. -if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then - AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) -fi - AC_CHECK_HEADERS_ONCE(sys/socket.h) AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT #if HAVE_SYS_SOCKET_H @@ -2781,7 +2770,7 @@ AC_SUBST(BLESSMAIL_TARGET) AC_CHECK_FUNCS(gethostname \ closedir getrusage get_current_dir_name \ -lrand48 logb frexp fmod cbrt setsid \ +lrand48 logb cbrt setsid \ fpathconf select euidaccess getpagesize setlocale \ utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ __fpending strsignal setitimer \ @@ -3211,12 +3200,6 @@ AC_DEFINE(CLASH_DETECTION, 1, [Define if you want lock files to be written, so that Emacs can tell instantly when you try to modify a file that someone else has modified in his/her Emacs.]) -AH_TEMPLATE(FLOAT_CHECK_DOMAIN, [Define if the float library doesn't - handle errors by either setting errno, or signaling SIGFPE.]) - -AH_TEMPLATE(HAVE_INVERSE_HYPERBOLIC, [Define if you have the functions - acosh, asinh, and atanh.]) - dnl Everybody supports this, except MS. dnl Seems like the kind of thing we should be testing for, though. ## Note: PTYs are broken on darwin <6. Use at your own risk. diff --git a/src/ChangeLog b/src/ChangeLog index 56b96fda519..ae99fcc138d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,35 @@ +2012-09-09 Paul Eggert + + Assume C89 or later for math functions (Bug#12381). + This simplifies the code, and makes it a bit smaller and faster, + and (most important) makes it easier to clean up signal handling + since we can stop worring about floating-point exceptions in + library code. That was a problem before C89, but the problem + went away many years ago on all practical Emacs targets. + * data.c, image.c, lread.c, print.c: + Don't include ; no longer needed. + * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it + might be autoconfigured, as that never happens. + * data.c (fmod): + * doprnt.c (DBL_MAX_10_EXP): + * print.c (DBL_DIG): + Remove. C89 or later always defines these. + * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN) + (in_float, float_error_arg, float_error_arg2, float_error_fn_name) + (arith_error, domain_error, domain_error2): + Remove all this pre-C89 cruft. Do not include as that's + no longer needed -- we simply return what C returns. All uses removed. + (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with + the wrapped code. + (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2): + Remove. All uses expanded, as these macros are no longer used + more than once and are now more trouble than they're worth. + (Ftan): Use tan, not sin / cos. + (Flogb): Assume C89 frexp. + (fmod_float): Assume C89 fmod. + (matherr) [HAVE_MATHERR]: Remove; no longer needed. + (init_floatfns): Remove. All uses removed. + 2012-09-08 Jan Djärv * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back diff --git a/src/data.c b/src/data.c index de107fc04a5..a4cca0a3ee5 100644 --- a/src/data.c +++ b/src/data.c @@ -36,17 +36,12 @@ along with GNU Emacs. If not, see . */ #include "keymap.h" #include -/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ -#ifndef IEEE_FLOATING_POINT #if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) #define IEEE_FLOATING_POINT 1 #else #define IEEE_FLOATING_POINT 0 #endif -#endif - -#include Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; static Lisp_Object Qsubr; @@ -2737,28 +2732,6 @@ Both must be integers or markers. */) return val; } -#ifndef HAVE_FMOD -double -fmod (double f1, double f2) -{ - double r = f1; - - if (f2 < 0.0) - f2 = -f2; - - /* If the magnitude of the result exceeds that of the divisor, or - the sign of the result does not agree with that of the dividend, - iterate with the reduced value. This does not yield a - particularly accurate result, but at least it will be in the - range promised by fmod. */ - do - r -= f2 * floor (r / f2); - while (f2 <= (r < 0 ? -r : r) || ((r < 0) != (f1 < 0) && ! isnan (r))); - - return r; -} -#endif /* ! HAVE_FMOD */ - DEFUN ("mod", Fmod, Smod, 2, 2, 0, doc: /* Return X modulo Y. The result falls between zero (inclusive) and Y (exclusive). diff --git a/src/doprnt.c b/src/doprnt.c index b36e946005d..3b7391f07d4 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -114,10 +114,6 @@ along with GNU Emacs. If not, see . */ another macro. */ #include "character.h" -#ifndef DBL_MAX_10_EXP -#define DBL_MAX_10_EXP 308 /* IEEE double */ -#endif - /* Generate output from a format-spec FORMAT, terminated at position FORMAT_END. (*FORMAT_END is not part of the format, but must exist and be readable.) diff --git a/src/emacs.c b/src/emacs.c index 36e51869504..deaed25d9e8 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1587,7 +1587,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem init_fringe (); #endif /* HAVE_WINDOW_SYSTEM */ init_macros (); - init_floatfns (); init_window (); init_font (); diff --git a/src/floatfns.c b/src/floatfns.c index dfe063b152f..8a9a9fd0886 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -22,26 +22,9 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* ANSI C requires only these float functions: +/* C89 requires only these math.h functions: acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod, frexp, ldexp, log, log10, modf, pow, sin, sinh, sqrt, tan, tanh. - - Define HAVE_INVERSE_HYPERBOLIC if you have acosh, asinh, and atanh. - Define HAVE_CBRT if you have cbrt. - Define HAVE_RINT if you have a working rint. - If you don't define these, then the appropriate routines will be simulated. - - Define HAVE_MATHERR if on a system supporting the SysV matherr callback. - (This should happen automatically.) - - Define FLOAT_CHECK_ERRNO if the float library routines set errno. - This has no effect if HAVE_MATHERR is defined. - - Define FLOAT_CHECK_DOMAIN if the float library doesn't handle errors by - either setting errno, or signaling SIGFPE. Otherwise, domain and - range checking will happen before calling the float routines. This has - no effect if HAVE_MATHERR is defined (since matherr will be called when - a domain error occurs.) */ #include @@ -50,15 +33,12 @@ along with GNU Emacs. If not, see . */ #include "syssignal.h" #include -/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ -#ifndef IEEE_FLOATING_POINT #if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) #define IEEE_FLOATING_POINT 1 #else #define IEEE_FLOATING_POINT 0 #endif -#endif #include @@ -67,120 +47,6 @@ along with GNU Emacs. If not, see . */ extern double logb (double); #endif /* not HPUX and HAVE_LOGB and no logb macro */ -#if defined (DOMAIN) && defined (SING) && defined (OVERFLOW) - /* If those are defined, then this is probably a `matherr' machine. */ -# ifndef HAVE_MATHERR -# define HAVE_MATHERR -# endif -#endif - -#ifdef NO_MATHERR -#undef HAVE_MATHERR -#endif - -#ifdef HAVE_MATHERR -# ifdef FLOAT_CHECK_ERRNO -# undef FLOAT_CHECK_ERRNO -# endif -# ifdef FLOAT_CHECK_DOMAIN -# undef FLOAT_CHECK_DOMAIN -# endif -#endif - -#ifndef NO_FLOAT_CHECK_ERRNO -#define FLOAT_CHECK_ERRNO -#endif - -#ifdef FLOAT_CHECK_ERRNO -# include -#endif - -/* True while executing in floating point. - This tells float_error what to do. */ - -static bool in_float; - -/* If an argument is out of range for a mathematical function, - here is the actual argument value to use in the error message. - These variables are used only across the floating point library call - so there is no need to staticpro them. */ - -static Lisp_Object float_error_arg, float_error_arg2; - -static const char *float_error_fn_name; - -/* Evaluate the floating point expression D, recording NUM - as the original argument for error messages. - D is normally an assignment expression. - Handle errors which may result in signals or may set errno. - - Note that float_error may be declared to return void, so you can't - just cast the zero after the colon to (void) to make the types - check properly. */ - -#ifdef FLOAT_CHECK_ERRNO -#define IN_FLOAT(d, name, num) \ - do { \ - float_error_arg = num; \ - float_error_fn_name = name; \ - in_float = 1; errno = 0; (d); in_float = 0; \ - switch (errno) { \ - case 0: break; \ - case EDOM: domain_error (float_error_fn_name, float_error_arg); \ - case ERANGE: range_error (float_error_fn_name, float_error_arg); \ - default: arith_error (float_error_fn_name, float_error_arg); \ - } \ - } while (0) -#define IN_FLOAT2(d, name, num, num2) \ - do { \ - float_error_arg = num; \ - float_error_arg2 = num2; \ - float_error_fn_name = name; \ - in_float = 1; errno = 0; (d); in_float = 0; \ - switch (errno) { \ - case 0: break; \ - case EDOM: domain_error (float_error_fn_name, float_error_arg); \ - case ERANGE: range_error (float_error_fn_name, float_error_arg); \ - default: arith_error (float_error_fn_name, float_error_arg); \ - } \ - } while (0) -#else -#define IN_FLOAT(d, name, num) (in_float = 1, (d), in_float = 0) -#define IN_FLOAT2(d, name, num, num2) (in_float = 1, (d), in_float = 0) -#endif - -/* Convert float to Lisp_Int if it fits, else signal a range error - using the given arguments. */ -#define FLOAT_TO_INT(x, i, name, num) \ - do \ - { \ - if (FIXNUM_OVERFLOW_P (x)) \ - range_error (name, num); \ - XSETINT (i, (EMACS_INT)(x)); \ - } \ - while (0) -#define FLOAT_TO_INT2(x, i, name, num1, num2) \ - do \ - { \ - if (FIXNUM_OVERFLOW_P (x)) \ - range_error2 (name, num1, num2); \ - XSETINT (i, (EMACS_INT)(x)); \ - } \ - while (0) - -#define arith_error(op,arg) \ - xsignal2 (Qarith_error, build_string ((op)), (arg)) -#define range_error(op,arg) \ - xsignal2 (Qrange_error, build_string ((op)), (arg)) -#define range_error2(op,a1,a2) \ - xsignal3 (Qrange_error, build_string ((op)), (a1), (a2)) -#define domain_error(op,arg) \ - xsignal2 (Qdomain_error, build_string ((op)), (arg)) -#ifdef FLOAT_CHECK_DOMAIN -#define domain_error2(op,a1,a2) \ - xsignal3 (Qdomain_error, build_string ((op)), (a1), (a2)) -#endif - /* Extract a Lisp number as a `double', or signal an error. */ double @@ -197,27 +63,19 @@ extract_float (Lisp_Object num) DEFUN ("acos", Facos, Sacos, 1, 1, 0, doc: /* Return the inverse cosine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d > 1.0 || d < -1.0) - domain_error ("acos", arg); -#endif - IN_FLOAT (d = acos (d), "acos", arg); + d = acos (d); return make_float (d); } DEFUN ("asin", Fasin, Sasin, 1, 1, 0, doc: /* Return the inverse sine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d > 1.0 || d < -1.0) - domain_error ("asin", arg); -#endif - IN_FLOAT (d = asin (d), "asin", arg); + d = asin (d); return make_float (d); } @@ -227,50 +85,44 @@ If only one argument Y is given, return the inverse tangent of Y. If two arguments Y and X are given, return the inverse tangent of Y divided by X, i.e. the angle in radians between the vector (X, Y) and the x-axis. */) - (register Lisp_Object y, Lisp_Object x) + (Lisp_Object y, Lisp_Object x) { double d = extract_float (y); if (NILP (x)) - IN_FLOAT (d = atan (d), "atan", y); + d = atan (d); else { double d2 = extract_float (x); - - IN_FLOAT2 (d = atan2 (d, d2), "atan", y, x); + d = atan2 (d, d2); } return make_float (d); } DEFUN ("cos", Fcos, Scos, 1, 1, 0, doc: /* Return the cosine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = cos (d), "cos", arg); + d = cos (d); return make_float (d); } DEFUN ("sin", Fsin, Ssin, 1, 1, 0, doc: /* Return the sine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = sin (d), "sin", arg); + d = sin (d); return make_float (d); } DEFUN ("tan", Ftan, Stan, 1, 1, 0, doc: /* Return the tangent of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - double c = cos (d); - if (c == 0.0) - domain_error ("tan", arg); -#endif - IN_FLOAT (d = tan (d), "tan", arg); + d = tan (d); return make_float (d); } @@ -341,61 +193,61 @@ Returns the floating point value resulting from multiplying SGNFCAND DEFUN ("bessel-j0", Fbessel_j0, Sbessel_j0, 1, 1, 0, doc: /* Return the bessel function j0 of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = j0 (d), "bessel-j0", arg); + d = j0 (d); return make_float (d); } DEFUN ("bessel-j1", Fbessel_j1, Sbessel_j1, 1, 1, 0, doc: /* Return the bessel function j1 of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = j1 (d), "bessel-j1", arg); + d = j1 (d); return make_float (d); } DEFUN ("bessel-jn", Fbessel_jn, Sbessel_jn, 2, 2, 0, doc: /* Return the order N bessel function output jn of ARG. The first arg (the order) is truncated to an integer. */) - (register Lisp_Object n, Lisp_Object arg) + (Lisp_Object n, Lisp_Object arg) { int i1 = extract_float (n); double f2 = extract_float (arg); - IN_FLOAT (f2 = jn (i1, f2), "bessel-jn", n); + f2 = jn (i1, f2); return make_float (f2); } DEFUN ("bessel-y0", Fbessel_y0, Sbessel_y0, 1, 1, 0, doc: /* Return the bessel function y0 of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = y0 (d), "bessel-y0", arg); + d = y0 (d); return make_float (d); } DEFUN ("bessel-y1", Fbessel_y1, Sbessel_y1, 1, 1, 0, doc: /* Return the bessel function y1 of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = y1 (d), "bessel-y0", arg); + d = y1 (d); return make_float (d); } DEFUN ("bessel-yn", Fbessel_yn, Sbessel_yn, 2, 2, 0, doc: /* Return the order N bessel function output yn of ARG. The first arg (the order) is truncated to an integer. */) - (register Lisp_Object n, Lisp_Object arg) + (Lisp_Object n, Lisp_Object arg) { int i1 = extract_float (n); double f2 = extract_float (arg); - IN_FLOAT (f2 = yn (i1, f2), "bessel-yn", n); + f2 = yn (i1, f2); return make_float (f2); } @@ -405,43 +257,43 @@ The first arg (the order) is truncated to an integer. */) DEFUN ("erf", Ferf, Serf, 1, 1, 0, doc: /* Return the mathematical error function of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = erf (d), "erf", arg); + d = erf (d); return make_float (d); } DEFUN ("erfc", Ferfc, Serfc, 1, 1, 0, doc: /* Return the complementary error function of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = erfc (d), "erfc", arg); + d = erfc (d); return make_float (d); } DEFUN ("log-gamma", Flog_gamma, Slog_gamma, 1, 1, 0, doc: /* Return the log gamma of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = lgamma (d), "log-gamma", arg); + d = lgamma (d); return make_float (d); } DEFUN ("cube-root", Fcube_root, Scube_root, 1, 1, 0, doc: /* Return the cube root of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); #ifdef HAVE_CBRT - IN_FLOAT (d = cbrt (d), "cube-root", arg); + d = cbrt (d); #else if (d >= 0.0) - IN_FLOAT (d = pow (d, 1.0/3.0), "cube-root", arg); + d = pow (d, 1.0/3.0); else - IN_FLOAT (d = -pow (-d, 1.0/3.0), "cube-root", arg); + d = -pow (-d, 1.0/3.0); #endif return make_float (d); } @@ -450,23 +302,16 @@ DEFUN ("cube-root", Fcube_root, Scube_root, 1, 1, 0, DEFUN ("exp", Fexp, Sexp, 1, 1, 0, doc: /* Return the exponential base e of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d > 709.7827) /* Assume IEEE doubles here */ - range_error ("exp", arg); - else if (d < -709.0) - return make_float (0.0); - else -#endif - IN_FLOAT (d = exp (d), "exp", arg); + d = exp (d); return make_float (d); } DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, doc: /* Return the exponential ARG1 ** ARG2. */) - (register Lisp_Object arg1, Lisp_Object arg2) + (Lisp_Object arg1, Lisp_Object arg2) { double f1, f2, f3; @@ -495,72 +340,46 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, } f1 = FLOATP (arg1) ? XFLOAT_DATA (arg1) : XINT (arg1); f2 = FLOATP (arg2) ? XFLOAT_DATA (arg2) : XINT (arg2); - /* Really should check for overflow, too */ - if (f1 == 0.0 && f2 == 0.0) - f1 = 1.0; -#ifdef FLOAT_CHECK_DOMAIN - else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor (f2))) - domain_error2 ("expt", arg1, arg2); -#endif - IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2); - /* Check for overflow in the result. */ - if (f1 != 0.0 && f3 == 0.0) - range_error ("expt", arg1); + f3 = pow (f1, f2); return make_float (f3); } DEFUN ("log", Flog, Slog, 1, 2, 0, doc: /* Return the natural logarithm of ARG. If the optional argument BASE is given, return log ARG using that base. */) - (register Lisp_Object arg, Lisp_Object base) + (Lisp_Object arg, Lisp_Object base) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d <= 0.0) - domain_error2 ("log", arg, base); -#endif if (NILP (base)) - IN_FLOAT (d = log (d), "log", arg); + d = log (d); else { double b = extract_float (base); -#ifdef FLOAT_CHECK_DOMAIN - if (b <= 0.0 || b == 1.0) - domain_error2 ("log", arg, base); -#endif if (b == 10.0) - IN_FLOAT2 (d = log10 (d), "log", arg, base); + d = log10 (d); else - IN_FLOAT2 (d = log (d) / log (b), "log", arg, base); + d = log (d) / log (b); } return make_float (d); } DEFUN ("log10", Flog10, Slog10, 1, 1, 0, doc: /* Return the logarithm base 10 of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d <= 0.0) - domain_error ("log10", arg); -#endif - IN_FLOAT (d = log10 (d), "log10", arg); + d = log10 (d); return make_float (d); } DEFUN ("sqrt", Fsqrt, Ssqrt, 1, 1, 0, doc: /* Return the square root of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d < 0.0) - domain_error ("sqrt", arg); -#endif - IN_FLOAT (d = sqrt (d), "sqrt", arg); + d = sqrt (d); return make_float (d); } @@ -568,83 +387,55 @@ DEFUN ("sqrt", Fsqrt, Ssqrt, 1, 1, 0, DEFUN ("acosh", Facosh, Sacosh, 1, 1, 0, doc: /* Return the inverse hyperbolic cosine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d < 1.0) - domain_error ("acosh", arg); -#endif -#ifdef HAVE_INVERSE_HYPERBOLIC - IN_FLOAT (d = acosh (d), "acosh", arg); -#else - IN_FLOAT (d = log (d + sqrt (d*d - 1.0)), "acosh", arg); -#endif + d = acosh (d); return make_float (d); } DEFUN ("asinh", Fasinh, Sasinh, 1, 1, 0, doc: /* Return the inverse hyperbolic sine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef HAVE_INVERSE_HYPERBOLIC - IN_FLOAT (d = asinh (d), "asinh", arg); -#else - IN_FLOAT (d = log (d + sqrt (d*d + 1.0)), "asinh", arg); -#endif + d = asinh (d); return make_float (d); } DEFUN ("atanh", Fatanh, Satanh, 1, 1, 0, doc: /* Return the inverse hyperbolic tangent of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d >= 1.0 || d <= -1.0) - domain_error ("atanh", arg); -#endif -#ifdef HAVE_INVERSE_HYPERBOLIC - IN_FLOAT (d = atanh (d), "atanh", arg); -#else - IN_FLOAT (d = 0.5 * log ((1.0 + d) / (1.0 - d)), "atanh", arg); -#endif + d = atanh (d); return make_float (d); } DEFUN ("cosh", Fcosh, Scosh, 1, 1, 0, doc: /* Return the hyperbolic cosine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d > 710.0 || d < -710.0) - range_error ("cosh", arg); -#endif - IN_FLOAT (d = cosh (d), "cosh", arg); + d = cosh (d); return make_float (d); } DEFUN ("sinh", Fsinh, Ssinh, 1, 1, 0, doc: /* Return the hyperbolic sine of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); -#ifdef FLOAT_CHECK_DOMAIN - if (d > 710.0 || d < -710.0) - range_error ("sinh", arg); -#endif - IN_FLOAT (d = sinh (d), "sinh", arg); + d = sinh (d); return make_float (d); } DEFUN ("tanh", Ftanh, Stanh, 1, 1, 0, doc: /* Return the hyperbolic tangent of ARG. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = tanh (d), "tanh", arg); + d = tanh (d); return make_float (d); } #endif @@ -689,33 +480,11 @@ This is the same as the exponent of a float. */) else { #ifdef HAVE_LOGB - IN_FLOAT (value = logb (f), "logb", arg); + value = logb (f); #else -#ifdef HAVE_FREXP int ivalue; - IN_FLOAT (frexp (f, &ivalue), "logb", arg); + frexp (f, &ivalue); value = ivalue - 1; -#else - int i; - double d; - if (f < 0.0) - f = -f; - value = -1; - while (f < 0.5) - { - for (i = 1, d = 0.5; d * d >= f; i += i) - d *= d; - f /= d; - value -= i; - } - while (f >= 1.0) - { - for (i = 1, d = 2.0; d * d <= f; i += i) - d *= d; - f /= d; - value += i; - } -#endif #endif } XSETINT (val, value); @@ -748,8 +517,10 @@ rounding_driver (Lisp_Object arg, Lisp_Object divisor, if (! IEEE_FLOATING_POINT && f2 == 0) xsignal0 (Qarith_error); - IN_FLOAT2 (f1 = (*double_round) (f1 / f2), name, arg, divisor); - FLOAT_TO_INT2 (f1, arg, name, arg, divisor); + f1 = (*double_round) (f1 / f2); + if (FIXNUM_OVERFLOW_P (f1)) + xsignal3 (Qrange_error, build_string (name), arg, divisor); + arg = make_number (f1); return arg; } @@ -765,10 +536,10 @@ rounding_driver (Lisp_Object arg, Lisp_Object divisor, if (FLOATP (arg)) { - double d; - - IN_FLOAT (d = (*double_round) (XFLOAT_DATA (arg)), name, arg); - FLOAT_TO_INT (d, arg, name, arg); + double d = (*double_round) (XFLOAT_DATA (arg)); + if (FIXNUM_OVERFLOW_P (d)) + xsignal2 (Qrange_error, build_string (name), arg); + arg = make_number (d); } return arg; @@ -885,97 +656,57 @@ fmod_float (Lisp_Object x, Lisp_Object y) f1 = FLOATP (x) ? XFLOAT_DATA (x) : XINT (x); f2 = FLOATP (y) ? XFLOAT_DATA (y) : XINT (y); - if (! IEEE_FLOATING_POINT && f2 == 0) - xsignal0 (Qarith_error); + f1 = fmod (f1, f2); /* If the "remainder" comes out with the wrong sign, fix it. */ - IN_FLOAT2 ((f1 = fmod (f1, f2), - f1 = (f2 < 0 ? f1 > 0 : f1 < 0) ? f1 + f2 : f1), - "mod", x, y); + if (f2 < 0 ? 0 < f1 : f1 < 0) + f1 += f2; + return make_float (f1); } -/* It's not clear these are worth adding. */ - DEFUN ("fceiling", Ffceiling, Sfceiling, 1, 1, 0, doc: /* Return the smallest integer no less than ARG, as a float. \(Round toward +inf.\) */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = ceil (d), "fceiling", arg); + d = ceil (d); return make_float (d); } DEFUN ("ffloor", Fffloor, Sffloor, 1, 1, 0, doc: /* Return the largest integer no greater than ARG, as a float. \(Round towards -inf.\) */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = floor (d), "ffloor", arg); + d = floor (d); return make_float (d); } DEFUN ("fround", Ffround, Sfround, 1, 1, 0, doc: /* Return the nearest integer to ARG, as a float. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); - IN_FLOAT (d = emacs_rint (d), "fround", arg); + d = emacs_rint (d); return make_float (d); } DEFUN ("ftruncate", Fftruncate, Sftruncate, 1, 1, 0, doc: /* Truncate a floating point number to an integral float value. Rounds the value toward zero. */) - (register Lisp_Object arg) + (Lisp_Object arg) { double d = extract_float (arg); if (d >= 0.0) - IN_FLOAT (d = floor (d), "ftruncate", arg); + d = floor (d); else - IN_FLOAT (d = ceil (d), "ftruncate", arg); + d = ceil (d); return make_float (d); } -#ifdef HAVE_MATHERR -int -matherr (struct exception *x) -{ - Lisp_Object args; - const char *name = x->name; - - if (! in_float) - /* Not called from emacs-lisp float routines; do the default thing. */ - return 0; - if (!strcmp (x->name, "pow")) - name = "expt"; - - args - = Fcons (build_string (name), - Fcons (make_float (x->arg1), - ((!strcmp (name, "log") || !strcmp (name, "pow")) - ? Fcons (make_float (x->arg2), Qnil) - : Qnil))); - switch (x->type) - { - case DOMAIN: xsignal (Qdomain_error, args); break; - case SING: xsignal (Qsingularity_error, args); break; - case OVERFLOW: xsignal (Qoverflow_error, args); break; - case UNDERFLOW: xsignal (Qunderflow_error, args); break; - default: xsignal (Qarith_error, args); break; - } - return (1); /* don't set errno or print a message */ -} -#endif /* HAVE_MATHERR */ - -void -init_floatfns (void) -{ - in_float = 0; -} - void syms_of_floatfns (void) { diff --git a/src/image.c b/src/image.c index fc99f882973..4ec6105d72d 100644 --- a/src/image.c +++ b/src/image.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #ifdef HAVE_PNG diff --git a/src/lisp.h b/src/lisp.h index e6594b5890c..95ea87a15d2 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2687,7 +2687,6 @@ extern void syms_of_fns (void); /* Defined in floatfns.c */ extern double extract_float (Lisp_Object); -extern void init_floatfns (void); extern void syms_of_floatfns (void); extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); diff --git a/src/lread.c b/src/lread.c index 4f3a93b16b4..02b13affb6a 100644 --- a/src/lread.c +++ b/src/lread.c @@ -50,7 +50,6 @@ along with GNU Emacs. If not, see . */ #endif #include -#include #ifdef HAVE_SETLOCALE #include diff --git a/src/print.c b/src/print.c index 72e536e4278..ab86ee1a8b5 100644 --- a/src/print.c +++ b/src/print.c @@ -45,15 +45,9 @@ static Lisp_Object Qtemp_buffer_setup_hook; static Lisp_Object Qfloat_output_format; -#include #include #include -/* Default to values appropriate for IEEE floating point. */ -#ifndef DBL_DIG -#define DBL_DIG 15 -#endif - /* Avoid actual stack overflow in print. */ static ptrdiff_t print_depth; From e99579563e157a993cef09ee61ea3d0027358f1a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 9 Sep 2012 20:59:50 +0300 Subject: [PATCH 104/216] Fix bug #12277 with incomplete redisplay of the vertical border between windows. src/dispnew.c (update_window_line): When the left margin area of a screen line is updated, set the redraw_fringe_bitmaps_p flag of that screen line. --- src/ChangeLog | 6 ++++++ src/dispnew.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ae99fcc138d..e336e3dfe89 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-09 Eli Zaretskii + + * dispnew.c (update_window_line): When the left margin area of a + screen line is updated, set the redraw_fringe_bitmaps_p flag of + that screen line. (Bug#12277) + 2012-09-09 Paul Eggert Assume C89 or later for math functions (Bug#12381). diff --git a/src/dispnew.c b/src/dispnew.c index 85b3254aae3..fae415dcaf2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3951,6 +3951,11 @@ update_window_line (struct window *w, int vpos, bool *mouse_face_overwritten_p) { changed_p = 1; update_marginal_area (w, LEFT_MARGIN_AREA, vpos); + /* Setting this flag will ensure the vertical border, if + any, between this window and the one on its left will be + redrawn. This is necessary because updating the left + margin area can potentially draw over the border. */ + current_row->redraw_fringe_bitmaps_p = 1; } /* Update the display of the text area. */ From aba05ce9b6381e3538cfc22dbce7dd7df4ad7342 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 9 Sep 2012 23:10:36 +0300 Subject: [PATCH 105/216] Avoid leaving traces of cursor when entering linum-mode. src/fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the left fringe if the window has a left margin. This avoids leaving traces of the cursor because its leftmost pixel is not drawn over. --- src/ChangeLog | 4 ++++ src/fringe.c | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e336e3dfe89..2537cd77fdc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2012-09-09 Eli Zaretskii + * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the + left fringe if the window has a left margin. This avoids leaving + traces of the cursor because its leftmost pixel is not drawn over. + * dispnew.c (update_window_line): When the left margin area of a screen line is updated, set the redraw_fringe_bitmaps_p flag of that screen line. (Bug#12277) diff --git a/src/fringe.c b/src/fringe.c index 97d03a2bfae..0c2109a0f8e 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -659,7 +659,14 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o { /* If W has a vertical border to its left, don't draw over it. */ wd -= ((!WINDOW_LEFTMOST_P (w) - && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) + && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) + /* But don't reduce the fringe width if the window + has a left margin, because that means we are not + in danger of drawing over the vertical border, + and OTOH leaving out that one pixel leaves behind + traces of the cursor, if it was in column zero + before drawing non-empty margin area. */ + && NILP (w->left_margin_cols)) ? 1 : 0); p.bx = x - wd; p.nx = wd; From 70fe82368444ff578b519da75c3669b6b5cf12f0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 9 Sep 2012 17:11:14 -0400 Subject: [PATCH 106/216] * lisp/eshell/em-unix.el (eshell/sudo): Explicitly drop return value. --- lisp/ChangeLog | 12 ++++++++---- lisp/eshell/em-unix.el | 2 +- src/buffer.c | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f06856b475e..f46fbdcc9ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,13 @@ +2012-09-09 Stefan Monnier + + * eshell/em-unix.el (eshell/sudo): Explicitly drop return value. + 2012-09-09 Alan Mackenzie - * progmodes/cc-engine.el (c-state-cache-init): Initialise - c-state-semi-nonlit-pos-cache\(-limit\)? properly. - (c-record-parse-state-state): record - c-state-semi-nonlit-pos-cache\(-limit\)?. + * progmodes/cc-engine.el (c-state-cache-init): + Initialise c-state-semi-nonlit-pos-cache\(-limit\)? properly. + (c-record-parse-state-state): + Record c-state-semi-nonlit-pos-cache\(-limit\)?. 2012-09-09 Andreas Schwab diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 58402e37508..d3ddab8af1b 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1111,7 +1111,7 @@ Execute a COMMAND as the superuser or another USER.") (substring prefix 0 -1) user host dir) (format "/sudo:%s@%s:%s" user host dir)))) ;; Ensure, that Tramp has connected to that construct already. - (file-exists-p default-directory) + (ignore (file-exists-p default-directory)) (eshell-named-command (car orig-args) (cdr orig-args)))))))) (put 'eshell/sudo 'eshell-no-numeric-conversions t) diff --git a/src/buffer.c b/src/buffer.c index 187277d663b..3af45122a0d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -44,7 +44,7 @@ along with GNU Emacs. If not, see . */ #include "keymap.h" #include "frame.h" -struct buffer *current_buffer; /* the current buffer */ +struct buffer *current_buffer; /* The current buffer. */ /* First buffer in chain of all buffers (in reverse order of creation). Threaded through ->header.next.buffer. */ @@ -74,12 +74,12 @@ struct buffer alignas (GCALIGNMENT) buffer_defaults; and the corresponding slot in buffer_defaults is not used. If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is - zero, that is a bug */ + zero, that is a bug. */ struct buffer buffer_local_flags; /* This structure holds the names of symbols whose values may be - buffer-local. It is indexed and accessed in the same way as the above. */ + buffer-local. It is indexed and accessed in the same way as the above. */ struct buffer alignas (GCALIGNMENT) buffer_local_symbols; @@ -108,7 +108,7 @@ static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, static void swap_out_buffer_local_variables (struct buffer *b); static void reset_buffer_local_variables (struct buffer *, bool); -/* Alist of all buffer names vs the buffers. */ +/* Alist of all buffer names vs the buffers. */ /* This used to be a variable, but is no longer, to prevent lossage due to user rplac'ing this alist or its elements. */ Lisp_Object Vbuffer_alist; @@ -127,7 +127,7 @@ static Lisp_Object Qpermanent_local_hook; static Lisp_Object Qprotected_field; -static Lisp_Object QSFundamental; /* A string "Fundamental" */ +static Lisp_Object QSFundamental; /* A string "Fundamental". */ static Lisp_Object Qkill_buffer_hook; static Lisp_Object Qbuffer_list_update_hook; From e7032e7c6ce273720267070e97fb5567a128fc1f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 9 Sep 2012 17:24:04 -0400 Subject: [PATCH 107/216] * src/lisp.h (make_lisp_ptr): New macro to replace XSET. (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC): Use it. --- src/ChangeLog | 6 +++ src/lisp.h | 136 +++++++++++++++++++++++++------------------------- 2 files changed, 74 insertions(+), 68 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2537cd77fdc..fac2cb5ce70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-09 Stefan Monnier + + * lisp.h (make_lisp_ptr): New macro to replace XSET. + (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC): + Use it. + 2012-09-09 Eli Zaretskii * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the diff --git a/src/lisp.h b/src/lisp.h index 95ea87a15d2..44c2b087caf 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -325,7 +325,7 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 1 }; typedef EMACS_INT Lisp_Object; #define XLI(o) (o) #define XIL(i) (i) -#define LISP_MAKE_RVALUE(o) (0+(o)) +#define LISP_MAKE_RVALUE(o) (0 + (o)) #define LISP_INITIALLY_ZERO 0 enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 }; #endif /* CHECK_LISP_OBJECT_TYPE */ @@ -417,9 +417,9 @@ enum lsb_bits #define XINT(a) (XLI (a) >> INTTYPEBITS) #define XUINT(a) ((EMACS_UINT) XLI (a) >> INTTYPEBITS) #define make_number(N) XIL ((EMACS_INT) (N) << INTTYPEBITS) -#define XSET(var, type, ptr) \ +#define make_lisp_ptr(ptr, type) \ (eassert (XTYPE (XIL ((intptr_t) (ptr))) == 0), /* Check alignment. */ \ - (var) = XIL ((type) | (intptr_t) (ptr))) + XIL ((type) | (intptr_t) (ptr))) #define XPNTR(a) ((intptr_t) (XLI (a) & ~TYPEMASK)) #define XUNTAG(a, type) ((intptr_t) (XLI (a) - (type))) @@ -444,13 +444,13 @@ static EMACS_INT const VALMASK #define XUINT(a) ((EMACS_UINT) (XLI (a) & INTMASK)) #define make_number(N) XIL ((EMACS_INT) (N) & INTMASK) -#define XSET(var, type, ptr) \ - ((var) = XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ - + ((intptr_t) (ptr) & VALMASK))) +#define make_lisp_ptr(ptr, type) \ + (XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ + + ((intptr_t) (ptr) & VALMASK))) #if DATA_SEG_BITS /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers - which were stored in a Lisp_Object */ + which were stored in a Lisp_Object. */ #define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS)) #else #define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK)) @@ -555,15 +555,15 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) /* Construct a Lisp_Object from a value or address. */ #define XSETINT(a, b) (a) = make_number (b) -#define XSETCONS(a, b) XSET (a, Lisp_Cons, b) -#define XSETVECTOR(a, b) XSET (a, Lisp_Vectorlike, b) -#define XSETSTRING(a, b) XSET (a, Lisp_String, b) -#define XSETSYMBOL(a, b) XSET (a, Lisp_Symbol, b) -#define XSETFLOAT(a, b) XSET (a, Lisp_Float, b) +#define XSETCONS(a, b) (a) = make_lisp_ptr (b, Lisp_Cons) +#define XSETVECTOR(a, b) (a) = make_lisp_ptr (b, Lisp_Vectorlike) +#define XSETSTRING(a, b) (a) = make_lisp_ptr (b, Lisp_String) +#define XSETSYMBOL(a, b) (a) = make_lisp_ptr (b, Lisp_Symbol) +#define XSETFLOAT(a, b) (a) = make_lisp_ptr (b, Lisp_Float) /* Misc types. */ -#define XSETMISC(a, b) XSET (a, Lisp_Misc, b) +#define XSETMISC(a, b) (a) = make_lisp_ptr (b, Lisp_Misc) #define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker) /* Pseudovector types. */ @@ -1619,7 +1619,7 @@ typedef struct { int mouse_face_image_state; } Mouse_HLInfo; -/* Data type checking */ +/* Data type checking. */ #define NILP(x) EQ (x, Qnil) @@ -1992,7 +1992,7 @@ struct specbinding { Lisp_Object symbol, old_value; specbinding_func func; - Lisp_Object unused; /* Dividing by 16 is faster than by 12 */ + Lisp_Object unused; /* Dividing by 16 is faster than by 12. */ }; extern struct specbinding *specpdl; @@ -2571,10 +2571,10 @@ extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST; -/* Defined in frame.c */ +/* Defined in frame.c. */ extern Lisp_Object Qframep; -/* Defined in data.c */ +/* Defined in data.c. */ extern Lisp_Object indirect_function (Lisp_Object); extern Lisp_Object find_symbol_value (Lisp_Object); @@ -2621,7 +2621,7 @@ extern void swap_in_global_binding (struct Lisp_Symbol *); extern void syms_of_cmds (void); extern void keys_of_cmds (void); -/* Defined in coding.c */ +/* Defined in coding.c. */ extern Lisp_Object Qcharset; extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, ptrdiff_t, bool, bool, Lisp_Object); @@ -2629,7 +2629,7 @@ extern void init_coding (void); extern void init_coding_once (void); extern void syms_of_coding (void); -/* Defined in character.c */ +/* Defined in character.c. */ EXFUN (Fmax_char, 0) ATTRIBUTE_CONST; extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t); extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t); @@ -2637,21 +2637,21 @@ extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST; extern int multibyte_char_to_unibyte_safe (int) ATTRIBUTE_CONST; extern void syms_of_character (void); -/* Defined in charset.c */ +/* Defined in charset.c. */ extern void init_charset (void); extern void init_charset_once (void); extern void syms_of_charset (void); /* Structure forward declarations. */ struct charset; -/* Defined in composite.c */ +/* Defined in composite.c. */ extern void syms_of_composite (void); -/* Defined in syntax.c */ +/* Defined in syntax.c. */ extern void init_syntax_once (void); extern void syms_of_syntax (void); -/* Defined in fns.c */ +/* Defined in fns.c. */ extern Lisp_Object QCrehash_size, QCrehash_threshold; enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; EXFUN (Fidentity, 1) ATTRIBUTE_CONST; @@ -2685,12 +2685,12 @@ extern Lisp_Object string_to_multibyte (Lisp_Object); extern Lisp_Object string_make_unibyte (Lisp_Object); extern void syms_of_fns (void); -/* Defined in floatfns.c */ +/* Defined in floatfns.c. */ extern double extract_float (Lisp_Object); extern void syms_of_floatfns (void); extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); -/* Defined in fringe.c */ +/* Defined in fringe.c. */ extern void syms_of_fringe (void); extern void init_fringe (void); #ifdef HAVE_WINDOW_SYSTEM @@ -2698,13 +2698,13 @@ extern void mark_fringe_data (void); extern void init_fringe_once (void); #endif /* HAVE_WINDOW_SYSTEM */ -/* Defined in image.c */ +/* Defined in image.c. */ extern Lisp_Object QCascent, QCmargin, QCrelief; extern Lisp_Object QCconversion; extern int x_bitmap_mask (struct frame *, ptrdiff_t); extern void syms_of_image (void); -/* Defined in insdel.c */ +/* Defined in insdel.c. */ extern Lisp_Object Qinhibit_modification_hooks; extern void move_gap (ptrdiff_t); extern void move_gap_both (ptrdiff_t, ptrdiff_t); @@ -2750,7 +2750,7 @@ extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, const char *, ptrdiff_t, ptrdiff_t, bool); extern void syms_of_insdel (void); -/* Defined in dispnew.c */ +/* Defined in dispnew.c. */ #if (defined PROFILING \ && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) _Noreturn void __executable_start (void); @@ -2761,7 +2761,7 @@ extern Lisp_Object sit_for (Lisp_Object, bool, int); extern void init_display (void); extern void syms_of_display (void); -/* Defined in xdisp.c */ +/* Defined in xdisp.c. */ extern Lisp_Object Qinhibit_point_motion_hooks; extern Lisp_Object Qinhibit_redisplay, Qdisplay; extern Lisp_Object Qmenu_bar_update_hook; @@ -2812,13 +2812,13 @@ extern Lisp_Object safe_eval (Lisp_Object); extern int pos_visible_p (struct window *, ptrdiff_t, int *, int *, int *, int *, int *, int *); -/* Defined in xsettings.c */ +/* Defined in xsettings.c. */ extern void syms_of_xsettings (void); /* Defined in vm-limit.c. */ extern void memory_warnings (void *, void (*warnfun) (const char *)); -/* Defined in alloc.c */ +/* Defined in alloc.c. */ extern void check_pure_size (void); extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT); extern void reset_malloc_hooks (void); @@ -2921,7 +2921,7 @@ extern void check_cons_list (void); #endif #ifdef REL_ALLOC -/* Defined in ralloc.c */ +/* Defined in ralloc.c. */ extern void *r_alloc (void **, size_t); extern void r_alloc_free (void **); extern void *r_re_alloc (void **, size_t); @@ -2929,7 +2929,7 @@ extern void r_alloc_reset_variable (void **, void **); extern void r_alloc_inhibit_buffer_relocation (int); #endif -/* Defined in chartab.c */ +/* Defined in chartab.c. */ extern Lisp_Object copy_char_table (Lisp_Object); extern Lisp_Object char_table_ref (Lisp_Object, int); extern Lisp_Object char_table_ref_and_range (Lisp_Object, int, @@ -2947,7 +2947,7 @@ extern void map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Ob extern Lisp_Object uniprop_table (Lisp_Object); extern void syms_of_chartab (void); -/* Defined in print.c */ +/* Defined in print.c. */ extern Lisp_Object Vprin1_to_string_buffer; extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; extern Lisp_Object Qstandard_output; @@ -2964,7 +2964,7 @@ enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; extern int float_to_string (char *, double); extern void syms_of_print (void); -/* Defined in doprnt.c */ +/* Defined in doprnt.c. */ extern ptrdiff_t doprnt (char *, ptrdiff_t, const char *, const char *, va_list); extern ptrdiff_t esprintf (char *, char const *, ...) @@ -3130,7 +3130,7 @@ extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object, extern Lisp_Object build_marker (struct buffer *, ptrdiff_t, ptrdiff_t); extern void syms_of_marker (void); -/* Defined in fileio.c */ +/* Defined in fileio.c. */ extern Lisp_Object Qfile_error; extern Lisp_Object Qfile_exists_p; @@ -3138,7 +3138,7 @@ extern Lisp_Object Qfile_directory_p; extern Lisp_Object Qinsert_file_contents; extern Lisp_Object Qfile_name_history; extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); -EXFUN (Fread_file_name, 6); /* not a normal DEFUN */ +EXFUN (Fread_file_name, 6); /* Not a normal DEFUN. */ extern Lisp_Object close_file_unwind (Lisp_Object); extern Lisp_Object restore_point_unwind (Lisp_Object); extern _Noreturn void report_file_error (const char *, Lisp_Object); @@ -3147,7 +3147,7 @@ extern void syms_of_fileio (void); extern Lisp_Object make_temp_name (Lisp_Object, bool); extern Lisp_Object Qdelete_file; -/* Defined in search.c */ +/* Defined in search.c. */ extern void shrink_regexp_cache (void); extern void restore_search_regs (void); extern void record_unwind_save_match_data (void); @@ -3322,14 +3322,14 @@ extern void init_callproc (void); extern void set_initial_environment (void); extern void syms_of_callproc (void); -/* Defined in doc.c */ +/* Defined in doc.c. */ extern Lisp_Object Qfunction_documentation; extern Lisp_Object read_doc_string (Lisp_Object); extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); extern void syms_of_doc (void); extern int read_bytecode_char (bool); -/* Defined in bytecode.c */ +/* Defined in bytecode.c. */ extern Lisp_Object Qbytecode; extern void syms_of_bytecode (void); extern struct byte_stack *byte_stack_list; @@ -3340,12 +3340,12 @@ extern void unmark_byte_stack (void); extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, ptrdiff_t, Lisp_Object *); -/* Defined in macros.c */ +/* Defined in macros.c. */ extern Lisp_Object Qexecute_kbd_macro; extern void init_macros (void); extern void syms_of_macros (void); -/* Defined in undo.c */ +/* Defined in undo.c. */ extern Lisp_Object Qapply; extern Lisp_Object Qinhibit_read_only; extern void truncate_undo_list (struct buffer *); @@ -3358,7 +3358,7 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object, Lisp_Object); extern void syms_of_undo (void); -/* Defined in textprop.c */ +/* Defined in textprop.c. */ extern Lisp_Object Qfont, Qmouse_face; extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; extern Lisp_Object Qfront_sticky, Qrear_nonsticky; @@ -3366,19 +3366,19 @@ extern Lisp_Object Qminibuffer_prompt; extern void report_interval_modification (Lisp_Object, Lisp_Object); -/* Defined in menu.c */ +/* Defined in menu.c. */ extern void syms_of_menu (void); -/* Defined in xmenu.c */ +/* Defined in xmenu.c. */ extern void syms_of_xmenu (void); -/* Defined in termchar.h */ +/* Defined in termchar.h. */ struct tty_display_info; -/* Defined in termhooks.h */ +/* Defined in termhooks.h. */ struct terminal; -/* Defined in sysdep.c */ +/* Defined in sysdep.c. */ #ifndef HAVE_GET_CURRENT_DIR_NAME extern char *get_current_dir_name (void); #endif @@ -3415,45 +3415,45 @@ extern void unlock_file (Lisp_Object); extern void unlock_buffer (struct buffer *); extern void syms_of_filelock (void); -/* Defined in sound.c */ +/* Defined in sound.c. */ extern void syms_of_sound (void); -/* Defined in category.c */ +/* Defined in category.c. */ extern void init_category_once (void); extern Lisp_Object char_category_set (int); extern void syms_of_category (void); -/* Defined in ccl.c */ +/* Defined in ccl.c. */ extern void syms_of_ccl (void); -/* Defined in dired.c */ +/* Defined in dired.c. */ extern void syms_of_dired (void); extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, bool, Lisp_Object); -/* Defined in term.c */ +/* Defined in term.c. */ extern int *char_ins_del_vector; extern void syms_of_term (void); extern _Noreturn void fatal (const char *msgid, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); -/* Defined in terminal.c */ +/* Defined in terminal.c. */ extern void syms_of_terminal (void); -/* Defined in font.c */ +/* Defined in font.c. */ extern void syms_of_font (void); extern void init_font (void); #ifdef HAVE_WINDOW_SYSTEM -/* Defined in fontset.c */ +/* Defined in fontset.c. */ extern void syms_of_fontset (void); -/* Defined in xfns.c, w32fns.c, or macfns.c */ +/* Defined in xfns.c, w32fns.c, or macfns.c. */ extern Lisp_Object Qfont_param; #endif -/* Defined in xfaces.c */ +/* Defined in xfaces.c. */ extern Lisp_Object Qdefault, Qtool_bar, Qfringe; extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor; extern Lisp_Object Qmode_line_inactive; @@ -3469,26 +3469,26 @@ extern Lisp_Object Vface_alternative_font_registry_alist; extern void syms_of_xfaces (void); #ifdef HAVE_X_WINDOWS -/* Defined in xfns.c */ +/* Defined in xfns.c. */ extern void syms_of_xfns (void); -/* Defined in xsmfns.c */ +/* Defined in xsmfns.c. */ extern void syms_of_xsmfns (void); -/* Defined in xselect.c */ +/* Defined in xselect.c. */ extern void syms_of_xselect (void); -/* Defined in xterm.c */ +/* Defined in xterm.c. */ extern void syms_of_xterm (void); #endif /* HAVE_X_WINDOWS */ #ifdef HAVE_WINDOW_SYSTEM -/* Defined in xterm.c, nsterm.m, w32term.c */ +/* Defined in xterm.c, nsterm.m, w32term.c. */ extern char *x_get_keysym_name (int); #endif /* HAVE_WINDOW_SYSTEM */ #ifdef HAVE_LIBXML2 -/* Defined in xml.c */ +/* Defined in xml.c. */ extern void syms_of_xml (void); extern void xml_cleanup_parser (void); #endif @@ -3499,12 +3499,12 @@ extern int have_menus_p (void); #endif #ifdef HAVE_DBUS -/* Defined in dbusbind.c */ +/* Defined in dbusbind.c. */ void syms_of_dbusbind (void); #endif #ifdef DOS_NT -/* Defined in msdos.c, w32.c */ +/* Defined in msdos.c, w32.c. */ extern char *emacs_root_dir (void); #endif /* DOS_NT */ @@ -3512,7 +3512,7 @@ extern char *emacs_root_dir (void); Used during startup to detect startup of dumped Emacs. */ extern bool initialized; -extern int immediate_quit; /* Nonzero means ^G can quit instantly */ +extern int immediate_quit; /* Nonzero means ^G can quit instantly. */ extern void *xmalloc (size_t); extern void *xzalloc (size_t); @@ -3545,7 +3545,7 @@ extern void init_system_name (void); /* SAFE_ALLOCA normally allocates memory on the stack, but if size is larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */ -enum MAX_ALLOCA { MAX_ALLOCA = 16*1024 }; +enum MAX_ALLOCA { MAX_ALLOCA = 16 * 1024 }; extern Lisp_Object safe_alloca_unwind (Lisp_Object); extern void *record_xmalloc (size_t); From 3231d532c7e6c3ed0a2e58574bec5518404a7f82 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 10 Sep 2012 01:15:24 +0300 Subject: [PATCH 108/216] * lisp/replace.el (replace-regexp-lax-whitespace): New defcustom. (replace-lax-whitespace, query-replace-regexp) (query-replace-regexp-eval, replace-regexp): Doc fix. (perform-replace, replace-highlight): Let-bind isearch-lax-whitespace to replace-lax-whitespace and isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace. * lisp/isearch.el (isearch-query-replace): Let-bind replace-lax-whitespace to isearch-lax-whitespace and replace-regexp-lax-whitespace to isearch-regexp-lax-whitespace. Fixes: debbugs:10885 --- lisp/ChangeLog | 14 ++++++++++++++ lisp/isearch.el | 7 +++---- lisp/replace.el | 24 ++++++++++++++++-------- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f46fbdcc9ed..6ec52876d49 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2012-09-09 Juri Linkov + + * replace.el (replace-regexp-lax-whitespace): New defcustom. + (replace-lax-whitespace, query-replace-regexp) + (query-replace-regexp-eval, replace-regexp): Doc fix. + (perform-replace, replace-highlight): Let-bind + isearch-lax-whitespace to replace-lax-whitespace and + isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace. + + * isearch.el (isearch-query-replace): Let-bind + replace-lax-whitespace to isearch-lax-whitespace and + replace-regexp-lax-whitespace to + isearch-regexp-lax-whitespace. (Bug#10885) + 2012-09-09 Stefan Monnier * eshell/em-unix.el (eshell/sudo): Explicitly drop return value. diff --git a/lisp/isearch.el b/lisp/isearch.el index 328e4eb447f..04f5a7acc2c 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1581,10 +1581,9 @@ way to run word replacements from Isearch is `M-s w ... M-%'." ;; `isearch-no-upper-case-p' in `perform-replace' (search-upper-case nil) (replace-lax-whitespace - (and search-whitespace-regexp - (if isearch-regexp - isearch-regexp-lax-whitespace - isearch-lax-whitespace))) + isearch-lax-whitespace) + (replace-regexp-lax-whitespace + isearch-regexp-lax-whitespace) ;; Set `isearch-recursive-edit' to nil to prevent calling ;; `exit-recursive-edit' in `isearch-done' that terminates ;; the execution of this command when it is non-nil. diff --git a/lisp/replace.el b/lisp/replace.el index b30b671122e..001f7d1a78d 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -35,7 +35,15 @@ (defcustom replace-lax-whitespace nil "Non-nil means `query-replace' matches a sequence of whitespace chars. -When you enter a space or spaces in the strings or regexps to be replaced, +When you enter a space or spaces in the strings to be replaced, +it will match any sequence matched by the regexp `search-whitespace-regexp'." + :type 'boolean + :group 'matching + :version "24.3") + +(defcustom replace-regexp-lax-whitespace nil + "Non-nil means `query-replace-regexp' matches a sequence of whitespace chars. +When you enter a space or spaces in the regexps to be replaced, it will match any sequence matched by the regexp `search-whitespace-regexp'." :type 'boolean :group 'matching @@ -282,7 +290,7 @@ pattern of the old text to the new text, if `case-replace' and all caps, or capitalized, then its replacement is upcased or capitalized.) -If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp +If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -362,7 +370,7 @@ minibuffer. Preserves case in each replacement if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. -If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp +If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -499,7 +507,7 @@ and TO-STRING is also null.)" Preserve case in each match if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. -If `replace-lax-whitespace' is non-nil, a space or spaces in the regexp +If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. @@ -1803,9 +1811,9 @@ make, or the user didn't cancel the call." (let ((isearch-regexp regexp-flag) (isearch-word delimited-flag) (isearch-lax-whitespace - (and replace-lax-whitespace (not regexp-flag))) + replace-lax-whitespace) (isearch-regexp-lax-whitespace - (and replace-lax-whitespace regexp-flag)) + replace-regexp-lax-whitespace) (isearch-case-fold-search case-fold-search) (isearch-forward t)) (isearch-search-fun)))) @@ -2160,9 +2168,9 @@ make, or the user didn't cancel the call." (isearch-regexp regexp-flag) (isearch-word delimited-flag) (isearch-lax-whitespace - (and replace-lax-whitespace (not regexp-flag))) + replace-lax-whitespace) (isearch-regexp-lax-whitespace - (and replace-lax-whitespace regexp-flag)) + replace-regexp-lax-whitespace) (isearch-case-fold-search case-fold-search) (isearch-forward t) (isearch-error nil)) From b8b0239fd0485002d1c761067c9047d1f26dbd4c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 9 Sep 2012 18:03:27 -0700 Subject: [PATCH 109/216] Improve robustness of 'make bootstrap'. Run autogen.sh after bootstrap-clean, to avoid bzr pull issues. * INSTALL, README: Document autogen.sh. * Makefile.in (Makefile): Mark it as precious, since it's updated atomically. (MAKE_CONFIG_STATUS): New macro. (config.status, bootstrap): Use it. This causes 'make bootstrap' to run config.status with the --recheck option, which is more appropriate for a bootstrap. (bootstrap): Run autogen.sh right after cleaning. Don't worry about failures due to missing tools. * autogen.sh: Exit with status 101 when failing due to missing tools. * make-dist: Distribute autogen.sh. Fixes: debbugs:12376 --- ChangeLog | 16 ++++++++++++++++ INSTALL | 6 +++--- Makefile.in | 28 ++++++++++++++++------------ README | 11 ++++++++--- autogen.sh | 2 +- make-dist | 2 +- 6 files changed, 45 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 198670e59ee..7d1c19a535e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2012-09-10 Paul Eggert + + Improve robustness of 'make bootstrap' (Bug#12376). + Run autogen.sh after bootstrap-clean, to avoid bzr pull issues. + * INSTALL, README: Document autogen.sh. + * Makefile.in (Makefile): Mark it as precious, since it's updated + atomically. + (MAKE_CONFIG_STATUS): New macro. + (config.status, bootstrap): Use it. This causes 'make bootstrap' + to run config.status with the --recheck option, which is more + appropriate for a bootstrap. + (bootstrap): Run autogen.sh right after cleaning. Don't worry + about failures due to missing tools. + * autogen.sh: Exit with status 101 when failing due to missing tools. + * make-dist: Distribute autogen.sh. + 2012-09-09 Paul Eggert Assume C89 or later for math functions (Bug#12381). diff --git a/INSTALL b/INSTALL index f0cf5d68db0..4716bbecf99 100644 --- a/INSTALL +++ b/INSTALL @@ -695,9 +695,9 @@ running the `configure' program, you have to perform the following steps. corresponding `Makefile.in' files. This isn't so hard, just a matter of editing in appropriate substitutions for the @...@ constructs. -The `configure' script is built from `configure.ac' by the `autoconf' -program. You need at least the version of autoconf specified in the -AC_PREREQ(...) command to rebuild `configure' from `configure.ac'. +The `configure' script is built from `configure.ac' by the +`autogen.sh' script, which checks that `autoconf' and other build +tools are sufficiently up to date and then runs the build tools. BUILDING GNU EMACS BY HAND diff --git a/Makefile.in b/Makefile.in index 122a35d4416..800f11669d6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -360,15 +360,17 @@ $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) ./config.status -# Don't erase config.status if make is interrupted while refreshing it. -.PRECIOUS: config.status +# Don't erase these files if make is interrupted while refreshing them. +.PRECIOUS: Makefile config.status -config.status: ${srcdir}/configure ${srcdir}/lisp/version.el +MAKE_CONFIG_STATUS = \ if [ -x ./config.status ]; then \ ./config.status --recheck; \ else \ ./configure $(CONFIGURE_FLAGS); \ fi +config.status: ${srcdir}/configure ${srcdir}/lisp/version.el + $(MAKE_CONFIG_STATUS) AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4 @@ -383,6 +385,10 @@ AUTOMAKE_INPUTS = $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am \ $(srcdir)/lib/gnulib.mk $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS) cd $(srcdir) && automake --gnu -a -c lib/Makefile + +# Regenerate files that this makefile would have made, if this makefile +# had been built by Automake. The name 'am--refresh' is for +# compatibility with subsidiary Automake-generated makefiles. am--refresh: $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/src/config.in .PHONY: am--refresh @@ -776,8 +782,6 @@ bootstrap-clean: FRC (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) [ ! -f config.log ] || mv -f config.log config.log~ ${top_bootclean} -## configure; make bootstrap replaces the real config.log from configure -## with the truncated one from config.status. The former is more useful. ### `maintainer-clean' ### Delete everything from the current directory that can be @@ -883,14 +887,14 @@ dvi: .PHONY: bootstrap -## configure; make bootstrap replaces the real config.log from configure -## with the truncated one from config.status. The former is more useful. +# Bootstrapping does the following: +# * Remove files to start from a clean slate. +# * Run autogen.sh, but don't worry about exit status 101 (missing tools). +# * Build Makefile, to build the build procedure itself. +# * Do the actual build. bootstrap: bootstrap-clean FRC - if [ -x ./config.status ]; then \ - ./config.status; \ - else \ - ./configure $(CONFIGURE_FLAGS); \ - fi + cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; } + $(MAKE_CONFIG_STATUS) $(MAKE) $(MFLAGS) info all .PHONY: check-declare diff --git a/README b/README index a11935ee3e8..2c50c5bbb91 100644 --- a/README +++ b/README @@ -41,9 +41,14 @@ The file `configure.ac' is the input used by the autoconf program to construct the `configure' script. Since Emacs has some configuration requirements that autoconf can't meet directly, and for historical reasons, `configure.ac' uses an unholy marriage of custom-baked -configuration code and autoconf macros. If you want to rebuild -`configure' from `configure.ac', you will need to install a recent -version of autoconf and GNU m4. +configuration code and autoconf macros. + +The shell script `autogen.sh' generates 'configure' and other files by +running the GNU build tools autoconf and automake, which in turn use +GNU m4 and Perl. If you want to use it, you will need to install +recent versions of these build tools. This should be needed only if +you edit files like `configure.ac' that specify Emacs's autobuild +procedure. The file `Makefile.in' is a template used by `configure' to create `Makefile'. diff --git a/autogen.sh b/autogen.sh index 9cfaa40eee5..dc8d53eec97 100755 --- a/autogen.sh +++ b/autogen.sh @@ -201,7 +201,7 @@ This is not recommended - see the comments in \`copy_autogen'. Please report any problems with this script to bug-gnu-emacs@gnu.org . EOF - exit 1 + exit 101 # Exit status 101 means tools were missing. fi echo "Your system has the required tools, running autoreconf..." diff --git a/make-dist b/make-dist index b157d9a54d6..28d2ec15214 100755 --- a/make-dist +++ b/make-dist @@ -273,7 +273,7 @@ mkdir ${tempdir} ### README while the rest of the tar file is still unpacking. Whoopee. echo "Making links to top-level files" ln INSTALL README BUGS ${tempdir} -ln ChangeLog Makefile.in configure configure.ac ${tempdir} +ln ChangeLog Makefile.in autogen.sh configure configure.ac ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} From 9b851e2550c1d627413ecc6c626a0dfe1bbbf33b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 9 Sep 2012 21:16:13 -0400 Subject: [PATCH 110/216] New emacs-lisp-byte-code-mode; misc minor changes. * lisp/emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var. (emacs-lisp-byte-code-comment) (emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode): New functions. (eval-sexp-add-defvars): Don't skip defvars in column >0. (eval-defun-2): Remove bogus interactive spec. (lisp-indent-line): Remove redundant whole-exp code, now done in indent-according-to-mode. (save-match-data): Remove redundant indent data. * lisp/emacs-lisp/benchmark.el (benchmark-run, benchmark-run-compiled): Use `declare'. * lisp/gnus/qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. --- lisp/ChangeLog | 15 +++++++ lisp/emacs-lisp/benchmark.el | 6 +-- lisp/emacs-lisp/cl-loaddefs.el | 2 +- lisp/emacs-lisp/cl-macs.el | 8 ++++ lisp/emacs-lisp/lisp-mode.el | 77 +++++++++++++++++++++++++++------- lisp/gnus/ChangeLog | 4 ++ lisp/gnus/qp.el | 20 ++++----- 7 files changed, 101 insertions(+), 31 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ec52876d49..8de59875674 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2012-09-10 Stefan Monnier + + * emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var. + (emacs-lisp-byte-code-comment) + (emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode): + New functions. + (eval-sexp-add-defvars): Don't skip defvars in column >0. + (eval-defun-2): Remove bogus interactive spec. + (lisp-indent-line): Remove redundant whole-exp code, now done in + indent-according-to-mode. + (save-match-data): Remove redundant indent data. + + * emacs-lisp/benchmark.el (benchmark-run, benchmark-run-compiled): + Use `declare'. + 2012-09-09 Juri Linkov * replace.el (replace-regexp-lax-whitespace): New defcustom. diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index 646be3e1b71..9029c81f279 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -53,6 +53,7 @@ FORMS once. Return a list of the total elapsed time for execution, the number of garbage collections that ran, and the time taken by garbage collection. See also `benchmark-run-compiled'." + (declare (indent 1) (debug t)) (unless (natnump repetitions) (setq forms (cons repetitions forms) repetitions 1)) @@ -69,8 +70,6 @@ See also `benchmark-run-compiled'." `(benchmark-elapse ,@forms)) (- gcs-done ,gcs) (- gc-elapsed ,gc))))) -(put 'benchmark-run 'edebug-form-spec t) -(put 'benchmark-run 'lisp-indent-function 2) ;;;###autoload (defmacro benchmark-run-compiled (&optional repetitions &rest forms) @@ -78,6 +77,7 @@ See also `benchmark-run-compiled'." This is like `benchmark-run', but what is timed is a funcall of the byte code obtained by wrapping FORMS in a `lambda' and compiling the result. The overhead of the `lambda's is accounted for." + (declare (indent 1) (debug t)) (unless (natnump repetitions) (setq forms (cons repetitions forms) repetitions 1)) @@ -96,8 +96,6 @@ result. The overhead of the `lambda's is accounted for." (funcall ,lambda-code)))) `(benchmark-elapse (funcall ,code))) (- gcs-done ,gcs) (- gc-elapsed ,gc))))) -(put 'benchmark-run-compiled 'edebug-form-spec t) -(put 'benchmark-run-compiled 'lisp-indent-function 2) ;;;###autoload (defun benchmark (repetitions form) diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index a59beaeb7ac..c12e8ccacb1 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -260,7 +260,7 @@ Remove from SYMBOL's plist the property PROPNAME and its value. ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) -;;;;;; "cl-macs" "cl-macs.el" "9f9bae5b8ccaf325bd59ba9be2b27c44") +;;;;;; "cl-macs" "cl-macs.el" "6d0676869af66e5b5a671f95ee069461") ;;; Generated autoloads from cl-macs.el (autoload 'cl--compiler-macro-list* "cl-macs" "\ diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 312c37261e2..16ac14f8fe9 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1463,8 +1463,15 @@ Valid clauses are: cl--loop-accum-var)))) (defun cl--loop-build-ands (clauses) + "Return various representations of (and . CLAUSES). +CLAUSES is a list of Elisp expressions, where clauses of the form +\(progn E1 E2 E3 .. t) are the focus of particular optimizations. +The return value has shape (COND BODY COMBO) +such that COMBO is equivalent to (and . CLAUSES)." (let ((ands nil) (body nil)) + ;; Look through `clauses', trying to optimize (progn ,@A t) (progn ,@B) ,@C + ;; into (progn ,@A ,@B) ,@C. (while clauses (if (and (eq (car-safe (car clauses)) 'progn) (eq (car (last (car clauses))) t)) @@ -1475,6 +1482,7 @@ Valid clauses are: (cl-cdadr clauses) (list (cadr clauses)))) (cddr clauses))) + ;; A final (progn ,@A t) is moved outside of the `and'. (setq body (cdr (butlast (pop clauses))))) (push (pop clauses) ands))) (setq ands (or (nreverse ands) (list t))) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 666e31f690f..64aac4b81db 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -431,6 +431,61 @@ if that value is non-nil." (add-hook 'completion-at-point-functions 'lisp-completion-at-point nil 'local)) +;;; Emacs Lisp Byte-Code mode + +(eval-and-compile + (defconst emacs-list-byte-code-comment-re + (concat "\\(#\\)@\\([0-9]+\\) " + ;; Make sure it's a docstring and not a lazy-loaded byte-code. + "\\(?:[^(]\\|([^\"]\\)"))) + +(defun emacs-lisp-byte-code-comment (end &optional _point) + "Try to syntactically mark the #@NNN ....^_ docstrings in byte-code files." + (let ((ppss (syntax-ppss))) + (when (and (nth 4 ppss) + (eq (char-after (nth 8 ppss)) ?#)) + (let* ((n (save-excursion + (goto-char (nth 8 ppss)) + (when (looking-at emacs-list-byte-code-comment-re) + (string-to-number (match-string 2))))) + ;; `maxdiff' tries to make sure the loop below terminates. + (maxdiff n)) + (when n + (let* ((bchar (match-end 2)) + (b (position-bytes bchar))) + (goto-char (+ b n)) + (while (let ((diff (- (position-bytes (point)) b n))) + (unless (zerop diff) + (when (> diff maxdiff) (setq diff maxdiff)) + (forward-char (- diff)) + (setq maxdiff (if (> diff 0) diff + (max (1- maxdiff) 1))) + t)))) + (if (<= (point) end) + (put-text-property (1- (point)) (point) + 'syntax-table + (string-to-syntax "> b")) + (goto-char end))))))) + +(defun emacs-lisp-byte-code-syntax-propertize (start end) + (emacs-lisp-byte-code-comment end (point)) + (funcall + (syntax-propertize-rules + (emacs-list-byte-code-comment-re + (1 (prog1 "< b" (emacs-lisp-byte-code-comment end (point)))))) + start end)) + +(add-to-list 'auto-mode-alist '("\\.elc\\'" . emacs-lisp-byte-code-mode)) +(define-derived-mode emacs-lisp-byte-code-mode emacs-lisp-mode + "Elisp-Byte-Code" + "Major mode for *.elc files." + ;; TODO: Add way to disassemble byte-code under point. + (setq-local open-paren-in-column-0-is-defun-start nil) + (setq-local syntax-propertize-function + #'emacs-lisp-byte-code-syntax-propertize)) + +;;; Generic Lisp mode. + (defvar lisp-mode-map (let ((map (make-sparse-keymap)) (menu-map (make-sparse-keymap "Lisp"))) @@ -730,10 +785,12 @@ POS specifies the starting position where EXP was found and defaults to point." (let ((vars ())) (goto-char (point-min)) (while (re-search-forward - "^(def\\(?:var\\|const\\|custom\\)[ \t\n]+\\([^; '()\n\t]+\\)" + "(def\\(?:var\\|const\\|custom\\)[ \t\n]+\\([^; '()\n\t]+\\)" pos t) (let ((var (intern (match-string 1)))) - (unless (special-variable-p var) + (and (not (special-variable-p var)) + (save-excursion + (zerop (car (syntax-ppss (match-beginning 0))))) (push var vars)))) `(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp))))) @@ -820,7 +877,6 @@ if it already has a value.\) With argument, insert value in current buffer after the defun. Return the result of evaluation." - (interactive "P") ;; FIXME: the print-length/level bindings should only be applied while ;; printing, not while evaluating. (let ((debug-on-error eval-expression-debug-on-error) @@ -925,6 +981,7 @@ rigidly along with this one." (if (or (null indent) (looking-at "\\s<\\s<\\s<")) ;; Don't alter indentation of a ;;; comment line ;; or a line that starts in a string. + ;; FIXME: inconsistency: comment-indent moves ;;; to column 0. (goto-char (- (point-max) pos)) (if (and (looking-at "\\s<") (not (looking-at "\\s<\\s<"))) ;; Single-semicolon comment lines should be indented @@ -939,18 +996,7 @@ rigidly along with this one." ;; If initial point was within line's indentation, ;; position after the indentation. Else stay at same point in text. (if (> (- (point-max) pos) (point)) - (goto-char (- (point-max) pos))) - ;; If desired, shift remaining lines of expression the same amount. - (and whole-exp (not (zerop shift-amt)) - (save-excursion - (goto-char beg) - (forward-sexp 1) - (setq end (point)) - (goto-char beg) - (forward-line 1) - (setq beg (point)) - (> end beg)) - (indent-code-rigidly beg end shift-amt))))) + (goto-char (- (point-max) pos)))))) (defvar calculate-lisp-indent-last-sexp) @@ -1230,7 +1276,6 @@ Lisp function does not specify a special indentation." (put 'prog2 'lisp-indent-function 2) (put 'save-excursion 'lisp-indent-function 0) (put 'save-restriction 'lisp-indent-function 0) -(put 'save-match-data 'lisp-indent-function 0) (put 'save-current-buffer 'lisp-indent-function 0) (put 'let 'lisp-indent-function 1) (put 'let* 'lisp-indent-function 1) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d9f80103435..5644c394f7e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2012-09-10 Stefan Monnier + + * qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. + 2012-09-07 Chong Yidong * gnus-util.el diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index bfa1fe0a6d4..c4487c68b5c 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -53,14 +53,7 @@ them into characters should be done separately." ;; or both of which are lowercase letters in "abcdef", is ;; formally illegal. A robust implementation might choose to ;; recognize them as the corresponding uppercase letters.'' - (let ((case-fold-search t) - (decode-hex #'(lambda (n1 n2) - (+ (* (if (<= n1 ?9) (- n1 ?0) - (if (<= n1 ?F) (+ (- n1 ?A) 10) - (+ (- n1 ?a) 10))) 16) - (if (<= n2 ?9) (- n2 ?0) - (if (<= n2 ?F) (+ (- n2 ?A) 10) - (+ (- n2 ?a) 10))))))) + (let ((case-fold-search t)) (narrow-to-region from to) ;; Do this in case we're called from Gnus, say, in a buffer ;; which already contains non-ASCII characters which would @@ -78,8 +71,15 @@ them into characters should be done separately." (let* ((n (/ (- (match-end 0) (point)) 3)) (str (make-string n 0))) (dotimes (i n) - (aset str i (funcall decode-hex (char-after (1+ (point))) - (char-after (+ 2 (point))))) + (let ((n1 (char-after (1+ (point)))) + (n2 (char-after (+ 2 (point))))) + (aset str i + (+ (* 16 (- n1 (if (<= n1 ?9) ?0 + (if (<= n1 ?F) (- ?A 10) + (- ?a 10))))) + (- n2 (if (<= n2 ?9) ?0 + (if (<= n2 ?F) (- ?A 10) + (- ?a 10))))))) (forward-char 3)) (delete-region (match-beginning 0) (match-end 0)) (insert str))) From ff55dfe8323e7d261f12007bf7ff6fef9396be09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 9 Sep 2012 18:17:23 -0700 Subject: [PATCH 111/216] Parenthesize macro bodies. * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL) (XSETFLOAT, XSETMISC): Parenthesize. --- src/ChangeLog | 5 +++++ src/lisp.h | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fac2cb5ce70..bde130fe29a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-10 Paul Eggert + + * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL) + (XSETFLOAT, XSETMISC): Parenthesize macro bodies. + 2012-09-09 Stefan Monnier * lisp.h (make_lisp_ptr): New macro to replace XSET. diff --git a/src/lisp.h b/src/lisp.h index 44c2b087caf..240e8c08a87 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -554,16 +554,16 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) /* Construct a Lisp_Object from a value or address. */ -#define XSETINT(a, b) (a) = make_number (b) -#define XSETCONS(a, b) (a) = make_lisp_ptr (b, Lisp_Cons) -#define XSETVECTOR(a, b) (a) = make_lisp_ptr (b, Lisp_Vectorlike) -#define XSETSTRING(a, b) (a) = make_lisp_ptr (b, Lisp_String) -#define XSETSYMBOL(a, b) (a) = make_lisp_ptr (b, Lisp_Symbol) -#define XSETFLOAT(a, b) (a) = make_lisp_ptr (b, Lisp_Float) +#define XSETINT(a, b) ((a) = make_number (b)) +#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) +#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) +#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) +#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) +#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) /* Misc types. */ -#define XSETMISC(a, b) (a) = make_lisp_ptr (b, Lisp_Misc) +#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) #define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker) /* Pseudovector types. */ From d105a573fced502081e0dd5b00a86dd3b7bdd89a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 10 Sep 2012 11:25:10 +0800 Subject: [PATCH 112/216] * fns.c (Fdelq, Fdelete): Doc fix. --- src/ChangeLog | 4 ++++ src/fns.c | 33 +++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bde130fe29a..548c80b3b85 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-10 Chong Yidong + + * fns.c (Fdelq, Fdelete): Doc fix. + 2012-09-10 Paul Eggert * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL) diff --git a/src/fns.c b/src/fns.c index 20770af67d4..95450c5e911 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1527,11 +1527,14 @@ The value is actually the first element of LIST whose cdr equals KEY. */) } DEFUN ("delq", Fdelq, Sdelq, 2, 2, 0, - doc: /* Delete by side effect any occurrences of ELT as a member of LIST. -The modified LIST is returned. Comparison is done with `eq'. -If the first member of LIST is ELT, there is no way to remove it by side effect; -therefore, write `(setq foo (delq element foo))' -to be sure of changing the value of `foo'. */) + doc: /* Delete members of LIST which are `eq' to ELT, and return the result. +More precisely, this function skips any members `eq' to ELT at the +front of LIST, then removes members `eq' to ELT from the remaining +sublist by modifying its list structure, then returns the resulting +list. + +Write `(setq foo (delq element foo))' to be sure of correctly changing +the value of a list `foo'. */) (register Lisp_Object elt, Lisp_Object list) { register Lisp_Object tail, prev; @@ -1559,13 +1562,19 @@ to be sure of changing the value of `foo'. */) } DEFUN ("delete", Fdelete, Sdelete, 2, 2, 0, - doc: /* Delete by side effect any occurrences of ELT as a member of SEQ. -SEQ must be a list, a vector, or a string. -The modified SEQ is returned. Comparison is done with `equal'. -If SEQ is not a list, or the first member of SEQ is ELT, deleting it -is not a side effect; it is simply using a different sequence. -Therefore, write `(setq foo (delete element foo))' -to be sure of changing the value of `foo'. */) + doc: /* Delete members of SEQ which are `equal' to ELT, and return the result. +SEQ must be a sequence (i.e. a list, a vector, or a string). +The return value is a sequence of the same type. + +If SEQ is a list, this behaves like `delq', except that it compares +with `equal' instead of `eq'. In particular, it may remove elements +by altering the list structure. + +If SEQ is not a list, deletion is never performed destructively; +instead this function creates and returns a new vector or string. + +Write `(setq foo (delete element foo))' to be sure of correctly +changing the value of a sequence `foo'. */) (Lisp_Object elt, Lisp_Object seq) { if (VECTORP (seq)) From a31a4cdacb196cc96dcb9bd229edb1d635e01344 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 10 Sep 2012 06:18:11 -0400 Subject: [PATCH 113/216] Auto-commit of generated files. --- autogen/config.in | 16 ---------------- autogen/configure | 38 +------------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index 5007eed94e8..10969fd99c2 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -157,10 +157,6 @@ along with GNU Emacs. If not, see . */ */ #undef FIRST_PTY_LETTER -/* Define if the float library doesn't handle errors by either setting errno, - or signaling SIGFPE. */ -#undef FLOAT_CHECK_DOMAIN - /* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ #if defined __OPTIMIZE__ && __OPTIMIZE__ @@ -371,9 +367,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `fmod' function. */ -#undef HAVE_FMOD - /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK @@ -386,9 +379,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if using the freetype and fontconfig libraries. */ #undef HAVE_FREETYPE -/* Define to 1 if you have the `frexp' function. */ -#undef HAVE_FREXP - /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO @@ -540,9 +530,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define if you have the functions acosh, asinh, and atanh. */ -#undef HAVE_INVERSE_HYPERBOLIC - /* Define to 1 if you have the jpeg library (-ljpeg). */ #undef HAVE_JPEG @@ -1182,9 +1169,6 @@ along with GNU Emacs. If not, see . */ /* Define if XEditRes should not be used. */ #undef NO_EDITRES -/* Define to 1 if you don't have struct exception in math.h. */ -#undef NO_MATHERR - /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O diff --git a/autogen/configure b/autogen/configure index aa1235d8c27..3621eee77c6 100755 --- a/autogen/configure +++ b/autogen/configure @@ -8887,38 +8887,6 @@ $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 -$as_echo_n "checking for struct exception... " >&6; } -if test "${emacs_cv_struct_exception+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_struct_exception=yes -else - emacs_cv_struct_exception=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 -$as_echo "$emacs_cv_struct_exception" >&6; } -HAVE_EXCEPTION=$emacs_cv_struct_exception -if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then - -$as_echo "#define NO_MATHERR 1" >>confdefs.h - -fi - @@ -13209,7 +13177,7 @@ esac for ac_func in gethostname \ closedir getrusage get_current_dir_name \ -lrand48 logb frexp fmod cbrt setsid \ +lrand48 logb cbrt setsid \ fpathconf select euidaccess getpagesize setlocale \ utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ __fpending strsignal setitimer \ @@ -14858,10 +14826,6 @@ $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h $as_echo "#define CLASH_DETECTION 1" >>confdefs.h - - - - ## Note: PTYs are broken on darwin <6. Use at your own risk. $as_echo "#define HAVE_PTYS 1" >>confdefs.h From 8c718c585297ef4faaa4d30f5d0a7744dd6ed1bf Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 10 Sep 2012 09:37:53 -0400 Subject: [PATCH 114/216] nt/config.nt: Sync with autogen/config.in. (FLOAT_CHECK_DOMAIN, HAVE_FMOD, HAVE_FREXP) (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove. --- nt/ChangeLog | 6 ++++++ nt/config.nt | 16 ---------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index fd528315e2a..49da46ad946 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,9 @@ +2012-09-10 Juanma Barranquero + + * config.nt: Sync with autogen/config.in. + (FLOAT_CHECK_DOMAIN, HAVE_FMOD, HAVE_FREXP) + (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove. + 2012-09-08 Eli Zaretskii * configure.bat : Don't leave it set in the diff --git a/nt/config.nt b/nt/config.nt index 5dc171bae44..ee62b6d2242 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -161,10 +161,6 @@ along with GNU Emacs. If not, see . */ */ #define FIRST_PTY_LETTER 'a' -/* Define if the float library doesn't handle errors by either setting errno, - or signaling SIGFPE. */ -#undef FLOAT_CHECK_DOMAIN - /* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ #if defined __OPTIMIZE__ && __OPTIMIZE__ @@ -377,9 +373,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `fmod' function. */ -#define HAVE_FMOD 1 - /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK @@ -392,9 +385,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if using the freetype and fontconfig libraries. */ #undef HAVE_FREETYPE -/* Define to 1 if you have the `frexp' function. */ -#define HAVE_FREXP 1 - /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO @@ -549,9 +539,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define if you have the functions acosh, asinh, and atanh. */ -#undef HAVE_INVERSE_HYPERBOLIC - /* Define to 1 if you have the jpeg library (-ljpeg). */ #undef HAVE_JPEG @@ -1192,9 +1179,6 @@ along with GNU Emacs. If not, see . */ /* Define if XEditRes should not be used. */ #undef NO_EDITRES -/* Define to 1 if you don't have struct exception in math.h. */ -#define NO_MATHERR 1 - /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O From cdff2ce78c32bbeb6442c62605b61d3af92e812d Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 10 Sep 2012 10:33:08 -0400 Subject: [PATCH 115/216] Mention diff-remove-trailing-whitespace. --- etc/NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 49860eab98a..9f46e49b96f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -355,6 +355,9 @@ The variable `diff-use-changed-face' defines whether to use the face `diff-changed', or `diff-removed' and `diff-added' to highlight changes in context diffs. +*** The new command `diff-remove-trailing-whitespace' fixes trailing +whitespace problems introduced by the diff. + ** Ediff now uses the same color scheme as Diff mode on high color displays. From 0780c517047149e025890fcbfc4e7afdfa5e10f3 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 10 Sep 2012 10:40:13 -0400 Subject: [PATCH 116/216] * vc/diff-mode.el (diff-mode-menu): diff-remove-trailing-whitespace. --- lisp/ChangeLog | 5 +++++ lisp/vc/diff-mode.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8de59875674..47471f508f0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-10 Dan Nicolaescu + + * vc/diff-mode.el (diff-mode-menu): Bind + diff-remove-trailing-whitespace. + 2012-09-10 Stefan Monnier * emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index c6a9371ea9a..11ec785b647 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -178,6 +178,8 @@ when editing big diffs)." ["Unified -> Context" diff-unified->context :help "Convert unified diffs to context diffs"] ;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)] + ["Remove trailing whitespace" diff-remove-trailing-whitespace + :help "Remove trailing whitespace problems introduced by the diff"] ["Show trailing whitespace" whitespace-mode :style toggle :selected (bound-and-true-p whitespace-mode) :help "Show trailing whitespace in modified lines"] From 399a361b882606ab0e67a164f8fb7af6464f3235 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 10 Sep 2012 17:52:15 +0200 Subject: [PATCH 117/216] lisp/custom.el (custom-theme-load-confirm): Remove unneeded assignment. --- lisp/ChangeLog | 4 ++++ lisp/custom.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 47471f508f0..0f1b744f427 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-10 Juanma Barranquero + + * custom.el (custom-theme-load-confirm): Remove unneeded assignment. + 2012-09-10 Dan Nicolaescu * vc/diff-mode.el (diff-mode-menu): Bind diff --git a/lisp/custom.el b/lisp/custom.el index 3eb2895888d..1f0729cfd97 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1227,7 +1227,7 @@ query also about adding HASH to `custom-safe-themes'." (save-window-excursion (rename-buffer "*Custom Theme*" t) (emacs-lisp-mode) - (setq window (pop-to-buffer (current-buffer))) + (pop-to-buffer (current-buffer)) (goto-char (point-min)) (prog1 (when (y-or-n-p "Loading a theme can run Lisp code. Really load? ") ;; Offer to save to `custom-safe-themes'. From 04e082b0dd7d290036e2e691f65c467d8ac606c0 Mon Sep 17 00:00:00 2001 From: Michael Mauger Date: Mon, 10 Sep 2012 15:22:53 -0400 Subject: [PATCH 118/216] * progmodes/sql.el: Version 3.1 (sql-db2-escape-newlines): New variable. (sql-escape-newlines-filter): Use it. --- etc/NEWS | 8 ++++++++ lisp/ChangeLog | 6 ++++++ lisp/progmodes/sql.el | 42 +++++++++++++++++++++++++++++------------- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 9f46e49b96f..ef68e2e561e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -344,6 +344,14 @@ python-describe-symbol | python-eldoc-at-point *** Accepts \r and \f as whitespace. +** SQL Mode + +*** DB2 added `sql-db2-escape-newlines' + +If non-nil, newlines sent to the command interpreter will be escaped +by a backslash. The default does not escape the newlines and assumes +that the sql statement will be terminated by a semicolon. + ** Diff mode Faces for changes now use the same diff color scheme as in modern VCSes diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f1b744f427..a8bf45b6f90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-10 Michael R. Mauger + + * progmodes/sql.el: Version 3.1 + (sql-db2-escape-newlines): New variable. + (sql-escape-newlines-filter): Use it. + 2012-09-10 Juanma Barranquero * custom.el (custom-theme-load-confirm): Remove unneeded assignment. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 030cc02f3f4..f3ecbe3fc3d 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4,7 +4,7 @@ ;; Author: Alex Schroeder ;; Maintainer: Michael Mauger -;; Version: 3.0 +;; Version: 3.1 ;; Keywords: comm languages processes ;; URL: http://savannah.gnu.org/projects/emacs/ @@ -218,9 +218,12 @@ ;; Michael Mauger -- improved product support ;; Drew Adams -- Emacs 20 support ;; Harald Maier -- sql-send-string -;; Stefan Monnier -- font-lock corrections; code polish +;; Stefan Monnier -- font-lock corrections; +;; code polish ;; Paul Sleigh -- MySQL keyword enhancement ;; Andrew Schein -- sql-port bug +;; Ian Bjorhovde -- db2 escape newlines +;; incorrectly enabled by default @@ -879,6 +882,16 @@ In older versions of SQL*Plus, this was the SET SCAN OFF command." :type 'boolean :group 'SQL) +(defcustom sql-db2-escape-newlines nil + "Non-nil if newlines should be escaped by a backslash in DB2 SQLi. + +When non-nil, Emacs will automatically insert a space and +backslash prior to every newline in multi-line SQL statements as +they are submitted to an interactive DB2 session." + :version "24.3" + :type 'boolean + :group 'SQL) + ;; Customization for SQLite (defcustom sql-sqlite-program (or (executable-find "sqlite3") @@ -3188,20 +3201,23 @@ Placeholders are words starting with an ampersand like &this." ;; Using DB2 interactively, newlines must be escaped with " \". ;; The space before the backslash is relevant. + (defun sql-escape-newlines-filter (string) "Escape newlines in STRING. Every newline in STRING will be preceded with a space and a backslash." - (let ((result "") (start 0) mb me) - (while (string-match "\n" string start) - (setq mb (match-beginning 0) - me (match-end 0) - result (concat result - (substring string start mb) - (if (and (> mb 1) - (string-equal " \\" (substring string (- mb 2) mb))) - "" " \\\n")) - start me)) - (concat result (substring string start)))) + (if (not sql-db2-escape-newlines) + string + (let ((result "") (start 0) mb me) + (while (string-match "\n" string start) + (setq mb (match-beginning 0) + me (match-end 0) + result (concat result + (substring string start mb) + (if (and (> mb 1) + (string-equal " \\" (substring string (- mb 2) mb))) + "" " \\\n")) + start me)) + (concat result (substring string start))))) From 16130a58689c3e24a159dbbd7cab000a28511cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 10 Sep 2012 23:01:45 +0200 Subject: [PATCH 119/216] * nsterm.m (ns_update_begin): Set clip path to whole view by using NSBezierPath. Fixes: debbugs:12131 --- src/ChangeLog | 5 +++++ src/nsterm.m | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 548c80b3b85..412321563ba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-10 Jan Djärv + + * nsterm.m (ns_update_begin): Set clip path to whole view by using + NSBezierPath (Bug#12131). + 2012-09-10 Chong Yidong * fns.c (Fdelq, Fdelete): Doc fix. diff --git a/src/nsterm.m b/src/nsterm.m index 74a3d858710..798c9758376 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -627,6 +627,8 @@ ns_update_begin (struct frame *f) -------------------------------------------------------------------------- */ { NSView *view = FRAME_NS_VIEW (f); + NSRect r = [view frame]; + NSBezierPath *bp = [NSBezierPath bezierPath]; NSTRACE (ns_update_begin); ns_update_auto_hide_menu_bar (); @@ -634,6 +636,13 @@ ns_update_begin (struct frame *f) ns_updating_frame = f; [view lockFocus]; + /* drawRect may have been called for say the minibuffer, and then clip path + is for the minibuffer. But the display engine may draw more because + we have set the frame as garbaged. So reset clip path to the whole + view. */ + [bp appendBezierPathWithRect: r]; + [bp setClip]; + #ifdef NS_IMPL_GNUSTEP uRect = NSMakeRect (0, 0, 0, 0); #endif From 6fda35f2b3e3ce3c7dcc05f230f60c51c4c42e60 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 10 Sep 2012 18:20:56 -0700 Subject: [PATCH 120/216] * xdisp.c (Qinhibit_debug_on_message): Now static. --- src/ChangeLog | 4 ++++ src/xdisp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 412321563ba..4eda17da3a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-11 Paul Eggert + + * xdisp.c (Qinhibit_debug_on_message): Now static. + 2012-09-10 Jan Djärv * nsterm.m (ns_update_begin): Set clip path to whole view by using diff --git a/src/xdisp.c b/src/xdisp.c index bec9ec91d2f..a7913768d8a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -364,7 +364,7 @@ static Lisp_Object Qslice; Lisp_Object Qcenter; static Lisp_Object Qmargin, Qpointer; static Lisp_Object Qline_height; -Lisp_Object Qinhibit_debug_on_message; +static Lisp_Object Qinhibit_debug_on_message; /* These setters are used only in this file, so they can be private. */ static inline void From c990426a9883c1bd1782e6b117184b654eecda67 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 10 Sep 2012 19:28:27 -0700 Subject: [PATCH 121/216] Simplify, document, and port floating-point. The porting part of this patch fixes bugs on non-IEEE platforms with frexp, ldexp, logb. * admin/CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove. * configure.ac (logb, cbrt): Do not check for these functions, as they are not being used. * doc/lispref/numbers.texi (Float Basics, Arithmetic Operations, Math Functions): Document that / and mod (with floating point arguments), along with asin, acos, log, log10, expt and sqrt, return special values instead of signaling exceptions. (Float Basics): Document that logb operates on the absolute value of its argument. (Math Functions): Document that (log ARG BASE) also returns NaN if BASE is negative. Document that (expt X Y) returns NaN if X is a finite negative number and Y a finite non-integer. * etc/NEWS: Document NaNs versus signaling-error change. * src/data.c, src/lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error): Now static. * src/floatfns.c: Simplify discussion of functions that Emacs doesn't support, by removing commented-out code and briefly listing the C89 functions excluded. The commented-out stuff was confusing maintenance, e.g., we thought we needed cbrt but it was commented out. (logb): Remove decl; no longer needed. (isfinite): New macro, if not already supplied. (isnan): Don't replace any existing macro. (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp are present on all C89 platforms. (Ffrexp): Do not special-case zero, as frexp does the right thing for that case. (Flogb): Do not use logb, as it doesn't have the desired meaning on hosts that use non-base-2 floating point. Instead, stick with frexp, which is C89 anyway. Do not pass an infinity or a NaN to frexp, to avoid getting an unspecified result. --- ChangeLog | 6 + admin/CPP-DEFINES | 4 - admin/ChangeLog | 5 + configure.ac | 6 +- doc/lispref/ChangeLog | 13 +++ doc/lispref/numbers.texi | 35 +++--- etc/ChangeLog | 5 + etc/NEWS | 8 ++ src/ChangeLog | 21 ++++ src/data.c | 4 +- src/floatfns.c | 231 ++++----------------------------------- src/lisp.h | 3 +- 12 files changed, 105 insertions(+), 236 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d1c19a535e..3d6d5020b0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-11 Paul Eggert + + Simplify, document, and port floating-point (Bug#12381). + * configure.ac (logb, cbrt): Do not check for these functions, + as they are not being used. + 2012-09-10 Paul Eggert Improve robustness of 'make bootstrap' (Bug#12376). diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index b40ba78e20d..cf6ffee2c63 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -120,7 +120,6 @@ HAVE_ATTRIBUTE_ALIGNED HAVE_BDFFONT HAVE_BOXES HAVE_C99_STRTOLD -HAVE_CBRT HAVE_CFMAKERAW HAVE_CFSETSPEED HAVE_CLOCK_GETTIME @@ -251,7 +250,6 @@ HAVE_LIBXMU HAVE_LINUX_VERSION_H HAVE_LOCALTIME_R HAVE_LOCAL_SOCKETS -HAVE_LOGB HAVE_LONG_FILE_NAMES HAVE_LONG_LONG_INT HAVE_LRAND48 @@ -574,7 +572,6 @@ getpid isatty kill link -logb lseek mkdir mktemp @@ -616,7 +613,6 @@ fopen getpid index isatty -logb lseek mkdir mktemp diff --git a/admin/ChangeLog b/admin/ChangeLog index 2c61f437981..b70067d7465 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Paul Eggert + + Simplify, document, and port floating-point (Bug#12381). + * CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove. + 2012-09-09 Paul Eggert Assume C89 or later for math functions (Bug#12381). diff --git a/configure.ac b/configure.ac index 97e967d8043..9491c1da8d5 100644 --- a/configure.ac +++ b/configure.ac @@ -2689,8 +2689,8 @@ if test $emacs_cv_netdb_declares_h_errno = yes; then AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) fi -# fmod, logb, and frexp are found in -lm on most systems. -# On HPUX 9.01, -lm does not contain logb, so check for sqrt. +# sqrt and other floating-point functions such as fmod and frexp +# are found in -lm on most systems. AC_CHECK_LIB(m, sqrt) # Check for mail-locking functions in a "mail" library. Probably this should @@ -2770,7 +2770,7 @@ AC_SUBST(BLESSMAIL_TARGET) AC_CHECK_FUNCS(gethostname \ closedir getrusage get_current_dir_name \ -lrand48 logb cbrt setsid \ +lrand48 setsid \ fpathconf select euidaccess getpagesize setlocale \ utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ __fpending strsignal setitimer \ diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ceb199dae88..ce99c81a912 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,16 @@ +2012-09-11 Paul Eggert + + Simplify, document, and port floating-point (Bug#12381). + * numbers.texi (Float Basics, Arithmetic Operations, Math Functions): + Document that / and mod (with floating point arguments), along + with asin, acos, log, log10, expt and sqrt, return special values + instead of signaling exceptions. + (Float Basics): Document that logb operates on the absolute value + of its argument. + (Math Functions): Document that (log ARG BASE) also returns NaN if + BASE is negative. Document that (expt X Y) returns NaN if X is a + finite negative number and Y a finite non-integer. + 2012-09-09 Chong Yidong * lists.texi (Sets And Lists): Explain that the return value for diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 17f3ee099bd..7c9672a38c0 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -196,6 +196,14 @@ numerical functions return such values in cases where there is no correct answer. For example, @code{(/ 0.0 0.0)} returns a NaN. (NaN values can also carry a sign, but for practical purposes there's no significant difference between different NaN values in Emacs Lisp.) + +When a function is documented to return a NaN, it returns an +implementation-defined value when Emacs is running on one of the +now-rare platforms that do not use @acronym{IEEE} floating point. For +example, @code{(log -1.0)} typically returns a NaN, but on +non-@acronym{IEEE} platforms it returns an implementation-defined +value. + Here are the read syntaxes for these special floating point values: @table @asis @@ -241,7 +249,7 @@ numbers. @defun logb number This function returns the binary exponent of @var{number}. More -precisely, the value is the logarithm of @var{number} base 2, rounded +precisely, the value is the logarithm of |@var{number}| base 2, rounded down to an integer. @example @@ -694,7 +702,8 @@ arguments. It also permits floating point arguments; it rounds the quotient downward (towards minus infinity) to an integer, and uses that quotient to compute the remainder. -An @code{arith-error} results if @var{divisor} is 0. +If @var{divisor} is zero, @code{mod} signals an @code{arith-error} +error if both arguments are integers, and returns a NaN otherwise. @example @group @@ -1096,8 +1105,8 @@ pi/2 @tex @math{\pi/2} @end tex -(inclusive) whose sine is @var{arg}; if, however, @var{arg} is out of -range (outside [@minus{}1, 1]), it signals a @code{domain-error} error. +(inclusive) whose sine is @var{arg}. If @var{arg} is out of range +(outside [@minus{}1, 1]), @code{asin} returns a NaN. @end defun @defun acos arg @@ -1108,8 +1117,8 @@ pi @tex @math{\pi} @end tex -(inclusive) whose cosine is @var{arg}; if, however, @var{arg} is out -of range (outside [@minus{}1, 1]), it signals a @code{domain-error} error. +(inclusive) whose cosine is @var{arg}. If @var{arg} is out of range +(outside [@minus{}1, 1]), @code{acos} returns a NaN. @end defun @defun atan y &optional x @@ -1141,8 +1150,8 @@ This is the exponential function; it returns @math{e} to the power @defun log arg &optional base This function returns the logarithm of @var{arg}, with base @var{base}. If you don't specify @var{base}, the natural base -@math{e} is used. If @var{arg} is negative, it signals a -@code{domain-error} error. +@math{e} is used. If @var{arg} or @var{base} is negative, @code{log} +returns a NaN. @end defun @ignore @@ -1160,21 +1169,21 @@ lose accuracy. @end ignore @defun log10 arg -This function returns the logarithm of @var{arg}, with base 10. If -@var{arg} is negative, it signals a @code{domain-error} error. -@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}, at least -approximately. +This function returns the logarithm of @var{arg}, with base 10: +@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}. @end defun @defun expt x y This function returns @var{x} raised to power @var{y}. If both arguments are integers and @var{y} is positive, the result is an integer; in this case, overflow causes truncation, so watch out. +If @var{x} is a finite negative number and @var{y} is a finite +non-integer, @code{expt} returns a NaN. @end defun @defun sqrt arg This returns the square root of @var{arg}. If @var{arg} is negative, -it signals a @code{domain-error} error. +@code{sqrt} returns a NaN. @end defun In addition, Emacs defines the following common mathematical diff --git a/etc/ChangeLog b/etc/ChangeLog index aa788275256..11e7e5ca108 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Paul Eggert + + Simplify, document, and port floating-point (Bug#12381). + * NEWS: Document NaNs versus signaling-error change. + 2012-09-04 Paul Eggert Give more-useful info on a fatal error (Bug#12328). diff --git a/etc/NEWS b/etc/NEWS index ef68e2e561e..af4bcf11dbb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -729,6 +729,14 @@ table, but with a different prefix. must be in the range 1000..9999. It now works with any year supported by the underlying C implementation. +** Floating point + +*** When floating point functions such as `log' are given invalid +arguments, e.g., (log -1.0), they now uniformly return special values +such as NaNs instead of signaling errors. Previously, these functions +returned NaNs on some platforms but signaled errors on others. The affected +functions are acos, asin, tan, exp, expt, log, log10, sqrt, and mod. + ** New function file-name-base. ** New function `tty-top-frame' returns the topmost frame of a text terminal. diff --git a/src/ChangeLog b/src/ChangeLog index 4eda17da3a7..0e5bbfd2524 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,26 @@ 2012-09-11 Paul Eggert + Simplify, document, and port floating-point (Bug#12381). + The porting part of this patch fixes bugs on non-IEEE platforms + with frexp, ldexp, logb. + * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error): + Now static. + * floatfns.c: Simplify discussion of functions that Emacs doesn't + support, by removing commented-out code and briefly listing the + C89 functions excluded. The commented-out stuff was confusing + maintenance, e.g., we thought we needed cbrt but it was commented out. + (logb): Remove decl; no longer needed. + (isfinite): New macro, if not already supplied. + (isnan): Don't replace any existing macro. + (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp + are present on all C89 platforms. + (Ffrexp): Do not special-case zero, as frexp does the right thing + for that case. + (Flogb): Do not use logb, as it doesn't have the desired meaning + on hosts that use non-base-2 floating point. Instead, stick with + frexp, which is C89 anyway. Do not pass an infinity or a NaN to + frexp, to avoid getting an unspecified result. + * xdisp.c (Qinhibit_debug_on_message): Now static. 2012-09-10 Jan Djärv diff --git a/src/data.c b/src/data.c index a4cca0a3ee5..4678ac1208c 100644 --- a/src/data.c +++ b/src/data.c @@ -71,8 +71,8 @@ Lisp_Object Qchar_table_p, Qvector_or_char_table_p; Lisp_Object Qcdr; static Lisp_Object Qad_advice_info, Qad_activate_internal; -Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; -Lisp_Object Qoverflow_error, Qunderflow_error; +static Lisp_Object Qdomain_error, Qsingularity_error, Qunderflow_error; +Lisp_Object Qrange_error, Qoverflow_error; Lisp_Object Qfloatp; Lisp_Object Qnumberp, Qnumber_or_marker_p; diff --git a/src/floatfns.c b/src/floatfns.c index 8a9a9fd0886..66d7ca4af2c 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -22,9 +22,10 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* C89 requires only these math.h functions: - acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod, - frexp, ldexp, log, log10, modf, pow, sin, sinh, sqrt, tan, tanh. +/* C89 requires only the following math.h functions, and Emacs omits + the starred functions since we haven't found a use for them: + acos, asin, atan, atan2, ceil, cos, *cosh, exp, fabs, floor, fmod, + frexp, ldexp, log, log10, *modf, pow, sin, *sinh, sqrt, tan, *tanh. */ #include @@ -42,10 +43,12 @@ along with GNU Emacs. If not, see . */ #include -/* This declaration is omitted on some systems, like Ultrix. */ -#if !defined (HPUX) && defined (HAVE_LOGB) && !defined (logb) -extern double logb (double); -#endif /* not HPUX and HAVE_LOGB and no logb macro */ +#ifndef isfinite +# define isfinite(x) ((x) - (x) == 0) +#endif +#ifndef isnan +# define isnan(x) ((x) != (x)) +#endif /* Extract a Lisp number as a `double', or signal an error. */ @@ -126,9 +129,6 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0, return make_float (d); } -#undef isnan -#define isnan(x) ((x) != (x)) - DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, doc: /* Return non nil iff argument X is a NaN. */) (Lisp_Object x) @@ -153,6 +153,7 @@ Cause an error if X1 or X2 is not a float. */) return make_float (copysign (f1, f2)); } +#endif DEFUN ("frexp", Ffrexp, Sfrexp, 1, 1, 0, doc: /* Get significand and exponent of a floating point number. @@ -167,15 +168,9 @@ If X is zero, both parts (SGNFCAND and EXP) are zero. */) (Lisp_Object x) { double f = XFLOATINT (x); - - if (f == 0.0) - return Fcons (make_float (0.0), make_number (0)); - else - { - int exponent; - double sgnfcand = frexp (f, &exponent); - return Fcons (make_float (sgnfcand), make_number (exponent)); - } + int exponent; + double sgnfcand = frexp (f, &exponent); + return Fcons (make_float (sgnfcand), make_number (exponent)); } DEFUN ("ldexp", Fldexp, Sldexp, 1, 2, 0, @@ -187,118 +182,6 @@ Returns the floating point value resulting from multiplying SGNFCAND CHECK_NUMBER (exponent); return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exponent))); } -#endif - -#if 0 /* Leave these out unless we find there's a reason for them. */ - -DEFUN ("bessel-j0", Fbessel_j0, Sbessel_j0, 1, 1, 0, - doc: /* Return the bessel function j0 of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = j0 (d); - return make_float (d); -} - -DEFUN ("bessel-j1", Fbessel_j1, Sbessel_j1, 1, 1, 0, - doc: /* Return the bessel function j1 of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = j1 (d); - return make_float (d); -} - -DEFUN ("bessel-jn", Fbessel_jn, Sbessel_jn, 2, 2, 0, - doc: /* Return the order N bessel function output jn of ARG. -The first arg (the order) is truncated to an integer. */) - (Lisp_Object n, Lisp_Object arg) -{ - int i1 = extract_float (n); - double f2 = extract_float (arg); - - f2 = jn (i1, f2); - return make_float (f2); -} - -DEFUN ("bessel-y0", Fbessel_y0, Sbessel_y0, 1, 1, 0, - doc: /* Return the bessel function y0 of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = y0 (d); - return make_float (d); -} - -DEFUN ("bessel-y1", Fbessel_y1, Sbessel_y1, 1, 1, 0, - doc: /* Return the bessel function y1 of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = y1 (d); - return make_float (d); -} - -DEFUN ("bessel-yn", Fbessel_yn, Sbessel_yn, 2, 2, 0, - doc: /* Return the order N bessel function output yn of ARG. -The first arg (the order) is truncated to an integer. */) - (Lisp_Object n, Lisp_Object arg) -{ - int i1 = extract_float (n); - double f2 = extract_float (arg); - - f2 = yn (i1, f2); - return make_float (f2); -} - -#endif - -#if 0 /* Leave these out unless we see they are worth having. */ - -DEFUN ("erf", Ferf, Serf, 1, 1, 0, - doc: /* Return the mathematical error function of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = erf (d); - return make_float (d); -} - -DEFUN ("erfc", Ferfc, Serfc, 1, 1, 0, - doc: /* Return the complementary error function of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = erfc (d); - return make_float (d); -} - -DEFUN ("log-gamma", Flog_gamma, Slog_gamma, 1, 1, 0, - doc: /* Return the log gamma of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = lgamma (d); - return make_float (d); -} - -DEFUN ("cube-root", Fcube_root, Scube_root, 1, 1, 0, - doc: /* Return the cube root of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); -#ifdef HAVE_CBRT - d = cbrt (d); -#else - if (d >= 0.0) - d = pow (d, 1.0/3.0); - else - d = -pow (-d, 1.0/3.0); -#endif - return make_float (d); -} - -#endif DEFUN ("exp", Fexp, Sexp, 1, 1, 0, doc: /* Return the exponential base e of ARG. */) @@ -383,63 +266,6 @@ DEFUN ("sqrt", Fsqrt, Ssqrt, 1, 1, 0, return make_float (d); } -#if 0 /* Not clearly worth adding. */ - -DEFUN ("acosh", Facosh, Sacosh, 1, 1, 0, - doc: /* Return the inverse hyperbolic cosine of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = acosh (d); - return make_float (d); -} - -DEFUN ("asinh", Fasinh, Sasinh, 1, 1, 0, - doc: /* Return the inverse hyperbolic sine of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = asinh (d); - return make_float (d); -} - -DEFUN ("atanh", Fatanh, Satanh, 1, 1, 0, - doc: /* Return the inverse hyperbolic tangent of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = atanh (d); - return make_float (d); -} - -DEFUN ("cosh", Fcosh, Scosh, 1, 1, 0, - doc: /* Return the hyperbolic cosine of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = cosh (d); - return make_float (d); -} - -DEFUN ("sinh", Fsinh, Ssinh, 1, 1, 0, - doc: /* Return the hyperbolic sine of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = sinh (d); - return make_float (d); -} - -DEFUN ("tanh", Ftanh, Stanh, 1, 1, 0, - doc: /* Return the hyperbolic tangent of ARG. */) - (Lisp_Object arg) -{ - double d = extract_float (arg); - d = tanh (d); - return make_float (d); -} -#endif - DEFUN ("abs", Fabs, Sabs, 1, 1, 0, doc: /* Return the absolute value of ARG. */) (register Lisp_Object arg) @@ -477,16 +303,15 @@ This is the same as the exponent of a float. */) if (f == 0.0) value = MOST_NEGATIVE_FIXNUM; - else + else if (isfinite (f)) { -#ifdef HAVE_LOGB - value = logb (f); -#else int ivalue; frexp (f, &ivalue); value = ivalue - 1; -#endif } + else + value = MOST_POSITIVE_FIXNUM; + XSETINT (val, value); return val; } @@ -719,27 +544,9 @@ syms_of_floatfns (void) defsubr (&Sisnan); #ifdef HAVE_COPYSIGN defsubr (&Scopysign); +#endif defsubr (&Sfrexp); defsubr (&Sldexp); -#endif -#if 0 - defsubr (&Sacosh); - defsubr (&Sasinh); - defsubr (&Satanh); - defsubr (&Scosh); - defsubr (&Ssinh); - defsubr (&Stanh); - defsubr (&Sbessel_y0); - defsubr (&Sbessel_y1); - defsubr (&Sbessel_yn); - defsubr (&Sbessel_j0); - defsubr (&Sbessel_j1); - defsubr (&Sbessel_jn); - defsubr (&Serf); - defsubr (&Serfc); - defsubr (&Slog_gamma); - defsubr (&Scube_root); -#endif defsubr (&Sfceiling); defsubr (&Sffloor); defsubr (&Sfround); diff --git a/src/lisp.h b/src/lisp.h index 240e8c08a87..ae9b3422534 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2559,8 +2559,7 @@ extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; extern Lisp_Object Qcdr; -extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; -extern Lisp_Object Qoverflow_error, Qunderflow_error; +extern Lisp_Object Qrange_error, Qoverflow_error; extern Lisp_Object Qfloatp; extern Lisp_Object Qnumberp, Qnumber_or_marker_p; From 3057e615af94af8d08f475208c7e459f5d7115ac Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Tue, 11 Sep 2012 12:32:41 +0900 Subject: [PATCH 122/216] Fix wrong overhang display for gstring compositions (Bug#12364). * xdisp.c (right_overwritten, right_overwriting): Also handle gstring composition cases (Bug#12364). * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left overhang of succeeding glyphs overlapping box cursor. * w32term.c (x_draw_glyph_string): Likewise. --- src/ChangeLog | 10 ++++++++++ src/w32term.c | 1 + src/xdisp.c | 6 ++++-- src/xterm.c | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0e5bbfd2524..362d0b775b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2012-09-11 YAMAMOTO Mitsuharu + + * xdisp.c (right_overwritten, right_overwriting): Also handle gstring + composition cases (Bug#12364). + + * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left + overhang of succeeding glyphs overlapping box cursor. + + * w32term.c (x_draw_glyph_string): Likewise. + 2012-09-11 Paul Eggert Simplify, document, and port floating-point (Bug#12381). diff --git a/src/w32term.c b/src/w32term.c index 571db3cbe8e..28c1c593cf6 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2591,6 +2591,7 @@ x_draw_glyph_string (struct glyph_string *s) w32_set_clip_rectangle (next->hdc, NULL); next->hl = save; next->num_clips = 0; + next->clip_head = s->next; } } } diff --git a/src/xdisp.c b/src/xdisp.c index a7913768d8a..1deda682192 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -23050,7 +23050,8 @@ right_overwritten (struct glyph_string *s) { int x = 0, i; struct glyph *glyphs = s->row->glyphs[s->area]; - int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars); + int first = (s->first_glyph - glyphs + + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars)); int end = s->row->used[s->area]; for (i = first; i < end && s->right_overhang > x; ++i) @@ -23073,7 +23074,8 @@ right_overwriting (struct glyph_string *s) int i, k, x; int end = s->row->used[s->area]; struct glyph *glyphs = s->row->glyphs[s->area]; - int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars); + int first = (s->first_glyph - glyphs + + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars)); k = -1; x = 0; diff --git a/src/xterm.c b/src/xterm.c index f0f6702cd67..e5a5932beae 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2975,6 +2975,7 @@ x_draw_glyph_string (struct glyph_string *s) XSetClipMask (next->display, next->gc, None); next->hl = save; next->num_clips = 0; + next->clip_head = s->next; } } } From e578f3813ff7f48663eb4821caee267e3ec47aa8 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 11 Sep 2012 08:22:03 +0400 Subject: [PATCH 123/216] Convenient macro to check whether the buffer is live. * buffer.h (BUFFER_LIVE_P): New macro. * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c: * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it. --- src/ChangeLog | 7 +++++++ src/alloc.c | 2 +- src/buffer.c | 32 ++++++++++++++++---------------- src/buffer.h | 5 ++++- src/editfns.c | 6 +++--- src/insdel.c | 2 +- src/lread.c | 2 +- src/marker.c | 8 ++++---- src/minibuf.c | 2 +- src/print.c | 2 +- src/process.c | 4 ++-- src/window.c | 14 +++++++------- src/xdisp.c | 4 ++-- 13 files changed, 50 insertions(+), 40 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 362d0b775b0..cecd31ddab4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-09-11 Dmitry Antipov + + Convenient macro to check whether the buffer is live. + * buffer.h (BUFFER_LIVE_P): New macro. + * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c: + * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it. + 2012-09-11 YAMAMOTO Mitsuharu * xdisp.c (right_overwritten, right_overwriting): Also handle gstring diff --git a/src/alloc.c b/src/alloc.c index 33dc68df48e..7bbc0abcd9a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3682,7 +3682,7 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos) struct Lisp_Marker *m; /* No dead buffers here. */ - eassert (!NILP (BVAR (buf, name))); + eassert (BUFFER_LIVE_P (buf)); /* Every character is at least one byte. */ eassert (charpos <= bytepos); diff --git a/src/buffer.c b/src/buffer.c index 3af45122a0d..d512547d34e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -388,7 +388,7 @@ DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, Value is nil if OBJECT is not a buffer or if it has been killed. */) (Lisp_Object object) { - return ((BUFFERP (object) && ! NILP (BVAR (XBUFFER (object), name))) + return ((BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))) ? Qt : Qnil); } @@ -776,7 +776,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) base_buffer = Fget_buffer (base_buffer); if (NILP (base_buffer)) error ("No such buffer: `%s'", SDATA (tem)); - if (NILP (BVAR (XBUFFER (base_buffer), name))) + if (!BUFFER_LIVE_P (XBUFFER (base_buffer))) error ("Base buffer has been killed"); if (SCHARS (name) == 0) @@ -1553,7 +1553,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) { buf = XCAR (tail); if (BUFFERP (buf) && !EQ (buf, buffer) - && !NILP (BVAR (XBUFFER (buf), name)) + && BUFFER_LIVE_P (XBUFFER (buf)) && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ') /* If the frame has a buffer_predicate, disregard buffers that don't fit the predicate. */ @@ -1573,7 +1573,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) { buf = Fcdr (XCAR (tail)); if (BUFFERP (buf) && !EQ (buf, buffer) - && !NILP (BVAR (XBUFFER (buf), name)) + && BUFFER_LIVE_P (XBUFFER (buf)) && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ') /* If the frame has a buffer_predicate, disregard buffers that don't fit the predicate. */ @@ -1615,7 +1615,7 @@ other_buffer_safely (Lisp_Object buffer) { buf = Fcdr (XCAR (tail)); if (BUFFERP (buf) && !EQ (buf, buffer) - && !NILP (BVAR (XBUFFER (buf), name)) + && BUFFER_LIVE_P (XBUFFER (buf)) && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ')) return buf; } @@ -1734,7 +1734,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) b = XBUFFER (buffer); /* Avoid trouble for buffer already dead. */ - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) return Qnil; /* Query if the buffer is still modified. */ @@ -1770,7 +1770,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) } /* If the hooks have killed the buffer, exit now. */ - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) return Qt; /* We have no more questions to ask. Verify that it is valid @@ -1802,7 +1802,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) UNGCPRO; /* Exit if we now have killed the base buffer (Bug#11665). */ - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) return Qt; } @@ -1813,7 +1813,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) replace_buffer_in_windows (buffer); /* Exit if replacing the buffer in windows has killed our buffer. */ - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) return Qt; /* Make this buffer not be current. Exit if it is the sole visible @@ -1846,7 +1846,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) /* Killing buffer processes may run sentinels which may have killed our buffer. */ - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) return Qt; /* These may run Lisp code and into infinite loops (if someone @@ -1878,7 +1878,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) } /* Deleting an auto-save file could have killed our buffer. */ - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) return Qt; if (b->base_buffer) @@ -2047,7 +2047,7 @@ the current buffer's major mode. */) CHECK_BUFFER (buffer); - if (NILP (BVAR (XBUFFER (buffer), name))) + if (!BUFFER_LIVE_P (XBUFFER (buffer))) error ("Attempt to set major mode for a dead buffer"); if (strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0) @@ -2183,7 +2183,7 @@ ends when the current command terminates. Use `switch-to-buffer' or buffer = Fget_buffer (buffer_or_name); if (NILP (buffer)) nsberror (buffer_or_name); - if (NILP (BVAR (XBUFFER (buffer), name))) + if (!BUFFER_LIVE_P (XBUFFER (buffer))) error ("Selecting deleted buffer"); set_buffer_internal (XBUFFER (buffer)); return buffer; @@ -2194,7 +2194,7 @@ ends when the current command terminates. Use `switch-to-buffer' or Lisp_Object set_buffer_if_live (Lisp_Object buffer) { - if (! NILP (BVAR (XBUFFER (buffer), name))) + if (BUFFER_LIVE_P (XBUFFER (buffer))) set_buffer_internal (XBUFFER (buffer)); return Qnil; } @@ -2289,7 +2289,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, CHECK_BUFFER (buffer); other_buffer = XBUFFER (buffer); - if (NILP (BVAR (other_buffer, name))) + if (!BUFFER_LIVE_P (other_buffer)) error ("Cannot swap a dead buffer's text"); /* Actually, it probably works just fine. @@ -2685,7 +2685,7 @@ current buffer is cleared. */) /* Copy this buffer's new multibyte status into all of its indirect buffers. */ FOR_EACH_BUFFER (other) - if (other->base_buffer == current_buffer && !NILP (BVAR (other, name))) + if (other->base_buffer == current_buffer && BUFFER_LIVE_P (other)) { BVAR (other, enable_multibyte_characters) = BVAR (current_buffer, enable_multibyte_characters); diff --git a/src/buffer.h b/src/buffer.h index da40a7ce3d8..d18ef30ea38 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -959,7 +959,10 @@ bset_width_table (struct buffer *b, Lisp_Object val) b->INTERNAL_FIELD (width_table) = val; } - +/* Convenient check whether buffer B is live. */ + +#define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name))) + /* Chain of all buffers, including killed ones. */ extern struct buffer *all_buffers; diff --git a/src/editfns.c b/src/editfns.c index 65baaf4e3f8..299cad07fd7 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2613,7 +2613,7 @@ They default to the values of (point-min) and (point-max) in BUFFER. */) if (NILP (buf)) nsberror (buffer); bp = XBUFFER (buf); - if (NILP (BVAR (bp, name))) + if (!BUFFER_LIVE_P (bp)) error ("Selecting deleted buffer"); if (NILP (start)) @@ -2677,7 +2677,7 @@ determines whether case is significant or ignored. */) if (NILP (buf1)) nsberror (buffer1); bp1 = XBUFFER (buf1); - if (NILP (BVAR (bp1, name))) + if (!BUFFER_LIVE_P (bp1)) error ("Selecting deleted buffer"); } @@ -2715,7 +2715,7 @@ determines whether case is significant or ignored. */) if (NILP (buf2)) nsberror (buffer2); bp2 = XBUFFER (buf2); - if (NILP (BVAR (bp2, name))) + if (!BUFFER_LIVE_P (bp2)) error ("Selecting deleted buffer"); } diff --git a/src/insdel.c b/src/insdel.c index 604a9bbf3df..b12a390633e 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2107,7 +2107,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, non-nil, and insertion calls a file handler (e.g. through lock_file) which scribbles into a temp file -- cyd */ if (!BUFFERP (combine_after_change_buffer) - || NILP (BVAR (XBUFFER (combine_after_change_buffer), name))) + || !BUFFER_LIVE_P (XBUFFER (combine_after_change_buffer))) { combine_after_change_list = Qnil; return Qnil; diff --git a/src/lread.c b/src/lread.c index 02b13affb6a..08a2e856c00 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1734,7 +1734,7 @@ readevalloop (Lisp_Object readcharfun, { ptrdiff_t count1 = SPECPDL_INDEX (); - if (b != 0 && NILP (BVAR (b, name))) + if (b != 0 && !BUFFER_LIVE_P (b)) error ("Reading from killed buffer"); if (!NILP (start)) diff --git a/src/marker.c b/src/marker.c index de3c19c3bcb..bfbb161a71d 100644 --- a/src/marker.c +++ b/src/marker.c @@ -407,7 +407,7 @@ Returns nil if MARKER points into a dead buffer. */) does not preserve the buffer from being GC'd (it's weak), so markers have to be unlinked from their buffer as soon as the buffer is killed. */ - eassert (!NILP (BVAR (XBUFFER (buf), name))); + eassert (BUFFER_LIVE_P (XBUFFER (buf))); return buf; } return Qnil; @@ -462,13 +462,13 @@ live_buffer (Lisp_Object buffer) if (NILP (buffer)) { b = current_buffer; - eassert (!NILP (BVAR (b, name))); + eassert (BUFFER_LIVE_P (b)); } else { CHECK_BUFFER (buffer); b = XBUFFER (buffer); - if (NILP (BVAR (b, name))) + if (!BUFFER_LIVE_P (b)) b = NULL; } return b; @@ -595,7 +595,7 @@ unchain_marker (register struct Lisp_Marker *marker) register struct Lisp_Marker *tail, **prev; /* No dead buffers here. */ - eassert (!NILP (BVAR (b, name))); + eassert (BUFFER_LIVE_P (b)); marker->buffer = NULL; prev = &BUF_MARKERS (b); diff --git a/src/minibuf.c b/src/minibuf.c index 655a02f5eca..4ed480a8408 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -798,7 +798,7 @@ get_minibuffer (EMACS_INT depth) Vminibuffer_list = nconc2 (Vminibuffer_list, tail); } buf = Fcar (tail); - if (NILP (buf) || NILP (BVAR (XBUFFER (buf), name))) + if (NILP (buf) || !BUFFER_LIVE_P (XBUFFER (buf))) { buf = Fget_buffer_create (make_formatted_string (name, " *Minibuf-%"pI"d*", depth)); diff --git a/src/print.c b/src/print.c index ab86ee1a8b5..16116643ad0 100644 --- a/src/print.c +++ b/src/print.c @@ -1873,7 +1873,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag } else if (BUFFERP (obj)) { - if (NILP (BVAR (XBUFFER (obj), name))) + if (!BUFFER_LIVE_P (XBUFFER (obj))) strout ("#", -1, -1, printcharfun); else if (escapeflag) { diff --git a/src/process.c b/src/process.c index 0cc9bc353a1..0ae68567d6b 100644 --- a/src/process.c +++ b/src/process.c @@ -5298,7 +5298,7 @@ read_process_output (Lisp_Object proc, register int channel) } /* If no filter, write into buffer if it isn't dead. */ - else if (!NILP (p->buffer) && !NILP (BVAR (XBUFFER (p->buffer), name))) + else if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) { Lisp_Object old_read_only; ptrdiff_t old_begv, old_zv; @@ -6722,7 +6722,7 @@ status_notify (struct Lisp_Process *deleting_process) /* Avoid error if buffer is deleted (probably that's why the process is dead, too) */ - if (NILP (BVAR (XBUFFER (buffer), name))) + if (!BUFFER_LIVE_P (XBUFFER (buffer))) continue; Fset_buffer (buffer); diff --git a/src/window.c b/src/window.c index 1869a3b65cf..4a833a120b3 100644 --- a/src/window.c +++ b/src/window.c @@ -2668,7 +2668,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame /* Check for a window that has a killed buffer. */ case CHECK_ALL_WINDOWS: if (! NILP (w->buffer) - && NILP (BVAR (XBUFFER (w->buffer), name))) + && !BUFFER_LIVE_P (XBUFFER (w->buffer))) emacs_abort (); break; @@ -3273,7 +3273,7 @@ This function runs `window-scroll-functions' before running XSETWINDOW (window, w); buffer = Fget_buffer (buffer_or_name); CHECK_BUFFER (buffer); - if (NILP (BVAR (XBUFFER (buffer), name))) + if (!BUFFER_LIVE_P (XBUFFER (buffer))) error ("Attempt to display deleted buffer"); tem = w->buffer; @@ -3338,7 +3338,7 @@ displaying that buffer. */) if (STRINGP (object)) object = Fget_buffer (object); - if (BUFFERP (object) && !NILP (BVAR (XBUFFER (object), name))) + if (BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))) { /* Walk all windows looking for buffer, and force update of each of those windows. */ @@ -5549,7 +5549,7 @@ the return value is nil. Otherwise the value is t. */) saved_windows = XVECTOR (data->saved_windows); new_current_buffer = data->current_buffer; - if (NILP (BVAR (XBUFFER (new_current_buffer), name))) + if (!BUFFER_LIVE_P (XBUFFER (new_current_buffer))) new_current_buffer = Qnil; else { @@ -5624,7 +5624,7 @@ the return value is nil. Otherwise the value is t. */) w = XWINDOW (window); if (!NILP (w->buffer) && !EQ (w->buffer, p->buffer) - && !NILP (BVAR (XBUFFER (p->buffer), name))) + && BUFFER_LIVE_P (XBUFFER (p->buffer))) /* If a window we restore gets another buffer, record the window's old buffer. */ call1 (Qrecord_window_buffer, window); @@ -5774,7 +5774,7 @@ the return value is nil. Otherwise the value is t. */) if (NILP (p->buffer)) /* An internal window. */ wset_buffer (w, p->buffer); - else if (!NILP (BVAR (XBUFFER (p->buffer), name))) + else if (BUFFER_LIVE_P (XBUFFER (p->buffer))) /* If saved buffer is alive, install it. */ { wset_buffer (w, p->buffer); @@ -5793,7 +5793,7 @@ the return value is nil. Otherwise the value is t. */) Fgoto_char (w->pointm); } else if (!NILP (w->buffer) - && !NILP (BVAR (XBUFFER (w->buffer), name))) + && BUFFER_LIVE_P (XBUFFER (w->buffer))) /* Keep window's old buffer; make sure the markers are real. */ { diff --git a/src/xdisp.c b/src/xdisp.c index 1deda682192..c1e05d6df15 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3667,7 +3667,7 @@ handle_fontified_prop (struct it *it) } /* There isn't much we can reasonably do to protect against misbehaving fontification, but here's a fig leaf. */ - else if (!NILP (BVAR (obuf, name))) + else if (BUFFER_LIVE_P (obuf)) set_buffer_internal_1 (obuf); /* The fontification code may have added/removed text. @@ -9910,7 +9910,7 @@ ensure_echo_area_buffers (void) for (i = 0; i < 2; ++i) if (!BUFFERP (echo_buffer[i]) - || NILP (BVAR (XBUFFER (echo_buffer[i]), name))) + || !BUFFER_LIVE_P (XBUFFER (echo_buffer[i]))) { char name[30]; Lisp_Object old_buffer; From 9d9edd4baee38b48b7c33a22e25a3a5b8779e41a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 11 Sep 2012 00:45:38 -0700 Subject: [PATCH 124/216] Be more explicit about some Makefile dependencies * Makefile.in (install-arch-dep, install-arch-indep, install-doc): Be more explicit about dependencies, for parallel `make install'. It is not so unreasonable to run `make -j# install' from a clean state for a self-contained NS build, where the "installation" happens within the build tree. --- ChangeLog | 5 +++++ Makefile.in | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d6d5020b0c..23fc479e124 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Glenn Morris + + * Makefile.in (install-arch-dep, install-arch-indep, install-doc): + Be more explicit about dependencies, for parallel `make install'. + 2012-09-11 Paul Eggert Simplify, document, and port floating-point (Bug#12381). diff --git a/Makefile.in b/Makefile.in index 800f11669d6..6ed32491a66 100644 --- a/Makefile.in +++ b/Makefile.in @@ -433,7 +433,7 @@ write_subdir=if [ -f $${subdir}/subdirs.el ]; \ ### Install the executables that were compiled specifically for this machine. ### We do install-arch-indep first because the executable needs the ### Lisp files and DOC file to work properly. -install-arch-dep: install-arch-indep install-doc +install-arch-dep: src install-arch-indep install-doc umask 022; ${MKDIR_P} $(DESTDIR)${bindir} cd lib-src && \ $(MAKE) install $(MFLAGS) prefix=${prefix} \ @@ -502,7 +502,7 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ ## work correctly, and therefore no idea when tar can be replaced. ## See also these comments from 2004 about cp -r working fine: ## http://lists.gnu.org/archive/html/autoconf-patches/2004-11/msg00005.html -install-arch-indep: install-info install-man ${INSTALL_ARCH_INDEP_EXTRA} +install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTRA} umask 022 ; \ locallisppath='${locallisppath}'; \ IFS=:; \ @@ -573,7 +573,7 @@ install-arch-indep: install-info install-man ${INSTALL_ARCH_INDEP_EXTRA} ## Note that install-arch-indep deletes and recreates the entire ## installed etc/ directory, so we need it to run before this does. -install-doc: install-arch-indep +install-doc: src install-arch-indep -unset CDPATH; \ umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \ if [ `cd ./etc; /bin/pwd` != `cd $(DESTDIR)${docdir}; /bin/pwd` ]; \ From 95729d50c034ddf60bc18f04ce5a2cbb365bd8bb Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 11 Sep 2012 10:08:59 +0000 Subject: [PATCH 125/216] gnus-notifications.el: add nil checks --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-notifications.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5644c394f7e..5c7f106f6db 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Julien Danjou + + * gnus-notifications.el (gnus-notifications): Check for nil values in + ignored addresses check. + 2012-09-10 Stefan Monnier * qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index f9c2d309a35..5104a56c6e7 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el @@ -166,8 +166,10 @@ This is typically a function to add in (or (mail-fetch-field "From") ""))) (address (cadr address-components))) ;; Ignore mails from ourselves - (unless (gnus-string-match-p gnus-ignored-from-addresses - address) + (unless (and gnus-ignored-from-addresses + address + (gnus-string-match-p gnus-ignored-from-addresses + address)) (let* ((photo-file (gnus-notifications-get-photo-file address)) (notification-id (gnus-notifications-notify (or (car address-components) address) From 2c98a6250e91227fe90df2097abcc6d3e77d3d4c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 11 Sep 2012 06:17:36 -0400 Subject: [PATCH 126/216] Auto-commit of generated files. --- autogen/config.in | 6 ------ autogen/configure | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index 10969fd99c2..99074bd1bc5 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -246,9 +246,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if strtold conforms to C99. */ #undef HAVE_C99_STRTOLD -/* Define to 1 if you have the `cbrt' function. */ -#undef HAVE_CBRT - /* Define to 1 if you have the `cfmakeraw' function. */ #undef HAVE_CFMAKERAW @@ -638,9 +635,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R -/* Define to 1 if you have the `logb' function. */ -#undef HAVE_LOGB - /* Define to 1 if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES diff --git a/autogen/configure b/autogen/configure index 3621eee77c6..5f4013e4b88 100755 --- a/autogen/configure +++ b/autogen/configure @@ -12926,8 +12926,8 @@ $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h fi -# fmod, logb, and frexp are found in -lm on most systems. -# On HPUX 9.01, -lm does not contain logb, so check for sqrt. +# sqrt and other floating-point functions such as fmod and frexp +# are found in -lm on most systems. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if test "${ac_cv_lib_m_sqrt+set}" = set; then : @@ -13177,7 +13177,7 @@ esac for ac_func in gethostname \ closedir getrusage get_current_dir_name \ -lrand48 logb cbrt setsid \ +lrand48 setsid \ fpathconf select euidaccess getpagesize setlocale \ utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ __fpending strsignal setitimer \ From 04e8abfa697ebab5303e0426ba3d1c5abe133a16 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 11 Sep 2012 15:43:06 +0200 Subject: [PATCH 127/216] * help-fns.el (describe-variable): Fix typo. (bug#12346) --- lisp/ChangeLog | 4 ++++ lisp/help-fns.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8bf45b6f90..2319aa87f29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-11 Bastien Guerry + + * help-fns.el (describe-variable): Fix typo. + 2012-09-10 Michael R. Mauger * progmodes/sql.el: Version 3.1 diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 5791f1225c1..fa0484ff4e5 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -936,7 +936,7 @@ file-local variable.\n") (princ " This variable is safe as a file local variable ") (princ "if its value\n satisfies the predicate ") (princ (if (byte-code-function-p safe-var) - "which is byte-compiled expression.\n" + "which is a byte-compiled expression.\n" (format "`%s'.\n" safe-var)))) (if extra-line (terpri)) From 96d0357142bf277e6eb4d957a59b2c655034e2b7 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 11 Sep 2012 16:06:33 +0200 Subject: [PATCH 128/216] * minibuffer.el (completion-table-subvert): Fix docstring. (bug#12347) --- lisp/ChangeLog | 7 ++++++- lisp/minibuffer.el | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2319aa87f29..5864f61403b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,11 @@ 2012-09-11 Bastien Guerry - * help-fns.el (describe-variable): Fix typo. + * minibuffer.el (completion-table-subvert): Fix docstring. + (bug#12347) + +2012-09-11 Bastien Guerry + + * help-fns.el (describe-variable): Fix typo. (bug#12346) 2012-09-10 Michael R. Mauger diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a696fff7dc7..669ea58656d 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -211,10 +211,10 @@ case sensitive instead." (complete-with-action action table string pred)))) (defun completion-table-subvert (table s1 s2) - "Completion table that replaces the prefix S1 with S2 in STRING. + "Return a completion table from TABLE with S1 replaced by S2. The result is a completion table which completes strings of the -form (concat S1 S) in the same way as TABLE completes strings of -the form (concat S2 S)." +form (concat S2 S) in the same way as TABLE completes strings of +the form (concat S1 S)." (lambda (string pred action) (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil completion-ignore-case)) From d73e321cc241c0029e6874501cf32ee63643825c Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 11 Sep 2012 19:42:50 +0400 Subject: [PATCH 129/216] Discard killed buffers from deleted window and frame objects. This reduces an amount of references to killed buffers and helps GC to reclaim them faster. * alloc.c (discard_killed_buffers): New function. (mark_object): Use it for deleted windows and frames. (mark_object): If symbol's value is set up for a killed buffer or deleted frame, restore it's global binding. * data.c (swap_in_global_binding): Add GC notice. (swap_in_symval_forwarding): Use convenient set_blv_where. * window.c (wset_next_buffers, wset_prev_buffers): Move ... * window.h: ... to here. --- src/ChangeLog | 14 +++++++++++ src/alloc.c | 67 +++++++++++++++++++++++++++++++++++++++++++++------ src/data.c | 8 +++--- src/window.c | 10 -------- src/window.h | 11 ++++++++- 5 files changed, 88 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cecd31ddab4..46f1847f7f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2012-09-11 Dmitry Antipov + + Discard killed buffers from deleted window and frame objects. + This reduces an amount of references to killed buffers and + helps GC to reclaim them faster. + * alloc.c (discard_killed_buffers): New function. + (mark_object): Use it for deleted windows and frames. + (mark_object): If symbol's value is set up for a killed buffer + or deleted frame, restore it's global binding. + * data.c (swap_in_global_binding): Add GC notice. + (swap_in_symval_forwarding): Use convenient set_blv_where. + * window.c (wset_next_buffers, wset_prev_buffers): Move ... + * window.h: ... to here. + 2012-09-11 Dmitry Antipov Convenient macro to check whether the buffer is live. diff --git a/src/alloc.c b/src/alloc.c index 7bbc0abcd9a..fb16b7d7511 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5865,6 +5865,32 @@ mark_buffer (struct buffer *buffer) mark_buffer (buffer->base_buffer); } +/* Remove killed buffers or items whose car is a killed buffer + from LIST and return changed LIST. Called during GC. */ + +static inline Lisp_Object +discard_killed_buffers (Lisp_Object list) +{ + Lisp_Object tail, prev, tem; + + for (tail = list, prev = Qnil; CONSP (tail); tail = XCDR (tail)) + { + tem = XCAR (tail); + if (CONSP (tem)) + tem = XCAR (tem); + if (BUFFERP (tem) && !BUFFER_LIVE_P (XBUFFER (tem))) + { + if (NILP (prev)) + list = XCDR (tail); + else + XSETCDR (prev, XCDR (tail)); + } + else + prev = tail; + } + return list; +} + /* Determine type of generic Lisp_Object and mark it accordingly. */ void @@ -6001,20 +6027,41 @@ mark_object (Lisp_Object arg) break; case PVEC_FRAME: - mark_vectorlike (ptr); - mark_face_cache (((struct frame *) ptr)->face_cache); + { + struct frame *f = (struct frame *) ptr; + + /* For live frames, killed buffers are filtered out by + store_frame_param. For dead frames, we do it here in + attempt to help GC to reclaim killed buffers faster. */ + if (!FRAME_LIVE_P (f)) + fset_buffer_list (f, discard_killed_buffers (f->buffer_list)); + + mark_vectorlike (ptr); + mark_face_cache (f->face_cache); + } break; case PVEC_WINDOW: { struct window *w = (struct window *) ptr; + bool leaf = NILP (w->hchild) && NILP (w->vchild); + + /* For live windows, Lisp code filters out killed buffers + from both buffer lists. For dead windows, we do it here + in attempt to help GC to reclaim killed buffers faster. */ + if (leaf && NILP (w->buffer)) + { + wset_prev_buffers + (w, discard_killed_buffers (w->prev_buffers)); + wset_next_buffers + (w, discard_killed_buffers (w->next_buffers)); + } mark_vectorlike (ptr); /* Mark glyphs for leaf windows. Marking window matrices is sufficient because frame matrices use the same glyph memory. */ - if (NILP (w->hchild) && NILP (w->vchild) - && w->current_matrix) + if (leaf && w->current_matrix) { mark_glyph_matrix (w->current_matrix); mark_glyph_matrix (w->desired_matrix); @@ -6081,10 +6128,14 @@ mark_object (Lisp_Object arg) case SYMBOL_LOCALIZED: { struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (ptr); - /* If the value is forwarded to a buffer or keyboard field, - these are marked when we see the corresponding object. - And if it's forwarded to a C variable, either it's not - a Lisp_Object var, or it's staticpro'd already. */ + Lisp_Object where = blv->where; + /* If the value is set up for a killed buffer or deleted + frame, restore it's global binding. If the value is + forwarded to a C variable, either it's not a Lisp_Object + var, or it's staticpro'd already. */ + if ((BUFFERP (where) && !BUFFER_LIVE_P (XBUFFER (where))) + || (FRAMEP (where) && !FRAME_LIVE_P (XFRAME (where)))) + swap_in_global_binding (ptr); mark_object (blv->where); mark_object (blv->valcell); mark_object (blv->defcell); diff --git a/src/data.c b/src/data.c index 4678ac1208c..d894ac71a65 100644 --- a/src/data.c +++ b/src/data.c @@ -948,8 +948,10 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva } } -/* Set up SYMBOL to refer to its global binding. - This makes it safe to alter the status of other bindings. */ +/* Set up SYMBOL to refer to its global binding. This makes it safe + to alter the status of other bindings. BEWARE: this may be called + during the mark phase of GC, where we assume that Lisp_Object slots + of BLV are marked after this function has changed them. */ void swap_in_global_binding (struct Lisp_Symbol *symbol) @@ -1008,7 +1010,7 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_ else { tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist)); - XSETBUFFER (blv->where, current_buffer); + set_blv_where (blv, Fcurrent_buffer ()); } } if (!(blv->found = !NILP (tem1))) diff --git a/src/window.c b/src/window.c index 4a833a120b3..18a550782e8 100644 --- a/src/window.c +++ b/src/window.c @@ -176,11 +176,6 @@ wset_new_total (struct window *w, Lisp_Object val) w->new_total = val; } static inline void -wset_next_buffers (struct window *w, Lisp_Object val) -{ - w->next_buffers = val; -} -static inline void wset_normal_cols (struct window *w, Lisp_Object val) { w->normal_cols = val; @@ -201,11 +196,6 @@ wset_pointm (struct window *w, Lisp_Object val) w->pointm = val; } static inline void -wset_prev_buffers (struct window *w, Lisp_Object val) -{ - w->prev_buffers = val; -} -static inline void wset_right_fringe_width (struct window *w, Lisp_Object val) { w->right_fringe_width = val; diff --git a/src/window.h b/src/window.h index a70bc55bac5..62ae43a999d 100644 --- a/src/window.h +++ b/src/window.h @@ -414,7 +414,16 @@ wset_window_end_vpos (struct window *w, Lisp_Object val) { w->window_end_vpos = val; } - +WINDOW_INLINE void +wset_prev_buffers (struct window *w, Lisp_Object val) +{ + w->prev_buffers = val; +} +WINDOW_INLINE void +wset_next_buffers (struct window *w, Lisp_Object val) +{ + w->next_buffers = val; +} /* 1 if W is a minibuffer window. */ From baa26ea03380c3c5f17e9e0c2f47e7509a69895a Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 11 Sep 2012 18:45:31 +0200 Subject: [PATCH 130/216] * subr.el (set-temporary-overlay-map): Add a docstring. (bug#12346) Bug #12346 is not closed as this commit does not document `set-temporary-overlay-map' in the manual. --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5864f61403b..cdc021d192f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Bastien Guerry + + * subr.el (set-temporary-overlay-map): Add a docstring. + (bug#12346) + 2012-09-11 Bastien Guerry * minibuffer.el (completion-table-subvert): Fix docstring. diff --git a/lisp/subr.el b/lisp/subr.el index be785ff8fba..23b62b25c9c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3911,6 +3911,11 @@ The properties used on SYMBOL are `composefunc', `sendfunc', (put symbol 'hookvar (or hookvar 'mail-send-hook))) (defun set-temporary-overlay-map (map &optional keep-pred) + "Set MAP as a temporary overlay map. +When KEEP-PRED is `t', using a key from the temporary keymap +leaves this keymap activated. KEEP-PRED can also be a function, +which will have the same effect when it returns `t'. +When KEEP-PRED is nil, the temporary keymap is used only once." (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map")) (overlaysym (make-symbol "t")) (alist (list (cons overlaysym map))) From c4c9756b17a36a45ebdc3e80db2ad1f0211d0cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 11 Sep 2012 19:08:02 +0200 Subject: [PATCH 131/216] * nsterm.h: Add delay parameter to updateFrameSize. * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize. (updateFrameSize:): Add delay parameter to updateFrameSize, send it to change_frame_size. (windowDidResize:): Pass YES to updateFrameSize. Fixes: debbugs:12388 --- src/ChangeLog | 9 +++++++++ src/nsterm.h | 2 +- src/nsterm.m | 8 ++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 46f1847f7f6..6cb0e65281a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-09-11 Jan Djärv + + * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize. + (updateFrameSize:): Add delay parameter to updateFrameSize, send it + to change_frame_size (Bug#12388). + (windowDidResize:): Pass YES to updateFrameSize. + + * nsterm.h: Add delay parameter to updateFrameSize. + 2012-09-11 Dmitry Antipov Discard killed buffers from deleted window and frame objects. diff --git a/src/nsterm.h b/src/nsterm.h index b1836692b2c..f3adab883a1 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -103,7 +103,7 @@ along with GNU Emacs. If not, see . */ - (void) setWindowClosing: (BOOL)closing; - (EmacsToolbar *) toolbar; - (void) deleteWorkingText; -- (void) updateFrameSize; +- (void) updateFrameSize: (BOOL) delay; #ifdef NS_IMPL_GNUSTEP /* Not declared, but useful. */ diff --git a/src/nsterm.m b/src/nsterm.m index 798c9758376..f9611fd1210 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3727,7 +3727,7 @@ ns_judge_scroll_bars (struct frame *f) } if (removed) - [eview updateFrameSize]; + [eview updateFrameSize: NO]; } @@ -5362,7 +5362,7 @@ not_in_argv (NSString *arg) return NO; } -- (void) updateFrameSize +- (void) updateFrameSize: (BOOL) delay; { NSWindow *window = [self window]; NSRect wr = [window frame]; @@ -5400,7 +5400,7 @@ not_in_argv (NSString *arg) NSView *view = FRAME_NS_VIEW (emacsframe); FRAME_PIXEL_WIDTH (emacsframe) = neww; FRAME_PIXEL_HEIGHT (emacsframe) = newh; - change_frame_size (emacsframe, rows, cols, 0, 0, 1); + change_frame_size (emacsframe, rows, cols, 0, delay, 0); SET_FRAME_GARBAGED (emacsframe); cancel_mouse_face (emacsframe); [view setFrame: NSMakeRect (0, 0, neww, newh)]; @@ -5503,7 +5503,7 @@ not_in_argv (NSString *arg) x_set_window_size (emacsframe, 0, cols, rows); else { - [self updateFrameSize]; + [self updateFrameSize: YES]; } } #endif From 9011078f9df40965a6ef3cade5bba3e5d0eb730d Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 11 Sep 2012 19:43:21 +0200 Subject: [PATCH 132/216] Fix 2012-09-11T14:06:33Z!bastien1@free.fr. --- lisp/minibuffer.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 669ea58656d..27c53744d54 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -213,8 +213,8 @@ case sensitive instead." (defun completion-table-subvert (table s1 s2) "Return a completion table from TABLE with S1 replaced by S2. The result is a completion table which completes strings of the -form (concat S2 S) in the same way as TABLE completes strings of -the form (concat S1 S)." +form (concat S1 S) in the same way as TABLE completes strings of +the form (concat S2 S)." (lambda (string pred action) (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil completion-ignore-case)) From 5779a1dc62593be8294edaecfecca4359be9ab4e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 11 Sep 2012 13:35:23 -0700 Subject: [PATCH 133/216] * alloc.c (discard_killed_buffers): Tune and simplify a bit. Use pointer-to-a-pointer to simplify and avoid a NILP check each time an item is removed. No need to mark this function 'inline'; the compiler knows better than we do. --- src/ChangeLog | 7 +++++++ src/alloc.c | 20 ++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6cb0e65281a..2b0686cc49e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-09-11 Paul Eggert + + * alloc.c (discard_killed_buffers): Tune and simplify a bit. + Use pointer-to-a-pointer to simplify and avoid a NILP check each + time an item is removed. No need to mark this function 'inline'; + the compiler knows better than we do. + 2012-09-11 Jan Djärv * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize. diff --git a/src/alloc.c b/src/alloc.c index fb16b7d7511..61cb7086c25 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5868,25 +5868,21 @@ mark_buffer (struct buffer *buffer) /* Remove killed buffers or items whose car is a killed buffer from LIST and return changed LIST. Called during GC. */ -static inline Lisp_Object +static Lisp_Object discard_killed_buffers (Lisp_Object list) { - Lisp_Object tail, prev, tem; + Lisp_Object *prev = &list; + Lisp_Object tail; - for (tail = list, prev = Qnil; CONSP (tail); tail = XCDR (tail)) + for (tail = list; CONSP (tail); tail = XCDR (tail)) { - tem = XCAR (tail); + Lisp_Object tem = XCAR (tail); if (CONSP (tem)) tem = XCAR (tem); if (BUFFERP (tem) && !BUFFER_LIVE_P (XBUFFER (tem))) - { - if (NILP (prev)) - list = XCDR (tail); - else - XSETCDR (prev, XCDR (tail)); - } + *prev = XCDR (tail); else - prev = tail; + prev = &XCDR_AS_LVALUE (tail); } return list; } @@ -6045,7 +6041,7 @@ mark_object (Lisp_Object arg) { struct window *w = (struct window *) ptr; bool leaf = NILP (w->hchild) && NILP (w->vchild); - + /* For live windows, Lisp code filters out killed buffers from both buffer lists. For dead windows, we do it here in attempt to help GC to reclaim killed buffers faster. */ From ae1d87e24edc6a5fa4bc291e1b2ea20d7853127c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 11 Sep 2012 15:59:50 -0700 Subject: [PATCH 134/216] Prefer assignment to memcpy when either will do. * lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]: * src/bidi.c (bidi_push_it, bidi_pop_it): * src/fns.c (copy_hash_table): * src/image.c (define_image_type): * src/keyboard.c (kbd_buffer_store_event_hold): * src/process.c (Fprocess_send_eof): * src/xfaces.c (x_create_gc) [HAVE_NS]: * src/xgselect.c (xg_select): Use assignment, not memcpy, as either will do here, and assignment is more likely to catch type errors. --- lib-src/ChangeLog | 5 +++++ lib-src/pop.c | 2 +- src/ChangeLog | 9 +++++++++ src/bidi.c | 4 ++-- src/fns.c | 2 +- src/image.c | 2 +- src/keyboard.c | 2 +- src/process.c | 5 ++--- src/xfaces.c | 2 +- src/xgselect.c | 4 ++-- 10 files changed, 25 insertions(+), 12 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 35190fd2a8f..f5846657707 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Paul Eggert + + * pop.c (socket_connection) [HAVE_GETADDRINFO]: + Prefer assignment to memcpy when either will do. + 2012-08-31 Andreas Schwab * etags.c (consider_token): Always zero-terminate token buffer. diff --git a/lib-src/pop.c b/lib-src/pop.c index 74054e0e1b1..bfbcb8c9466 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1083,7 +1083,7 @@ socket_connection (char *host, int flags) if (it->ai_addrlen == sizeof (addr)) { struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; - memcpy (&addr.sin_addr, &in_a->sin_addr, sizeof (addr.sin_addr)); + addr.sin_addr = in_a->sin_addr; if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) break; } diff --git a/src/ChangeLog b/src/ChangeLog index 2b0686cc49e..74a12b94b08 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2012-09-11 Paul Eggert + * bidi.c (bidi_push_it, bidi_pop_it): + * fns.c (copy_hash_table): + * image.c (define_image_type): + * keyboard.c (kbd_buffer_store_event_hold): + * process.c (Fprocess_send_eof): + * xfaces.c (x_create_gc) [HAVE_NS]: + * xgselect.c (xg_select): + Prefer assignment to memcpy when either will do. + * alloc.c (discard_killed_buffers): Tune and simplify a bit. Use pointer-to-a-pointer to simplify and avoid a NILP check each time an item is removed. No need to mark this function 'inline'; diff --git a/src/bidi.c b/src/bidi.c index 73fec3533a4..4186a46e19e 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -612,7 +612,7 @@ bidi_push_it (struct bidi_it *bidi_it) /* Save the current iterator state in its entirety after the last used cache slot. */ bidi_cache_ensure_space (bidi_cache_idx); - memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it)); + bidi_cache[bidi_cache_idx++] = *bidi_it; /* Push the current cache start onto the stack. */ eassert (bidi_cache_sp < IT_STACK_SIZE); @@ -636,7 +636,7 @@ bidi_pop_it (struct bidi_it *bidi_it) bidi_cache_idx = bidi_cache_start - 1; /* Restore the bidi iterator state saved in the cache. */ - memcpy (bidi_it, &bidi_cache[bidi_cache_idx], sizeof (struct bidi_it)); + *bidi_it = bidi_cache[bidi_cache_idx]; /* Pop the previous cache start from the stack. */ if (bidi_cache_sp <= 0) diff --git a/src/fns.c b/src/fns.c index 95450c5e911..91dc6639150 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3680,7 +3680,7 @@ copy_hash_table (struct Lisp_Hash_Table *h1) h2 = allocate_hash_table (); next = h2->header.next.vector; - memcpy (h2, h1, sizeof *h2); + *h2 = *h1; h2->header.next.vector = next; h2->key_and_value = Fcopy_sequence (h1->key_and_value); h2->hash = Fcopy_sequence (h1->hash); diff --git a/src/image.c b/src/image.c index 4ec6105d72d..52598a41ab9 100644 --- a/src/image.c +++ b/src/image.c @@ -593,7 +593,7 @@ define_image_type (struct image_type *type, int loaded) /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ struct image_type *p = xmalloc (sizeof *p); - memcpy (p, type, sizeof *p); + *p = *type; p->next = image_types; image_types = p; success = Qt; diff --git a/src/keyboard.c b/src/keyboard.c index d26cf35e108..42c67f68ede 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3602,7 +3602,7 @@ kbd_buffer_store_event_hold (register struct input_event *event, if (hold_quit) { - memcpy (hold_quit, event, sizeof (*event)); + *hold_quit = *event; return; } diff --git a/src/process.c b/src/process.c index 0ae68567d6b..f80b5e80c76 100644 --- a/src/process.c +++ b/src/process.c @@ -6367,9 +6367,8 @@ process has been transmitted to the serial port. */) if (!proc_encode_coding_system[new_outfd]) proc_encode_coding_system[new_outfd] = xmalloc (sizeof (struct coding_system)); - memcpy (proc_encode_coding_system[new_outfd], - proc_encode_coding_system[old_outfd], - sizeof (struct coding_system)); + *proc_encode_coding_system[new_outfd] + = *proc_encode_coding_system[old_outfd]; memset (proc_encode_coding_system[old_outfd], 0, sizeof (struct coding_system)); diff --git a/src/xfaces.c b/src/xfaces.c index aee5158036f..c113c1a37b7 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -661,7 +661,7 @@ x_create_gc (struct frame *f, XGCValues *xgcv) { GC gc = xmalloc (sizeof *gc); - memcpy (gc, xgcv, sizeof (XGCValues)); + *gc = *xgcv; return gc; } diff --git a/src/xgselect.c b/src/xgselect.c index 0c00d815820..5f4c7edfb79 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -49,9 +49,9 @@ xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, && g_main_context_pending (context = g_main_context_default ()))) return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask); - if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds)); + if (rfds) all_rfds = *rfds; else FD_ZERO (&all_rfds); - if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds)); + if (wfds) all_wfds = *wfds; else FD_ZERO (&all_wfds); n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, From 50f2e553ce21a2901e9f935650018289c11fcc39 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 11 Sep 2012 16:50:28 -0700 Subject: [PATCH 135/216] Avoid _setjmp/_longjmp problems with local nonvolatile variables. If a nonvolatile local variable is written before a _longjmp to the frame containing the variable, and is read after the _longjmp, the value read is indeterminate. Some local variables of type 'struct handler' and 'struct catchtag' are used in this way, so mark each of their slots as volatile if the slot can be set before _longjmp and read afterwards. * lisp.h (struct handler): var and chosen_clause are now volatile. (struct catchtag): val, next, and pdlcount are now volatile. --- src/ChangeLog | 10 ++++++++++ src/lisp.h | 21 ++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 74a12b94b08..f4cae50d8ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2012-09-11 Paul Eggert + Avoid _setjmp/_longjmp problems with local nonvolatile variables. + If a nonvolatile local variable is written before a _longjmp to + the frame containing the variable, and is read after the _longjmp, + the value read is indeterminate. Some local variables of type + 'struct handler' and 'struct catchtag' are used in this way, so + mark each of their slots as volatile if the slot can be set before + _longjmp and read afterwards. + * lisp.h (struct handler): var and chosen_clause are now volatile. + (struct catchtag): val, next, and pdlcount are now volatile. + * bidi.c (bidi_push_it, bidi_pop_it): * fns.c (copy_hash_table): * image.c (define_image_type): diff --git a/src/lisp.h b/src/lisp.h index ae9b3422534..ca22ca81228 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2001,7 +2001,10 @@ extern ptrdiff_t specpdl_size; #define SPECPDL_INDEX() (specpdl_ptr - specpdl) -/* Everything needed to describe an active condition case. */ +/* Everything needed to describe an active condition case. + + Members are volatile if their values need to survive _longjmp when + a 'struct handler' is a local variable. */ struct handler { /* The handler clauses and variable from the condition-case form. */ @@ -2012,10 +2015,12 @@ struct handler error: handle all conditions, and errors can run the debugger or display a backtrace. */ Lisp_Object handler; - Lisp_Object var; + + Lisp_Object volatile var; + /* Fsignal stores here the condition-case clause that applies, and Fcondition_case thus knows which clause to run. */ - Lisp_Object chosen_clause; + Lisp_Object volatile chosen_clause; /* Used to effect the longjump out to the handler. */ struct catchtag *tag; @@ -2041,19 +2046,21 @@ struct handler of the catch form. All the other members are concerned with restoring the interpreter - state. */ + state. + Members are volatile if their values need to survive _longjmp when + a 'struct catchtag' is a local variable. */ struct catchtag { Lisp_Object tag; - Lisp_Object val; - struct catchtag *next; + Lisp_Object volatile val; + struct catchtag *volatile next; struct gcpro *gcpro; jmp_buf jmp; struct backtrace *backlist; struct handler *handlerlist; EMACS_INT lisp_eval_depth; - ptrdiff_t pdlcount; + ptrdiff_t volatile pdlcount; int poll_suppress_count; int interrupt_input_blocked; struct byte_stack *byte_stack; From 45b82ad0ebedaa1b7094912e218bea1510c33feb Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 11 Sep 2012 20:14:50 -0400 Subject: [PATCH 136/216] * src/eval.c: Add `inhibit-debugger'. (Qinhibit_debugger): New symbol. (call_debugger): Bind it instead of Qdebug_on_error. (maybe_call_debugger): Test Vinhibit_debugger. (syms_of_eval): Define inhibit-debugger. * src/xdisp.c (set_message): Don't bind Qinhibit_debug_on_message. (syms_of_xdisp): Remove inhibit-debug-on-message. * lisp/emacs-lisp/debug.el (debug): Don't bind debug-on-error since inhibit-debugger is bound instead. --- etc/NEWS | 14 +++++++++----- lisp/ChangeLog | 9 +++++++-- lisp/emacs-lisp/debug.el | 2 -- src/ChangeLog | 10 ++++++++++ src/composite.h | 2 +- src/eval.c | 15 +++++++++++---- src/keyboard.c | 4 ++-- src/xdisp.c | 19 +++---------------- 8 files changed, 43 insertions(+), 32 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index af4bcf11dbb..e095ca795e4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -675,7 +675,15 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'. ** New error type and new function `user-error'. Doesn't trigger the debugger. -** New option `debugger-bury-or-kill'. +** Debugger +*** New option `debugger-bury-or-kill'. + +*** Set `debug-on-message' to enter the debugger when a certain +message is displayed in the echo area. This can be useful when trying +to work out which code is doing something. + +*** New var `inhibit-debugger', automatically set to prevent accidental +recursive invocations. +++ ** New utility function `buffer-narrowed-p'. @@ -1977,10 +1985,6 @@ instead of jumping all the way to the top-level. *** Set `debug-on-event' to enter the debugger on events like SIGUSR1. This can be useful when `inhibit-quit' is set. -*** Set `debug-on-message' to enter the debugger when a certain -message is displayed in the echo area. This can be useful when trying -to work out which code is doing something. - ** The new function `server-eval-at' allows evaluation of Lisp forms on named Emacs server instances. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdc021d192f..202b41891eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-12 Stefan Monnier + + * emacs-lisp/debug.el (debug): Don't bind debug-on-error since + inhibit-debugger is bound instead. + 2012-09-11 Bastien Guerry * subr.el (set-temporary-overlay-map): Add a docstring. @@ -24,8 +29,8 @@ 2012-09-10 Dan Nicolaescu - * vc/diff-mode.el (diff-mode-menu): Bind - diff-remove-trailing-whitespace. + * vc/diff-mode.el (diff-mode-menu): + Bind diff-remove-trailing-whitespace. 2012-09-10 Stefan Monnier diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 188c0800eb8..bdb35e424d0 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -162,8 +162,6 @@ first will be printed into the backtrace buffer." (unless noninteractive (message "Entering debugger...")) (let (debugger-value - (debug-on-error nil) - (debug-on-quit nil) (debugger-previous-state (if (get-buffer "*Backtrace*") (with-current-buffer (get-buffer "*Backtrace*") diff --git a/src/ChangeLog b/src/ChangeLog index f4cae50d8ed..a005b1d80c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2012-09-12 Stefan Monnier + + * eval.c: Add `inhibit-debugger'. + (Qinhibit_debugger): New symbol. + (call_debugger): Bind it instead of Qdebug_on_error. + (maybe_call_debugger): Test Vinhibit_debugger. + (syms_of_eval): Define inhibit-debugger. + * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message. + (syms_of_xdisp): Remove inhibit-debug-on-message. + 2012-09-11 Paul Eggert Avoid _setjmp/_longjmp problems with local nonvolatile variables. diff --git a/src/composite.h b/src/composite.h index 68f5b27ee42..9462b932c66 100644 --- a/src/composite.h +++ b/src/composite.h @@ -113,7 +113,7 @@ extern Lisp_Object composition_temp; && (end - start) == COMPOSITION_LENGTH (prop)) /* Return the Nth glyph of composition specified by CMP. CMP is a - pointer to `struct composition'. */ + pointer to `struct composition'. */ #define COMPOSITION_GLYPH(cmp, n) \ XINT (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \ ->key_and_value) \ diff --git a/src/eval.c b/src/eval.c index 4f0d6c69a51..8a8a507a1b6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -69,7 +69,7 @@ Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp; Lisp_Object Qinhibit_quit; Lisp_Object Qand_rest; static Lisp_Object Qand_optional; -static Lisp_Object Qdebug_on_error; +static Lisp_Object Qinhibit_debugger; static Lisp_Object Qdeclare; Lisp_Object Qinternal_interpreter_environment, Qclosure; @@ -229,7 +229,7 @@ call_debugger (Lisp_Object arg) specbind (intern ("debugger-may-continue"), debug_while_redisplaying ? Qnil : Qt); specbind (Qinhibit_redisplay, Qnil); - specbind (Qdebug_on_error, Qnil); + specbind (Qinhibit_debugger, Qt); #if 0 /* Binding this prevents execution of Lisp code during redisplay, which necessarily leads to display problems. */ @@ -1725,6 +1725,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) /* Don't try to run the debugger with interrupts blocked. The editing loop would return anyway. */ ! INPUT_BLOCKED_P + && NILP (Vinhibit_debugger) /* Does user want to enter debugger for this kind of error? */ && (EQ (sig, Qquit) ? debug_on_quit @@ -3467,7 +3468,7 @@ before making `inhibit-quit' nil. */); DEFSYM (Qinhibit_quit, "inhibit-quit"); DEFSYM (Qautoload, "autoload"); - DEFSYM (Qdebug_on_error, "debug-on-error"); + DEFSYM (Qinhibit_debugger, "inhibit-debugger"); DEFSYM (Qmacro, "macro"); DEFSYM (Qdeclare, "declare"); @@ -3482,6 +3483,12 @@ before making `inhibit-quit' nil. */); DEFSYM (Qclosure, "closure"); DEFSYM (Qdebug, "debug"); + DEFVAR_LISP ("inhibit-debugger", Vinhibit_debugger, + doc: /* Non-nil means never enter the debugger. +Normally set while the debugger is already active, to avoid recursive +invocations. */); + Vinhibit_debugger = Qnil; + DEFVAR_LISP ("debug-on-error", Vdebug_on_error, doc: /* Non-nil means enter debugger if an error is signaled. Does not apply to errors handled by `condition-case' or those @@ -3491,7 +3498,7 @@ if one of its condition symbols appears in the list. When you evaluate an expression interactively, this variable is temporarily non-nil if `eval-expression-debug-on-error' is non-nil. The command `toggle-debug-on-error' toggles this. -See also the variable `debug-on-quit'. */); +See also the variable `debug-on-quit' and `inhibit-debugger'. */); Vdebug_on_error = Qnil; DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, diff --git a/src/keyboard.c b/src/keyboard.c index 42c67f68ede..8091258578c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4133,7 +4133,7 @@ kbd_buffer_get_event (KBOARD **kbp, *used_mouse_menu = 1; #endif #ifdef HAVE_NS - /* certain system events are non-key events */ + /* Certain system events are non-key events. */ if (used_mouse_menu && event->kind == NS_NONKEY_EVENT) *used_mouse_menu = 1; @@ -4161,7 +4161,7 @@ kbd_buffer_get_event (KBOARD **kbp, so x remains nil. */ x = Qnil; - /* XXX Can f or mouse_position_hook be NULL here? */ + /* XXX Can f or mouse_position_hook be NULL here? */ if (f && FRAME_TERMINAL (f)->mouse_position_hook) (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, 0, &bar_window, &part, &x, &y, &t); diff --git a/src/xdisp.c b/src/xdisp.c index c1e05d6df15..e9d9595d91e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -364,7 +364,6 @@ static Lisp_Object Qslice; Lisp_Object Qcenter; static Lisp_Object Qmargin, Qpointer; static Lisp_Object Qline_height; -static Lisp_Object Qinhibit_debug_on_message; /* These setters are used only in this file, so they can be private. */ static inline void @@ -10590,8 +10589,6 @@ static void set_message (const char *s, Lisp_Object string, ptrdiff_t nbytes, int multibyte_p) { - ptrdiff_t count = SPECPDL_INDEX (); - message_enable_multibyte = ((s && multibyte_p) || (STRINGP (string) && STRING_MULTIBYTE (string))); @@ -10601,14 +10598,9 @@ set_message (const char *s, Lisp_Object string, message_buf_print = 0; help_echo_showing_p = 0; - if (NILP (Vinhibit_debug_on_message) && STRINGP (Vdebug_on_message) + if (STRINGP (Vdebug_on_message) && fast_string_match (Vdebug_on_message, string) >= 0) - { - specbind (Qinhibit_debug_on_message, Qt); - call_debugger (list2 (Qerror, string)); - } - - unbind_to (count, Qnil); + call_debugger (list2 (Qerror, string)); } @@ -12800,7 +12792,7 @@ overlay_arrow_at_row (struct it *it, struct glyph_row *row) return make_number (fringe_bitmap); } #endif - return make_number (-1); /* Use default arrow bitmap */ + return make_number (-1); /* Use default arrow bitmap. */ } return overlay_arrow_string_or_property (var); } @@ -29316,11 +29308,6 @@ Its value should be an ASCII acronym string, `hex-code', `empty-box', or DEFVAR_LISP ("debug-on-message", Vdebug_on_message, doc: /* If non-nil, debug if a message matching this regexp is displayed. */); Vdebug_on_message = Qnil; - - DEFVAR_LISP ("inhibit-debug-on-message", Vinhibit_debug_on_message, - doc: /* If non-nil, inhibit `debug-on-message' from entering the debugger. */); - Vinhibit_debug_on_message = Qnil; - DEFSYM(Qinhibit_debug_on_message, "inhibit-debug-on-message"); } From 60c49c0fe92cde4e9f4d2db0ee15e55b7c7aa1cb Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 12 Sep 2012 09:12:48 -0400 Subject: [PATCH 137/216] * lisp/emacs-lisp/edebug.el (edebug-enter): Don't mess with overriding-local-map and pre/post-command-hook here. (edebug-recursive-edit): Do it here instead. (edebug-outside-unread-command-char): Remove all uses of unread-command-char. Fixes: debbugs:12345 --- lisp/ChangeLog | 6 +++ lisp/emacs-lisp/edebug.el | 106 ++++++++++++++------------------------ 2 files changed, 46 insertions(+), 66 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 202b41891eb..f24ccb3aaa6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2012-09-12 Stefan Monnier + * emacs-lisp/edebug.el (edebug-enter): Don't mess with + overriding-local-map and pre/post-command-hook here. + (edebug-recursive-edit): Do it here instead (bug#12345). + (edebug-outside-unread-command-char): Remove all uses of + unread-command-char. + * emacs-lisp/debug.el (debug): Don't bind debug-on-error since inhibit-debugger is bound instead. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 7fcd339d6d2..17f6f79cd66 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2248,47 +2248,14 @@ error is signaled again. (debug-on-quit edebug-on-quit) ;; Lexical bindings must be uncompiled for this to work. - (cl-lexical-debug t) - - (edebug-outside-overriding-local-map overriding-local-map) - (edebug-outside-overriding-terminal-local-map - overriding-terminal-local-map) - - ;; Save the outside value of executing macro. (here??) - (edebug-outside-executing-macro executing-kbd-macro) - (edebug-outside-pre-command-hook - (edebug-var-status 'pre-command-hook)) - (edebug-outside-post-command-hook - (edebug-var-status 'post-command-hook))) + (cl-lexical-debug t)) (unwind-protect - (let (;; Don't keep reading from an executing kbd macro - ;; within edebug unless edebug-continue-kbd-macro is - ;; non-nil. Again, local binding may not be best. - (executing-kbd-macro - (if edebug-continue-kbd-macro executing-kbd-macro)) - - ;; Don't get confused by the user's keymap changes. - (overriding-local-map nil) - (overriding-terminal-local-map nil) - - (signal-hook-function 'edebug-signal) - - ;; Disable command hooks. This is essential when - ;; a hook function is instrumented - to avoid infinite loop. - ;; This may be more than we need, however. - (pre-command-hook nil) - (post-command-hook nil)) + (let ((signal-hook-function 'edebug-signal)) (setq edebug-execution-mode (or edebug-next-execution-mode edebug-initial-mode edebug-execution-mode) edebug-next-execution-mode nil) - (edebug-enter edebug-function edebug-args edebug-body)) - ;; Reset global variables in case outside value was changed. - (setq executing-kbd-macro edebug-outside-executing-macro) - (edebug-restore-status - 'post-command-hook edebug-outside-post-command-hook) - (edebug-restore-status - 'pre-command-hook edebug-outside-pre-command-hook))) + (edebug-enter edebug-function edebug-args edebug-body)))) (let* ((edebug-data (get edebug-function 'edebug)) (edebug-def-mark (car edebug-data)) ; mark at def start @@ -2804,7 +2771,6 @@ MSG is printed after `::::} '." ;; in versions where the variable is *not* built-in. ;; Emacs 18 FIXME -(defvar edebug-outside-unread-command-char) ;; Emacs 19. (defvar edebug-outside-last-command-event) @@ -2814,15 +2780,6 @@ MSG is printed after `::::} '." (defvar edebug-outside-last-nonmenu-event) (defvar edebug-outside-track-mouse) -;; Disable byte compiler warnings about unread-command-char and -event -;; (maybe works with byte-compile-version 2.22 at least) -(defvar edebug-unread-command-char-warning) -(defvar edebug-unread-command-event-warning) -(eval-when-compile ; FIXME - (setq edebug-unread-command-char-warning - (get 'unread-command-char 'byte-obsolete-variable)) - (put 'unread-command-char 'byte-obsolete-variable nil)) - (defun edebug-recursive-edit () ;; Start up a recursive edit inside of edebug. ;; The current buffer is the edebug-buffer, which is put into edebug-mode. @@ -2844,14 +2801,24 @@ MSG is printed after `::::} '." (edebug-outside-map (current-local-map)) - (edebug-outside-standard-output standard-output) + (edebug-outside-overriding-local-map overriding-local-map) + (edebug-outside-overriding-terminal-local-map + overriding-terminal-local-map) + + ;; Save the outside value of executing macro. (here??) + (edebug-outside-executing-macro executing-kbd-macro) + (edebug-outside-pre-command-hook + (edebug-var-status 'pre-command-hook)) + (edebug-outside-post-command-hook + (edebug-var-status 'post-command-hook)) + + (edebug-outside-standard-output standard-output) (edebug-outside-standard-input standard-input) (edebug-outside-defining-kbd-macro defining-kbd-macro) (edebug-outside-last-command last-command) (edebug-outside-this-command this-command) - (edebug-outside-unread-command-char unread-command-char) ; FIXME (edebug-outside-current-prefix-arg current-prefix-arg) (edebug-outside-last-input-event last-input-event) @@ -2867,9 +2834,6 @@ MSG is printed after `::::} '." ;; We could set these to the values for previous edebug call. (last-command last-command) (this-command this-command) - - ;; Assume no edebug command sets unread-command-char. - (unread-command-char -1) (current-prefix-arg nil) ;; More for Emacs 19 @@ -2879,7 +2843,17 @@ MSG is printed after `::::} '." (last-nonmenu-event nil) (track-mouse nil) - ;; Bind again to outside values. + ;; Don't keep reading from an executing kbd macro + ;; within edebug unless edebug-continue-kbd-macro is + ;; non-nil. Again, local binding may not be best. + (executing-kbd-macro + (if edebug-continue-kbd-macro executing-kbd-macro)) + + ;; Don't get confused by the user's keymap changes. + (overriding-local-map nil) + (overriding-terminal-local-map nil) + + ;; Bind again to outside values. (debug-on-error edebug-outside-debug-on-error) (debug-on-quit edebug-outside-debug-on-quit) @@ -2887,6 +2861,12 @@ MSG is printed after `::::} '." (defining-kbd-macro (if edebug-continue-kbd-macro defining-kbd-macro)) + ;; Disable command hooks. This is essential when + ;; a hook function is instrumented - to avoid infinite loop. + ;; This may be more than we need, however. + (pre-command-hook nil) + (post-command-hook nil) + ;; others?? ) @@ -2933,7 +2913,6 @@ MSG is printed after `::::} '." last-command-event edebug-outside-last-command-event last-command edebug-outside-last-command this-command edebug-outside-this-command - unread-command-char edebug-outside-unread-command-char current-prefix-arg edebug-outside-current-prefix-arg last-input-event edebug-outside-last-input-event last-event-frame edebug-outside-last-event-frame @@ -2942,9 +2921,13 @@ MSG is printed after `::::} '." standard-output edebug-outside-standard-output standard-input edebug-outside-standard-input - defining-kbd-macro edebug-outside-defining-kbd-macro - )) - )) + defining-kbd-macro edebug-outside-defining-kbd-macro) + + (setq executing-kbd-macro edebug-outside-executing-macro) + (edebug-restore-status + 'post-command-hook edebug-outside-post-command-hook) + (edebug-restore-status + 'pre-command-hook edebug-outside-pre-command-hook)))) ;;; Display related functions @@ -3562,7 +3545,6 @@ Return the result of the last expression." (last-command-event edebug-outside-last-command-event) (last-command edebug-outside-last-command) (this-command edebug-outside-this-command) - (unread-command-char edebug-outside-unread-command-char) (unread-command-events edebug-outside-unread-command-events) (current-prefix-arg edebug-outside-current-prefix-arg) (last-input-event edebug-outside-last-input-event) @@ -3602,7 +3584,6 @@ Return the result of the last expression." edebug-outside-last-command-event last-command-event edebug-outside-last-command last-command edebug-outside-this-command this-command - edebug-outside-unread-command-char unread-command-char edebug-outside-unread-command-events unread-command-events edebug-outside-current-prefix-arg current-prefix-arg edebug-outside-last-input-event last-input-event @@ -4240,7 +4221,7 @@ It is removed when you hit any char." (let ((buffer-read-only nil)) (undo-boundary) (edebug-display-freq-count) - (setq unread-command-char (read-char)) + (setq unread-command-events (append unread-command-events (read-event))) ;; Yuck! This doesn't seem to work at all for me. (undo))) @@ -4357,13 +4338,6 @@ With prefix argument, make it a temporary breakpoint." ;; Extension for bytecomp to resolve undefined function references. ;; Requires new byte compiler. -;; Reenable byte compiler warnings about unread-command-char and -event. -;; Disabled before edebug-recursive-edit. -(eval-when-compile - (if edebug-unread-command-char-warning - (put 'unread-command-char 'byte-obsolete-variable - edebug-unread-command-char-warning))) - (eval-when-compile ;; The body of eval-when-compile seems to get evaluated with eval-defun. ;; We only want to evaluate when actually byte compiling. From 44677e307235c9c0f58a78d6af56b8bb2750e939 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 07:03:15 -0700 Subject: [PATCH 138/216] * texinfo.tex: Merge from gnulib. --- doc/misc/ChangeLog | 4 ++++ doc/misc/texinfo.tex | 49 +++++++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 20c74cf70b2..2222a535c1a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2012-09-12 Paul Eggert + + * texinfo.tex: Merge from gnulib. + 2012-08-06 Aurélien Aptel * url.texi (Parsed URLs): Adjust to the code's use of defstruct diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index dc4bf6400c4..9a2439c815d 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2012-07-29.17} +\def\texinfoversion{2012-09-05.06} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -594,7 +594,7 @@ \def\:{\spacefactor=1000 } % @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak @@ -3269,6 +3269,20 @@ end \finishedtitlepagetrue } +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + % Macros to be used within @titlepage: \let\subtitlerm=\tenrm @@ -3276,7 +3290,7 @@ end \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rmisbold #1} + \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -5579,14 +5593,6 @@ end % Define @majorheading, @heading and @subheading -% NOTE on use of \vbox for chapter headings, section headings, and such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz @@ -5594,10 +5600,8 @@ end \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}% - \bigskip \par\penalty 200\relax + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak \suppressfirstparagraphindent } @@ -5756,8 +5760,7 @@ end % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright - \hangindent=\wd0 \centerparametersmaybe + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title @@ -5779,18 +5782,18 @@ end \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt - \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen From 92547ff9d92c77452b6d628a225ecb58b7bb80f9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 07:10:42 -0700 Subject: [PATCH 139/216] * image.c (jpeg_memory_src): Don't assume string len fits in unsigned. --- src/ChangeLog | 4 ++++ src/image.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a005b1d80c7..92394c678ea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-12 Paul Eggert + + * image.c (jpeg_memory_src): Don't assume string len fits in unsigned. + 2012-09-12 Stefan Monnier * eval.c: Add `inhibit-debugger'. diff --git a/src/image.c b/src/image.c index 52598a41ab9..cf01602050f 100644 --- a/src/image.c +++ b/src/image.c @@ -6181,7 +6181,7 @@ our_memory_skip_input_data (j_decompress_ptr cinfo, long int num_bytes) reading the image. */ static void -jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, unsigned int len) +jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, ptrdiff_t len) { struct jpeg_source_mgr *src; From 4dece104ac5d50f934a13b7a817e27750f328278 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 12 Sep 2012 17:49:17 +0200 Subject: [PATCH 140/216] Try to keep height of debugger window consistent. (Bug#8789) * emacs-lisp/debug.el (debugger-previous-window-height): New variable. (debug): When debugger-jumping-flag is non-nil try to restore height of debugger window. (Bug#8789) --- lisp/ChangeLog | 7 +++++++ lisp/emacs-lisp/debug.el | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f24ccb3aaa6..0345c922a15 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-09-12 Martin Rudalics + + * emacs-lisp/debug.el (debugger-previous-window-height): New + variable. + (debug): When debugger-jumping-flag is non-nil try to restore + height of debugger window. (Bug#8789) + 2012-09-12 Stefan Monnier * emacs-lisp/edebug.el (edebug-enter): Don't mess with diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index bdb35e424d0..8b89e65c5d9 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -96,6 +96,9 @@ The value used here is passed to `quit-restore-window'." (defvar debugger-previous-window nil "This is the window last showing the debugger buffer.") +(defvar debugger-previous-window-height nil + "The last recorded height of `debugger-previous-window'.") + (defvar debugger-previous-backtrace nil "The contents of the previous backtrace (including text properties). This is to optimize `debugger-make-xrefs'.") @@ -234,7 +237,17 @@ first will be printed into the backtrace buffer." . (,(when debugger-previous-window `(previous-window . ,debugger-previous-window))))) (setq debugger-window (selected-window)) - (setq debugger-previous-window debugger-window) + (if (eq debugger-previous-window debugger-window) + (when debugger-jumping-flag + ;; Try to restore previous height of debugger + ;; window. + (condition-case nil + (window-resize + debugger-window + (- debugger-previous-window-height + (window-total-size debugger-window))) + (error nil))) + (setq debugger-previous-window debugger-window)) (debugger-mode) (debugger-setup-buffer debugger-args) (when noninteractive @@ -262,6 +275,9 @@ first will be printed into the backtrace buffer." (recursive-edit)))) (when (and (window-live-p debugger-window) (eq (window-buffer debugger-window) debugger-buffer)) + ;; Record height of debugger window. + (setq debugger-previous-window-height + (window-total-size debugger-window)) ;; Unshow debugger-buffer. (quit-restore-window debugger-window debugger-bury-or-kill)) ;; Restore previous state of debugger-buffer in case we were From e210dac49f20de277b81d2298e6be8f98f8ac738 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 12 Sep 2012 09:00:11 -0700 Subject: [PATCH 141/216] How to restore a mail from the mailman moderation message --- admin/notes/bugtracker | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index 7d5e85a3ae0..eed67f10dfd 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -618,6 +618,16 @@ mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/ Also check that the sender was not added to the auto-discard/reject list in the debbugs-submit Mailman interface. +If you don't have the actual mail, just the mailman moderation mail +version of it, you need to extract the original mail, and add the +following headers: + +1) The leading envelope From line. +2) Message-ID (get it from /var/log/mailman/vette). +3) X-Debbugs-Envelope-To: submit + +Then pipe it to receive as above. + ** Administrivia The debbugs-submit list should have the administrivia option off, From fbbcaf1b249f7eba5ac53a3b380e1692ca1dbff9 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 12 Sep 2012 18:36:25 +0200 Subject: [PATCH 142/216] Sync with Tramp 2.2.6. * net/tramp.el (tramp-accept-process-output): Don't use JUST-THIS-ONE in the XEmacs case. * net/trampver.el: Update release number. --- lisp/ChangeLog | 9 +++++++++ lisp/net/tramp.el | 4 +++- lisp/net/trampver.el | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0345c922a15..56311198831 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2012-09-12 Michael Albinus + + Sync with Tramp 2.2.6. + + * net/tramp.el (tramp-accept-process-output): Don't use + JUST-THIS-ONE in the XEmacs case. + + * net/trampver.el: Update release number. + 2012-09-12 Martin Rudalics * emacs-lisp/debug.el (debugger-previous-window-height): New diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a17bbfa0d14..019ab1eef0f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3293,7 +3293,9 @@ for process communication also." ;; Under Windows XP, accept-process-output doesn't return ;; sometimes. So we add an additional timeout. (with-timeout ((or timeout 1)) - (accept-process-output proc timeout timeout-msecs (and proc t)))) + (if (featurep 'xemacs) + (accept-process-output proc timeout timeout-msecs) + (accept-process-output proc timeout timeout-msecs (and proc t))))) (tramp-message proc 10 "\n%s" (buffer-string)))) (defun tramp-check-for-regexp (proc regexp) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 499af730788..2d0a8e3d23d 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -31,7 +31,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.6-pre" +(defconst tramp-version "2.2.6" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.6-pre is not fit for %s" + (format "Tramp 2.2.6 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) From 20121a26f0960c6c225ca716bfbc4a33b9ac6289 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 12 Sep 2012 18:39:10 +0200 Subject: [PATCH 143/216] Sync with Tramp 2.2.6. * tramp.texi (Bug Reports): Cleanup caches before a test run. * trampver.texi: Update release number. --- doc/misc/ChangeLog | 8 ++++++++ doc/misc/tramp.texi | 3 +++ doc/misc/trampver.texi | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 2222a535c1a..408e4665955 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,11 @@ +2012-09-12 Michael Albinus + + Sync with Tramp 2.2.6. + + * tramp.texi (Bug Reports): Cleanup caches before a test run. + + * trampver.texi: Update release number. + 2012-09-12 Paul Eggert * texinfo.tex: Merge from gnulib. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 87ad2bc5009..530b8fdd6c2 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2853,6 +2853,9 @@ If you can identify a minimal test case that reproduces the problem, include that with your bug report. This will make it much easier for the development team to analyze and correct the problem. +Sometimes, there might be also problems due to Tramp caches. Flush +all caches before running the test, @ref{Cleanup remote connections}. + Before reporting the bug, you should set the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the @file{~/.emacs} file and repeat the bug. Then, include the contents of the @file{*tramp/foo*} diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 78bd9d0965f..d902ac0fb97 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -8,7 +8,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.6-pre +@set trampver 2.2.6 @c Other flags from configuration @set instprefix /usr/local From 8099e36b7edde645bfc1a13bfa142ae7645e6bd6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 12 Sep 2012 22:14:02 +0300 Subject: [PATCH 144/216] Fix silent exit upon assertion violation on MS-Windows. src/w32proc.c (sys_kill): If PID is our process ID and the signal is SIGABRT, call emacs_abort. Avoids silently exiting upon assertion violation. (Bug#12426) --- src/ChangeLog | 6 ++++++ src/w32proc.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 92394c678ea..bfb6e5a87b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-12 Eli Zaretskii + + * w32proc.c (sys_kill): If PID is our process ID and the signal is + SIGABRT, call emacs_abort. Avoids silently exiting upon assertion + violation. (Bug#12426) + 2012-09-12 Paul Eggert * image.c (jpeg_memory_src): Don't assume string len fits in unsigned. diff --git a/src/w32proc.c b/src/w32proc.c index b9239cbb99a..74427e76a4f 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -1429,6 +1429,9 @@ sys_kill (int pid, int sig) int need_to_free = 0; int rc = 0; + if (pid == getpid () && sig == SIGABRT) + emacs_abort (); + /* Only handle signals that will result in the process dying */ if (sig != SIGINT && sig != SIGKILL && sig != SIGQUIT && sig != SIGHUP) { From bfeae2cf098dcf5bdb4af14d896e790cbe91d60f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 12 Sep 2012 15:16:36 -0400 Subject: [PATCH 145/216] Remove unread-command-char. * src/keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) (Fdiscard_input, quit_throw_to_read_char, init_keyboard) (syms_of_keyboard): Remove support for unread-command-char. * lisp/emacs-lisp/debug.el (debugger-outer-unread-command-char, debug) (debugger-env-macro): Remove support for unread-command-char. * lisp/ehelp.el (with-electric-help): Accept functions in electric-help-form-to-execute. (electric-help-execute-extended, electric-help-ctrl-x-prefix): Use it. And replace unread-command-char -> unread-command-events. * lisp/subr.el (set-temporary-overlay-map): Minimize slightly the impact of the temporary map re-appearing on emulation-mode-map-alists. * lisp/emacs-lisp/edebug.el (def-edebug-form-spec): Remove, it's been broken since 22.1. --- doc/lispref/commands.texi | 11 ----------- etc/NEWS | 2 +- lisp/ChangeLog | 20 ++++++++++++++++++-- lisp/ehelp.el | 13 ++++++++++--- lisp/emacs-lisp/debug.el | 21 +-------------------- lisp/emacs-lisp/edebug.el | 5 ----- lisp/progmodes/ebrowse.el | 2 +- lisp/subr.el | 6 +----- src/ChangeLog | 6 ++++++ src/data.c | 2 +- src/keyboard.c | 25 ++++--------------------- 11 files changed, 43 insertions(+), 70 deletions(-) diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 7e24de94fbe..dc0fa4c639d 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2738,17 +2738,6 @@ This function converts the string or vector @var{key} to a list of individual events, which you can put in @code{unread-command-events}. @end defun -@ignore -@defvar unread-command-char -This variable holds a character to be read as command input. -A value of -1 means ``empty''. - -This variable is mostly obsolete now that you can use -@code{unread-command-events} instead; it exists only to support programs -written for Emacs versions 18 and earlier. -@end defvar -@end ignore - @defun input-pending-p @cindex waiting for command key input This function determines whether any command input is currently diff --git a/etc/NEWS b/etc/NEWS index e095ca795e4..a7388c4e9fa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -638,7 +638,7 @@ are deprecated and will be removed eventually. *** `facemenu-unlisted-faces' *** `rmail-decode-mime-charset' -*** `last-input-char' and `last-command-char' +*** `last-input-char', `last-command-char', `unread-command-char'. * Lisp changes in Emacs 24.3 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 56311198831..549b70a1de1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2012-09-12 Stefan Monnier + + * emacs-lisp/debug.el (debugger-outer-unread-command-char, debug) + (debugger-env-macro): Remove support for unread-command-char. + + * subr.el (set-temporary-overlay-map): Minimize slightly the impact of + the temporary map re-appearing on emulation-mode-map-alists. + + * emacs-lisp/edebug.el (def-edebug-form-spec): Remove, it's been broken + since 22.1. + + * ehelp.el (with-electric-help): Accept functions in + electric-help-form-to-execute. + (electric-help-execute-extended, electric-help-ctrl-x-prefix): Use it. + And replace unread-command-char -> unread-command-events. + 2012-09-12 Michael Albinus Sync with Tramp 2.2.6. @@ -9,8 +25,8 @@ 2012-09-12 Martin Rudalics - * emacs-lisp/debug.el (debugger-previous-window-height): New - variable. + * emacs-lisp/debug.el (debugger-previous-window-height): + New variable. (debug): When debugger-jumping-flag is non-nil try to restore height of debugger window. (Bug#8789) diff --git a/lisp/ehelp.el b/lisp/ehelp.el index abb897f73f6..281148d9cf6 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el @@ -193,7 +193,9 @@ BUFFER is put back into its original major mode." (replace-buffer-in-windows buffer) ;; must do this outside of save-window-excursion (bury-buffer buffer)) - (eval electric-help-form-to-execute)))) + (if (functionp electric-help-form-to-execute) + (funcall electric-help-form-to-execute) + (eval electric-help-form-to-execute))))) (defun electric-help-command-loop () (catch 'exit @@ -349,14 +351,19 @@ will select it.)" ;; continues with execute-extended-command. (defun electric-help-execute-extended (_prefixarg) (interactive "p") - (setq electric-help-form-to-execute '(execute-extended-command nil)) + (setq electric-help-form-to-execute + (lambda () (execute-extended-command nil))) (electric-help-retain)) ;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then ;; continues with ctrl-x prefix. (defun electric-help-ctrl-x-prefix (_prefixarg) (interactive "p") - (setq electric-help-form-to-execute '(progn (message nil) (setq unread-command-char ?\C-x))) + (setq electric-help-form-to-execute + (lambda () + (message nil) + (setq unread-command-events + (append unread-command-events '(?\C-x))))) (electric-help-retain)) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 8b89e65c5d9..774b4d3d600 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -110,10 +110,6 @@ This is to optimize `debugger-make-xrefs'.") (defvar debugger-outer-track-mouse) (defvar debugger-outer-last-command) (defvar debugger-outer-this-command) -;; unread-command-char is obsolete, -;; but we still save and restore it -;; in case some user program still tries to set it. -(defvar debugger-outer-unread-command-char) (defvar debugger-outer-unread-command-events) (defvar debugger-outer-unread-post-input-method-events) (defvar debugger-outer-last-input-event) @@ -185,8 +181,6 @@ first will be printed into the backtrace buffer." (debugger-outer-track-mouse track-mouse) (debugger-outer-last-command last-command) (debugger-outer-this-command this-command) - (debugger-outer-unread-command-char - (with-no-warnings unread-command-char)) (debugger-outer-unread-command-events unread-command-events) (debugger-outer-unread-post-input-method-events unread-post-input-method-events) @@ -221,8 +215,6 @@ first will be printed into the backtrace buffer." (cursor-in-echo-area nil)) (unwind-protect (save-excursion - (with-no-warnings - (setq unread-command-char -1)) (when (eq (car debugger-args) 'debug) ;; Skip the frames for backtrace-debug, byte-code, ;; and implement-debug-on-entry. @@ -302,8 +294,6 @@ first will be printed into the backtrace buffer." (setq track-mouse debugger-outer-track-mouse) (setq last-command debugger-outer-last-command) (setq this-command debugger-outer-this-command) - (with-no-warnings - (setq unread-command-char debugger-outer-unread-command-char)) (setq unread-command-events debugger-outer-unread-command-events) (setq unread-post-input-method-events debugger-outer-unread-post-input-method-events) @@ -605,16 +595,7 @@ Applies to the frame whose line point is on in the backtrace." (cursor-in-echo-area debugger-outer-cursor-in-echo-area)) (set-match-data debugger-outer-match-data) (prog1 - (let ((save-ucc (with-no-warnings unread-command-char))) - (unwind-protect - (progn - (with-no-warnings - (setq unread-command-char debugger-outer-unread-command-char)) - (prog1 (progn ,@body) - (with-no-warnings - (setq debugger-outer-unread-command-char unread-command-char)))) - (with-no-warnings - (setq unread-command-char save-ucc)))) + (progn ,@body) (setq debugger-outer-match-data (match-data)) (setq debugger-outer-load-read-function load-read-function) (setq debugger-outer-overriding-terminal-local-map diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 17f6f79cd66..f147fba167d 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -235,11 +235,6 @@ If the result is non-nil, then break. Errors are ignored." ;;; Form spec utilities. -(defmacro def-edebug-form-spec (symbol spec-form) - "For compatibility with old version." - (def-edebug-spec symbol (eval spec-form))) -(make-obsolete 'def-edebug-form-spec 'def-edebug-spec "22.1") - (defun get-edebug-spec (symbol) ;; Get the spec of symbol resolving all indirection. (let ((edebug-form-spec nil) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 1d29011762e..8ac54d6524e 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -4210,7 +4210,7 @@ NUMBER-OF-STATIC-VARIABLES:" ;; this will select the buffer from which the buffer menu was ;; invoked. But this buffer is not displayed in the buffer list if ;; it isn't a tree buffer. I therefore let the buffer menu command -;; loop read the command `p' via `unread-command-char'. This command +;; loop read the command `p' via `unread-command-events'. This command ;; has no effect since we are on the first line of the buffer. (defvar electric-buffer-menu-mode-hook nil) diff --git a/lisp/subr.el b/lisp/subr.el index 23b62b25c9c..aa1b10ce17d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1250,11 +1250,6 @@ is converted into a string by expressing it in decimal." 'mode-line-inverse-video "use the appropriate faces instead." "21.1") -(make-obsolete-variable - 'unread-command-char - "use `unread-command-events' instead. That variable is a list of events -to reread, so it now uses nil to mean `no event', instead of -1." - "before 19.15") ;; Lisp manual only updated in 22.1. (define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro @@ -3928,6 +3923,7 @@ When KEEP-PRED is nil, the temporary keymap is used only once." (lookup-key ',map (this-command-keys-vector)))) (t `(funcall ',keep-pred))) + (set ',overlaysym nil) ;Just in case. (remove-hook 'pre-command-hook ',clearfunsym) (setq emulation-mode-map-alists (delq ',alist emulation-mode-map-alists)))))) diff --git a/src/ChangeLog b/src/ChangeLog index bfb6e5a87b3..8b47c52c23f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-12 Stefan Monnier + + * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) + (Fdiscard_input, quit_throw_to_read_char, init_keyboard) + (syms_of_keyboard): Remove support for unread-command-char. + 2012-09-12 Eli Zaretskii * w32proc.c (sys_kill): If PID is our process ID and the signal is diff --git a/src/data.c b/src/data.c index d894ac71a65..5d7f036b70d 100644 --- a/src/data.c +++ b/src/data.c @@ -1164,7 +1164,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, the default binding is loaded, the loaded binding may be the wrong one. */ if (!EQ (blv->where, where) - /* Also unload a global binding (if the var is local_if_set). */ + /* Also unload a global binding (if the var is local_if_set). */ || (EQ (blv->valcell, blv->defcell))) { /* The currently loaded binding is not necessarily valid. diff --git a/src/keyboard.c b/src/keyboard.c index 8091258578c..7be3e9e118e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2366,15 +2366,6 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, goto reread_first; } - if (unread_command_char != -1) - { - XSETINT (c, unread_command_char); - unread_command_char = -1; - - reread = 1; - goto reread_first; - } - if (CONSP (Vunread_command_events)) { int was_disabled = 0; @@ -2559,7 +2550,6 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event) /* Don't bring up a menu if we already have another event. */ && NILP (Vunread_command_events) - && unread_command_char < 0 && !detect_input_pending_run_timers (0)) { c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps); @@ -2695,8 +2685,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, && !EQ (XCAR (prev_event), Qmenu_bar) && !EQ (XCAR (prev_event), Qtool_bar) /* Don't bring up a menu if we already have another event. */ - && NILP (Vunread_command_events) - && unread_command_char < 0) + && NILP (Vunread_command_events)) { c = read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu); @@ -10453,7 +10442,7 @@ clear_input_pending (void) int requeued_events_pending_p (void) { - return (!NILP (Vunread_command_events) || unread_command_char != -1); + return (!NILP (Vunread_command_events)); } @@ -10463,7 +10452,7 @@ Actually, the value is nil only if we can be sure that no input is available; if there is a doubt, the value is t. */) (void) { - if (!NILP (Vunread_command_events) || unread_command_char != -1 + if (!NILP (Vunread_command_events) || !NILP (Vunread_post_input_method_events) || !NILP (Vunread_input_method_events)) return (Qt); @@ -10651,7 +10640,6 @@ Also end any kbd macro being defined. */) update_mode_lines++; Vunread_command_events = Qnil; - unread_command_char = -1; discard_tty_input (); @@ -10991,7 +10979,6 @@ quit_throw_to_read_char (int from_signal) input_pending = 0; Vunread_command_events = Qnil; - unread_command_char = -1; #if 0 /* Currently, sit_for is called from read_char without turning off polling. And that can call set_waiting_for_input. @@ -11378,12 +11365,11 @@ delete_kboard (KBOARD *kb) void init_keyboard (void) { - /* This is correct before outermost invocation of the editor loop */ + /* This is correct before outermost invocation of the editor loop. */ command_loop_level = -1; immediate_quit = 0; quit_char = Ctl ('g'); Vunread_command_events = Qnil; - unread_command_char = -1; timer_idleness_start_time = invalid_emacs_time (); total_keys = 0; recent_keys_index = 0; @@ -11716,9 +11702,6 @@ as they will already have been added once as they were read for the first time. An element of the form (t . EVENT) forces EVENT to be added to that list. */); Vunread_command_events = Qnil; - DEFVAR_INT ("unread-command-char", unread_command_char, - doc: /* If not -1, an object to be read as next command input event. */); - DEFVAR_LISP ("unread-post-input-method-events", Vunread_post_input_method_events, doc: /* List of events to be processed as input by input methods. These events are processed before `unread-command-events' From d673aedc2feb6828c7470492b254ff9cfe1f9e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 12 Sep 2012 22:21:39 +0200 Subject: [PATCH 146/216] * configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first and then gtk2 if not found. --with-x-toolkit=gtk|yes: As above, but fail if gtk2 or gt3 not found. --with-x-toolkit=gtk2: Only try gtk2, fail if not found. --with-x-toolkit=gtk3: Only try gtk3, fail if not found. --- ChangeLog | 8 ++++++++ configure.ac | 39 +++++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23fc479e124..a8a7fdc2966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-09-12 Jan Djärv + + * configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first + and then gtk2 if not found. + --with-x-toolkit=gtk|yes: As above, but fail if gtk2 or gt3 not found. + --with-x-toolkit=gtk2: Only try gtk2, fail if not found. + --with-x-toolkit=gtk3: Only try gtk3, fail if not found. + 2012-09-11 Glenn Morris * Makefile.in (install-arch-dep, install-arch-indep, install-doc): diff --git a/configure.ac b/configure.ac index 9491c1da8d5..ed1849514c1 100644 --- a/configure.ac +++ b/configure.ac @@ -138,7 +138,7 @@ dnl This should be the last --with option, because --with-x is dnl added later on when we find the path of X, and it's best to dnl keep them together visually. AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], - [use an X toolkit (KIT one of: yes or gtk, gtk3, lucid or athena, motif, no)])], + [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])], [ case "${withval}" in y | ye | yes ) val=gtk ;; n | no ) val=no ;; @@ -146,11 +146,13 @@ AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], a | at | ath | athe | athen | athena ) val=athena ;; m | mo | mot | moti | motif ) val=motif ;; g | gt | gtk ) val=gtk ;; + gtk2 ) val=gtk2 ;; gtk3 ) val=gtk3 ;; * ) AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; -this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk' or -`gtk3'. `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.]) +this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk', +`gtk2' or `gtk3'. `yes' and `gtk' are synonyms. +`athena' and `lucid' are synonyms.]) ;; esac with_x_toolkit=$val @@ -1578,6 +1580,9 @@ case "${window_system}" in dnl Don't set this for GTK. A lot of tests below assumes Xt when dnl USE_X_TOOLKIT is set. USE_X_TOOLKIT=none ;; + gtk2 ) with_gtk2=yes + term_header=gtkutil.h + USE_X_TOOLKIT=none ;; gtk3 ) with_gtk3=yes term_header=gtkutil.h USE_X_TOOLKIT=none ;; @@ -1900,35 +1905,41 @@ fi HAVE_GTK=no GTK_OBJ= -if test "${with_gtk3}" = "yes"; then +check_gtk2=no +gtk3_pkg_errors= +if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then GLIB_REQUIRED=2.28 GTK_REQUIRED=3.0 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" dnl Checks for libraries. PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then + if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then AC_MSG_ERROR($GTK_PKG_ERRORS) fi - AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) - GTK_OBJ=emacsgtkfixed.o - term_header=gtkutil.h + if test "$pkg_check_gtk" = "yes"; then + AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) + GTK_OBJ=emacsgtkfixed.o + term_header=gtkutil.h + else + check_gtk2=yes + gtk3_pkg_errors="$GTK_PKG_ERRORS " + fi fi -if test "$pkg_check_gtk" != "yes"; then - HAVE_GTK=no -if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then +if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then GLIB_REQUIRED=2.10 GTK_REQUIRED=2.10 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" dnl Checks for libraries. PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - AC_MSG_ERROR($GTK_PKG_ERRORS) + if test "$pkg_check_gtk" = "no"; then + if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then + AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS) + fi fi fi -fi if test x"$pkg_check_gtk" = xyes; then From a9f9d9de77e246af750ce5304320b0f66a085ea9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 12 Sep 2012 23:51:46 +0300 Subject: [PATCH 147/216] Use Isearch lax whitespace mode in Info. http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00811.html * lisp/info.el (Info-search): Don't check for isearch-mode and isearch-regexp before let-binding search-spaces-regexp to Info-search-whitespace-regexp. (Info-isearch-search): Let-bind Info-search-whitespace-regexp to search-whitespace-regexp if isearch-lax-whitespace or isearch-regexp-lax-whitespace is non-nil. (Info-mode): Don't set local variable search-whitespace-regexp. --- lisp/ChangeLog | 11 +++++++++++ lisp/info.el | 49 +++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 549b70a1de1..ecb110bc30e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2012-09-12 Juri Linkov + + * info.el (Info-search): Don't check for isearch-mode and + isearch-regexp before let-binding search-spaces-regexp to + Info-search-whitespace-regexp. + (Info-isearch-search): Let-bind Info-search-whitespace-regexp to + search-whitespace-regexp if isearch-lax-whitespace or + isearch-regexp-lax-whitespace is non-nil. + (Info-mode): Don't set local variable search-whitespace-regexp. + http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00811.html + 2012-09-12 Stefan Monnier * emacs-lisp/debug.el (debugger-outer-unread-command-char, debug) diff --git a/lisp/info.el b/lisp/info.el index fe4afd72163..5862e5e850f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1882,9 +1882,7 @@ If DIRECTION is `backward', search in the reverse direction." (while (and (not give-up) (or (null found) (not (funcall isearch-filter-predicate beg-found found)))) - (let ((search-spaces-regexp - (if (or (not isearch-mode) isearch-regexp) - Info-search-whitespace-regexp))) + (let ((search-spaces-regexp Info-search-whitespace-regexp)) (if (if backward (re-search-backward regexp bound t) (re-search-forward regexp bound t)) @@ -1904,9 +1902,7 @@ If DIRECTION is `backward', search in the reverse direction." (if (null Info-current-subfile) (if isearch-mode (signal 'search-failed (list regexp "end of manual")) - (let ((search-spaces-regexp - (if (or (not isearch-mode) isearch-regexp) - Info-search-whitespace-regexp))) + (let ((search-spaces-regexp Info-search-whitespace-regexp)) (if backward (re-search-backward regexp) (re-search-forward regexp)))) @@ -1964,9 +1960,7 @@ If DIRECTION is `backward', search in the reverse direction." (while (and (not give-up) (or (null found) (not (funcall isearch-filter-predicate beg-found found)))) - (let ((search-spaces-regexp - (if (or (not isearch-mode) isearch-regexp) - Info-search-whitespace-regexp))) + (let ((search-spaces-regexp Info-search-whitespace-regexp)) (if (if backward (re-search-backward regexp nil t) (re-search-forward regexp nil t)) @@ -2034,21 +2028,26 @@ If DIRECTION is `backward', search in the reverse direction." (defun Info-isearch-search () (if Info-isearch-search (lambda (string &optional bound noerror count) - (Info-search - (cond - (isearch-word - ;; Lax version of word search - (let ((lax (not (or isearch-nonincremental - (eq (length string) - (length (isearch--state-string - (car isearch-cmds)))))))) - (if (functionp isearch-word) - (funcall isearch-word string lax) - (word-search-regexp string lax)))) - (isearch-regexp string) - (t (regexp-quote string))) - bound noerror count - (unless isearch-forward 'backward)) + (let ((Info-search-whitespace-regexp + (if (if isearch-regexp + isearch-regexp-lax-whitespace + isearch-lax-whitespace) + search-whitespace-regexp))) + (Info-search + (cond + (isearch-word + ;; Lax version of word search + (let ((lax (not (or isearch-nonincremental + (eq (length string) + (length (isearch--state-string + (car isearch-cmds)))))))) + (if (functionp isearch-word) + (funcall isearch-word string lax) + (word-search-regexp string lax)))) + (isearch-regexp string) + (t (regexp-quote string))) + bound noerror count + (unless isearch-forward 'backward))) (point)) (isearch-search-fun-default))) @@ -4157,8 +4156,6 @@ Advanced commands: 'Info-isearch-push-state) (set (make-local-variable 'isearch-filter-predicate) 'Info-isearch-filter) - (set (make-local-variable 'search-whitespace-regexp) - Info-search-whitespace-regexp) (set (make-local-variable 'revert-buffer-function) 'Info-revert-buffer-function) (Info-set-mode-line) From 40bce90baad677cd631c27819b32cca9c5d3a1ab Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 14:34:24 -0700 Subject: [PATCH 148/216] More fixes for 'volatile' and setjmp/longjmp. * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's. * image.c (struct png_load_context) [HAVE_PNG]: New type. (png_load_body) [HAVE_PNG]: (jpeg_load_body) [HAVE_JPEG]: New function, with most of the old parent function's body. (png_load) [HAVE_PNG]: (jpeg_load) [HAVE_JPEG]: Invoke the new function, to avoid longjmp munging our locals. (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code. (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when longjmp is passed 2, as the C standard doesn't guarantee this. Instead, store the failure code into mgr->failure_code. --- src/ChangeLog | 16 ++++ src/eval.c | 11 +-- src/image.c | 198 +++++++++++++++++++++++++++++++------------------- 3 files changed, 145 insertions(+), 80 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8b47c52c23f..c0d3316bea1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2012-09-12 Paul Eggert + + More fixes for 'volatile' and setjmp/longjmp. + * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's. + * image.c (struct png_load_context) [HAVE_PNG]: New type. + (png_load_body) [HAVE_PNG]: + (jpeg_load_body) [HAVE_JPEG]: + New function, with most of the old parent function's body. + (png_load) [HAVE_PNG]: + (jpeg_load) [HAVE_JPEG]: + Invoke the new function, to avoid longjmp munging our locals. + (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code. + (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when + longjmp is passed 2, as the C standard doesn't guarantee this. + Instead, store the failure code into mgr->failure_code. + 2012-09-12 Stefan Monnier * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) diff --git a/src/eval.c b/src/eval.c index 8a8a507a1b6..3c0c65e9366 100644 --- a/src/eval.c +++ b/src/eval.c @@ -707,7 +707,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) else { /* Check if there is really a global binding rather than just a let binding that shadows the global unboundness of the var. */ - volatile struct specbinding *pdl = specpdl_ptr; + struct specbinding *pdl = specpdl_ptr; while (pdl > specpdl) { if (EQ ((--pdl)->symbol, sym) && !pdl->func @@ -1204,12 +1204,9 @@ See also the function `signal' for more info. usage: (condition-case VAR BODYFORM &rest HANDLERS) */) (Lisp_Object args) { - register Lisp_Object bodyform, handlers; - volatile Lisp_Object var; - - var = Fcar (args); - bodyform = Fcar (Fcdr (args)); - handlers = Fcdr (Fcdr (args)); + Lisp_Object var = Fcar (args); + Lisp_Object bodyform = Fcar (Fcdr (args)); + Lisp_Object handlers = Fcdr (Fcdr (args)); return internal_lisp_condition_case (var, bodyform, handlers); } diff --git a/src/image.c b/src/image.c index cf01602050f..cd5df99ef57 100644 --- a/src/image.c +++ b/src/image.c @@ -5591,20 +5591,31 @@ png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length) /* Load PNG image IMG for use on frame F. Value is non-zero if successful. */ +struct png_load_context +{ + /* These are members so that _longjmp doesn't munge local variables. */ + png_struct *png_ptr; + png_info *info_ptr; + png_info *end_info; + FILE *fp; + png_byte *pixels; + png_byte **rows; +}; + static int -png_load (struct frame *f, struct image *img) +png_load_body (struct frame *f, struct image *img, struct png_load_context *c) { Lisp_Object file, specified_file; Lisp_Object specified_data; int x, y; ptrdiff_t i; XImagePtr ximg, mask_img = NULL; - png_struct *png_ptr = NULL; + png_struct *png_ptr; png_info *info_ptr = NULL, *end_info = NULL; - FILE *volatile fp = NULL; + FILE *fp = NULL; png_byte sig[8]; - png_byte * volatile pixels = NULL; - png_byte ** volatile rows = NULL; + png_byte *pixels = NULL; + png_byte **rows = NULL; png_uint_32 width, height; int bit_depth, color_type, interlace_type; png_byte channels; @@ -5671,24 +5682,26 @@ png_load (struct frame *f, struct image *img) png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, my_png_error, my_png_warning); - if (!png_ptr) + if (png_ptr) { - if (fp) fclose (fp); - return 0; + info_ptr = fn_png_create_info_struct (png_ptr); + end_info = fn_png_create_info_struct (png_ptr); } - info_ptr = fn_png_create_info_struct (png_ptr); - if (!info_ptr) - { - fn_png_destroy_read_struct (&png_ptr, NULL, NULL); - if (fp) fclose (fp); - return 0; - } + c->png_ptr = png_ptr; + c->info_ptr = info_ptr; + c->end_info = end_info; + c->fp = fp; + c->pixels = pixels; + c->rows = rows; - end_info = fn_png_create_info_struct (png_ptr); - if (!end_info) + if (! (info_ptr && end_info)) + { + fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); + png_ptr = 0; + } + if (! png_ptr) { - fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); if (fp) fclose (fp); return 0; } @@ -5698,14 +5711,18 @@ png_load (struct frame *f, struct image *img) if (_setjmp (PNG_JMPBUF (png_ptr))) { error: - if (png_ptr) - fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (pixels); - xfree (rows); - if (fp) fclose (fp); + if (c->png_ptr) + fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); + xfree (c->pixels); + xfree (c->rows); + if (c->fp) + fclose (c->fp); return 0; } + /* Silence a bogus diagnostic; see GCC bug 54561. */ + IF_LINT (fp = c->fp); + /* Read image info. */ if (!NILP (specified_data)) fn_png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); @@ -5821,8 +5838,8 @@ png_load (struct frame *f, struct image *img) if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows < height || min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height < row_bytes) memory_full (SIZE_MAX); - pixels = xmalloc (sizeof *pixels * row_bytes * height); - rows = xmalloc (height * sizeof *rows); + c->pixels = pixels = xmalloc (sizeof *pixels * row_bytes * height); + c->rows = rows = xmalloc (height * sizeof *rows); for (i = 0; i < height; ++i) rows[i] = pixels + i * row_bytes; @@ -5832,7 +5849,7 @@ png_load (struct frame *f, struct image *img) if (fp) { fclose (fp); - fp = NULL; + c->fp = NULL; } /* Create an image and pixmap serving as mask if the PNG image @@ -5907,7 +5924,7 @@ png_load (struct frame *f, struct image *img) #endif /* COLOR_TABLE_SUPPORT */ /* Clean up. */ - fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); + fn_png_destroy_read_struct (&c->png_ptr, &c->info_ptr, &c->end_info); xfree (rows); xfree (pixels); @@ -5936,6 +5953,13 @@ png_load (struct frame *f, struct image *img) return 1; } +static int +png_load (struct frame *f, struct image *img) +{ + struct png_load_context c; + return png_load_body (f, img, &c); +} + #else /* HAVE_PNG */ #ifdef HAVE_NS @@ -6106,6 +6130,16 @@ struct my_jpeg_error_mgr { struct jpeg_error_mgr pub; jmp_buf setjmp_buffer; + + /* The remaining members are so that _longjmp doesn't munge local + variables. */ + struct jpeg_decompress_struct cinfo; + enum + { + MY_JPEG_ERROR_EXIT, + MY_JPEG_INVALID_IMAGE_SIZE, + MY_JPEG_CANNOT_CREATE_X + } failure_code; }; @@ -6113,6 +6147,7 @@ static _Noreturn void my_error_exit (j_common_ptr cinfo) { struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; + mgr->failure_code = MY_JPEG_ERROR_EXIT; _longjmp (mgr->setjmp_buffer, 1); } @@ -6319,17 +6354,15 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp) from the JPEG lib. */ static int -jpeg_load (struct frame *f, struct image *img) +jpeg_load_body (struct frame *f, struct image *img, + struct my_jpeg_error_mgr *mgr) { - struct jpeg_decompress_struct cinfo; - struct my_jpeg_error_mgr mgr; Lisp_Object file, specified_file; Lisp_Object specified_data; - FILE * volatile fp = NULL; + FILE *fp = NULL; JSAMPARRAY buffer; int row_stride, x, y; XImagePtr ximg = NULL; - int rc; unsigned long *colors; int width, height; @@ -6361,24 +6394,33 @@ jpeg_load (struct frame *f, struct image *img) /* Customize libjpeg's error handling to call my_error_exit when an error is detected. This function will perform a longjmp. */ - cinfo.err = fn_jpeg_std_error (&mgr.pub); - mgr.pub.error_exit = my_error_exit; - - if ((rc = _setjmp (mgr.setjmp_buffer)) != 0) + mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); + mgr->pub.error_exit = my_error_exit; + if (_setjmp (mgr->setjmp_buffer)) { - if (rc == 1) + switch (mgr->failure_code) { - /* Called from my_error_exit. Display a JPEG error. */ - char buf[JMSG_LENGTH_MAX]; - cinfo.err->format_message ((j_common_ptr) &cinfo, buf); - image_error ("Error reading JPEG image `%s': %s", img->spec, - build_string (buf)); + case MY_JPEG_ERROR_EXIT: + { + char buf[JMSG_LENGTH_MAX]; + mgr->cinfo.err->format_message ((j_common_ptr) &mgr->cinfo, buf); + image_error ("Error reading JPEG image `%s': %s", img->spec, + build_string (buf)); + break; + } + + case MY_JPEG_INVALID_IMAGE_SIZE: + image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); + break; + + case MY_JPEG_CANNOT_CREATE_X: + break; } /* Close the input file and destroy the JPEG object. */ if (fp) - fclose ((FILE *) fp); - fn_jpeg_destroy_decompress (&cinfo); + fclose (fp); + fn_jpeg_destroy_decompress (&mgr->cinfo); /* If we already have an XImage, free that. */ x_destroy_x_image (ximg); @@ -6390,44 +6432,47 @@ jpeg_load (struct frame *f, struct image *img) /* Create the JPEG decompression object. Let it read from fp. Read the JPEG image header. */ - fn_jpeg_CreateDecompress (&cinfo, JPEG_LIB_VERSION, sizeof (cinfo)); + fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); if (NILP (specified_data)) - jpeg_file_src (&cinfo, (FILE *) fp); + jpeg_file_src (&mgr->cinfo, fp); else - jpeg_memory_src (&cinfo, SDATA (specified_data), + jpeg_memory_src (&mgr->cinfo, SDATA (specified_data), SBYTES (specified_data)); - fn_jpeg_read_header (&cinfo, 1); + fn_jpeg_read_header (&mgr->cinfo, 1); /* Customize decompression so that color quantization will be used. Start decompression. */ - cinfo.quantize_colors = 1; - fn_jpeg_start_decompress (&cinfo); - width = img->width = cinfo.output_width; - height = img->height = cinfo.output_height; + mgr->cinfo.quantize_colors = 1; + fn_jpeg_start_decompress (&mgr->cinfo); + width = img->width = mgr->cinfo.output_width; + height = img->height = mgr->cinfo.output_height; if (!check_image_size (f, width, height)) { - image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); - _longjmp (mgr.setjmp_buffer, 2); + mgr->failure_code = MY_JPEG_INVALID_IMAGE_SIZE; + _longjmp (mgr->setjmp_buffer, 1); } /* Create X image and pixmap. */ if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - _longjmp (mgr.setjmp_buffer, 2); + { + mgr->failure_code = MY_JPEG_CANNOT_CREATE_X; + _longjmp (mgr->setjmp_buffer, 1); + } /* Allocate colors. When color quantization is used, - cinfo.actual_number_of_colors has been set with the number of - colors generated, and cinfo.colormap is a two-dimensional array - of color indices in the range 0..cinfo.actual_number_of_colors. + mgr->cinfo.actual_number_of_colors has been set with the number of + colors generated, and mgr->cinfo.colormap is a two-dimensional array + of color indices in the range 0..mgr->cinfo.actual_number_of_colors. No more than 255 colors will be generated. */ { int i, ir, ig, ib; - if (cinfo.out_color_components > 2) + if (mgr->cinfo.out_color_components > 2) ir = 0, ig = 1, ib = 2; - else if (cinfo.out_color_components > 1) + else if (mgr->cinfo.out_color_components > 1) ir = 0, ig = 1, ib = 0; else ir = 0, ig = 0, ib = 0; @@ -6437,15 +6482,15 @@ jpeg_load (struct frame *f, struct image *img) a default color, and we don't have to care about which colors can be freed safely, and which can't. */ init_color_table (); - colors = alloca (cinfo.actual_number_of_colors * sizeof *colors); + colors = alloca (mgr->cinfo.actual_number_of_colors * sizeof *colors); - for (i = 0; i < cinfo.actual_number_of_colors; ++i) + for (i = 0; i < mgr->cinfo.actual_number_of_colors; ++i) { /* Multiply RGB values with 255 because X expects RGB values in the range 0..0xffff. */ - int r = cinfo.colormap[ir][i] << 8; - int g = cinfo.colormap[ig][i] << 8; - int b = cinfo.colormap[ib][i] << 8; + int r = mgr->cinfo.colormap[ir][i] << 8; + int g = mgr->cinfo.colormap[ig][i] << 8; + int b = mgr->cinfo.colormap[ib][i] << 8; colors[i] = lookup_rgb_color (f, r, g, b); } @@ -6457,21 +6502,21 @@ jpeg_load (struct frame *f, struct image *img) } /* Read pixels. */ - row_stride = width * cinfo.output_components; - buffer = cinfo.mem->alloc_sarray ((j_common_ptr) &cinfo, JPOOL_IMAGE, - row_stride, 1); + row_stride = width * mgr->cinfo.output_components; + buffer = mgr->cinfo.mem->alloc_sarray ((j_common_ptr) &mgr->cinfo, + JPOOL_IMAGE, row_stride, 1); for (y = 0; y < height; ++y) { - fn_jpeg_read_scanlines (&cinfo, buffer, 1); - for (x = 0; x < cinfo.output_width; ++x) + fn_jpeg_read_scanlines (&mgr->cinfo, buffer, 1); + for (x = 0; x < mgr->cinfo.output_width; ++x) XPutPixel (ximg, x, y, colors[buffer[0][x]]); } /* Clean up. */ - fn_jpeg_finish_decompress (&cinfo); - fn_jpeg_destroy_decompress (&cinfo); + fn_jpeg_finish_decompress (&mgr->cinfo); + fn_jpeg_destroy_decompress (&mgr->cinfo); if (fp) - fclose ((FILE *) fp); + fclose (fp); /* Maybe fill in the background field while we have ximg handy. */ if (NILP (image_spec_value (img->spec, QCbackground, NULL))) @@ -6484,6 +6529,13 @@ jpeg_load (struct frame *f, struct image *img) return 1; } +static int +jpeg_load (struct frame *f, struct image *img) +{ + struct my_jpeg_error_mgr mgr; + return jpeg_load_body (f, img, &mgr); +} + #else /* HAVE_JPEG */ #ifdef HAVE_NS From 5f0cb45a6f6af1dea4d41f5da86fc3e36828c6d0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 18:22:08 -0700 Subject: [PATCH 149/216] Work around GCC and GNOME bugs when --enable-gcc-warnings. * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', to work around GNOME bug 683906. * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber. (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp. This works around GCC bug 54561. --- src/ChangeLog | 9 +++++++++ src/emacsgtkfixed.c | 5 +++++ src/image.c | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c0d3316bea1..29e8ea4232e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-09-13 Paul Eggert + + Work around GCC and GNOME bugs when --enable-gcc-warnings. + * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', + to work around GNOME bug 683906. + * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber. + (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp. + This works around GCC bug 54561. + 2012-09-12 Paul Eggert More fixes for 'volatile' and setjmp/longjmp. diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index 940482654b3..a21d0f8a422 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c @@ -27,6 +27,11 @@ along with GNU Emacs. If not, see . */ #include "frame.h" #include "xterm.h" +/* Silence a bogus diagnostic; see GNOME bug 683906. */ +#include +#undef G_STATIC_ASSERT +#define G_STATIC_ASSERT(x) verify (x) + #define EMACS_TYPE_FIXED emacs_fixed_get_type () #define EMACS_FIXED(obj) \ G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed) diff --git a/src/image.c b/src/image.c index cd5df99ef57..d4e54fb7dcd 100644 --- a/src/image.c +++ b/src/image.c @@ -6140,6 +6140,9 @@ struct my_jpeg_error_mgr MY_JPEG_INVALID_IMAGE_SIZE, MY_JPEG_CANNOT_CREATE_X } failure_code; +#ifdef lint + FILE *fp; +#endif }; @@ -6392,6 +6395,8 @@ jpeg_load_body (struct frame *f, struct image *img, return 0; } + IF_LINT (mgr->fp = fp); + /* Customize libjpeg's error handling to call my_error_exit when an error is detected. This function will perform a longjmp. */ mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); @@ -6430,6 +6435,9 @@ jpeg_load_body (struct frame *f, struct image *img, return 0; } + /* Silence a bogus diagnostic; see GCC bug 54561. */ + IF_LINT (fp = mgr->fp); + /* Create the JPEG decompression object. Let it read from fp. Read the JPEG image header. */ fn_jpeg_CreateDecompress (&mgr->cinfo, JPEG_LIB_VERSION, sizeof *&mgr->cinfo); From bd8d610845a89c2cf5d7d75ff552df572b30f5e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 12 Sep 2012 22:00:41 -0400 Subject: [PATCH 150/216] * lisp/emacs-lisp/edebug.el: Use lexical-binding. Remove the "edebug-" prefix from non-dynamically-scoped variables. Mark unused args with underscore. (edebug-save-restriction, edebug-outside-excursion): Use `declare'. (edebug-form-data): Use defvar-local. (edebug-make-before-and-after-form, edebug-make-after-form): Use backquote. (edebug-args, edebug-value, edebug-after-index, edebug-arg-mode): Not dynamically scoped any more. (edebug--enter-trace): Add arguments `function' and `args'. Rename from edebug-enter-trace. (edebug-enter): Call it accordingly. Bind edebug-function explicitly. (edebug--update-coverage): Add `after-index' and `value' args. Rename from edebug-update-coverage. (edebug-slow-after): Call it accordingly. (edebug--recursive-edit): Add arg `arg-mode'. Rename from edebug-recursive-edit. (edebug--display): Call it accordingly. Add args `value', `offset-index', and `arg-mode'. Rename from edebug-display. (edebug-debugger, edebug): Call it accordingly. (edebug-eval-display-list): Use dolist. --- lisp/ChangeLog | 24 +++ lisp/emacs-lisp/edebug.el | 380 ++++++++++++++++++-------------------- 2 files changed, 208 insertions(+), 196 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ecb110bc30e..f0bbd7558bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,27 @@ +2012-09-13 Stefan Monnier + + * emacs-lisp/edebug.el: Use lexical-binding. + Remove the "edebug-" prefix from non-dynamically-scoped variables. + Mark unused args with underscore. + (edebug-save-restriction, edebug-outside-excursion): Use `declare'. + (edebug-form-data): Use defvar-local. + (edebug-make-before-and-after-form, edebug-make-after-form): + Use backquote. + (edebug-args, edebug-value, edebug-after-index, edebug-arg-mode): + Not dynamically scoped any more. + (edebug--enter-trace): Add arguments `function' and `args'. + Rename from edebug-enter-trace. + (edebug-enter): Call it accordingly. Bind edebug-function explicitly. + (edebug--update-coverage): Add `after-index' and `value' args. + Rename from edebug-update-coverage. + (edebug-slow-after): Call it accordingly. + (edebug--recursive-edit): Add arg `arg-mode'. Rename from + edebug-recursive-edit. + (edebug--display): Call it accordingly. Add args `value', + `offset-index', and `arg-mode'. Rename from edebug-display. + (edebug-debugger, edebug): Call it accordingly. + (edebug-eval-display-list): Use dolist. + 2012-09-12 Juri Linkov * info.el (Info-search): Don't check for isearch-mode and diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index f147fba167d..42260d12a82 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1,4 +1,4 @@ -;;; edebug.el --- a source-level debugger for Emacs Lisp +;;; edebug.el --- a source-level debugger for Emacs Lisp -*- lexical-binding: t -*- ;; Copyright (C) 1988-1995, 1997, 1999-2012 Free Software Foundation, Inc. @@ -237,7 +237,7 @@ If the result is non-nil, then break. Errors are ignored." (defun get-edebug-spec (symbol) ;; Get the spec of symbol resolving all indirection. - (let ((edebug-form-spec nil) + (let ((spec nil) (indirect symbol)) (while (progn @@ -245,9 +245,8 @@ If the result is non-nil, then break. Errors are ignored." (setq indirect (function-get indirect 'edebug-form-spec 'macro)))) ;; (edebug-trace "indirection: %s" edebug-form-spec) - (setq edebug-form-spec indirect)) - edebug-form-spec - )) + (setq spec indirect)) + spec)) ;;;###autoload (defun edebug-basic-spec (spec) @@ -337,9 +336,7 @@ A lambda list keyword is a symbol that starts with `&'." (lambda (e1 e2) (funcall function (car e1) (car e2)))))) -;;(def-edebug-spec edebug-save-restriction t) - -;; Not used. If it is used, def-edebug-spec must be defined before use. +;; Not used. '(defmacro edebug-save-restriction (&rest body) "Evaluate BODY while saving the current buffers restriction. BODY may change buffer outside of current restriction, unlike @@ -347,6 +344,7 @@ save-restriction. BODY may change the current buffer, and the restriction will be restored to the original buffer, and the current buffer remains current. Return the result of the last expression in BODY." + (declare (debug t)) `(let ((edebug:s-r-beg (point-min-marker)) (edebug:s-r-end (point-max-marker))) (unwind-protect @@ -621,19 +619,19 @@ already is one.)" ;; The internal data that is needed for edebugging is kept in the ;; buffer-local variable `edebug-form-data'. -(make-variable-buffer-local 'edebug-form-data) +(defvar-local edebug-form-data nil + "A list of entries associating symbols with buffer regions. +This is an automatic buffer local variable. Each entry looks like: +\(SYMBOL BEGIN-MARKER END-MARKER). The markers +are at the beginning and end of an entry level form and SYMBOL is +a symbol that holds all edebug related information for the form on its +property list. -(defvar edebug-form-data nil) -;; A list of entries associating symbols with buffer regions. -;; This is an automatic buffer local variable. Each entry looks like: -;; @code{(@var{symbol} @var{begin-marker} @var{end-marker}). The markers -;; are at the beginning and end of an entry level form and @var{symbol} is -;; a symbol that holds all edebug related information for the form on its -;; property list. +In the future (haha!), the symbol will be irrelevant and edebug data will +be stored in the definitions themselves rather than in the property +list of a symbol.") -;; In the future, the symbol will be irrelevant and edebug data will -;; be stored in the definitions themselves rather than in the property -;; list of a symbol. +;; FIXME: Use cl-defstruct. (defun edebug-make-form-data-entry (symbol begin end) (list symbol begin end)) @@ -648,7 +646,7 @@ already is one.)" (nth 2 entry)) (defsubst edebug-set-form-data-entry (entry name begin end) - (setcar entry name);; in case name is changed + (setcar entry name) ;; In case name is changed. (set-marker (nth 1 entry) begin) (set-marker (nth 2 entry) end)) @@ -1081,7 +1079,8 @@ already is one.)" ;; If it gets an error, make it nil. (let ((temp-hook edebug-setup-hook)) (setq edebug-setup-hook nil) - (run-hooks 'temp-hook)) + (if (functionp temp-hook) (funcall temp-hook) + (mapc #'funcall temp-hook))) (let (result edebug-top-window-data @@ -1218,8 +1217,8 @@ already is one.)" (defvar edebug-offset-list) ; the list of offset positions. (defun edebug-inc-offset (offset) - ;; modifies edebug-offset-index and edebug-offset-list - ;; accesses edebug-func-marc and buffer point + ;; Modifies edebug-offset-index and edebug-offset-list + ;; accesses edebug-func-marc and buffer point. (prog1 edebug-offset-index (setq edebug-offset-list (cons (- offset edebug-form-begin-marker) @@ -1232,13 +1231,11 @@ already is one.)" ;; given FORM. Looks like: ;; (edebug-after (edebug-before BEFORE-INDEX) AFTER-INDEX FORM) ;; Also increment the offset index for subsequent use. - (list 'edebug-after - (list 'edebug-before before-index) - after-index form)) + `(edebug-after (edebug-before ,before-index) ,after-index ,form)) (defun edebug-make-after-form (form after-index) ;; Like edebug-make-before-and-after-form, but only after. - (list 'edebug-after 0 after-index form)) + `(edebug-after 0 ,after-index ,form)) (defun edebug-unwrap (sexp) @@ -1514,18 +1511,18 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Otherwise it signals an error. The place of the error is found ;; with the two before- and after-offset functions. -(defun edebug-no-match (cursor &rest edebug-args) +(defun edebug-no-match (cursor &rest args) ;; Throw a no-match, or signal an error immediately if gate is active. ;; Remember this point in case we need to report this error. (setq edebug-error-point (or edebug-error-point (edebug-before-offset cursor)) - edebug-best-error (or edebug-best-error edebug-args)) + edebug-best-error (or edebug-best-error args)) (if (and edebug-gate (not edebug-&optional)) (progn (if edebug-error-point (goto-char edebug-error-point)) - (apply 'edebug-syntax-error edebug-args)) - (funcall 'throw 'no-match edebug-args))) + (apply 'edebug-syntax-error args)) + (funcall 'throw 'no-match args))) (defun edebug-match (cursor specs) @@ -1752,7 +1749,7 @@ expressions; a `progn' form will be returned enclosing these forms." specs)))) -(defun edebug-match-gate (cursor) +(defun edebug-match-gate (_cursor) ;; Simply set the gate to prevent backtracking at this level. (setq edebug-gate t) nil) @@ -1841,7 +1838,7 @@ expressions; a `progn' form will be returned enclosing these forms." nil)) -(defun edebug-match-function (cursor) +(defun edebug-match-function (_cursor) (error "Use function-form instead of function in edebug spec")) (defun edebug-match-&define (cursor specs) @@ -1898,7 +1895,7 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-move-cursor cursor) (list name))) -(defun edebug-match-colon-name (cursor spec) +(defun edebug-match-colon-name (_cursor spec) ;; Set the edebug-def-name to the spec. (setq edebug-def-name (if edebug-def-name @@ -1983,6 +1980,8 @@ expressions; a `progn' form will be returned enclosing these forms." def-body)) ;; FIXME? Isn't this missing the doc-string? Cf defun. (def-edebug-spec defmacro + ;; FIXME: Improve `declare' so we can Edebug gv-expander and + ;; gv-setter declarations. (&define name lambda-list [&optional ("declare" &rest sexp)] def-body)) (def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list. @@ -2162,10 +2161,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Dynamically bound variables, declared globally but left unbound. (defvar edebug-function) ; the function being executed. change name!! -(defvar edebug-args) ; the arguments of the function (defvar edebug-data) ; the edebug data for the function -(defvar edebug-value) ; the result of the expression -(defvar edebug-after-index) (defvar edebug-def-mark) ; the mark for the definition (defvar edebug-freq-count) ; the count of expression visits. (defvar edebug-coverage) ; the coverage results of each expression of function. @@ -2191,7 +2187,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;;; Handling signals -(defun edebug-signal (edebug-signal-name edebug-signal-data) +(defun edebug-signal (signal-name signal-data) "Signal an error. Args are SIGNAL-NAME, and associated DATA. A signal name is a symbol with an `error-conditions' property that is a list of condition names. @@ -2205,19 +2201,18 @@ See `condition-case'. This is the Edebug replacement for the standard `signal'. It should only be active while Edebug is. It checks `debug-on-error' to see whether it should call the debugger. When execution is resumed, the -error is signaled again. -\n(fn SIGNAL-NAME DATA)" - (if (and (listp debug-on-error) (memq edebug-signal-name debug-on-error)) - (edebug 'error (cons edebug-signal-name edebug-signal-data))) +error is signaled again." + (if (and (listp debug-on-error) (memq signal-name debug-on-error)) + (edebug 'error (cons signal-name signal-data))) ;; If we reach here without another non-local exit, then send signal again. ;; i.e. the signal is not continuable, yet. ;; Avoid infinite recursion. (let ((signal-hook-function nil)) - (signal edebug-signal-name edebug-signal-data))) + (signal signal-name signal-data))) ;;; Entering Edebug -(defun edebug-enter (edebug-function edebug-args edebug-body) +(defun edebug-enter (function args body) ;; Entering FUNC. The arguments are ARGS, and the body is BODY. ;; Setup edebug variables and evaluate BODY. This function is called ;; when a function evaluated with edebug-eval-top-level-form is entered. @@ -2226,50 +2221,51 @@ error is signaled again. ;; Is this the first time we are entering edebug since ;; lower-level recursive-edit command? ;; More precisely, this tests whether Edebug is currently active. - (if (not edebug-entered) - (let ((edebug-entered t) - ;; Binding max-lisp-eval-depth here is OK, - ;; but not inside an unwind-protect. - ;; Doing it here also keeps it from growing too large. - (max-lisp-eval-depth (+ 100 max-lisp-eval-depth)) ; too much?? - (max-specpdl-size (+ 200 max-specpdl-size)) + (let ((edebug-function function)) + (if (not edebug-entered) + (let ((edebug-entered t) + ;; Binding max-lisp-eval-depth here is OK, + ;; but not inside an unwind-protect. + ;; Doing it here also keeps it from growing too large. + (max-lisp-eval-depth (+ 100 max-lisp-eval-depth)) ; too much?? + (max-specpdl-size (+ 200 max-specpdl-size)) - (debugger edebug-debugger) ; only while edebug is active. - (edebug-outside-debug-on-error debug-on-error) - (edebug-outside-debug-on-quit debug-on-quit) - ;; Binding these may not be the right thing to do. - ;; We want to allow the global values to be changed. - (debug-on-error (or debug-on-error edebug-on-error)) - (debug-on-quit edebug-on-quit) + (debugger edebug-debugger) ; only while edebug is active. + (edebug-outside-debug-on-error debug-on-error) + (edebug-outside-debug-on-quit debug-on-quit) + ;; Binding these may not be the right thing to do. + ;; We want to allow the global values to be changed. + (debug-on-error (or debug-on-error edebug-on-error)) + (debug-on-quit edebug-on-quit) - ;; Lexical bindings must be uncompiled for this to work. - (cl-lexical-debug t)) - (unwind-protect - (let ((signal-hook-function 'edebug-signal)) - (setq edebug-execution-mode (or edebug-next-execution-mode - edebug-initial-mode - edebug-execution-mode) - edebug-next-execution-mode nil) - (edebug-enter edebug-function edebug-args edebug-body)))) + ;; Lexical bindings must be uncompiled for this to work. + (cl-lexical-debug t)) + (unwind-protect + (let ((signal-hook-function 'edebug-signal)) + (setq edebug-execution-mode (or edebug-next-execution-mode + edebug-initial-mode + edebug-execution-mode) + edebug-next-execution-mode nil) + (edebug-enter function args body)))) - (let* ((edebug-data (get edebug-function 'edebug)) - (edebug-def-mark (car edebug-data)) ; mark at def start - (edebug-freq-count (get edebug-function 'edebug-freq-count)) - (edebug-coverage (get edebug-function 'edebug-coverage)) - (edebug-buffer (marker-buffer edebug-def-mark)) + (let* ((edebug-data (get function 'edebug)) + (edebug-def-mark (car edebug-data)) ; mark at def start + (edebug-freq-count (get function 'edebug-freq-count)) + (edebug-coverage (get function 'edebug-coverage)) + (edebug-buffer (marker-buffer edebug-def-mark)) - (edebug-stack (cons edebug-function edebug-stack)) - (edebug-offset-indices (cons 0 edebug-offset-indices)) - ) - (if (get edebug-function 'edebug-on-entry) - (progn - (setq edebug-execution-mode 'step) - (if (eq (get edebug-function 'edebug-on-entry) 'temp) - (put edebug-function 'edebug-on-entry nil)))) - (if edebug-trace - (edebug-enter-trace edebug-body) - (funcall edebug-body)) - ))) + (edebug-stack (cons function edebug-stack)) + (edebug-offset-indices (cons 0 edebug-offset-indices)) + ) + (if (get function 'edebug-on-entry) + (progn + (setq edebug-execution-mode 'step) + (if (eq (get function 'edebug-on-entry) 'temp) + (put function 'edebug-on-entry nil)))) + (if edebug-trace + (edebug--enter-trace function args body) + (funcall body)) + )))) (defun edebug-var-status (var) "Return a cons cell describing the status of VAR's current binding. @@ -2296,14 +2292,14 @@ STATUS should be a list returned by `edebug-var-status'." (t (set var value))))) -(defun edebug-enter-trace (edebug-body) +(defun edebug--enter-trace (function args body) (let ((edebug-stack-depth (1+ edebug-stack-depth)) edebug-result) (edebug-print-trace-before - (format "%s args: %s" edebug-function edebug-args)) - (prog1 (setq edebug-result (funcall edebug-body)) + (format "%s args: %s" function args)) + (prog1 (setq edebug-result (funcall body)) (edebug-print-trace-after - (format "%s result: %s" edebug-function edebug-result))))) + (format "%s result: %s" function edebug-result))))) (def-edebug-spec edebug-tracing (form body)) @@ -2331,49 +2327,49 @@ MSG is printed after `::::} '." -(defun edebug-slow-before (edebug-before-index) +(defun edebug-slow-before (before-index) (unless edebug-active ;; Debug current function given BEFORE position. ;; Called from functions compiled with edebug-eval-top-level-form. ;; Return the before index. - (setcar edebug-offset-indices edebug-before-index) + (setcar edebug-offset-indices before-index) ;; Increment frequency count - (aset edebug-freq-count edebug-before-index - (1+ (aref edebug-freq-count edebug-before-index))) + (aset edebug-freq-count before-index + (1+ (aref edebug-freq-count before-index))) (if (or (not (memq edebug-execution-mode '(Go-nonstop next))) (edebug-input-pending-p)) - (edebug-debugger edebug-before-index 'before nil))) - edebug-before-index) + (edebug-debugger before-index 'before nil))) + before-index) -(defun edebug-fast-before (edebug-before-index) +(defun edebug-fast-before (_before-index) ;; Do nothing. ) -(defun edebug-slow-after (edebug-before-index edebug-after-index edebug-value) +(defun edebug-slow-after (_before-index after-index value) (if edebug-active - edebug-value + value ;; Debug current function given AFTER position and VALUE. ;; Called from functions compiled with edebug-eval-top-level-form. ;; Return VALUE. - (setcar edebug-offset-indices edebug-after-index) + (setcar edebug-offset-indices after-index) ;; Increment frequency count - (aset edebug-freq-count edebug-after-index - (1+ (aref edebug-freq-count edebug-after-index))) - (if edebug-test-coverage (edebug-update-coverage)) + (aset edebug-freq-count after-index + (1+ (aref edebug-freq-count after-index))) + (if edebug-test-coverage (edebug--update-coverage after-index value)) (if (and (eq edebug-execution-mode 'Go-nonstop) (not (edebug-input-pending-p))) ;; Just return result. - edebug-value - (edebug-debugger edebug-after-index 'after edebug-value) + value + (edebug-debugger after-index 'after value) ))) -(defun edebug-fast-after (edebug-before-index edebug-after-index edebug-value) +(defun edebug-fast-after (_before-index _after-index value) ;; Do nothing but return the value. - edebug-value) + value) (defun edebug-run-slow () (defalias 'edebug-before 'edebug-slow-before) @@ -2387,19 +2383,18 @@ MSG is printed after `::::} '." (edebug-run-slow) -(defun edebug-update-coverage () - (let ((old-result (aref edebug-coverage edebug-after-index))) +(defun edebug--update-coverage (after-index value) + (let ((old-result (aref edebug-coverage after-index))) (cond ((eq 'ok-coverage old-result)) ((eq 'unknown old-result) - (aset edebug-coverage edebug-after-index edebug-value)) + (aset edebug-coverage after-index value)) ;; Test if a different result. - ((not (eq edebug-value old-result)) - (aset edebug-coverage edebug-after-index 'ok-coverage))))) + ((not (eq value old-result)) + (aset edebug-coverage after-index 'ok-coverage))))) ;; Dynamically declared unbound variables. -(defvar edebug-arg-mode) ; the mode, either before, after, or error (defvar edebug-breakpoints) (defvar edebug-break-data) ; break data for current function. (defvar edebug-break) ; whether a break occurred. @@ -2410,16 +2405,16 @@ MSG is printed after `::::} '." (defvar edebug-global-break-result nil) -(defun edebug-debugger (edebug-offset-index edebug-arg-mode edebug-value) +(defun edebug-debugger (offset-index arg-mode value) (if inhibit-redisplay ;; Don't really try to enter edebug within an eval from redisplay. - edebug-value + value ;; Check breakpoints and pending input. - ;; If edebug display should be updated, call edebug-display. - ;; Return edebug-value. + ;; If edebug display should be updated, call edebug--display. + ;; Return value. (let* ( ;; This needs to be here since breakpoints may be changed. (edebug-breakpoints (car (cdr edebug-data))) ; list of breakpoints - (edebug-break-data (assq edebug-offset-index edebug-breakpoints)) + (edebug-break-data (assq offset-index edebug-breakpoints)) (edebug-break-condition (car (cdr edebug-break-data))) (edebug-global-break (if edebug-global-break-condition @@ -2430,7 +2425,7 @@ MSG is printed after `::::} '." (error nil)))) (edebug-break)) -;;; (edebug-trace "exp: %s" edebug-value) + ;;(edebug-trace "exp: %s" value) ;; Test whether we should break. (setq edebug-break (or edebug-global-break @@ -2451,10 +2446,9 @@ MSG is printed after `::::} '." (if (or (not (memq edebug-execution-mode '(go continue Continue-fast))) edebug-break (edebug-input-pending-p)) - (edebug-display)) ; <--------------- display + (edebug--display value offset-index arg-mode)) ; <---------- display - edebug-value - ))) + value))) ;; window-start now stored with each function. @@ -2487,7 +2481,7 @@ MSG is printed after `::::} '." (defalias 'edebug-mark-marker 'mark-marker) -(defun edebug-display () +(defun edebug--display (value offset-index arg-mode) (unless (marker-position edebug-def-mark) ;; The buffer holding the source has been killed. ;; Let's at least show a backtrace so the user can figure out @@ -2496,11 +2490,11 @@ MSG is printed after `::::} '." ;; Setup windows for edebug, determine mode, maybe enter recursive-edit. ;; Uses local variables of edebug-enter, edebug-before, edebug-after ;; and edebug-debugger. - (let ((edebug-active t) ; for minor mode alist + (let ((edebug-active t) ; For minor mode alist. (edebug-with-timeout-suspend (with-timeout-suspend)) - edebug-stop ; should we enter recursive-edit + edebug-stop ; Should we enter recursive-edit? (edebug-point (+ edebug-def-mark - (aref (nth 2 edebug-data) edebug-offset-index))) + (aref (nth 2 edebug-data) offset-index))) edebug-buffer-outside-point ; current point in edebug-buffer ;; window displaying edebug-buffer (edebug-window-data (nth 3 edebug-data)) @@ -2509,12 +2503,12 @@ MSG is printed after `::::} '." (edebug-outside-point (point)) (edebug-outside-mark (edebug-mark)) (edebug-outside-unread-command-events unread-command-events) - edebug-outside-windows ; window or screen configuration + edebug-outside-windows ; Window or screen configuration. edebug-buffer-points - edebug-eval-buffer ; declared here so we can kill it below - (edebug-eval-result-list (and edebug-eval-list - (edebug-eval-result-list))) + edebug-eval-buffer ; Declared here so we can kill it below. + (eval-result-list (and edebug-eval-list + (edebug-eval-result-list))) edebug-trace-window edebug-trace-window-start @@ -2535,9 +2529,9 @@ MSG is printed after `::::} '." (let ((debug-on-error nil)) (error "Buffer defining %s not found" edebug-function))) - (if (eq 'after edebug-arg-mode) + (if (eq 'after arg-mode) ;; Compute result string now before windows are modified. - (edebug-compute-previous-result edebug-value)) + (edebug-compute-previous-result value)) (if edebug-save-windows ;; Save windows now before we modify them. @@ -2561,7 +2555,7 @@ MSG is printed after `::::} '." ;; Now display eval list, if any. ;; This is done after the pop to edebug-buffer ;; so that buffer-window correspondence is correct after quitting. - (edebug-eval-display edebug-eval-result-list) + (edebug-eval-display eval-result-list) ;; The evaluation list better not have deleted edebug-window-data. (select-window (car edebug-window-data)) (set-buffer edebug-buffer) @@ -2569,7 +2563,7 @@ MSG is printed after `::::} '." (setq edebug-buffer-outside-point (point)) (goto-char edebug-point) - (if (eq 'before edebug-arg-mode) + (if (eq 'before arg-mode) ;; Check whether positions are up-to-date. ;; This assumes point is never before symbol. (if (not (memq (following-char) '(?\( ?\# ?\` ))) @@ -2593,14 +2587,14 @@ MSG is printed after `::::} '." (edebug-overlay-arrow) (cond - ((eq 'error edebug-arg-mode) + ((eq 'error arg-mode) ;; Display error message (setq edebug-execution-mode 'step) (edebug-overlay-arrow) (beep) - (if (eq 'quit (car edebug-value)) + (if (eq 'quit (car value)) (message "Quit") - (edebug-report-error edebug-value))) + (edebug-report-error value))) (edebug-break (cond (edebug-global-break @@ -2618,7 +2612,7 @@ MSG is printed after `::::} '." (t (message ""))) (setq unread-command-events nil) - (if (eq 'after edebug-arg-mode) + (if (eq 'after arg-mode) (progn ;; Display result of previous evaluation. (if (and edebug-break @@ -2642,11 +2636,11 @@ MSG is printed after `::::} '." (unwind-protect (if (or edebug-stop (memq edebug-execution-mode '(step next)) - (eq edebug-arg-mode 'error)) + (eq arg-mode 'error)) (progn ;; (setq edebug-execution-mode 'step) ;; (edebug-overlay-arrow) ; This doesn't always show up. - (edebug-recursive-edit))) ; <---------- Recursive edit + (edebug--recursive-edit arg-mode))) ; <----- Recursive edit ;; Reset the edebug-window-data to whatever it is now. (let ((window (if (eq (window-buffer) edebug-buffer) @@ -2775,7 +2769,7 @@ MSG is printed after `::::} '." (defvar edebug-outside-last-nonmenu-event) (defvar edebug-outside-track-mouse) -(defun edebug-recursive-edit () +(defun edebug--recursive-edit (arg-mode) ;; Start up a recursive edit inside of edebug. ;; The current buffer is the edebug-buffer, which is put into edebug-mode. ;; Assume that none of the variables below are buffer-local. @@ -2866,7 +2860,7 @@ MSG is printed after `::::} '." ) (if (and (eq edebug-execution-mode 'go) - (not (memq edebug-arg-mode '(after error)))) + (not (memq arg-mode '(after error)))) (message "Break")) (setq buffer-read-only t) @@ -3082,7 +3076,7 @@ before returning. The default is one second." ;; Joe Wells, here is a start at your idea of adding a buffer to the internal -;; display list. Still need to use this list in edebug-display. +;; display list. Still need to use this list in edebug--display. '(defvar edebug-display-buffer-list nil "List of buffers that edebug will display when it is active.") @@ -3517,11 +3511,10 @@ edebug-mode." ;;; Evaluation of expressions -(def-edebug-spec edebug-outside-excursion t) - (defmacro edebug-outside-excursion (&rest body) "Evaluate an expression list in the outside context. Return the result of the last expression." + (declare (debug t)) `(save-excursion ; of current-buffer (if edebug-save-windows (progn @@ -3555,7 +3548,7 @@ Return the result of the last expression." (pre-command-hook (cdr edebug-outside-pre-command-hook)) (post-command-hook (cdr edebug-outside-post-command-hook)) - ;; See edebug-display + ;; See edebug-display. (overlay-arrow-position edebug-outside-o-a-p) (overlay-arrow-string edebug-outside-o-a-s) (cursor-in-echo-area edebug-outside-c-i-e-a) @@ -3609,18 +3602,18 @@ Return the result of the last expression." (defvar cl-debug-env) ; defined in cl; non-nil when lexical env used. -(defun edebug-eval (edebug-expr) +(defun edebug-eval (expr) ;; Are there cl lexical variables active? (eval (if (bound-and-true-p cl-debug-env) - (cl-macroexpand-all edebug-expr cl-debug-env) - edebug-expr) + (cl-macroexpand-all expr cl-debug-env) + expr) lexical-binding)) -(defun edebug-safe-eval (edebug-expr) +(defun edebug-safe-eval (expr) ;; Evaluate EXPR safely. ;; If there is an error, a string is returned describing the error. (condition-case edebug-err - (edebug-eval edebug-expr) + (edebug-eval expr) (error (edebug-format "%s: %s" ;; could (get (car edebug-err) 'error-message) (car (cdr edebug-err)))))) @@ -3628,17 +3621,17 @@ Return the result of the last expression." ;;; Printing -(defun edebug-report-error (edebug-value) +(defun edebug-report-error (value) ;; Print an error message like command level does. ;; This also prints the error name if it has no error-message. (message "%s: %s" - (or (get (car edebug-value) 'error-message) - (format "peculiar error (%s)" (car edebug-value))) + (or (get (car value) 'error-message) + (format "peculiar error (%s)" (car value))) (mapconcat (function (lambda (edebug-arg) ;; continuing after an error may ;; complain about edebug-arg. why?? (prin1-to-string edebug-arg))) - (cdr edebug-value) ", "))) + (cdr value) ", "))) (defvar print-readably) ; defined by lemacs ;; Alternatively, we could change the definition of @@ -3654,14 +3647,14 @@ Return the result of the last expression." (edebug-prin1-to-string value) (error "#Apparently circular structure#")))) -(defun edebug-compute-previous-result (edebug-previous-value) +(defun edebug-compute-previous-result (previous-value) (if edebug-unwrap-results - (setq edebug-previous-value - (edebug-unwrap* edebug-previous-value))) + (setq previous-value + (edebug-unwrap* previous-value))) (setq edebug-previous-result (concat "Result: " - (edebug-safe-prin1-to-string edebug-previous-value) - (eval-expression-print-format edebug-previous-value)))) + (edebug-safe-prin1-to-string previous-value) + (eval-expression-print-format previous-value)))) (defun edebug-previous-result () "Print the previous result." @@ -3676,7 +3669,7 @@ Return the result of the last expression." (defalias 'edebug-format 'format) (defalias 'edebug-message 'message) -(defun edebug-eval-expression (edebug-expr) +(defun edebug-eval-expression (expr) "Evaluate an expression in the outside environment. If interactive, prompt for the expression. Print result in minibuffer." @@ -3685,7 +3678,7 @@ Print result in minibuffer." 'read-expression-history))) (princ (edebug-outside-excursion - (setq values (cons (edebug-eval edebug-expr) values)) + (setq values (cons (edebug-eval expr) values)) (concat (edebug-safe-prin1-to-string (car values)) (eval-expression-print-format (car values)))))) @@ -3699,14 +3692,14 @@ Print value in minibuffer." "Evaluate sexp before point in outside environment; insert value. This prints the value into current buffer." (interactive) - (let* ((edebug-form (edebug-last-sexp)) - (edebug-result-string + (let* ((form (edebug-last-sexp)) + (result-string (edebug-outside-excursion - (edebug-safe-prin1-to-string (edebug-safe-eval edebug-form)))) + (edebug-safe-prin1-to-string (edebug-safe-eval form)))) (standard-output (current-buffer))) (princ "\n") ;; princ the string to get rid of quotes. - (princ edebug-result-string) + (princ result-string) (princ "\n") )) @@ -3898,20 +3891,17 @@ Options: (edebug-trace nil)) (mapcar 'edebug-safe-eval edebug-eval-list))) -(defun edebug-eval-display-list (edebug-eval-result-list) +(defun edebug-eval-display-list (eval-result-list) ;; Assumes edebug-eval-buffer exists. - (let ((edebug-eval-list-temp edebug-eval-list) - (standard-output edebug-eval-buffer) + (let ((standard-output edebug-eval-buffer) (edebug-comment-line (format ";%s\n" (make-string (- (window-width) 2) ?-)))) (set-buffer edebug-eval-buffer) (erase-buffer) - (while edebug-eval-list-temp - (prin1 (car edebug-eval-list-temp)) (terpri) - (prin1 (car edebug-eval-result-list)) (terpri) - (princ edebug-comment-line) - (setq edebug-eval-list-temp (cdr edebug-eval-list-temp)) - (setq edebug-eval-result-list (cdr edebug-eval-result-list))) + (dolist (exp edebug-eval-list) + (prin1 exp) (terpri) + (prin1 (pop eval-result-list)) (terpri) + (princ edebug-comment-line)) (edebug-pop-to-buffer edebug-eval-buffer) )) @@ -3924,18 +3914,16 @@ Options: ;; Should generalize this to be callable outside of edebug ;; with calls in user functions, e.g. (edebug-eval-display) -(defun edebug-eval-display (edebug-eval-result-list) - "Display expressions and evaluations in EDEBUG-EVAL-RESULT-LIST. +(defun edebug-eval-display (eval-result-list) + "Display expressions and evaluations in EVAL-RESULT-LIST. It modifies the context by popping up the eval display." - (if edebug-eval-result-list - (progn - (edebug-create-eval-buffer) - (edebug-eval-display-list edebug-eval-result-list) - ))) + (when eval-result-list + (edebug-create-eval-buffer) + (edebug-eval-display-list eval-result-list))) (defun edebug-eval-redisplay () "Redisplay eval list in outside environment. -May only be called from within `edebug-recursive-edit'." +May only be called from within `edebug--recursive-edit'." (edebug-create-eval-buffer) (edebug-outside-excursion (edebug-eval-display-list (edebug-eval-result-list)) @@ -3997,8 +3985,8 @@ May only be called from within `edebug-recursive-edit'." (define-key map "\C-c\C-u" 'edebug-update-eval-list) (define-key map "\C-x\C-e" 'edebug-eval-last-sexp) (define-key map "\C-j" 'edebug-eval-print-last-sexp) - map) -"Keymap for Edebug Eval mode. Superset of Lisp Interaction mode.") + map) + "Keymap for Edebug Eval mode. Superset of Lisp Interaction mode.") (put 'edebug-eval-mode 'mode-class 'special) @@ -4025,32 +4013,32 @@ Global commands prefixed by `global-edebug-prefix': ;; since they depend on the backtrace looking a certain way. But ;; edebug is not dependent on this, yet. -(defun edebug (&optional edebug-arg-mode &rest debugger-args) +(defun edebug (&optional arg-mode &rest args) "Replacement for `debug'. If we are running an edebugged function, show where we last were. Otherwise call `debug' normally." -;; (message "entered: %s depth: %s edebug-recursion-depth: %s" -;; edebug-entered (recursion-depth) edebug-recursion-depth) (sit-for 1) + ;;(message "entered: %s depth: %s edebug-recursion-depth: %s" + ;; edebug-entered (recursion-depth) edebug-recursion-depth) (sit-for 1) (if (and edebug-entered ; anything active? (eq (recursion-depth) edebug-recursion-depth)) (let (;; Where were we before the error occurred? - (edebug-offset-index (car edebug-offset-indices)) - ;; Bind variables required by edebug-display - (edebug-value (car debugger-args)) + (offset-index (car edebug-offset-indices)) + (value (car args)) + ;; Bind variables required by edebug--display. edebug-breakpoints edebug-break-data edebug-break-condition edebug-global-break - (edebug-break (null edebug-arg-mode)) ;; if called explicitly + (edebug-break (null arg-mode)) ;; If called explicitly. ) - (edebug-display) - (if (eq edebug-arg-mode 'error) + (edebug--display value offset-index arg-mode) + (if (eq arg-mode 'error) nil - edebug-value)) + value)) ;; Otherwise call debug normally. ;; Still need to remove extraneous edebug calls from stack. - (apply 'debug edebug-arg-mode debugger-args) + (apply 'debug arg-mode args) )) @@ -4061,7 +4049,7 @@ Otherwise call `debug' normally." (null (buffer-name edebug-backtrace-buffer))) (setq edebug-backtrace-buffer (generate-new-buffer "*Backtrace*")) - ;; else, could just display edebug-backtrace-buffer + ;; Else, could just display edebug-backtrace-buffer. ) (with-output-to-temp-buffer (buffer-name edebug-backtrace-buffer) (setq edebug-backtrace-buffer standard-output) @@ -4083,7 +4071,7 @@ Otherwise call `debug' normally." (beginning-of-line) (cond ((looking-at "^ \(edebug-after") - ;; Previous lines may contain code, so just delete this line + ;; Previous lines may contain code, so just delete this line. (setq last-ok-point (point)) (forward-line 1) (delete-region last-ok-point (point))) From 4a4bbad21472cc0ede4691cbdbf8117b655b574f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 19:21:28 -0700 Subject: [PATCH 151/216] Simplify SIGIO usage. The code that dealt with SIGIO was crufty and confusing, e.g., it played tricks like "#undef SIGIO" but these tricks were not used consistently. Simplify mostly by not #undeffing standard symbols, e.g., use "defined USABLE_SIGIO" (our symbol, which we can define or not as we please) rather than "defined SIGIO" (standard symbol that we probably shouldn't #undef). * configure.ac (NO_TERMIO, BROKEN_FIONREAD, BROKEN_SIGAIO) (BROKEN_SIGPOLL, BROKEN_SIGPTY): Remove. (USABLE_FIONREAD, USABLE_SIGIO): New symbols. All uses of 'defined SIGIO' replaced with 'defined USABLE_SIGIO', with no need to #undef SIGIO now (which was error-prone). Likewise, all uses of 'defined FIONREAD' replaced with 'defined USABLE_FIONREAD'. * src/admin/CPP_DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL) (BROKEN_SIGPTY, NO_TERMIO): Remove. * src/conf_post.h [USG5_4]: Do not include here. Modules that need it can include it. [USG5_4 && emacs]: Likewise, do not include the streams stuff here. * src/dispextern.h (ignore_sigio): New decl. * src/emacs.c (shut_down_emacs): Invoke unrequest_sigio unconditionally, since it's now a no-op if !USABLE_SIGIO. * src/emacs.c (shut_down_emacs): * src/keyboard.c (kbd_buffer_store_event_hold): Use ignore_sigio rather than invoking 'signal' directly. * src/keyboard.c (USABLE_FIONREAD && USG5_4): Include , for FIONREAD. (FIONREAD, SIGIO): Do not #undef. (tty_read_avail_input): Use #error rather than a syntax error. * src/process.c [USG5_4]: Include and , for I_PIPE, used by SETUP_SLAVE_PTY. (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD. * src/sysdep.c (croak): Remove; no longer needed. This bit of temporary code, with Fred N. Fish's comment that it's temporary, has been in Emacs since at least 1992! (init_sigio, reset_sigio, request_sigio, unrequest_sigio): Arrange for them to be no-ops in all cases when ! USABLE_SIGIO. * src/syssignal.h (croak): Remove decl. (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile. * src/systty.h [!NO_TERMIO]: Do not include ; no longer needed now that we're termios-only. (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef. * src/term.c (dissociate_if_controlling_tty): Use #error rather than a run-time error. Fixes: debbugs:12408 --- ChangeLog | 10 +++++ admin/CPP-DEFINES | 5 --- admin/ChangeLog | 6 +++ configure.ac | 60 +++++++++++++++++++++-------- src/ChangeLog | 36 +++++++++++++++++ src/blockinput.h | 13 ++----- src/conf_post.h | 16 -------- src/dispextern.h | 1 + src/dispnew.c | 2 +- src/emacs.c | 4 +- src/keyboard.c | 71 +++++++++++++--------------------- src/process.c | 29 +++++++------- src/sound.c | 12 +++--- src/sysdep.c | 98 +++++++++-------------------------------------- src/syssignal.h | 21 ---------- src/systty.h | 13 +------ src/term.c | 3 +- src/xterm.c | 4 +- 18 files changed, 171 insertions(+), 233 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8a7fdc2966..96cb4b2b89c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-09-13 Paul Eggert + + Simplify SIGIO usage (Bug#12408). + * configure.ac (NO_TERMIO, BROKEN_FIONREAD, BROKEN_SIGAIO) + (BROKEN_SIGPOLL, BROKEN_SIGPTY): Remove. + (USABLE_FIONREAD, USABLE_SIGIO): New symbols. All uses of + 'defined SIGIO' replaced with 'defined USABLE_SIGIO', with no need + to #undef SIGIO now (which was error-prone). Likewise, all uses + of 'defined FIONREAD' replaced with 'defined USABLE_FIONREAD'. + 2012-09-12 Jan Djärv * configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index cf6ffee2c63..834695d6c78 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -91,10 +91,6 @@ BROKEN_GET_CURRENT_DIR_NAME BROKEN_NON_BLOCKING_CONNECT BROKEN_PTY_READ_AFTER_EAGAIN BROKEN_SA_RESTART -BROKEN_SIGAIO -BROKEN_SIGIO -BROKEN_SIGPOLL -BROKEN_SIGPTY CLASH_DETECTION DATA_SEG_BITS DATA_START @@ -423,7 +419,6 @@ MAIL_USE_SYSTEM_LOCK MAXPATHLEN NLIST_STRUCT NO_EDITRES -NO_TERMIO NSIG NSIG_MINIMUM NULL_DEVICE diff --git a/admin/ChangeLog b/admin/ChangeLog index b70067d7465..25eed8af5e3 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,9 @@ +2012-09-13 Paul Eggert + + Simplify SIGIO usage (Bug#12408). + * CPP_DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL) + (BROKEN_SIGPTY, NO_TERMIO): Remove. + 2012-09-11 Paul Eggert Simplify, document, and port floating-point (Bug#12381). diff --git a/configure.ac b/configure.ac index ed1849514c1..3761d814364 100644 --- a/configure.ac +++ b/configure.ac @@ -3271,10 +3271,6 @@ esac case $opsys in - darwin | gnu | hpux* | *bsd ) - AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.]) - ;; - irix6-5 | sol2* | unixware ) dnl Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; dnl instead, there's a system variable _sys_nsig. Unfortunately, we @@ -3284,26 +3280,16 @@ case $opsys in ;; esac +emacs_broken_SIGIO=no case $opsys in dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. dnl See eg . hpux* | irix6-5 | openbsd | sol2* | unixware ) - AC_DEFINE(BROKEN_SIGIO, 1, [Define if SIGIO should not be used.]) + emacs_broken_SIGIO=yes ;; aix4-2) - dnl BUILD 9008 - FIONREAD problem still exists in X-Windows. - AC_DEFINE(BROKEN_FIONREAD, 1, [Define if FIONREAD should not be used.]) - dnl As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h. - dnl But, on AIX, SIGAIO, SIGPTY, and SIGPOLL are defined as SIGIO, - dnl which causes compilation error at init_signals in sysdep.c. - dnl So, we define these macros so that syssignal.h detects them - dnl and undefine SIGAIO, SIGPTY and SIGPOLL. - AC_DEFINE(BROKEN_SIGAIO, 1, [Define if SIGAIO should not be used.]) - AC_DEFINE(BROKEN_SIGPOLL,1, [Define if SIGPOLL should not be used.]) - AC_DEFINE(BROKEN_SIGPTY, 1, [Define if SIGPTY should not be used.]) - dnl On AIX Emacs uses the gmalloc.c malloc implementation. But given dnl the way this system works, libc functions that return malloced dnl memory use the libc malloc implementation. Calling xfree or @@ -3379,7 +3365,7 @@ dnl The choice is controlled by the variable interrupt_input. dnl dnl Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) dnl -dnl Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros +dnl Emacs uses the presence of the USABLE_SIGIO macro dnl to indicate whether or not signal-driven I/O is possible. It uses dnl INTERRUPT_INPUT to decide whether to use it by default. dnl @@ -3900,6 +3886,46 @@ case $opsys in ;; esac +AC_CACHE_CHECK([for usable FIONREAD], [emacs_cv_usable_FIONREAD], + [case $opsys in + aix4-2) + dnl BUILD 9008 - FIONREAD problem still exists in X-Windows. + emacs_cv_usable_FIONREAD=no + ;; + + *) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + #include + #ifdef USG5_4 + # include + #endif + ]], + [[int foo = ioctl (0, FIONREAD, &foo);]])], + [emacs_cv_usable_FIONREAD=yes], + [emacs_cv_usable_FIONREAD=no]) + ;; + esac]) +if test $emacs_cv_usable_FIONREAD = yes; then + AC_DEFINE([USABLE_FIONREAD], [1], [Define to 1 if FIONREAD is usable.]) + + if test $emacs_broken_SIGIO = no; then + AC_CACHE_CHECK([for usable SIGIO], [emacs_cv_usable_SIGIO], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + #include + ]], + [[int foo = SIGIO | F_SETFL | FASYNC;]])], + [emacs_cv_usable_SIGIO=yes], + [emacs_cv_usable_SIGIO=no])], + [emacs_cv_usable_SIGIO=yes], + [emacs_cv_usable_SIGIO=no]) + if test $emacs_cv_usable_SIGIO = yes; then + AC_DEFINE([USABLE_SIGIO], [1], [Define to 1 if SIGIO is usable.]) + fi + fi +fi + case $opsys in dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls diff --git a/src/ChangeLog b/src/ChangeLog index 29e8ea4232e..c8588b973f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,41 @@ 2012-09-13 Paul Eggert + Simplify SIGIO usage (Bug#12408). + The code that dealt with SIGIO was crufty and confusing, e.g., it + played tricks like "#undef SIGIO" but these tricks were not used + consistently. Simplify mostly by not #undeffing standard symbols, + e.g., use "defined USABLE_SIGIO" (our symbol, which we can define + or not as we please) rather than "defined SIGIO" (standard symbol + that we probably shouldn't #undef). + * conf_post.h [USG5_4]: Do not include here. + Modules that need it can include it. + [USG5_4 && emacs]: Likewise, do not include the streams stuff here. + * dispextern.h (ignore_sigio): New decl. + * emacs.c (shut_down_emacs): Invoke unrequest_sigio + unconditionally, since it's now a no-op if !USABLE_SIGIO. + * emacs.c (shut_down_emacs): + * keyboard.c (kbd_buffer_store_event_hold): + Use ignore_sigio rather than invoking 'signal' directly. + * keyboard.c (USABLE_FIONREAD && USG5_4): Include , + for FIONREAD. + (FIONREAD, SIGIO): Do not #undef. + (tty_read_avail_input): Use #error rather than a syntax error. + * process.c [USG5_4]: Include and , + for I_PIPE, used by SETUP_SLAVE_PTY. + (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD. + * sysdep.c (croak): Remove; no longer needed. This bit of + temporary code, with Fred N. Fish's comment that it's temporary, + has been in Emacs since at least 1992! + (init_sigio, reset_sigio, request_sigio, unrequest_sigio): + Arrange for them to be no-ops in all cases when ! USABLE_SIGIO. + * syssignal.h (croak): Remove decl. + (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile. + * systty.h [!NO_TERMIO]: Do not include ; no longer needed + now that we're termios-only. + (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef. + * term.c (dissociate_if_controlling_tty): Use #error rather than + a run-time error. + Work around GCC and GNOME bugs when --enable-gcc-warnings. * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', to work around GNOME bug 683906. diff --git a/src/blockinput.h b/src/blockinput.h index 3f61b2b27b9..7501bfc91a0 100644 --- a/src/blockinput.h +++ b/src/blockinput.h @@ -67,15 +67,10 @@ extern int pending_atimers; If doing signal-driven input, and a signal came in when input was blocked, reinvoke the signal handler now to deal with it. - We used to have two possible definitions of this macro - one for - when SIGIO was #defined, and one for when it wasn't; when SIGIO - wasn't #defined, we wouldn't bother to check if we should re-invoke - the signal handler. But that doesn't work very well; some of the - files which use this macro don't #include the right files to get - SIGIO. - - So, we always test interrupt_input_pending now; that's not too - expensive, and it'll never get set if we don't need to resignal. */ + Always test interrupt_input_pending; that's not too expensive, and + it'll never get set if we don't need to resignal. This is simpler + than dealing here with every configuration option that might affect + whether interrupt_input_pending can be nonzero. */ #define UNBLOCK_INPUT \ do \ diff --git a/src/conf_post.h b/src/conf_post.h index 1bf40af260b..94934ffeadf 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -133,22 +133,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #endif #endif /* MSDOS */ -#ifdef USG5_4 -/* Get FIONREAD from . Get to get struct tchars. - But get first to make sure ttold.h doesn't interfere. */ -#include - -#ifdef emacs -#include -#include -#include -#include -#include -#include -#include -#endif -#endif /* USG5_4 */ - /* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ #ifdef HAVE_NS diff --git a/src/dispextern.h b/src/dispextern.h index 73f3350713f..365e8bcdcee 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3193,6 +3193,7 @@ void unrequest_sigio (void); int tabs_safe_p (int); void init_baud_rate (int); void init_sigio (int); +void ignore_sigio (void); /* Defined in xfaces.c */ diff --git a/src/dispnew.c b/src/dispnew.c index fae415dcaf2..f6186e86048 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5971,7 +5971,7 @@ sit_for (Lisp_Object timeout, bool reading, int do_display) wrong_type_argument (Qnumberp, timeout); -#ifdef SIGIO +#ifdef USABLE_SIGIO gobble_input (0); #endif diff --git a/src/emacs.c b/src/emacs.c index deaed25d9e8..e8150631311 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2035,12 +2035,10 @@ shut_down_emacs (int sig, Lisp_Object stuff) unlock_all_files (); #endif -#ifdef SIGIO /* There is a tendency for a SIGIO signal to arrive within exit, and cause a SIGHUP because the input descriptor is already closed. */ unrequest_sigio (); - signal (SIGIO, SIG_IGN); -#endif + ignore_sigio (); #ifdef WINDOWSNT term_ntproc (); diff --git a/src/keyboard.c b/src/keyboard.c index 7be3e9e118e..aec9028ae94 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -56,6 +56,10 @@ along with GNU Emacs. If not, see . */ #include #endif /* not MSDOS */ +#if defined USABLE_FIONREAD && defined USG5_4 +# include +#endif + #include "syssignal.h" #include @@ -385,19 +389,6 @@ int interrupt_input; /* Nonzero while interrupts are temporarily deferred during redisplay. */ int interrupts_deferred; -/* Allow configure to inhibit use of FIONREAD. */ -#ifdef BROKEN_FIONREAD -#undef FIONREAD -#endif - -/* We are unable to use interrupts if FIONREAD is not available, - so flush SIGIO so we won't try. */ -#if !defined (FIONREAD) -#ifdef SIGIO -#undef SIGIO -#endif -#endif - /* If we support a window system, turn on the code to poll periodically to detect C-g. It isn't actually used when doing interrupt input. */ #if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS) @@ -448,7 +439,7 @@ static void restore_getcjmp (jmp_buf); static Lisp_Object apply_modifiers (int, Lisp_Object); static void clear_event (struct input_event *); static Lisp_Object restore_kboard_configuration (Lisp_Object); -#ifdef SIGIO +#ifdef USABLE_SIGIO static void deliver_input_available_signal (int signo); #endif static void handle_interrupt (void); @@ -3646,10 +3637,8 @@ kbd_buffer_store_event_hold (register struct input_event *event, /* Don't read keyboard input until we have processed kbd_buffer. This happens when pasting text longer than KBD_BUFFER_SIZE/2. */ hold_keyboard_input (); -#ifdef SIGIO if (!noninteractive) - signal (SIGIO, SIG_IGN); -#endif + ignore_sigio (); stop_polling (); } #endif /* subprocesses */ @@ -3818,14 +3807,14 @@ kbd_buffer_get_event (KBOARD **kbp, /* Start reading input again, we have processed enough so we can accept new events again. */ unhold_keyboard_input (); -#ifdef SIGIO +#ifdef USABLE_SIGIO if (!noninteractive) { struct sigaction action; emacs_sigaction_init (&action, deliver_input_available_signal); sigaction (SIGIO, &action, 0); } -#endif /* SIGIO */ +#endif start_polling (); } #endif /* subprocesses */ @@ -3867,10 +3856,9 @@ kbd_buffer_get_event (KBOARD **kbp, /* One way or another, wait until input is available; then, if interrupt handlers have not read it, read it now. */ -/* Note SIGIO has been undef'd if FIONREAD is missing. */ -#ifdef SIGIO +#ifdef USABLE_SIGIO gobble_input (0); -#endif /* SIGIO */ +#endif if (kbd_fetch_ptr != kbd_store_ptr) break; #if defined (HAVE_MOUSE) || defined (HAVE_GPM) @@ -6769,7 +6757,7 @@ get_input_pending (int *addr, int flags) void gobble_input (int expected) { -#ifdef SIGIO +#ifdef USABLE_SIGIO if (interrupt_input) { sigset_t blocked, procmask; @@ -6824,7 +6812,7 @@ record_asynch_buffer_change (void) return; /* Make sure no interrupt happens while storing the event. */ -#ifdef SIGIO +#ifdef USABLE_SIGIO if (interrupt_input) { sigset_t blocked, procmask; @@ -7050,7 +7038,7 @@ tty_read_avail_input (struct terminal *terminal, #endif /* HAVE_GPM */ /* Determine how many characters we should *try* to read. */ -#ifdef FIONREAD +#ifdef USABLE_FIONREAD /* Find out how much input is available. */ if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0) { @@ -7063,14 +7051,12 @@ tty_read_avail_input (struct terminal *terminal, return 0; if (n_to_read > sizeof cbuf) n_to_read = sizeof cbuf; -#else /* no FIONREAD */ -#if defined (USG) || defined (CYGWIN) +#elif defined USG || defined CYGWIN /* Read some input if available, but don't wait. */ n_to_read = sizeof cbuf; fcntl (fileno (tty->input), F_SETFL, O_NDELAY); #else - you lose; -#endif +# error "Cannot read without possibly delaying" #endif #ifdef subprocesses @@ -7119,7 +7105,7 @@ tty_read_avail_input (struct terminal *terminal, #endif ); -#ifndef FIONREAD +#ifndef USABLE_FIONREAD #if defined (USG) || defined (CYGWIN) fcntl (fileno (tty->input), F_SETFL, 0); #endif /* USG or CYGWIN */ @@ -7190,7 +7176,7 @@ tty_read_avail_input (struct terminal *terminal, return nread; } -#if defined SYNC_INPUT || defined SIGIO +#if defined SYNC_INPUT || defined USABLE_SIGIO static void handle_async_input (void) { @@ -7217,7 +7203,7 @@ handle_async_input (void) --handling_signal; #endif } -#endif /* SYNC_INPUT || SIGIO */ +#endif /* SYNC_INPUT || USABLE_SIGIO */ #ifdef SYNC_INPUT void @@ -7229,8 +7215,7 @@ process_pending_signals (void) } #endif -#ifdef SIGIO /* for entire page */ -/* Note SIGIO has been undef'd if FIONREAD is missing. */ +#ifdef USABLE_SIGIO static void handle_input_available_signal (int sig) @@ -7253,7 +7238,7 @@ deliver_input_available_signal (int sig) { handle_on_main_thread (sig, handle_input_available_signal); } -#endif /* SIGIO */ +#endif /* USABLE_SIGIO */ /* Send ourselves a SIGIO. @@ -7264,7 +7249,7 @@ deliver_input_available_signal (int sig) void reinvoke_input_signal (void) { -#ifdef SIGIO +#ifdef USABLE_SIGIO handle_async_input (); #endif } @@ -7338,7 +7323,7 @@ handle_user_signal (int sig) } p->npending++; -#ifdef SIGIO +#ifdef USABLE_SIGIO if (interrupt_input) kill (getpid (), SIGIO); else @@ -11007,8 +10992,7 @@ See also `current-input-mode'. */) (Lisp_Object interrupt) { int new_interrupt_input; -#ifdef SIGIO -/* Note SIGIO has been undef'd if FIONREAD is missing. */ +#ifdef USABLE_SIGIO #ifdef HAVE_X_WINDOWS if (x_display_list != NULL) { @@ -11019,9 +11003,9 @@ See also `current-input-mode'. */) else #endif /* HAVE_X_WINDOWS */ new_interrupt_input = !NILP (interrupt); -#else /* not SIGIO */ +#else /* not USABLE_SIGIO */ new_interrupt_input = 0; -#endif /* not SIGIO */ +#endif /* not USABLE_SIGIO */ if (new_interrupt_input != interrupt_input) { @@ -11415,15 +11399,14 @@ init_keyboard (void) sigaction (SIGQUIT, &action, 0); #endif /* not DOS_NT */ } -/* Note SIGIO has been undef'd if FIONREAD is missing. */ -#ifdef SIGIO +#ifdef USABLE_SIGIO if (!noninteractive) { struct sigaction action; emacs_sigaction_init (&action, deliver_input_available_signal); sigaction (SIGIO, &action, 0); } -#endif /* SIGIO */ +#endif /* Use interrupt input by default, if it works and noninterrupt input has deficiencies. */ diff --git a/src/process.c b/src/process.c index f80b5e80c76..b4b05a4b2e2 100644 --- a/src/process.c +++ b/src/process.c @@ -75,6 +75,11 @@ along with GNU Emacs. If not, see . */ #include #endif +#ifdef USG5_4 +# include +# include +#endif + #ifdef HAVE_RES_INIT #include #include @@ -212,17 +217,13 @@ static EMACS_INT update_tick; "non-destructive" select. So we require either native select, or emulation of select using FIONREAD. */ -#ifdef BROKEN_DATAGRAM_SOCKETS -#undef DATAGRAM_SOCKETS -#else -#ifndef DATAGRAM_SOCKETS -#if defined (HAVE_SELECT) || defined (FIONREAD) -#if defined (HAVE_SENDTO) && defined (HAVE_RECVFROM) && defined (EMSGSIZE) -#define DATAGRAM_SOCKETS -#endif /* HAVE_SENDTO && HAVE_RECVFROM && EMSGSIZE */ -#endif /* HAVE_SELECT || FIONREAD */ -#endif /* DATAGRAM_SOCKETS */ -#endif /* BROKEN_DATAGRAM_SOCKETS */ +#ifndef BROKEN_DATAGRAM_SOCKETS +# if defined HAVE_SELECT || defined USABLE_FIONREAD +# if defined HAVE_SENDTO && defined HAVE_RECVFROM && defined EMSGSIZE +# define DATAGRAM_SOCKETS +# endif +# endif +#endif #if defined HAVE_LOCAL_SOCKETS && defined DATAGRAM_SOCKETS # define HAVE_SEQPACKET @@ -251,7 +252,7 @@ static int process_output_skip; #endif static void create_process (Lisp_Object, char **, Lisp_Object); -#ifdef SIGIO +#ifdef USABLE_SIGIO static int keyboard_bit_set (SELECT_TYPE *); #endif static void deactivate_process (Lisp_Object); @@ -4836,7 +4837,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; -#ifdef SIGIO +#ifdef USABLE_SIGIO /* If we think we have keyboard input waiting, but didn't get SIGIO, go read it. This can happen with X on BSD after logging out. In that case, there really is no input and no SIGIO, @@ -6853,7 +6854,7 @@ delete_gpm_wait_descriptor (int desc) # endif -# ifdef SIGIO +# ifdef USABLE_SIGIO /* Return nonzero if *MASK has a bit set that corresponds to one of the keyboard input descriptors. */ diff --git a/src/sound.c b/src/sound.c index 5729d704b6a..fe48bb277b2 100644 --- a/src/sound.c +++ b/src/sound.c @@ -314,7 +314,7 @@ sound_perror (const char *msg) int saved_errno = errno; turn_on_atimers (1); -#ifdef SIGIO +#ifdef USABLE_SIGIO { sigset_t unblocked; sigemptyset (&unblocked); @@ -732,7 +732,7 @@ static void vox_configure (struct sound_device *sd) { int val; -#ifdef SIGIO +#ifdef USABLE_SIGIO sigset_t blocked; #endif @@ -742,7 +742,7 @@ vox_configure (struct sound_device *sd) interrupted by a signal. Block the ones we know to cause troubles. */ turn_on_atimers (0); -#ifdef SIGIO +#ifdef USABLE_SIGIO sigemptyset (&blocked); sigaddset (&blocked, SIGIO); pthread_sigmask (SIG_BLOCK, &blocked, 0); @@ -778,7 +778,7 @@ vox_configure (struct sound_device *sd) } turn_on_atimers (1); -#ifdef SIGIO +#ifdef USABLE_SIGIO pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #endif } @@ -794,7 +794,7 @@ vox_close (struct sound_device *sd) /* On GNU/Linux, it seems that the device driver doesn't like to be interrupted by a signal. Block the ones we know to cause troubles. */ -#ifdef SIGIO +#ifdef USABLE_SIGIO sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGIO); @@ -806,7 +806,7 @@ vox_close (struct sound_device *sd) ioctl (sd->fd, SNDCTL_DSP_SYNC, NULL); turn_on_atimers (1); -#ifdef SIGIO +#ifdef USABLE_SIGIO pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #endif diff --git a/src/sysdep.c b/src/sysdep.c index 0f16d1a7645..b8f35e79146 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -107,9 +107,6 @@ extern char *getwd (char *); static int emacs_get_tty (int, struct emacs_tty *); static int emacs_set_tty (int, struct emacs_tty *, int); -#if defined TIOCNOTTY || defined USG5 || defined CYGWIN -static _Noreturn void croak (char *); -#endif /* ULLONG_MAX is missing on Red Hat Linux 7.3; see Bug#11781. */ #ifndef ULLONG_MAX @@ -513,7 +510,7 @@ sys_subshell (void) saved_handlers[0].code = SIGINT; saved_handlers[1].code = SIGQUIT; saved_handlers[2].code = SIGTERM; -#ifdef SIGIO +#ifdef USABLE_SIGIO saved_handlers[3].code = SIGIO; saved_handlers[4].code = 0; #else @@ -642,121 +639,75 @@ restore_signal_handlers (struct save_signal *saved_handlers) } } -#ifndef SIGIO -/* If SIGIO is broken, don't do anything. */ -void -init_sigio (int fd) -{ -} - -static void -reset_sigio (int fd) -{ -} - -void -request_sigio (void) -{ -} - -void -unrequest_sigio (void) -{ -} - -#else -#ifdef F_SETFL - +#ifdef USABLE_SIGIO static int old_fcntl_flags[MAXDESC]; +#endif void init_sigio (int fd) { -#ifdef FASYNC +#ifdef USABLE_SIGIO old_fcntl_flags[fd] = fcntl (fd, F_GETFL, 0) & ~FASYNC; fcntl (fd, F_SETFL, old_fcntl_flags[fd] | FASYNC); -#endif interrupts_deferred = 0; +#endif } static void reset_sigio (int fd) { -#ifdef FASYNC +#ifdef USABLE_SIGIO fcntl (fd, F_SETFL, old_fcntl_flags[fd]); #endif } -#ifdef FASYNC /* F_SETFL does not imply existence of FASYNC */ -/* XXX Uhm, FASYNC is not used anymore here. */ -/* XXX Yeah, but you need it for SIGIO, don't you? */ - void request_sigio (void) { +#ifdef USABLE_SIGIO sigset_t unblocked; if (noninteractive) return; sigemptyset (&unblocked); -#ifdef SIGWINCH +# ifdef SIGWINCH sigaddset (&unblocked, SIGWINCH); -#endif +# endif sigaddset (&unblocked, SIGIO); pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); interrupts_deferred = 0; +#endif } void unrequest_sigio (void) { +#ifdef USABLE_SIGIO sigset_t blocked; if (noninteractive) return; -#if 0 /* XXX What's wrong with blocking SIGIO under X? */ - if (x_display_list) - return; -#endif - sigemptyset (&blocked); -#ifdef SIGWINCH +# ifdef SIGWINCH sigaddset (&blocked, SIGWINCH); -#endif +# endif sigaddset (&blocked, SIGIO); pthread_sigmask (SIG_BLOCK, &blocked, 0); interrupts_deferred = 1; -} - -#else /* no FASYNC */ -#ifndef MSDOS - -void -request_sigio (void) -{ - if (noninteractive || read_socket_hook) - return; - - croak ("request_sigio"); +#endif } void -unrequest_sigio (void) +ignore_sigio (void) { - if (noninteractive || read_socket_hook) - return; - - croak ("unrequest_sigio"); +#ifdef USABLE_SIGIO + signal (SIGIO, SIG_IGN); +#endif } -#endif /* MSDOS */ -#endif /* FASYNC */ -#endif /* F_SETFL */ -#endif /* SIGIO */ - /* Getting and setting emacs_tty structures. */ @@ -2051,19 +2002,6 @@ getwd (char *pathname) } #endif /* !defined (HAVE_GETWD) || defined (BROKEN_GETWD) */ - -/* - * This function will go away as soon as all the stubs fixed. (fnf) - */ - -void -croak (char *badfunc) -{ - printf ("%s not yet implemented\r\n", badfunc); - reset_all_sys_modes (); - exit (1); -} - #endif /* USG */ /* Directory routines for systems that don't have them. */ diff --git a/src/syssignal.h b/src/syssignal.h index c5529ae718a..5e733dd812d 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -34,27 +34,6 @@ typedef void (*signal_handler_t) (int); extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); -#if ! (defined TIOCNOTTY || defined USG5 || defined CYGWIN) -_Noreturn void croak (char *); -#endif - -/* Interrupt input is not used if there is no FIONREAD. */ -#include -#if defined BROKEN_SIGIO || ! defined FIONREAD || defined BROKEN_FIONREAD -# undef SIGIO -#endif - -/* These are only used by AIX */ -#if defined (SIGPOLL) && defined (BROKEN_SIGPOLL) -#undef SIGPOLL -#endif -#if defined (SIGAIO) && defined (BROKEN_SIGAIO) -#undef SIGAIO -#endif -#if defined (SIGPTY) && defined (BROKEN_SIGPTY) -#undef SIGPTY -#endif - #if NSIG < NSIG_MINIMUM # undef NSIG # define NSIG NSIG_MINIMUM diff --git a/src/systty.h b/src/systty.h index b660441a91e..b7f36c6c259 100644 --- a/src/systty.h +++ b/src/systty.h @@ -17,10 +17,8 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ /* Include the proper files. */ + #ifndef DOS_NT -#ifndef NO_TERMIO -#include -#endif /* not NO_TERMIO */ #include #include #endif /* not DOS_NT */ @@ -38,15 +36,6 @@ along with GNU Emacs. If not, see . */ #include - -/* Special cases - inhibiting the use of certain features. */ - -/* Allow configure to inhibit use of FIONREAD. */ -#ifdef BROKEN_FIONREAD -#undef FIONREAD -#undef ASYNC -#endif - /* Try to establish the correct character to disable terminal functions in a system-independent manner. Note that USG (at least) define diff --git a/src/term.c b/src/term.c index 0eaf76a13df..47bde5ac240 100644 --- a/src/term.c +++ b/src/term.c @@ -2944,8 +2944,7 @@ dissociate_if_controlling_tty (int fd) emacs_close (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); #else - /* Unknown system. */ - croak (); +# error "Unknown system." #endif /* ! TIOCNOTTY */ #endif /* ! USG */ } diff --git a/src/xterm.c b/src/xterm.c index e5a5932beae..54d4f14bdd0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7878,7 +7878,7 @@ For details, see etc/PROBLEMS.\n", { sigset_t unblocked; sigemptyset (&unblocked); -#ifdef SIGIO +#ifdef USABLE_SIGIO sigaddset (&unblocked, SIGIO); #endif sigaddset (&unblocked, SIGALRM); @@ -10421,10 +10421,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) fcntl (connection, F_SETOWN, getpid ()); #endif /* ! defined (F_SETOWN) */ -#ifdef SIGIO if (interrupt_input) init_sigio (connection); -#endif /* ! defined (SIGIO) */ #ifdef USE_LUCID { From c0c54fbddf0784b84b04f38aabee47067a920863 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 12 Sep 2012 22:29:05 -0400 Subject: [PATCH 152/216] * lisp/emacs-lisp/edebug.el (edebug-outside-unread-command-events): Fix last change. (edebug-update-eval-list): Use `push'. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/edebug.el | 13 ++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0bbd7558bc..89cc2106ba0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2012-09-13 Stefan Monnier + * emacs-lisp/edebug.el (edebug-outside-unread-command-events): + Fix last change. + (edebug-update-eval-list): Use `push'. + * emacs-lisp/edebug.el: Use lexical-binding. Remove the "edebug-" prefix from non-dynamically-scoped variables. Mark unused args with underscore. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 42260d12a82..8f0f24ad092 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2480,6 +2480,7 @@ MSG is printed after `::::} '." ;; Emacs 19 adds an arg to mark and mark-marker. (defalias 'edebug-mark-marker 'mark-marker) +(defvar edebug-outside-unread-command-events) (defun edebug--display (value offset-index arg-mode) (unless (marker-position edebug-def-mark) @@ -2763,7 +2764,6 @@ MSG is printed after `::::} '." ;; Emacs 19. (defvar edebug-outside-last-command-event) -(defvar edebug-outside-unread-command-events) (defvar edebug-outside-last-input-event) (defvar edebug-outside-last-event-frame) (defvar edebug-outside-last-nonmenu-event) @@ -3906,10 +3906,9 @@ Options: )) (defun edebug-create-eval-buffer () - (if (not (and edebug-eval-buffer (buffer-name edebug-eval-buffer))) - (progn - (set-buffer (setq edebug-eval-buffer (get-buffer-create "*edebug*"))) - (edebug-eval-mode)))) + (unless (and edebug-eval-buffer (buffer-name edebug-eval-buffer)) + (set-buffer (setq edebug-eval-buffer (get-buffer-create "*edebug*"))) + (edebug-eval-mode))) ;; Should generalize this to be callable outside of edebug ;; with calls in user functions, e.g. (edebug-eval-display) @@ -3947,7 +3946,7 @@ May only be called from within `edebug--recursive-edit'." (if (not (eobp)) (progn (forward-sexp 1) - (setq new-list (cons (edebug-last-sexp) new-list)))) + (push (edebug-last-sexp) new-list))) (while (re-search-forward "^;" nil t) (forward-line 1) @@ -3956,7 +3955,7 @@ May only be called from within `edebug--recursive-edit'." (not (eobp))) (progn (forward-sexp 1) - (setq new-list (cons (edebug-last-sexp) new-list))))) + (push (edebug-last-sexp) new-list)))) (setq edebug-eval-list (nreverse new-list)) (edebug-eval-redisplay) From 2168fe4f2ad6ea4320a0da7976294b0cdade1a20 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 12 Sep 2012 22:41:46 -0400 Subject: [PATCH 153/216] byte-compile-warning-prefix tweak * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): If not compiling a file, try using load-file-name. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/bytecomp.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89cc2106ba0..41dc46021f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-13 Glenn Morris + + * emacs-lisp/bytecomp.el (byte-compile-warning-prefix): + If not compiling a file, try using load-file-name. + 2012-09-13 Stefan Monnier * emacs-lisp/edebug.el (edebug-outside-unread-command-events): diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 10bc37c6dcd..c42ae21aae5 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1016,6 +1016,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." ((bufferp byte-compile-current-file) (format "Buffer %s:" (buffer-name byte-compile-current-file))) + ;; We might be simply loading a file that + ;; contains explicit calls to byte-compile functions. + ((stringp load-file-name) + (format "%s:" (file-relative-name load-file-name dir))) (t ""))) (pos (if (and byte-compile-current-file (integerp byte-compile-read-position)) From 8ea47e3a5073256b30a42d34a2654e4551ce7e78 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 21:14:33 -0700 Subject: [PATCH 154/216] Better workaround for GNOME bug when --enable-gcc-warnings. * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change. Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in . --- src/ChangeLog | 5 +++++ src/emacsgtkfixed.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c8588b973f8..2bc041f0435 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2012-09-13 Paul Eggert + Better workaround for GNOME bug when --enable-gcc-warnings. + * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change. + Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in + . + Simplify SIGIO usage (Bug#12408). The code that dealt with SIGIO was crufty and confusing, e.g., it played tricks like "#undef SIGIO" but these tricks were not used diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index a21d0f8a422..c0d29a640ed 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c @@ -28,9 +28,10 @@ along with GNU Emacs. If not, see . */ #include "xterm.h" /* Silence a bogus diagnostic; see GNOME bug 683906. */ -#include -#undef G_STATIC_ASSERT -#define G_STATIC_ASSERT(x) verify (x) +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-local-typedefs" +#endif #define EMACS_TYPE_FIXED emacs_fixed_get_type () #define EMACS_FIXED(obj) \ From d59a1afb9acc881201223e7c573e94526b3cd3fc Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Thu, 13 Sep 2012 09:18:26 +0400 Subject: [PATCH 155/216] Function to mark objects and remove killed buffers at once. * alloc.c (discard_killed_buffers): Rename to ... (mark_discard_killed buffers) ... new name. Add marking of remaining objects. Fix comment. Adjust users. (mark_object): Do not touch frame buffer lists here. * frame.c (delete_frame): Reset frame buffer lists here. --- src/ChangeLog | 9 +++++++++ src/alloc.c | 36 +++++++++++++++--------------------- src/frame.c | 5 +++++ 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2bc041f0435..90f3fc33b59 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-09-13 Dmitry Antipov + + Function to mark objects and remove killed buffers at once. + * alloc.c (discard_killed_buffers): Rename to ... + (mark_discard_killed buffers) ... new name. Add marking + of remaining objects. Fix comment. Adjust users. + (mark_object): Do not touch frame buffer lists here. + * frame.c (delete_frame): Reset frame buffer lists here. + 2012-09-13 Paul Eggert Better workaround for GNOME bug when --enable-gcc-warnings. diff --git a/src/alloc.c b/src/alloc.c index 61cb7086c25..77807f6e086 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5865,16 +5865,16 @@ mark_buffer (struct buffer *buffer) mark_buffer (buffer->base_buffer); } -/* Remove killed buffers or items whose car is a killed buffer - from LIST and return changed LIST. Called during GC. */ +/* Remove killed buffers or items whose car is a killed buffer from + LIST, and mark other items. Return changed LIST, which is marked. */ static Lisp_Object -discard_killed_buffers (Lisp_Object list) +mark_discard_killed_buffers (Lisp_Object list) { - Lisp_Object *prev = &list; - Lisp_Object tail; + Lisp_Object tail, *prev = &list; - for (tail = list; CONSP (tail); tail = XCDR (tail)) + for (tail = list; CONSP (tail) && !CONS_MARKED_P (XCONS (tail)); + tail = XCDR (tail)) { Lisp_Object tem = XCAR (tail); if (CONSP (tem)) @@ -5882,7 +5882,11 @@ discard_killed_buffers (Lisp_Object list) if (BUFFERP (tem) && !BUFFER_LIVE_P (XBUFFER (tem))) *prev = XCDR (tail); else - prev = &XCDR_AS_LVALUE (tail); + { + CONS_MARK (XCONS (tail)); + mark_object (XCAR (tail)); + prev = &XCDR_AS_LVALUE (tail); + } } return list; } @@ -6023,18 +6027,8 @@ mark_object (Lisp_Object arg) break; case PVEC_FRAME: - { - struct frame *f = (struct frame *) ptr; - - /* For live frames, killed buffers are filtered out by - store_frame_param. For dead frames, we do it here in - attempt to help GC to reclaim killed buffers faster. */ - if (!FRAME_LIVE_P (f)) - fset_buffer_list (f, discard_killed_buffers (f->buffer_list)); - - mark_vectorlike (ptr); - mark_face_cache (f->face_cache); - } + mark_vectorlike (ptr); + mark_face_cache (((struct frame *) ptr)->face_cache); break; case PVEC_WINDOW: @@ -6048,9 +6042,9 @@ mark_object (Lisp_Object arg) if (leaf && NILP (w->buffer)) { wset_prev_buffers - (w, discard_killed_buffers (w->prev_buffers)); + (w, mark_discard_killed_buffers (w->prev_buffers)); wset_next_buffers - (w, discard_killed_buffers (w->next_buffers)); + (w, mark_discard_killed_buffers (w->next_buffers)); } mark_vectorlike (ptr); diff --git a/src/frame.c b/src/frame.c index 9b12842bf89..d10969692ee 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1299,6 +1299,11 @@ delete_frame (Lisp_Object frame, Lisp_Object force) structures can still refer to it. */ fset_menu_bar_vector (f, Qnil); + /* If FRAME's buffer lists contains killed + buffers, this helps GC to reclaim them. */ + fset_buffer_list (f, Qnil); + fset_buried_buffer_list (f, Qnil); + free_font_driver_list (f); xfree (f->namebuf); xfree (f->decode_mode_spec_buffer); From 72eac303eabbb403eae650c9dd0c93851b0fec23 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Sep 2012 23:09:45 -0700 Subject: [PATCH 156/216] Fix glitches caused by addition of psec to timers. * etc/NEWS: Document timer format change. * lisp/image.el (image-animate-timer): * lisp/time.el (display-time-world-timer): Use timer--function and timer--args rather than raw access to timer vector. * lisp/gnus/gnus-art.el (gnus-article-stop-animations): Use timer--function rather than raw access to timer vector. Fixes: debbugs:12430 --- etc/ChangeLog | 4 ++++ etc/NEWS | 5 +++++ lisp/ChangeLog | 8 ++++++++ lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/gnus-art.el | 2 +- lisp/image.el | 4 ++-- lisp/time.el | 3 ++- 7 files changed, 28 insertions(+), 4 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 11e7e5ca108..20ded2fd847 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2012-09-13 Paul Eggert + + * NEWS: Document timer format change (Bug#12430). + 2012-09-11 Paul Eggert Simplify, document, and port floating-point (Bug#12381). diff --git a/etc/NEWS b/etc/NEWS index a7388c4e9fa..eb5a2ed6660 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -101,6 +101,11 @@ machines. Other functions that use this format, such as file-attributes and format-time-string, have been changed accordingly. Old-format time stamps are still accepted. +** The format of timers in timer-list and timer-idle-list is now +[HIGH-SECONDS LOW-SECONDS USECS PSECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY]. +The PSECS slot is new, and uses picosecond resolution. It can be +accessed via the new timer--psecs accessor. + ** Emacs now generates backtraces on fatal errors. On encountering a fatal error, Emacs now outputs a textual description of the fatal signal, and a short backtrace on platforms like glibc diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41dc46021f6..1bb8f913c20 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-09-13 Paul Eggert + + Fix glitches caused by addition of psec to timers (Bug#12430). + * image.el (image-animate-timer): + * time.el (display-time-world-timer): + Use timer--function and timer--args rather than raw access to + timer vector. + 2012-09-13 Glenn Morris * emacs-lisp/bytecomp.el (byte-compile-warning-prefix): diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5c7f106f6db..3f69a84db88 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2012-09-13 Paul Eggert + + Fix glitches caused by addition of psec to timers. + * gnus-art.el (gnus-article-stop-animations): Use timer--function + rather than raw access to timer vector. + 2012-09-11 Julien Danjou * gnus-notifications.el (gnus-notifications): Check for nil values in diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b9020a40b75..4dc004f04d4 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4554,7 +4554,7 @@ commands: (defun gnus-article-stop-animations () (dolist (timer (and (boundp 'timer-list) timer-list)) - (when (eq (elt timer 5) 'image-animate-timeout) + (when (eq (timer--function timer) 'image-animate-timeout) (cancel-timer timer)))) (defun gnus-stop-downloads () diff --git a/lisp/image.el b/lisp/image.el index 7801923c3fe..99c0a74a512 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -645,8 +645,8 @@ number, play until that number of seconds has elapsed." (while tail (setq timer (car tail) tail (cdr tail)) - (if (and (eq (aref timer 5) 'image-animate-timeout) - (eq (car-safe (aref timer 6)) image)) + (if (and (eq (timer--function timer) 'image-animate-timeout) + (eq (car-safe (timer--args timer)) image)) (setq tail nil) (setq timer nil))) timer)) diff --git a/lisp/time.el b/lisp/time.el index 8d43b565416..fe3cdbb57be 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -575,7 +575,8 @@ To turn off the world time display, go to that window and type `q'." (let ((list timer-list)) (while list (let ((elt (pop list))) - (when (equal (symbol-name (aref elt 5)) "display-time-world-timer") + (when (equal (symbol-name (timer--function elt)) + "display-time-world-timer") (cancel-timer elt))))))) ;;;###autoload From 1352271a4d2ad5b0b4394af0cf97adab00d13a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 13 Sep 2012 08:13:26 +0200 Subject: [PATCH 157/216] * etc/NEWS (--with-x-toolkit): Mention Gtk+ 3 is now default. --- etc/ChangeLog | 4 ++++ etc/NEWS | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 20ded2fd847..26e9ada74da 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2012-09-13 Jan Djärv + + * NEWS (--with-x-toolkit): Mention that Gtk+ 3 is now default. + 2012-09-13 Paul Eggert * NEWS: Document timer format change (Bug#12430). diff --git a/etc/NEWS b/etc/NEWS index eb5a2ed6660..cbf13c2e87d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,6 +65,14 @@ renamed to '--enable-check-lisp-object-type', as the resulting Lisp_Object type no longer uses a union to implement the compile time check that this option enables. +--- +** The default toolkit has been changed to Gtk+ version 3. +If you don't pass --with-x-toolkit to configure or if you pass +--with-x-toolkit=gtk or --with-x-toolkit=yes, configure will try to build +with Gtk+ version 3, and if that fails, try Gtk+ version 2. +You can explicitly require a specific version by passing +--with-x-toolkit=gtk2 or --with-x-toolkit=gtk3 to configure. + * Startup Changes in Emacs 24.3 From 2c484e7585ab899ecea4caddf54b468556f3239d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 13 Sep 2012 08:27:21 +0200 Subject: [PATCH 158/216] * configure.ac: Reorder Xaw3d messages. --- ChangeLog | 4 ++++ configure.ac | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 96cb4b2b89c..07558742e86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-09-13 Jan Djärv + + * configure.ac: Reorder Xaw3d messages. + 2012-09-13 Paul Eggert Simplify SIGIO usage (Bug#12408). diff --git a/configure.ac b/configure.ac index 3761d814364..a6395dc18c2 100644 --- a/configure.ac +++ b/configure.ac @@ -2109,7 +2109,6 @@ HAVE_XAW3D=no LUCID_LIBW= if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then - AC_MSG_CHECKING(for xaw3d) AC_CACHE_VAL(emacs_cv_xaw3d, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include @@ -2122,6 +2121,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then emacs_cv_xaw3d=no fi if test $emacs_cv_xaw3d = yes; then + AC_MSG_CHECKING(for xaw3d) AC_MSG_RESULT([yes; using Lucid toolkit]) USE_X_TOOLKIT=LUCID HAVE_XAW3D=yes @@ -2129,6 +2129,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then AC_DEFINE(HAVE_XAW3D, 1, [Define to 1 if you have the Xaw3d library (-lXaw3d).]) else + AC_MSG_CHECKING(for xaw3d) AC_MSG_RESULT(no) AC_MSG_CHECKING(for libXaw) AC_CACHE_VAL(emacs_cv_xaw, From 5087f097cd220a82eeeb69de4ef1c642714f3708 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 13 Sep 2012 00:28:15 -0700 Subject: [PATCH 159/216] * texinfo.tex: Merge from gnulib. --- doc/misc/ChangeLog | 4 ++++ doc/misc/texinfo.tex | 37 ++++++++++++++++++++----------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 408e4665955..8ecaf97a84a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2012-09-13 Paul Eggert + + * texinfo.tex: Merge from gnulib. + 2012-09-12 Michael Albinus Sync with Tramp 2.2.6. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 9a2439c815d..f3093d0853f 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2012-09-05.06} +\def\texinfoversion{2012-09-12.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -2272,8 +2272,6 @@ end \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} - -\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft @@ -2282,6 +2280,9 @@ end \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % @@ -2291,8 +2292,6 @@ end \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright -\let\markupsetuplqkbd \markupsetnoligaturesquoteleft - % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it @@ -2382,8 +2381,7 @@ end \aftersmartic } -% like \smartslanted except unconditionally uses \ttsl, and no ic. -% @var is set to this for defun arguments. +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want @@ -2695,10 +2693,6 @@ end \let\email=\uref \fi -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. -\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} - % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). @@ -2722,11 +2716,17 @@ end % Default is `distinct'. \kbdinputstyle distinct +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + \def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} @@ -4257,7 +4257,7 @@ end } \def\ifcmddefinedfail{\doignore{ifcommanddefined}} -% @ifcommandnotdefined CMD ... handlded similar to @ifclear above. +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. \makecond{ifcommandnotdefined} \def\ifcommandnotdefined{% \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} @@ -7072,7 +7072,10 @@ end \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we - % want a way to get ttsl. Let's try @var for that. + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 From 4fa924951b55e6b428e852b62d6c8ef3464ea1dd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 13 Sep 2012 06:17:31 -0400 Subject: [PATCH 160/216] Auto-commit of generated files. --- autogen/config.in | 24 ++------ autogen/configure | 148 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 116 insertions(+), 56 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index 99074bd1bc5..f8e4c2bcce3 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -50,9 +50,6 @@ along with GNU Emacs. If not, see . */ /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T -/* Define if FIONREAD should not be used. */ -#undef BROKEN_FIONREAD - /* Define if getwd should not be used. */ #undef BROKEN_GETWD @@ -65,18 +62,6 @@ along with GNU Emacs. If not, see . */ /* Define if SA_RESTART should only be used in batch mode. */ #undef BROKEN_SA_RESTART -/* Define if SIGAIO should not be used. */ -#undef BROKEN_SIGAIO - -/* Define if SIGIO should not be used. */ -#undef BROKEN_SIGIO - -/* Define if SIGPOLL should not be used. */ -#undef BROKEN_SIGPOLL - -/* Define if SIGPTY should not be used. */ -#undef BROKEN_SIGPTY - /* Define if the system is compatible with BSD 4.2. */ #undef BSD4_2 @@ -1166,9 +1151,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O -/* Define if termio.h should not be included. */ -#undef NO_TERMIO - /* Minimum value of NSIG. */ #undef NSIG_MINIMUM @@ -1353,6 +1335,12 @@ along with GNU Emacs. If not, see . */ /* Define if the system has Unix98 PTYs. */ #undef UNIX98_PTYS +/* Define to 1 if FIONREAD is usable. */ +#undef USABLE_FIONREAD + +/* Define to 1 if SIGIO is usable. */ +#undef USABLE_SIGIO + /* How to get a user's full name. */ #undef USER_FULL_NAME diff --git a/autogen/configure b/autogen/configure index 5f4013e4b88..25391a0469e 100755 --- a/autogen/configure +++ b/autogen/configure @@ -2062,8 +2062,8 @@ Optional Packages: string giving default POP mail host --without-sound don't compile with sound support --without-sync-input process async input synchronously - --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3, - lucid or athena, motif, no) + --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, + gtk3, lucid or athena, motif, no) --with-wide-int prefer wide Emacs integers (typically 62-bit) --without-xpm don't compile with XPM image support --without-jpeg don't compile with JPEG image support @@ -3956,11 +3956,13 @@ if test "${with_x_toolkit+set}" = set; then : a | at | ath | athe | athen | athena ) val=athena ;; m | mo | mot | moti | motif ) val=motif ;; g | gt | gtk ) val=gtk ;; + gtk2 ) val=gtk2 ;; gtk3 ) val=gtk3 ;; * ) as_fn_error "\`--with-x-toolkit=$withval' is invalid; -this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or -\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 +this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk', +\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms. +\`athena' and \`lucid' are synonyms." "$LINENO" 5 ;; esac with_x_toolkit=$val @@ -9562,6 +9564,9 @@ case "${window_system}" in gtk ) with_gtk=yes term_header=gtkutil.h USE_X_TOOLKIT=none ;; + gtk2 ) with_gtk2=yes + term_header=gtkutil.h + USE_X_TOOLKIT=none ;; gtk3 ) with_gtk3=yes term_header=gtkutil.h USE_X_TOOLKIT=none ;; @@ -10511,7 +10516,9 @@ fi HAVE_GTK=no GTK_OBJ= -if test "${with_gtk3}" = "yes"; then +check_gtk2=no +gtk3_pkg_errors= +if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then GLIB_REQUIRED=2.28 GTK_REQUIRED=3.0 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" @@ -10566,19 +10573,22 @@ $as_echo "no" >&6; } pkg_check_gtk=no fi - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then + if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 fi + if test "$pkg_check_gtk" = "yes"; then $as_echo "#define HAVE_GTK3 1" >>confdefs.h - GTK_OBJ=emacsgtkfixed.o - term_header=gtkutil.h + GTK_OBJ=emacsgtkfixed.o + term_header=gtkutil.h + else + check_gtk2=yes + gtk3_pkg_errors="$GTK_PKG_ERRORS " + fi fi -if test "$pkg_check_gtk" != "yes"; then - HAVE_GTK=no -if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then +if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then GLIB_REQUIRED=2.10 GTK_REQUIRED=2.10 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" @@ -10633,11 +10643,12 @@ $as_echo "no" >&6; } pkg_check_gtk=no fi - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 + if test "$pkg_check_gtk" = "no"; then + if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then + as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 + fi fi fi -fi if test x"$pkg_check_gtk" = xyes; then @@ -11161,8 +11172,6 @@ HAVE_XAW3D=no LUCID_LIBW= if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 -$as_echo_n "checking for xaw3d... " >&6; } if test "${emacs_cv_xaw3d+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -11233,6 +11242,8 @@ fi emacs_cv_xaw3d=no fi if test $emacs_cv_xaw3d = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 +$as_echo_n "checking for xaw3d... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 $as_echo "yes; using Lucid toolkit" >&6; } USE_X_TOOLKIT=LUCID @@ -11242,6 +11253,8 @@ $as_echo "yes; using Lucid toolkit" >&6; } $as_echo "#define HAVE_XAW3D 1" >>confdefs.h else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 +$as_echo_n "checking for xaw3d... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 @@ -14891,12 +14904,6 @@ esac case $opsys in - darwin | gnu | hpux* | *bsd ) - -$as_echo "#define NO_TERMIO 1" >>confdefs.h - - ;; - irix6-5 | sol2* | unixware ) $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h @@ -14904,29 +14911,15 @@ $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h ;; esac +emacs_broken_SIGIO=no case $opsys in hpux* | irix6-5 | openbsd | sol2* | unixware ) - -$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h - + emacs_broken_SIGIO=yes ;; aix4-2) -$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h - - -$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h - - -$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h - - -$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h - - - $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h ;; @@ -15637,6 +15630,85 @@ $as_echo "#define SOLARIS2 /**/" >>confdefs.h ;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5 +$as_echo_n "checking for usable FIONREAD... " >&6; } +if test "${emacs_cv_usable_FIONREAD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $opsys in + aix4-2) + emacs_cv_usable_FIONREAD=no + ;; + + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #ifdef USG5_4 + # include + #endif + +int +main () +{ +int foo = ioctl (0, FIONREAD, &foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_usable_FIONREAD=yes +else + emacs_cv_usable_FIONREAD=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5 +$as_echo "$emacs_cv_usable_FIONREAD" >&6; } +if test $emacs_cv_usable_FIONREAD = yes; then + +$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h + + + if test $emacs_broken_SIGIO = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5 +$as_echo_n "checking for usable SIGIO... " >&6; } +if test "${emacs_cv_usable_SIGIO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +int foo = SIGIO | F_SETFL | FASYNC; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_usable_SIGIO=yes +else + emacs_cv_usable_SIGIO=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5 +$as_echo "$emacs_cv_usable_SIGIO" >&6; } + if test $emacs_cv_usable_SIGIO = yes; then + +$as_echo "#define USABLE_SIGIO 1" >>confdefs.h + + fi + fi +fi + case $opsys in cygwin) From 5e2b4ce123bf042b3b719b1f776cce3e4db7eadf Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 13 Sep 2012 11:14:30 +0000 Subject: [PATCH 161/216] gnus-art.el (gnus-article-stop-animations): Use gnus-timer--function that is an alias to timer--function --- lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-util.el | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3f69a84db88..69f0025b524 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2012-09-13 Katsumi Yamaoka + + * gnus-util.el (gnus-timer--function): New function. + + * gnus-art.el (gnus-article-stop-animations): Use it. + 2012-09-13 Paul Eggert Fix glitches caused by addition of psec to timers. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 4dc004f04d4..7dcbd61316f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4554,7 +4554,7 @@ commands: (defun gnus-article-stop-animations () (dolist (timer (and (boundp 'timer-list) timer-list)) - (when (eq (timer--function timer) 'image-animate-timeout) + (when (eq (gnus-timer--function timer) 'image-animate-timeout) (cancel-timer timer)))) (defun gnus-stop-downloads () diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 4c5eabab723..f5e1077f8c4 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1964,6 +1964,11 @@ definitions to shadow the loaded ones for use in file byte-compilation." (defun gnus-bound-and-true-p (sym) (and (boundp sym) (symbol-value sym))) +(if (fboundp 'timer--function) + (defalias 'gnus-timer--function 'timer--function) + (defun gnus-timer--function (timer) + (elt timer 5))) + (provide 'gnus-util) ;;; gnus-util.el ends here From fc0c31f839de077683acaf4e3f9ff9643d468f5f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 13 Sep 2012 13:42:18 +0200 Subject: [PATCH 162/216] Fix typos in ChangeLogs. --- lisp/ChangeLog | 27 +++++++++++++-------------- src/ChangeLog | 30 +++++++++++++++--------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1bb8f913c20..af91cfffba4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -96,16 +96,16 @@ 2012-09-11 Bastien Guerry * subr.el (set-temporary-overlay-map): Add a docstring. - (bug#12346) + (Bug#12346) 2012-09-11 Bastien Guerry * minibuffer.el (completion-table-subvert): Fix docstring. - (bug#12347) + (Bug#12347) 2012-09-11 Bastien Guerry - * help-fns.el (describe-variable): Fix typo. (bug#12346) + * help-fns.el (describe-variable): Fix typo. (Bug#12346) 2012-09-10 Michael R. Mauger @@ -125,9 +125,8 @@ 2012-09-10 Stefan Monnier * emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var. - (emacs-lisp-byte-code-comment) - (emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode): - New functions. + (emacs-lisp-byte-code-comment, emacs-lisp-byte-code-syntax-propertize) + (emacs-lisp-byte-code-mode): New functions. (eval-sexp-add-defvars): Don't skip defvars in column >0. (eval-defun-2): Remove bogus interactive spec. (lisp-indent-line): Remove redundant whole-exp code, now done in @@ -1614,7 +1613,7 @@ * calc-mode.el (calc-basic-simplification-mode): Rename from `calc-limited-simplification-mode'. (calc-alg-simplification-mode): New function. - (calc-set-simplify-mode): Adjust message. + (calc-set-simplify-mode): Adjust message. * calc.el (calc-set-mode-line): Adjust mode line display for basic simplification mode. @@ -1812,7 +1811,7 @@ * notifications.el (notifications-on-action-signal) (notifications-on-closed-signal): Use also the bus address for the map. (notifications-notify, notifications-close-notification) - (notifications-get-capabilities): Add optional argument BUS. + (notifications-get-capabilities): Add optional argument BUS. 2012-07-27 Tassilo Horn @@ -1932,7 +1931,7 @@ ses-cell-set-formula or ses-set-cell to change the cell and handle the undo at the same time, but rather use lower level new macros `ses-cell-formula-aset' and `ses-cell-references-aset' and handle - the undo directly. Refresh the mode line. + the undo directly. Refresh the mode line. 2012-07-21 Leo Liu @@ -5348,13 +5347,13 @@ * progmodes/verilog-mode.el (font-lock-keywords): Fix mis-highligting auto. Reported by Craig Barner. (verilog-auto, verilog-auto-undef): Add AUTOUNDEF to remove - defines from global name space. Reported by Dan Dever. + defines from global name space. Reported by Dan Dever. (verilog-auto-reset, verilog-auto-reset-widths) (verilog-auto-tieoff): Support using unbased numbers for AUTORESET and AUTOTIEOFF. (verilog-submit-bug-report): Update variable list. (verilog-read-auto-params): Fix AUTOINPUT regexps containing - parenthesis from not matching. Reported by Michael Rytting. + parenthesis from not matching. Reported by Michael Rytting. (verilog-auto-template-lint): Fix hash error when linting modules with no used templates. (verilog-warn, verilog-warn-error) @@ -5364,12 +5363,12 @@ (verilog-read-auto-template): Add `verilog-auto-template-warn-unused' to report unused template errors. Reported by Brad Dobbie. (verilog-read-decls): Fix AUTOWIRE etc on supply0, supply1 type - nets, bug438. Reported by Vns Blore. + nets, bug438. Reported by Vns Blore. (verilog-auto-inout-module, verilog-auto-reg) (verilog-read-decls, verilog-read-sub-decls-sig) (verilog-signals-edit-wire-reg, verilog-signals-with): Fix passing of Verilog data types in ANSI input/output ports - such as "output logic" into the AUTOs. Special case "wire" and + such as "output logic" into the AUTOs. Special case "wire" and "reg" for backwards compatibility presuming Verilog 2001. (verilog-auto-ascii-enum): Add "auto enum" as alias. (verilog-preprocess): Fix replication of preprocess output. @@ -5390,7 +5389,7 @@ (verilog-read-decls): Fix 'parameter type' not appearing in AUTOINSTPARAM, bug340. Reported by Jonathan Greenlaw. (verilog-auto-logic): Fix when AUTOLOGIC present to properly do - AUTOINPUTs, bug411. Reported by Jonathan Greenlaw. + AUTOINPUTs, bug411. Reported by Jonathan Greenlaw. (verilog-read-auto-lisp): Avoid syntax-ppss warning on AUTOLISP. Reported by David Kravitz. diff --git a/src/ChangeLog b/src/ChangeLog index 90f3fc33b59..153a0b59c62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -287,7 +287,7 @@ (ns_maybe_dumpglyphs_background): Remove fringe/internal border adjustment. (ns_dumpglyphs_image): Ditto. - (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal + (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal border adjustment. (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and their usage. Add fringe_extended_p and its use as in other terms. @@ -368,7 +368,7 @@ * conf_post.h [SIGNAL_H_AHB]: Do not include ; no longer needed here. * emacs.c (main): Inspect existing signal handler with sigaction, - so that there's no need to block and unblock SIGHUP. + so that there's no need to block and unblock SIGHUP. * sysdep.c (struct save_signal): New member 'action', replacing old member 'handler'. (save_signal_handlers, restore_signal_handlers): @@ -895,18 +895,18 @@ 2012-08-28 Jan Djärv * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize - button_values to NULL. Call setStykeMask so dialogs get a close button. + button_values to NULL. Call setStykeMask so dialogs get a close button. (windowShouldClose:): Set window_closed. (dealloc): New member, free button_values. - (process_dialog:): Make member function. Remove window argument, - replace window with self. Count buttons and allocate and store values + (process_dialog:): Make member function. Remove window argument, + replace window with self. Count buttons and allocate and store values in button_values. (addButton:value:row:): value is int with the name tag. Call setTag - with tag. Remove return self, declare return value as void. + with tag. Remove return self, declare return value as void. (addString:row:): Remove return self, declare return value as void. (addSplit): Remove return self, declare return value as void. (clicked:): Remove return self, declare return value as void. - Set dialog_return to button_values[seltag]. Code formatting change. + Set dialog_return to button_values[seltag]. Code formatting change. (initFromContents:isQuestion:): Adjust call to process_dialog. Code formatting change. (timeout_handler:): Set timer_fired to YES. @@ -1241,7 +1241,7 @@ * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. Otherwise, the compiler complains about (A?B:C) where B is void - and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. + and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. (fontset_add): Return void, for FONTSET_ADD. 2012-08-21 Paul Eggert @@ -1757,7 +1757,7 @@ Start main loop and wait for application defined event. Inform select thread to stop selecting after main loop is exited. (ns_term_init): Create selfds pipe and set non-blocking. - Initialize select_mutex. Start the select thread (fd_handler). + Initialize select_mutex. Start the select thread (fd_handler). (fd_handler:): Loop forever, wait for info from the main thread to either start or stop selecting. When select returns, send and appdefined event. @@ -1889,7 +1889,7 @@ (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info if not present. (update_frame_tool_bar): Return early if data in xg_frame_tb_info - is up to date. Otherwise store new data. + is up to date. Otherwise store new data. (free_frame_tool_bar): Free xg_frame_tb_info if present. 2012-08-13 Dmitry Antipov @@ -1916,7 +1916,7 @@ 2012-08-11 Jan Djärv * nsterm.m (not_in_argv): New function. - (application:openFile, application:openTempFile:): + (application:openFile, application:openTempFile:): (application:openFileWithoutUI:, application:openFiles:): Open file if not_in_argv returns non-zero (bug#12171). @@ -3103,7 +3103,7 @@ 2012-07-21 Jan Djärv - * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). + * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). (conversationIdentifier): Return value is NSInteger. * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA. @@ -5613,7 +5613,7 @@ * lisp.h (struct vectorlike_header): New field `nbytes', adjust comment accordingly. * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK' - to denote vector blocks. Adjust users (live_vector_p, + to denote vector blocks. Adjust users (live_vector_p, mark_maybe_pointer, valid_lisp_object_p) accordingly. (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES), @@ -5627,7 +5627,7 @@ (allocate_vector_from_block, init_vectors, allocate_vector_from_block) (sweep_vectors): New functions. (allocate_vectorlike): Return `zero_vector' as the only vector of - 0 items. Allocate new vector from block if vector size is less than + 0 items. Allocate new vector from block if vector size is less than or equal to VBLOCK_BYTES_MAX. (Fgarbage_collect): Move all vector sweeping code to sweep_vectors. (init_alloc_once): Add call to init_vectors. @@ -5717,7 +5717,7 @@ change it's type from Lisp_Object to bitfield. Change type of 'force_start', 'optional_new_start', 'last_had_star', 'update_mode_line' and 'start_at_line_beg' - fields from Lisp_Object to bitfield. Adjust users accordingly. + fields from Lisp_Object to bitfield. Adjust users accordingly. 2012-05-31 Paul Eggert From 4d0b77fc572d0b8e834f5241f39f1b4ce2e6bd63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 13 Sep 2012 14:02:00 +0200 Subject: [PATCH 163/216] * configure.ac: Report Gtk+ 3 as GTK. --- ChangeLog | 1 + configure.ac | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07558742e86..e46fbef7113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2012-09-13 Jan Djärv * configure.ac: Reorder Xaw3d messages. + Report Gtk+ 3 as GTK. 2012-09-13 Paul Eggert diff --git a/configure.ac b/configure.ac index a6395dc18c2..ce65f07522d 100644 --- a/configure.ac +++ b/configure.ac @@ -4384,11 +4384,7 @@ End: #### It makes printing result more understandable as using GTK sets #### toolkit_scroll_bars to yes by default. if test "${HAVE_GTK}" = "yes"; then - if test "${with_gtk3}" = "yes"; then - USE_X_TOOLKIT=GTK3 - else - USE_X_TOOLKIT=GTK - fi + USE_X_TOOLKIT=GTK fi echo " From d607d303028dca3d7d6ba21b4013f08dd2b0a1d6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 14 Sep 2012 00:21:58 +0900 Subject: [PATCH 164/216] language/chinese.el ("Chinese-GB", "Chinese-BIG5", "Chinese-CNS", "Chinese-EUC-TW"): Add chinese-gbk to coding-priority property of these language environment. --- lisp/ChangeLog | 6 ++++++ lisp/language/chinese.el | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af91cfffba4..6b132bb9134 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-13 Kenichi Handa + + * language/chinese.el ("Chinese-GB", "Chinese-BIG5") + ("Chinese-CNS", "Chinese-EUC-TW"): Add chinese-gbk to + `coding-priority' property of these language environment. + 2012-09-13 Paul Eggert Fix glitches caused by addition of psec to timers (Bug#12430). diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index ac2afa373c4..782b5a363ad 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el @@ -110,7 +110,8 @@ (use-cjk-char-width-table 'zh_CN))) (exit-function . use-default-char-width-table) (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) - (coding-priority chinese-iso-8bit chinese-big5 iso-2022-cn) + (coding-priority chinese-iso-8bit chinese-gbk chinese-big5 + iso-2022-cn) (input-method . "chinese-py-punct") (features china-util) (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") @@ -140,7 +141,8 @@ (use-cjk-char-width-table 'zh_HK))) (exit-function . use-default-char-width-table) (coding-system chinese-big5 chinese-iso-7bit) - (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit) + (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit + chinese-gbk) (input-method . "chinese-py-punct-b5") (ctext-non-standard-encodings "big5-0") (features china-util) @@ -196,7 +198,7 @@ (exit-function . use-default-char-width-table) (coding-system iso-2022-cn euc-tw) (coding-priority iso-2022-cn euc-tw chinese-big5 - chinese-iso-8bit) + chinese-iso-8bit chinese-gbk) (features china-util) (input-method . "chinese-cns-quick") ;; Fixme: presumably it won't accept big5 now. @@ -216,7 +218,7 @@ accepts Big5 for input also (which is then converted to CNS).")) (exit-function . use-default-char-width-table) (coding-system euc-tw iso-2022-cn) (coding-priority euc-tw chinese-big5 iso-2022-cn - chinese-iso-8bit) + chinese-iso-8bit chinese-gbk) (features china-util) (input-method . "chinese-cns-quick") (documentation . "\ From c18e885bdd2607ec1784c3e1585e581459408932 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 13 Sep 2012 09:23:06 -0700 Subject: [PATCH 165/216] Use a more backwards-compatible timer format. * etc/NEWS: Document it. * lisp/emacs-lisp/timer.el (timer): PSECS is now at the end, rather than being right after USECS, as that better supports old code that inadvisedly looked directly at the timer vector. * src/keyboard.c (decode_timer): Get PSECS from the 8th (origin-0) vector element, not from the 4th, since PSECS is now at the end. (Fcurrent_idle_time): Doc fix. Fixes: debbugs:12430 --- etc/ChangeLog | 5 +++++ etc/NEWS | 2 +- lisp/ChangeLog | 7 +++++++ lisp/emacs-lisp/timer.el | 6 +++--- src/ChangeLog | 7 +++++++ src/keyboard.c | 4 ++-- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 26e9ada74da..66c229eaf78 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2012-09-13 Paul Eggert + + Use a more backwards-compatible timer format (Bug#12430). + * NEWS: Document it, plus fix a typo. + 2012-09-13 Jan Djärv * NEWS (--with-x-toolkit): Mention that Gtk+ 3 is now default. diff --git a/etc/NEWS b/etc/NEWS index cbf13c2e87d..4c6ceae1688 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -110,7 +110,7 @@ file-attributes and format-time-string, have been changed accordingly. Old-format time stamps are still accepted. ** The format of timers in timer-list and timer-idle-list is now -[HIGH-SECONDS LOW-SECONDS USECS PSECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY]. +[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. The PSECS slot is new, and uses picosecond resolution. It can be accessed via the new timer--psecs accessor. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b132bb9134..5e51c67e8e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-09-13 Paul Eggert + + Use a more backwards-compatible timer format (Bug#12430). + * emacs-lisp/timer.el (timer): PSECS is now at the end, rather than + being right after USECS, as that better supports old code that + inadvisedly looked directly at the timer vector. + 2012-09-13 Kenichi Handa * language/chinese.el ("Chinese-GB", "Chinese-BIG5") diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index a66d5972d82..2248dde8c03 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -28,8 +28,8 @@ ;;; Code: ;; Layout of a timer vector: -;; [triggered-p high-seconds low-seconds usecs psecs repeat-delay -;; function args idle-delay] +;; [triggered-p high-seconds low-seconds usecs repeat-delay +;; function args idle-delay psecs] ;; triggered-p is nil if the timer is active (waiting to be triggered), ;; t if it is inactive ("already triggered", in theory) @@ -42,7 +42,7 @@ (:type vector) (:conc-name timer--)) (triggered t) - high-seconds low-seconds usecs psecs repeat-delay function args idle-delay) + high-seconds low-seconds usecs repeat-delay function args idle-delay psecs) (defun timerp (object) "Return t if OBJECT is a timer." diff --git a/src/ChangeLog b/src/ChangeLog index 153a0b59c62..a7fe68646d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-09-13 Paul Eggert + + Use a more backwards-compatible timer format (Bug#12430). + * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0) + vector element, not from the 4th, since PSECS is now at the end. + (Fcurrent_idle_time): Doc fix. + 2012-09-13 Dmitry Antipov Function to mark objects and remove killed buffers at once. diff --git a/src/keyboard.c b/src/keyboard.c index aec9028ae94..45638bc412b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4330,7 +4330,7 @@ decode_timer (Lisp_Object timer, EMACS_TIME *result) if (! NILP (vector[0])) return 0; - return decode_time_components (vector[1], vector[2], vector[3], vector[4], + return decode_time_components (vector[1], vector[2], vector[3], vector[8], result, 0); } @@ -4532,7 +4532,7 @@ in the same style as (current-time). The value when Emacs is not idle is nil. -NSEC is a multiple of the system clock resolution. */) +PSEC is a multiple of the system clock resolution. */) (void) { if (EMACS_TIME_VALID_P (timer_idleness_start_time)) From b9800ec43b3e7f17cde08dc890afa690185cf9aa Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 13 Sep 2012 14:23:33 -0400 Subject: [PATCH 166/216] * lisp/vc/vc.el: No need to require ediff. (ediff-load-version-control): Declare. (ediff-vc-internal): Fix declaration. (vc-version-ediff): Require ediff. --- lisp/ChangeLog | 7 +++++++ lisp/vc/vc.el | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5e51c67e8e8..62ba7017163 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-09-13 Glenn Morris + + * vc/vc.el: No need to require ediff. + (ediff-load-version-control): Declare. + (ediff-vc-internal): Fix declaration. + (vc-version-ediff): Require ediff. + 2012-09-13 Paul Eggert Use a more backwards-compatible timer format (Bug#12430). diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1ef4faaa008..47800bd4aac 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -653,7 +653,6 @@ (require 'vc-hooks) (require 'vc-dispatcher) -(require 'ediff) (declare-function diff-setup-whitespace "diff-mode" ()) @@ -1698,7 +1697,9 @@ saving the buffer." (vc-diff-internal t (vc-deduce-fileset t) nil nil (called-interactively-p 'interactive)))) -(declare-function ediff-vc-internal (rev1 rev2 &optional startup-hooks)) +(declare-function ediff-load-version-control "ediff" (&optional silent)) +(declare-function ediff-vc-internal "ediff-vers" + (rev1 rev2 &optional startup-hooks)) ;;;###autoload (defun vc-version-ediff (files rev1 rev2) @@ -1719,7 +1720,8 @@ repository history using ediff." ;; FIXME We only support running ediff on one file for now. ;; We could spin off an ediff session per file in the file set. ((= (length files) 1) - (ediff-load-version-control) + (require 'ediff) + (ediff-load-version-control) ; loads ediff-vers (find-file (car files)) ;FIXME: find-file from Elisp is bad. (ediff-vc-internal rev1 rev2 nil)) (t From 6a2e6868361c901f5c93f45df84622a1a9dbb889 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 13 Sep 2012 14:41:21 -0400 Subject: [PATCH 167/216] Update some function declarations * lisp/calc/calc-ext.el (math-compose-expr): * lisp/calc/calc.el (math-compose-expr): * lisp/progmodes/cc-defs.el (cl-macroexpand-all): * lisp/progmodes/cc-langs.el (delete-duplicates, mapcan) (cl-macroexpand-all): Update declarations. --- lisp/ChangeLog | 6 ++++++ lisp/calc/calc-ext.el | 2 +- lisp/calc/calc.el | 2 +- lisp/progmodes/cc-defs.el | 2 +- lisp/progmodes/cc-langs.el | 7 ++++--- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62ba7017163..c5c0c474940 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2012-09-13 Glenn Morris + * calc/calc.el (math-compose-expr): + * calc/calc-ext.el (math-compose-expr): + * progmodes/cc-defs.el (cl-macroexpand-all): + * progmodes/cc-langs.el (delete-duplicates, mapcan) + (cl-macroexpand-all): Update declarations. + * vc/vc.el: No need to require ediff. (ediff-load-version-control): Declare. (ediff-vc-internal): Fix declaration. diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 7089070df59..2fd5ad6fd9c 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -61,7 +61,7 @@ (declare-function math-vector-is-string "calccomp" (a)) (declare-function math-vector-to-string "calccomp" (a &optional quoted)) (declare-function math-format-radix-float "calc-bin" (a prec)) -(declare-function math-compose-expr "calccomp" (a prec)) +(declare-function math-compose-expr "calccomp" (a prec &optional div)) (declare-function math-abs "calc-arith" (a)) (declare-function math-format-bignum-binary "calc-bin" (a)) (declare-function math-format-bignum-octal "calc-bin" (a)) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 3e6ae1c7404..17f0998d30b 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -199,7 +199,7 @@ (declare-function calc-div-fractions "calc-frac" (a b)) (declare-function math-div-objects-fancy "calc-arith" (a b)) (declare-function math-div-symb-fancy "calc-arith" (a b)) -(declare-function math-compose-expr "calccomp" (a prec)) +(declare-function math-compose-expr "calccomp" (a prec &optional div)) (declare-function math-comp-width "calccomp" (c)) (declare-function math-composition-to-string "calccomp" (c &optional width)) (declare-function math-stack-value-offset-fancy "calccomp" ()) diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 8bccb44f308..0dc596a472b 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1829,7 +1829,7 @@ itself is evaluated." (eval form)) ;; Only used at compile time - suppress "might not be defined at runtime". -(declare-function cl-macroexpand-all "cl-extra" (form &optional env)) +(declare-function cl-macroexpand-all "cl" (form &optional env)) (defmacro c-lang-defconst (name &rest args) "Set the language specific values of the language constant NAME. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 78be8ac2cc4..d5a1be572ba 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -208,9 +208,10 @@ the evaluated constant value at compile time." ;; Suppress "might not be defined at runtime" warning. ;; This file is only used when compiling other cc files. -(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys)) -(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest)) -(declare-function cl-macroexpand-all "cl-extra" (form &optional env)) +;; These are defined in cl as aliases to the cl- versions. +(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t) +(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t) +(declare-function cl-macroexpand-all "cl" (form &optional env)) (eval-and-compile ;; Some helper functions used when building the language constants. From 5b68b3331582c5ee6d49480e5e84c639a4848fec Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 14 Sep 2012 02:42:39 +0300 Subject: [PATCH 168/216] * lisp/dired-aux.el (dired-do-chxxx): Use `eq' to detect empty input. Fixes: debbugs:12399 --- lisp/ChangeLog | 5 +++++ lisp/dired-aux.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c5c0c474940..15039358559 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-13 Juri Linkov + + * dired-aux.el (dired-do-chxxx): Use `eq' to detect empty input. + (Bug#12399) + 2012-09-13 Glenn Morris * calc/calc.el (math-compose-expr): diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 1f8e8068de3..b42df954fe5 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -244,7 +244,10 @@ List has a form of (file-name full-file-name (attribute-list))." (function dired-check-process) (append (list operation program) - (unless (string-equal new-attribute "") + (unless (or (string-equal new-attribute "") + ;; Use `eq' instead of `equal' + ;; to detect empty input (bug#12399). + (eq new-attribute default)) (if (eq op-symbol 'touch) (list "-t" new-attribute) (list new-attribute))) From fe5979317f5369ccb9e43f06d0a7dc5e3314f98f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 14 Sep 2012 03:09:22 +0200 Subject: [PATCH 169/216] nt/config.nt: Sync with autogen/config.in. (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL) (BROKEN_SIGPTY, HAVE_CBRT, HAVE_LOGB, NO_TERMIO): Remove. (USABLE_FIONREAD, USABLE_SIGIO): New macros. --- nt/ChangeLog | 7 +++++++ nt/config.nt | 30 ++++++------------------------ 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 49da46ad946..54e5570072a 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,10 @@ +2012-09-14 Juanma Barranquero + + * config.nt: Sync with autogen/config.in. + (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL) + (BROKEN_SIGPTY, HAVE_CBRT, HAVE_LOGB, NO_TERMIO): Remove. + (USABLE_FIONREAD, USABLE_SIGIO): New macros. + 2012-09-10 Juanma Barranquero * config.nt: Sync with autogen/config.in. diff --git a/nt/config.nt b/nt/config.nt index ee62b6d2242..5121a013aad 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -54,9 +54,6 @@ along with GNU Emacs. If not, see . */ /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T -/* Define if FIONREAD should not be used. */ -#undef BROKEN_FIONREAD - /* Define if getwd should not be used. */ #undef BROKEN_GETWD @@ -69,18 +66,6 @@ along with GNU Emacs. If not, see . */ /* Define if SA_RESTART should only be used in batch mode. */ #undef BROKEN_SA_RESTART -/* Define if SIGAIO should not be used. */ -#undef BROKEN_SIGAIO - -/* Define if SIGIO should not be used. */ -#undef BROKEN_SIGIO - -/* Define if SIGPOLL should not be used. */ -#undef BROKEN_SIGPOLL - -/* Define if SIGPTY should not be used. */ -#undef BROKEN_SIGPTY - /* Define if the system is compatible with BSD 4.2. */ #undef BSD4_2 @@ -252,9 +237,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if strtold conforms to C99. */ #undef HAVE_C99_STRTOLD -/* Define to 1 if you have the `cbrt' function. */ -#undef HAVE_CBRT - /* Define to 1 if you have the `cfmakeraw' function. */ #undef HAVE_CFMAKERAW @@ -647,9 +629,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R -/* Define to 1 if you have the `logb' function. */ -#define HAVE_LOGB 1 - /* Define to 1 if you support file names longer than 14 characters. */ #define HAVE_LONG_FILE_NAMES 1 @@ -1182,9 +1161,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O -/* Define if termio.h should not be included. */ -#undef NO_TERMIO - /* Minimum value of NSIG. */ #undef NSIG_MINIMUM @@ -1369,6 +1345,12 @@ along with GNU Emacs. If not, see . */ /* Define if the system has Unix98 PTYs. */ #undef UNIX98_PTYS +/* Define to 1 if FIONREAD is usable. */ +#define USABLE_FIONREAD 1 + +/* Define to 1 if SIGIO is usable. */ +#undef USABLE_SIGIO + /* How to get a user's full name. */ #define USER_FULL_NAME pw->pw_gecos From 2a7931e3548f730ca1abdc489cc0575a6c4e7cab Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 14 Sep 2012 03:22:21 +0200 Subject: [PATCH 170/216] src/makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies. --- src/ChangeLog | 4 ++++ src/makefile.w32-in | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a7fe68646d0..0f741c5c4cf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-14 Juanma Barranquero + + * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies. + 2012-09-13 Paul Eggert Use a more backwards-compatible timer format (Bug#12430). diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 7b9c67bf135..24ecb2676da 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -482,7 +482,6 @@ WINDOW_H = $(SRC)/window.h \ $(BLD)/alloc.$(O) : \ $(SRC)/alloc.c \ $(SRC)/puresize.h \ - $(SRC)/syssignal.h \ $(SRC)/w32.h \ $(NT_INC)/unistd.h \ $(GNU_LIB)/verify.h \ From 2de39f089a464cc265b6c583684226d1a94abbfa Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 13 Sep 2012 23:55:16 -0400 Subject: [PATCH 171/216] * lisp/emacs-lisp/edebug.el: Miscellaneous cleanup. Remove obsolete byte-compiler hack that tried to silence some warnings. (edebug-submit-bug-report): Remove. (edebug-get-buffer-window, edebug-sit-for, edebug-input-pending-p): Remove aliases, use the un-prefixed name instead. (edebug-pop-to-buffer): Consider other frames. (edebug-original-read):: Make it more obvious that it's always defined. (edebug--make-form-data-entry, edebug--form-data-name) (edebug--form-data-begin, edebug--form-data-end): Rename from the single-dashed name, and implement with cl-defstruct. (edebug-set-form-data-entry): Use the standard accessors. (edebug-make-top-form-data-entry): Use push. (edebug-no-match): Drop useless `funcall'. (mapcar, mapconcat, mapatoms, apply, funcall): Don't add debug specs to functions. (defsubst, dont-compile, eval-when-compile, eval-and-compile) (delay-mode-hooks, with-temp-file, with-temp-message, ad-dolist) (with-syntax-table, push, pop, 1value, noreturn, defadvice) (easy-menu-define, with-custom-print): Remove redundant specs. (edebug-outside-overriding-local-map) (edebug-outside-overriding-terminal-local-map): Remove, unused. (edebug--display): Bind unread-command-events directly to nil rather than binding it to unread-command-events and later setting it to nil. (edebug--display): Kill edebug-eval-buffer here... (edebug--recursive-edit): ...rather than here. Bind standard-output and standard-input. (edebug-eval): Check cl-macroexpand-all is fboundp. (edebug-temp-display-freq-count): Fix last change. * lisp/emacs-lisp/easymenu.el (easy-menu-define): Add `debug' spec. * lisp/subr.el (noreturn, 1value): Add `debug' spec. * lisp/emacs-lisp/advice.el: Require cl-lib. (ad-copy-tree): Remove, use copy-tree instead. (ad-dolist): Remove use dolist or cl-dolist instead. (ad-do-return): Remove, use cl-return instead. (defadvice): Add `debug' spec. --- lisp/ChangeLog | 39 ++++++ lisp/dired.el | 2 +- lisp/emacs-lisp/advice.el | 183 ++++++++++--------------- lisp/emacs-lisp/easymenu.el | 2 +- lisp/emacs-lisp/edebug.el | 261 +++++++++--------------------------- lisp/subr.el | 2 + 6 files changed, 180 insertions(+), 309 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15039358559..7163b4b4989 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,42 @@ +2012-09-14 Stefan Monnier + + * emacs-lisp/edebug.el: Miscellaneous cleanup. + Remove obsolete byte-compiler hack that tried to silence some warnings. + (edebug-submit-bug-report): Remove. + (edebug-get-buffer-window, edebug-sit-for, edebug-input-pending-p): + Remove aliases, use the un-prefixed name instead. + (edebug-pop-to-buffer): Consider other frames. + (edebug-original-read):: Make it more obvious that it's always defined. + (edebug--make-form-data-entry, edebug--form-data-name) + (edebug--form-data-begin, edebug--form-data-end): Rename from the + single-dashed name, and implement with cl-defstruct. + (edebug-set-form-data-entry): Use the standard accessors. + (edebug-make-top-form-data-entry): Use push. + (edebug-no-match): Drop useless `funcall'. + (mapcar, mapconcat, mapatoms, apply, funcall): Don't add debug specs + to functions. + (defsubst, dont-compile, eval-when-compile, eval-and-compile) + (delay-mode-hooks, with-temp-file, with-temp-message, ad-dolist) + (with-syntax-table, push, pop, 1value, noreturn, defadvice) + (easy-menu-define, with-custom-print): Remove redundant specs. + (edebug-outside-overriding-local-map) + (edebug-outside-overriding-terminal-local-map): Remove, unused. + (edebug--display): Bind unread-command-events directly to nil rather + than binding it to unread-command-events and later setting it to nil. + (edebug--display): Kill edebug-eval-buffer here... + (edebug--recursive-edit): ...rather than here. + Bind standard-output and standard-input. + (edebug-eval): Check cl-macroexpand-all is fboundp. + (edebug-temp-display-freq-count): Fix last change. + + * emacs-lisp/easymenu.el (easy-menu-define): Add `debug' spec. + * subr.el (noreturn, 1value): Add `debug' spec. + * emacs-lisp/advice.el: Require cl-lib. + (ad-copy-tree): Remove, use copy-tree instead. + (ad-dolist): Remove use dolist or cl-dolist instead. + (ad-do-return): Remove, use cl-return instead. + (defadvice): Add `debug' spec. + 2012-09-13 Juri Linkov * dired-aux.el (dired-do-chxxx): Use `eq' to detect empty input. diff --git a/lisp/dired.el b/lisp/dired.el index f4ae027181a..ebc8f5da6d5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3744,7 +3744,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "4b260eda371d319a6c8e8e5ec917e287") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "22ce64daa7ccb5698cb6b1279aa59ec2") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index cac76d2bce1..f0d277a3f69 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -1,4 +1,4 @@ -;;; advice.el --- an overloading mechanism for Emacs Lisp functions +;;; advice.el --- An overloading mechanism for Emacs Lisp functions ;; Copyright (C) 1993-1994, 2000-2012 Free Software Foundation, Inc. @@ -1746,7 +1746,7 @@ (provide 'advice-preload) ;; During a normal load this is a noop: (require 'advice-preload "advice.el") - +(eval-when-compile (require 'cl-lib)) ;; @@ Variable definitions: ;; ======================== @@ -1812,54 +1812,6 @@ generates a copy of TREE." (funcall fUnCtIoN tReE)) (t tReE))) -;; this is just faster than `ad-substitute-tree': -(defun ad-copy-tree (tree) - "Return a copy of the list structure of TREE." - (cond ((consp tree) - (cons (ad-copy-tree (car tree)) - (ad-copy-tree (cdr tree)))) - (t tree))) - -(defmacro ad-dolist (varform &rest body) - "A Common-Lisp-style dolist iterator with the following syntax: - - (ad-dolist (VAR INIT-FORM [RESULT-FORM]) - BODY-FORM...) - -which will iterate over the list yielded by INIT-FORM binding VAR to the -current head at every iteration. If RESULT-FORM is supplied its value will -be returned at the end of the iteration, nil otherwise. The iteration can be -exited prematurely with `(ad-do-return [VALUE])'." - (let ((expansion - `(let ((ad-dO-vAr ,(car (cdr varform))) - ,(car varform)) - (while ad-dO-vAr - (setq ,(car varform) (car ad-dO-vAr)) - ,@body - ;;work around a backquote bug: - ;;(` ((,@ '(foo)) (bar))) => (append '(foo) '(((bar)))) wrong - ;;(` ((,@ '(foo)) (, '(bar)))) => (append '(foo) (list '(bar))) - ,'(setq ad-dO-vAr (cdr ad-dO-vAr))) - ,(car (cdr (cdr varform)))))) - ;;ok, this wastes some cons cells but only during compilation: - (if (catch 'contains-return - (ad-substitute-tree - (function (lambda (subtree) - (cond ((eq (car-safe subtree) 'ad-dolist)) - ((eq (car-safe subtree) 'ad-do-return) - (throw 'contains-return t))))) - 'identity body) - nil) - `(catch 'ad-dO-eXiT ,expansion) - expansion))) - -(defmacro ad-do-return (value) - `(throw 'ad-dO-eXiT ,value)) - -(if (not (get 'ad-dolist 'lisp-indent-hook)) - (put 'ad-dolist 'lisp-indent-hook 1)) - - ;; @@ Save real definitions of subrs used by Advice: ;; ================================================= ;; Advice depends on the real, unmodified functionality of various subrs, @@ -1924,16 +1876,16 @@ exited prematurely with `(ad-do-return [VALUE])'." ad-advised-functions))) (defmacro ad-do-advised-functions (varform &rest body) - "`ad-dolist'-style iterator that maps over `ad-advised-functions'. + "`dolist'-style iterator that maps over `ad-advised-functions'. \(ad-do-advised-functions (VAR [RESULT-FORM]) BODY-FORM...) On each iteration VAR will be bound to the name of an advised function \(a symbol)." - `(ad-dolist (,(car varform) + `(cl-dolist (,(car varform) ad-advised-functions ,(car (cdr varform))) - (setq ,(car varform) (intern (car ,(car varform)))) - ,@body)) + (setq ,(car varform) (intern (car ,(car varform)))) + ,@body)) (if (not (get 'ad-do-advised-functions 'lisp-indent-hook)) (put 'ad-do-advised-functions 'lisp-indent-hook 1)) @@ -1948,7 +1900,7 @@ On each iteration VAR will be bound to the name of an advised function `(put ,function 'ad-advice-info ,advice-info)) (defmacro ad-copy-advice-info (function) - `(ad-copy-tree (get ,function 'ad-advice-info))) + `(copy-tree (get ,function 'ad-advice-info))) (defmacro ad-is-advised (function) "Return non-nil if FUNCTION has any advice info associated with it. @@ -2022,8 +1974,8 @@ either t or nil, and DEFINITION should be a list of the form (defun ad-has-enabled-advice (function class) "True if at least one of FUNCTION's advices in CLASS is enabled." - (ad-dolist (advice (ad-get-advice-info-field function class)) - (if (ad-advice-enabled advice) (ad-do-return t)))) + (cl-dolist (advice (ad-get-advice-info-field function class)) + (if (ad-advice-enabled advice) (cl-return t)))) (defun ad-has-redefining-advice (function) "True if FUNCTION's advice info defines at least 1 redefining advice. @@ -2036,14 +1988,14 @@ Redefining advices affect the construction of an advised definition." (defun ad-has-any-advice (function) "True if the advice info of FUNCTION defines at least one advice." (and (ad-is-advised function) - (ad-dolist (class ad-advice-classes nil) + (cl-dolist (class ad-advice-classes nil) (if (ad-get-advice-info-field function class) - (ad-do-return t))))) + (cl-return t))))) (defun ad-get-enabled-advices (function class) "Return the list of enabled advices of FUNCTION in CLASS." (let (enabled-advices) - (ad-dolist (advice (ad-get-advice-info-field function class)) + (dolist (advice (ad-get-advice-info-field function class)) (if (ad-advice-enabled advice) (push advice enabled-advices))) (reverse enabled-advices))) @@ -2151,7 +2103,7 @@ function at point for which PREDICATE returns non-nil)." (ad-do-advised-functions (function) (if (or (null predicate) (funcall predicate function)) - (ad-do-return function))) + (cl-return function))) (error "ad-read-advised-function: %s" "There are no qualifying advised functions"))) (let* ((ad-pReDiCaTe predicate) @@ -2184,9 +2136,9 @@ be returned on empty input (defaults to the first non-empty advice class of FUNCTION)." (setq default (or default - (ad-dolist (class ad-advice-classes) + (cl-dolist (class ad-advice-classes) (if (ad-get-advice-info-field function class) - (ad-do-return class))) + (cl-return class))) (error "ad-read-advice-class: `%s' has no advices" function))) (let ((class (completing-read (format "%s (default %s): " (or prompt "Class") default) @@ -2255,18 +2207,18 @@ NAME can be a symbol or a regular expression matching part of an advice name. If CLASS is `any' all valid advice classes will be checked." (if (ad-is-advised function) (let (found-advice) - (ad-dolist (advice-class ad-advice-classes) + (cl-dolist (advice-class ad-advice-classes) (if (or (eq class 'any) (eq advice-class class)) (setq found-advice - (ad-dolist (advice (ad-get-advice-info-field + (cl-dolist (advice (ad-get-advice-info-field function advice-class)) (if (or (and (stringp name) (string-match name (symbol-name (ad-advice-name advice)))) (eq name (ad-advice-name advice))) - (ad-do-return advice))))) - (if found-advice (ad-do-return found-advice)))))) + (cl-return advice))))) + (if found-advice (cl-return found-advice)))))) (defun ad-enable-advice-internal (function class name flag) "Set enable FLAG of FUNCTION's advices in CLASS matching NAME. @@ -2277,10 +2229,10 @@ considered. The number of changed advices will be returned (or nil if FUNCTION was not advised)." (if (ad-is-advised function) (let ((matched-advices 0)) - (ad-dolist (advice-class ad-advice-classes) + (dolist (advice-class ad-advice-classes) (if (or (eq class 'any) (eq advice-class class)) - (ad-dolist (advice (ad-get-advice-info-field - function advice-class)) + (dolist (advice (ad-get-advice-info-field + function advice-class)) (cond ((or (and (stringp name) (string-match name (symbol-name (ad-advice-name advice)))) @@ -2868,8 +2820,8 @@ in any of these classes." (if origdoc (setq paragraphs (list origdoc))) (unless (eq style 'plain) (push (concat "This " origtype " is advised.") paragraphs)) - (ad-dolist (class ad-advice-classes) - (ad-dolist (advice (ad-get-enabled-advices function class)) + (dolist (class ad-advice-classes) + (dolist (advice (ad-get-enabled-advices function class)) (setq advice-docstring (ad-make-single-advice-docstring advice class style)) (if advice-docstring @@ -2891,24 +2843,24 @@ in any of these classes." (defun ad-advised-arglist (function) "Find first defined arglist in FUNCTION's redefining advices." - (ad-dolist (advice (append (ad-get-enabled-advices function 'before) + (cl-dolist (advice (append (ad-get-enabled-advices function 'before) (ad-get-enabled-advices function 'around) (ad-get-enabled-advices function 'after))) (let ((arglist (ad-arglist (ad-advice-definition advice)))) (if arglist ;; We found the first one, use it: - (ad-do-return arglist))))) + (cl-return arglist))))) (defun ad-advised-interactive-form (function) "Find first interactive form in FUNCTION's redefining advices." - (ad-dolist (advice (append (ad-get-enabled-advices function 'before) + (cl-dolist (advice (append (ad-get-enabled-advices function 'before) (ad-get-enabled-advices function 'around) (ad-get-enabled-advices function 'after))) (let ((interactive-form (ad-interactive-form (ad-advice-definition advice)))) (if interactive-form ;; We found the first one, use it: - (ad-do-return interactive-form))))) + (cl-return interactive-form))))) ;; @@@ Putting it all together: ;; ============================ @@ -2997,29 +2949,29 @@ and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG should be modified. The assembled function will be returned." (let (before-forms around-form around-form-protected after-forms definition) - (ad-dolist (advice befores) - (cond ((and (ad-advice-protected advice) - before-forms) - (setq before-forms - `((unwind-protect - ,(ad-prognify before-forms) - ,@(ad-body-forms - (ad-advice-definition advice)))))) - (t (setq before-forms - (append before-forms - (ad-body-forms (ad-advice-definition advice))))))) + (dolist (advice befores) + (cond ((and (ad-advice-protected advice) + before-forms) + (setq before-forms + `((unwind-protect + ,(ad-prognify before-forms) + ,@(ad-body-forms + (ad-advice-definition advice)))))) + (t (setq before-forms + (append before-forms + (ad-body-forms (ad-advice-definition advice))))))) (setq around-form `(setq ad-return-value ,orig)) - (ad-dolist (advice (reverse arounds)) - ;; If any of the around advices is protected then we - ;; protect the complete around advice onion: - (if (ad-advice-protected advice) - (setq around-form-protected t)) - (setq around-form - (ad-substitute-tree - (function (lambda (form) (eq form 'ad-do-it))) - (function (lambda (form) around-form)) - (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) + (dolist (advice (reverse arounds)) + ;; If any of the around advices is protected then we + ;; protect the complete around advice onion: + (if (ad-advice-protected advice) + (setq around-form-protected t)) + (setq around-form + (ad-substitute-tree + (function (lambda (form) (eq form 'ad-do-it))) + (function (lambda (form) around-form)) + (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) (setq after-forms (if (and around-form-protected before-forms) @@ -3027,17 +2979,17 @@ should be modified. The assembled function will be returned." ,(ad-prognify before-forms) ,around-form)) (append before-forms (list around-form)))) - (ad-dolist (advice afters) - (cond ((and (ad-advice-protected advice) - after-forms) - (setq after-forms - `((unwind-protect - ,(ad-prognify after-forms) - ,@(ad-body-forms - (ad-advice-definition advice)))))) - (t (setq after-forms - (append after-forms - (ad-body-forms (ad-advice-definition advice))))))) + (dolist (advice afters) + (cond ((and (ad-advice-protected advice) + after-forms) + (setq after-forms + `((unwind-protect + ,(ad-prognify after-forms) + ,@(ad-body-forms + (ad-advice-definition advice)))))) + (t (setq after-forms + (append after-forms + (ad-body-forms (ad-advice-definition advice))))))) (setq definition `(,@(if (memq type '(macro special-form)) '(macro)) @@ -3171,11 +3123,11 @@ advised definition from scratch." (nth 2 cache-id))))) (defun ad-verify-cache-class-id (cache-class-id advices) - (ad-dolist (advice advices (null cache-class-id)) + (cl-dolist (advice advices (null cache-class-id)) (if (ad-advice-enabled advice) (if (eq (car cache-class-id) (ad-advice-name advice)) (setq cache-class-id (cdr cache-class-id)) - (ad-do-return nil))))) + (cl-return nil))))) ;; There should be a way to monitor if and why a cache verification failed ;; in order to determine whether a certain preactivation could be used or @@ -3670,7 +3622,16 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation. usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) [DOCSTRING] [INTERACTIVE-FORM] BODY...)" - (declare (doc-string 3)) + (declare (doc-string 3) + (debug (&define name ;; thing being advised. + (name ;; class is [&or "before" "around" "after" + ;; "activation" "deactivation"] + name ;; name of advice + &rest sexp ;; optional position and flags + ) + [&optional stringp] + [&optional ("interactive" interactive)] + def-body))) (if (not (ad-name-p function)) (error "defadvice: Invalid function name: %s" function)) (let* ((class (car args)) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 7f9f8a33634..939fab78942 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -148,7 +148,7 @@ unselectable text. A string consisting solely of hyphens is displayed as a solid horizontal line. A menu item can be a list with the same format as MENU. This is a submenu." - (declare (indent defun)) + (declare (indent defun) (debug (symbolp body))) `(progn ,(if symbol `(defvar ,symbol nil ,doc)) (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu))) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 8f0f24ad092..d656dcf9526 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -52,10 +52,7 @@ ;;; Code: (require 'macroexp) - -;;; Bug reporting - -(defalias 'edebug-submit-bug-report 'report-emacs-bug) +(eval-when-compile (require 'cl-lib)) ;;; Options @@ -362,6 +359,7 @@ Return the result of the last expression in BODY." ;; Select WINDOW if it is provided and still exists. Otherwise, ;; if buffer is currently shown in several windows, choose one. ;; Otherwise, find a new window, possibly splitting one. + ;; FIXME: We should probably just be using `pop-to-buffer'. (setq window (cond ((and (edebug-window-live-p window) @@ -370,7 +368,7 @@ Return the result of the last expression in BODY." ((eq (window-buffer (selected-window)) buffer) ;; Selected window already displays BUFFER. (selected-window)) - ((edebug-get-buffer-window buffer)) + ((get-buffer-window buffer 0)) ((one-window-p 'nomini) ;; When there's one window only, split it. (split-window)) @@ -443,18 +441,14 @@ Return the result of the last expression in BODY." window-info) (set-window-configuration window-info))) -(defalias 'edebug-get-buffer-window 'get-buffer-window) -(defalias 'edebug-sit-for 'sit-for) -(defalias 'edebug-input-pending-p 'input-pending-p) - - ;;; Redefine read and eval functions ;; read is redefined to maybe instrument forms. ;; eval-defun is redefined to check edebug-all-forms and edebug-all-defs. ;; Save the original read function -(or (fboundp 'edebug-original-read) - (defalias 'edebug-original-read (symbol-function 'read))) +(defalias 'edebug-original-read + (symbol-function (if (fboundp 'edebug-original-read) + 'edebug-original-read 'read))) (defun edebug-read (&optional stream) "Read one Lisp expression as text from STREAM, return as Lisp object. @@ -621,8 +615,8 @@ already is one.)" (defvar-local edebug-form-data nil "A list of entries associating symbols with buffer regions. -This is an automatic buffer local variable. Each entry looks like: -\(SYMBOL BEGIN-MARKER END-MARKER). The markers +Each entry is an `edebug--form-data' struct with fields: +SYMBOL, BEGIN-MARKER, and END-MARKER. The markers are at the beginning and end of an entry level form and SYMBOL is a symbol that holds all edebug related information for the form on its property list. @@ -631,24 +625,17 @@ In the future (haha!), the symbol will be irrelevant and edebug data will be stored in the definitions themselves rather than in the property list of a symbol.") -;; FIXME: Use cl-defstruct. - -(defun edebug-make-form-data-entry (symbol begin end) - (list symbol begin end)) - -(defsubst edebug-form-data-name (entry) - (car entry)) - -(defsubst edebug-form-data-begin (entry) - (nth 1 entry)) - -(defsubst edebug-form-data-end (entry) - (nth 2 entry)) +(cl-defstruct (edebug--form-data + ;; Some callers expect accessors to return nil when passed nil. + (:type list) + (:constructor edebug--make-form-data-entry (name begin end)) + (:predicate nil) (:constructor nil) (:copier nil)) + name begin end) (defsubst edebug-set-form-data-entry (entry name begin end) - (setcar entry name) ;; In case name is changed. - (set-marker (nth 1 entry) begin) - (set-marker (nth 2 entry) end)) + (setf (edebug--form-data-name entry) name) ;; In case name is changed. + (set-marker (edebug--form-data-begin entry) begin) + (set-marker (edebug--form-data-end entry) end)) (defun edebug-get-form-data-entry (pnt &optional end-point) ;; Find the edebug form data entry which is closest to PNT. @@ -656,17 +643,17 @@ list of a symbol.") ;; Return `nil' if none found. (let ((rest edebug-form-data) closest-entry - (closest-dist 999999)) ;; need maxint here + (closest-dist 999999)) ;; Need maxint here. (while (and rest (< 0 closest-dist)) (let* ((entry (car rest)) - (begin (edebug-form-data-begin entry)) + (begin (edebug--form-data-begin entry)) (dist (- pnt begin))) (setq rest (cdr rest)) (if (and (<= 0 dist) (< dist closest-dist) (or (not end-point) - (= end-point (edebug-form-data-end entry))) - (<= pnt (edebug-form-data-end entry))) + (= end-point (edebug--form-data-end entry))) + (<= pnt (edebug--form-data-end entry))) (setq closest-dist dist closest-entry entry)))) closest-entry)) @@ -675,19 +662,19 @@ list of a symbol.") ;; and find an entry given a symbol, which should be just assq. (defun edebug-form-data-symbol () -;; Return the edebug data symbol of the form where point is in. -;; If point is not inside a edebuggable form, cause error. - (or (edebug-form-data-name (edebug-get-form-data-entry (point))) + "Return the edebug data symbol of the form where point is in. +If point is not inside a edebuggable form, cause error." + (or (edebug--form-data-name (edebug-get-form-data-entry (point))) (error "Not inside instrumented form"))) (defun edebug-make-top-form-data-entry (new-entry) ;; Make NEW-ENTRY the first element in the `edebug-form-data' list. (edebug-clear-form-data-entry new-entry) - (setq edebug-form-data (cons new-entry edebug-form-data))) + (push new-entry edebug-form-data)) (defun edebug-clear-form-data-entry (entry) -;; If non-nil, clear ENTRY out of the form data. -;; Maybe clear the markers and delete the symbol's edebug property? + "If non-nil, clear ENTRY out of the form data. +Maybe clear the markers and delete the symbol's edebug property?" (if entry (progn ;; Instead of this, we could just find all contained forms. @@ -1285,7 +1272,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Set this marker before parsing. (edebug-form-begin-marker (if form-data-entry - (edebug-form-data-begin form-data-entry) + (edebug--form-data-begin form-data-entry) ;; Buffer must be current-buffer for this to work: (set-marker (make-marker) form-begin)))) @@ -1295,7 +1282,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;; For definitions. ;; (edebug-containing-def-name edebug-def-name) ;; Get name from form-data, if any. - (edebug-old-def-name (edebug-form-data-name form-data-entry)) + (edebug-old-def-name (edebug--form-data-name form-data-entry)) edebug-def-name edebug-def-args edebug-def-interactive @@ -1325,7 +1312,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;; In the latter case, pointers to the entry remain eq. (if (not form-data-entry) (setq form-data-entry - (edebug-make-form-data-entry + (edebug--make-form-data-entry edebug-def-name edebug-form-begin-marker ;; Buffer must be current-buffer. @@ -1522,7 +1509,7 @@ expressions; a `progn' form will be returned enclosing these forms." (if edebug-error-point (goto-char edebug-error-point)) (apply 'edebug-syntax-error args)) - (funcall 'throw 'no-match args))) + (throw 'no-match args))) (defun edebug-match (cursor specs) @@ -2012,11 +1999,6 @@ expressions; a `progn' form will be returned enclosing these forms." ;; (def-edebug-spec anonymous-form ((&or ["lambda" lambda] ["macro" macro]))) ;; Standard functions that take function-forms arguments. -(def-edebug-spec mapcar (function-form form)) -(def-edebug-spec mapconcat (function-form form form)) -(def-edebug-spec mapatoms (function-form &optional form)) -(def-edebug-spec apply (function-form &rest form)) -(def-edebug-spec funcall (function-form &rest form)) ;; FIXME? The manual uses this form (maybe that's just for illustration?): ;; (def-edebug-spec let @@ -2082,49 +2064,12 @@ expressions; a `progn' form will be returned enclosing these forms." &or ("quote" edebug-\`) def-form)) ;; New byte compiler. -(def-edebug-spec defsubst defun) -(def-edebug-spec dont-compile t) -(def-edebug-spec eval-when-compile t) -(def-edebug-spec eval-and-compile t) (def-edebug-spec save-selected-window t) (def-edebug-spec save-current-buffer t) -(def-edebug-spec delay-mode-hooks t) -(def-edebug-spec with-temp-file t) -(def-edebug-spec with-temp-message t) -(def-edebug-spec with-syntax-table t) -(def-edebug-spec push (form sexp)) -(def-edebug-spec pop (sexp)) - -(def-edebug-spec 1value (form)) -(def-edebug-spec noreturn (form)) - ;; Anything else? - -;; Some miscellaneous specs for macros in public packages. -;; Send me yours. - -;; advice.el by Hans Chalupsky (hans@cs.buffalo.edu) - -(def-edebug-spec ad-dolist ((symbolp form &optional form) body)) -(def-edebug-spec defadvice - (&define name ;; thing being advised. - (name ;; class is [&or "before" "around" "after" - ;; "activation" "deactivation"] - name ;; name of advice - &rest sexp ;; optional position and flags - ) - [&optional stringp] - [&optional ("interactive" interactive)] - def-body)) - -(def-edebug-spec easy-menu-define (symbolp body)) - -(def-edebug-spec with-custom-print body) - - ;;; The debugger itself (defvar edebug-active nil) ;; Non-nil when edebug is active @@ -2177,8 +2122,6 @@ expressions; a `progn' form will be returned enclosing these forms." (defvar edebug-outside-debug-on-error) ; the value of debug-on-error outside (defvar edebug-outside-debug-on-quit) ; the value of debug-on-quit outside -(defvar edebug-outside-overriding-local-map) -(defvar edebug-outside-overriding-terminal-local-map) (defvar edebug-outside-pre-command-hook) (defvar edebug-outside-post-command-hook) @@ -2339,7 +2282,7 @@ MSG is printed after `::::} '." (1+ (aref edebug-freq-count before-index))) (if (or (not (memq edebug-execution-mode '(Go-nonstop next))) - (edebug-input-pending-p)) + (input-pending-p)) (edebug-debugger before-index 'before nil))) before-index) @@ -2361,7 +2304,7 @@ MSG is printed after `::::} '." (if edebug-test-coverage (edebug--update-coverage after-index value)) (if (and (eq edebug-execution-mode 'Go-nonstop) - (not (edebug-input-pending-p))) + (not (input-pending-p))) ;; Just return result. value (edebug-debugger after-index 'after value) @@ -2445,7 +2388,7 @@ MSG is printed after `::::} '." ;; or break, or input is pending, (if (or (not (memq edebug-execution-mode '(go continue Continue-fast))) edebug-break - (edebug-input-pending-p)) + (input-pending-p)) (edebug--display value offset-index arg-mode)) ; <---------- display value))) @@ -2522,7 +2465,7 @@ MSG is printed after `::::} '." (let ((overlay-arrow-position overlay-arrow-position) (overlay-arrow-string overlay-arrow-string) (cursor-in-echo-area nil) - (unread-command-events unread-command-events) + (unread-command-events nil) ;; any others?? ) (setq-default cursor-in-non-selected-windows t) @@ -2577,7 +2520,7 @@ MSG is printed after `::::} '." (edebug-adjust-window (cdr edebug-window-data))) ;; Test if there is input, not including keyboard macros. - (if (edebug-input-pending-p) + (if (input-pending-p) (progn (setq edebug-execution-mode 'step edebug-stop t) @@ -2612,27 +2555,26 @@ MSG is printed after `::::} '." (t (message ""))) - (setq unread-command-events nil) (if (eq 'after arg-mode) (progn ;; Display result of previous evaluation. (if (and edebug-break (not (eq edebug-execution-mode 'Continue-fast))) - (edebug-sit-for edebug-sit-for-seconds)) ; Show message. + (sit-for edebug-sit-for-seconds)) ; Show message. (edebug-previous-result))) (cond (edebug-break (cond ((eq edebug-execution-mode 'continue) - (edebug-sit-for edebug-sit-for-seconds)) - ((eq edebug-execution-mode 'Continue-fast) (edebug-sit-for 0)) + (sit-for edebug-sit-for-seconds)) + ((eq edebug-execution-mode 'Continue-fast) (sit-for 0)) (t (setq edebug-stop t)))) ;; not edebug-break ((eq edebug-execution-mode 'trace) - (edebug-sit-for edebug-sit-for-seconds)) ; Force update and pause. + (sit-for edebug-sit-for-seconds)) ; Force update and pause. ((eq edebug-execution-mode 'Trace-fast) - (edebug-sit-for 0))) ; Force update and continue. + (sit-for 0))) ; Force update and continue. (unwind-protect (if (or edebug-stop @@ -2646,7 +2588,7 @@ MSG is printed after `::::} '." ;; Reset the edebug-window-data to whatever it is now. (let ((window (if (eq (window-buffer) edebug-buffer) (selected-window) - (edebug-get-buffer-window edebug-buffer)))) + (get-buffer-window edebug-buffer)))) ;; Remember window-start for edebug-buffer, if still displayed. (if window (progn @@ -2724,6 +2666,8 @@ MSG is printed after `::::} '." (goto-char edebug-buffer-outside-point)) ;; ... nothing more. ) + ;; Could be an option to keep eval display up. + (if edebug-eval-buffer (kill-buffer edebug-eval-buffer)) (with-timeout-unsuspend edebug-with-timeout-suspend) ;; Reset global variables to outside values in case they were changed. (setq @@ -2790,10 +2734,6 @@ MSG is printed after `::::} '." (edebug-outside-map (current-local-map)) - (edebug-outside-overriding-local-map overriding-local-map) - (edebug-outside-overriding-terminal-local-map - overriding-terminal-local-map) - ;; Save the outside value of executing macro. (here??) (edebug-outside-executing-macro executing-kbd-macro) (edebug-outside-pre-command-hook @@ -2832,6 +2772,9 @@ MSG is printed after `::::} '." (last-nonmenu-event nil) (track-mouse nil) + (standard-output t) + (standard-input t) + ;; Don't keep reading from an executing kbd macro ;; within edebug unless edebug-continue-kbd-macro is ;; non-nil. Again, local binding may not be best. @@ -2874,8 +2817,6 @@ MSG is printed after `::::} '." (setq signal-hook-function 'edebug-signal) (if edebug-backtrace-buffer (kill-buffer edebug-backtrace-buffer)) - ;; Could be an option to keep eval display up. - (if edebug-eval-buffer (kill-buffer edebug-eval-buffer)) ;; Remember selected-window after recursive-edit. ;; (setq edebug-inside-window (selected-window)) @@ -2923,8 +2864,8 @@ MSG is printed after `::::} '." (defun edebug-adjust-window (old-start) ;; If pos is not visible, adjust current window to fit following context. -;;; (message "window: %s old-start: %s window-start: %s pos: %s" -;;; (selected-window) old-start (window-start) (point)) (sit-for 5) + ;; (message "window: %s old-start: %s window-start: %s pos: %s" + ;; (selected-window) old-start (window-start) (point)) (sit-for 5) (if (not (pos-visible-in-window-p)) (progn ;; First try old-start @@ -2932,7 +2873,7 @@ MSG is printed after `::::} '." (set-window-start (selected-window) old-start)) (if (not (pos-visible-in-window-p)) (progn -;; (message "resetting window start") (sit-for 2) + ;; (message "resetting window start") (sit-for 2) (set-window-start (selected-window) (save-excursion @@ -3071,7 +3012,7 @@ before returning. The default is one second." (current-buffer) (point) (if (marker-buffer (edebug-mark-marker)) (marker-position (edebug-mark-marker)) "")) - (edebug-sit-for arg) + (sit-for arg) (edebug-pop-to-buffer edebug-buffer (car edebug-window-data))))) @@ -3398,7 +3339,7 @@ function or macro is called, Edebug will be called there as well." (save-excursion (down-list 1) (if (looking-at "\(") - (edebug-form-data-name + (edebug--form-data-name (edebug-get-form-data-entry (point))) (edebug-original-read (current-buffer)))))) (edebug-instrument-function func)))) @@ -3604,7 +3545,8 @@ Return the result of the last expression." (defun edebug-eval (expr) ;; Are there cl lexical variables active? - (eval (if (bound-and-true-p cl-debug-env) + (eval (if (and (bound-and-true-p cl-debug-env) + (fboundp 'cl-macroexpand-all)) (cl-macroexpand-all expr cl-debug-env) expr) lexical-binding)) @@ -4088,15 +4030,15 @@ Otherwise call `debug' normally." "In buffer BUF-NAME, display FMT and ARGS at the end and make it visible. The buffer is created if it does not exist. You must include newlines in FMT to break lines, but one newline is appended." -;; e.g. -;; (edebug-trace-display "*trace-point*" -;; "saving: point = %s window-start = %s" -;; (point) (window-start)) + ;; e.g. + ;; (edebug-trace-display "*trace-point*" + ;; "saving: point = %s window-start = %s" + ;; (point) (window-start)) (let* ((oldbuf (current-buffer)) (selected-window (selected-window)) (buffer (get-buffer-create buf-name)) buf-window) -;; (message "before pop-to-buffer") (sit-for 1) + ;; (message "before pop-to-buffer") (sit-for 1) (edebug-pop-to-buffer buffer) (setq truncate-lines t) (setq buf-window (selected-window)) @@ -4106,8 +4048,8 @@ You must include newlines in FMT to break lines, but one newline is appended." (vertical-motion (- 1 (window-height))) (set-window-start buf-window (point)) (goto-char (point-max)) -;; (set-window-point buf-window (point)) -;; (edebug-sit-for 0) + ;; (set-window-point buf-window (point)) + ;; (sit-for 0) (bury-buffer buffer) (select-window selected-window) (set-buffer oldbuf)) @@ -4170,8 +4112,8 @@ reinstrument it." ;; Insert all the indices for this line. (forward-line 1) (setq start-of-count-line (point) - first-index i ; really last index for line above this one. - last-count -1) ; cause first count to always appear. + first-index i ; Really, last index for line above this one. + last-count -1) ; Cause first count to always appear. (insert ";#") ;; i == first-index still (while (<= (setq i (1+ i)) last-index) @@ -4203,7 +4145,8 @@ It is removed when you hit any char." (let ((buffer-read-only nil)) (undo-boundary) (edebug-display-freq-count) - (setq unread-command-events (append unread-command-events (read-event))) + (setq unread-command-events + (append unread-command-events (list (read-event)))) ;; Yuck! This doesn't seem to work at all for me. (undo))) @@ -4314,80 +4257,6 @@ With prefix argument, make it a temporary breakpoint." (edebug-modify-breakpoint t condition arg)) (easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus) - -;;; Byte-compiler - -;; Extension for bytecomp to resolve undefined function references. -;; Requires new byte compiler. - -(eval-when-compile - ;; The body of eval-when-compile seems to get evaluated with eval-defun. - ;; We only want to evaluate when actually byte compiling. - ;; But it is OK to evaluate as long as byte-compiler has been loaded. - (if (featurep 'byte-compile) (progn - - (defun byte-compile-resolve-functions (funcs) - "Say it is OK for the named functions to be unresolved." - (mapc - (function - (lambda (func) - (setq byte-compile-unresolved-functions - (delq (assq func byte-compile-unresolved-functions) - byte-compile-unresolved-functions)))) - funcs) - nil) - - '(defun byte-compile-resolve-free-references (vars) - "Say it is OK for the named variables to be referenced." - (mapcar - (function - (lambda (var) - (setq byte-compile-free-references - (delq var byte-compile-free-references)))) - vars) - nil) - - '(defun byte-compile-resolve-free-assignments (vars) - "Say it is OK for the named variables to be assigned." - (mapcar - (function - (lambda (var) - (setq byte-compile-free-assignments - (delq var byte-compile-free-assignments)))) - vars) - nil) - - (byte-compile-resolve-functions - '(reporter-submit-bug-report - edebug-gensym ;; also in cl.el - ;; Interfaces to standard functions. - edebug-original-eval-defun - edebug-original-read - edebug-get-buffer-window - edebug-mark - edebug-mark-marker - edebug-input-pending-p - edebug-sit-for - edebug-prin1-to-string - edebug-format - ;; lemacs - zmacs-deactivate-region - popup-menu - ;; CL - cl-macroexpand-all - ;; And believe it or not, the byte compiler doesn't know about: - byte-compile-resolve-functions - )) - - '(byte-compile-resolve-free-references - '(read-expression-history - read-expression-map)) - - '(byte-compile-resolve-free-assignments - '(read-expression-history)) - - ))) - ;;; Autoloading of Edebug accessories diff --git a/lisp/subr.el b/lisp/subr.el index aa1b10ce17d..e9b85ff1f38 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -80,6 +80,7 @@ For more information, see Info node `(elisp)Declaring Functions'." (defmacro noreturn (form) "Evaluate FORM, expecting it not to return. If FORM does return, signal an error." + (declare (debug t)) `(prog1 ,form (error "Form marked with `noreturn' did return"))) @@ -87,6 +88,7 @@ If FORM does return, signal an error." "Evaluate FORM, expecting a constant return value. This is the global do-nothing version. There is also `testcover-1value' that complains if FORM ever does return differing values." + (declare (debug t)) form) (defmacro def-edebug-spec (symbol spec) From 6b533e9cb5c66766cbc2a222d86c2d441e7d2e43 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 14 Sep 2012 08:55:38 +0200 Subject: [PATCH 172/216] In Fformat_mode_line always save/restore current buffer. (Bug#12387) * xdisp.c (Fformat_mode_line): Unconditionally save/restore current buffer. (Bug#12387) --- src/ChangeLog | 5 +++++ src/xdisp.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0f741c5c4cf..5cda8241916 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-14 Martin Rudalics + + * xdisp.c (Fformat_mode_line): Unconditionally save/restore + current buffer (Bug#12387). + 2012-09-14 Juanma Barranquero * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies. diff --git a/src/xdisp.c b/src/xdisp.c index e9d9595d91e..320998a5713 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21039,8 +21039,7 @@ are the selected window and the WINDOW's buffer). */) : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID : DEFAULT_FACE_ID; - if (XBUFFER (buffer) != current_buffer) - old_buffer = current_buffer; + old_buffer = current_buffer; /* Save things including mode_line_proptrans_alist, and set that to nil so that we don't alter the outer value. */ @@ -21051,8 +21050,7 @@ are the selected window and the WINDOW's buffer). */) mode_line_proptrans_alist = Qnil; Fselect_window (window, Qt); - if (old_buffer) - set_buffer_internal_1 (XBUFFER (buffer)); + set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id); From 33bd7ff0f66acdab978b5c67e76c3676286ab3e6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 14 Sep 2012 06:17:31 -0400 Subject: [PATCH 173/216] Auto-commit of generated files. --- autogen/configure | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autogen/configure b/autogen/configure index 25391a0469e..63295f68db0 100755 --- a/autogen/configure +++ b/autogen/configure @@ -24254,11 +24254,7 @@ fi #### It makes printing result more understandable as using GTK sets #### toolkit_scroll_bars to yes by default. if test "${HAVE_GTK}" = "yes"; then - if test "${with_gtk3}" = "yes"; then - USE_X_TOOLKIT=GTK3 - else - USE_X_TOOLKIT=GTK - fi + USE_X_TOOLKIT=GTK fi echo " From 0fb3cb7c8921f6ad3ac59c24d608384be91d5baa Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 14 Sep 2012 09:44:31 -0400 Subject: [PATCH 174/216] * lisp/emacs-lisp/advice.el (ad-prognify): Remove, use macroexp-progn. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/advice.el | 16 ++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7163b4b4989..2b5b5f49b58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-09-14 Stefan Monnier + * emacs-lisp/advice.el (ad-prognify): Remove, use macroexp-progn. + * emacs-lisp/edebug.el: Miscellaneous cleanup. Remove obsolete byte-compiler hack that tried to silence some warnings. (edebug-submit-bug-report): Remove. 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 @@ (provide 'advice-preload) ;; During a normal load this is a noop: (require 'advice-preload "advice.el") +(require 'macroexp) (eval-when-compile (require 'cl-lib)) ;; @@ Variable definitions: @@ -2538,11 +2539,6 @@ For that it has to be fbound with a non-autoload definition." (byte-compile symbol) (fset function (symbol-function symbol)))))) -(defun ad-prognify (forms) - (cond ((<= (length forms) 1) - (car forms)) - (t (cons 'progn forms)))) - ;; @@@ Accessing argument lists: ;; ============================= @@ -2954,7 +2950,7 @@ should be modified. The assembled function will be returned." before-forms) (setq before-forms `((unwind-protect - ,(ad-prognify before-forms) + ,(macroexp-progn before-forms) ,@(ad-body-forms (ad-advice-definition advice)))))) (t (setq before-forms @@ -2971,12 +2967,12 @@ should be modified. The assembled function will be returned." (ad-substitute-tree (function (lambda (form) (eq form 'ad-do-it))) (function (lambda (form) around-form)) - (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) + (macroexp-progn (ad-body-forms (ad-advice-definition advice)))))) (setq after-forms (if (and around-form-protected before-forms) `((unwind-protect - ,(ad-prognify before-forms) + ,(macroexp-progn before-forms) ,around-form)) (append before-forms (list around-form)))) (dolist (advice afters) @@ -2984,7 +2980,7 @@ should be modified. The assembled function will be returned." after-forms) (setq after-forms `((unwind-protect - ,(ad-prognify after-forms) + ,(macroexp-progn after-forms) ,@(ad-body-forms (ad-advice-definition advice)))))) (t (setq after-forms @@ -3013,7 +3009,7 @@ should be modified. The assembled function will be returned." (ad-body-forms (ad-advice-definition advice)))) (ad-get-enabled-advices function hook-name)))) (if hook-forms - (ad-prognify (apply 'append hook-forms))))) + (macroexp-progn (apply 'append hook-forms))))) ;; @@ Caching: From 2f294edf3a601c612e0a4c208539e842d790a894 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 14 Sep 2012 18:23:50 +0400 Subject: [PATCH 175/216] Avoid out-of-range marker position (Bug#12426). * insdel.c (replace_range, replace_range_2): Adjust markers before overlays, as suggested by comments. (insert_1_both, insert_from_buffer_1, adjust_after_replace): Remove redundant check before calling offset_intervals. --- src/ChangeLog | 8 ++++++++ src/insdel.c | 31 ++++++++++++++----------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5cda8241916..27698886079 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2012-09-14 Dmitry Antipov + + Avoid out-of-range marker position (Bug#12426). + * insdel.c (replace_range, replace_range_2): Adjust + markers before overlays, as suggested by comments. + (insert_1_both, insert_from_buffer_1, adjust_after_replace): + Remove redundant check before calling offset_intervals. + 2012-09-14 Martin Rudalics * xdisp.c (Fformat_mode_line): Unconditionally save/restore 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, PT + nchars, PT_BYTE + nbytes, before_markers); - if (buffer_intervals (current_buffer)) - offset_intervals (current_buffer, PT, nchars); + offset_intervals (current_buffer, PT, nchars); if (!inherit && buffer_intervals (current_buffer)) set_text_properties (make_number (PT), make_number (PT + nchars), @@ -1153,8 +1152,7 @@ insert_from_buffer_1 (struct buffer *buf, PT_BYTE + outgoing_nbytes, 0); - if (buffer_intervals (current_buffer)) - offset_intervals (current_buffer, PT, nchars); + offset_intervals (current_buffer, PT, nchars); /* Get the intervals for the part of the string we are inserting. */ intervals = buffer_intervals (buf); @@ -1222,8 +1220,7 @@ adjust_after_replace (ptrdiff_t from, ptrdiff_t from_byte, else if (len < nchars_del) adjust_overlays_for_delete (from, nchars_del - len); - if (buffer_intervals (current_buffer)) - offset_intervals (current_buffer, from, len - nchars_del); + offset_intervals (current_buffer, from, len - nchars_del); if (from < PT) adjust_point (len - nchars_del, len_byte - nbytes_del); @@ -1394,16 +1391,16 @@ replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new, eassert (GPT <= GPT_BYTE); - /* Adjust the overlay center as needed. This must be done after - adjusting the markers that bound the overlays. */ - adjust_overlays_for_delete (from, nchars_del); - adjust_overlays_for_insert (from, inschars); - /* Adjust markers for the deletion and the insertion. */ if (markers) adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, inschars, outgoing_insbytes); + /* Adjust the overlay center as needed. This must be done after + adjusting the markers that bound the overlays. */ + adjust_overlays_for_delete (from, nchars_del); + adjust_overlays_for_insert (from, inschars); + offset_intervals (current_buffer, from, inschars - nchars_del); /* 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, eassert (GPT <= GPT_BYTE); + /* Adjust markers for the deletion and the insertion. */ + if (markers + && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) + adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, + inschars, insbytes); + /* Adjust the overlay center as needed. This must be done after adjusting the markers that bound the overlays. */ if (nchars_del != inschars) @@ -1518,12 +1521,6 @@ replace_range_2 (ptrdiff_t from, ptrdiff_t from_byte, adjust_overlays_for_delete (from + inschars, nchars_del); } - /* Adjust markers for the deletion and the insertion. */ - if (markers - && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) - adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, - inschars, insbytes); - offset_intervals (current_buffer, from, inschars - nchars_del); /* Relocate point as if it were a marker. */ From e3141fcf8456dc1ec7455e34437ac09f0c812ac9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 14 Sep 2012 11:56:19 -0700 Subject: [PATCH 176/216] * configure.ac: Port to hosts lacking gtk. (PKG_CHECK_MODULES): Capture pkg-config diagnostics better, in particular, problems in invoking pkg-config itself. This is useful on hosts that don't have pkg-config. (GTK_MODULES): Do not exit 'configure' simply because gtk3 and gtk2 are both missing. Problem found on Solaris 8. --- ChangeLog | 9 +++++++++ configure.ac | 15 ++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e46fbef7113..b0f6ab6e984 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-09-14 Paul Eggert + + * configure.ac: Port to hosts lacking gtk. + (PKG_CHECK_MODULES): Capture pkg-config diagnostics + better, in particular, problems in invoking pkg-config itself. + This is useful on hosts that don't have pkg-config. + (GTK_MODULES): Do not exit 'configure' simply because gtk3 + and gtk2 are both missing. Problem found on Solaris 8. + 2012-09-13 Jan Djärv * configure.ac: Reorder Xaw3d messages. diff --git a/configure.ac b/configure.ac index ce65f07522d..accbb68e7b0 100644 --- a/configure.ac +++ b/configure.ac @@ -1189,9 +1189,10 @@ AC_DEFUN([PKG_CHECK_MODULES], [ $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + $1_PKG_ERRORS=`($PKG_CONFIG --print-errors "$2") 2>&1` + ifelse([$4], ,echo "$$1_PKG_ERRORS",) fi AC_SUBST($1_CFLAGS) @@ -1934,10 +1935,10 @@ if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then dnl Checks for libraries. PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) - if test "$pkg_check_gtk" = "no"; then - if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then - AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS) - fi + if test "$pkg_check_gtk" = "no" && + { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } + then + AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS) fi fi From 2af0342954599918f739d981e8151f7e8a46c3c6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 14 Sep 2012 15:01:19 -0700 Subject: [PATCH 177/216] Fix glitches with 'configure --without-sync-input'. * configure.ac (--without-sync-input): Fix typo in usage message. * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: Include "syssignal.h", for 'main_thread'. --- ChangeLog | 2 ++ configure.ac | 2 +- src/ChangeLog | 5 +++++ src/alloc.c | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b0f6ab6e984..3e662edb6bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-09-14 Paul Eggert + * configure.ac (--without-sync-input): Fix typo in usage message. + * configure.ac: Port to hosts lacking gtk. (PKG_CHECK_MODULES): Capture pkg-config diagnostics better, in particular, problems in invoking pkg-config itself. diff --git a/configure.ac b/configure.ac index accbb68e7b0..382e62a97a1 100644 --- a/configure.ac +++ b/configure.ac @@ -128,7 +128,7 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME], OPTION_DEFAULT_ON([sound],[don't compile with sound support]) -OPTION_DEFAULT_ON([sync-input],[process async input synchronously]) +OPTION_DEFAULT_ON([sync-input],[don't process async input synchronously]) if test "$with_sync_input" = yes; then AC_DEFINE(SYNC_INPUT, 1, [Process async input synchronously.]) fi diff --git a/src/ChangeLog b/src/ChangeLog index 27698886079..b1b4dc8bbcd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-14 Paul Eggert + + * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: + Include "syssignal.h", for 'main_thread'. + 2012-09-14 Dmitry Antipov Avoid out-of-range marker position (Bug#12426). 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 *); #if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT #ifdef HAVE_PTHREAD +# include "syssignal.h" + /* When GTK uses the file chooser dialog, different backends can be loaded dynamically. One such a backend is the Gnome VFS backend that gets loaded if you run Gnome. That backend creates several threads and also allocates From cb26b7f5728f68d118c2f1a6694f6cedbf28a0d9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 15 Sep 2012 01:58:43 +0300 Subject: [PATCH 178/216] * lisp/dired-aux.el (dired-do-chmod): Use `eq' to detect empty input. Fixes: debbugs:12399 --- lisp/ChangeLog | 5 +++++ lisp/dired-aux.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2b5b5f49b58..e27fa53e7b5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-14 Juri Linkov + + * dired-aux.el (dired-do-chmod): Use `eq' to detect empty input. + (Bug#12399) + 2012-09-14 Stefan Monnier * emacs-lisp/advice.el (ad-prognify): Remove, use macroexp-progn. 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." "Change mode of %s to: " nil 'chmod arg files default)) num-modes) - (cond ((equal modes "") + (cond ((or (equal modes "") + ;; Use `eq' instead of `equal' + ;; to detect empty input (bug#12399). + (eq modes default)) ;; We used to treat empty input as DEFAULT, but that is not ;; such a good idea (Bug#9361). (error "No file mode specified")) From f40a97091f5ae5ba94d46e41dbc072e2e80c1730 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 14 Sep 2012 20:33:40 -0400 Subject: [PATCH 179/216] Improve emacs-bzr-version for lightweight checkouts (bug#12441) * lisp/version.el (emacs-bzr-version): Doc fix. (emacs-bzr-version-dirstate): New function. (emacs-bzr-get-version): For lightweight checkouts, if the parent is local try and check that it matches the branch. If not, just use dirstate information. --- lisp/ChangeLog | 8 ++++++++ lisp/version.el | 47 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e27fa53e7b5..34c6d981481 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-09-15 Glenn Morris + + * version.el (emacs-bzr-version): Doc fix. + (emacs-bzr-version-dirstate): New function. + (emacs-bzr-get-version): For lightweight checkouts, if the parent + is local try and check that it matches the branch. If not, just + use dirstate information. (Bug#12441) + 2012-09-14 Juri Linkov * dired-aux.el (dired-do-chmod): Use `eq' to detect empty input. diff --git a/lisp/version.el b/lisp/version.el index e63c51d0d26..8ef279828b1 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -87,23 +87,36 @@ to the system configuration; look at `system-configuration' instead." ;; Set during dumping, this is a defvar so that it can be setq'd. (defvar emacs-bzr-version nil "String giving the bzr revision from which this Emacs was built. -Value is the bzr revision number and a revision ID separated by a blank. +The format is: [revno] revision_id, where revno may be absent. Value is nil if Emacs was not built from a bzr checkout, or if we could not determine the revision.") +(defun emacs-bzr-version-dirstate (dir) + "Try to return as a string the bzr revision ID of directory DIR. +This uses the dirstate file's parent revision entry. +Returns nil if unable to find this information." + (let ((file (expand-file-name ".bzr/checkout/dirstate" dir))) + (when (file-readable-p file) + (with-temp-buffer + (insert-file-contents file) + (and (looking-at "#bazaar dirstate flat format 3") + (forward-line 3) + (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") + (match-string 1)))))) + (defun emacs-bzr-get-version (&optional dir) - "Try to return as a string the bzr revision number of the Emacs sources. -Value is the bzr revision number and a revision ID separated by a blank. + "Try to return as a string the bzr revision of the Emacs sources. +The format is: [revno] revision_id, where revno may be absent. Value is nil if the sources do not seem to be under bzr, or if we could not determine the revision. Note that this reports on the current state of the sources, which may not correspond to the running Emacs. Optional argument DIR is a directory to use instead of `source-directory'." (or dir (setq dir source-directory)) - (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir))) - (let (file loc) + (when (file-directory-p dir) + (let (file loc rev) (cond ((file-readable-p - (setq file (expand-file-name "last-revision" dir))) + (setq file (expand-file-name ".bzr/branch/last-revision" dir))) (with-temp-buffer (insert-file-contents file) (goto-char (point-max)) @@ -112,14 +125,26 @@ Optional argument DIR is a directory to use instead of `source-directory'." (buffer-string))) ;; OK, no last-revision. Is it a lightweight checkout? ((file-readable-p - (setq file (expand-file-name "location" dir))) - ;; If the parent branch is local, try looking there for the revid. - (if (setq loc (with-temp-buffer + (setq file (expand-file-name ".bzr/branch/location" dir))) + (setq rev (emacs-bzr-version-dirstate dir)) + ;; If the parent branch is local, try looking there for the rev. + ;; Note: there is no guarantee that the parent branch's rev + ;; corresponds to this branch. This branch could have + ;; been made with a specific -r revno argument, or the + ;; parent could have been updated since this branch was created. + ;; To try and detect this, we check the dirstate revids + ;; to see if they match. + (if (and (setq loc (with-temp-buffer (insert-file-contents file) (if (looking-at "file://\\(.*\\)") (match-string 1)))) - (emacs-bzr-get-version loc))) - ;; Could fall back to eg `bzr testament' at this point. + (equal rev (emacs-bzr-version-dirstate loc))) + (emacs-bzr-get-version loc) + ;; If parent does not match, the best we can do without + ;; calling external commands is to use the dirstate rev. + rev)) + ;; At this point, could fall back to: + ;; bzr version-info --custom --template='{revno} {revision_id}\n' )))) ;; We put version info into the executable in the form that `ident' uses. From fea895b1d20c919021a99d9595248a53bcaff88c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 14 Sep 2012 20:45:00 -0400 Subject: [PATCH 180/216] Tweak previous emacs-bzr-get-version change --- lisp/version.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/version.el b/lisp/version.el index 8ef279828b1..47476cb268a 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -113,7 +113,7 @@ of the sources, which may not correspond to the running Emacs. Optional argument DIR is a directory to use instead of `source-directory'." (or dir (setq dir source-directory)) - (when (file-directory-p dir) + (when (file-directory-p (expand-file-name ".bzr/branch" dir)) (let (file loc rev) (cond ((file-readable-p (setq file (expand-file-name ".bzr/branch/last-revision" dir))) From 823751606a90e3850551b43e707d58bbf58033dc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 14 Sep 2012 21:11:52 -0400 Subject: [PATCH 181/216] Improve vc-bzr-working-revision for lightweight checkouts * lisp/vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local checkouts, check the parent dirstate matches the branch. Add "--tree" to "bzr revno" arguments. Don't try to shorten the empty string. --- lisp/ChangeLog | 5 +++++ lisp/vc/vc-bzr.el | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34c6d981481..c9aa7e99356 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2012-09-15 Glenn Morris + * vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local + checkouts, check the parent dirstate matches the branch. + Add "--tree" to "bzr revno" arguments. Don't try to shorten the + empty string. + * version.el (emacs-bzr-version): Doc fix. (emacs-bzr-version-dirstate): New function. (emacs-bzr-get-version): For lightweight checkouts, if the parent 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)." ;; FIXME: maybe it's overkill to check if both these ;; files exist. (and (file-exists-p branch-format-file) - (file-exists-p lastrev-file))))) + (file-exists-p lastrev-file) + (equal (emacs-bzr-version-dirstate l-c-parent-dir) + (emacs-bzr-version-dirstate rootdir)))))) t))) (with-temp-buffer (insert-file-contents branch-format-file) @@ -553,13 +555,17 @@ in the branch repository (or whose status not be determined)." (insert-file-contents lastrev-file) (when (re-search-forward "[0-9]+" nil t) (buffer-substring (match-beginning 0) (match-end 0)))))) - ;; fallback to calling "bzr revno" + ;; Fallback to calling "bzr revno --tree". + ;; The "--tree" matters for lightweight checkouts not on the same + ;; revision as the parent. (let* ((result (vc-bzr-command-discarding-stderr - vc-bzr-program "revno" (file-relative-name file))) + vc-bzr-program "revno" "--tree" + (file-relative-name file))) (exitcode (car result)) (output (cdr result))) (cond - ((eq exitcode 0) (substring output 0 -1)) + ((and (eq exitcode 0) (not (zerop (length output)))) + (substring output 0 -1)) (t nil)))))) (defun vc-bzr-create-repo () From ea964864a66828ce2457e44c4c670160d5879ec6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 15 Sep 2012 11:24:26 +0900 Subject: [PATCH 182/216] font.c (Ffont_shape_gstring): Don't adjust grapheme cluster here, but just check the validity of glyphs in the glyph-string. --- src/ChangeLog | 5 ++++ src/font.c | 68 +++++++++++++++++++++++++++------------------------ 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5cda8241916..e598d4d465a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-15 Kenichi Handa + + * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster + here, but just check the validity of glyphs in the glyph-string. + 2012-09-14 Martin Rudalics * xdisp.c (Fformat_mode_line): Unconditionally save/restore diff --git a/src/font.c b/src/font.c index 49a09bced28..ccbeb9956f4 100644 --- a/src/font.c +++ b/src/font.c @@ -4296,7 +4296,10 @@ to get the correct visual image of character sequences set in the header of the glyph-string. If the shaping was successful, the value is GSTRING itself or a newly -created glyph-string. Otherwise, the value is nil. */) +created glyph-string. Otherwise, the value is nil. + +See the documentation of `composition-get-gstring' for the format of +GSTRING. */) (Lisp_Object gstring) { struct font *font; @@ -4327,44 +4330,45 @@ created glyph-string. Otherwise, the value is nil. */) if (XINT (n) < LGSTRING_GLYPH_LEN (gstring)) LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); + /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that + GLYPHS covers all characters in GSTRING. More formally, provided + that NCHARS is the number of characters in GSTRING, N is the + number of glyphs, and GLYPHS[i] is the ith glyph, FROM_IDX and + TO_IDX of each glyph must satisfy these conditions: + + GLYPHS[0].FROM_IDX == 0 + GLYPHS[i].FROM_IDX <= GLYPHS[i].TO_IDX + if (GLYPHS[i].FROM_IDX == GLYPHS[i-1].FROM_IDX) + ;; GLYPHS[i] and GLYPHS[i-1] belongs to the same grapheme cluster + GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX + else + ;; Be sure to cover all characters. + GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 + GLYPHS[N-1].TO_IDX == NCHARS - 1 */ glyph = LGSTRING_GLYPH (gstring, 0); from = LGLYPH_FROM (glyph); to = LGLYPH_TO (glyph); - for (i = 1, j = 0; i < LGSTRING_GLYPH_LEN (gstring); i++) + if (from != 0 || to < from) + goto shaper_error; + for (i = 1; i < LGSTRING_GLYPH_LEN (gstring); i++) { - Lisp_Object this = LGSTRING_GLYPH (gstring, i); - - if (NILP (this)) + glyph = LGSTRING_GLYPH (gstring, i); + if (NILP (glyph)) break; - if (NILP (LGLYPH_ADJUSTMENT (this))) - { - if (j < i - 1) - for (; j < i; j++) - { - glyph = LGSTRING_GLYPH (gstring, j); - LGLYPH_SET_FROM (glyph, from); - LGLYPH_SET_TO (glyph, to); - } - from = LGLYPH_FROM (this); - to = LGLYPH_TO (this); - j = i; - } - else - { - if (from > LGLYPH_FROM (this)) - from = LGLYPH_FROM (this); - if (to < LGLYPH_TO (this)) - to = LGLYPH_TO (this); - } + if (! (LGLYPH_FROM (glyph) <= LGLYPH_TO (glyph) + && (LGLYPH_FROM (glyph) == from + ? LGLYPH_TO (glyph) == to + : LGLYPH_FROM (glyph) == to + 1))) + goto shaper_error; + from = LGLYPH_FROM (glyph); + to = LGLYPH_TO (glyph); } - if (j < i - 1) - for (; j < i; j++) - { - glyph = LGSTRING_GLYPH (gstring, j); - LGLYPH_SET_FROM (glyph, from); - LGLYPH_SET_TO (glyph, to); - } + if (to != LGSTRING_CHAR_LEN (gstring) - 1) + goto shaper_error; return composition_gstring_put_cache (gstring, XINT (n)); + + shaper_error: + return Qnil; } DEFUN ("font-variation-glyphs", Ffont_variation_glyphs, Sfont_variation_glyphs, From 0328b6de4a92676b4ad4616095ce19a4f51d1c4d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 15 Sep 2012 00:06:56 -0700 Subject: [PATCH 183/216] Port better to POSIX hosts lacking _setjmp. * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols. (_setjmp, _longjmp): Remove. * src/lisp.h: Include here, since we use its symbols here. All instances of '#include ' removed, if the only reason for the instance was because "lisp.h" was included. (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols. Unless otherwise specified, replace all uses of jmp_buf, _setjmp, and _longjmp with the new symbols. Emacs already uses _setjmp if available, so this change affects only POSIXish hosts that have sigsetjmp but not _setjmp, such as some versions of Solaris and Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.) * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros. (png_load_body) [HAVE_PNG]: (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]: (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]: Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp, since PNG requires jmp_buf. This is the only exception to the general rule that we now use sys_setjmp and sys_longjmp. This exception is OK since this code does not change the signal mask or longjmp out of a signal handler. Fixes: debbugs:12446 --- ChangeLog | 6 ++++++ configure.ac | 25 ++++++++++++++++++------- src/ChangeLog | 22 ++++++++++++++++++++++ src/alloc.c | 13 ++++++------- src/atimer.c | 2 +- src/bidi.c | 1 - src/buffer.c | 1 - src/bytecode.c | 2 +- src/callint.c | 1 - src/callproc.c | 1 - src/casefiddle.c | 2 +- src/casetab.c | 2 +- src/category.c | 1 - src/ccl.c | 1 - src/character.c | 1 - src/charset.c | 1 - src/chartab.c | 2 +- src/cm.c | 1 - src/cmds.c | 2 +- src/coding.c | 1 - src/composite.c | 1 - src/data.c | 1 - src/dbusbind.c | 2 +- src/dired.c | 1 - src/dispnew.c | 1 - src/doc.c | 1 - src/doprnt.c | 1 - src/dosfns.c | 2 +- src/editfns.c | 1 - src/emacs.c | 1 - src/emacsgtkfixed.c | 2 +- src/eval.c | 15 +++++++-------- src/fileio.c | 1 - src/filelock.c | 1 - src/floatfns.c | 2 +- src/fns.c | 1 - src/font.c | 1 - src/fontset.c | 1 - src/frame.c | 1 - src/fringe.c | 1 - src/ftfont.c | 2 -- src/ftxfont.c | 1 - src/gnutls.c | 1 - src/gtkutil.c | 1 - src/image.c | 21 ++++++++++++++------- src/indent.c | 1 - src/insdel.c | 1 - src/intervals.c | 1 - src/keyboard.c | 20 ++++++++++---------- src/keymap.c | 2 +- src/lisp.h | 20 +++++++++++++++++++- src/lread.c | 1 - src/macros.c | 2 +- src/marker.c | 2 +- src/menu.c | 1 - src/minibuf.c | 1 - src/nsfns.m | 1 - src/nsfont.m | 1 - src/nsimage.m | 1 - src/nsmenu.m | 1 - src/nsselect.m | 1 - src/nsterm.m | 1 - src/print.c | 2 +- src/process.c | 9 +++------ src/ralloc.c | 2 +- src/regex.c | 1 - src/region-cache.c | 1 - src/scroll.c | 2 +- src/search.c | 2 +- src/sheap.c | 3 +-- src/sound.c | 2 +- src/syntax.c | 2 +- src/sysdep.c | 1 - src/term.c | 1 - src/termcap.c | 1 - src/terminal.c | 1 - src/terminfo.c | 1 - src/textprop.c | 2 +- src/tparam.c | 2 +- src/undo.c | 2 +- src/unexaix.c | 1 - src/unexcoff.c | 1 - src/unexcw.c | 1 - src/unexsol.c | 1 - src/vm-limit.c | 1 - src/widget.c | 2 +- src/window.c | 1 - src/xdisp.c | 1 - src/xfaces.c | 1 - src/xfns.c | 1 - src/xfont.c | 1 - src/xftfont.c | 1 - src/xgselect.c | 2 -- src/xmenu.c | 1 - src/xml.c | 1 - src/xrdb.c | 1 - src/xselect.c | 1 - src/xsettings.c | 5 ++--- src/xsmfns.c | 1 - src/xterm.c | 2 -- 100 files changed, 131 insertions(+), 143 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e662edb6bc..8dfe5f2746b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-15 Paul Eggert + + Port better to POSIX hosts lacking _setjmp (Bug#12446). + * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols. + (_setjmp, _longjmp): Remove. + 2012-09-14 Paul Eggert * configure.ac (--without-sync-input): Fix typo in usage message. diff --git a/configure.ac b/configure.ac index 382e62a97a1..f810c839587 100644 --- a/configure.ac +++ b/configure.ac @@ -3774,13 +3774,24 @@ AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp], _longjmp (j, 1);]])], [emacs_cv_func__setjmp=yes], [emacs_cv_func__setjmp=no])]) -if test $emacs_cv_func__setjmp = no; then - AC_DEFINE([_setjmp], [setjmp], - [Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.]) - AC_DEFINE([_longjmp], [longjmp], - [Define to longjmp if _setjmp and _longjmp do not work. - Because longjmp may alter signal masks, callers of _longjmp - should not assume that it leaves signal masks alone.]) +if test $emacs_cv_func__setjmp = yes; then + AC_DEFINE([HAVE__SETJMP], 1, [Define to 1 if _setjmp and _longjmp work.]) +else + AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[sigjmp_buf j; + if (! sigsetjmp (j, 1)) + siglongjmp (j, 1);]])], + [emacs_cv_func_sigsetjmp=yes], + [emacs_cv_func_sigsetjmp=no])]) + if test $emacs_cv_func_sigsetjmp = yes; then + AC_DEFINE([HAVE_SIGSETJMP], 1, + [Define to 1 if sigsetjmp and siglongjmp work. + The value of this symbol is irrelevant if HAVE__SETJMP is defined.]) + fi fi case $opsys in diff --git a/src/ChangeLog b/src/ChangeLog index b1b4dc8bbcd..fb59e9e24dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2012-09-15 Paul Eggert + + Port better to POSIX hosts lacking _setjmp (Bug#12446). + * lisp.h: Include here, since we use its symbols here. + All instances of '#include ' removed, if the + only reason for the instance was because "lisp.h" was included. + (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols. + Unless otherwise specified, replace all uses of jmp_buf, _setjmp, + and _longjmp with the new symbols. Emacs already uses _setjmp if + available, so this change affects only POSIXish hosts that have + sigsetjmp but not _setjmp, such as some versions of Solaris and + Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.) + * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros. + (png_load_body) [HAVE_PNG]: + (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]: + (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]: + Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp, + since PNG requires jmp_buf. This is the only exception to the + general rule that we now use sys_setjmp and sys_longjmp. + This exception is OK since this code does not change the signal + mask or longjmp out of a signal handler. + 2012-09-14 Paul Eggert * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: diff --git a/src/alloc.c b/src/alloc.c index 25cf03dfa2e..0bfbb0c88b1 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -24,7 +24,6 @@ along with GNU Emacs. If not, see . */ #include #include /* For CHAR_BIT. */ -#include #ifdef ENABLE_CHECKING #include /* For SIGABRT. */ @@ -45,7 +44,7 @@ along with GNU Emacs. If not, see . */ #include "frame.h" #include "blockinput.h" #include "termhooks.h" /* For struct terminal. */ -#include + #include /* GC_CHECK_MARKED_OBJECTS means do sanity checks on allocated objects. @@ -4764,14 +4763,14 @@ test_setjmp (void) { char buf[10]; register int x; - jmp_buf jbuf; + sys_jmp_buf jbuf; /* Arrange for X to be put in a register. */ sprintf (buf, "1"); x = strlen (buf); x = 2 * x - 1; - _setjmp (jbuf); + sys_setjmp (jbuf); if (longjmps_done == 1) { /* Came here after the longjmp at the end of the function. @@ -4796,7 +4795,7 @@ test_setjmp (void) ++longjmps_done; x = 2; if (longjmps_done == 1) - _longjmp (jbuf, 1); + sys_longjmp (jbuf, 1); } #endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */ @@ -4902,7 +4901,7 @@ mark_stack (void) /* jmp_buf may not be aligned enough on darwin-ppc64 */ union aligned_jmpbuf { Lisp_Object o; - jmp_buf j; + sys_jmp_buf j; } j; volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base; #endif @@ -4938,7 +4937,7 @@ mark_stack (void) } #endif /* GC_SETJMP_WORKS */ - _setjmp (j.j); + sys_setjmp (j.j); end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; #endif /* not GC_SAVE_REGISTERS_ON_STACK */ #endif /* not HAVE___BUILTIN_UNWIND_INIT */ diff --git a/src/atimer.c b/src/atimer.c index 34731920af5..80b813fe4fe 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -18,7 +18,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include "syssignal.h" #include "systime.h" diff --git a/src/bidi.c b/src/bidi.c index 4186a46e19e..af0209565e2 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -56,7 +56,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "character.h" diff --git a/src/buffer.c b/src/buffer.c index d512547d34e..b020edb9962 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #include diff --git a/src/bytecode.c b/src/bytecode.c index 97730636d0e..b151078f60f 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -33,7 +33,7 @@ by Hallvard: */ #include -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/callint.c b/src/callint.c index b11545ddea2..c4c087e83d7 100644 --- a/src/callint.c +++ b/src/callint.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include -#include #include "lisp.h" #include "character.h" diff --git a/src/callproc.c b/src/callproc.c index a92959a1559..9171337ee76 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #include diff --git a/src/casefiddle.c b/src/casefiddle.c index 1102054b153..e3654627576 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/casetab.c b/src/casetab.c index 3e22d0d0b77..a84bc9202d0 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/category.c b/src/category.c index 80dc6938d8b..01a6f54ad17 100644 --- a/src/category.c +++ b/src/category.c @@ -32,7 +32,6 @@ along with GNU Emacs. If not, see . */ #define CATEGORY_INLINE EXTERN_INLINE -#include #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/ccl.c b/src/ccl.c index dd37934451d..34cc1c98eea 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" diff --git a/src/character.c b/src/character.c index 37963d1878c..def1ad090fd 100644 --- a/src/character.c +++ b/src/character.c @@ -36,7 +36,6 @@ along with GNU Emacs. If not, see . */ #ifdef emacs #include -#include #include #include "lisp.h" #include "character.h" diff --git a/src/charset.c b/src/charset.c index 972a0598059..d8c38e5ea3b 100644 --- a/src/charset.c +++ b/src/charset.c @@ -32,7 +32,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #include "lisp.h" #include "character.h" diff --git a/src/chartab.c b/src/chartab.c index c14df0ebac6..e864514e336 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "character.h" #include "charset.h" diff --git a/src/cm.c b/src/cm.c index 4b17b92eebc..eda6430bafa 100644 --- a/src/cm.c +++ b/src/cm.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "frame.h" diff --git a/src/cmds.c b/src/cmds.c index 90d3cd6dced..45f7df948ae 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "commands.h" #include "character.h" diff --git a/src/coding.c b/src/coding.c index 94a2d9fea80..4b3d22f956c 100644 --- a/src/coding.c +++ b/src/coding.c @@ -285,7 +285,6 @@ encode_coding_XXX (struct coding_system *coding) #include #include -#include #include "lisp.h" #include "character.h" diff --git a/src/composite.c b/src/composite.c index eddabb66d33..ae46df0a573 100644 --- a/src/composite.c +++ b/src/composite.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #define COMPOSITE_INLINE EXTERN_INLINE -#include #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/data.c b/src/data.c index 5d7f036b70d..72d7c8ccf9a 100644 --- a/src/data.c +++ b/src/data.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include diff --git a/src/dbusbind.c b/src/dbusbind.c index 901820648cb..c2eefd605bb 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . */ #ifdef HAVE_DBUS #include #include -#include + #include "lisp.h" #include "frame.h" #include "termhooks.h" diff --git a/src/dired.c b/src/dired.c index 9af5f76821b..3aa27ecf920 100644 --- a/src/dired.c +++ b/src/dired.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #ifdef HAVE_PWD_H #include diff --git a/src/dispnew.c b/src/dispnew.c index f6186e86048..5827316a7b7 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #define DISPEXTERN_INLINE EXTERN_INLINE #include -#include #include #include "lisp.h" diff --git a/src/doc.c b/src/doc.c index 02a5b4b8143..d2d664df266 100644 --- a/src/doc.c +++ b/src/doc.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include #include /* Must be after sys/types.h for USG*/ -#include #include #include diff --git a/src/doprnt.c b/src/doprnt.c index 3b7391f07d4..caa56d6ae88 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -102,7 +102,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include #include diff --git a/src/dosfns.c b/src/dosfns.c index 21676f4b4f5..3c649f4d534 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -30,7 +30,7 @@ along with GNU Emacs. If not, see . */ #include #undef gettime #undef settime -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/editfns.c b/src/editfns.c index 299cad07fd7..c6744648bc5 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #ifdef HAVE_PWD_H #include diff --git a/src/emacs.c b/src/emacs.c index e8150631311..1416bf76c43 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index c0d29a640ed..d10185072cc 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c @@ -22,7 +22,7 @@ along with GNU Emacs. If not, see . */ #include "emacsgtkfixed.h" #include -#include + #include "lisp.h" #include "frame.h" #include "xterm.h" diff --git a/src/eval.c b/src/eval.c index 3c0c65e9366..6cca13a8fda 100644 --- a/src/eval.c +++ b/src/eval.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" #include "blockinput.h" @@ -1072,7 +1071,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object catchlist = &c; /* Call FUNC. */ - if (! _setjmp (c.jmp)) + if (! sys_setjmp (c.jmp)) c.val = (*func) (arg); /* Throw works by a longjmp that comes right here. */ @@ -1140,7 +1139,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) backtrace_list = catch->backlist; lisp_eval_depth = catch->lisp_eval_depth; - _longjmp (catch->jmp, 1); + sys_longjmp (catch->jmp, 1); } DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, @@ -1246,7 +1245,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, c.interrupt_input_blocked = interrupt_input_blocked; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; - if (_setjmp (c.jmp)) + if (sys_setjmp (c.jmp)) { if (!NILP (h.var)) specbind (h.var, c.val); @@ -1301,7 +1300,7 @@ internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers, c.interrupt_input_blocked = interrupt_input_blocked; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; - if (_setjmp (c.jmp)) + if (sys_setjmp (c.jmp)) { return (*hfun) (c.val); } @@ -1339,7 +1338,7 @@ internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg, c.interrupt_input_blocked = interrupt_input_blocked; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; - if (_setjmp (c.jmp)) + if (sys_setjmp (c.jmp)) { return (*hfun) (c.val); } @@ -1381,7 +1380,7 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), c.interrupt_input_blocked = interrupt_input_blocked; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; - if (_setjmp (c.jmp)) + if (sys_setjmp (c.jmp)) { return (*hfun) (c.val); } @@ -1425,7 +1424,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), c.interrupt_input_blocked = interrupt_input_blocked; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; - if (_setjmp (c.jmp)) + if (sys_setjmp (c.jmp)) { return (*hfun) (c.val, nargs, args); } diff --git a/src/fileio.c b/src/fileio.c index f0b3f0cc2fd..ca71af7ed95 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #ifdef HAVE_PWD_H diff --git a/src/filelock.c b/src/filelock.c index 1f599c68912..17f3f253249 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #ifdef HAVE_PWD_H #include diff --git a/src/floatfns.c b/src/floatfns.c index 66d7ca4af2c..4fe209fcb61 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -29,7 +29,7 @@ along with GNU Emacs. If not, see . */ */ #include -#include + #include "lisp.h" #include "syssignal.h" diff --git a/src/fns.c b/src/fns.c index 91dc6639150..42c4f817f29 100644 --- a/src/fns.c +++ b/src/fns.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include diff --git a/src/font.c b/src/font.c index 49a09bced28..da8c5ae52fc 100644 --- a/src/font.c +++ b/src/font.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include diff --git a/src/fontset.c b/src/fontset.c index 2b955fe6b11..35d4bfb367e 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "blockinput.h" diff --git a/src/frame.c b/src/frame.c index d10969692ee..6930dac3ce8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -24,7 +24,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include diff --git a/src/fringe.c b/src/fringe.c index 0c2109a0f8e..6e6deeddb08 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -18,7 +18,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "frame.h" diff --git a/src/ftfont.c b/src/ftfont.c index a85773a9a21..f07ad6f33c7 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -21,8 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include - #include #include diff --git a/src/ftxfont.c b/src/ftxfont.c index c705ede62c4..466250bd43f 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" diff --git a/src/gnutls.c b/src/gnutls.c index a2573f6bd99..1c4693aee32 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -18,7 +18,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "process.h" diff --git a/src/gtkutil.c b/src/gtkutil.c index 884574e1062..1eb4b2cabdf 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #ifdef USE_GTK #include #include -#include #include diff --git a/src/image.c b/src/image.c index d4e54fb7dcd..6803dbe8f00 100644 --- a/src/image.c +++ b/src/image.c @@ -5514,6 +5514,13 @@ init_png_functions (Lisp_Object libraries) #endif /* HAVE_NTGUI */ +/* Possibly inefficient/inexact substitutes for _setjmp and _longjmp. + Do not use sys_setjmp, as PNG supports only jmp_buf. The _longjmp + substitute may munge the signal mask, but that should be OK here. */ +#ifndef HAVE__SETJMP +# define _setjmp(j) setjmp (j) +# define _longjmp longjmp +#endif #if (PNG_LIBPNG_VER < 10500) #define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1)) @@ -5593,7 +5600,7 @@ png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length) struct png_load_context { - /* These are members so that _longjmp doesn't munge local variables. */ + /* These are members so that longjmp doesn't munge local variables. */ png_struct *png_ptr; png_info *info_ptr; png_info *end_info; @@ -6129,9 +6136,9 @@ jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired) struct my_jpeg_error_mgr { struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; + sys_jmp_buf setjmp_buffer; - /* The remaining members are so that _longjmp doesn't munge local + /* The remaining members are so that longjmp doesn't munge local variables. */ struct jpeg_decompress_struct cinfo; enum @@ -6151,7 +6158,7 @@ my_error_exit (j_common_ptr cinfo) { struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; mgr->failure_code = MY_JPEG_ERROR_EXIT; - _longjmp (mgr->setjmp_buffer, 1); + sys_longjmp (mgr->setjmp_buffer, 1); } @@ -6401,7 +6408,7 @@ jpeg_load_body (struct frame *f, struct image *img, error is detected. This function will perform a longjmp. */ mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub); mgr->pub.error_exit = my_error_exit; - if (_setjmp (mgr->setjmp_buffer)) + if (sys_setjmp (mgr->setjmp_buffer)) { switch (mgr->failure_code) { @@ -6460,14 +6467,14 @@ jpeg_load_body (struct frame *f, struct image *img, if (!check_image_size (f, width, height)) { mgr->failure_code = MY_JPEG_INVALID_IMAGE_SIZE; - _longjmp (mgr->setjmp_buffer, 1); + sys_longjmp (mgr->setjmp_buffer, 1); } /* Create X image and pixmap. */ if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) { mgr->failure_code = MY_JPEG_CANNOT_CREATE_X; - _longjmp (mgr->setjmp_buffer, 1); + sys_longjmp (mgr->setjmp_buffer, 1); } /* Allocate colors. When color quantization is used, diff --git a/src/indent.c b/src/indent.c index c60315a7f6e..053643e6319 100644 --- a/src/indent.c +++ b/src/indent.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "character.h" diff --git a/src/insdel.c b/src/insdel.c index bfb2327a696..87010cd8251 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include -#include #include diff --git a/src/intervals.c b/src/intervals.c index e508f968963..5a47cacb2dd 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -41,7 +41,6 @@ along with GNU Emacs. If not, see . */ #define INTERVALS_INLINE EXTERN_INLINE -#include #include #include "lisp.h" #include "intervals.h" diff --git a/src/keyboard.c b/src/keyboard.c index 45638bc412b..d164083fb86 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -22,7 +22,7 @@ along with GNU Emacs. If not, see . */ #define KEYBOARD_INLINE EXTERN_INLINE #include -#include + #include "lisp.h" #include "termchar.h" #include "termopts.h" @@ -145,7 +145,7 @@ static ptrdiff_t before_command_echo_length; /* For longjmp to where kbd input is being done. */ -static jmp_buf getcjmp; +static sys_jmp_buf getcjmp; /* True while doing kbd input. */ int waiting_for_input; @@ -434,8 +434,8 @@ static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object, Lisp_Object *, ptrdiff_t); static Lisp_Object make_lispy_switch_frame (Lisp_Object); static int help_char_p (Lisp_Object); -static void save_getcjmp (jmp_buf); -static void restore_getcjmp (jmp_buf); +static void save_getcjmp (sys_jmp_buf); +static void restore_getcjmp (sys_jmp_buf); static Lisp_Object apply_modifiers (int, Lisp_Object); static void clear_event (struct input_event *); static Lisp_Object restore_kboard_configuration (Lisp_Object); @@ -2315,8 +2315,8 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, { volatile Lisp_Object c; ptrdiff_t jmpcount; - jmp_buf local_getcjmp; - jmp_buf save_jump; + sys_jmp_buf local_getcjmp; + sys_jmp_buf save_jump; volatile int key_already_recorded = 0; Lisp_Object tem, save; volatile Lisp_Object previous_echo_area_message; @@ -2562,7 +2562,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, it *must not* be in effect when we call redisplay. */ jmpcount = SPECPDL_INDEX (); - if (_setjmp (local_getcjmp)) + if (sys_setjmp (local_getcjmp)) { /* Handle quits while reading the keyboard. */ /* We must have saved the outer value of getcjmp here, @@ -3394,13 +3394,13 @@ record_char (Lisp_Object c) See read_process_output. */ static void -save_getcjmp (jmp_buf temp) +save_getcjmp (sys_jmp_buf temp) { memcpy (temp, getcjmp, sizeof getcjmp); } static void -restore_getcjmp (jmp_buf temp) +restore_getcjmp (sys_jmp_buf temp) { memcpy (getcjmp, temp, sizeof getcjmp); } @@ -10979,7 +10979,7 @@ quit_throw_to_read_char (int from_signal) do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), 0, 0, Qnil); - _longjmp (getcjmp, 1); + sys_longjmp (getcjmp, 1); } DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, diff --git a/src/keymap.c b/src/keymap.c index d79ff89ed67..66fb52061f9 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -40,7 +40,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include "commands.h" #include "character.h" diff --git a/src/lisp.h b/src/lisp.h index ca22ca81228..335ed8ba831 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_LISP_H #define EMACS_LISP_H +#include #include #include #include @@ -1963,7 +1964,24 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int); static struct Lisp_Kboard_Objfwd ko_fwd; \ defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ } while (0) + +/* Save and restore the instruction and environment pointers, + without affecting the signal mask. */ +#ifdef HAVE__SETJMP +typedef jmp_buf sys_jmp_buf; +# define sys_setjmp(j) _setjmp (j) +# define sys_longjmp(j, v) _longjmp (j, v) +#elif defined HAVE_SIGSETJMP +typedef sigjmp_buf sys_jmp_buf; +# define sys_setjmp(j) sigsetjmp (j, 0) +# define sys_longjmp(j, v) siglongjmp (j, v) +#else +/* A non-POSIX platform; assume longjmp does not affect the sigmask. */ +typedef jmp_buf sys_jmp_buf; +# define sys_setjmp(j) setjmp (j) +# define sys_longjmp(j, v) longjmp (j, v) +#endif /* Structure for recording Lisp call stack for backtrace purposes. */ @@ -2056,7 +2074,7 @@ struct catchtag Lisp_Object volatile val; struct catchtag *volatile next; struct gcpro *gcpro; - jmp_buf jmp; + sys_jmp_buf jmp; struct backtrace *backlist; struct handler *handlerlist; EMACS_INT lisp_eval_depth; diff --git a/src/lread.c b/src/lread.c index 08a2e856c00..08d5f97292b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include #include /* For CHAR_BIT. */ -#include #include #include "lisp.h" #include "intervals.h" diff --git a/src/macros.c b/src/macros.c index e81068181b9..a507f12e343 100644 --- a/src/macros.c +++ b/src/macros.c @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "macros.h" #include "commands.h" diff --git a/src/marker.c b/src/marker.c index bfbb161a71d..0c4e8cb3b55 100644 --- a/src/marker.c +++ b/src/marker.c @@ -18,7 +18,7 @@ along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/menu.c b/src/menu.c index bfdc68ca118..7b01d1faefc 100644 --- a/src/menu.c +++ b/src/menu.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include /* for INT_MAX */ #include "lisp.h" diff --git a/src/minibuf.c b/src/minibuf.c index 4ed480a8408..8a1e0ddde86 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "commands.h" diff --git a/src/nsfns.m b/src/nsfns.m index f73086eeee9..ed8d44014d5 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -31,7 +31,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) #include #include -#include #include #include "lisp.h" diff --git a/src/nsfont.m b/src/nsfont.m index 1c9976ec6cc..eba1eb04765 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -23,7 +23,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu) /* This should be the first include, as it may set up #defines affecting interpretation of even the system includes. */ #include -#include #include "lisp.h" #include "dispextern.h" diff --git a/src/nsimage.m b/src/nsimage.m index 8a8a3ddaae4..668664c7a20 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) /* This should be the first include, as it may set up #defines affecting interpretation of even the system includes. */ #include -#include #include "lisp.h" #include "dispextern.h" diff --git a/src/nsmenu.m b/src/nsmenu.m index d0f3e45e939..3057f4f6a20 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -24,7 +24,6 @@ Carbon version by Yamamoto Mitsuharu. */ /* This should be the first include, as it may set up #defines affecting interpretation of even the system includes. */ #include -#include #include "lisp.h" #include "window.h" diff --git a/src/nsselect.m b/src/nsselect.m index e0bbfe58636..95bc1a95957 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) /* This should be the first include, as it may set up #defines affecting interpretation of even the system includes. */ #include -#include #include "lisp.h" #include "nsterm.h" diff --git a/src/nsterm.m b/src/nsterm.m index f9611fd1210..f1f23ad4479 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -35,7 +35,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) #include #include #include -#include #include #include diff --git a/src/print.c b/src/print.c index 16116643ad0..aae13bb6764 100644 --- a/src/print.c +++ b/src/print.c @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/process.c b/src/process.c index b4b05a4b2e2..6dbff6f4b16 100644 --- a/src/process.c +++ b/src/process.c @@ -25,12 +25,9 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include /* Some typedefs are used in sys/file.h. */ #include #include -#include - #include #include @@ -5421,7 +5418,7 @@ read_process_output (Lisp_Object proc, register int channel) /* Sending data to subprocess */ -static jmp_buf send_process_frame; +static sys_jmp_buf send_process_frame; static Lisp_Object process_sent_to; static _Noreturn void @@ -5431,7 +5428,7 @@ handle_pipe_signal (int sig) sigemptyset (&unblocked); sigaddset (&unblocked, SIGPIPE); pthread_sigmask (SIG_UNBLOCK, &unblocked, 0); - _longjmp (send_process_frame, 1); + sys_longjmp (send_process_frame, 1); } static void @@ -5640,7 +5637,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2, CFLAGS="-g -O": The value of the parameter `proc' is clobbered when returning with longjmp despite being declared volatile. */ - if (!_setjmp (send_process_frame)) + if (!sys_setjmp (send_process_frame)) { p = XPROCESS (proc); /* Repair any setjmp clobbering. */ process_sent_to = proc; diff --git a/src/ralloc.c b/src/ralloc.c index 74834333aa3..b0134ea730a 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -25,7 +25,7 @@ along with GNU Emacs. If not, see . */ #ifdef emacs #include -#include + #include "lisp.h" /* Needed for VALBITS. */ #include "blockinput.h" diff --git a/src/regex.c b/src/regex.c index 472ef727979..92264ccae23 100644 --- a/src/regex.c +++ b/src/regex.c @@ -126,7 +126,6 @@ that make sense only in Emacs. */ #ifdef emacs -# include # include "lisp.h" # include "character.h" # include "buffer.h" diff --git a/src/region-cache.c b/src/region-cache.c index c3eb087aade..832f4bfd214 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "character.h" diff --git a/src/scroll.c b/src/scroll.c index 79dd464b29e..71ce43b2e48 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include "termchar.h" #include "dispextern.h" diff --git a/src/search.c b/src/search.c index 72bd5605709..99fd7971e4c 100644 --- a/src/search.c +++ b/src/search.c @@ -20,7 +20,7 @@ along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "syntax.h" #include "category.h" diff --git a/src/sheap.c b/src/sheap.c index 3ae14b5daec..f6022ea3ce7 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -20,7 +20,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include @@ -93,4 +93,3 @@ report_sheap_usage (int die_if_pure_storage_exceeded) bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); message ("%s", buf); } - diff --git a/src/sound.c b/src/sound.c index fe48bb277b2..0ee85312fd3 100644 --- a/src/sound.c +++ b/src/sound.c @@ -44,7 +44,7 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include + #include "lisp.h" #include "dispextern.h" #include "atimer.h" diff --git a/src/syntax.c b/src/syntax.c index fdd9353bb87..91ef4e66663 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include "commands.h" #include "character.h" diff --git a/src/sysdep.c b/src/sysdep.c index b8f35e79146..9065b38d6fc 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #ifdef HAVE_PWD_H #include #include diff --git a/src/term.c b/src/term.c index 47bde5ac240..f4117d67dec 100644 --- a/src/term.c +++ b/src/term.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "termchar.h" diff --git a/src/termcap.c b/src/termcap.c index d1b05e8df94..e494cd113d9 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -19,7 +19,6 @@ Boston, MA 02110-1301, USA. */ /* Emacs config.h may rename various library functions such as malloc. */ #include -#include #include #include #include diff --git a/src/terminal.c b/src/terminal.c index c51a18dfa61..719c2a36111 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #define TERMHOOKS_INLINE EXTERN_INLINE #include -#include #include "lisp.h" #include "frame.h" diff --git a/src/terminfo.c b/src/terminfo.c index ca2d89a000b..124c452a4a9 100644 --- a/src/terminfo.c +++ b/src/terminfo.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include #include "tparam.h" -#include #include "lisp.h" /* Define these variables that serve as global parameters to termcap, diff --git a/src/textprop.c b/src/textprop.c index 2a9efba1c45..872912ea706 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "intervals.h" #include "character.h" diff --git a/src/tparam.c b/src/tparam.c index 58a825c90d7..164f61d471b 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ /* Emacs config.h may rename various library functions such as malloc. */ #include -#include + #include "lisp.h" /* for xmalloc */ #include "tparam.h" diff --git a/src/undo.c b/src/undo.c index 9cd1d5f9f67..e878ef4dcf9 100644 --- a/src/undo.c +++ b/src/undo.c @@ -18,7 +18,7 @@ along with GNU Emacs. If not, see . */ #include -#include + #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/unexaix.c b/src/unexaix.c index c09156296f7..c01a22a79f6 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -89,7 +89,6 @@ static int adjust_lnnoptrs (int, int, const char *); static int pagemask; -#include #include "lisp.h" static void diff --git a/src/unexcoff.c b/src/unexcoff.c index e83042a379d..966dd58cb6e 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c @@ -120,7 +120,6 @@ static int pagemask; #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) -#include #include "lisp.h" static void diff --git a/src/unexcw.c b/src/unexcw.c index eae534cf4dd..96c4b4a9aec 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include "unexec.h" -#include #include #include #include diff --git a/src/unexsol.c b/src/unexsol.c index 336f3b4faea..470206d5838 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -4,7 +4,6 @@ #include "unexec.h" #include -#include #include "lisp.h" #include "character.h" diff --git a/src/vm-limit.c b/src/vm-limit.c index cf697b56fdf..8de0acd1bb2 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include -#include #include /* for 'environ', on AIX */ #include "lisp.h" #include "mem-limits.h" diff --git a/src/widget.c b/src/widget.c index 0100acc8143..fd5ad167125 100644 --- a/src/widget.c +++ b/src/widget.c @@ -30,7 +30,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include + #include "lisp.h" #include "xterm.h" diff --git a/src/window.c b/src/window.c index 18a550782e8..b3db1292e5c 100644 --- a/src/window.c +++ b/src/window.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #define WINDOW_INLINE EXTERN_INLINE #include -#include #include "lisp.h" #include "character.h" diff --git a/src/xdisp.c b/src/xdisp.c index 320998a5713..8e0975cf65a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -273,7 +273,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "keyboard.h" diff --git a/src/xfaces.c b/src/xfaces.c index c113c1a37b7..c240a05c6c0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -204,7 +204,6 @@ along with GNU Emacs. If not, see . */ #include #include #include /* This needs to be before termchar.h */ -#include #include "lisp.h" #include "character.h" diff --git a/src/xfns.c b/src/xfns.c index 90b54d12345..8304a3df04f 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include /* This makes the fields of a Display accessible, in Xlib header files. */ diff --git a/src/xfont.c b/src/xfont.c index 7755b780815..1f2fd13f1b7 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" diff --git a/src/xftfont.c b/src/xftfont.c index 404b9124099..9f52eb8b233 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include diff --git a/src/xgselect.c b/src/xgselect.c index 5f4c7edfb79..c161564a322 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -19,14 +19,12 @@ along with GNU Emacs. If not, see . */ #include -#include #include "xgselect.h" #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) #include #include -#include #include "xterm.h" int diff --git a/src/xmenu.c b/src/xmenu.c index 605db13e149..d03a4bc974b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -33,7 +33,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "keyboard.h" diff --git a/src/xml.c b/src/xml.c index 7bc6130b8b1..b668525cf26 100644 --- a/src/xml.c +++ b/src/xml.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #ifdef HAVE_LIBXML2 -#include #include #include #include diff --git a/src/xrdb.c b/src/xrdb.c index 624bafa5e92..73672c9617c 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" diff --git a/src/xselect.c b/src/xselect.c index 5a3b7452c6d..ab199e0b9b9 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include #include #include /* termhooks.h needs this */ -#include #ifdef HAVE_SYS_TYPES_H #include diff --git a/src/xsettings.c b/src/xsettings.c index a28d75d9422..58c84495489 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" #include "xterm.h" @@ -711,12 +710,12 @@ apply_xft_settings (struct x_display_info *dpyinfo, if (send_event_p) store_config_changed_event (Qfont_render, XCAR (dpyinfo->name_list_element)); - Vxft_settings + Vxft_settings = make_formatted_string (buf, format, oldsettings.aa, oldsettings.hinting, oldsettings.rgba, oldsettings.lcdfilter, oldsettings.hintstyle, oldsettings.dpi); - + } else FcPatternDestroy (pat); diff --git a/src/xsmfns.c b/src/xsmfns.c index cddbb2aae86..8067899f931 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -29,7 +29,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "systime.h" diff --git a/src/xterm.c b/src/xterm.c index 54d4f14bdd0..900a1d78b80 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #ifdef HAVE_X_WINDOWS @@ -47,7 +46,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include /* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed. */ /* #include */ From 7105c8cbf3a3226701e4d2ecb0b9c2d207648a98 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Sep 2012 11:03:11 +0300 Subject: [PATCH 184/216] Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, completing fix for bug #12446. src/w32xfns.c: src/w32uniscribe.c: src/w32term.c: src/w32select.c: src/w32reg.c: src/w32proc.c: src/w32menu.c: src/w32inevt.c: src/w32heap.c: src/w32font.c: src/w32fns.c: src/w32console.c: src/w32.c: src/w16select.c: Remove inclusion of setjmp.h, as it is now included by lisp.h. This completes removal of setjmp.h inclusion erroneously announced in the previous commit. src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary more accurate. src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is not defined as a macro. The latter happens on MS-Windows. --- src/ChangeLog | 28 +++++++++++++++++++++++++++- src/image.c | 8 ++++++-- src/lisp.h | 3 ++- src/w16select.c | 1 - src/w32.c | 1 - src/w32console.c | 1 - src/w32fns.c | 1 - src/w32font.c | 1 - src/w32heap.c | 1 - src/w32inevt.c | 1 - src/w32menu.c | 1 - src/w32proc.c | 1 - src/w32reg.c | 1 - src/w32select.c | 1 - src/w32term.c | 1 - src/w32uniscribe.c | 1 - src/w32xfns.c | 1 - 17 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fb59e9e24dc..f9d31b08abd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,34 @@ +2012-09-15 Eli Zaretskii + + * w32xfns.c: + * w32uniscribe.c: + * w32term.c: + * w32select.c: + * w32reg.c: + * w32proc.c: + * w32menu.c: + * w32inevt.c: + * w32heap.c: + * w32font.c: + * w32fns.c: + * w32console.c: + * w32.c: + * w16select.c: Remove inclusion of setjmp.h, as it is now included + by lisp.h. This completes removal of setjmp.h inclusion + erroneously announced in the previous commit. (Bug#12446) + + * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary + more accurate. + + * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is + not defined as a macro. The latter happens on MS-Windows. + (Bug#12446) + 2012-09-15 Paul Eggert Port better to POSIX hosts lacking _setjmp (Bug#12446). * lisp.h: Include here, since we use its symbols here. - All instances of '#include ' removed, if the + Some instances of '#include ' removed, if the only reason for the instance was because "lisp.h" was included. (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols. Unless otherwise specified, replace all uses of jmp_buf, _setjmp, diff --git a/src/image.c b/src/image.c index 6803dbe8f00..02151c500cc 100644 --- a/src/image.c +++ b/src/image.c @@ -5516,9 +5516,13 @@ init_png_functions (Lisp_Object libraries) /* Possibly inefficient/inexact substitutes for _setjmp and _longjmp. Do not use sys_setjmp, as PNG supports only jmp_buf. The _longjmp - substitute may munge the signal mask, but that should be OK here. */ + substitute may munge the signal mask, but that should be OK here. + MinGW (MS-Windows) uses _setjmp and defines setjmp to _setjmp in + the system header setjmp.h; don't mess up that. */ #ifndef HAVE__SETJMP -# define _setjmp(j) setjmp (j) +# ifndef setjmp +# define _setjmp(j) setjmp (j) +# endif # define _longjmp longjmp #endif diff --git a/src/lisp.h b/src/lisp.h index 335ed8ba831..447c6bd296b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1977,7 +1977,8 @@ typedef sigjmp_buf sys_jmp_buf; # define sys_setjmp(j) sigsetjmp (j, 0) # define sys_longjmp(j, v) siglongjmp (j, v) #else -/* A non-POSIX platform; assume longjmp does not affect the sigmask. */ +/* A platform that uses neither _longjmp nor siglongjmp; assume + longjmp does not affect the sigmask. */ typedef jmp_buf sys_jmp_buf; # define sys_setjmp(j) setjmp (j) # define sys_longjmp(j, v) longjmp (j, v) diff --git a/src/w16select.c b/src/w16select.c index 2026de7421d..a3f6f1fb9ae 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -31,7 +31,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "dispextern.h" /* frame.h seems to want this */ #include "frame.h" /* Need this to get the X window of selected_frame */ diff --git a/src/w32.c b/src/w32.c index 04f7471577c..bcb0511e2fa 100644 --- a/src/w32.c +++ b/src/w32.c @@ -33,7 +33,6 @@ along with GNU Emacs. If not, see . */ #include #include /* for _mbspbrk */ #include -#include #include /* must include CRT headers *before* config.h */ diff --git a/src/w32console.c b/src/w32console.c index 76585851e7f..b22b09af2f2 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "character.h" diff --git a/src/w32fns.c b/src/w32fns.c index ec1acbd89d9..be008bb18c8 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "w32term.h" diff --git a/src/w32font.c b/src/w32font.c index 8b3a0e4312e..833b7cdfb25 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "w32term.h" diff --git a/src/w32heap.c b/src/w32heap.c index 26cc9aa0a0f..dc65198f90b 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "w32heap.h" #include "lisp.h" /* for VALMASK */ diff --git a/src/w32inevt.c b/src/w32inevt.c index 731dd6715dc..ee07db5335b 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #ifndef MOUSE_MOVED #define MOUSE_MOVED 1 diff --git a/src/w32menu.c b/src/w32menu.c index d4de73a0de7..fa7db64f147 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "keyboard.h" diff --git a/src/w32proc.c b/src/w32proc.c index 74427e76a4f..26a0925ad87 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -28,7 +28,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include /* must include CRT headers *before* config.h */ #include diff --git a/src/w32reg.c b/src/w32reg.c index 9c727ae5ab7..8a6a3c853b1 100644 --- a/src/w32reg.c +++ b/src/w32reg.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ /* Written by Kevin Gallo */ #include -#include #include "lisp.h" #include "w32term.h" #include "blockinput.h" diff --git a/src/w32select.c b/src/w32select.c index 3fb88d4f17f..11c68c9c617 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -73,7 +73,6 @@ along with GNU Emacs. If not, see . */ */ #include -#include #include "lisp.h" #include "w32term.h" /* for all of the w32 includes */ #include "w32heap.h" /* os_subtype */ diff --git a/src/w32term.c b/src/w32term.c index 28c1c593cf6..69a16e1852b 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "blockinput.h" #include "w32term.h" diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index cf99d14dc77..5d160b9d42f 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -27,7 +27,6 @@ along with GNU Emacs. If not, see . */ #define _WIN32_WINNT 0x500 #include #include -#include #include "lisp.h" #include "w32term.h" diff --git a/src/w32xfns.c b/src/w32xfns.c index 820dbcc76c6..33f40fc7c01 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include "lisp.h" #include "keyboard.h" #include "frame.h" From 39a57ad07b0521dd6dbcae9cd4996366aa59e1ba Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 15 Sep 2012 01:45:27 -0700 Subject: [PATCH 185/216] Port _setjmp fix to POSIXish hosts as well as Microsoft. * nt/config.nt: Attempt to sync with autogen/config.in. (HAVE_SIGSETJMP, HAVE__SETJMP): New macros. (_longjmp, _setjmp): Remove. * src/image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as it's needed on POSIXish hosts that lack _setjmp. Attempt to solve the Microsoft problem in a different way, by altering nt/config.nt. --- nt/ChangeLog | 7 +++++++ nt/config.nt | 15 +++++++-------- src/ChangeLog | 7 +++++++ src/image.c | 4 +--- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 54e5570072a..197ce0cf850 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,10 @@ +2012-09-15 Paul Eggert + + Port _setjmp fix to POSIXish hosts as well as Microsoft. + * config.nt: Attempt to sync with autogen/config.in. + (HAVE_SIGSETJMP, HAVE__SETJMP): New macros. + (_longjmp, _setjmp): Remove. + 2012-09-14 Juanma Barranquero * config.nt: Sync with autogen/config.in. diff --git a/nt/config.nt b/nt/config.nt index 5121a013aad..82b7da430ab 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -800,6 +800,10 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T +/* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is + irrelevant if HAVE__SETJMP is defined. */ +#undef HAVE_SIGSETJMP + /* Define to 1 if the system has the type `sigset_t'. */ #undef HAVE_SIGSET_T @@ -1084,6 +1088,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME +/* Define to 1 if _setjmp and _longjmp work. */ +#define HAVE__SETJMP 1 + /* Define to 1 if you have the `__builtin_unwind_init' function. */ #undef HAVE___BUILTIN_UNWIND_INIT @@ -1511,14 +1518,6 @@ along with GNU Emacs. If not, see . */ declarations. Define as empty for no equivalent. */ #undef __restrict_arr -/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may - alter signal masks, callers of _longjmp should not assume that it leaves - signal masks alone. */ -#undef _longjmp - -/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ -#undef _setjmp - /* Some platforms that do not use configure define this to include extra configuration information. */ #define config_opsysfile diff --git a/src/ChangeLog b/src/ChangeLog index f9d31b08abd..c6c314b9589 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-09-15 Paul Eggert + + Port _setjmp fix to POSIXish hosts as well as Microsoft. + * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as + it's needed on POSIXish hosts that lack _setjmp. Attempt to solve + the Microsoft problem in a different way, by altering ../nt/config.nt. + 2012-09-15 Eli Zaretskii * w32xfns.c: diff --git a/src/image.c b/src/image.c index 02151c500cc..8fc1c8637eb 100644 --- a/src/image.c +++ b/src/image.c @@ -5520,9 +5520,7 @@ init_png_functions (Lisp_Object libraries) MinGW (MS-Windows) uses _setjmp and defines setjmp to _setjmp in the system header setjmp.h; don't mess up that. */ #ifndef HAVE__SETJMP -# ifndef setjmp -# define _setjmp(j) setjmp (j) -# endif +# define _setjmp(j) setjmp (j) # define _longjmp longjmp #endif From e2d8f316d16ddcc7aafa071344a2460d5e7d373d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 15 Sep 2012 06:17:37 -0400 Subject: [PATCH 186/216] Auto-commit of generated files. --- autogen/config.in | 15 +++--- autogen/configure | 128 +++++++++++++++++++++++++++++++--------------- 2 files changed, 95 insertions(+), 48 deletions(-) diff --git a/autogen/config.in b/autogen/config.in index f8e4c2bcce3..39e948ee228 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -791,6 +791,10 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T +/* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is + irrelevant if HAVE__SETJMP is defined. */ +#undef HAVE_SIGSETJMP + /* Define to 1 if the system has the type `sigset_t'. */ #undef HAVE_SIGSET_T @@ -1074,6 +1078,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME +/* Define to 1 if _setjmp and _longjmp work. */ +#undef HAVE__SETJMP + /* Define to 1 if you have the `__builtin_unwind_init' function. */ #undef HAVE___BUILTIN_UNWIND_INIT @@ -1502,14 +1509,6 @@ along with GNU Emacs. If not, see . */ declarations. Define as empty for no equivalent. */ #undef __restrict_arr -/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may - alter signal masks, callers of _longjmp should not assume that it leaves - signal masks alone. */ -#undef _longjmp - -/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */ -#undef _setjmp - /* Some platforms that do not use configure define this to include extra configuration information. */ #undef config_opsysfile diff --git a/autogen/configure b/autogen/configure index 63295f68db0..0cbdd7c732a 100755 --- a/autogen/configure +++ b/autogen/configure @@ -2061,7 +2061,7 @@ Optional Packages: --with-mailhost=HOSTNAME string giving default POP mail host --without-sound don't compile with sound support - --without-sync-input process async input synchronously + --without-sync-input don't process async input synchronously --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no) --with-wide-int prefer wide Emacs integers (typically 62-bit) @@ -8578,8 +8578,9 @@ $as_echo "no" >&6; } ALSA_CFLAGS="" ALSA_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + ALSA_PKG_ERRORS=`($PKG_CONFIG --print-errors "$ALSA_MODULES") 2>&1` fi @@ -10398,8 +10399,9 @@ $as_echo "no" >&6; } RSVG_CFLAGS="" RSVG_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + RSVG_PKG_ERRORS=`($PKG_CONFIG --print-errors "$RSVG_MODULE") 2>&1` fi @@ -10468,8 +10470,9 @@ $as_echo "no" >&6; } IMAGEMAGICK_CFLAGS="" IMAGEMAGICK_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + IMAGEMAGICK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$IMAGEMAGICK_MODULE") 2>&1` fi @@ -10554,8 +10557,9 @@ $as_echo "no" >&6; } GTK_CFLAGS="" GTK_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1` fi @@ -10624,8 +10628,9 @@ $as_echo "no" >&6; } GTK_CFLAGS="" GTK_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1` fi @@ -10643,10 +10648,10 @@ $as_echo "no" >&6; } pkg_check_gtk=no fi - if test "$pkg_check_gtk" = "no"; then - if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then - as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 - fi + if test "$pkg_check_gtk" = "no" && + { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; } + then + as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5 fi fi @@ -10785,8 +10790,9 @@ $as_echo "no" >&6; } DBUS_CFLAGS="" DBUS_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + DBUS_PKG_ERRORS=`($PKG_CONFIG --print-errors "dbus-1 >= 1.0") 2>&1` fi @@ -10865,8 +10871,9 @@ $as_echo "no" >&6; } GSETTINGS_CFLAGS="" GSETTINGS_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + GSETTINGS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gio-2.0 >= 2.26") 2>&1` fi @@ -10926,8 +10933,9 @@ $as_echo "no" >&6; } GCONF_CFLAGS="" GCONF_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + GCONF_PKG_ERRORS=`($PKG_CONFIG --print-errors "gconf-2.0 >= 2.13") 2>&1` fi @@ -10986,8 +10994,9 @@ $as_echo "no" >&6; } GOBJECT_CFLAGS="" GOBJECT_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + GOBJECT_PKG_ERRORS=`($PKG_CONFIG --print-errors "gobject-2.0 >= 2.0") 2>&1` fi @@ -11119,8 +11128,9 @@ $as_echo "no" >&6; } LIBGNUTLS_CFLAGS="" LIBGNUTLS_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + LIBGNUTLS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gnutls >= 2.6.6") 2>&1` fi @@ -11748,8 +11758,9 @@ $as_echo "no" >&6; } FONTCONFIG_CFLAGS="" FONTCONFIG_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + FONTCONFIG_PKG_ERRORS=`($PKG_CONFIG --print-errors "fontconfig >= 2.2.0") 2>&1` fi @@ -11806,8 +11817,9 @@ $as_echo "no" >&6; } XFT_CFLAGS="" XFT_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + XFT_PKG_ERRORS=`($PKG_CONFIG --print-errors "xft >= 0.13.0") 2>&1` fi @@ -11973,8 +11985,9 @@ $as_echo "no" >&6; } FREETYPE_CFLAGS="" FREETYPE_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + FREETYPE_PKG_ERRORS=`($PKG_CONFIG --print-errors "freetype2") 2>&1` fi @@ -12033,8 +12046,9 @@ $as_echo "no" >&6; } LIBOTF_CFLAGS="" LIBOTF_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + LIBOTF_PKG_ERRORS=`($PKG_CONFIG --print-errors "libotf") 2>&1` fi @@ -12141,8 +12155,9 @@ $as_echo "no" >&6; } M17N_FLT_CFLAGS="" M17N_FLT_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + M17N_FLT_PKG_ERRORS=`($PKG_CONFIG --print-errors "m17n-flt") 2>&1` fi @@ -12830,8 +12845,9 @@ $as_echo "no" >&6; } LIBXML2_CFLAGS="" LIBXML2_LIBS="" ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` + ## do set a variable so people can do so. Do it in a subshell + ## to capture any diagnostics in invoking pkg-config. + LIBXML2_PKG_ERRORS=`($PKG_CONFIG --print-errors "libxml-2.0 > 2.6.17") 2>&1` fi @@ -15461,13 +15477,45 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5 $as_echo "$emacs_cv_func__setjmp" >&6; } -if test $emacs_cv_func__setjmp = no; then +if test $emacs_cv_func__setjmp = yes; then -$as_echo "#define _setjmp setjmp" >>confdefs.h +$as_echo "#define HAVE__SETJMP 1" >>confdefs.h +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 +$as_echo_n "checking for sigsetjmp... " >&6; } +if test "${emacs_cv_func_sigsetjmp+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -$as_echo "#define _longjmp longjmp" >>confdefs.h +int +main () +{ +sigjmp_buf j; + if (! sigsetjmp (j, 1)) + siglongjmp (j, 1); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_func_sigsetjmp=yes +else + emacs_cv_func_sigsetjmp=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5 +$as_echo "$emacs_cv_func_sigsetjmp" >&6; } + if test $emacs_cv_func_sigsetjmp = yes; then +$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h + + fi fi case $opsys in From 830be228cde51f401457d95de0af8152a5a9b75d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 15 Sep 2012 06:20:56 -0400 Subject: [PATCH 187/216] Auto-commit of loaddefs files. --- lisp/dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index ebc8f5da6d5..54921a4ea66 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3744,7 +3744,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "22ce64daa7ccb5698cb6b1279aa59ec2") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "3c768e470d5d053d0049e0286ce38da7") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ From 72aa16e19b24eb73c812c13d4cd77afd7977fc25 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 15 Sep 2012 13:00:45 -0700 Subject: [PATCH 188/216] Add option to ask bzr itself for the emacs bzr revision * lisp/version.el (emacs-bzr-version-bzr): New function. (emacs-bzr-get-version): Add optional EXTERNAL argument. --- lisp/ChangeLog | 3 ++ lisp/version.el | 94 +++++++++++++++++++++++++++++++------------------ 2 files changed, 63 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c9aa7e99356..b436d9e364e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-09-15 Glenn Morris + * version.el (emacs-bzr-version-bzr): New function. + (emacs-bzr-get-version): Add optional EXTERNAL argument. + * vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local checkouts, check the parent dirstate matches the branch. Add "--tree" to "bzr revno" arguments. Don't try to shorten the diff --git a/lisp/version.el b/lisp/version.el index 47476cb268a..1fb3828e15d 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -104,48 +104,74 @@ Returns nil if unable to find this information." (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") (match-string 1)))))) -(defun emacs-bzr-get-version (&optional dir) +(defun emacs-bzr-version-bzr (dir) + "Ask bzr itself for the version information for directory DIR." + ;; Comments on `bzr version-info': + ;; i) Unknown files also cause clean != 1. + ;; ii) It can be slow, contacting the upstream repo to get the + ;; branch nick if one is not set locally, even with a custom + ;; template that is not asking for the nick (as used here). You'd + ;; think the latter part would be trivial to fix: + ;; https://bugs.launchpad.net/bzr/+bug/882541/comments/3 + ;; https://bugs.launchpad.net/bzr/+bug/629150 + ;; You can set the nick locally with `bzr nick ...', which speeds + ;; things up enormously. `bzr revno' does not have this issue, but + ;; has no way to print the revision_id AFAICS. + (message "Waiting for bzr...") + (with-temp-buffer + (if (zerop + (call-process "bzr" nil '(t nil) nil "version-info" + "--custom" + "--template={revno} {revision_id} (clean = {clean})" + "dir")) + (buffer-string)))) + +(defun emacs-bzr-get-version (&optional dir external) "Try to return as a string the bzr revision of the Emacs sources. The format is: [revno] revision_id, where revno may be absent. Value is nil if the sources do not seem to be under bzr, or if we could not determine the revision. Note that this reports on the current state of the sources, which may not correspond to the running Emacs. -Optional argument DIR is a directory to use instead of `source-directory'." +Optional argument DIR is a directory to use instead of `source-directory'. +Optional argument EXTERNAL non-nil means to maybe ask `bzr' itself, +if the sources appear to be under bzr. If `force', always ask bzr. +Otherwise only ask bzr if we cannot find any information ourselves." (or dir (setq dir source-directory)) (when (file-directory-p (expand-file-name ".bzr/branch" dir)) - (let (file loc rev) - (cond ((file-readable-p - (setq file (expand-file-name ".bzr/branch/last-revision" dir))) - (with-temp-buffer - (insert-file-contents file) - (goto-char (point-max)) - (if (looking-back "\n") - (delete-char -1)) - (buffer-string))) - ;; OK, no last-revision. Is it a lightweight checkout? - ((file-readable-p - (setq file (expand-file-name ".bzr/branch/location" dir))) - (setq rev (emacs-bzr-version-dirstate dir)) - ;; If the parent branch is local, try looking there for the rev. - ;; Note: there is no guarantee that the parent branch's rev - ;; corresponds to this branch. This branch could have - ;; been made with a specific -r revno argument, or the - ;; parent could have been updated since this branch was created. - ;; To try and detect this, we check the dirstate revids - ;; to see if they match. - (if (and (setq loc (with-temp-buffer - (insert-file-contents file) - (if (looking-at "file://\\(.*\\)") - (match-string 1)))) - (equal rev (emacs-bzr-version-dirstate loc))) - (emacs-bzr-get-version loc) - ;; If parent does not match, the best we can do without - ;; calling external commands is to use the dirstate rev. - rev)) - ;; At this point, could fall back to: - ;; bzr version-info --custom --template='{revno} {revision_id}\n' - )))) + (if (eq external 'force) + (emacs-bzr-version-bzr dir) + (let (file loc rev) + (cond ((file-readable-p + (setq file (expand-file-name ".bzr/branch/last-revision" dir))) + (with-temp-buffer + (insert-file-contents file) + (goto-char (point-max)) + (if (looking-back "\n") + (delete-char -1)) + (buffer-string))) + ;; OK, no last-revision. Is it a lightweight checkout? + ((file-readable-p + (setq file (expand-file-name ".bzr/branch/location" dir))) + (setq rev (emacs-bzr-version-dirstate dir)) + ;; If the parent branch is local, try looking there for the rev. + ;; Note: there is no guarantee that the parent branch's rev + ;; corresponds to this branch. This branch could have + ;; been made with a specific -r revno argument, or the + ;; parent could have been updated since this branch was created. + ;; To try and detect this, we check the dirstate revids + ;; to see if they match. + (if (and (setq loc (with-temp-buffer + (insert-file-contents file) + (if (looking-at "file://\\(.*\\)") + (match-string 1)))) + (equal rev (emacs-bzr-version-dirstate loc))) + (emacs-bzr-get-version loc) + ;; If parent does not match, the best we can do without + ;; calling external commands is to use the dirstate rev. + rev)) + (external + (emacs-bzr-version-bzr dir))))))) ;; We put version info into the executable in the form that `ident' uses. (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) From c584eaf9c704543845e949acb76d8d591226aa71 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 16 Sep 2012 12:16:51 +0800 Subject: [PATCH 189/216] In compilation-error-regexp-alist, allow more HIGHLIGHT types. * progmodes/compile.el (compilation-parse-errors): Apply any value that is a valid font-lock-face property. (compilation-error-regexp-alist): Doc fix. Fixes: debbugs:12136 --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/compile.el | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b436d9e364e..9d5f70eb224 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-16 Chong Yidong + + * progmodes/compile.el (compilation-parse-errors): Apply any value + that is a valid font-lock-face property (Bug#12136). + (compilation-error-regexp-alist): Doc fix. + 2012-09-15 Glenn Morris * version.el (emacs-bzr-version-bzr): New function. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index fbb0c9e204a..ae2f6973fa5 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -488,9 +488,10 @@ What matched the HYPERLINK'th subexpression has `mouse-face' and `compilation-message-face' applied. If this is nil, the text matched by the whole REGEXP becomes the hyperlink. -Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is -the number of a submatch that should be highlighted when it matches, -and FACE is an expression returning the face to use for that submatch.." +Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where +SUBMATCH is the number of a submatch and FACE is an expression +which evaluates to a face (more precisely, a valid value for the +`font-lock-face' property) for highlighting the submatch." :type '(repeat (choice (symbol :tag "Predefined symbol") (sexp :tag "Error specification"))) :link `(file-link :tag "example file" @@ -1334,7 +1335,9 @@ to `compilation-error-regexp-alist' if RULES is nil." (let ((face (eval (car extra-item)))) (cond ((null face)) - ((symbolp face) + ((or (symbolp face) + (stringp face) + (listp face)) (put-text-property (match-beginning mn) (match-end mn) 'font-lock-face face)) From f1be615c41027bfc11425c9e62598bc25fa323e1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 16 Sep 2012 12:31:02 +0800 Subject: [PATCH 190/216] Alter last change to be compatible with Emacs 23. * lisp/progmodes/compile.el (compilation-parse-errors): Accept list values similar to font-lock-keywords. Suggested by Oleksandr Manzyuk. (compilation-error-regexp-alist): Doc fix. Fixes: debbugs:12136 --- lisp/ChangeLog | 5 +++-- lisp/progmodes/compile.el | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d5f70eb224..2d2ff692309 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,8 @@ 2012-09-16 Chong Yidong - * progmodes/compile.el (compilation-parse-errors): Apply any value - that is a valid font-lock-face property (Bug#12136). + * progmodes/compile.el (compilation-parse-errors): Accept list + values similar to font-lock-keywords (Bug#12136). Suggested by + Oleksandr Manzyuk. (compilation-error-regexp-alist): Doc fix. 2012-09-15 Glenn Morris diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ae2f6973fa5..f5dedf0cd59 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -490,8 +490,10 @@ matched by the whole REGEXP becomes the hyperlink. Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is the number of a submatch and FACE is an expression -which evaluates to a face (more precisely, a valid value for the -`font-lock-face' property) for highlighting the submatch." +which evaluates to a face name (a symbol or string). +Alternatively, FACE can evaluate to a property list of the +form (face FACE PROP1 VAL1 PROP2 VAL2 ...), in which case all the +listed text properties PROP# are given values VAL# as well." :type '(repeat (choice (symbol :tag "Predefined symbol") (sexp :tag "Error specification"))) :link `(file-link :tag "example file" @@ -1329,18 +1331,27 @@ to `compilation-error-regexp-alist' if RULES is nil." (compilation--put-prop end-col 'font-lock-face compilation-column-face) + ;; Obey HIGHLIGHT. (dolist (extra-item (nthcdr 6 item)) (let ((mn (pop extra-item))) (when (match-beginning mn) (let ((face (eval (car extra-item)))) (cond ((null face)) - ((or (symbolp face) - (stringp face) - (listp face)) + ((or (symbolp face) (stringp face)) (put-text-property (match-beginning mn) (match-end mn) 'font-lock-face face)) + ((and (listp face) + (eq (car face) 'face) + (or (symbolp (cadr face)) + (stringp (cadr face)))) + (put-text-property + (match-beginning mn) (match-end mn) + 'font-lock-face (cadr face)) + (add-text-properties + (match-beginning mn) (match-end mn) + (nthcdr 2 face))) (t (error "Don't know how to handle face %S" face))))))) From fdc2806d0b023bc6a3c6c8abf8cfc72b8214a68b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 16 Sep 2012 12:43:46 +0800 Subject: [PATCH 191/216] * window.el (special-display-popup-frame): Doc fix. Fixes: debbugs:8853 --- lisp/ChangeLog | 2 ++ lisp/window.el | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d2ff692309..936a451ccb4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-09-16 Chong Yidong + * window.el (special-display-popup-frame): Doc fix (Bug#8853). + * progmodes/compile.el (compilation-parse-errors): Accept list values similar to font-lock-keywords (Bug#12136). Suggested by Oleksandr Manzyuk. diff --git a/lisp/window.el b/lisp/window.el index dd1f55450c3..d9f3ccbd5c2 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4768,8 +4768,8 @@ the selected window. If they contain (same-frame . t), display BUFFER in a window of the selected frame. If ARGS is a list whose car is a symbol, use (car ARGS) as a -function to do the work. Pass it BUFFER as first argument, -and (cdr ARGS) as second." +function to do the work. Pass it BUFFER as first argument, and +pass the elements of (cdr ARGS) as the remaining arguments." (if (and args (symbolp (car args))) (apply (car args) buffer (cdr args)) (let ((window (get-buffer-window buffer 0))) From 71ce58e752dfb8d384eddf2d40ee9d5861ede5e5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 16 Sep 2012 12:52:38 +0800 Subject: [PATCH 192/216] Mark display-buffer-function as obsolete. * lisp/window.el (display-buffer-function): Mark as obsolete. Fixes: debbugs:12166 --- etc/NEWS | 1 + lisp/ChangeLog | 1 + lisp/window.el | 3 +++ 3 files changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 4c6ceae1688..3344158b73c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -735,6 +735,7 @@ in Emacs 24.1: **** `special-display-frame-alist' **** `special-display-buffer-names' **** `special-display-function' +**** `display-buffer-function' ** Completion diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 936a451ccb4..a7538e50d82 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2012-09-16 Chong Yidong * window.el (special-display-popup-frame): Doc fix (Bug#8853). + (display-buffer-function): Mark as obsolete. * progmodes/compile.el (compilation-parse-errors): Accept list values similar to font-lock-keywords (Bug#12136). Suggested by diff --git a/lisp/window.el b/lisp/window.el index d9f3ccbd5c2..fccb68bd94a 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4551,6 +4551,9 @@ of the window used." (function :tag "function")) :group 'windows) +(make-obsolete-variable 'display-buffer-function + 'display-buffer-alist "24.3") + ;; Eventually, we want to turn this into a defvar; instead of ;; customizing this, the user should use a `pop-up-frame-parameters' ;; alist entry in `display-buffer-base-action'. From c077c0598d5c3c7982b53946a696ec7a75c7481e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 16 Sep 2012 11:11:50 +0200 Subject: [PATCH 193/216] Try to fix crashes introduced by 2012-09-10T21:01:45Z!jan.h.d@swipnet.se. * nsfns.m (Fx_open_connection): Move initialization of ns_*_types to ns_term_init to avoid memory leak. * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use explicit retain/release. (ns_term_init): Only allow one display. Initialize outerpool and ns_*_types. --- src/ChangeLog | 10 ++++++++++ src/nsfns.m | 13 ------------ src/nsterm.m | 55 +++++++++++++++++++++++++++++++++------------------ 3 files changed, 46 insertions(+), 32 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c6c314b9589..92117da8eb0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2012-09-16 Jan Djärv + + * nsfns.m (Fx_open_connection): Move initialization of ns_*_types + to ns_term_init to avoid memory leak. + + * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use + explicit retain/release. + (ns_term_init): Only allow one display. Initialize outerpool and + ns_*_types. + 2012-09-15 Paul Eggert Port _setjmp fix to POSIXish hosts as well as Microsoft. diff --git a/src/nsfns.m b/src/nsfns.m index ed8d44014d5..072005d2d3d 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1796,19 +1796,6 @@ terminate Emacs if we can't open the connection. SSDATA (display)); } - /* Register our external input/output types, used for determining - applicable services and also drag/drop eligibility. */ - ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain]; - ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] - retain]; - ns_drag_types = [[NSArray arrayWithObjects: - NSStringPboardType, - NSTabularTextPboardType, - NSFilenamesPboardType, - NSURLPboardType, - NSColorPboardType, - NSFontPboardType, nil] retain]; - return Qnil; } diff --git a/src/nsterm.m b/src/nsterm.m index f1f23ad4479..41520ce74d1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -627,7 +627,7 @@ ns_update_begin (struct frame *f) { NSView *view = FRAME_NS_VIEW (f); NSRect r = [view frame]; - NSBezierPath *bp = [NSBezierPath bezierPath]; + NSBezierPath *bp; NSTRACE (ns_update_begin); ns_update_auto_hide_menu_bar (); @@ -639,8 +639,9 @@ ns_update_begin (struct frame *f) is for the minibuffer. But the display engine may draw more because we have set the frame as garbaged. So reset clip path to the whole view. */ - [bp appendBezierPathWithRect: r]; + bp = [[NSBezierPath bezierPathWithRect: r] retain]; [bp setClip]; + [bp release]; #ifdef NS_IMPL_GNUSTEP uRect = NSMakeRect (0, 0, 0, 0); @@ -3976,33 +3977,35 @@ ns_term_init (Lisp_Object display_name) static int ns_initialized = 0; Lisp_Object tmp; + if (ns_initialized) return x_display_list; + ns_initialized = 1; + NSTRACE (ns_term_init); + [outerpool release]; + outerpool = [[NSAutoreleasePool alloc] init]; + /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */ /*GSDebugAllocationActive (YES); */ BLOCK_INPUT; handling_signal = 0; - if (!ns_initialized) + baud_rate = 38400; + Fset_input_interrupt_mode (Qnil); + + if (selfds[0] == -1) { - baud_rate = 38400; - Fset_input_interrupt_mode (Qnil); - - if (selfds[0] == -1) + if (pipe (selfds) == -1) { - if (pipe (selfds) == -1) - { - fprintf (stderr, "Failed to create pipe: %s\n", - emacs_strerror (errno)); - emacs_abort (); - } - - fcntl (selfds[0], F_SETFL, O_NONBLOCK|fcntl (selfds[0], F_GETFL)); - FD_ZERO (&select_readfds); - FD_ZERO (&select_writefds); - pthread_mutex_init (&select_mutex, NULL); + fprintf (stderr, "Failed to create pipe: %s\n", + emacs_strerror (errno)); + emacs_abort (); } - ns_initialized = 1; + + fcntl (selfds[0], F_SETFL, O_NONBLOCK|fcntl (selfds[0], F_GETFL)); + FD_ZERO (&select_readfds); + FD_ZERO (&select_writefds); + pthread_mutex_init (&select_mutex, NULL); } ns_pending_files = [[NSMutableArray alloc] init]; @@ -4193,6 +4196,20 @@ ns_term_init (Lisp_Object display_name) } #endif /* MAC OS X menu setup */ + /* Register our external input/output types, used for determining + applicable services and also drag/drop eligibility. */ + ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain]; + ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] + retain]; + ns_drag_types = [[NSArray arrayWithObjects: + NSStringPboardType, + NSTabularTextPboardType, + NSFilenamesPboardType, + NSURLPboardType, + NSColorPboardType, + NSFontPboardType, nil] retain]; + + [NSApp run]; ns_do_open_file = YES; return dpyinfo; From a8c729af93b08531e5e3f3fff6f16a55c8baac3f Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sun, 16 Sep 2012 12:25:24 +0200 Subject: [PATCH 194/216] Window parameter functions again accept any window as argument (Bug#12452). * window.c (Fwindow_parameter, Fset_window_parameter): Accept any window as argument (Bug#12452). --- src/ChangeLog | 5 +++++ src/window.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 92117da8eb0..3ff1a7287d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-16 Martin Rudalics + + * window.c (Fwindow_parameter, Fset_window_parameter): Accept + any window as argument (Bug#12452). + 2012-09-16 Jan Djärv * nsfns.m (Fx_open_connection): Move initialization of ns_*_types diff --git a/src/window.c b/src/window.c index b3db1292e5c..fbccab8b358 100644 --- a/src/window.c +++ b/src/window.c @@ -1855,23 +1855,23 @@ return value is a list of elements of the form (PARAMETER . VALUE). */) DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, 2, 2, 0, doc: /* Return WINDOW's value for PARAMETER. -WINDOW must be a valid window and defaults to the selected one. */) +WINDOW can be any window and defaults to the selected one. */) (Lisp_Object window, Lisp_Object parameter) { Lisp_Object result; - result = Fassq (parameter, decode_valid_window (window)->window_parameters); + result = Fassq (parameter, decode_any_window (window)->window_parameters); return CDR_SAFE (result); } DEFUN ("set-window-parameter", Fset_window_parameter, Sset_window_parameter, 3, 3, 0, doc: /* Set WINDOW's value of PARAMETER to VALUE. -WINDOW must be a valid window and defaults to the selected one. +WINDOW can be any window and defaults to the selected one. Return VALUE. */) (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) { - register struct window *w = decode_valid_window (window); + register struct window *w = decode_any_window (window); Lisp_Object old_alist_elt; old_alist_elt = Fassq (parameter, w->window_parameters); From 1667e065d0720c65efc0c5385b9efb9f75b318c1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 16 Sep 2012 23:57:28 +0800 Subject: [PATCH 195/216] * files.el (parse-colon-path): Use split-string. Fixes: debbugs:12351 --- lisp/ChangeLog | 2 ++ lisp/files.el | 23 +++++++---------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a7538e50d82..b444761e55c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-09-16 Chong Yidong + * files.el (parse-colon-path): Use split-string (Bug#12351). + * window.el (special-display-popup-frame): Doc fix (Bug#8853). (display-buffer-function): Mark as obsolete. diff --git a/lisp/files.el b/lisp/files.el index 4acdb542089..289f5c6b0b6 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -658,22 +658,13 @@ Not actually set up until the first time you use it.") (defun parse-colon-path (search-path) "Explode a search path into a list of directory names. -Directories are separated by occurrences of `path-separator' -\(which is colon in GNU and GNU-like systems)." - ;; We could use split-string here. - (and search-path - (let (cd-list (cd-start 0) cd-colon) - (setq search-path (concat search-path path-separator)) - (while (setq cd-colon (string-match path-separator search-path cd-start)) - (setq cd-list - (nconc cd-list - (list (if (= cd-start cd-colon) - nil - (substitute-in-file-name - (file-name-as-directory - (substring search-path cd-start cd-colon))))))) - (setq cd-start (+ cd-colon 1))) - cd-list))) +Directories are separated by `path-separator' (which is colon in +GNU and Unix systems). Substitute environment variables into the +resulting list of directory names." + (when (stringp search-path) + (mapcar (lambda (f) + (substitute-in-file-name (file-name-as-directory f))) + (split-string search-path path-separator t)))) (defun cd-absolute (dir) "Change current directory to given absolute file name DIR." From 85a43e2ea45592610c43a25468aabef921c709f8 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 17 Sep 2012 01:17:31 +0900 Subject: [PATCH 196/216] font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may not covert the last few charactes. --- src/ChangeLog | 5 +++++ src/font.c | 13 +++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cfcd2b0e2f1..be734134adf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-17 Kenichi Handa + + * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may + not covert the last few charactes. + 2012-09-16 Kenichi Handa * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster diff --git a/src/font.c b/src/font.c index 32194d1bb02..fc970254a62 100644 --- a/src/font.c +++ b/src/font.c @@ -4330,10 +4330,10 @@ GSTRING. */) LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that - GLYPHS covers all characters in GSTRING. More formally, provided - that NCHARS is the number of characters in GSTRING, N is the - number of glyphs, and GLYPHS[i] is the ith glyph, FROM_IDX and - TO_IDX of each glyph must satisfy these conditions: + GLYPHS covers all characters (except for the last few ones) in + GSTRING. More formally, provided that NCHARS is the number of + characters in GSTRING and GLYPHS[i] is the ith glyph, FROM_IDX + and TO_IDX of each glyph must satisfy these conditions: GLYPHS[0].FROM_IDX == 0 GLYPHS[i].FROM_IDX <= GLYPHS[i].TO_IDX @@ -4342,8 +4342,7 @@ GSTRING. */) GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX else ;; Be sure to cover all characters. - GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 - GLYPHS[N-1].TO_IDX == NCHARS - 1 */ + GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 */ glyph = LGSTRING_GLYPH (gstring, 0); from = LGLYPH_FROM (glyph); to = LGLYPH_TO (glyph); @@ -4362,8 +4361,6 @@ GSTRING. */) from = LGLYPH_FROM (glyph); to = LGLYPH_TO (glyph); } - if (to != LGSTRING_CHAR_LEN (gstring) - 1) - goto shaper_error; return composition_gstring_put_cache (gstring, XINT (n)); shaper_error: From 40d70ecb6d11f87363b500db5665d8b433278687 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 17 Sep 2012 00:27:20 +0800 Subject: [PATCH 197/216] Fix marker usage in align-areas. * align.el (align-areas): Call the indication function with positions instead of markers for arguments. Fixes: debbugs:12343 --- lisp/ChangeLog | 3 +++ lisp/align.el | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b444761e55c..9eeba6691c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-09-16 Chong Yidong + * align.el (align-areas): Call the indication function with + positions instead of markers for arguments (Bug#12343). + * files.el (parse-colon-path): Use split-string (Bug#12351). * window.el (special-display-popup-frame): Doc fix (Bug#8853). diff --git a/lisp/align.el b/lisp/align.el index 4c82d7bea81..b5c4c442f24 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1201,7 +1201,10 @@ have been aligned. No changes will be made to the buffer." (gocol col) cur) (when area (if func - (funcall func (car area) (cdr area) change) + (funcall func + (marker-position (car area)) + (marker-position (cdr area)) + change) (if (not (and justify (consp (cdr area)))) (goto-char (cdr area)) From 83da1b5565d518aa02984bf2f474c56eb61f41ef Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Sep 2012 11:49:00 -0700 Subject: [PATCH 198/216] Increase compartmentalization of Nextstep builds rules, and store Emacs version number in fewer versioned files. * configure.ac (ns_appsrc): Use relative names. (ns_frag): Remove. (Info-gnustep.plist, Emacs.desktop, Info.plist, InfoPlist.strings) (nextstep/Makefile): Generate these nextstep files. (SUBDIR_MAKEFILES): Add nextstep. * Makefile.in (clean, distclean, bootstrap-clean): Add nextstep. * make-dist (nextstep/templates): Add directory. (nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj): Remove. (nextstep/Cocoa/Emacs.base/Contents) (nextstep/GNUstep/Emacs.base/Resources): Update contents. * .bzrignore: Add some nextstep files. * admin/admin.el (set-version): No more need to set nextstep versions. (set-copyright): Update for moved nextstep files. * nextstep/Makefile.in: New file. * nextstep/templates: New directory. * nextstep/templates/Emacs.desktop.in, nextstep/templates/Info-gnustep.plist.in: * nextstep/templates/Info.plist.in, nextstep/templates/InfoPlist.strings.in: Move here from various Cocoa/, GNUstep/ locations. Let configure set the version number. * nextstep/Cocoa/Emacs.base/Contents/Info.plist: * nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings: * nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist: * nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/. * nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory. * src/Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables. (ns_frag): Remove. (ns-app): Move here from ns.mk, and simplify. (clean): Simplify nextstep entry. * src/ns.mk: Remove file. --- ChangeLog | 15 ++++ Makefile.in | 3 + admin/ChangeLog | 5 ++ admin/admin.el | 40 ++--------- configure.ac | 21 ++++-- make-dist | 16 ++--- nextstep/ChangeLog | 14 ++++ nextstep/Makefile.in | 68 +++++++++++++++++++ .../Emacs.desktop.in} | 2 +- .../Info-gnustep.plist.in} | 4 +- .../Info.plist => templates/Info.plist.in} | 4 +- .../InfoPlist.strings.in} | 4 +- src/ChangeLog | 10 ++- src/Makefile.in | 10 ++- src/ns.mk | 39 ----------- 15 files changed, 151 insertions(+), 104 deletions(-) create mode 100644 nextstep/Makefile.in rename nextstep/{GNUstep/Emacs.base/Resources/Emacs.desktop => templates/Emacs.desktop.in} (92%) rename nextstep/{GNUstep/Emacs.base/Resources/Info-gnustep.plist => templates/Info-gnustep.plist.in} (96%) rename nextstep/{Cocoa/Emacs.base/Contents/Info.plist => templates/Info.plist.in} (99%) rename nextstep/{Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings => templates/InfoPlist.strings.in} (56%) delete mode 100644 src/ns.mk diff --git a/ChangeLog b/ChangeLog index 8dfe5f2746b..ab7864578b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2012-09-16 Glenn Morris + + Increase compartmentalization of Nextstep builds rules, + and store Emacs version number in fewer versioned files. + * configure.ac (ns_appsrc): Use relative names. + (ns_frag): Remove. + (Info-gnustep.plist, Emacs.desktop, Info.plist, InfoPlist.strings) + (nextstep/Makefile): Generate these nextstep files. + (SUBDIR_MAKEFILES): Add nextstep. + * Makefile.in (clean, distclean, bootstrap-clean): Add nextstep. + * make-dist (nextstep/templates): Add directory. + (nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj): Remove. + (nextstep/Cocoa/Emacs.base/Contents) + (nextstep/GNUstep/Emacs.base/Resources): Update contents. + 2012-09-15 Paul Eggert Port better to POSIX hosts lacking _setjmp (Bug#12446). diff --git a/Makefile.in b/Makefile.in index 6ed32491a66..9bb85967930 100644 --- a/Makefile.in +++ b/Makefile.in @@ -737,6 +737,7 @@ clean: FRC -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) (cd leim; $(MAKE) $(MFLAGS) clean) + (cd nextstep && $(MAKE) $(MFLAGS) clean) ### `bootclean' ### Delete all files that need to be remade for a clean bootstrap. @@ -763,6 +764,7 @@ distclean: FRC (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean) (cd leim; $(MAKE) $(MFLAGS) distclean) (cd lisp; $(MAKE) $(MFLAGS) distclean) + (cd nextstep && $(MAKE) $(MFLAGS) distclean) ${top_distclean} ### `bootstrap-clean' @@ -780,6 +782,7 @@ bootstrap-clean: FRC -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) + (cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean) [ ! -f config.log ] || mv -f config.log config.log~ ${top_bootclean} diff --git a/admin/ChangeLog b/admin/ChangeLog index 25eed8af5e3..27765a078f6 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2012-09-16 Glenn Morris + + * admin.el (set-version): No more need to set nextstep versions. + (set-copyright): Update for moved nextstep files. + 2012-09-13 Paul Eggert Simplify SIGIO usage (Bug#12408). diff --git a/admin/admin.el b/admin/admin.el index 6d729214bd0..b076bb67dd1 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -126,39 +126,7 @@ Root must be the root of an Emacs source tree." (set-version-in-file root "nt/emacsclient.rc" comma-space-version (rx (and "\"ProductVersion\"" (0+ space) ?, (0+ space) ?\" (submatch (1+ (in "0-9, "))) - "\\0\"")))) - ;; nextstep. - (set-version-in-file - root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" - version (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) - (submatch (1+ (in "0-9.")))))) - (set-version-in-file - root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" - version (rx (and "CFBundleShortVersionString" (1+ not-newline) ?\n - (0+ not-newline) "" (0+ space) - (submatch (1+ (in "0-9.")))))) - (set-version-in-file - root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" - version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) - ?\" (0+ space) "Version" (1+ space) - (submatch (1+ (in "0-9.")))))) - (set-version-in-file - root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" - version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) - ?\" (0+ space) "Emacs version" (1+ space) - (submatch (1+ (in "0-9.")))))) - (set-version-in-file - root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" - version (rx (and "ApplicationRelease" (0+ space) ?= (0+ space) - ?\" (0+ space) (submatch (1+ (in "0-9.")))))) - (set-version-in-file - root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" - version (rx (and "FullVersionID" (0+ space) ?= (0+ space) - ?\" (0+ space) "Emacs" (1+ space) - (submatch (1+ (in "0-9.")))))) - (set-version-in-file - root "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop" - version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) + "\\0\""))))) ;; Note this makes some assumptions about form of short copyright. (defun set-copyright (root copyright) @@ -188,16 +156,16 @@ Root must be the root of an Emacs source tree." (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) ;; nextstep. (set-version-in-file - root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" + root "nextstep/templates/Info.plist.in" copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) (1+ (in "0-9.")) (1+ space) (submatch (1+ (not (in ?\<))))))) (set-version-in-file - root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" + root "nextstep/templates/InfoPlist.strings.in" copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space) ?\" (submatch (1+ (not (in ?\"))))))) (set-version-in-file - root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" + root "nextstep/templates/Info-gnustep.plist.in" copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) ?\" (submatch (1+ (not (in ?\"))))))) (when (string-match "\\([0-9]\\{4\\}\\)" copyright) diff --git a/configure.ac b/configure.ac index f810c839587..38a7613d84a 100644 --- a/configure.ac +++ b/configure.ac @@ -1461,13 +1461,13 @@ if test "${with_ns}" != no; then ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir}/Contents/MacOS ns_appresdir=${ns_appdir}/Contents/Resources - ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base + ns_appsrc=Cocoa/Emacs.base elif test -f $GNUSTEP_CONFIG_FILE; then NS_IMPL_GNUSTEP=yes ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir} ns_appresdir=${ns_appdir}/Resources - ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base + ns_appsrc=GNUstep/Emacs.base dnl FIXME sourcing this several times in subshells seems inefficient. GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" @@ -1521,7 +1521,6 @@ AC_SUBST(TEMACS_LDFLAGS2) INSTALL_ARCH_INDEP_EXTRA=install-etc ns_self_contained=no -ns_frag=/dev/null NS_OBJ= NS_OBJC_OBJ= if test "${HAVE_NS}" = yes; then @@ -1548,7 +1547,6 @@ if test "${HAVE_NS}" = yes; then leimdir="\${ns_appresdir}/leim" INSTALL_ARCH_INDEP_EXTRA= fi - ns_frag=$srcdir/src/ns.mk NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" fi CFLAGS="$tmp_CFLAGS" @@ -1558,7 +1556,6 @@ AC_SUBST(ns_self_contained) AC_SUBST(NS_OBJ) AC_SUBST(NS_OBJC_OBJ) AC_SUBST(LIB_STANDARD) -AC_SUBST_FILE(ns_frag) ## $window_system is now set to the window system we will ## ultimately use. @@ -4484,6 +4481,16 @@ fi test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] +if test "$HAVE_NS" = "yes"; then + if test "$NS_IMPL_GNUSTEP" = yes; then + AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \ + nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in]) + else + AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \ + nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in]) + fi +fi + dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES. dnl You _can_ use that variable in AC_CONFIG_FILES, so long as any directory dnl using automake (ie lib/) is explicitly listed and not "hidden" in a variable @@ -4492,12 +4499,12 @@ dnl This will work, but you get a config.status that is not quite right dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html). dnl That doesn't have any obvious consequences for Emacs, but on the whole dnl it seems better to just live with the duplication. -SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" +SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile" AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \ - leim/Makefile]) + leim/Makefile nextstep/Makefile]) dnl test/ is not present in release tarfiles. opt_makefile=test/automated/Makefile diff --git a/make-dist b/make-dist index 28d2ec15214..0432d9c9e5f 100755 --- a/make-dist +++ b/make-dist @@ -287,10 +287,10 @@ for subdir in site-lisp \ `find etc lisp admin -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ info m4 msdos \ - nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ + nextstep nextstep/templates \ + nextstep/Cocoa nextstep/Cocoa/Emacs.base \ nextstep/Cocoa/Emacs.base/Contents \ nextstep/Cocoa/Emacs.base/Contents/Resources \ - nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \ nextstep/GNUstep \ nextstep/GNUstep/Emacs.base \ nextstep/GNUstep/Emacs.base/Resources @@ -406,21 +406,21 @@ echo "Making links to \`nextstep'" (cd nextstep ln ChangeLog README INSTALL ../${tempdir}/nextstep) +echo "Making links to \`nextstep/templates'" +(cd nextstep/templates + ln Emacs.desktop.in Info-gnustep.plist.in Info.plist.in InfoPlist.strings.in../../${tempdir}/nextstep/templates) + echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" (cd nextstep/Cocoa/Emacs.base/Contents - ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) + ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'" (cd nextstep/Cocoa/Emacs.base/Contents/Resources ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources) -echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'" -(cd nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj - ln InfoPlist.strings ../../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj) - echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" (cd nextstep/GNUstep/Emacs.base/Resources - ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) + ln README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) echo "Making links to \`oldXMenu'" (cd oldXMenu diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog index 6451f7a7322..be73bc1f168 100644 --- a/nextstep/ChangeLog +++ b/nextstep/ChangeLog @@ -1,3 +1,17 @@ +2012-09-16 Glenn Morris + + * Makefile.in: New file. + * templates: New directory. + * templates/Emacs.desktop.in, templates/Info-gnustep.plist.in: + * templates/Info.plist.in, templates/InfoPlist.strings.in: + Move here from various Cocoa/, GNUstep/ locations. + Let configure set the version number. + * Cocoa/Emacs.base/Contents/Info.plist: + * Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings: + * GNUstep/Emacs.base/Resources/Info-gnustep.plist: + * GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/. + * Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory. + 2012-04-07 Glenn Morris * Cocoa/Emacs.base/Contents/Info.plist: diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in new file mode 100644 index 00000000000..8efb2b23043 --- /dev/null +++ b/nextstep/Makefile.in @@ -0,0 +1,68 @@ +### nextstep/Makefile for GNU Emacs + +## Copyright (C) 2012 Free Software Foundation, Inc. + +## This file is part of GNU Emacs. + +## GNU Emacs is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## GNU Emacs is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with GNU Emacs. If not, see . + +### Commentary: + +### Code: +SHELL = /bin/sh + +srcdir = @srcdir@ +EXEEXT = @EXEEXT@ + +@SET_MAKE@ +MKDIR_P = @MKDIR_P@ + +ns_appdir = @ns_appdir@ +ns_appbindir = @ns_appbindir@ +ns_appsrc = @ns_appsrc@ + +${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc} + rm -rf ${ns_appdir} + ${MKDIR_P} ${ns_appdir} + ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \ + ( cd ${ns_appdir} ; umask 022; tar xf - ) + [ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || \ + ( cd ${ns_appsrc} ; tar cfh - . ) | \ + ( cd ${ns_appdir} ; umask 022; tar xf - ) + +${ns_appbindir}/Emacs: ${ns_appdir} ../src/emacs${EXEEXT} + ${MKDIR_P} ${ns_appbindir} + cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs + +.PHONY: all + +all: ${ns_appdir} ${ns_appbindir}/Emacs + + +.PHONY: clean distclean maintainer-clean + +clean: + rm -rf ${ns_appdir} + +distclean: clean + rm -f Makefile + rm -f GNUstep/Emacs.base/Resources/Info-gnustep.plist \ + GNUstep/Emacs.base/Resources/Emacs.desktop \ + Cocoa/Emacs.base/Contents/Info.plist \ + Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings + [ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || rm -rf ${ns_appsrc} + +maintainer-clean: distclean + +### Makefile.in ends here diff --git a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop b/nextstep/templates/Emacs.desktop.in similarity index 92% rename from nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop rename to nextstep/templates/Emacs.desktop.in index a36eafaadb0..170f195f270 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop +++ b/nextstep/templates/Emacs.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Encoding=UTF-8 Type=Application -Version=24.2.50 +Version=@version@ Categories=GNUstep Name=Emacs Comment=GNU Emacs for NeXT/Open/GNUstep and OS X diff --git a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist b/nextstep/templates/Info-gnustep.plist.in similarity index 96% rename from nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist rename to nextstep/templates/Info-gnustep.plist.in index 6cde01b0d05..6da5af489fb 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist +++ b/nextstep/templates/Info-gnustep.plist.in @@ -2,7 +2,7 @@ ApplicationDescription = "GNU Emacs for GNUstep / OS X"; ApplicationIcon = emacs.tiff; ApplicationName = Emacs; - ApplicationRelease = "24.2.50"; + ApplicationRelease = "@version@"; Authors = ( "Adrian Robert (GNUstep)", "Christophe de Dinechin (MacOS X)", @@ -13,7 +13,7 @@ ); Copyright = "Copyright (C) 2012 Free Software Foundation, Inc."; CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; - FullVersionID = "Emacs 24.2.50, NS Windowing"; + FullVersionID = "Emacs @version@, NS Windowing"; NSExecutable = Emacs; NSIcon = emacs.tiff; NSPrincipalClass = NSApplication; diff --git a/nextstep/Cocoa/Emacs.base/Contents/Info.plist b/nextstep/templates/Info.plist.in similarity index 99% rename from nextstep/Cocoa/Emacs.base/Contents/Info.plist rename to nextstep/templates/Info.plist.in index f5490f613fd..df9708eae71 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist +++ b/nextstep/templates/Info.plist.in @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see . CFBundleExecutable Emacs CFBundleGetInfoString - Emacs 24.2.50 Copyright (C) 2012 Free Software Foundation, Inc. + Emacs @version@ Copyright (C) 2012 Free Software Foundation, Inc. CFBundleIconFile Emacs.icns CFBundleIdentifier @@ -566,7 +566,7 @@ along with GNU Emacs. If not, see . APPL CFBundleShortVersionString - 24.2.50 + @version@ CFBundleSignature EMAx diff --git a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings b/nextstep/templates/InfoPlist.strings.in similarity index 56% rename from nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings rename to nextstep/templates/InfoPlist.strings.in index 7655c0ca8ec..ce9779c7ac8 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings +++ b/nextstep/templates/InfoPlist.strings.in @@ -1,6 +1,6 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Emacs"; -CFBundleShortVersionString = "Version 24.2.50"; -CFBundleGetInfoString = "Emacs version 24.2.50, NS Windowing"; +CFBundleShortVersionString = "Version @version@"; +CFBundleGetInfoString = "Emacs version @version@, NS Windowing"; NSHumanReadableCopyright = "Copyright (C) 2012 Free Software Foundation, Inc."; diff --git a/src/ChangeLog b/src/ChangeLog index be734134adf..e322406a0e6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,12 @@ -2012-09-17 Kenichi Handa +2012-09-16 Glenn Morris + + * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables. + (ns_frag): Remove. + (ns-app): Move here from ns.mk, and simplify. + (clean): Simplify nextstep entry. + * ns.mk: Remove file. + +2012-09-16 Kenichi Handa * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may not covert the last few charactes. diff --git a/src/Makefile.in b/src/Makefile.in index fe4cff5d8cc..5c16b93803e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -255,9 +255,6 @@ MSDOS_OBJ = ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. MSDOS_X_OBJ = -ns_appdir=@ns_appdir@ -ns_appbindir=@ns_appbindir@ -ns_appsrc=@ns_appsrc@ NS_OBJ=@NS_OBJ@ ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS. NS_OBJC_OBJ=@NS_OBJC_OBJ@ @@ -501,8 +498,9 @@ $(OLDXMENU): $(OLDXMENU_TARGET) doc.o: buildobj.h -## If HAVE_NS, some ns-specific rules (for OTHER_FILES) are inserted here. -@ns_frag@ +ns-app: emacs$(EXEEXT) + cd ../nextstep && $(MAKE) $(MFLAGS) all + .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean .PHONY: versionclean extraclean frc @@ -516,7 +514,7 @@ mostlyclean: clean: mostlyclean rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) -rm -rf $(DEPDIR) - test "X$(ns_appdir)" = "X" || rm -rf $(ns_appdir) + -cd ../nextstep && $(MAKE) $(MFLAGS) clean ## bootstrap-clean is used to clean up just before a bootstrap. ## It should remove all files generated during a compilation/bootstrap, diff --git a/src/ns.mk b/src/ns.mk deleted file mode 100644 index 77fbf5845d9..00000000000 --- a/src/ns.mk +++ /dev/null @@ -1,39 +0,0 @@ -### autodeps.mk --- src/Makefile fragment for GNU Emacs - -## Copyright (C) 2008-2012 Free Software Foundation, Inc. - -## This file is part of GNU Emacs. - -## GNU Emacs is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## GNU Emacs is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with GNU Emacs. If not, see . - -### Commentary: - -## This is inserted in src/Makefile if HAVE_NS. - -## The only reason this is in a separate file is because $ns_appdir, -## which appears as a target, is empty on non-NS builds. Some makes -## do not like empty targets, even if they are never used. - -${ns_appdir}: ${ns_appsrc} - rm -fr ${ns_appdir} - ${MKDIR_P} ${ns_appdir} - ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - ) - -${ns_appbindir}/Emacs: emacs${EXEEXT} - ${MKDIR_P} ${ns_appbindir} - cp -f emacs${EXEEXT} ${ns_appbindir}/Emacs - -ns-app: ${ns_appdir} ${ns_appbindir}/Emacs - -### ns.mk ends here From 92f7c6f1a320701a5e15d8a3f28e08d1889c81bc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Sep 2012 11:51:39 -0700 Subject: [PATCH 199/216] Add missing nextstep file from previous change. --- ChangeLog | 2 +- make-dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab7864578b3..5dadc44ebd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,7 @@ * make-dist (nextstep/templates): Add directory. (nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj): Remove. (nextstep/Cocoa/Emacs.base/Contents) - (nextstep/GNUstep/Emacs.base/Resources): Update contents. + (nextstep, nextstep/GNUstep/Emacs.base/Resources): Update contents. 2012-09-15 Paul Eggert diff --git a/make-dist b/make-dist index 0432d9c9e5f..3b2d79e56bc 100755 --- a/make-dist +++ b/make-dist @@ -404,7 +404,7 @@ echo "Making links to \`msdos'" echo "Making links to \`nextstep'" (cd nextstep - ln ChangeLog README INSTALL ../${tempdir}/nextstep) + ln ChangeLog README INSTALL Makefile.in ../${tempdir}/nextstep) echo "Making links to \`nextstep/templates'" (cd nextstep/templates From 164b9bf3ef04371d24bc34ffdbe8800bdcff1f1e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Sep 2012 11:56:10 -0700 Subject: [PATCH 200/216] (distclean): Remove unnecessary directory deletion. --- nextstep/Makefile.in | 1 - 1 file changed, 1 deletion(-) diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in index 8efb2b23043..27ec5d1556b 100644 --- a/nextstep/Makefile.in +++ b/nextstep/Makefile.in @@ -61,7 +61,6 @@ distclean: clean GNUstep/Emacs.base/Resources/Emacs.desktop \ Cocoa/Emacs.base/Contents/Info.plist \ Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings - [ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || rm -rf ${ns_appsrc} maintainer-clean: distclean From 518650a581ac8716801ae17cc39d83db672ffa2a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Sep 2012 12:17:20 -0700 Subject: [PATCH 201/216] * src/Makefile.in (clean): No longer run nextstep's clean. --- src/ChangeLog | 2 ++ src/Makefile.in | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e322406a0e6..99921577b07 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2012-09-16 Glenn Morris + * Makefile.in (clean): No longer run nextstep's clean. + * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables. (ns_frag): Remove. (ns-app): Move here from ns.mk, and simplify. diff --git a/src/Makefile.in b/src/Makefile.in index 5c16b93803e..37da170edbd 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -514,7 +514,6 @@ mostlyclean: clean: mostlyclean rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) -rm -rf $(DEPDIR) - -cd ../nextstep && $(MAKE) $(MFLAGS) clean ## bootstrap-clean is used to clean up just before a bootstrap. ## It should remove all files generated during a compilation/bootstrap, From 634b8cacd6cc0557c1963ad7409db247963046d2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Sep 2012 14:18:00 -0700 Subject: [PATCH 202/216] * font.c (Ffont_shape_gstring): Remove unused local. --- src/ChangeLog | 4 ++++ src/font.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 99921577b07..32cd7b3e813 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-16 Paul Eggert + + * font.c (Ffont_shape_gstring): Remove unused local. + 2012-09-16 Glenn Morris * Makefile.in (clean): No longer run nextstep's clean. diff --git a/src/font.c b/src/font.c index fc970254a62..1f22fee88ee 100644 --- a/src/font.c +++ b/src/font.c @@ -4303,7 +4303,7 @@ GSTRING. */) { struct font *font; Lisp_Object font_object, n, glyph; - ptrdiff_t i, j, from, to; + ptrdiff_t i, from, to; if (! composition_gstring_p (gstring)) signal_error ("Invalid glyph-string: ", gstring); From 0caaedb1c3c9c48980144e41d2a95329d39c399a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Sep 2012 14:43:55 -0700 Subject: [PATCH 203/216] Remove configure's --without-sync-input option. When auditing signal-handling in preparation for cleaning it up, I found that SYNC_INPUT has race conditions and would be a real pain to fix. Since it's an undocumented and deprecated configure-time option, now seems like a good time to remove it. Also see . * configure.ac (SYNC_INPUT, BROKEN_SA_RESTART): Remove. * admin/CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove. * etc/TODO (Make SYNC_INPUT the default): Remove, as the code now behaves as if SYNC_INPUT is always true. * src/alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal) (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls. (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: (malloc_hysteresis): (check_depth) [XMALLOC_OVERRUN_CHECK]: (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED) (dont_register_blocks, bytes_used_when_reconsidered) (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc) (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc): [!SYSTEM_MALLOC && !SYNC_INPUT]: Remove. All uses removed. (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different implementation, one that depends on whether the new macro XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT is defined. * src/atimer.c (run_timers, handle_alarm_signal): * src/keyboard.c (pending_signal, poll_for_input_1, poll_for_input) (handle_async_input, process_pending_signals) (handle_input_available_signal, init_keyboard): * src/nsterm.m (ns_read_socket): * src/process.c (wait_reading_process_output): * src/regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK): * src/sysdep.c (emacs_sigaction_init) [SA_RESTART]: (emacs_write): * src/xterm.c (XTread_socket): Assume SYNC_INPUT. * src/conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef. * src/eval.c (handling_signal): Remove. All uses removed. * src/lisp.h (ELSE_PENDING_SIGNALS): Remove. All uses replaced with the SYNC_INPUT version. (reset_malloc_hooks, uninterrupt_malloc, handling_signal): Remove decls. * src/sysdep.c, src/syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Now static. Fixes: debbugs:12450 --- ChangeLog | 5 + admin/CPP-DEFINES | 2 - admin/ChangeLog | 5 + configure.ac | 10 -- etc/ChangeLog | 6 + etc/TODO | 7 - src/ChangeLog | 42 +++++ src/alloc.c | 424 ++++------------------------------------------ src/atimer.c | 9 - src/bytecode.c | 3 +- src/conf_post.h | 1 - src/emacs.c | 12 +- src/eval.c | 16 +- src/intervals.c | 3 +- src/keyboard.c | 37 +--- src/lisp.h | 13 +- src/nsmenu.m | 5 +- src/nsterm.m | 9 +- src/process.c | 2 - src/regex.c | 6 +- src/sysdep.c | 18 +- src/syssignal.h | 4 - src/xdisp.c | 6 - src/xterm.c | 12 -- 24 files changed, 113 insertions(+), 544 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dadc44ebd7..4bdca0c914a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-16 Paul Eggert + + Remove configure's --without-sync-input option (Bug#12450). + * configure.ac (SYNC_INPUT, BROKEN_SA_RESTART): Remove. + 2012-09-16 Glenn Morris Increase compartmentalization of Nextstep builds rules, diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 834695d6c78..661cde9c43e 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -90,7 +90,6 @@ BROKEN_GETWD BROKEN_GET_CURRENT_DIR_NAME BROKEN_NON_BLOCKING_CONNECT BROKEN_PTY_READ_AFTER_EAGAIN -BROKEN_SA_RESTART CLASH_DETECTION DATA_SEG_BITS DATA_START @@ -434,7 +433,6 @@ PTY_OPEN PTY_TTY_NAME_SPRINTF PURESIZE RUN_TIME_REMAP -SA_RESTART SETPGRP_RELEASES_CTTY SETUP_SLAVE_PTY SIGALRM diff --git a/admin/ChangeLog b/admin/ChangeLog index 27765a078f6..8fe16b9e766 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2012-09-16 Paul Eggert + + Remove configure's --without-sync-input option (Bug#12450). + * CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove. + 2012-09-16 Glenn Morris * admin.el (set-version): No more need to set nextstep versions. diff --git a/configure.ac b/configure.ac index 38a7613d84a..569b367371a 100644 --- a/configure.ac +++ b/configure.ac @@ -128,11 +128,6 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME], OPTION_DEFAULT_ON([sound],[don't compile with sound support]) -OPTION_DEFAULT_ON([sync-input],[don't process async input synchronously]) -if test "$with_sync_input" = yes; then - AC_DEFINE(SYNC_INPUT, 1, [Process async input synchronously.]) -fi - dnl FIXME currently it is not the last. dnl This should be the last --with option, because --with-x is dnl added later on when we find the path of X, and it's best to @@ -3949,11 +3944,6 @@ case $opsys in ;; hpux11) - dnl See comments in sysdep.c:sys_signal. - dnl SA_RESTART resets the timeout of `select' on hpux11. - dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART. - AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only - be used in batch mode.]) dnl It works to open the pty's tty in the parent (Emacs), then dnl close and reopen it in the child. AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it diff --git a/etc/ChangeLog b/etc/ChangeLog index 66c229eaf78..5a14c523cf3 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,9 @@ +2012-09-16 Paul Eggert + + Remove configure's --without-sync-input option (Bug#12450). + * TODO (Make SYNC_INPUT the default): Remove, as the code now + behaves as if SYNC_INPUT is always true. + 2012-09-13 Paul Eggert Use a more backwards-compatible timer format (Bug#12430). diff --git a/etc/TODO b/etc/TODO index 50e3bd64b9d..be0ef95aed2 100644 --- a/etc/TODO +++ b/etc/TODO @@ -1229,13 +1229,6 @@ systems for HTML/XML files automatically." For use by sml-mode, python-mode, tex-mode, scheme-mode, lisp-mode, haskell-mode, tuareg-mode, ... -** Make SYNC_INPUT the default. [true since 2008-03-11] - All loops using immediate_quit need to be checked to ensure that - C-g can interrupt them, in case of an infinite loop. Once we - switch to using SYNC_INPUT, we can remove the BLOCK_INPUTs in the - allocation functions (allocate_string etc.) without worrying about - data munging. - ** Add "link" button class Add a standard button-class named "link", and make all other link-like button classes inherit from it. Set the default face of the "link" button diff --git a/src/ChangeLog b/src/ChangeLog index 32cd7b3e813..f21395d9632 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,47 @@ 2012-09-16 Paul Eggert + Remove configure's --without-sync-input option (Bug#12450). + When auditing signal-handling in preparation for cleaning it up, + I found that SYNC_INPUT has race conditions and would be a real + pain to fix. Since it's an undocumented and deprecated + configure-time option, now seems like a good time to remove it. + Also see . + * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal) + (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls. + (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]: + (malloc_hysteresis): + (check_depth) [XMALLOC_OVERRUN_CHECK]: + (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): + (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED) + (dont_register_blocks, bytes_used_when_reconsidered) + (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc) + (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc): + [!SYSTEM_MALLOC && !SYNC_INPUT]: + Remove. All uses removed. + (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different + implementation, one that depends on whether the new macro + XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT + is defined. + * atimer.c (run_timers, handle_alarm_signal): + * keyboard.c (pending_signal, poll_for_input_1, poll_for_input) + (handle_async_input, process_pending_signals) + (handle_input_available_signal, init_keyboard): + * nsterm.m (ns_read_socket): + * process.c (wait_reading_process_output): + * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK): + * sysdep.c (emacs_sigaction_init) [SA_RESTART]: + (emacs_write): + * xterm.c (XTread_socket): + Assume SYNC_INPUT. + * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef. + * eval.c (handling_signal): Remove. All uses removed. + * lisp.h (ELSE_PENDING_SIGNALS): Remove. + All uses replaced with the SYNC_INPUT version. + (reset_malloc_hooks, uninterrupt_malloc, handling_signal): + Remove decls. + * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]: + Now static. + * font.c (Ffont_shape_gstring): Remove unused local. 2012-09-16 Glenn Morris diff --git a/src/alloc.c b/src/alloc.c index 0bfbb0c88b1..fb7d35b5590 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -85,68 +85,8 @@ extern void *sbrk (); #define MMAP_MAX_AREAS 100000000 -#else /* not DOUG_LEA_MALLOC */ - -/* The following come from gmalloc.c. */ - -extern size_t _bytes_used; -extern size_t __malloc_extra_blocks; -extern void *_malloc_internal (size_t); -extern void _free_internal (void *); - #endif /* not DOUG_LEA_MALLOC */ -#if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT -#ifdef HAVE_PTHREAD - -# include "syssignal.h" - -/* When GTK uses the file chooser dialog, different backends can be loaded - dynamically. One such a backend is the Gnome VFS backend that gets loaded - if you run Gnome. That backend creates several threads and also allocates - memory with malloc. - - Also, gconf and gsettings may create several threads. - - If Emacs sets malloc hooks (! SYSTEM_MALLOC) and the emacs_blocked_* - functions below are called from malloc, there is a chance that one - of these threads preempts the Emacs main thread and the hook variables - end up in an inconsistent state. So we have a mutex to prevent that (note - that the backend handles concurrent access to malloc within its own threads - but Emacs code running in the main thread is not included in that control). - - When UNBLOCK_INPUT is called, reinvoke_input_signal may be called. If this - happens in one of the backend threads we will have two threads that tries - to run Emacs code at once, and the code is not prepared for that. - To prevent that, we only call BLOCK/UNBLOCK from the main thread. */ - -static pthread_mutex_t alloc_mutex; - -#define BLOCK_INPUT_ALLOC \ - do \ - { \ - if (pthread_equal (pthread_self (), main_thread)) \ - BLOCK_INPUT; \ - pthread_mutex_lock (&alloc_mutex); \ - } \ - while (0) -#define UNBLOCK_INPUT_ALLOC \ - do \ - { \ - pthread_mutex_unlock (&alloc_mutex); \ - if (pthread_equal (pthread_self (), main_thread)) \ - UNBLOCK_INPUT; \ - } \ - while (0) - -#else /* ! defined HAVE_PTHREAD */ - -#define BLOCK_INPUT_ALLOC BLOCK_INPUT -#define UNBLOCK_INPUT_ALLOC UNBLOCK_INPUT - -#endif /* ! defined HAVE_PTHREAD */ -#endif /* ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT */ - /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer to a struct Lisp_String. */ @@ -205,10 +145,6 @@ static char *spare_memory[7]; #define SPARE_MEMORY (1 << 14) -/* Number of extra blocks malloc should get when it needs more core. */ - -static int malloc_hysteresis; - /* Initialize it to a nonzero value to force it into data space (rather than bss space). That way unexec will remap it into text space (pure), on some systems. We have not implemented the @@ -413,12 +349,12 @@ static void mark_memory (void *, void *); static void mem_init (void); static struct mem_node *mem_insert (void *, void *, enum mem_type); static void mem_insert_fixup (struct mem_node *); -#endif static void mem_rotate_left (struct mem_node *); static void mem_rotate_right (struct mem_node *); static void mem_delete (struct mem_node *); static void mem_delete_fixup (struct mem_node *); static inline struct mem_node *mem_find (void *); +#endif #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS @@ -587,39 +523,17 @@ xmalloc_get_size (unsigned char *ptr) } -/* The call depth in overrun_check functions. For example, this might happen: - xmalloc() - overrun_check_malloc() - -> malloc -> (via hook)_-> emacs_blocked_malloc - -> overrun_check_malloc - call malloc (hooks are NULL, so real malloc is called). - malloc returns 10000. - add overhead, return 10016. - <- (back in overrun_check_malloc) - add overhead again, return 10032 - xmalloc returns 10032. - - (time passes). - - xfree(10032) - overrun_check_free(10032) - decrease overhead - free(10016) <- crash, because 10000 is the original pointer. */ - -static ptrdiff_t check_depth; - /* Like malloc, but wraps allocated block with header and trailer. */ static void * overrun_check_malloc (size_t size) { register unsigned char *val; - int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0; - if (SIZE_MAX - overhead < size) + if (SIZE_MAX - XMALLOC_OVERRUN_CHECK_OVERHEAD < size) emacs_abort (); - val = malloc (size + overhead); - if (val && check_depth == 1) + val = malloc (size + XMALLOC_OVERRUN_CHECK_OVERHEAD); + if (val) { memcpy (val, xmalloc_overrun_check_header, XMALLOC_OVERRUN_CHECK_SIZE); val += XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE; @@ -627,7 +541,6 @@ overrun_check_malloc (size_t size) memcpy (val + size, xmalloc_overrun_check_trailer, XMALLOC_OVERRUN_CHECK_SIZE); } - --check_depth; return val; } @@ -639,12 +552,10 @@ static void * overrun_check_realloc (void *block, size_t size) { register unsigned char *val = (unsigned char *) block; - int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0; - if (SIZE_MAX - overhead < size) + if (SIZE_MAX - XMALLOC_OVERRUN_CHECK_OVERHEAD < size) emacs_abort (); if (val - && check_depth == 1 && memcmp (xmalloc_overrun_check_header, val - XMALLOC_OVERRUN_CHECK_SIZE - XMALLOC_OVERRUN_SIZE_SIZE, XMALLOC_OVERRUN_CHECK_SIZE) == 0) @@ -658,9 +569,9 @@ overrun_check_realloc (void *block, size_t size) memset (val, 0, XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE); } - val = realloc (val, size + overhead); + val = realloc (val, size + XMALLOC_OVERRUN_CHECK_OVERHEAD); - if (val && check_depth == 1) + if (val) { memcpy (val, xmalloc_overrun_check_header, XMALLOC_OVERRUN_CHECK_SIZE); val += XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE; @@ -668,7 +579,6 @@ overrun_check_realloc (void *block, size_t size) memcpy (val + size, xmalloc_overrun_check_trailer, XMALLOC_OVERRUN_CHECK_SIZE); } - --check_depth; return val; } @@ -679,9 +589,7 @@ overrun_check_free (void *block) { unsigned char *val = (unsigned char *) block; - ++check_depth; if (val - && check_depth == 1 && memcmp (xmalloc_overrun_check_header, val - XMALLOC_OVERRUN_CHECK_SIZE - XMALLOC_OVERRUN_SIZE_SIZE, XMALLOC_OVERRUN_CHECK_SIZE) == 0) @@ -701,7 +609,6 @@ overrun_check_free (void *block) } free (val); - --check_depth; } #undef malloc @@ -712,14 +619,33 @@ overrun_check_free (void *block) #define free overrun_check_free #endif -#ifdef SYNC_INPUT -/* When using SYNC_INPUT, we don't call malloc from a signal handler, so - there's no need to block input around malloc. */ -#define MALLOC_BLOCK_INPUT ((void)0) -#define MALLOC_UNBLOCK_INPUT ((void)0) +/* If compiled with XMALLOC_BLOCK_INPUT_CHECK, define a symbol + BLOCK_INPUT_IN_MEMORY_ALLOCATORS that is visible to the debugger. + If that variable is set, block input while in one of Emacs's memory + allocation functions. There should be no need for this debugging + option, since signal handlers do not allocate memory, but Emacs + formerly allocated memory in signal handlers and this compile-time + option remains as a way to help debug the issue should it rear its + ugly head again. */ +#ifdef XMALLOC_BLOCK_INPUT_CHECK +bool block_input_in_memory_allocators EXTERNALLY_VISIBLE; +static void +malloc_block_input (void) +{ + if (block_input_in_memory_allocators) + BLOCK_INPUT; +} +static void +malloc_unblock_input (void) +{ + if (block_input_in_memory_allocators) + UNBLOCK_INPUT; +} +# define MALLOC_BLOCK_INPUT malloc_block_input () +# define MALLOC_UNBLOCK_INPUT malloc_unblock_input () #else -#define MALLOC_BLOCK_INPUT BLOCK_INPUT -#define MALLOC_UNBLOCK_INPUT UNBLOCK_INPUT +# define MALLOC_BLOCK_INPUT ((void) 0) +# define MALLOC_UNBLOCK_INPUT ((void) 0) #endif /* Like malloc but check for no memory and block interrupt input.. */ @@ -788,8 +714,7 @@ xfree (void *block) free (block); MALLOC_UNBLOCK_INPUT; /* We don't call refill_memory_reserve here - because that duplicates doing so in emacs_blocked_free - and the criterion should go there. */ + because in practice the call in r_alloc_free seems to suffice. */ } @@ -1215,256 +1140,6 @@ lisp_align_free (void *block) MALLOC_UNBLOCK_INPUT; } - -#ifndef SYSTEM_MALLOC - -/* Arranging to disable input signals while we're in malloc. - - This only works with GNU malloc. To help out systems which can't - use GNU malloc, all the calls to malloc, realloc, and free - elsewhere in the code should be inside a BLOCK_INPUT/UNBLOCK_INPUT - pair; unfortunately, we have no idea what C library functions - might call malloc, so we can't really protect them unless you're - using GNU malloc. Fortunately, most of the major operating systems - can use GNU malloc. */ - -#ifndef SYNC_INPUT -/* When using SYNC_INPUT, we don't call malloc from a signal handler, so - there's no need to block input around malloc. */ - -#ifndef DOUG_LEA_MALLOC -extern void * (*__malloc_hook) (size_t, const void *); -extern void * (*__realloc_hook) (void *, size_t, const void *); -extern void (*__free_hook) (void *, const void *); -/* Else declared in malloc.h, perhaps with an extra arg. */ -#endif /* DOUG_LEA_MALLOC */ -static void * (*old_malloc_hook) (size_t, const void *); -static void * (*old_realloc_hook) (void *, size_t, const void*); -static void (*old_free_hook) (void*, const void*); - -#ifdef DOUG_LEA_MALLOC -# define BYTES_USED (mallinfo ().uordblks) -#else -# define BYTES_USED _bytes_used -#endif - -#ifdef GC_MALLOC_CHECK -static bool dont_register_blocks; -#endif - -static size_t bytes_used_when_reconsidered; - -/* Value of _bytes_used, when spare_memory was freed. */ - -static size_t bytes_used_when_full; - -/* This function is used as the hook for free to call. */ - -static void -emacs_blocked_free (void *ptr, const void *ptr2) -{ - BLOCK_INPUT_ALLOC; - -#ifdef GC_MALLOC_CHECK - if (ptr) - { - struct mem_node *m; - - m = mem_find (ptr); - if (m == MEM_NIL || m->start != ptr) - { - fprintf (stderr, - "Freeing `%p' which wasn't allocated with malloc\n", ptr); - emacs_abort (); - } - else - { - /* fprintf (stderr, "free %p...%p (%p)\n", m->start, m->end, ptr); */ - mem_delete (m); - } - } -#endif /* GC_MALLOC_CHECK */ - - __free_hook = old_free_hook; - free (ptr); - - /* If we released our reserve (due to running out of memory), - and we have a fair amount free once again, - try to set aside another reserve in case we run out once more. */ - if (! NILP (Vmemory_full) - /* Verify there is enough space that even with the malloc - hysteresis this call won't run out again. - The code here is correct as long as SPARE_MEMORY - is substantially larger than the block size malloc uses. */ - && (bytes_used_when_full - > ((bytes_used_when_reconsidered = BYTES_USED) - + max (malloc_hysteresis, 4) * SPARE_MEMORY))) - refill_memory_reserve (); - - __free_hook = emacs_blocked_free; - UNBLOCK_INPUT_ALLOC; -} - - -/* This function is the malloc hook that Emacs uses. */ - -static void * -emacs_blocked_malloc (size_t size, const void *ptr) -{ - void *value; - - BLOCK_INPUT_ALLOC; - __malloc_hook = old_malloc_hook; -#ifdef DOUG_LEA_MALLOC - /* Segfaults on my system. --lorentey */ - /* mallopt (M_TOP_PAD, malloc_hysteresis * 4096); */ -#else - __malloc_extra_blocks = malloc_hysteresis; -#endif - - value = malloc (size); - -#ifdef GC_MALLOC_CHECK - { - struct mem_node *m = mem_find (value); - if (m != MEM_NIL) - { - fprintf (stderr, "Malloc returned %p which is already in use\n", - value); - fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n", - m->start, m->end, (char *) m->end - (char *) m->start, - m->type); - emacs_abort (); - } - - if (!dont_register_blocks) - { - mem_insert (value, (char *) value + max (1, size), allocated_mem_type); - allocated_mem_type = MEM_TYPE_NON_LISP; - } - } -#endif /* GC_MALLOC_CHECK */ - - __malloc_hook = emacs_blocked_malloc; - UNBLOCK_INPUT_ALLOC; - - /* fprintf (stderr, "%p malloc\n", value); */ - return value; -} - - -/* This function is the realloc hook that Emacs uses. */ - -static void * -emacs_blocked_realloc (void *ptr, size_t size, const void *ptr2) -{ - void *value; - - BLOCK_INPUT_ALLOC; - __realloc_hook = old_realloc_hook; - -#ifdef GC_MALLOC_CHECK - if (ptr) - { - struct mem_node *m = mem_find (ptr); - if (m == MEM_NIL || m->start != ptr) - { - fprintf (stderr, - "Realloc of %p which wasn't allocated with malloc\n", - ptr); - emacs_abort (); - } - - mem_delete (m); - } - - /* fprintf (stderr, "%p -> realloc\n", ptr); */ - - /* Prevent malloc from registering blocks. */ - dont_register_blocks = 1; -#endif /* GC_MALLOC_CHECK */ - - value = realloc (ptr, size); - -#ifdef GC_MALLOC_CHECK - dont_register_blocks = 0; - - { - struct mem_node *m = mem_find (value); - if (m != MEM_NIL) - { - fprintf (stderr, "Realloc returns memory that is already in use\n"); - emacs_abort (); - } - - /* Can't handle zero size regions in the red-black tree. */ - mem_insert (value, (char *) value + max (size, 1), MEM_TYPE_NON_LISP); - } - - /* fprintf (stderr, "%p <- realloc\n", value); */ -#endif /* GC_MALLOC_CHECK */ - - __realloc_hook = emacs_blocked_realloc; - UNBLOCK_INPUT_ALLOC; - - return value; -} - - -#ifdef HAVE_PTHREAD -/* Called from Fdump_emacs so that when the dumped Emacs starts, it has a - normal malloc. Some thread implementations need this as they call - malloc before main. The pthread_self call in BLOCK_INPUT_ALLOC then - calls malloc because it is the first call, and we have an endless loop. */ - -void -reset_malloc_hooks (void) -{ - __free_hook = old_free_hook; - __malloc_hook = old_malloc_hook; - __realloc_hook = old_realloc_hook; -} -#endif /* HAVE_PTHREAD */ - - -/* Called from main to set up malloc to use our hooks. */ - -void -uninterrupt_malloc (void) -{ -#ifdef HAVE_PTHREAD -#ifdef DOUG_LEA_MALLOC - pthread_mutexattr_t attr; - - /* GLIBC has a faster way to do this, but let's keep it portable. - This is according to the Single UNIX Specification. */ - pthread_mutexattr_init (&attr); - pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init (&alloc_mutex, &attr); -#else /* !DOUG_LEA_MALLOC */ - /* Some systems such as Solaris 2.6 don't have a recursive mutex, - and the bundled gmalloc.c doesn't require it. */ - pthread_mutex_init (&alloc_mutex, NULL); -#endif /* !DOUG_LEA_MALLOC */ -#endif /* HAVE_PTHREAD */ - - if (__free_hook != emacs_blocked_free) - old_free_hook = __free_hook; - __free_hook = emacs_blocked_free; - - if (__malloc_hook != emacs_blocked_malloc) - old_malloc_hook = __malloc_hook; - __malloc_hook = emacs_blocked_malloc; - - if (__realloc_hook != emacs_blocked_realloc) - old_realloc_hook = __realloc_hook; - __realloc_hook = emacs_blocked_realloc; -} - -#endif /* not SYNC_INPUT */ -#endif /* not SYSTEM_MALLOC */ - - /*********************************************************************** Interval Allocation @@ -1511,8 +1186,6 @@ make_interval (void) { INTERVAL val; - /* eassert (!handling_signal); */ - MALLOC_BLOCK_INPUT; if (interval_free_list) @@ -1896,8 +1569,6 @@ allocate_string (void) { struct Lisp_String *s; - /* eassert (!handling_signal); */ - MALLOC_BLOCK_INPUT; /* If the free-list is empty, allocate a new string_block, and @@ -2589,8 +2260,6 @@ make_float (double float_value) { register Lisp_Object val; - /* eassert (!handling_signal); */ - MALLOC_BLOCK_INPUT; if (float_free_list) @@ -2698,8 +2367,6 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, { register Lisp_Object val; - /* eassert (!handling_signal); */ - MALLOC_BLOCK_INPUT; if (cons_free_list) @@ -3205,9 +2872,6 @@ allocate_vectorlike (ptrdiff_t len) MALLOC_BLOCK_INPUT; - /* This gets triggered by code which I haven't bothered to fix. --Stef */ - /* eassert (!handling_signal); */ - if (len == 0) p = XVECTOR (zero_vector); else @@ -3492,8 +3156,6 @@ Its value and function definition are void, and its property list is nil. */) CHECK_STRING (name); - /* eassert (!handling_signal); */ - MALLOC_BLOCK_INPUT; if (symbol_free_list) @@ -3578,8 +3240,6 @@ allocate_misc (enum Lisp_Misc_Type type) { Lisp_Object val; - /* eassert (!handling_signal); */ - MALLOC_BLOCK_INPUT; if (marker_free_list) @@ -3799,12 +3459,6 @@ memory_full (size_t nbytes) lisp_free (spare_memory[i]); spare_memory[i] = 0; } - - /* Record the space now used. When it decreases substantially, - we can refill the memory reserve. */ -#if !defined SYSTEM_MALLOC && !defined SYNC_INPUT - bytes_used_when_full = BYTES_USED; -#endif } /* This used to call error, but if we've run out of memory, we could @@ -3942,7 +3596,7 @@ mem_insert (void *start, void *end, enum mem_type type) /* Create a new node. */ #ifdef GC_MALLOC_CHECK - x = _malloc_internal (sizeof *x); + x = malloc (sizeof *x); if (x == NULL) emacs_abort (); #else @@ -4166,7 +3820,7 @@ mem_delete (struct mem_node *z) mem_delete_fixup (x); #ifdef GC_MALLOC_CHECK - _free_internal (y); + free (y); #else xfree (y); #endif @@ -6767,12 +6421,6 @@ init_alloc_once (void) init_strings (); init_vectors (); -#ifdef REL_ALLOC - malloc_hysteresis = 32; -#else - malloc_hysteresis = 0; -#endif - refill_memory_reserve (); gc_cons_threshold = GC_DEFAULT_THRESHOLD; } diff --git a/src/atimer.c b/src/atimer.c index 80b813fe4fe..5dbd807872a 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -369,7 +369,6 @@ run_timers (void) if (! atimers) pending_atimers = 0; -#ifdef SYNC_INPUT if (pending_atimers) pending_signals = 1; else @@ -377,10 +376,6 @@ run_timers (void) pending_signals = interrupt_input_pending; set_alarm (); } -#else - if (! pending_atimers) - set_alarm (); -#endif } @@ -391,11 +386,7 @@ static void handle_alarm_signal (int sig) { pending_atimers = 1; -#ifdef SYNC_INPUT pending_signals = 1; -#else - run_timers (); -#endif } static void diff --git a/src/bytecode.c b/src/bytecode.c index b151078f60f..5f4fdcc5eff 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -458,7 +458,8 @@ unmark_byte_stack (void) Fsignal (Qquit, Qnil); \ AFTER_POTENTIAL_GC (); \ } \ - ELSE_PENDING_SIGNALS \ + else if (pending_signals) \ + process_pending_signals (); \ } while (0) diff --git a/src/conf_post.h b/src/conf_post.h index 94934ffeadf..0c4d029bc5d 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -90,7 +90,6 @@ along with GNU Emacs. If not, see . */ char *_getpty(); #endif -#undef SA_RESTART /* not the same as defining BROKEN_SA_RESTART */ #endif /* IRIX6_5 */ #ifdef MSDOS diff --git a/src/emacs.c b/src/emacs.c index 1416bf76c43..233c0e68a14 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -848,14 +848,10 @@ main (int argc, char **argv) /* Arrange to get warning messages as memory fills up. */ memory_warnings (0, malloc_warning); - /* Call malloc at least once, to run the initial __malloc_hook. + /* Call malloc at least once, to run malloc_initialize_hook. Also call realloc and free for consistency. */ free (realloc (malloc (4), 4)); -# ifndef SYNC_INPUT - /* Arrange to disable interrupt input inside malloc etc. */ - uninterrupt_malloc (); -# endif /* not SYNC_INPUT */ #endif /* not SYSTEM_MALLOC */ #if defined (MSDOS) || defined (WINDOWSNT) @@ -2143,12 +2139,6 @@ You must run Emacs in batch mode in order to dump it. */) memory_warnings (my_edata, malloc_warning); } #endif /* not WINDOWSNT */ -#if defined (HAVE_PTHREAD) && !defined SYNC_INPUT - /* Pthread may call malloc before main, and then we will get an endless - loop, because pthread_self (see alloc.c) calls malloc the first time - it is called on some systems. */ - reset_malloc_hooks (); -#endif #endif /* not SYSTEM_MALLOC */ #ifdef DOUG_LEA_MALLOC malloc_state_ptr = malloc_get_state (); diff --git a/src/eval.c b/src/eval.c index 6cca13a8fda..1c565e233c6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -117,12 +117,6 @@ static EMACS_INT when_entered_debugger; Lisp_Object Vsignaling_function; -/* Set to non-zero while processing X events. Checked in Feval to - make sure the Lisp interpreter isn't called from a signal handler, - which is unsafe because the interpreter isn't reentrant. */ - -int handling_signal; - /* If non-nil, Lisp code must not be run since some part of Emacs is in an inconsistent state. Currently, x-create-frame uses this to avoid triggering window-configuration-change-hook while the new @@ -1106,7 +1100,6 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) /* Restore certain special C variables. */ set_poll_suppress_count (catch->poll_suppress_count); UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); - handling_signal = 0; immediate_quit = 0; do @@ -1486,7 +1479,7 @@ See also the function `condition-case'. */) struct handler *h; struct backtrace *bp; - immediate_quit = handling_signal = 0; + immediate_quit = 0; abort_on_gc = 0; if (gc_in_progress || waiting_for_input) emacs_abort (); @@ -2039,9 +2032,6 @@ eval_sub (Lisp_Object form) struct backtrace backtrace; struct gcpro gcpro1, gcpro2, gcpro3; - if (handling_signal) - emacs_abort (); - if (SYMBOLP (form)) { /* Look up its binding in the lexical environment. @@ -3104,8 +3094,6 @@ specbind (Lisp_Object symbol, Lisp_Object value) { struct Lisp_Symbol *sym; - eassert (!handling_signal); - CHECK_SYMBOL (symbol); sym = XSYMBOL (symbol); if (specpdl_ptr == specpdl + specpdl_size) @@ -3199,8 +3187,6 @@ specbind (Lisp_Object symbol, Lisp_Object value) void record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) { - eassert (!handling_signal); - if (specpdl_ptr == specpdl + specpdl_size) grow_specpdl (); specpdl_ptr->func = function; diff --git a/src/intervals.c b/src/intervals.c index 5a47cacb2dd..584ee1e923d 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -673,8 +673,7 @@ find_interval (register INTERVAL tree, register ptrdiff_t position) eassert (relative_position <= TOTAL_LENGTH (tree)); - if (!handling_signal) - tree = balance_possible_root_interval (tree); + tree = balance_possible_root_interval (tree); while (1) { diff --git a/src/keyboard.c b/src/keyboard.c index d164083fb86..01644b3832d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -84,9 +84,7 @@ int interrupt_input_pending; pending_atimers separately, to reduce code size. So, any code that changes interrupt_input_pending or pending_atimers should update this too. */ -#ifdef SYNC_INPUT int pending_signals; -#endif #define KBD_BUFFER_SIZE 4096 @@ -2010,17 +2008,9 @@ static struct atimer *poll_timer; void poll_for_input_1 (void) { -/* Tell ns_read_socket() it is being called asynchronously so it can avoid - doing anything dangerous. */ -#ifdef HAVE_NS - ++handling_signal; -#endif if (interrupt_input_blocked == 0 && !waiting_for_input) read_avail_input (0); -#ifdef HAVE_NS - --handling_signal; -#endif } /* Timer callback function for poll_timer. TIMER is equal to @@ -2031,12 +2021,8 @@ poll_for_input (struct atimer *timer) { if (poll_suppress_count == 0) { -#ifdef SYNC_INPUT interrupt_input_pending = 1; pending_signals = 1; -#else - poll_for_input_1 (); -#endif } } @@ -7176,19 +7162,12 @@ tty_read_avail_input (struct terminal *terminal, return nread; } -#if defined SYNC_INPUT || defined USABLE_SIGIO static void handle_async_input (void) { interrupt_input_pending = 0; -#ifdef SYNC_INPUT pending_signals = pending_atimers; -#endif -/* Tell ns_read_socket() it is being called asynchronously so it can avoid - doing anything dangerous. */ -#ifdef HAVE_NS - ++handling_signal; -#endif + while (1) { int nread; @@ -7199,13 +7178,8 @@ handle_async_input (void) if (nread <= 0) break; } -#ifdef HAVE_NS - --handling_signal; -#endif } -#endif /* SYNC_INPUT || USABLE_SIGIO */ -#ifdef SYNC_INPUT void process_pending_signals (void) { @@ -7213,24 +7187,17 @@ process_pending_signals (void) handle_async_input (); do_pending_atimers (); } -#endif #ifdef USABLE_SIGIO static void handle_input_available_signal (int sig) { -#ifdef SYNC_INPUT interrupt_input_pending = 1; pending_signals = 1; -#endif if (input_available_clear_time) *input_available_clear_time = make_emacs_time (0, 0); - -#ifndef SYNC_INPUT - handle_async_input (); -#endif } static void @@ -11365,9 +11332,7 @@ init_keyboard (void) input_pending = 0; interrupt_input_blocked = 0; interrupt_input_pending = 0; -#ifdef SYNC_INPUT pending_signals = 0; -#endif /* This means that command_loop_1 won't try to select anything the first time through. */ diff --git a/src/lisp.h b/src/lisp.h index 447c6bd296b..3a473a60b48 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2107,22 +2107,16 @@ extern char *stack_bottom; If quit-flag is set to `kill-emacs' the SIGINT handler has received a request to exit Emacs when it is safe to do. */ -#ifdef SYNC_INPUT extern void process_pending_signals (void); extern int pending_signals; -#define ELSE_PENDING_SIGNALS \ - else if (pending_signals) \ - process_pending_signals (); -#else /* not SYNC_INPUT */ -#define ELSE_PENDING_SIGNALS -#endif /* not SYNC_INPUT */ extern void process_quit_flag (void); #define QUIT \ do { \ if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ process_quit_flag (); \ - ELSE_PENDING_SIGNALS \ + else if (pending_signals) \ + process_pending_signals (); \ } while (0) @@ -2846,8 +2840,6 @@ extern void memory_warnings (void *, void (*warnfun) (const char *)); /* Defined in alloc.c. */ extern void check_pure_size (void); extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT); -extern void reset_malloc_hooks (void); -extern void uninterrupt_malloc (void); extern void malloc_warning (const char *); extern _Noreturn void memory_full (size_t); extern _Noreturn void buffer_memory_full (ptrdiff_t); @@ -3043,7 +3035,6 @@ extern Lisp_Object Qand_rest; extern Lisp_Object Vautoload_queue; extern Lisp_Object Vsignaling_function; extern Lisp_Object inhibit_lisp_code; -extern int handling_signal; #if BYTE_MARK_STACK extern struct catchtag *catchlist; extern struct handler *handlerlist; diff --git a/src/nsmenu.m b/src/nsmenu.m index 3057f4f6a20..907d3eac622 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -588,10 +588,7 @@ extern NSString *NSMenuDidBeginTrackingNotification; From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the key press case, NSMenuPropertyItemImage (e.g.) won't be set. */ - if (trackingMenu == 0 - /* Also, don't try this if from an event picked up asynchronously, - as lots of lisp evaluation happens in ns_update_menubar. */ - || handling_signal != 0) + if (trackingMenu == 0) return; /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */ ns_update_menubar (frame, 1, self); diff --git a/src/nsterm.m b/src/nsterm.m index 41520ce74d1..0b26508dbd0 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3355,16 +3355,12 @@ ns_read_socket (struct terminal *terminal, int expected, if (interrupt_input_blocked) { interrupt_input_pending = 1; -#ifdef SYNC_INPUT pending_signals = 1; -#endif return -1; } interrupt_input_pending = 0; -#ifdef SYNC_INPUT pending_signals = pending_atimers; -#endif BLOCK_INPUT; n_emacs_events_pending = 0; @@ -3726,7 +3722,7 @@ ns_judge_scroll_bars (struct frame *f) removed = YES; } - if (removed) + if (removed) [eview updateFrameSize: NO]; } @@ -3988,7 +3984,6 @@ ns_term_init (Lisp_Object display_name) /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */ /*GSDebugAllocationActive (YES); */ BLOCK_INPUT; - handling_signal = 0; baud_rate = 38400; Fset_input_interrupt_mode (Qnil); @@ -6239,7 +6234,7 @@ not_in_argv (NSString *arg) NSRect r = [super constrainFrameRect:frameRect toScreen:screen]; return r; } - + if (f->output_data.ns->dont_constrain || ns_menu_bar_should_be_hidden ()) return frameRect; diff --git a/src/process.c b/src/process.c index 6dbff6f4b16..a371dece250 100644 --- a/src/process.c +++ b/src/process.c @@ -4395,10 +4395,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, Otherwise, do pending quit if requested. */ if (read_kbd >= 0) QUIT; -#ifdef SYNC_INPUT else process_pending_signals (); -#endif /* Exit now if the cell we're waiting for became non-nil. */ if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) diff --git a/src/regex.c b/src/regex.c index 92264ccae23..17562043df1 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1831,9 +1831,9 @@ typedef struct /* The next available element. */ #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) -/* Explicit quit checking is only used on NTemacs and whenever we - use polling to process input events. */ -#if defined emacs && (defined WINDOWSNT || defined SYNC_INPUT) && defined QUIT +/* Explicit quit checking is needed for Emacs, which uses polling to + process input events. */ +#ifdef emacs extern int immediate_quit; # define IMMEDIATE_QUIT_CHECK \ do { \ diff --git a/src/sysdep.c b/src/sysdep.c index 9065b38d6fc..dbfd9efc7d4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1447,27 +1447,21 @@ emacs_sigaction_init (struct sigaction *action, signal_handler_t handler) action->sa_handler = handler; action->sa_flags = 0; #if defined (SA_RESTART) - /* Emacs mostly works better with restartable system services. If this - flag exists, we probably want to turn it on here. - However, on some systems (only hpux11 at present) this resets the - timeout of `select' which means that `select' never finishes if - it keeps getting signals. - We define BROKEN_SA_RESTART on those systems. */ - /* It's not clear why the comment above says "mostly works better". --Stef - When SYNC_INPUT is set, we don't want SA_RESTART because we need to poll + /* SA_RESTART causes interruptible functions with timeouts (e.g., + 'select') to reset their timeout on some platforms (e.g., + HP-UX 11), which is not what we want. Also, when Emacs is + interactive, we don't want SA_RESTART because we need to poll for pending input so we need long-running syscalls to be interrupted after a signal that sets the interrupt_input_pending flag. */ /* Non-interactive keyboard input goes through stdio, where we always want restartable system calls. */ -# if defined (BROKEN_SA_RESTART) || defined (SYNC_INPUT) if (noninteractive) -# endif action->sa_flags = SA_RESTART; #endif } #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD -pthread_t main_thread; +static pthread_t main_thread; #endif /* If we are on the main thread, handle the signal SIG with HANDLER. @@ -1914,11 +1908,9 @@ emacs_write (int fildes, const char *buf, ptrdiff_t nbyte) { if (errno == EINTR) { -#ifdef SYNC_INPUT /* I originally used `QUIT' but that might causes files to be truncated if you hit C-g in the middle of it. --Stef */ process_pending_signals (); -#endif continue; } else diff --git a/src/syssignal.h b/src/syssignal.h index 5e733dd812d..e309e6725b7 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -64,8 +64,4 @@ extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); char *strsignal (int); #endif -#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD -extern pthread_t main_thread; -#endif - void handle_on_main_thread (int, signal_handler_t); diff --git a/src/xdisp.c b/src/xdisp.c index 8e0975cf65a..5ee5a46601c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9290,12 +9290,6 @@ add_to_log (const char *format, Lisp_Object arg1, Lisp_Object arg2) struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; USE_SAFE_ALLOCA; - /* Do nothing if called asynchronously. Inserting text into - a buffer may call after-change-functions and alike and - that would means running Lisp asynchronously. */ - if (handling_signal) - return; - fmt = msg = Qnil; GCPRO4 (fmt, msg, arg1, arg2); diff --git a/src/xterm.c b/src/xterm.c index 900a1d78b80..9ab53dc087a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7129,25 +7129,17 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold if (interrupt_input_blocked) { interrupt_input_pending = 1; -#ifdef SYNC_INPUT pending_signals = 1; -#endif return -1; } interrupt_input_pending = 0; -#ifdef SYNC_INPUT pending_signals = pending_atimers; -#endif BLOCK_INPUT; /* So people can tell when we have read the available input. */ input_signal_count++; -#ifndef SYNC_INPUT - ++handling_signal; -#endif - /* For debugging, this gives a way to fake an I/O error. */ if (terminal->display_info.x == XTread_socket_fake_io_error) { @@ -7236,9 +7228,6 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold pending_autoraise_frame = 0; } -#ifndef SYNC_INPUT - --handling_signal; -#endif UNBLOCK_INPUT; return count; @@ -7788,7 +7777,6 @@ x_connection_closed (Display *dpy, const char *error_message) error_msg = alloca (strlen (error_message) + 1); strcpy (error_msg, error_message); - handling_signal = 0; /* Inhibit redisplay while frames are being deleted. */ specbind (Qinhibit_redisplay, Qt); From 48093eb9bca47488b6867e53a12e7cac37d6f5a6 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Sun, 16 Sep 2012 23:16:15 +0000 Subject: [PATCH 204/216] mail/mailabbrev.el (mail-abbrev-expand-hook): Work for a mail aliasee that holds many addresses. --- lisp/ChangeLog | 5 +++++ lisp/mail/mailabbrev.el | 47 ++++++++++++++++------------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9eeba6691c6..7700763cf25 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-16 Katsumi Yamaoka + + * mail/mailabbrev.el (mail-abbrev-expand-hook): Work for a mail aliasee + that holds many addresses. + 2012-09-16 Chong Yidong * align.el (align-areas): Call the indication function with diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 290c57c1c55..2e4ffec1383 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -391,35 +391,24 @@ double-quotes." (defun mail-abbrev-expand-hook () "For use as the fourth arg to `define-abbrev'. After expanding a mail-abbrev, if Auto Fill mode is on and we're past the -fill-column, break the line at the previous comma, and indent the next line." - ;; Disable abbrev mode to avoid recursion in indent-relative expanding - ;; part of the abbrev expansion as an abbrev itself. - (let ((abbrev-mode nil)) - (save-excursion - (let ((p (point)) - bol comma fp) - (beginning-of-line) - (setq bol (point)) - (goto-char p) - (while (and auto-fill-function - (>= (current-column) fill-column) - (search-backward "," bol t)) - (setq comma (point)) - (forward-char 1) ; Now we are just past the comma. - (insert "\n") - (delete-horizontal-space) - (setq p (point)) - (indent-relative) - (setq fp (buffer-substring p (point))) - ;; Go to the end of the new line. - (end-of-line) - (if (> (current-column) fill-column) - ;; It's still too long; do normal auto-fill. - (let ((fill-prefix (or fp "\t"))) - (do-auto-fill))) - ;; Resume the search. - (goto-char comma) - ))))) +fill-column, break the line at the previous comma, and indent the next line +with a space." + (when auto-fill-function + (let (p) + (save-excursion + (while (>= (current-column) fill-column) + (while (and (search-backward "," (point-at-bol) 'move) + (>= (current-column) (1- fill-column)) + (setq p (point)))) + (when (or (not (bolp)) + (and p (goto-char p))) + (setq p nil) + (forward-char 1) + (insert "\n") + (when (looking-at "[\t ]+") + (delete-region (point) (match-end 0))) + (insert " ") + (end-of-line))))))) ;;; Syntax tables and abbrev-expansion From 78f83752f50a2aa9944e60a5aceac4015eb3ca58 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Sep 2012 17:56:08 -0700 Subject: [PATCH 205/216] Reduce the number of versioned files storing the short copyright string * configure.ac (copyright): New output variable. (COPYRIGHT): New AC_DEFINE. * admin/admin.el (set-copyright): No more need to set copyrights for nextstep, or .c files. Add configure.ac and config.nt. * lib-src/ebrowse.c (version): * lib-src/etags.c (print_version): Use COPYRIGHT. * nextstep/templates/Info-gnustep.plist.in: * nextstep/templates/InfoPlist.strings.in: * nextstep/templates/Info.plist.in: Let configure set copyright. * nt/config.nt (COPYRIGHT): New. * src/emacs.c: Use COPYRIGHT. --- ChangeLog | 5 +++++ admin/ChangeLog | 5 +++++ admin/admin.el | 28 +++++------------------- configure.ac | 5 +++++ lib-src/ChangeLog | 5 +++++ lib-src/ebrowse.c | 3 +-- lib-src/etags.c | 3 +-- nextstep/ChangeLog | 5 +++++ nextstep/templates/Info-gnustep.plist.in | 2 +- nextstep/templates/Info.plist.in | 2 +- nextstep/templates/InfoPlist.strings.in | 2 +- nt/ChangeLog | 4 ++++ nt/config.nt | 3 +++ src/ChangeLog | 4 ++++ src/emacs.c | 2 +- 15 files changed, 48 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4bdca0c914a..5edcd767b27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-17 Glenn Morris + + * configure.ac (copyright): New output variable. + (COPYRIGHT): New AC_DEFINE. + 2012-09-16 Paul Eggert Remove configure's --without-sync-input option (Bug#12450). diff --git a/admin/ChangeLog b/admin/ChangeLog index 8fe16b9e766..6d3118d8ba6 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2012-09-17 Glenn Morris + + * admin.el (set-copyright): No more need to set copyrights for + nextstep, or .c files. Add configure.ac and config.nt. + 2012-09-16 Paul Eggert Remove configure's --without-sync-input option (Bug#12450). diff --git a/admin/admin.el b/admin/admin.el index b076bb67dd1..4d68fca97b2 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -140,34 +140,18 @@ Root must be the root of an Emacs source tree." (format-time-string "%Y"))))) (unless (file-exists-p (expand-file-name "src/emacs.c" root)) (error "%s doesn't seem to be the root of an Emacs source tree" root)) - (set-version-in-file root "src/emacs.c" copyright - (rx (and "emacs_copyright" (0+ (not (in ?\"))) - ?\" (submatch (1+ (not (in ?\")))) ?\"))) - (set-version-in-file root "lib-src/ebrowse.c" copyright - (rx (and "emacs_copyright" (0+ (not (in ?\"))) - ?\" (submatch (1+ (not (in ?\")))) ?\"))) - (set-version-in-file root "lib-src/etags.c" copyright - (rx (and "emacs_copyright" (0+ (not (in ?\"))) + (set-version-in-file root "configure.ac" copyright + (rx (and bol "copyright" (0+ (not (in ?\"))) ?\" (submatch (1+ (not (in ?\")))) ?\"))) + (set-version-in-file root "nt/config.nt" copyright + (rx (and bol "#" (0+ blank) "define" (1+ blank) + "COPYRIGHT" (1+ blank) + ?\" (submatch (1+ (not (in ?\")))) ?\"))) (set-version-in-file root "lib-src/rcs2log" copyright (rx (and "Copyright" (0+ space) ?= (0+ space) ?\' (submatch (1+ nonl))))) ;; This one is a nuisance, as it needs to be split over two lines. (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) - ;; nextstep. - (set-version-in-file - root "nextstep/templates/Info.plist.in" - copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) - (1+ (in "0-9.")) (1+ space) - (submatch (1+ (not (in ?\<))))))) - (set-version-in-file - root "nextstep/templates/InfoPlist.strings.in" - copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space) - ?\" (submatch (1+ (not (in ?\"))))))) - (set-version-in-file - root "nextstep/templates/Info-gnustep.plist.in" - copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) - ?\" (submatch (1+ (not (in ?\"))))))) (when (string-match "\\([0-9]\\{4\\}\\)" copyright) (setq copyright (match-string 1 copyright)) (dolist (file (directory-files (expand-file-name "etc/refcards" root) diff --git a/configure.ac b/configure.ac index 569b367371a..d09d22bcbbd 100644 --- a/configure.ac +++ b/configure.ac @@ -3978,6 +3978,11 @@ fi version=$PACKAGE_VERSION +copyright="Copyright (C) 2012 Free Software Foundation, Inc." +AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"], + [Short copyright string for this version of Emacs.]) +AC_SUBST(copyright) + ### Specify what sort of things we'll be editing into Makefile and config.h. ### Use configuration here uncanonicalized to avoid exceeding size limits. AC_SUBST(version) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f5846657707..3f1e287db34 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-17 Glenn Morris + + * ebrowse.c (version): + * etags.c (print_version): Use COPYRIGHT. + 2012-09-11 Paul Eggert * pop.c (socket_connection) [HAVE_GETADDRINFO]: diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index f8569fe3747..056ed471fde 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -3516,8 +3516,7 @@ usage (int error) static _Noreturn void version (void) { - /* Makes it easier to update automatically. */ - char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; + char emacs_copyright[] = COPYRIGHT; printf ("ebrowse %s\n", VERSION); puts (emacs_copyright); diff --git a/lib-src/etags.c b/lib-src/etags.c index e65082de534..ec415e9905f 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -836,8 +836,7 @@ etags --help --lang=ada."); static void print_version (void) { - /* Makes it easier to update automatically. */ - char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; + char emacs_copyright[] = COPYRIGHT; printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION); puts (emacs_copyright); diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog index be73bc1f168..53f42c97716 100644 --- a/nextstep/ChangeLog +++ b/nextstep/ChangeLog @@ -1,3 +1,8 @@ +2012-09-17 Glenn Morris + + * templates/Info-gnustep.plist.in, templates/InfoPlist.strings.in: + * templates/Info.plist.in: Let configure set copyright. + 2012-09-16 Glenn Morris * Makefile.in: New file. diff --git a/nextstep/templates/Info-gnustep.plist.in b/nextstep/templates/Info-gnustep.plist.in index 6da5af489fb..4ac97e5cde6 100644 --- a/nextstep/templates/Info-gnustep.plist.in +++ b/nextstep/templates/Info-gnustep.plist.in @@ -11,7 +11,7 @@ "Carl Edman (NeXTstep)", "..see etc/NEXTSTEP" ); - Copyright = "Copyright (C) 2012 Free Software Foundation, Inc."; + Copyright = "@copyright@"; CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; FullVersionID = "Emacs @version@, NS Windowing"; NSExecutable = Emacs; diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.plist.in index df9708eae71..25c73916e58 100644 --- a/nextstep/templates/Info.plist.in +++ b/nextstep/templates/Info.plist.in @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see . CFBundleExecutable Emacs CFBundleGetInfoString - Emacs @version@ Copyright (C) 2012 Free Software Foundation, Inc. + Emacs @version@ @copyright@ CFBundleIconFile Emacs.icns CFBundleIdentifier diff --git a/nextstep/templates/InfoPlist.strings.in b/nextstep/templates/InfoPlist.strings.in index ce9779c7ac8..f38d8925017 100644 --- a/nextstep/templates/InfoPlist.strings.in +++ b/nextstep/templates/InfoPlist.strings.in @@ -3,4 +3,4 @@ CFBundleName = "Emacs"; CFBundleShortVersionString = "Version @version@"; CFBundleGetInfoString = "Emacs version @version@, NS Windowing"; -NSHumanReadableCopyright = "Copyright (C) 2012 Free Software Foundation, Inc."; +NSHumanReadableCopyright = "@copyright@"; diff --git a/nt/ChangeLog b/nt/ChangeLog index 197ce0cf850..f2a5281d1f8 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2012-09-17 Glenn Morris + + * config.nt (COPYRIGHT): New. + 2012-09-15 Paul Eggert Port _setjmp fix to POSIXish hosts as well as Microsoft. diff --git a/nt/config.nt b/nt/config.nt index 82b7da430ab..96217a8c580 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -86,6 +86,9 @@ along with GNU Emacs. If not, see . */ his/her Emacs. */ #undef CLASH_DETECTION +/* Short copyright string for this version of Emacs. */ +#define COPYRIGHT "Copyright (C) 2012 Free Software Foundation, Inc." + /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP systems. This function is required for 'alloca.c' support on those systems. */ diff --git a/src/ChangeLog b/src/ChangeLog index f21395d9632..3c0799d14b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-17 Glenn Morris + + * emacs.c: Use COPYRIGHT. + 2012-09-16 Paul Eggert Remove configure's --without-sync-input option (Bug#12450). diff --git a/src/emacs.c b/src/emacs.c index 233c0e68a14..d4b52ab64ea 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -88,7 +88,7 @@ extern void moncontrol (int mode); #endif static const char emacs_version[] = VERSION; -static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; +static const char emacs_copyright[] = COPYRIGHT; /* Empty lisp strings. To avoid having to build any others. */ Lisp_Object empty_unibyte_string, empty_multibyte_string; From eeceac9312792b15bbafea16dec45a6b7d1312cc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Sep 2012 18:02:11 -0700 Subject: [PATCH 206/216] Remove no-longer-needed Solaris 2.4 vfork bug workaround. The workaround was for improving performance on Solaris 2.4, but is getting in the way now. Emacs will still work if someone is still running Solaris 2.4 in a museum somewhere; Sun dropped support for Solaris 2.4 in 2003. * configure.ac (ac_cv_func_vfork_works): Default to 'no' on Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works. * src/callproc.c (Fcall_process) [HAVE_WORKING_VFORK]: * src/process.c (create_process) [HAVE_WORKING_VFORK]: Omit now-unnecessary workaround for the Solaris 2.4 vfork bug, since Emacs no longer uses vfork on that platform. --- ChangeLog | 6 ++++++ configure.ac | 8 ++++++++ src/ChangeLog | 12 ++++++++++++ src/callproc.c | 25 ------------------------- src/process.c | 39 ++++++++------------------------------- 5 files changed, 34 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5edcd767b27..7b9da902551 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-17 Paul Eggert + + Remove no-longer-needed Solaris 2.4 vfork bug workaround. + * configure.ac (ac_cv_func_vfork_works): Default to 'no' on + Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works. + 2012-09-17 Glenn Morris * configure.ac (copyright): New output variable. diff --git a/configure.ac b/configure.ac index d09d22bcbbd..d0cbabf3d3d 100644 --- a/configure.ac +++ b/configure.ac @@ -3155,6 +3155,14 @@ else AC_MSG_RESULT(no) fi +dnl Check for a Solaris 2.4 vfork bug that Autoconf misses (through 2.69). +dnl This can be removed once we assume Autoconf 2.70. +case $canonical in + *-solaris2.4 | *-solaris2.4.*) + dnl Disable the Autoconf-generated vfork test. + : ${ac_cv_func_vfork_works=no};; +esac + AC_FUNC_FORK AC_CHECK_FUNCS(snprintf) diff --git a/src/ChangeLog b/src/ChangeLog index 3c0799d14b3..daabdd7613e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2012-09-17 Paul Eggert + + Remove no-longer-needed Solaris 2.4 vfork bug workaround. + The workaround was for improving performance on Solaris 2.4, but + is getting in the way now. Emacs will still work if someone is + still running Solaris 2.4 in a museum somewhere; Sun dropped + support for Solaris 2.4 in 2003. + * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]: + * process.c (create_process) [HAVE_WORKING_VFORK]: + Omit now-unnecessary workaround for the Solaris 2.4 vfork bug, + since Emacs no longer uses vfork on that platform. + 2012-09-17 Glenn Morris * emacs.c: Use COPYRIGHT. diff --git a/src/callproc.c b/src/callproc.c index 9171337ee76..2604d295f3e 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -496,11 +496,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) register char **save_environ = environ; register int fd1 = fd[1]; int fd_error = fd1; -#ifdef HAVE_WORKING_VFORK - sigset_t procmask; - sigset_t blocked; - struct sigaction sigpipe_action; -#endif if (fd_output >= 0) fd1 = fd_output; @@ -587,17 +582,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) 0, current_dir); #else /* not WINDOWSNT */ -#ifdef HAVE_WORKING_VFORK - /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal', - this sets the parent's signal handlers as well as the child's. - So delay all interrupts whose handlers the child might munge, - and record the current handlers so they can be restored later. */ - sigemptyset (&blocked); - sigaddset (&blocked, SIGPIPE); - sigaction (SIGPIPE, 0, &sigpipe_action); - pthread_sigmask (SIG_BLOCK, &blocked, &procmask); -#endif - BLOCK_INPUT; /* vfork, and prevent local vars from being clobbered by the vfork. */ @@ -645,9 +629,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) /* GConf causes us to ignore SIGPIPE, make sure it is restored in the child. */ signal (SIGPIPE, SIG_DFL); -#ifdef HAVE_WORKING_VFORK - pthread_sigmask (SIG_SETMASK, &procmask, 0); -#endif child_setup (filefd, fd1, fd_error, (char **) new_argv, 0, current_dir); @@ -655,12 +636,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) UNBLOCK_INPUT; -#ifdef HAVE_WORKING_VFORK - /* Restore the signal state. */ - sigaction (SIGPIPE, &sigpipe_action, 0); - pthread_sigmask (SIG_SETMASK, &procmask, 0); -#endif - #endif /* not WINDOWSNT */ /* The MSDOS case did this already. */ diff --git a/src/process.c b/src/process.c index a371dece250..c654369627d 100644 --- a/src/process.c +++ b/src/process.c @@ -1609,14 +1609,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) int wait_child_setup[2]; #endif +#ifdef SIGCHLD sigset_t blocked, procmask; - struct sigaction sigint_action; - struct sigaction sigquit_action; - struct sigaction sigpipe_action; -#ifdef AIX - struct sigaction sighup_action; #endif - /* Use volatile to protect variables from being clobbered by longjmp. */ + /* Use volatile to protect variables from being clobbered by vfork. */ volatile int forkin, forkout; volatile int pty_flag = 0; @@ -1708,25 +1704,13 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) XPROCESS (process)->pty_flag = pty_flag; pset_status (XPROCESS (process), Qrun); +#ifdef SIGCHLD /* Delay interrupts until we have a chance to store the new fork's pid in its process structure */ sigemptyset (&blocked); -#ifdef SIGCHLD sigaddset (&blocked, SIGCHLD); -#endif -#ifdef HAVE_WORKING_VFORK - /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal', - this sets the parent's signal handlers as well as the child's. - So delay all interrupts whose handlers the child might munge, - and record the current handlers so they can be restored later. */ - sigaddset (&blocked, SIGINT ); sigaction (SIGINT , 0, &sigint_action ); - sigaddset (&blocked, SIGQUIT); sigaction (SIGQUIT, 0, &sigquit_action); - sigaddset (&blocked, SIGPIPE); sigaction (SIGPIPE, 0, &sigpipe_action); -#ifdef AIX - sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action ); -#endif -#endif /* HAVE_WORKING_VFORK */ pthread_sigmask (SIG_BLOCK, &blocked, &procmask); +#endif FD_SET (inchannel, &input_wait_mask); FD_SET (inchannel, &non_keyboard_wait_mask); @@ -1879,8 +1863,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) in the child. */ signal (SIGPIPE, SIG_DFL); +#ifdef SIGCHLD /* Stop blocking signals in the child. */ pthread_sigmask (SIG_SETMASK, &procmask, 0); +#endif if (pty_flag) child_setup_tty (xforkout); @@ -1959,19 +1945,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) #endif } - /* Restore the signal state whether vfork succeeded or not. - (We will signal an error, below, if it failed.) */ -#ifdef HAVE_WORKING_VFORK - /* Restore the parent's signal handlers. */ - sigaction (SIGINT, &sigint_action, 0); - sigaction (SIGQUIT, &sigquit_action, 0); - sigaction (SIGPIPE, &sigpipe_action, 0); -#ifdef AIX - sigaction (SIGHUP, &sighup_action, 0); -#endif -#endif /* HAVE_WORKING_VFORK */ +#ifdef SIGCHLD /* Stop blocking signals in the parent. */ pthread_sigmask (SIG_SETMASK, &procmask, 0); +#endif /* Now generate the error if vfork failed. */ if (pid < 0) From 9e9da873897ad87e167fce1cb12cdcfaa2024e21 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 17 Sep 2012 11:24:32 +0800 Subject: [PATCH 207/216] Doc fix for removed var gdb-use-separate-io-buffer. * building.texi (GDB User Interface Layout): Remove reference to removed variable gdb-use-separate-io-buffer. Fixes: debbugs:12454 --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/building.texi | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 508dbbf8021..35e635eec28 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2012-09-17 Chong Yidong + + * building.texi (GDB User Interface Layout): Remove reference to + removed variable gdb-use-separate-io-buffer (Bug#12454). + 2012-09-08 Jambunathan K * regs.texi (Text Registers): `C-x r +' can now be used instead of diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 05ea667e5f7..21948f181fb 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -888,10 +888,6 @@ displays the following frame layout: @end group @end smallexample - However, if @code{gdb-use-separate-io-buffer} is @code{nil}, the I/O -buffer does not appear and the primary source buffer occupies the full -width of the frame. - @findex gdb-restore-windows @findex gdb-many-windows If you ever change the window layout, you can restore the ``many From d079ee5ffed33aa3cc4e02470ff84519ecdc844f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 17 Sep 2012 13:01:10 +0800 Subject: [PATCH 208/216] Convert several shell.el defvars to defcustoms. * shell.el (shell-file-name-chars, shell-file-name-quote-list) (shell-dynamic-complete-functions): Convert to defcustom. (shell-prompt-pattern, shell-completion-fignore): Doc fix. --- lisp/ChangeLog | 6 ++++++ lisp/shell.el | 34 ++++++++++++++-------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7700763cf25..217187c5e88 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-17 Chong Yidong + + * shell.el (shell-file-name-chars, shell-file-name-quote-list) + (shell-dynamic-complete-functions): Convert to defcustom. + (shell-prompt-pattern, shell-completion-fignore): Doc fix. + 2012-09-16 Katsumi Yamaoka * mail/mailabbrev.el (mail-abbrev-expand-hook): Work for a mail aliasee diff --git a/lisp/shell.el b/lisp/shell.el index b98efceefbf..8c80712eed6 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -136,9 +136,7 @@ how Shell mode treats paragraphs. The pattern should probably not match more than one line. If it does, Shell mode may become confused trying to distinguish prompt from input -on lines which don't start with a prompt. - -This is a fine thing to set in your `.emacs' file." +on lines which don't start with a prompt." :type 'regexp :group 'shell) @@ -146,9 +144,7 @@ This is a fine thing to set in your `.emacs' file." "List of suffixes to be disregarded during file/command completion. This variable is used to initialize `comint-completion-fignore' in the shell buffer. The default is nil, for compatibility with most shells. -Some people like (\"~\" \"#\" \"%\"). - -This is a fine thing to set in your `.emacs' file." +Some people like (\"~\" \"#\" \"%\")." :type '(repeat (string :tag "Suffix")) :group 'shell) @@ -158,31 +154,29 @@ This variable is used to initialize `comint-delimiter-argument-list' in the shell buffer. The value may depend on the operating system or shell." :type '(choice (const nil) (repeat :tag "List of characters" character)) - ;; Reverted. -;; :version "24.1" ; changed to nil (bug#8027) :group 'shell) -(defvar shell-file-name-chars +(defcustom shell-file-name-chars (if (memq system-type '(ms-dos windows-nt cygwin)) "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" "[]~/A-Za-z0-9+@:_.$#%,={}-") "String of characters valid in a file name. This variable is used to initialize `comint-file-name-chars' in the -shell buffer. The value may depend on the operating system or shell. +shell buffer. The value may depend on the operating system or shell." + :type 'string + :group 'shell) -This is a fine thing to set in your `.emacs' file.") - -(defvar shell-file-name-quote-list +(defcustom shell-file-name-quote-list (if (memq system-type '(ms-dos windows-nt)) nil (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) "List of characters to quote when in a file name. This variable is used to initialize `comint-file-name-quote-list' in the -shell buffer. The value may depend on the operating system or shell. +shell buffer. The value may depend on the operating system or shell." + :type '(repeat character) + :group 'shell) -This is a fine thing to set in your `.emacs' file.") - -(defvar shell-dynamic-complete-functions +(defcustom shell-dynamic-complete-functions '(comint-c-a-p-replace-by-expanded-history shell-environment-variable-completion shell-command-completion @@ -192,9 +186,9 @@ This is a fine thing to set in your `.emacs' file.") comint-filename-completion) "List of functions called to perform completion. This variable is used to initialize `comint-dynamic-complete-functions' in the -shell buffer. - -This is a fine thing to set in your `.emacs' file.") +shell buffer." + :type '(repeat function) + :group 'shell) (defcustom shell-command-regexp "[^;&|\n]+" "Regexp to match a single command within a pipeline. From 865fe16fd25fb066c3da1f71a2bb115aa807af8d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 17 Sep 2012 13:41:04 +0800 Subject: [PATCH 209/216] Update docstrings and comments to use "init file" terminology. * bookmark.el (bookmark-bmenu-toggle-filenames): Doc fixes. * comint.el (comint-prompt-read-only): * custom.el (defcustom): * hi-lock.el (hi-lock-mode): * ibuffer.el (ibuffer-formats): * ielm.el (ielm-prompt-read-only): * novice.el (disable-command): * saveplace.el (toggle-save-place): * speedbar.el (speedbar-supported-extension-expressions): * startup.el (auto-save-list-file-prefix, init-file-user) (after-init-hook, inhibit-startup-echo-area-message): * strokes.el (strokes-help): * time-stamp.el (time-stamp): * calendar/calendar.el (calendar, diary-file): * calendar/diary-lib.el (diary-mail-entries, diary) (diary-list-entries-hook): * calendar/holidays.el (holidays, calendar-holidays): * calendar/lunar.el (lunar-phases): * calendar/solar.el (sunrise-sunset): * emulation/edt.el (edt-load-keys): * emulation/viper.el (viper-mode): * eshell/em-alias.el (eshell-command-aliases-list): * eshell/esh-util.el (eshell-convert-numeric-arguments): * international/ogonek.el (ogonek-information): * net/tramp-cmds.el (tramp-bug): * net/quickurl.el (quickurl-reread-hook-postfix): * play/decipher.el (decipher-font-lock-keywords): * progmodes/cc-styles.el (c-set-style): * progmodes/idlw-shell.el (idlwave-shell-prompt-pattern): * progmodes/inf-lisp.el (inferior-lisp-prompt): * progmodes/octave-mod.el (octave-mode): * progmodes/sql.el (sql-mode, sql-interactive-mode, sql-password): * progmodes/verilog-mode.el (verilog-read-defines): * textmodes/two-column.el (2C-mode): Likewise. --- lisp/ChangeLog | 35 +++++++++++++++++++++++ lisp/align.el | 2 +- lisp/autoinsert.el | 2 +- lisp/bookmark.el | 5 +--- lisp/calc/calc-ext.el | 2 +- lisp/calc/calc-forms.el | 2 +- lisp/calendar/calendar.el | 4 +-- lisp/calendar/diary-lib.el | 24 +++++++++------- lisp/calendar/holidays.el | 6 ++-- lisp/calendar/lunar.el | 2 +- lisp/calendar/solar.el | 2 +- lisp/calendar/timeclock.el | 4 +-- lisp/comint.el | 2 +- lisp/custom.el | 2 +- lisp/desktop.el | 2 +- lisp/emacs-lisp/byte-run.el | 2 +- lisp/emacs-lisp/cl-lib.el | 2 +- lisp/emulation/edt-mapper.el | 4 +-- lisp/emulation/edt.el | 10 +++---- lisp/emulation/tpu-edt.el | 6 ++-- lisp/emulation/tpu-extras.el | 2 +- lisp/emulation/tpu-mapper.el | 2 +- lisp/emulation/vi.el | 2 +- lisp/emulation/viper.el | 4 +-- lisp/erc/ChangeLog | 6 ++++ lisp/erc/erc-button.el | 2 +- lisp/erc/erc-capab.el | 2 +- lisp/erc/erc-match.el | 2 +- lisp/erc/erc-netsplit.el | 2 +- lisp/erc/erc-page.el | 2 +- lisp/erc/erc-replace.el | 2 +- lisp/erc/erc-stamp.el | 2 +- lisp/erc/erc-track.el | 2 +- lisp/eshell/em-alias.el | 8 +++--- lisp/eshell/esh-util.el | 2 +- lisp/ffap.el | 4 +-- lisp/filesets.el | 2 +- lisp/flow-ctrl.el | 2 +- lisp/font-lock.el | 2 +- lisp/frame.el | 2 +- lisp/generic-x.el | 2 +- lisp/hi-lock.el | 6 ++-- lisp/ibuffer.el | 12 ++++---- lisp/ielm.el | 2 +- lisp/international/ogonek.el | 7 +++-- lisp/locate.el | 2 +- lisp/mail/feedmail.el | 5 ++-- lisp/mail/mail-hist.el | 2 +- lisp/mail/uce.el | 2 +- lisp/mouse-copy.el | 2 +- lisp/mouse-drag.el | 2 +- lisp/net/ange-ftp.el | 14 ++++----- lisp/net/browse-url.el | 3 +- lisp/net/goto-addr.el | 2 +- lisp/net/newsticker.el | 2 +- lisp/net/quickurl.el | 2 +- lisp/net/tramp-cmds.el | 2 +- lisp/net/webjump.el | 2 +- lisp/novice.el | 4 +-- lisp/pcomplete.el | 2 +- lisp/play/bubbles.el | 2 +- lisp/play/decipher.el | 14 +-------- lisp/play/handwrite.el | 2 +- lisp/printing.el | 10 +++---- lisp/progmodes/antlr-mode.el | 2 +- lisp/progmodes/cc-styles.el | 4 +-- lisp/progmodes/cmacexp.el | 2 +- lisp/progmodes/ebnf2ps.el | 4 +-- lisp/progmodes/f90.el | 5 ++-- lisp/progmodes/hideshow.el | 2 +- lisp/progmodes/idlw-complete-structtag.el | 4 +-- lisp/progmodes/idlw-shell.el | 6 ++-- lisp/progmodes/idlwave.el | 4 +-- lisp/progmodes/inf-lisp.el | 4 +-- lisp/progmodes/mixal-mode.el | 2 +- lisp/progmodes/octave-mod.el | 4 +-- lisp/progmodes/perl-mode.el | 4 +-- lisp/progmodes/prolog.el | 4 +-- lisp/progmodes/sql.el | 15 +++++----- lisp/progmodes/verilog-mode.el | 4 +-- lisp/ps-print.el | 2 +- lisp/saveplace.el | 12 ++++---- lisp/shell.el | 2 +- lisp/speedbar.el | 2 +- lisp/startup.el | 27 ++++++++++------- lisp/strokes.el | 9 +----- lisp/term/iris-ansi.el | 2 +- lisp/term/lk201.el | 2 +- lisp/term/rxvt.el | 2 +- lisp/term/tvi970.el | 2 +- lisp/term/wyse50.el | 2 +- lisp/term/xterm.el | 2 +- lisp/textmodes/flyspell.el | 6 ++-- lisp/textmodes/ispell.el | 5 ++-- lisp/textmodes/reftex.el | 4 +-- lisp/textmodes/rst.el | 2 +- lisp/textmodes/sgml-mode.el | 2 +- lisp/textmodes/table.el | 10 +++---- lisp/textmodes/two-column.el | 5 ++-- lisp/time-stamp.el | 4 +-- lisp/url/url-methods.el | 2 +- lisp/vc/pcvs-defs.el | 4 --- lisp/vc/vc-git.el | 2 +- lisp/windmove.el | 2 +- 104 files changed, 238 insertions(+), 225 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 217187c5e88..275f7908f5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,41 @@ (shell-dynamic-complete-functions): Convert to defcustom. (shell-prompt-pattern, shell-completion-fignore): Doc fix. + * bookmark.el (bookmark-bmenu-toggle-filenames): Doc fixes. + * comint.el (comint-prompt-read-only): + * custom.el (defcustom): + * hi-lock.el (hi-lock-mode): + * ibuffer.el (ibuffer-formats): + * ielm.el (ielm-prompt-read-only): + * novice.el (disable-command): + * saveplace.el (toggle-save-place): + * speedbar.el (speedbar-supported-extension-expressions): + * startup.el (auto-save-list-file-prefix, init-file-user) + (after-init-hook, inhibit-startup-echo-area-message): + * strokes.el (strokes-help): + * time-stamp.el (time-stamp): + * calendar/calendar.el (calendar, diary-file): + * calendar/diary-lib.el (diary-mail-entries, diary) + (diary-list-entries-hook): + * calendar/holidays.el (holidays, calendar-holidays): + * calendar/lunar.el (lunar-phases): + * calendar/solar.el (sunrise-sunset): + * emulation/edt.el (edt-load-keys): + * emulation/viper.el (viper-mode): + * eshell/em-alias.el (eshell-command-aliases-list): + * eshell/esh-util.el (eshell-convert-numeric-arguments): + * international/ogonek.el (ogonek-information): + * net/tramp-cmds.el (tramp-bug): + * net/quickurl.el (quickurl-reread-hook-postfix): + * play/decipher.el (decipher-font-lock-keywords): + * progmodes/cc-styles.el (c-set-style): + * progmodes/idlw-shell.el (idlwave-shell-prompt-pattern): + * progmodes/inf-lisp.el (inferior-lisp-prompt): + * progmodes/octave-mod.el (octave-mode): + * progmodes/sql.el (sql-mode, sql-interactive-mode, sql-password): + * progmodes/verilog-mode.el (verilog-read-defines): + * textmodes/two-column.el (2C-mode): Likewise. + 2012-09-16 Katsumi Yamaoka * mail/mailabbrev.el (mail-abbrev-expand-hook): Work for a mail aliasee diff --git a/lisp/align.el b/lisp/align.el index b5c4c442f24..0af5e56c668 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -74,7 +74,7 @@ ;; align-?-modes variables (for example, `align-dq-string-modes'), use ;; `add-to-list', or some similar function which checks first to see ;; if the value is already there. Since the user may customize that -;; mode list, and then write your mode name into their .emacs file, +;; mode list, and then write your mode name into their init file, ;; causing the symbol already to be present the next time they load ;; your package. diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index fbf8c466585..21c35811ac3 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -36,7 +36,7 @@ ;; setq auto-insert-directory to an appropriate slash-terminated value ;; ;; You can also customize the variable `auto-insert-mode' to load the -;; package. Alternatively, add the following to your .emacs file: +;; package. Alternatively, add the following to your init file: ;; (auto-insert-mode 1) ;; ;; Author: Charlie Martin diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 75a8d9f59dc..31bbc13acf9 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -144,10 +144,7 @@ You can toggle whether files are shown with \\\\[bookma (defcustom bookmark-bmenu-toggle-filenames t "Non-nil means show filenames when listing bookmarks. -This may result in truncated bookmark names. To disable this, put the -following in your `.emacs' file: - -\(setq bookmark-bmenu-toggle-filenames nil)" +A non-nil value may result in truncated bookmark names." :type 'boolean :group 'bookmark) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 2fd5ad6fd9c..c7d93530fd7 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -3483,7 +3483,7 @@ If X is not an error form, return 1." (substring str i)))) str)) -;;; Users can redefine this in their .emacs files. +;;; Users can redefine this in their init files. (defvar calc-keypad-user-menu nil "If non-nil, this describes an additional menu for calc-keypad. It should contain a list of three rows. diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index dfc5dfc6588..bd748158d66 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -494,7 +494,7 @@ (car res)))))))) -;;; It is safe to redefine these in your .emacs file to use a different +;;; It is safe to redefine these in your init file to use a different ;;; language. (defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday" diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index d5514d14a32..cdbf8d7aa86 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -593,7 +593,7 @@ You can customize `diary-date-forms' to your preferred format. Three default styles are provided: `diary-american-date-forms', `diary-european-date-forms', and `diary-iso-date-forms'. You can choose between these by setting `calendar-date-style' in your -.emacs file, or by using `calendar-set-date-style' when in the calendar. +init file, or by using `calendar-set-date-style' when in the calendar. A diary entry can be preceded by the character `diary-nonmarking-symbol' \(ordinarily `&') to make that entry nonmarking--that is, it will not be @@ -1276,7 +1276,7 @@ Runs the following hooks: generating a calendar, if today's date is visible or not, respectively `calendar-initial-window-hook' - after first creating a calendar -This function is suitable for execution in a .emacs file." +This function is suitable for execution in an init file." (interactive "P") ;; Avoid loading cal-x unless it will be used. (if (and (memq calendar-setup '(one-frame two-frames calendar-only)) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 8fa5b0ddb07..4bce8ec0927 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -200,19 +200,21 @@ holidays), or hard copy output." 'diary-list-entries-hook "23.1") (defcustom diary-list-entries-hook nil - "List of functions called after diary file is culled for relevant entries. -You might wish to add `diary-include-other-diary-files', in which case -you will probably also want to add `diary-mark-included-diary-files' to -`diary-mark-entries-hook'. For example, you could use + "Hook run after diary file is culled for relevant entries. + +If you add `diary-include-other-diary-files' to this hook, you +will probably also want to add `diary-mark-included-diary-files' +to `diary-mark-entries-hook'. For example, to cause the fancy +diary buffer to be displayed with diary entries from various +included files, each day's entries sorted into lexicographic +order, add the following to your init file: (setq diary-display-function 'diary-fancy-display) (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) (add-hook 'diary-list-entries-hook 'diary-sort-entries t) -in your `.emacs' file to cause the fancy diary buffer to be displayed with -diary entries from various included files, each day's entries sorted into -lexicographic order. Note how the sort function is placed last, -so that it can sort the entries included from other files. +Note how the sort function is placed last, so that it can sort +the entries included from other files. This hook runs after `diary-nongregorian-listing-hook'. These two hooks differ only if you are using included diary files. In that case, @@ -532,7 +534,7 @@ If so, return the expanded file name, otherwise signal an error." "Generate the diary window for ARG days starting with the current date. If no argument is provided, the number of days of diary entries is governed by the variable `diary-number-of-entries'. A value of ARG less than 1 -does nothing. This function is suitable for execution in a `.emacs' file." +does nothing. This function is suitable for execution in an init file." (interactive "P") (diary-check-diary-file) (diary-list-entries (calendar-current-date) @@ -1230,8 +1232,8 @@ Mail is sent to the address specified by `diary-mail-addr'. Here is an example of a script to call `diary-mail-entries', suitable for regular scheduling using cron (or at). Note that -since `emacs -script' does not load your `.emacs' file, you -should ensure that all relevant variables are set. +since `emacs -script' does not load your init file, you should +ensure that all relevant variables are set. #!/usr/bin/emacs -script ;; diary-rem.el - run the Emacs diary-reminder diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 9643a1e2905..b94815f98ea 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -343,12 +343,12 @@ See the documentation for `calendar-holidays' for details." "List of notable days for the command \\[holidays]. Additional holidays are easy to add to the list, just put them in the -list `holiday-other-holidays' in your .emacs file. Similarly, by setting +list `holiday-other-holidays' in your init file. Similarly, by setting any of `holiday-general-holidays', `holiday-local-holidays', `holiday-christian-holidays', `holiday-hebrew-holidays', `holiday-islamic-holidays', `holiday-bahai-holidays', `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your -.emacs file, you can eliminate unwanted categories of holidays. +init file, you can eliminate unwanted categories of holidays. The aforementioned variables control the holiday choices offered by the function `holiday-list' when it is called interactively. @@ -523,7 +523,7 @@ use instead of point." (defun holidays (&optional arg) "Display the holidays for last month, this month, and next month. If called with an optional prefix argument ARG, prompts for month and year. -This function is suitable for execution in a .emacs file." +This function is suitable for execution in a init file." (interactive "P") (save-excursion (let* ((completion-ignore-case t) diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 8f09d20f50e..2761df0bdb1 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -236,7 +236,7 @@ use instead of point." (defun lunar-phases (&optional arg) "Display the quarters of the moon for last month, this month, and next month. If called with an optional prefix argument ARG, prompts for month and year. -This function is suitable for execution in a .emacs file." +This function is suitable for execution in an init file." (interactive "P") (save-excursion (let* ((date (if arg (calendar-read-date t) diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index a8d7d44af3b..3ccdf135fb6 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -797,7 +797,7 @@ If called with an optional prefix argument ARG, prompt for date. If called with an optional double prefix argument, prompt for longitude, latitude, time zone, and date, and always use standard time. -This function is suitable for execution in a .emacs file." +This function is suitable for execution in an init file." (interactive "p") (or arg (setq arg 1)) (if (and (< arg 16) diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index 2ebb8c7c3ae..3151ce145de 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -49,7 +49,7 @@ ;; If you want Emacs to display the amount of time "left" to your ;; workday in the mode-line, you can either set the value of ;; `timeclock-mode-line-display' to t using M-x customize, or you can -;; add this code to your .emacs file: +;; add this code to your init file: ;; ;; (require 'timeclock) ;; (timeclock-mode-line-display) @@ -60,7 +60,7 @@ ;; You may also want Emacs to ask you before exiting, if you are ;; currently working on a project. This can be done either by setting ;; `timeclock-ask-before-exiting' to t using M-x customize (this is -;; the default), or by adding the following to your .emacs file: +;; the default), or by adding the following to your init file: ;; ;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out) diff --git a/lisp/comint.el b/lisp/comint.el index 5b0eb3027e6..638ef73d53d 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -181,7 +181,7 @@ override the read-only-ness of comint prompts is to call `comint-kill-whole-line' or `comint-kill-region' with no narrowing in effect. This way you will be certain that none of the remaining prompts will be accidentally messed up. You may -wish to put something like the following in your `.emacs' file: +wish to put something like the following in your init file: \(add-hook 'comint-mode-hook (lambda () diff --git a/lisp/custom.el b/lisp/custom.el index 1f0729cfd97..01b0e6d1650 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -237,7 +237,7 @@ The following keywords are meaningful: is `default-value'. :require VALUE should be a feature symbol. If you save a value - for this option, then when your `.emacs' file loads the value, + for this option, then when your init file loads the value, it does (require VALUE) first. :set-after VARIABLES Specifies that SYMBOL should be set after the list of variables diff --git a/lisp/desktop.el b/lisp/desktop.el index a873a6b63bf..75deb58b4d8 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -34,7 +34,7 @@ ;; - some local variables ;; To use this, use customize to turn on desktop-save-mode or add the -;; following line somewhere in your .emacs file: +;; following line somewhere in your init file: ;; ;; (desktop-save-mode 1) ;; diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index d1382f42b19..93e890a20c9 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -312,7 +312,7 @@ This uses `defvaralias' and `make-obsolete-variable' (which see). See the Info node `(elisp)Variable Aliases' for more details. If CURRENT-NAME is a defcustom (more generally, any variable -where OBSOLETE-NAME may be set, e.g. in a .emacs file, before the +where OBSOLETE-NAME may be set, e.g. in an init file, before the alias is defined), then the define-obsolete-variable-alias statement should be evaluated before the defcustom, if user customizations are to be respected. The simplest way to achieve diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 532c81c502c..5749ff91b40 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -121,7 +121,7 @@ a future Emacs interpreter will be able to use it.") ;;; Generalized variables. ;; These macros are defined here so that they -;; can safely be used in .emacs files. +;; can safely be used in init files. (defmacro cl-incf (place &optional x) "Increment PLACE by X (1 by default). diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 7fc24773b9e..87b6bcf0aa9 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -61,7 +61,7 @@ ;; emacs -q -l edt-mapper.el -;; The "-q" option prevents loading of your .emacs file (commands +;; The "-q" option prevents loading of your init file (commands ;; therein might confuse this program). ;; An instruction screen showing the typical LK-201 terminal @@ -74,7 +74,7 @@ ;; and loaded automatically when the EDT emulation is started. If ;; you specify a different file name, you will need to set the ;; variable "edt-keys-file" before starting the EDT emulation. -;; Here's how you might go about doing that in your .emacs file. +;; Here's how you might go about doing that in your init file: ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index dbd13a01a8b..3810dcccbb3 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -48,7 +48,7 @@ ;; You can have the EDT Emulation start up automatically, each time ;; you initiate a GNU Emacs session, by adding the following line to -;; your .emacs file: +;; your init file: ;; ;; (add-hook term-setup-hook 'edt-emulation-on) @@ -75,7 +75,7 @@ ;; default, this feature is enabled, with the top margin set to ;; 10% of the window and the bottom margin set to 15% of the ;; window. To change these settings, you can invoke the function -;; edt-set-scroll-margins in your .emacs file. For example, the +;; edt-set-scroll-margins in your init file. For example, the ;; following line ;; ;; (edt-set-scroll-margins "20%" "25%") @@ -363,7 +363,7 @@ This means that an edt-user.el file was found in the user's `load-path'.") ;;; ;;; (setq edt-keep-current-page-delimiter t) ;;; -;;; in your .emacs file. +;;; in your init file. (defun edt-page-forward (num) "Move forward to just after next page delimiter. @@ -1961,14 +1961,14 @@ created." Ack!! You're running the Enhanced EDT Emulation without loading an EDT key mapping file. To create an EDT key mapping file, run the edt-mapper program. It is safest to run it from an Emacs loaded - without any of your own customizations found in your .emacs file, etc. + without any of your own customizations found in your init file, etc. The reason for this is that some user customizations confuse edt-mapper. You can do this by quitting Emacs and then invoking Emacs again as follows: emacs -q -l edt-mapper - [NOTE: If you do nothing out of the ordinary in your .emacs file, and + [NOTE: If you do nothing out of the ordinary in your init file, and the search for edt-mapper is successful, you can try running it now.] The library edt-mapper includes these same directions on how to diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index b8d07e8b744..d375725af56 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -163,8 +163,8 @@ ;; and type `tpu-edt' followed by a carriage return. ;; If you like TPU-edt and want to use it all the time, you can start -;; TPU-edt using the Emacs initialization file, .emacs. Simply create -;; a .emacs file in your home directory containing the line: +;; TPU-edt using the Emacs initialization file, .emacs. Simply add +;; the following line to your init file: ;; (tpu-edt) @@ -2440,7 +2440,7 @@ If FILE is nil, try to load a default file. The default file names are ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins -;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "76f06905db4c5bfb3b86491a51512a0e") +;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "bf5e7322f9a2c324a3bb306415813374") ;;; Generated autoloads from tpu-extras.el (autoload 'tpu-cursor-free-mode "tpu-extras" "\ diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 521b189e3bc..4cf9eee037b 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -26,7 +26,7 @@ ;; Use the functions defined here to customize TPU-edt to your tastes by ;; setting scroll margins and/or turning on free cursor mode. Here's an -;; example for your .emacs file. +;; example for your init file. ;; (tpu-set-cursor-free) ; Set cursor free. ;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins. diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index ef4e9b305fc..9cced60816c 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el @@ -81,7 +81,7 @@ Finally, you will be prompted for the name of the file to store the key definitions. If you chose the default, TPU-edt will find it and load it automatically. If you specify a different file name, you will need to set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how -you might go about doing that in your .emacs file. +you might go about doing that in your init file. (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\")) (tpu-edt) diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 9bf108c8c38..a59dd610c21 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -28,7 +28,7 @@ ;; (if (not (or (eq major-mode 'Info-mode) ;; (eq major-mode 'vi-mode))) ;; (vi-mode)))))) -;; 3) In your .emacs file you can define the command "vi-mode" to be "autoload" +;; 3) In your init file you can define the command "vi-mode" to be "autoload" ;; or you can execute the "load" command to load "vi" directly. ;; 4) Read the comments for command "vi-mode" before you start using it. diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 81fbfb0394c..8de253d19b0 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -351,7 +351,7 @@ user decide when to invoke Viper in a major mode." If t, viperize Emacs. If nil -- don't. If `ask', ask the user. This variable is used primarily when Viper is being loaded. -Must be set in `~/.emacs' before Viper is loaded. +Must be set in your init file before Viper is loaded. DO NOT set this variable interactively, unless you are using the customization widget." :type '(choice (const nil) (const t) (const ask)) @@ -1173,7 +1173,7 @@ If you wish to Viperize AND make this your way of life, please put (setq viper-mode t) (require 'viper) -in your .emacs file (preferably, close to the top). +in your init file (preferably, close to the top). These two lines must come in the order given. ** Viper users: diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 37e755e7655..674a6c97eec 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,9 @@ +2012-09-17 Chong Yidong + + * erc-page.el (erc-page-function): + + * erc-stamp.el (erc-stamp): Doc fix. + 2012-08-21 Josh Feinstein * erc-join.el (erc-autojoin-timing): Fix defcustom type. diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index c8a7fec32bd..a0593dcb743 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -25,7 +25,7 @@ ;; Heavily borrowed from gnus-art.el. Thanks to the original authors. ;; This buttonizes nicks and other stuff to make it all clickable. -;; To enable, add to your ~/.emacs: +;; To enable, add to your init file: ;; (require 'erc-button) ;; (erc-button-mode 1) ;; diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index 4f6361ee923..c7103d6dc61 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el @@ -48,7 +48,7 @@ ;;; Usage: -;; Put the following in your ~/.emacs file. +;; Put the following in your init file. ;; (require 'erc-capab) ;; (erc-capab-identify-mode 1) diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index cac042c0298..de7f2137197 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -29,7 +29,7 @@ ;; customizable variables. ;; Usage: -;; Put (erc-match-mode 1) into your ~/.emacs file. +;; Put (erc-match-mode 1) into your init file. ;;; Code: diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index 44fbc9563d6..355b345492c 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el @@ -23,7 +23,7 @@ ;;; Commentary: ;; This module hides quit/join messages if a netsplit occurs. -;; To enable, add the following to your ~/.emacs: +;; To enable, add the following to your init file: ;; (require 'erc-netsplit) ;; (erc-netsplit-mode 1) diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el index e6b670c91ba..51ddc33e1c0 100644 --- a/lisp/erc/erc-page.el +++ b/lisp/erc/erc-page.el @@ -45,7 +45,7 @@ If nil, this prints the page message in the minibuffer and calls `beep'. If non-nil, it must be a function that takes two arguments: SENDER and MSG, both strings. -Example for your ~/.emacs file: +Example for your init file: \(setq erc-page-function (lambda (sender msg) diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el index 04c5885bc3e..6c5804c62a4 100644 --- a/lisp/erc/erc-replace.el +++ b/lisp/erc/erc-replace.el @@ -25,7 +25,7 @@ ;; This module allows you to systematically replace text in incoming ;; messages. Load erc-replace, and customize `erc-replace-alist'. -;; Then add to your ~/.emacs: +;; Then add to your init file: ;; (require 'erc-replace) ;; (erc-replace-mode 1) diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index 5831233affe..4ce2f18e041 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el @@ -43,7 +43,7 @@ group provides settings related to the format and display of timestamp information in `erc-mode' buffer. For timestamping to be activated, you just need to load `erc-stamp' -in your .emacs file or interactively using `load-library'." +in your init file or interactively using `load-library'." :group 'erc) (defcustom erc-timestamp-format "[%H:%M]" diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 9c56c724224..88a3285730d 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -24,7 +24,7 @@ ;;; Commentary: ;; Highlights keywords and pals (friends), and hides or highlights fools -;; (using a dark color). Add to your ~/.emacs: +;; (using a dark color). Add to your init file: ;; (require 'erc-track) ;; (erc-track-mode 1) diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 4b62fec95e6..940056b6438 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el @@ -133,10 +133,10 @@ Each element of this alias is a list of the form: Where NAME is the textual name of the alias, and DEFINITION is the command string to replace that command with. -Note: this list should not be modified in your '.emacs' file. Rather, -any desired alias definitions should be declared using the `alias' -command, which will automatically write them to the file named by -`eshell-aliases-file'.") +Note: this list should not be modified in your init file. +Rather, any desired alias definitions should be declared using +the `alias' command, which will automatically write them to the +file named by `eshell-aliases-file'.") (put 'eshell-command-aliases-list 'risky-local-variable t) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 8218e91ddc7..fa0336232f9 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -84,7 +84,7 @@ Numeric form is tested using the regular expression NOTE: If you find that numeric conversions are interfering with the specification of filenames (for example, in calling `find-file', or some other Lisp function that deals with files, not numbers), add the -following in your .emacs file: +following in your init file: (put 'find-file 'eshell-no-numeric-conversions t) diff --git a/lisp/ffap.el b/lisp/ffap.el index ebe8b6dee94..f3e8d4c194e 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -34,7 +34,7 @@ ;; README's, MANIFEST's, and so on. Submit bugs or suggestions with ;; M-x ffap-bug. ;; -;; For the default installation, add this line to your .emacs file: +;; For the default installation, add this line to your init file: ;; ;; (ffap-bindings) ; do default key bindings ;; @@ -206,7 +206,7 @@ Sensible values are nil, \"news\", or \"mailto\"." ;; those features interesting but not clear winners (a matter of ;; personal taste) I try to leave options to enable them. Read ;; through this section for features that you like, put an appropriate -;; enabler in your .emacs file. +;; enabler in your init file. (defcustom ffap-dired-wildcards "[*?][^/]*\\'" "A regexp matching filename wildcard characters, or nil. diff --git a/lisp/filesets.el b/lisp/filesets.el index 6c24a4f43d6..a91d8cf0fcb 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -35,7 +35,7 @@ ;; inclusion group (i.e. a base file including other files). ;; Usage: -;; 1. Put (require 'filesets) and (filesets-init) in your .emacs file. +;; 1. Put (require 'filesets) and (filesets-init) in your init file. ;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu. ;; 3. Save your customizations. diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index 747a4ca018c..b301886de5b 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el @@ -31,7 +31,7 @@ ;; ;; To invoke these adjustments, a user need only invoke the function ;; enable-flow-control-on with a list of terminal types in his/her own -;; .emacs file. As arguments, give it the names of one or more terminal +;; init file. As arguments, give it the names of one or more terminal ;; types in use by that user which require flow control adjustments. ;; Here's an example: ;; diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 77c21d26535..6404af7703a 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -37,7 +37,7 @@ ;; When this minor mode is on, the faces of the current line are updated with ;; every insertion or deletion. ;; -;; To turn Font Lock mode on automatically, add this to your ~/.emacs file: +;; To turn Font Lock mode on automatically, add this to your init file: ;; ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) ;; diff --git a/lisp/frame.el b/lisp/frame.el index c182a964820..0bef358ecfb 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -301,7 +301,7 @@ there (in decreasing order of priority)." ;; existing frame. We need to explicitly include ;; default-frame-alist in the parameters of the screen we ;; create here, so that its new value, gleaned from the user's - ;; .emacs file, will be applied to the existing screen. + ;; init file, will be applied to the existing screen. (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) (assq 'minibuffer window-system-frame-alist) (assq 'minibuffer default-frame-alist) diff --git a/lisp/generic-x.el b/lisp/generic-x.el index cc7963b1711..a97c5649c95 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -28,7 +28,7 @@ ;; ;; INSTALLATION: ;; -;; Add this line to your .emacs file: +;; Add this line to your init file: ;; ;; (require 'generic-x) ;; diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 644024a4b86..f92e2ab0af2 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -52,14 +52,14 @@ ;; ;; Setup: ;; -;; Put the following code in your .emacs file. This turns on +;; Put the following code in your init file. This turns on ;; hi-lock mode and adds a "Regexp Highlighting" entry ;; to the edit menu. ;; ;; (global-hi-lock-mode 1) ;; ;; To enable the use of patterns found in files (presumably placed -;; there by hi-lock) include the following in your .emacs file: +;; there by hi-lock) include the following in your init file: ;; ;; (setq hi-lock-file-patterns-policy 'ask) ;; @@ -356,7 +356,7 @@ Hi-lock: end is found. A mode is excluded if it's in the list "Possible archaic use of (hi-lock-mode). Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs -versions before 22 use the following in your .emacs file: +versions before 22 use the following in your init file: (if (functionp 'global-hi-lock-mode) (global-hi-lock-mode 1) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c6e799252a2..77461469044 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -123,13 +123,13 @@ own!): no upper limit on its size. The size will also be aligned to the right. -Thus, if you wanted to use these two formats, add +Thus, if you wanted to use these two formats, the appropriate +value for this variable would be - (setq ibuffer-formats '((mark \" \" name) - (mark modified read-only - (name 16 16 :left) (size 6 -1 :right)))) - -to your ~/.emacs file. + '((mark \" \" name) + (mark modified read-only + (name 16 16 :left) + (size 6 -1 :right))) Using \\[ibuffer-switch-format], you can rotate the display between the specified formats in the list." diff --git a/lisp/ielm.el b/lisp/ielm.el index c93f235d81f..ba05bbcfc0f 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -59,7 +59,7 @@ override the read-only-ness of IELM prompts is to call `comint-kill-whole-line' or `comint-kill-region' with no narrowing in effect. This way you will be certain that none of the remaining prompts will be accidentally messed up. You may -wish to put something like the following in your `.emacs' file: +wish to put something like the following in your init file: \(add-hook 'ielm-mode-hook (lambda () diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 39a88001112..3c34e5d9a2a 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -224,13 +224,14 @@ The functions come in the following groups. ogonek-prefix-to-encoding iso8859-2 The above default values can be changed by placing appropriate settings - in the '~/.emacs' file: + in your init file: (setq ogonek-prefix-char ?/) (setq ogonek-prefix-to-encoding \"iso8859-2\") - Instead of loading the whole library `ogonek' it may be better to - autoload the needed functions, for example by placing in `~/.emacs': + Instead of loading the whole library `ogonek' it may be better + to autoload the needed functions, for example by adding the + following lines to your init file: (autoload 'ogonek-how \"ogonek\") (autoload 'ogonek-recode-region \"ogonek\") diff --git a/lisp/locate.el b/lisp/locate.el index 29d7c75cbb2..d172ce3d6c4 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -34,7 +34,7 @@ ;; ;; SHELLPROGRAM Name-to-find ;; -;; set the variable `locate-command' in your .emacs file. +;; set the variable `locate-command' in your init file. ;; ;; To use a more complicated expression, create a function which ;; takes a string (the name to find) as input and returns a list. diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 520271940f2..4305094611a 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -139,9 +139,8 @@ ;; feedmail-send-it. Hers's the best way to use the stuff in this ;; file: ;; -;; Save this file as feedmail.el somewhere on your elisp -;; loadpath; byte-compile it. Put the following lines somewhere in -;; your ~/.emacs stuff: +;; Save this file as feedmail.el somewhere on your elisp loadpath; +;; byte-compile it. Put the following lines in your init file: ;; ;; (setq send-mail-function 'feedmail-send-it) ;; (autoload 'feedmail-send-it "feedmail") diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index dd489e3c6a9..40d67b4e904 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el @@ -28,7 +28,7 @@ ;; time. ;; ;; To use this package, put it in a directory in your load-path, and -;; put this in your .emacs file: +;; put this in your init file: ;; ;; (load "mail-hist" nil t) ;; diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index fdfe17a1a07..3d7495ffd1a 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el @@ -63,7 +63,7 @@ ;; Usage: ;; Place uce.el in your load-path (and optionally byte-compile it). -;; Add the following line to your ~/.emacs: +;; Add the following line to your init file: ;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil) ;; If you want to use it with Gnus rather than Rmail: ;; (setq uce-mail-reader 'gnus) diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el index 8d043b4495f..a8e32bec1ae 100644 --- a/lisp/mouse-copy.el +++ b/lisp/mouse-copy.el @@ -35,7 +35,7 @@ ;; If you like mouse-copy, you should also check out mouse-drag ;; for ``one-click scrolling''. ;; -;; To use mouse-copy, place the following in your .emacs file: +;; To use mouse-copy, place the following in your init file: ;; (require 'mouse-copy) ;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) ;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving) diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index 7fb10505355..acdad9a42cf 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -46,7 +46,7 @@ ;; If you like mouse-drag, you should also check out mouse-copy ;; for ``one-click text copy and move''. ;; -;; To use mouse-drag, place the following in your .emacs file: +;; To use mouse-drag, place the following in your init file: ;; -either- ;; (global-set-key [down-mouse-2] 'mouse-drag-throw) ;; -or- diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 1501fa41baa..265a855b842 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -79,7 +79,7 @@ ;; that this change will take effect for the current GNU Emacs session only. ;; See below for a discussion of non-UNIX hosts. If a large number of ;; machines with similar hostnames have this problem then it is easier to set -;; the value of ange-ftp-dumb-unix-host-regexp in your .emacs file. ange-ftp +;; the value of ange-ftp-dumb-unix-host-regexp in your init file. ange-ftp ;; is unable to automatically recognize dumb unix hosts. ;; File name completion: @@ -275,10 +275,10 @@ ;; VMS support: ;; -;; Ange-ftp has full support for VMS hosts. It -;; should be able to automatically recognize any VMS machine. However, if it -;; fails to do this, you can use the command ange-ftp-add-vms-host. As well, -;; you can set the variable ange-ftp-vms-host-regexp in your .emacs file. We +;; Ange-ftp has full support for VMS hosts. It should be able to +;; automatically recognize any VMS machine. However, if it fails to do +;; this, you can use the command ange-ftp-add-vms-host. Also, you can +;; set the variable ange-ftp-vms-host-regexp in your init file. We ;; would be grateful if you would report any failures to automatically ;; recognize a VMS host as a bug. ;; @@ -332,7 +332,7 @@ ;; the Michigan terminal system. It should be able to automatically ;; recognize any MTS machine. However, if it fails to do this, you can use ;; the command ange-ftp-add-mts-host. As well, you can set the variable -;; ange-ftp-mts-host-regexp in your .emacs file. We would be grateful if you +;; ange-ftp-mts-host-regexp in your init file. We would be grateful if you ;; would report any failures to automatically recognize a MTS host as a bug. ;; ;; Filename syntax: @@ -358,7 +358,7 @@ ;; CMS. It should be able to automatically recognize any CMS machine. ;; However, if it fails to do this, you can use the command ;; ange-ftp-add-cms-host. As well, you can set the variable -;; ange-ftp-cms-host-regexp in your .emacs file. We would be grateful if you +;; ange-ftp-cms-host-regexp in your init file. We would be grateful if you ;; would report any failures to automatically recognize a CMS host as a bug. ;; ;; Filename syntax: diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index d1d33bfe566..c1c83d2245e 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -122,8 +122,7 @@ ;; the buffer, use: ;; M-x browse-url -;; To display a URL by shift-clicking on it, put this in your ~/.emacs -;; file: +;; To display a URL by shift-clicking on it, put this in your init file: ;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) ;; (Note that using Shift-mouse-1 is not desirable because ;; that event has a standard meaning in Emacs.) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 6a9d80f9672..f9e31788527 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -33,7 +33,7 @@ ;; INSTALLATION ;; ;; To use goto-address in a particular mode (for example, while -;; reading mail in mh-e), add something like this in your .emacs file: +;; reading mail in mh-e), add this to your init file: ;; ;; (add-hook 'mh-show-mode-hook 'goto-address) ;; diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 5d673faf0db..91eca84ce53 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el @@ -87,7 +87,7 @@ ;; If you are using Newsticker as part of GNU Emacs there is no need to ;; perform any installation steps in order to use Newsticker. Otherwise ;; place Newsticker in a directory where Emacs can find it. Add the -;; following line to your Emacs startup file (`~/.emacs'). +;; following line to your init file: ;; (add-to-list 'load-path "/path/to/newsticker/") ;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t) ;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t) diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index f3b0e372de4..f7d41fcd97a 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -164,7 +164,7 @@ To make use of this do something like: (setq quickurl-postfix quickurl-reread-hook-postfix) -in your ~/.emacs (after loading/requiring quickurl).") +in your init file (after loading/requiring quickurl).") ;; Non-customize variables. diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 06aae1f6af2..abca6b3ea01 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -204,7 +204,7 @@ useful thing to do is to put (setq tramp-verbose 9) -in the ~/.emacs file and to repeat the bug. Then, include the +in your init file and to repeat the bug. Then, include the contents of the *tramp/foo* buffer and the *debug tramp/foo* buffer in your bug report. diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index 232e5ca581a..d5de2f410c5 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -38,7 +38,7 @@ ;; example sites. You'll probably want to override it with your own favorite ;; sites. The documentation for the variable describes the syntax. -;; You may wish to add something like the following to your `.emacs' file: +;; You may wish to add something like the following to your init file: ;; ;; (require 'webjump) ;; (global-set-key "\C-cj" 'webjump) diff --git a/lisp/novice.el b/lisp/novice.el index bcc94c86c9d..c621ac4b692 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -159,8 +159,8 @@ to future sessions." (defun disable-command (command) "Require special confirmation to execute COMMAND from now on. COMMAND must be a symbol. -This command alters the user's .emacs file so that this will apply -to future sessions." +This command alters your init file so that this choice applies to +future sessions." (interactive "CDisable command: ") (en/disable-command command t)) diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index d357da685e5..97d8b4652a9 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -28,7 +28,7 @@ ;; argument position. ;; ;; To use pcomplete with shell-mode, for example, you will need the -;; following in your .emacs file: +;; following in your init file: ;; ;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup) ;; diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 1f04099a6ae..3b6035473fd 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el @@ -33,7 +33,7 @@ ;; Installation ;; ------------ -;; Add the following lines to your Emacs startup file (`~/.emacs'). +;; Add the following lines to your init file: ;; (add-to-list 'load-path "/path/to/bubbles/") ;; (autoload 'bubbles "bubbles" "Play Bubbles" t) diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index 8d9506a1614..ade0d15006a 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -138,19 +138,7 @@ the tail of the list." ("^)\\([A-Z ]+\\)\\([a-z ]+\\)" (1 font-lock-keyword-face) (2 font-lock-string-face))) - "Expressions to fontify in Decipher mode. - -Ciphertext uses `font-lock-keyword-face', plaintext uses -`font-lock-string-face', comments use `font-lock-comment-face', and -checkpoints use `font-lock-constant-face'. You can customize the -display by changing these variables. For best results, I recommend -that all faces use the same background color. - -For example, to display ciphertext in the `bold' face, use - (add-hook 'decipher-mode-hook - (lambda () (set (make-local-variable 'font-lock-keyword-face) - 'bold))) -in your `.emacs' file.") + "Font Lock keywords for Decipher mode.") (defvar decipher-mode-map (let ((map (make-keymap))) diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index d2e307c0145..85c128b08e2 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el @@ -45,7 +45,7 @@ ;; Installation ;; ;; type at your prompt "emacs -l handwrite.el" or put this file on your -;; Emacs-Lisp load path, add the following into your ~/.emacs startup file +;; Emacs-Lisp load path, add the following into your init file: ;; ;; (require 'handwrite) ;; diff --git a/lisp/printing.el b/lisp/printing.el index 0152ed63dbb..02b2fb0139c 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -139,10 +139,9 @@ Please send all bug fixes and enhancements to ;; ;; One way to set variables is by calling `pr-customize', customize all ;; variables and save the customization by future sessions (see Options -;; section). Other way is by coding your settings on Emacs init file (that is, -;; ~/.emacs file), see below for a first setting template that it should be -;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT -;; or MS-DOS): +;; section). Other way is by adding code to your init file; see below +;; for a first setting template that it should be inserted on your +;; init file: ;; ;; * Example of setting for Windows system: ;; @@ -297,8 +296,7 @@ Please send all bug fixes and enhancements to ;; Using `printing' ;; ---------------- ;; -;; To use `printing' insert in your ~/.emacs file (or c:/_emacs, if you're -;; using Windows 9x/NT or MS-DOS): +;; To use `printing' insert in your init file: ;; ;; (require 'printing) ;; ;; ...some user settings... diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 4062646c967..5a054af9883 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -69,7 +69,7 @@ ;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode. ;; If antlr-mode is not part of your distribution, put this file into your -;; load-path and the following into your ~/.emacs: +;; load-path and the following into your init file: ;; (autoload 'antlr-mode "antlr-mode" nil t) ;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist)) ;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index cf628e44de0..20aa2bc2775 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -352,8 +352,8 @@ might get set too. If DONT-OVERRIDE is neither nil nor t, style variables whose default values have been set (more precisely, whose default values are not the symbol `set-from-style') will not be changed. This avoids overriding global settings -done in ~/.emacs. It is useful to call c-set-style from a mode hook in this -way. +done in your init file. It is useful to call c-set-style from a mode hook +in this way. If DONT-OVERRIDE is t, style variables that already have values (i.e., whose values are not the symbol `set-from-style') will not be overridden. CC Mode diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 943b5c6a067..525b1c9671e 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el @@ -49,7 +49,7 @@ ;; INSTALLATION ====================================================== -;; Put the following in your ~/.emacs file. +;; Put the following in your init file. ;; If you want the *Macroexpansion* window to be not higher than ;; necessary: diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index cdbaf4708a7..0f18cffc3de 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -43,7 +43,7 @@ Please send all bug fixes and enhancements to ;; ;; This package translates an EBNF to a syntactic chart on PostScript. ;; -;; To use ebnf2ps, insert in your ~/.emacs: +;; To use ebnf2ps, insert in your init file: ;; ;; (require 'ebnf2ps) ;; @@ -772,7 +772,7 @@ Please send all bug fixes and enhancements to ;; ;; To set the above options you may: ;; -;; a) insert the code in your ~/.emacs, like: +;; a) insert the code in your init file, like: ;; ;; (setq ebnf-terminal-shape 'bevel) ;; diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index cc1251f6a75..f42952685d0 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -102,10 +102,9 @@ ;; (abbrev-mode 1) ; turn on abbreviation mode ;; (f90-add-imenu-menu) ; extra menu with functions etc. ;; (if f90-auto-keyword-case ; change case of all keywords on startup -;; (f90-change-keywords f90-auto-keyword-case)) -;; )) +;; (f90-change-keywords f90-auto-keyword-case)))) ;; -;; in your .emacs file. You can also customize the lists +;; in your init file. You can also customize the lists ;; f90-font-lock-keywords, etc. ;; ;; The auto-fill and abbreviation minor modes are accessible from the F90 menu, diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 233b9a5212e..2a77ad013c7 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -52,7 +52,7 @@ ;; ;; First make sure hideshow.el is in a directory in your `load-path'. ;; You can optionally byte-compile it using `M-x byte-compile-file'. -;; Then, add the following to your ~/.emacs: +;; Then, add the following to your init file: ;; ;; (load-library "hideshow") ;; (add-hook 'X-mode-hook ; other modes similarly diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index 246ba8f29cd..24613d14634 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el @@ -53,8 +53,8 @@ ;; ;; INSTALLATION ;; ============ -;; Put this file on the emacs load path and load it with the following -;; line in your .emacs file: +;; Put this file on the emacs load path and load it with the following +;; line in your init file: ;; ;; (add-hook 'idlwave-load-hook ;; (lambda () (require 'idlw-complete-structtag))) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 4f9109284ae..08d1461c008 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -48,7 +48,7 @@ ;; ;; Follow the instructions in the INSTALL file of the distribution. ;; In short, put this file on your load path and add the following -;; lines to your .emacs file: +;; lines to your init file: ;; ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) ;; @@ -111,9 +111,7 @@ For example, \"^\r?IDL> \" or \"^\r?WAVE> \". The \"^\r?\" is needed, to indicate the beginning of the line, with optional return character (which IDL seems to output randomly). This variable is used to initialize `comint-prompt-regexp' in the -process buffer. - -This is a fine thing to set in your `.emacs' file." +process buffer." :group 'idlwave-shell-general-setup :type 'regexp) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index a35ffd3e45d..9b634328fa7 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -51,7 +51,7 @@ ;; ;; Follow the instructions in the INSTALL file of the distribution. ;; In short, put this file on your load path and add the following -;; lines to your .emacs file: +;; lines to your init file: ;; ;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) @@ -746,7 +746,7 @@ or even '?'. '.' is not a good choice because it can make structure field names act like abbrevs in certain circumstances. Changes to this in `idlwave-mode-hook' will have no effect. Instead a user -must set it directly using `setq' in the .emacs file before idlwave.el +must set it directly using `setq' in the init file before idlwave.el is loaded." :group 'idlwave-abbrev-and-indent-action :type 'string) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index cd6c8869d9f..401970b2ce8 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -168,9 +168,7 @@ This variable is only used if the variable More precise choices: Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" -kcl: \"^>+ *\" - -This is a fine thing to set in your .emacs file or through Custom." +kcl: \"^>+ *\"" :type 'regexp :group 'inferior-lisp) diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index 54d857dd4b1..a59176a5aa6 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el @@ -32,7 +32,7 @@ ;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and ;; `ftp://ftp.gnu.org/pub/gnu/mdk'. ;; -;; To use this mode, place the following in your .emacs file: +;; To use this mode, place the following in your init file: ;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. ;; When you load a file with the extension .mixal the mode will be started ;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 79b3fcee720..ab5a19f8a2f 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -585,12 +585,12 @@ Variables you can use to customize Octave mode Turning on Octave mode runs the hook `octave-mode-hook'. To begin using this mode for all `.m' files that you edit, add the -following lines to your `.emacs' file: +following lines to your init file: (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) To automatically turn on the abbrev and auto-fill features, -add the following lines to your `.emacs' file as well: +add the following lines to your init file as well: (add-hook 'octave-mode-hook (lambda () diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index e13b67e596d..3dd9a48bb33 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -28,14 +28,14 @@ ;;; Commentary: ;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode") -;; to your .emacs file and change the first line of your perl script to: +;; to your init file and change the first line of your perl script to: ;; #!/usr/bin/perl -- # -*-Perl-*- ;; With arguments to perl: ;; #!/usr/bin/perl -P- # -*-Perl-*- ;; To handle files included with do 'filename.pl';, add something like ;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode)) ;; auto-mode-alist)) -;; to your .emacs file; otherwise the .pl suffix defaults to prolog-mode. +;; to your init file; otherwise the .pl suffix defaults to prolog-mode. ;; This code is based on the 18.53 version c-mode.el, with extensive ;; rewriting. Most of the features of c-mode survived intact. diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 16d85cb2d79..33d43cb3d5a 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -60,9 +60,7 @@ ;;; Installation: ;; -;; Insert the following lines in your init file--typically ~/.emacs -;; (GNU Emacs and XEmacs <21.4), or ~/.xemacs/init.el (XEmacs -;; 21.4)--to use this mode when editing Prolog files under Emacs: +;; Insert the following lines in your init file: ;; ;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) ;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index f3ecbe3fc3d..3d5abc4df62 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -268,9 +268,8 @@ (defcustom sql-password "" "Default password. - -Storing your password in a textfile such as ~/.emacs could be dangerous. -Customizing your password will store it in your ~/.emacs file." +If you customize this, the value will be stored in your init +file. Since that is a plaintext file, this could be dangerous." :type 'string :group 'SQL :risky t) @@ -1285,8 +1284,8 @@ Based on `comint-mode-map'.") ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)] ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)])) -;; Abbreviations -- if you want more of them, define them in your -;; ~/.emacs file. Abbrevs have to be enabled in your ~/.emacs, too. +;; Abbreviations -- if you want more of them, define them in your init +;; file. Abbrevs have to be enabled in your init file, too. (defvar sql-mode-abbrev-table nil "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") @@ -3715,8 +3714,8 @@ For information on how to create multiple SQLi buffers, see `sql-interactive-mode'. Note that SQL doesn't have an escape character unless you specify -one. If you specify backslash as escape character in SQL, -you must tell Emacs. Here's how to do that in your `~/.emacs' file: +one. If you specify backslash as escape character in SQL, you +must tell Emacs. Here's how to do that in your init file: \(add-hook 'sql-mode-hook (lambda () @@ -3806,7 +3805,7 @@ cause the window to scroll to the end of the buffer. If you want to make SQL buffers limited in length, add the function `comint-truncate-buffer' to `comint-output-filter-functions'. -Here is an example for your .emacs file. It keeps the SQLi buffer a +Here is an example for your init file. It keeps the SQLi buffer a certain length. \(add-hook 'sql-interactive-mode-hook diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index c072754e66d..835d548c19f 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -8790,7 +8790,7 @@ Note these are only read when the file is first visited, you must use \\[find-alternate-file] RET to have these take effect after editing them! If you want to disable the \"Process `eval' or hook local variables\" -warning message, you need to add to your .emacs file: +warning message, you need to add to your init file: (setq enable-local-eval t)" (let ((origbuf (current-buffer))) @@ -11756,7 +11756,7 @@ An example: // For this example we declare the function in the // module's file itself. Often you'd define it instead - // in a site-start.el or .emacs file. + // in a site-start.el or init file. /* Local Variables: eval: diff --git a/lisp/ps-print.el b/lisp/ps-print.el index addf2975c5f..930e750ab27 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1042,7 +1042,7 @@ Please send all bug fixes and enhancements to ;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. ;; These variables contain lists of faces that ps-print should consider bold, ;; italic or underline; to set them, put code like the following into your -;; .emacs file: +;; init file: ;; ;; (setq ps-bold-faces '(my-blue-face)) ;; (setq ps-italic-faces '(my-red-face)) diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 43dad63a140..0c082169462 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -56,13 +56,12 @@ This means when you visit a file, point goes to the last place where it was when you previously visited the same file. This variable is automatically buffer-local. -If you wish your place in any file to always be automatically saved, -simply put this in your `~/.emacs' file: +If you wish your place in any file to always be automatically +saved, set this to t using the Customize facility, or put the +following code in your init file: \(setq-default save-place t) -\(require 'saveplace) - -or else use the Custom facility to set this option." +\(require 'saveplace)" :type 'boolean :require 'saveplace :group 'save-place) @@ -148,7 +147,8 @@ even in a later Emacs session. If called with a prefix arg, the mode is enabled if and only if the argument is positive. -To save places automatically in all files, put this in your `.emacs' file: +To save places automatically in all files, put this in your init +file: \(setq-default save-place t\)" (interactive "P") diff --git a/lisp/shell.el b/lisp/shell.el index 8c80712eed6..77a42389785 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -46,7 +46,7 @@ ;; YOUR .EMACS FILE ;;============================================================================= -;; Some suggestions for your .emacs file. +;; Some suggestions for your init file. ;; ;; ;; Define M-# to run some strange command: ;; (eval-after-load "shell" diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 90cdea63e85..25a6fbfd998 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -706,7 +706,7 @@ will be stripped by a simplified optimizer when compiled into a singular expression. This variable will be turned into `speedbar-file-regexp' for use with speedbar. You should use the function `speedbar-add-supported-extension' to add a new extension at -runtime, or use the configuration dialog to set it in your .emacs file. +runtime, or use the configuration dialog to set it in your init file. If you add an extension to this list, and it does not appear, you may need to also modify `completion-ignored-extension' which will also help file completion." diff --git a/lisp/startup.el b/lisp/startup.el index 348e653dd28..db5efb89eed 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -71,12 +71,13 @@ once you are familiar with the contents of the startup screen." "Non-nil inhibits the initial startup echo area message. Setting this variable takes effect only if you do it with the customization buffer -or if your `.emacs' file contains a line of this form: +or if your init file contains a line of this form: (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") -If your `.emacs' file is byte-compiled, use the following form instead: +If your init file is byte-compiled, use the following form +instead: (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) -Thus, someone else using a copy of your `.emacs' file will see -the startup message unless he personally acts to inhibit it." +Thus, someone else using a copy of your init file will see the +startup message unless he personally acts to inhibit it." :type '(choice (const :tag "Don't inhibit") (string :tag "Enter your user name, to inhibit")) :group 'initialization) @@ -261,10 +262,14 @@ and VALUE is the value which is given to that frame parameter "Normal hook run after handling urgent options but before loading init files.") (defvar after-init-hook nil - "Normal hook run after loading the init files, `~/.emacs' and `default.el'. -There is no `condition-case' around the running of these functions; -therefore, if you set `debug-on-error' non-nil in `.emacs', -an error in one of these functions will invoke the debugger.") + "Normal hook run after initializing the Emacs session. +It is run after Emacs loads the init file, `default' library, the +abbrevs file, and additional Lisp packages (if any), and setting +the value of `after-init-time'. + +There is no `condition-case' around the running of this hook; +therefore, if `debug-on-error' is non-nil, an error in one of +these functions will invoke the debugger.") (defvar emacs-startup-hook nil "Normal hook run after loading init files and handling the command line.") @@ -296,7 +301,7 @@ the user's init file.") :group 'initialization) (defvar init-file-user nil - "Identity of user whose `.emacs' file is or was read. + "Identity of user whose init file is or was read. The value is nil if `-q' or `--no-init-file' was specified, meaning do not load any init file. @@ -306,7 +311,7 @@ or it may be a string containing a user's name meaning use that person's init file. In either of the latter cases, `(concat \"~\" init-file-user \"/\")' -evaluates to the name of the directory where the `.emacs' file was +evaluates to the name of the directory where the init file was looked for. Setting `init-file-user' does not prevent Emacs from loading @@ -365,7 +370,7 @@ init file is read, in case it sets `mail-host-address'." (t (concat user-emacs-directory "auto-save-list/.saves-"))) "Prefix for generating `auto-save-list-file-name'. -This is used after reading your `.emacs' file to initialize +This is used after reading your init file to initialize `auto-save-list-file-name', by appending Emacs's pid and the system name, if you have not already set `auto-save-list-file-name' yourself. Directories in the prefix will be created if necessary. diff --git a/lisp/strokes.el b/lisp/strokes.el index dfd0e95f61a..62a8528f25d 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -933,14 +933,7 @@ and then safely save them for later use, send letters to friends extracting the strokes for editing use once again, so the editing cycle can continue. -Strokes are easy to program and fun to use. To start strokes going, -you'll want to put the following line in your .emacs file as mentioned -in the commentary to strokes.el. - -This will load strokes when and only when you start Emacs on a window -system, with a mouse or other pointer device defined. - -To toggle strokes-mode, you just do +To toggle strokes-mode, invoke the command > M-x strokes-mode diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 9a9a31f4253..aea2e8c1092 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el @@ -322,7 +322,7 @@ "Terminal initialization function for iris-ansi." ;; Use inheritance to let the main keymap override these defaults. ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. + ;; made in the init file. (let ((m (copy-keymap iris-function-map))) (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m))) diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 76a3a31cedc..6b9e1301003 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -75,7 +75,7 @@ (defun terminal-init-lk201 () ;; Use inheritance to let the main keymap override these defaults. ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. + ;; made in the init file. (let ((m (copy-keymap lk201-function-map))) (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m))) diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 481d6b498cf..98141563006 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el @@ -166,7 +166,7 @@ ;; Use inheritance to let the main keymap override those defaults. ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. + ;; made in the init file. (let ((m (copy-keymap rxvt-function-map))) (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m)) diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index b02d39c1e0f..f1b6eea8875 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -93,7 +93,7 @@ "Terminal initialization function for tvi970." ;; Use inheritance to let the main keymap override these defaults. ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. + ;; made in the init file. (let ((m (copy-keymap tvi970-terminal-map))) (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m)) diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index d037962af19..ce148b62dba 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el @@ -109,7 +109,7 @@ "Terminal initialization function for wyse50." ;; Use inheritance to let the main keymap override these defaults. ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. + ;; made in the init file. (let ((m (copy-keymap wyse50-terminal-map))) (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m)) diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 28fb9da0b9d..e4871658b98 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -480,7 +480,7 @@ The relevant features are: ;; Use inheritance to let the main keymap override those defaults. ;; This way we don't override terminfo-derived settings or settings - ;; made in the .emacs file. + ;; made in the init file. (set-keymap-parent map (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map map))) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index a9320d945ef..42f0418b690 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -290,9 +290,9 @@ If this variable is nil, all regions are treated as small." ;;* Mode specific options enable users to disable flyspell on */ ;;* certain word depending of the emacs mode. For instance, when */ ;;* using flyspell with mail-mode add the following expression */ -;;* in your .emacs file: */ +;;* in your init file: */ ;;* (add-hook 'mail-mode */ -;;* (lambda () (setq flyspell-generic-check-word-predicate */ +;;* (lambda () (setq flyspell-generic-check-word-predicate */ ;;* 'mail-mode-flyspell-verify))) */ ;;*---------------------------------------------------------------------*/ (defvar flyspell-generic-check-word-predicate nil @@ -488,7 +488,7 @@ invoking `ispell-change-dictionary'. Consider using the `ispell-parser' to check your text. For instance consider adding: \(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) -in your .emacs file. +in your init file. \\[flyspell-region] checks all words inside a region. \\[flyspell-buffer] checks the whole buffer." diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0c7966f22d3..51a4800de52 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1127,7 +1127,8 @@ aspell is used along with Emacs).") ;; If Emacs flavor supports [:alpha:] use it for global dicts. If ;; spellchecker also supports UTF-8 via command-line option use it - ;; in communication. This does not affect definitions in ~/.emacs. + ;; in communication. This does not affect definitions in your + ;; init file. (if ispell-emacs-alpha-regexp (let (tmp-dicts-alist) (dolist (adict ispell-dictionary-alist) @@ -3680,7 +3681,7 @@ use the `x' command. (Any subsequent regions will be checked.) The `X' command aborts sending the message so that you can edit the buffer. To spell-check whenever a message is sent, include the appropriate lines -in your .emacs file: +in your init file: (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 (add-hook 'mail-send-hook 'ispell-message) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index d8afb3e5544..8584c496a97 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -47,7 +47,7 @@ ;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'. ;; ;; To turn on RefTeX Mode for all LaTeX files, add the following lines -;; to your .emacs file: +;; to your init file: ;; ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode @@ -99,7 +99,7 @@ ;; ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the -;; following lines to your `.emacs' file: +;; following lines to your init file: ;; ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 767f8f360bb..e2647a98770 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -81,7 +81,7 @@ ;;; INSTALLATION -;; Add the following lines to your `.emacs' file: +;; Add the following lines to your init file: ;; ;; (require 'rst) ;; diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 5bcd87ede68..67d7f8c01f9 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -451,7 +451,7 @@ the next N words. In Transient Mark mode, when the mark is active, N defaults to -1, which means to wrap it around the current region. If you like upcased tags, put (setq sgml-transformation-function 'upcase) -in your `.emacs' file. +in your init file. Use \\[sgml-validate] to validate your document with an SGML parser. diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 2664a89855f..459e884d45d 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -126,7 +126,7 @@ ;; again. ;; ;; To use the package regularly place this file in the site library -;; directory and add the next expression in your .emacs file. Make +;; directory and add the next expression in your init file. Make ;; sure that directory is included in the `load-path'. ;; ;; (require 'table) @@ -342,10 +342,10 @@ ;; (function (lambda () ;; (local-set-key [] ')))) ;; -;; Above code is well known ~/.emacs idiom for customizing a mode -;; specific keymap however it does not work for this package. This is -;; because there is no table mode in effect. This package does not -;; use a local map therefore you must modify `table-cell-map' +;; Adding the above to your init file is a common way to customize a +;; mode specific keymap. However it does not work for this package. +;; This is because there is no table mode in effect. This package +;; does not use a local map therefore you must modify `table-cell-map' ;; explicitly. The correct way of achieving above task is: ;; ;; (add-hook 'table-cell-map-hook diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 8a4fe4f87fd..b21e72639fd 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -276,8 +276,9 @@ You have the following commands at your disposal: \\[2C-merge] Merge both buffers \\[2C-dissociate] Dissociate the two buffers -These keybindings can be customized in your ~/.emacs by `2C-mode-map', -`2C-minor-mode-map' and by binding `2C-command' to some prefix. +These keybindings can be customized in your init file by +`2C-mode-map', `2C-minor-mode-map' and by binding `2C-command' to +some prefix. The appearance of the screen can be customized by the variables `2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 13963121e2b..c2ac1035dfe 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -29,7 +29,7 @@ ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; ;; See the top of `time-stamp.el' for another example. -;; To use time-stamping, add this line to your .emacs file: +;; To use time-stamping, add this line to your init file: ;; (add-hook 'before-save-hook 'time-stamp) ;; Now any time-stamp templates in your files will be updated automatically. @@ -254,7 +254,7 @@ time-stamped file itself.") (defun time-stamp () "Update the time stamp string(s) in the buffer. A template in a file can be automatically updated with a new time stamp -every time you save the file. Add this line to your .emacs file: +every time you save the file. Add this line to your init file: (add-hook 'before-save-hook 'time-stamp) or customize `before-save-hook' through Custom. Normally the template must appear in the first 8 lines of a file and diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index bd7d8e33922..26fe72014f7 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -79,7 +79,7 @@ ;; Store any proxying information - this will not overwrite an old ;; entry, so that people can still set this information in their - ;; .emacs file + ;; init file (cond (cur-proxy nil) ; Keep their old settings ((null env-proxy) nil) ; No proxy setup diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el index 0f71b7b82e7..fc65d62c67d 100644 --- a/lisp/vc/pcvs-defs.el +++ b/lisp/vc/pcvs-defs.el @@ -57,11 +57,7 @@ versions, such as the one in SunOS-4.") ;;;; END OF THINGS TO CHECK WHEN INSTALLING ;;;; -------------------------------------------------------- -;;;; ;;;; User configuration variables: -;;;; -;;;; NOTE: these should be set in your ~/.emacs (or site-lisp/default.el) file. -;;;; (defgroup pcl-cvs nil "Special support for the CVS versioning system." diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b48ea1afd95..ea9ce949ccb 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -31,7 +31,7 @@ ;; To install: put this file on the load-path and add Git to the list ;; of supported backends in `vc-handled-backends'; the following line, -;; placed in your ~/.emacs, will accomplish this: +;; placed in your init file, will accomplish this: ;; ;; (add-to-list 'vc-handled-backends 'Git) diff --git a/lisp/windmove.el b/lisp/windmove.el index 3a1afec38ee..1181e409dff 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -94,7 +94,7 @@ ;; Installation: ;; -;; Put the following line in your `.emacs' file: +;; Put the following line in your init file: ;; ;; (windmove-default-keybindings) ; shifted arrow keys ;; From dcf8834baca7d4e1761483b9ea74206cadb8b114 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 17 Sep 2012 00:22:17 -0700 Subject: [PATCH 210/216] Reduce version number duplication in etc/refcards * etc/refcards/emacsver.tex: New file. * etc/refcards/calccard.tex, etc/refcards/cs-dired-ref.tex: * etc/refcards/cs-refcard.tex, etc/refcards/cs-survival.tex: * etc/refcards/de-refcard.tex, etc/refcards/dired-ref.tex: * refcards/emacsver.tex, etc/refcards/fr-dired-ref.tex: * etc/refcards/fr-refcard.tex, etc/refcards/fr-survival.tex: * etc/refcards/orgcard.tex, etc/refcards/pl-refcard.tex: * etc/refcards/pt-br-refcard.tex, etc/refcards/refcard.tex: * etc/refcards/sk-dired-ref.tex, etc/refcards/sk-refcard.tex: * etc/refcards/sk-survival.tex, etc/refcards/survival.tex: * etc/refcards/vipcard.tex, etc/refcards/viperCard.tex: Include emacsver.tex. * refcards/calccard.tex (\emacsversionnumber): Rename to \versionemacs, same as all the other refcards. * etc/refcards/Makefile (ENVADD): New variable. (sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf) (%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi): Depend on emacsver.tex. Add "." to TEXINPUTS for TeX commands. * admin/admin.el (set-version): Set major version in etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex. (set-copyright): In etc/refcards, only change ru-refcard.tex and emacsver.tex. * admin.el (cusver-scan, cusver-check): Bind local variables. * .bzrignore: Add etc/refcards TeX intermediate files. --- admin/ChangeLog | 7 +++++++ admin/admin.el | 32 ++++++++++++++++++-------------- etc/ChangeLog | 20 ++++++++++++++++++++ etc/refcards/Makefile | 27 ++++++++++++++------------- etc/refcards/calccard.tex | 5 ++--- etc/refcards/cs-dired-ref.tex | 3 +-- etc/refcards/cs-refcard.tex | 3 +-- etc/refcards/cs-survival.tex | 3 +-- etc/refcards/de-refcard.tex | 3 +-- etc/refcards/dired-ref.tex | 3 +-- etc/refcards/emacsver.tex | 4 ++++ etc/refcards/fr-dired-ref.tex | 3 +-- etc/refcards/fr-refcard.tex | 3 +-- etc/refcards/fr-survival.tex | 3 +-- etc/refcards/orgcard.tex | 2 +- etc/refcards/pl-refcard.tex | 3 +-- etc/refcards/pt-br-refcard.tex | 3 +-- etc/refcards/refcard.tex | 3 +-- etc/refcards/sk-dired-ref.tex | 3 +-- etc/refcards/sk-refcard.tex | 3 +-- etc/refcards/sk-survival.tex | 3 +-- etc/refcards/survival.tex | 3 +-- etc/refcards/vipcard.tex | 2 +- etc/refcards/viperCard.tex | 2 +- 24 files changed, 83 insertions(+), 63 deletions(-) create mode 100644 etc/refcards/emacsver.tex diff --git a/admin/ChangeLog b/admin/ChangeLog index 6d3118d8ba6..cef27f3f52e 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,5 +1,12 @@ 2012-09-17 Glenn Morris + * admin.el (cusver-scan, cusver-check): Bind local variables. + + * admin.el (set-version): Set major version in + etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex. + (set-copyright): In etc/refcards, only change ru-refcard.tex + and emacsver.tex. + * admin.el (set-copyright): No more need to set copyrights for nextstep, or .c files. Add configure.ac and config.nt. diff --git a/admin/admin.el b/admin/admin.el index 4d68fca97b2..536236c3f70 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -126,7 +126,16 @@ Root must be the root of an Emacs source tree." (set-version-in-file root "nt/emacsclient.rc" comma-space-version (rx (and "\"ProductVersion\"" (0+ space) ?, (0+ space) ?\" (submatch (1+ (in "0-9, "))) - "\\0\""))))) + "\\0\""))) + (when (string-match "\\([0-9]\\{2,\\}\\)" version) + (setq version (match-string 1 version)) + (set-version-in-file root "etc/refcards/ru-refcard.tex" version + "\\\\newcommand{\\\\versionemacs}\\[0\\]\ +{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs") + (set-version-in-file root "etc/refcards/emacsver.tex" version + "\\\\def\\\\versionemacs\ +{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs")))) + ;; Note this makes some assumptions about form of short copyright. (defun set-copyright (root copyright) @@ -150,19 +159,14 @@ Root must be the root of an Emacs source tree." (set-version-in-file root "lib-src/rcs2log" copyright (rx (and "Copyright" (0+ space) ?= (0+ space) ?\' (submatch (1+ nonl))))) - ;; This one is a nuisance, as it needs to be split over two lines. - (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) (when (string-match "\\([0-9]\\{4\\}\\)" copyright) (setq copyright (match-string 1 copyright)) - (dolist (file (directory-files (expand-file-name "etc/refcards" root) - t "\\.tex\\'")) - (unless (string-match "gnus-refcard\\.tex" file) - (set-version-in-file - root file copyright - (concat (if (string-match "ru-refcard\\.tex" file) - "\\\\newcommand{\\\\cyear}\\[0\\]{" - "\\\\def\\\\year{") - "\\([0-9]\\{4\\}\\)}.+%.+copyright year")))))) + (set-version-in-file root "etc/refcards/ru-refcard.tex" copyright + "\\\\newcommand{\\\\cyear}\\[0\\]\ +{\\([0-9]\\{4\\}\\)}.+%.+copyright year") + (set-version-in-file root "etc/refcards/emacsver.tex" copyright + "\\\\def\\\\year\ +{\\([0-9]\\{4\\}\\)}.+%.+copyright year"))) ;;; Various bits of magic for generating the web manuals @@ -443,7 +447,7 @@ If optional argument OLD is non-nil, also scan for defvars." (let ((m (format "Scanning %s..." file)) (re (format "^[ \t]*\\((def%s\\)[ \t\n]" (if old "\\(?:custom\\|var\\)" "custom"))) - alist var ver) + alist var ver form) (message "%s" m) (with-temp-buffer (insert-file-contents file) @@ -502,7 +506,7 @@ changes (in a non-trivial way). This function does not check for that." (mapcar (lambda (file) (cons file (cusver-scan file))) newfiles))) - oldcus result thisfile) + oldcus result thisfile file) (message "Reading old defcustoms...") (dolist (file oldfiles) (setq oldcus (append oldcus (cusver-scan file t)))) diff --git a/etc/ChangeLog b/etc/ChangeLog index 5a14c523cf3..6f2b178fcd7 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,23 @@ +2012-09-17 Glenn Morris + + * refcards/emacsver.tex: New file. + * refcards/calccard.tex, refcards/cs-dired-ref.tex: + * refcards/cs-refcard.tex, refcards/cs-survival.tex: + * refcards/de-refcard.tex, refcards/dired-ref.tex: + * refcards/emacsver.tex, refcards/fr-dired-ref.tex: + * refcards/fr-refcard.tex, refcards/fr-survival.tex: + * refcards/orgcard.tex, refcards/pl-refcard.tex: + * refcards/pt-br-refcard.tex, refcards/refcard.tex: + * refcards/sk-dired-ref.tex, refcards/sk-refcard.tex: + * refcards/sk-survival.tex, refcards/survival.tex: + * refcards/vipcard.tex, refcards/viperCard.tex: Include emacsver.tex. + * refcards/calccard.tex (\emacsversionnumber): + Rename to \versionemacs, same as all the other refcards. + * refcards/Makefile (ENVADD): New variable. + (sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf) + (%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi): + Depend on emacsver.tex. Add "." to TEXINPUTS for TeX commands. + 2012-09-16 Paul Eggert Remove configure's --without-sync-input option (Bug#12450). diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile index 64e2d8638f8..ef810da6022 100644 --- a/etc/refcards/Makefile +++ b/etc/refcards/Makefile @@ -47,26 +47,27 @@ VIPER_CARDS_PDF = vipcard.pdf viperCard.pdf viper-cards_pdf: ${VIPER_CARDS_PDF} viper-cards_ps: ${VIPER_CARDS_PDF:.pdf=.ps} +ENVADD = TEXINPUTS=".:" ## PDF files. ## The page layouts (a4/letter) are written directly in the .tex files. cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \ -sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex +sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex emacsver.tex if pdfcsplain --version > /dev/null 2> /dev/null; then \ - pdfcsplain $<; \ + ${ENVADD} pdfcsplain $<; \ else \ - csplain "\pdfoutput=1\input $<"; \ + ${ENVADD} csplain "\pdfoutput=1\input $<"; \ fi ## Some versions of pdfmex seem to create dvi by default, hence output-format. -pl-refcard.pdf: %.pdf: %.tex +pl-refcard.pdf: %.pdf: %.tex emacsver.tex if ! kpsewhich -format=fmt mex > /dev/null && \ ! pdfmex --version > /dev/null 2> /dev/null; then \ echo "No mex format found."; false; \ fi - pdftex -output-format=pdf $< + ${ENVADD} pdftex -output-format=pdf $< ru-refcard.pdf: %.pdf: %.tex pdflatex $< @@ -81,21 +82,21 @@ gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' ## Everything not explicitly listed above. -%.pdf: %.tex - pdftex $< +%.pdf: %.tex emacsver.tex + ${ENVADD} pdftex $< ## dvi files. cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \ -sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex - csplain $< +sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex emacsver.tex + ${ENVADD} csplain $< -pl-refcard.dvi: %.dvi: %.tex +pl-refcard.dvi: %.dvi: %.tex emacsver.tex if ! kpsewhich -format=fmt mex > /dev/null; then \ echo "No mex format found."; false; \ fi - tex $< + ${ENVADD} tex $< ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex latex $< @@ -105,8 +106,8 @@ gnus-booklet.dvi: gnus-refcard.tex mv gnus-refcard.dvi $@ ## Everything not explicitly listed above. -%.dvi: %.tex - tex $< +%.dvi: %.tex emacsver.tex + ${ENVADD} tex $< ## PostScript files. diff --git a/etc/refcards/calccard.tex b/etc/refcards/calccard.tex index fd3d45b8da4..04c88befeea 100644 --- a/etc/refcards/calccard.tex +++ b/etc/refcards/calccard.tex @@ -63,8 +63,7 @@ % UUCP: mit-erl!gildea % Internet: gildea@stop.mail-abuse.org -\def\emacsversionnumber{24} -\def\year{2012} % latest copyright year +\input emacsver.tex \def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. @@ -276,7 +275,7 @@ are preserved on all copies. \title{GNU Calc Reference Card} -\centerline{(for GNU Emacs version \emacsversionnumber)} +\centerline{(for GNU Emacs version \versionemacs)} \section{Starting and Stopping} diff --git a/etc/refcards/cs-dired-ref.tex b/etc/refcards/cs-dired-ref.tex index ee7acaf416d..45867e11d44 100644 --- a/etc/refcards/cs-dired-ref.tex +++ b/etc/refcards/cs-dired-ref.tex @@ -41,8 +41,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/cs-refcard.tex b/etc/refcards/cs-refcard.tex index d17e5c6ddeb..98842dd08e0 100644 --- a/etc/refcards/cs-refcard.tex +++ b/etc/refcards/cs-refcard.tex @@ -59,8 +59,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/cs-survival.tex b/etc/refcards/cs-survival.tex index 5aa111c0297..4050cf0a1ab 100644 --- a/etc/refcards/cs-survival.tex +++ b/etc/refcards/cs-survival.tex @@ -54,8 +54,7 @@ % Czech hyphenation rules applied \chyph -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/de-refcard.tex b/etc/refcards/de-refcard.tex index ca3141b8390..906895b358a 100644 --- a/etc/refcards/de-refcard.tex +++ b/etc/refcards/de-refcard.tex @@ -60,8 +60,7 @@ \input german.sty \mdqoff % deactivates the "-char -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed below this line. diff --git a/etc/refcards/dired-ref.tex b/etc/refcards/dired-ref.tex index 9ccf57682ff..b85bef1ce0b 100644 --- a/etc/refcards/dired-ref.tex +++ b/etc/refcards/dired-ref.tex @@ -43,8 +43,7 @@ \input pdflayout.sty \pdflayout=(1) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/emacsver.tex b/etc/refcards/emacsver.tex new file mode 100644 index 00000000000..620ee8ef9e0 --- /dev/null +++ b/etc/refcards/emacsver.tex @@ -0,0 +1,4 @@ +%% This file is not generated by configure, because then the provided +%% pdf files would always appear out-of-date. +\def\versionemacs{24} % major version of emacs +\def\year{2012} % latest copyright year diff --git a/etc/refcards/fr-dired-ref.tex b/etc/refcards/fr-dired-ref.tex index 2819bbaa25b..457ee2db472 100644 --- a/etc/refcards/fr-dired-ref.tex +++ b/etc/refcards/fr-dired-ref.tex @@ -35,8 +35,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/fr-refcard.tex b/etc/refcards/fr-refcard.tex index ed82f00a85d..4fe94d79075 100644 --- a/etc/refcards/fr-refcard.tex +++ b/etc/refcards/fr-refcard.tex @@ -56,8 +56,7 @@ \input pdflayout.sty \pdflayout=(0l) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed below this line. diff --git a/etc/refcards/fr-survival.tex b/etc/refcards/fr-survival.tex index 1cd9cc4cf05..16d67f6b1cd 100644 --- a/etc/refcards/fr-survival.tex +++ b/etc/refcards/fr-survival.tex @@ -49,8 +49,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 3c0584d6db4..60e81f36d3e 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,7 +1,7 @@ % Reference Card for Org Mode \def\orgversionnumber{7.8.11} \def\versionyear{2012} % latest update -\def\year{2012} % latest copyright year +\input emacsver.tex %**start of header \newcount\columnsperpage diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex index 9cc6fc6a6cd..db814cfa8c2 100644 --- a/etc/refcards/pl-refcard.tex +++ b/etc/refcards/pl-refcard.tex @@ -69,8 +69,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/pt-br-refcard.tex b/etc/refcards/pt-br-refcard.tex index c16d5096f30..d3fbe54ce87 100644 --- a/etc/refcards/pt-br-refcard.tex +++ b/etc/refcards/pt-br-refcard.tex @@ -62,8 +62,7 @@ \input pdflayout.sty \pdflayout=(0l) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed below this line. diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex index 70788e8c67b..6ca9856085d 100644 --- a/etc/refcards/refcard.tex +++ b/etc/refcards/refcard.tex @@ -63,8 +63,7 @@ % Nothing else needs to be changed below this line. -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % copyright year +\input emacsver.tex \def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. diff --git a/etc/refcards/sk-dired-ref.tex b/etc/refcards/sk-dired-ref.tex index 4b12b0b42eb..50d17409072 100644 --- a/etc/refcards/sk-dired-ref.tex +++ b/etc/refcards/sk-dired-ref.tex @@ -42,8 +42,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/sk-refcard.tex b/etc/refcards/sk-refcard.tex index 5105e8ca986..e617387fad1 100644 --- a/etc/refcards/sk-refcard.tex +++ b/etc/refcards/sk-refcard.tex @@ -60,8 +60,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex % Nothing else needs to be changed. diff --git a/etc/refcards/sk-survival.tex b/etc/refcards/sk-survival.tex index 7597c63f5c7..2e7ac9b9298 100644 --- a/etc/refcards/sk-survival.tex +++ b/etc/refcards/sk-survival.tex @@ -55,8 +55,7 @@ % Slovak hyphenation rules applied \shyph -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/survival.tex b/etc/refcards/survival.tex index 92d178a130a..09151e9801c 100644 --- a/etc/refcards/survival.tex +++ b/etc/refcards/survival.tex @@ -44,8 +44,7 @@ \input pdflayout.sty \pdflayout=(1) -\def\versionemacs{24} % version of Emacs this is for -\def\year{2012} % latest copyright year +\input emacsver.tex \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/vipcard.tex b/etc/refcards/vipcard.tex index 13b43dbab73..2a709dc79f2 100644 --- a/etc/refcards/vipcard.tex +++ b/etc/refcards/vipcard.tex @@ -49,8 +49,8 @@ \input pdflayout.sty \pdflayout=(1) +\input emacsver.tex \def\versionemacs{18} % version of Emacs this is for -\def\year{2012} % latest copyright year \def\versionvip{3.5} % Nothing else needs to be changed. diff --git a/etc/refcards/viperCard.tex b/etc/refcards/viperCard.tex index a8694dd3bed..c6ab31cdb83 100644 --- a/etc/refcards/viperCard.tex +++ b/etc/refcards/viperCard.tex @@ -52,8 +52,8 @@ \input pdflayout.sty \pdflayout=(1) +\input emacsver.tex \def\versionemacs{21} % version of Emacs this is for -\def\year{2012} % latest copyright year \def\versionxemacs{20} % version of XEmacs this is for \def\versionviper{3.0} % version of Viper this is for From dcddaabb77402bba100322b05831ee5b54d6116b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 17 Sep 2012 00:35:17 -0700 Subject: [PATCH 211/216] * admin/admin.el (add-log-time-format): Declare. --- admin/ChangeLog | 2 ++ admin/admin.el | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index cef27f3f52e..7f30fe8fc0f 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,5 +1,7 @@ 2012-09-17 Glenn Morris + * admin.el (add-log-time-format): Declare. + * admin.el (cusver-scan, cusver-check): Bind local variables. * admin.el (set-version): Set major version in diff --git a/admin/admin.el b/admin/admin.el index 536236c3f70..862e5aed6c1 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -26,6 +26,8 @@ ;;; Code: +(defvar add-log-time-format) ; in add-log + (defun add-release-logs (root version) "Add \"Version VERSION released.\" change log entries in ROOT. Root must be the root of an Emacs source tree." @@ -415,7 +417,7 @@ Also generate PostScript output in PS-DEST." (setq done t)) (t (if (eobp) - (error "Parse error in %s" f)) + (error "Parse error in %s" f)) ; f is bound in manual-html-node (unless open-td (setq done t)))) (forward-line 1)))) From 45ba16c706cf9f009997550f5a3de6ea96643a92 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 17 Sep 2012 10:54:32 +0300 Subject: [PATCH 212/216] Fix the value of __malloc_extra_blocks. src/ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize __malloc_extra_blocks to 32 instead of 64, like alloc.c did in emacs_blocked_malloc, now deleted. --- src/ChangeLog | 6 ++++++ src/ralloc.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index daabdd7613e..68c30dbe19e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-09-17 Eli Zaretskii + + * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize + __malloc_extra_blocks to 32 instead of 64, like alloc.c did in + emacs_blocked_malloc, now deleted. + 2012-09-17 Paul Eggert Remove no-longer-needed Solaris 2.4 vfork bug workaround. diff --git a/src/ralloc.c b/src/ralloc.c index b0134ea730a..6b03c50ab21 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -1204,9 +1204,15 @@ r_alloc_init (void) UNBLOCK_INPUT; #else #ifndef SYSTEM_MALLOC - /* Give GNU malloc's morecore some hysteresis - so that we move all the relocatable blocks much less often. */ - __malloc_extra_blocks = 64; + /* Give GNU malloc's morecore some hysteresis so that we move all + the relocatable blocks much less often. The number used to be + 64, but alloc.c would override that with 32 in code that was + removed when SYNC_INPUT became the only input handling mode. + That code was condition on !DOUG_LEA_MALLOC, so the call to + mallopt above is left unchanged. (Actually, I think there's no + system nowadays that uses DOUG_LEA_MALLOC and also uses + REL_ALLOC.) */ + __malloc_extra_blocks = 32; #endif #endif From b4c932a221c656c23b3c81518c3b5bc3223a7e48 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 17 Sep 2012 10:56:20 +0300 Subject: [PATCH 213/216] Set pending_signals to 1 in w32term.c's read-socket hook. src/w32term.c (w32_read_socket): Set pending_signals to 1, like xterm.c does. Reported by Daniel Colascione . --- src/ChangeLog | 3 +++ src/w32term.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 68c30dbe19e..36df05c25ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2012-09-17 Eli Zaretskii + * w32term.c (w32_read_socket): Set pending_signals to 1, like + xterm.c does. Reported by Daniel Colascione . + * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize __malloc_extra_blocks to 32 instead of 64, like alloc.c did in emacs_blocked_malloc, now deleted. diff --git a/src/w32term.c b/src/w32term.c index 69a16e1852b..6244728b264 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4162,6 +4162,7 @@ w32_read_socket (struct terminal *terminal, int expected, if (interrupt_input_blocked) { interrupt_input_pending = 1; + pending_signals = 1; return -1; } From 9b318728ab4f6fce5c0f5449e80bd8c4bf3bf3a4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 17 Sep 2012 11:22:32 +0300 Subject: [PATCH 214/216] Fix a typo in a comment. --- src/ralloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ralloc.c b/src/ralloc.c index 6b03c50ab21..9a4b1ada229 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -1208,7 +1208,7 @@ r_alloc_init (void) the relocatable blocks much less often. The number used to be 64, but alloc.c would override that with 32 in code that was removed when SYNC_INPUT became the only input handling mode. - That code was condition on !DOUG_LEA_MALLOC, so the call to + That code was conditioned on !DOUG_LEA_MALLOC, so the call to mallopt above is left unchanged. (Actually, I think there's no system nowadays that uses DOUG_LEA_MALLOC and also uses REL_ALLOC.) */ From 69de3ec61f1d6b2cea9d614c8f273dd01cc8bf64 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Sep 2012 05:49:55 -0400 Subject: [PATCH 215/216] Fix bug when a name has no key. --- lisp/ChangeLog | 4 ++++ lisp/epa-mail.el | 38 ++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 275f7908f5d..d56e0e88f91 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-17 Richard Stallman + + * epa-mail.el (epa-mail-encrypt): Fix bug when a name has no key. + 2012-09-17 Chong Yidong * shell.el (shell-file-name-chars, shell-file-name-quote-list) diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index be5b849651c..a16fa5abdd4 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -170,24 +170,26 @@ Don't use this command in Lisp programs!" If no one is selected, symmetric encryption will be performed. " recipients) (if recipients - (mapcar - (lambda (recipient) - (setq recipient-key - (epa-mail--find-usable-key - (epg-list-keys - (epg-make-context epa-protocol) - (if (string-match "@" recipient) - (concat "<" recipient ">") - recipient)) - 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format - "No public key for %s; skip it? " - recipient))) - (error "No public key for %s" recipient)) - recipient-key) - recipients))) + (apply + 'nconc + (mapcar + (lambda (recipient) + (setq recipient-key + (epa-mail--find-usable-key + (epg-list-keys + (epg-make-context epa-protocol) + (if (string-match "@" recipient) + (concat "<" recipient ">") + recipient)) + 'encrypt)) + (unless (or recipient-key + (y-or-n-p + (format + "No public key for %s; skip it? " + recipient))) + (error "No public key for %s" recipient)) + (if recipient-key (list recipient-key))) + recipients)))) (setq sign (if verbose (y-or-n-p "Sign? "))) (if sign (epa-select-keys context From bb7dce392f6d9d5fc4b9d7de09ff920a52f07669 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 17 Sep 2012 06:17:50 -0400 Subject: [PATCH 216/216] Auto-commit of generated files. --- autogen/Makefile.in | 1 + autogen/config.in | 9 +++---- autogen/configure | 62 +++++++++++++++++++++++++-------------------- 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/autogen/Makefile.in b/autogen/Makefile.in index dbedb5d12e5..103a2e94ef3 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in @@ -787,6 +787,7 @@ builddir = @builddir@ cache_file = @cache_file@ canonical = @canonical@ configuration = @configuration@ +copyright = @copyright@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ diff --git a/autogen/config.in b/autogen/config.in index 39e948ee228..2f2555c75c9 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -59,9 +59,6 @@ along with GNU Emacs. If not, see . */ /* Define on FreeBSD to work around an issue when reading from a PTY. */ #undef BROKEN_PTY_READ_AFTER_EAGAIN -/* Define if SA_RESTART should only be used in batch mode. */ -#undef BROKEN_SA_RESTART - /* Define if the system is compatible with BSD 4.2. */ #undef BSD4_2 @@ -82,6 +79,9 @@ along with GNU Emacs. If not, see . */ his/her Emacs. */ #undef CLASH_DETECTION +/* Short copyright string for this version of Emacs. */ +#undef COPYRIGHT + /* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP systems. This function is required for 'alloca.c' support on those systems. */ @@ -1295,9 +1295,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 on System V Release 4. */ #undef SVR4 -/* Process async input synchronously. */ -#undef SYNC_INPUT - /* Define to use system malloc. */ #undef SYSTEM_MALLOC diff --git a/autogen/configure b/autogen/configure index 0cbdd7c732a..4c6fa8b5cf7 100755 --- a/autogen/configure +++ b/autogen/configure @@ -1143,6 +1143,7 @@ srcdir canonical configuration version +copyright KRB4LIB DESLIB KRB5LIB @@ -1330,8 +1331,7 @@ PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='deps_frag -lisp_frag -ns_frag' +lisp_frag' ac_user_opts=' enable_option_checking with_all @@ -1343,7 +1343,6 @@ with_mmdf with_mail_unlink with_mailhost with_sound -with_sync_input with_x_toolkit with_wide_int with_xpm @@ -2061,7 +2060,6 @@ Optional Packages: --with-mailhost=HOSTNAME string giving default POP mail host --without-sound don't compile with sound support - --without-sync-input don't process async input synchronously --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no) --with-wide-int prefer wide Emacs integers (typically 62-bit) @@ -3933,20 +3931,6 @@ fi -# Check whether --with-sync-input was given. -if test "${with_sync_input+set}" = set; then : - withval=$with_sync_input; -else - with_sync_input=$with_features -fi - -if test "$with_sync_input" = yes; then - -$as_echo "#define SYNC_INPUT 1" >>confdefs.h - -fi - - # Check whether --with-x-toolkit was given. if test "${with_x_toolkit+set}" = set; then : withval=$with_x_toolkit; case "${withval}" in @@ -9414,13 +9398,13 @@ if test "${with_ns}" != no; then ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir}/Contents/MacOS ns_appresdir=${ns_appdir}/Contents/Resources - ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base + ns_appsrc=Cocoa/Emacs.base elif test -f $GNUSTEP_CONFIG_FILE; then NS_IMPL_GNUSTEP=yes ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir} ns_appresdir=${ns_appdir}/Resources - ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base + ns_appsrc=GNUstep/Emacs.base GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" @@ -9510,7 +9494,6 @@ fi INSTALL_ARCH_INDEP_EXTRA=install-etc ns_self_contained=no -ns_frag=/dev/null NS_OBJ= NS_OBJC_OBJ= if test "${HAVE_NS}" = yes; then @@ -9534,7 +9517,6 @@ if test "${HAVE_NS}" = yes; then leimdir="\${ns_appresdir}/leim" INSTALL_ARCH_INDEP_EXTRA= fi - ns_frag=$srcdir/src/ns.mk NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" fi CFLAGS="$tmp_CFLAGS" @@ -9545,7 +9527,6 @@ CPPFLAGS="$tmp_CPPFLAGS" - ## $window_system is now set to the window system we will ## ultimately use. @@ -14508,6 +14489,11 @@ else $as_echo "no" >&6; } fi +case $canonical in + *-solaris2.4 | *-solaris2.4.*) + : ${ac_cv_func_vfork_works=no};; +esac + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : @@ -15767,9 +15753,6 @@ $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h hpux11) -$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h - - $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h ;; @@ -15804,6 +15787,14 @@ fi version=$PACKAGE_VERSION +copyright="Copyright (C) 2012 Free Software Foundation, Inc." + +cat >>confdefs.h <<_ACEOF +#define COPYRIGHT "$copyright" +_ACEOF + + + ### Specify what sort of things we'll be editing into Makefile and config.h. ### Use configuration here uncanonicalized to avoid exceeding size limits. @@ -24391,9 +24382,19 @@ test "${prefix}" != NONE && test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` -SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" +if test "$HAVE_NS" = "yes"; then + if test "$NS_IMPL_GNUSTEP" = yes; then + ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" -ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" + else + ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" + + fi +fi + +SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile" + +ac_config_files="$ac_config_files Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile" opt_makefile=test/automated/Makefile @@ -25233,6 +25234,10 @@ do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in" ;; + "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;; + "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;; + "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;; @@ -25245,6 +25250,7 @@ do "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; + "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;; "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;