------------------------------------------------------------ revno: 116989 committer: Daniel Colascione branch nick: trunk timestamp: Thu 2014-04-17 00:54:23 -0700 message: 2014-04-17 Daniel Colascione Add support for bracketed paste mode; add infrastructure for managing terminal mode enabling and disabling automatically. * xt-mouse.el: (xterm-mouse-mode): Simplify. (xterm-mouse-tracking-enable-sequence) (xterm-mouse-tracking-disable-sequence): New constants. (turn-on-xterm-mouse-tracking-on-terminal) (turn-off-xterm-mouse-tracking-on-terminal): Use tty-mode-set-strings and tty-mode-reset-strings terminal parameters instead of random hooks. (turn-on-xterm-mouse-tracking) (turn-off-xterm-mouse-tracking): Delete. * term/xterm.el (xterm-extra-capabilities): Fix bitrotted comment. (xterm-paste-ending-sequence): New constant. (xterm-paste): New command used for bracketed paste support. (xterm-modify-other-keys-terminal-list): Delete obsolete variable. (terminal-init-xterm-bracketed-paste-mode): New function. (terminal-init-xterm): Call it. (terminal-init-xterm-modify-other-keys): Use tty-mode-set-strings and tty-mode-reset-strings instead of random hooks. (xterm-turn-on-modify-other-keys) (xterm-turn-off-modify-other-keys) (xterm-remove-modify-other-keys): Delete obsolete functions. * term/screen.el: Rewrite to just use the xterm code. Add copyright notice. Mention tmux. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-04-17 01:35:20 +0000 +++ doc/lispref/ChangeLog 2014-04-17 07:54:23 +0000 @@ -1,3 +1,9 @@ +2014-04-17 Daniel Colascione + + * frames.texi (Terminal Parameters): Document new + tty-mode-set-strings and tty-mode-reset-strings terminal + parameters. + 2014-04-17 Paul Eggert * Makefile.in (infoclean): Be consistent about reporting failures. === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2014-03-21 09:23:22 +0000 +++ doc/lispref/frames.texi 2014-04-17 07:54:23 +0000 @@ -1334,6 +1334,18 @@ @item terminal-initted After the terminal is initialized, this is set to the terminal-specific initialization function. +@item tty-mode-set-strings +When present, a list of strings containing escape sequences that Emacs +will output while configuring a tty for rendering. Emacs emits these +strings only when configuring a terminal: if you want to enable a mode +on a terminal that is already active (for example, while in +@code{tty-setup-hook}), explicitly output the necessary escape +sequence using @code{send-string-to-terminal} in addition to adding +the sequence to @code{tty-mode-set-strings}. +@item tty-mode-reset-strings +When present, a list of strings that undo the effects of the strings +in @code{tty-mode-set-strings}. Emacs emits these strings when +exiting, deleting a terminal, or suspending itself. @end table @node Frame Titles === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-04-11 06:43:20 +0000 +++ etc/ChangeLog 2014-04-17 07:54:23 +0000 @@ -1,3 +1,7 @@ +2014-04-17 Daniel Colascione + + * NEWS: Mention bracketed paste support. + 2014-04-11 Glenn Morris * refcards/cs-dired-ref.tex, refcards/cs-refcard.tex: === modified file 'etc/NEWS' --- etc/NEWS 2014-04-16 19:43:46 +0000 +++ etc/NEWS 2014-04-17 07:54:23 +0000 @@ -56,6 +56,13 @@ * Editing Changes in Emacs 24.5 +Emacs now supports "bracketed paste mode" when running on a terminal +that supports it. This facility allows Emacs to understand pasted +chunks of text as strings to be inserted instead of interpreting each +character in the pasted text as actual user input, resulting in a +paste experience similar to that under a window system and significant +performance improvements when pasting large amounts of text. + * Changes in Specialized Modes and Packages in Emacs 24.5 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-17 03:58:25 +0000 +++ lisp/ChangeLog 2014-04-17 07:54:23 +0000 @@ -1,3 +1,35 @@ +2014-04-17 Daniel Colascione + + Add support for bracketed paste mode; add infrastructure for + managing terminal mode enabling and disabling automatically. + + * xt-mouse.el: + (xterm-mouse-mode): Simplify. + (xterm-mouse-tracking-enable-sequence) + (xterm-mouse-tracking-disable-sequence): New constants. + (turn-on-xterm-mouse-tracking-on-terminal) + (turn-off-xterm-mouse-tracking-on-terminal): Use + tty-mode-set-strings and tty-mode-reset-strings terminal + parameters instead of random hooks. + (turn-on-xterm-mouse-tracking) + (turn-off-xterm-mouse-tracking): Delete. + + * term/xterm.el (xterm-extra-capabilities): Fix bitrotted comment. + (xterm-paste-ending-sequence): New constant. + (xterm-paste): New command used for bracketed paste support. + + (xterm-modify-other-keys-terminal-list): Delete obsolete variable. + (terminal-init-xterm-bracketed-paste-mode): New function. + (terminal-init-xterm): Call it. + (terminal-init-xterm-modify-other-keys): Use tty-mode-set-strings + and tty-mode-reset-strings instead of random hooks. + (xterm-turn-on-modify-other-keys) + (xterm-turn-off-modify-other-keys) + (xterm-remove-modify-other-keys): Delete obsolete functions. + + * term/screen.el: Rewrite to just use the xterm code. Add + copyright notice. Mention tmux. + 2014-04-17 Ian D (tiny change) * image-mode.el (image-mode-window-put): Also update the property of === modified file 'lisp/term/screen.el' --- lisp/term/screen.el 2012-05-02 11:38:01 +0000 +++ lisp/term/screen.el 2014-04-17 07:54:23 +0000 @@ -1,12 +1,9 @@ -;; Treat a screen terminal similar to an xterm. -(load "term/xterm") - -(declare-function xterm-register-default-colors "xterm" ()) +;;; screen.el --- terminal initialization for screen and tmux -*- lexical-binding: t -*- +;; Copyright (C) 1995, 2001-2014 Free Software Foundation, Inc. (defun terminal-init-screen () "Terminal initialization function for screen." - ;; Use the xterm color initialization code. - (xterm-register-default-colors) - (tty-set-up-initial-frame-faces)) + ;; Treat a screen terminal similar to an xterm. + (tty-run-terminal-initialization (selected-frame) "xterm")) ;; screen.el ends here === modified file 'lisp/term/xterm.el' --- lisp/term/xterm.el 2014-02-20 04:45:19 +0000 +++ lisp/term/xterm.el 2014-04-17 07:54:23 +0000 @@ -43,10 +43,35 @@ :type '(choice (const :tag "No" nil) (const :tag "Check" check) ;; NOTE: If you add entries here, make sure to update - ;; `tocheck-capabilities' in `terminal-init-xterm' as well. + ;; `terminal-init-xterm' as well. (set (const :tag "modifyOtherKeys support" modifyOtherKeys) (const :tag "report background" reportBackground)))) +(defconst xterm-paste-ending-sequence "\e[201~" + "Characters send by the terminal to end a bracketed paste.") + +(defun xterm-paste () + "Handle the start of a terminal paste operation." + (interactive) + (let* ((end-marker-length (length xterm-paste-ending-sequence)) + (pasted-text (with-temp-buffer + (set-buffer-multibyte nil) + (while (not (search-backward + xterm-paste-ending-sequence + (- (point) end-marker-length) t)) + (let ((event (read-event))) + (when (eql event ?\r) + (setf event ?\n)) + (insert event))) + (let ((last-coding-system-used)) + (decode-coding-region + (point-min) (point) + (keyboard-coding-system) t)))) + (interprogram-paste-function (lambda () pasted-text))) + (yank))) + +(define-key global-map [xterm-paste] #'xterm-paste) + (defvar xterm-function-map (let ((map (make-sparse-keymap))) @@ -394,6 +419,11 @@ (define-key map "\e[12~" [f2]) (define-key map "\e[13~" [f3]) (define-key map "\e[14~" [f4]) + + ;; Recognize the start of a bracketed paste sequence. The handler + ;; internally recognizes the end. + (define-key map "\e[200~" [xterm-paste]) + map) "Function key map overrides for xterm.") @@ -463,9 +493,6 @@ map) "Keymap of possible alternative meanings for some keys.") -;; List of terminals for which modify-other-keys has been turned on. -(defvar xterm-modify-other-keys-terminal-list nil) - (defun xterm--report-background-handler () (let ((str "") chr) @@ -595,21 +622,23 @@ (when (memq 'modifyOtherKeys xterm-extra-capabilities) (terminal-init-xterm-modify-other-keys))) + ;; Unconditionally enable bracketed paste mode: terminals that don't + ;; support it just ignore the sequence. + (terminal-init-xterm-bracketed-paste-mode) + (run-hooks 'terminal-init-xterm-hook)) (defun terminal-init-xterm-modify-other-keys () "Terminal initialization for xterm's modifyOtherKeys support." - ;; Make sure that the modifyOtherKeys state is restored when - ;; suspending, resuming and exiting. - (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys) - (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys) - (add-hook 'kill-emacs-hook 'xterm-remove-modify-other-keys) - (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) - ;; Add the selected frame to the list of frames that - ;; need to deal with modify-other-keys. - (push (frame-terminal) - xterm-modify-other-keys-terminal-list) - (xterm-turn-on-modify-other-keys)) + (send-string-to-terminal "\e[>4;1m") + (push "\e[>4m" (terminal-parameter nil 'tty-mode-reset-strings)) + (push "\e[>4;1m" (terminal-parameter nil 'tty-mode-set-strings))) + +(defun terminal-init-xterm-bracketed-paste-mode () + "Terminal initialization for bracketed paste mode." + (send-string-to-terminal "\e[?2004h") + (push "\e[?2004l" (terminal-parameter nil 'tty-mode-reset-strings)) + (push "\e[?2004h" (terminal-parameter nil 'tty-mode-set-strings))) ;; Set up colors, for those versions of xterm that support it. (defvar xterm-standard-colors @@ -727,29 +756,6 @@ ;; right colors, so clear them. (clear-face-cache))) -(defun xterm-turn-on-modify-other-keys () - "Turn the modifyOtherKeys feature of xterm back on." - (let ((terminal (frame-terminal))) - (when (and (terminal-live-p terminal) - (memq terminal xterm-modify-other-keys-terminal-list)) - (send-string-to-terminal "\e[>4;1m" terminal)))) - -(defun xterm-turn-off-modify-other-keys (&optional frame) - "Temporarily turn off the modifyOtherKeys feature of xterm." - (let ((terminal (when frame (frame-terminal frame)))) - (when (and (terminal-live-p terminal) - (memq terminal xterm-modify-other-keys-terminal-list)) - (send-string-to-terminal "\e[>4m" terminal)))) - -(defun xterm-remove-modify-other-keys (&optional terminal) - "Turn off the modifyOtherKeys feature of xterm for good." - (setq terminal (or terminal (frame-terminal))) - (when (and (terminal-live-p terminal) - (memq terminal xterm-modify-other-keys-terminal-list)) - (setq xterm-modify-other-keys-terminal-list - (delq terminal xterm-modify-other-keys-terminal-list)) - (send-string-to-terminal "\e[>4m" terminal))) - (defun xterm-maybe-set-dark-background-mode (redc greenc bluec) ;; Use the heuristic in `frame-set-background-mode' to decide if a ;; frame is dark. === modified file 'lisp/xt-mouse.el' --- lisp/xt-mouse.el 2014-01-01 07:43:34 +0000 +++ lisp/xt-mouse.el 2014-04-17 07:54:23 +0000 @@ -263,36 +263,27 @@ mouse functionality for such clicks is still available by holding down the SHIFT key while pressing the mouse button." :global t :group 'mouse - (let ((do-hook (if xterm-mouse-mode 'add-hook 'remove-hook))) - (funcall do-hook 'terminal-init-xterm-hook - 'turn-on-xterm-mouse-tracking-on-terminal) - (funcall do-hook 'delete-terminal-functions - 'turn-off-xterm-mouse-tracking-on-terminal) - (funcall do-hook 'suspend-tty-functions - 'turn-off-xterm-mouse-tracking-on-terminal) - (funcall do-hook 'resume-tty-functions - 'turn-on-xterm-mouse-tracking-on-terminal) - (funcall do-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) - (funcall do-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking) - (funcall do-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking)) + (funcall (if xterm-mouse-mode 'add-hook 'remove-hook) + 'terminal-init-xterm-hook + 'turn-on-xterm-mouse-tracking-on-terminal) (if xterm-mouse-mode ;; Turn it on (progn (setq mouse-position-function #'xterm-mouse-position-function) - (turn-on-xterm-mouse-tracking)) + (mapc #'turn-on-xterm-mouse-tracking-on-terminal (terminal-list))) ;; Turn it off - (turn-off-xterm-mouse-tracking 'force) + (mapc #'turn-off-xterm-mouse-tracking-on-terminal (terminal-list)) (setq mouse-position-function nil))) -(defun turn-on-xterm-mouse-tracking () - "Enable Emacs mouse tracking in xterm." - (dolist (terminal (terminal-list)) - (turn-on-xterm-mouse-tracking-on-terminal terminal))) +(defconst xterm-mouse-tracking-enable-sequence + "\e[?1000h\e[?1006h" + "Control sequence to enable xterm mouse tracking. +Enables basic tracking, then extended tracking on +terminals that support it.") -(defun turn-off-xterm-mouse-tracking (&optional _force) - "Disable Emacs mouse tracking in xterm." - (dolist (terminal (terminal-list)) - (turn-off-xterm-mouse-tracking-on-terminal terminal))) +(defconst xterm-mouse-tracking-disable-sequence + "\e[?1006l\e[?1000l" + "Reset the modes set by `xterm-mouse-tracking-enable-sequence'.") (defun turn-on-xterm-mouse-tracking-on-terminal (&optional terminal) "Enable xterm mouse tracking on TERMINAL." @@ -302,30 +293,36 @@ (not (string= (terminal-name terminal) "initial_terminal"))) (unless (terminal-parameter terminal 'xterm-mouse-mode) ;; Simulate selecting a terminal by selecting one of its frames + ;; so that we can set the terminal-local `input-decode-map'. (with-selected-frame (car (frames-on-display-list terminal)) (define-key input-decode-map "\e[M" 'xterm-mouse-translate) (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) - (set-terminal-parameter terminal 'xterm-mouse-mode t)) - (send-string-to-terminal "\e[?1000h" terminal) - ;; Request extended mouse support, if available (xterm >= 277). - (send-string-to-terminal "\e[?1006h" terminal))) + (send-string-to-terminal xterm-mouse-tracking-enable-sequence terminal) + (push xterm-mouse-tracking-enable-sequence + (terminal-parameter nil 'tty-mode-set-strings)) + (push xterm-mouse-tracking-disable-sequence + (terminal-parameter nil 'tty-mode-reset-strings)) + (set-terminal-parameter terminal 'xterm-mouse-mode t)))) (defun turn-off-xterm-mouse-tracking-on-terminal (terminal) "Disable xterm mouse tracking on TERMINAL." ;; Only send the disable command to those terminals to which we've already ;; sent the enable command. (when (and (terminal-parameter terminal 'xterm-mouse-mode) - (eq t (terminal-live-p terminal)) - ;; Avoid the initial terminal which is not a termcap device. - ;; FIXME: is there more elegant way to detect the initial terminal? - (not (string= (terminal-name terminal) "initial_terminal"))) + (eq t (terminal-live-p terminal))) ;; We could remove the key-binding and unset the `xterm-mouse-mode' ;; terminal parameter, but it seems less harmful to send this escape ;; command too many times (or to catch an unintended key sequence), than ;; to send it too few times (or to fail to let xterm-mouse events ;; pass by untranslated). - (send-string-to-terminal "\e[?1000l" terminal) - (send-string-to-terminal "\e[?1006l" terminal))) + (send-string-to-terminal xterm-mouse-tracking-disable-sequence terminal) + (setf (terminal-parameter nil 'tty-mode-set-strings) + (remq xterm-mouse-tracking-enable-sequence + (terminal-parameter nil 'tty-mode-set-strings))) + (setf (terminal-parameter nil 'tty-mode-reset-strings) + (remq xterm-mouse-tracking-disable-sequence + (terminal-parameter nil 'tty-mode-reset-strings))) + (set-terminal-parameter terminal 'xterm-mouse-mode nil))) (provide 'xt-mouse) === modified file 'src/ChangeLog' --- src/ChangeLog 2014-04-16 19:43:46 +0000 +++ src/ChangeLog 2014-04-17 07:54:23 +0000 @@ -1,3 +1,12 @@ +2014-04-17 Daniel Colascione + + * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings): New + symbols. + (tty_send_additional_strings): New function. + (tty_set_terminal_modes, tty_reset_terminal_modes): Use it. + (syms_of_term): Intern tty-mode-set-strings and + tty-mode-reset-strings. + 2014-04-16 Stefan Monnier * window.c (save_window_save): Lookup window_point_insertion_type in === modified file 'src/term.c' --- src/term.c 2014-04-16 19:43:46 +0000 +++ src/term.c 2014-04-17 07:54:23 +0000 @@ -131,6 +131,9 @@ static int max_frame_cols; +static Lisp_Object Qtty_mode_set_strings; +static Lisp_Object Qtty_mode_reset_strings; + #ifdef HAVE_GPM @@ -162,6 +165,29 @@ /* Set up termcap modes for Emacs. */ static void +tty_send_additional_strings (struct terminal* terminal, Lisp_Object sym) +{ + Lisp_Object lisp_terminal; + Lisp_Object extra_codes; + struct tty_display_info *tty = terminal->display_info.tty; + + XSETTERMINAL (lisp_terminal, terminal); + for (extra_codes = Fterminal_parameter (lisp_terminal, sym); + CONSP (extra_codes); + extra_codes = XCDR (extra_codes)) + { + Lisp_Object string = XCAR (extra_codes); + if (STRINGP (string)) + { + fwrite (SDATA (string), 1, SBYTES (string), tty->output); + fflush (tty->output); + if (tty->termscript) + fwrite (SDATA (string), 1, SBYTES (string), tty->termscript); + } + } +} + +static void tty_set_terminal_modes (struct terminal *terminal) { struct tty_display_info *tty = terminal->display_info.tty; @@ -184,6 +210,7 @@ OUTPUT_IF (tty, tty->TS_keypad_mode); losecursor (tty); fflush (tty->output); + tty_send_additional_strings (terminal, Qtty_mode_set_strings); } } @@ -196,6 +223,7 @@ if (tty->output) { + tty_send_additional_strings (terminal, Qtty_mode_reset_strings); tty_turn_off_highlight (tty); tty_turn_off_insert (tty); OUTPUT_IF (tty, tty->TS_end_keypad_mode); @@ -4562,6 +4590,9 @@ encode_terminal_src = NULL; encode_terminal_dst = NULL; + DEFSYM (Qtty_mode_set_strings, "tty-mode-set-strings"); + DEFSYM (Qtty_mode_reset_strings, "tty-mode-reset-strings"); + #ifndef MSDOS DEFSYM (Qtty_menu_next_item, "tty-menu-next-item"); DEFSYM (Qtty_menu_prev_item, "tty-menu-prev-item"); ------------------------------------------------------------ revno: 116988 author: Paul Eggert committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 23:40:25 -0700 message: * GNUmakefile: Speed up 'make bootstrap' in fresh checkout. (ORDINARY_GOALS): New macro, which excludes 'bootstrap'. (bootstrap, .PHONY): New rules. * INSTALL.REPO: Document current procedure better. Move copyright notice to just before license notice. diff: === modified file 'ChangeLog' --- ChangeLog 2014-04-17 06:02:38 +0000 +++ ChangeLog 2014-04-17 06:40:25 +0000 @@ -1,5 +1,11 @@ 2014-04-17 Paul Eggert + * GNUmakefile: Speed up 'make bootstrap' in fresh checkout. + (ORDINARY_GOALS): New macro, which excludes 'bootstrap'. + (bootstrap, .PHONY): New rules. + * INSTALL.REPO: Document current procedure better. + Move copyright notice to just before license notice. + * Makefile.in (FRC, force-info): Remove. All uses removed. This hack is no longer needed here now that we can assume GNU Make's .PHONY feature works. === modified file 'GNUmakefile' --- GNUmakefile 2014-01-01 07:43:34 +0000 +++ GNUmakefile 2014-04-17 06:40:25 +0000 @@ -55,7 +55,9 @@ # Once 'configure' exists, run it. # Finally, run the actual 'make'. -default $(filter-out configure Makefile,$(MAKECMDGOALS)): Makefile +ORDINARY_GOALS = $(filter-out configure Makefile bootstrap,$(MAKECMDGOALS)) + +default $(ORDINARY_GOALS): Makefile $(MAKE) -f Makefile $(MAKECMDGOALS) # Execute in sequence, so that multiple user goals don't conflict. .NOTPARALLEL: @@ -72,5 +74,11 @@ ./configure @echo >&2 'Makefile built.' +# 'make bootstrap' in a fresh checkout needn't run 'configure' twice. +bootstrap: Makefile + $(MAKE) -f Makefile all + +.PHONY: bootstrap default $(ORDINARY_GOALS) + endif endif === modified file 'INSTALL.REPO' --- INSTALL.REPO 2014-01-08 23:24:54 +0000 +++ INSTALL.REPO 2014-04-17 06:40:25 +0000 @@ -1,9 +1,10 @@ -Copyright (C) 2002-2014 Free Software Foundation, Inc. -See the end of the file for license conditions. - - Building and Installing Emacs from the Repository +Simply run 'make'. This should work if your files are freshly checked +out from the repository, and if you have the proper tools installed. +If it doesn't work, or if you have special build requirements, the +following information may be helpful. + Building Emacs from the source-code repository requires some tools that are not needed when building from a release. You will need: @@ -14,48 +15,32 @@ makeinfo - not strictly necessary, but highly recommended, so that you can build the manuals. -The `autogen.sh' script can help you figure out if you have the -necessary tools. - -The first time you build, there are a couple of extra steps. -First, generate the `configure' script and some related files: +To use the autotools, run the following shell command to generate the +'configure' script and some related files: $ ./autogen.sh -(or you can just run `autoreconf -i -I m4'). - -You can then configure your build (use `./configure --help' to see -options you can set): +You can then configure your build as follows: $ ./configure -If you want later builds to go faster, at the expense of sometimes -doing the wrong thing if you update the build procedure, you can -invoke "./configure -C" instead. - -Some of the files that are included in the Emacs tarball, such as -byte-compiled Lisp files, are not stored in the repository. Therefore, to -build from the repository you must run "make bootstrap" instead of -just "make": - - $ make bootstrap - -Normally, it is not necessary to use "make bootstrap" after every -update from the repository. "make" should work in 90% of the cases and be -much quicker. +The 'configure' script has many options; run './configure --help' to +see them. For example, if you want later builds to go faster, albeit +sometimes doing the wrong thing if you update the build procedure, you +can invoke './configure -C'. After configuring, build Emacs as follows: $ make -(If you want to install the Emacs binary, type "make install" instead -of "make" in the last command.) +If you want to install Emacs, type 'make install' instead of 'make' in +the last command. -Occasionally the file "lisp/loaddefs.el" (and similar automatically -generated files, such as esh-groups.el, and *-loaddefs.el in some -subdirectories of lisp/, e.g. mh-e/ and calendar/) will need to be +Occasionally the file 'lisp/loaddefs.el' (and similar automatically +generated files, such as 'esh-groups.el', and '*-loaddefs.el' in some +subdirectories of 'lisp/', e.g., 'mh-e/' and 'calendar/') will need to be updated to reflect new autoloaded functions. If you see errors (rather than warnings) about undefined lisp functions during compilation, that may be the reason. Finally, sometimes there can be build failures -related to *loaddefs.el (e.g. "required feature `esh-groups' was not +related to '*loaddefs.el' (e.g., "required feature `esh-groups' was not provided"). In that case, follow the instructions below. To update loaddefs.el (and similar files), do: @@ -63,13 +48,13 @@ $ cd lisp $ make autoloads -If either of the above partial procedures fails, try "make bootstrap". -If CPU time is not an issue, the most thorough way to rebuild, and -avoid any spurious problems, is always to use this method. +If either of the above partial procedures fails, try 'make bootstrap'. +If CPU time is not an issue, 'make bootstrap' is the most thorough way +to rebuild, and avoid any spurious problems. -Users of non-Posix systems (MS-Windows etc.) should run the -platform-specific configuration scripts (nt/configure.bat, config.bat, -etc.) before "make bootstrap" or "make"; the rest of the procedure is +Users of non-Posix systems (MS-Windows, etc.) should run the +platform-specific configuration scripts ('nt/configure.bat', +'config.bat', etc.) before 'make'; the rest of the procedure is applicable to those systems as well. Because the repository version of Emacs is a work in progress, it will @@ -82,6 +67,8 @@ +Copyright (C) 2002-2014 Free Software Foundation, Inc. + This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify ------------------------------------------------------------ revno: 116987 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 23:02:38 -0700 message: * Makefile.in (force-info): Remove. All uses removed. This hack is no longer needed here now that we can assume GNU Make's .PHONY feature works. (bootstrap): No need to make 'info', since 'all' now implies 'info'. diff: === modified file 'ChangeLog' --- ChangeLog 2014-04-17 02:05:48 +0000 +++ ChangeLog 2014-04-17 06:02:38 +0000 @@ -1,8 +1,9 @@ 2014-04-17 Paul Eggert - * Makefile.in (FRC): Remove. + * Makefile.in (FRC, force-info): Remove. All uses removed. This hack is no longer needed here now that we can assume GNU Make's .PHONY feature works. + (bootstrap): No need to make 'info', since 'all' now implies 'info'. 2014-04-16 Eli Zaretskii === modified file 'Makefile.in' --- Makefile.in 2014-04-17 02:05:48 +0000 +++ Makefile.in 2014-04-17 06:02:38 +0000 @@ -951,7 +951,7 @@ t=$@; IFS=-; set $$t; IFS=; cd doc/$$1 && $(MAKE) $(MFLAGS) $$2 .PHONY: $(DOCS) docs pdf ps -.PHONY: info dvi dist check html info-real info-dir force-info check-info +.PHONY: info dvi dist check html info-real info-dir check-info ## TODO add etc/refcards. docs: $(DOCS) @@ -1032,7 +1032,6 @@ uninstall-ps: $(UNINSTALL_PS) -force-info: # Note that man/Makefile knows how to put the info files in $(srcdir), # so we can do ok running make in the build dir. # This used to have a clause that exited with an error if MAKEINFO = no. @@ -1044,7 +1043,7 @@ # would require changing every rule in doc/ that builds an info file, # and it's not worth it. This case is only relevant if you download a # release, then change the .texi files. -info: force-info +info: @if test "$(HAVE_MAKEINFO)" = "no"; then \ echo "Configured --without-makeinfo, not building manuals" ; \ else \ @@ -1089,7 +1088,7 @@ bootstrap: bootstrap-clean cd $(srcdir) && ./autogen.sh $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile - $(MAKE) $(MFLAGS) info all + $(MAKE) $(MFLAGS) all .PHONY: check-declare ------------------------------------------------------------ revno: 116986 author: Ian D committer: Stefan Monnier branch nick: trunk timestamp: Wed 2014-04-16 23:58:25 -0400 message: * lisp/image-mode.el (image-mode-window-put): Also update the property of the "default window". * lisp/doc-view.el (doc-view-new-window-function): If no window exists, move to the last known page. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-16 19:43:46 +0000 +++ lisp/ChangeLog 2014-04-17 03:58:25 +0000 @@ -1,3 +1,10 @@ +2014-04-17 Ian D (tiny change) + + * image-mode.el (image-mode-window-put): Also update the property of + the "default window". + * doc-view.el (doc-view-new-window-function): If no window + exists, move to the last known page. + 2014-04-16 Stefan Monnier * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2014-04-14 21:01:37 +0000 +++ lisp/doc-view.el 2014-04-17 03:58:25 +0000 @@ -336,7 +336,7 @@ ;; Don't do it if there's a conversion is running, since in that case, it ;; will be done later. (with-selected-window (car winprops) - (doc-view-goto-page 1))))) + (doc-view-goto-page (image-mode-window-get 'page t)))))) (defvar-local doc-view--current-files nil "Only used internally.") === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2014-01-01 07:43:34 +0000 +++ lisp/image-mode.el 2014-04-17 03:58:25 +0000 @@ -90,6 +90,9 @@ (defun image-mode-window-put (prop val &optional winprops) (unless (consp winprops) (setq winprops (image-mode-winprops winprops))) + (setcdr (assq t image-mode-winprops-alist) + (cons (cons prop val) + (delq (assq prop (cdr winprops)) (cdr winprops)))) (setcdr winprops (cons (cons prop val) (delq (assq prop (cdr winprops)) (cdr winprops))))) ------------------------------------------------------------ revno: 116985 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 19:05:48 -0700 message: * Makefile.in (FRC): Remove. All uses removed. This hack is no longer needed here now that we can assume GNU Make's .PHONY feature works. diff: === modified file 'ChangeLog' --- ChangeLog 2014-04-16 19:43:46 +0000 +++ ChangeLog 2014-04-17 02:05:48 +0000 @@ -1,3 +1,9 @@ +2014-04-17 Paul Eggert + + * Makefile.in (FRC): Remove. + All uses removed. This hack is no longer needed here + now that we can assume GNU Make's .PHONY feature works. + 2014-04-16 Eli Zaretskii * config.bat: Update for Emacs 24.4. === modified file 'Makefile.in' --- Makefile.in 2014-03-27 19:41:57 +0000 +++ Makefile.in 2014-04-17 02:05:48 +0000 @@ -290,7 +290,7 @@ all: ${SUBDIR} info -.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 FRC +.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g' @@ -298,7 +298,7 @@ # See comments in configure.ac for why it is done this way, as opposed # to just letting configure generate epaths.h from epaths.in in a # similar way to how Makefile is made from Makefile.in. -epaths-force: FRC +epaths-force: @(standardlisppath=`echo "${standardlisppath}" | ${removenullpaths}` ; \ locallisppath=`echo "${locallisppath}" | ${removenullpaths}` ; \ buildlisppath=`echo "${buildlisppath}" | ${removenullpaths}` ; \ @@ -335,7 +335,7 @@ # MS-Windows format (e.g. 'c:/foo/bar'), because temacs is a MinGW # program that doesn't support MSYS-style paths (e.g. '/c/foo/bar' or # '/foo/bar'). -epaths-force-w32: FRC +epaths-force-w32: @(w32srcdir=`${srcdir}/build-aux/msys-to-w32 "${srcdir}"`; \ w32prefix=`${srcdir}/build-aux/msys-to-w32 "${prefix}" N`; \ w32prefixpattern=`echo "$${w32prefix}" | ${msys_sed_sh_escape}` ; \ @@ -359,7 +359,7 @@ lisp: src # These targets should be "${SUBDIR} without `src'". -lib lib-src lisp nt: Makefile FRC +lib lib-src lisp nt: Makefile cd $@ && $(MAKE) all $(MFLAGS) \ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' @@ -378,7 +378,7 @@ # This passes an unexpanded $srcdir to src's Makefile, which then # expands it using its own value of srcdir (which points to the # source directory of src/). -src: Makefile FRC +src: Makefile dirstate='.bzr/checkout/dirstate'; \ vcswitness='$$(srcdir)/../'$$dirstate; \ [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \ @@ -390,7 +390,7 @@ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \ VCSWITNESS="$$vcswitness" -blessmail: Makefile src FRC +blessmail: Makefile src cd lib-src && $(MAKE) maybe-blessmail $(MFLAGS) \ MAKE='${MAKE}' archlibdir='$(archlibdir)' @@ -791,8 +791,6 @@ bindir="${bindir}" libexecdir="${libexecdir}" \ archlibdir="${archlibdir}" -FRC: - # ==================== Cleaning up and miscellanea ==================== .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean extraclean @@ -802,7 +800,7 @@ ### normally don't want to recompile. For example, the `mostlyclean' ### target for GCC does not delete `libgcc.a', because recompiling it ### is rarely necessary and takes a lot of time. -mostlyclean: FRC +mostlyclean: cd src && $(MAKE) $(MFLAGS) mostlyclean cd oldXMenu && $(MAKE) $(MFLAGS) mostlyclean cd lwlib && $(MAKE) $(MFLAGS) mostlyclean @@ -822,7 +820,7 @@ ### with them. ### ### Delete `.dvi' files here if they are not part of the distribution. -clean: FRC +clean: -rm -f etc/emacs.tmpdesktop cd src && $(MAKE) $(MFLAGS) clean cd oldXMenu && $(MAKE) $(MFLAGS) clean @@ -849,7 +847,7 @@ top_distclean=\ ${top_bootclean}; \ rm -f config.status config.log~ Makefile stamp-h1 ${SUBDIR_MAKEFILES} -distclean: FRC +distclean: cd src && $(MAKE) $(MFLAGS) distclean cd oldXMenu && $(MAKE) $(MFLAGS) distclean cd lwlib && $(MAKE) $(MFLAGS) distclean @@ -871,7 +869,7 @@ ### `bootstrap-clean' ### Delete everything that can be reconstructed by `make' and that ### needs to be deleted in order to force a bootstrap from a clean state. -bootstrap-clean: FRC +bootstrap-clean: cd src && $(MAKE) $(MFLAGS) bootstrap-clean cd oldXMenu && $(MAKE) $(MFLAGS) maintainer-clean cd lwlib && $(MAKE) $(MFLAGS) maintainer-clean @@ -906,7 +904,7 @@ top_maintainer_clean=\ ${top_distclean}; \ rm -fr autom4te.cache -maintainer-clean: bootstrap-clean FRC +maintainer-clean: bootstrap-clean cd src && $(MAKE) $(MFLAGS) maintainer-clean cd leim && $(MAKE) $(MFLAGS) maintainer-clean cd lisp && $(MAKE) $(MFLAGS) maintainer-clean @@ -1088,7 +1086,7 @@ # * Run autogen.sh. # * Rebuild Makefile, to update the build procedure itself. # * Do the actual build. -bootstrap: bootstrap-clean FRC +bootstrap: bootstrap-clean cd $(srcdir) && ./autogen.sh $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) $(MFLAGS) info all ------------------------------------------------------------ revno: 116984 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 18:35:20 -0700 message: Be consistent about reporting infoclean failures. * doc/emacs/Makefile.in (infoclean): * doc/lispintro/Makefile.in (infoclean): * doc/lispref/Makefile.in (infoclean): * doc/misc/Makefile.in (infoclean): Do not fail merely because the info directory does not exist, but do fail if it exists and can't be cleaned. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-04-16 19:43:46 +0000 +++ doc/emacs/ChangeLog 2014-04-17 01:35:20 +0000 @@ -1,3 +1,9 @@ +2014-04-17 Paul Eggert + + * Makefile.in (infoclean): Be consistent about reporting failures. + Do not fail merely because the info directory does not exist, + but do fail if it exists and can't be cleaned. + 2014-04-16 Eli Zaretskii * display.texi (Cursor Display): Explain better how to customize === modified file 'doc/emacs/Makefile.in' --- doc/emacs/Makefile.in 2014-01-01 07:43:34 +0000 +++ doc/emacs/Makefile.in 2014-04-17 01:35:20 +0000 @@ -199,7 +199,10 @@ ## In the standalone tarfile, the clean rule runs this. infoclean: - -cd $(buildinfodir) && rm -f emacs$(INFO_EXT) emacs$(INFO_EXT)-[1-9] emacs$(INFO_EXT)-[1-9][0-9] + rm -f \ + $(buildinfodir)/emacs$(INFO_EXT) \ + $(buildinfodir)/emacs$(INFO_EXT)-[1-9] \ + $(buildinfodir)/emacs$(INFO_EXT)-[1-9][0-9] maintainer-clean: distclean infoclean === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2014-02-25 03:11:11 +0000 +++ doc/lispintro/ChangeLog 2014-04-17 01:35:20 +0000 @@ -1,3 +1,7 @@ +2014-04-17 Paul Eggert + + * Makefile.in (infoclean): Be consistent about reporting failures. + 2014-02-25 Glenn Morris * emacs-lisp-intro.texi (X11 Colors): Don't use setq with hooks. === modified file 'doc/lispintro/Makefile.in' --- doc/lispintro/Makefile.in 2014-01-01 07:43:34 +0000 +++ doc/lispintro/Makefile.in 2014-04-17 01:35:20 +0000 @@ -116,7 +116,9 @@ rm -f Makefile infoclean: - -cd $(buildinfodir) && rm -f eintr$(INFO_EXT) eintr$(INFO_EXT)-[1-9] + rm -f \ + $(buildinfodir)/eintr$(INFO_EXT) \ + $(buildinfodir)/eintr$(INFO_EXT)-[1-9] maintainer-clean: distclean infoclean === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-04-09 16:58:08 +0000 +++ doc/lispref/ChangeLog 2014-04-17 01:35:20 +0000 @@ -1,3 +1,7 @@ +2014-04-17 Paul Eggert + + * Makefile.in (infoclean): Be consistent about reporting failures. + 2014-04-09 Daniel Colascione * errors.texi (Standard Errors): Document required error === modified file 'doc/lispref/Makefile.in' --- doc/lispref/Makefile.in 2014-01-10 19:40:32 +0000 +++ doc/lispref/Makefile.in 2014-04-17 01:35:20 +0000 @@ -171,7 +171,10 @@ rm -f Makefile infoclean: - -cd $(buildinfodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9] + rm -f \ + $(buildinfodir)/elisp$(INFO_EXT) \ + $(buildinfodir)/elisp$(INFO_EXT)-[1-9] \ + $(buildinfodir)/elisp$(INFO_EXT)-[1-9][0-9] maintainer-clean: distclean infoclean === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-03-27 18:22:27 +0000 +++ doc/misc/ChangeLog 2014-04-17 01:35:20 +0000 @@ -1,3 +1,7 @@ +2014-04-17 Paul Eggert + + * Makefile.in (infoclean): Be consistent about reporting failures. + 2014-03-27 Glenn Morris * Makefile.in (INFO_COMMON): Add vhdl-mode. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2014-03-27 18:22:27 +0000 +++ doc/misc/Makefile.in 2014-04-17 01:35:20 +0000 @@ -882,9 +882,12 @@ ## buildinfodir is relative to srcdir. infoclean: - cd $(buildinfodir); for file in $(INFO_TARGETS); do \ + for file in $(INFO_TARGETS); do \ file=`echo $${file} | sed 's/\.info$$//'`${INFO_EXT}; \ - rm -f $${file} $${file}-[1-9] $${file}-[1-9][0-9]; \ + rm -f \ + $(buildinfodir)/$${file} \ + $(buildinfodir)/$${file}-[1-9] \ + $(buildinfodir)/$${file}-[1-9][0-9]; \ done maintainer-clean: distclean infoclean ------------------------------------------------------------ revno: 116983 [merge] committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 12:43:46 -0700 message: Merge from emacs-24; up to r116973 diff: === modified file 'ChangeLog' --- ChangeLog 2014-04-16 15:16:35 +0000 +++ ChangeLog 2014-04-16 19:43:46 +0000 @@ -1,3 +1,29 @@ +2014-04-16 Eli Zaretskii + + * config.bat: Update for Emacs 24.4. + +2014-04-16 Paul Eggert + + Port to IRIX 6.5 (Bug#9684). + This port requires IRIX cc, as I did not have time to get + undump working with the old GCC on the system I had access to, + but that's better than nothing. + * configure.ac (gl_GCC_VERSION_IFELSE): Remove unused macro + that wouldn't have worked anyway, with IRIX cc. + (emacs_cv_clang, emacs_cv_sanitize_address) + (ns_osx_have_104, ns_osx_have_105): + Don't assume '#error' makes the compiler fail, + as this doesn't work with IRIX cc. + (CFLAGS, LIBS): Don't let the GnuTLS results infect later 'configure' + checks. This runs afoul of an IRIX configuration where GnuTLS is + in an optional library that also contains getdelim, and causes + a later 'configure' to incorrectly think getdelim is supported. + +2014-04-16 Eli Zaretskii + + * configure.ac (LN_S_FILEONLY, LN_S): Use "/bin/ln" on MinGW, to + ensure the MSYS ln.exe is invoked. + 2014-04-15 Paul Eggert Remove DATA_SEG_BITS. === modified file 'config.bat' --- config.bat 2014-01-01 08:31:29 +0000 +++ config.bat 2014-04-16 13:27:28 +0000 @@ -264,8 +264,14 @@ Rem Rename files like djtar on plain DOS filesystem would. If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h +If Exist byteswap.in.h update byteswap.in.h byteswap.in-h +If Exist dirent.in.h update dirent.in.h dirent.in-h +If Exist errno.in.h update errno.in.h errno.in-h If Exist execinfo.in.h update execinfo.in.h execinfo.in-h +If Exist fcntl.in.h update fcntl.in.h fcntl.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist inttypes.in.h update inttypes.in.h inttypes.in-h +If Exist stdarg.in.h update stdarg.in.h stdarg.in-h If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h @@ -274,8 +280,11 @@ If Exist stdint.in.h update stdint.in.h stdint.in-h If Exist stdio.in.h update stdio.in.h stdio.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h +If Exist string.in.h update string.in.h string.in-h +If Exist sys_select.in.h update sys_select.in.h sys_select.in-h If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist sys_types.in.h update sys_types.in.h sys_types.in-h +If Exist sys_time.in.h update sys_time.in.h sys_time.in-h If Exist time.in.h update time.in.h time.in-h If Exist unistd.in.h update unistd.in.h unistd.in-h If Exist Makefile.in sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp @@ -294,13 +303,18 @@ sed -f ../msdos/sedlisp.inp < Makefile.in > Makefile cd .. rem ---------------------------------------------------------------------- -If not Exist leim\quail\latin-pre.el goto maindir Echo Configuring the leim directory... cd leim sed -f ../msdos/sedleim.inp < Makefile.in > Makefile cd .. rem ---------------------------------------------------------------------- -:maindir +If Not Exist admin\unidata goto noadmin +Echo Configuring the admin/unidata directory... +cd admin\unidata +sed -f ../../msdos/sedadmin.inp < Makefile.in > Makefile +cd ..\.. +:noadmin +rem ---------------------------------------------------------------------- Echo Configuring the main directory... If Exist .dir-locals.el update .dir-locals.el _dir-locals.el If Exist src\.dbxinit update src/.dbxinit src/_dbxinit === modified file 'configure.ac' --- configure.ac 2014-04-16 15:16:35 +0000 +++ configure.ac 2014-04-16 19:43:46 +0000 @@ -791,30 +791,12 @@ fi fi) -# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) -# ------------------------------------------------ -# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. -# Otherwise, run RUN-IF-NOT-FOUND. -AC_DEFUN([gl_GCC_VERSION_IFELSE], - [AC_PREPROC_IFELSE( - [AC_LANG_PROGRAM( - [[ -#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__) -/* ok */ -#else -# error "your version of gcc is older than $1.$2" -#endif - ]]), - ], [$3], [$4]) - ] -) - # clang is unduly picky about some things. AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ #ifndef __clang__ - #error "not clang" + error "not clang"; #endif ]])], [emacs_cv_clang=yes], @@ -950,11 +932,21 @@ LN_S_FILEONLY='cp -p' +dnl On MinGW, ensure we will call the MSYS /bin/ln.exe, not some +dnl random program in the current directory. if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then - LN_S_FILEONLY='ln -s' + if test "$opsys" = "mingw32"; then + LN_S_FILEONLY='/bin/ln -s' + else + LN_S_FILEONLY='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then - LN_S_FILEONLY=ln + if test "$opsys" = "mingw32"; then + LN_S_FILEONLY=/bin/ln + else + LN_S_FILEONLY=ln + fi fi fi @@ -976,7 +968,7 @@ dnl See http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00475.html dnl for more details. if test "$opsys" = "mingw32"; then - LN_S="ln" + LN_S="/bin/ln" fi AC_PATH_PROG(INSTALL_INFO, install-info, :, @@ -1116,7 +1108,7 @@ #endif #if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer) #else - #error "Addresses are not sanitized." + error "Addresses are not sanitized."; #endif ]])], [emacs_cv_sanitize_address=yes], @@ -1712,7 +1704,7 @@ #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 ; /* OK */ #else -#error "OSX 10.4 or newer required" + error "OSX 10.4 or newer required"; #endif #endif ])], @@ -1730,7 +1722,7 @@ #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 ; /* OK */ #else -#error "OSX 10.5 not found" + error "OSX 10.5 not found"; #endif #endif ])], @@ -2515,9 +2507,6 @@ # Windows loads GnuTLS dynamically if test "${opsys}" = "mingw32"; then LIBGNUTLS_LIBS= - else - CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" - LIBS="$LIBGNUTLS_LIBS $LIBS" fi fi === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-04-07 21:19:31 +0000 +++ doc/emacs/ChangeLog 2014-04-16 19:43:46 +0000 @@ -1,3 +1,8 @@ +2014-04-16 Eli Zaretskii + + * display.texi (Cursor Display): Explain better how to customize + 'blink-cursor-blinks'. + 2014-04-07 Glenn Morris * trouble.texi (Checklist): Dribble files may contain passwords. === modified file 'doc/emacs/display.texi' --- doc/emacs/display.texi 2014-02-07 07:18:02 +0000 +++ doc/emacs/display.texi 2014-04-13 07:49:23 +0000 @@ -1482,18 +1482,27 @@ @vindex blink-cursor-mode @vindex blink-cursor-blinks @vindex blink-cursor-alist - By default, the cursor stops blinking after 10 blinks. This can be -changed by customizing the variable @code{blink-cursor-blinks}. To -disable cursor blinking altogether, change the variable -@code{blink-cursor-mode} to @code{nil} (@pxref{Easy Customization}), -or add the line @code{(blink-cursor-mode 0)} to your init file. -Alternatively, you can change how the cursor looks when it ``blinks -off'' by customizing the list variable @code{blink-cursor-alist}. -Each element in the list should have the form @code{(@var{on-type} -. @var{off-type})}; this means that if the cursor is displayed as -@var{on-type} when it blinks on (where @var{on-type} is one of the -cursor types described above), then it is displayed as @var{off-type} -when it blinks off. + By default, the cursor stops blinking after 10 blinks, if Emacs does +not get any input during that time; any input event restarts the +count. You can customize the variable @code{blink-cursor-blinks} to +control that: its value says how many times to blink without input +before stopping. Setting that variable to a zero or negative value +will make the cursor blink forever. To disable cursor blinking +altogether, change the variable @code{blink-cursor-mode} to @code{nil} +(@pxref{Easy Customization}), or add the line + +@lisp + (blink-cursor-mode 0) +@end lisp + +@noindent +to your init file. Alternatively, you can change how the cursor +looks when it ``blinks off'' by customizing the list variable +@code{blink-cursor-alist}. Each element in the list should have the +form @code{(@var{on-type} . @var{off-type})}; this means that if the +cursor is displayed as @var{on-type} when it blinks on (where +@var{on-type} is one of the cursor types described above), then it is +displayed as @var{off-type} when it blinks off. @vindex x-stretch-cursor @cindex wide block cursor === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2014-03-18 01:19:03 +0000 +++ doc/lispref/display.texi 2014-04-15 13:21:18 +0000 @@ -1475,8 +1475,10 @@ Since more than one overlay can specify a property value for the same character, Emacs lets you specify a priority value of each -overlay. You should not make assumptions about which overlay will -prevail when there is a conflict and they have the same priority. +overlay. In case two overlays have the same priority value, and one +is nested in the other, then the inner one will have priority over the +outer one. If neither is nested in the other then you should not make +assumptions about which overlay will prevail. These functions read and set the properties of an overlay: @@ -1507,9 +1509,9 @@ @table @code @item priority @kindex priority @r{(overlay property)} -This property's value (which should be a non-negative integer) -determines the priority of the overlay. No priority, or @code{nil}, -means zero. +This property's value determines the priority of the overlay. No priority, or +@code{nil}, means zero. A non-nil and non-integer value has +undefined behavior. The priority matters when two or more overlays cover the same character and both specify the same property; the one whose @@ -1706,11 +1708,12 @@ @node Finding Overlays @subsection Searching for Overlays -@defun overlays-at pos -This function returns a list of all the overlays that cover the -character at position @var{pos} in the current buffer. The list is in -no particular order. An overlay contains position @var{pos} if it -begins at or before @var{pos}, and ends after @var{pos}. +@defun overlays-at pos &optional sorted +This function returns a list of all the overlays that cover the character at +position @var{pos} in the current buffer. If @var{sorted} is non-nil, the list +is in decreasing order of priority, otherwise it is in no particular order. +An overlay contains position @var{pos} if it begins at or before @var{pos}, and +ends after @var{pos}. To illustrate usage, here is a Lisp function that returns a list of the overlays that specify property @var{prop} for the character at point: === modified file 'etc/NEWS' --- etc/NEWS 2014-04-16 15:28:06 +0000 +++ etc/NEWS 2014-04-16 19:43:46 +0000 @@ -1291,6 +1291,8 @@ * Lisp Changes in Emacs 24.4 +** overlays-at can optionally sort its result by priority. + +++ ** The second argument of `eval' can now specify a lexical environment. === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2014-03-22 23:08:41 +0000 +++ lib-src/ChangeLog 2014-04-16 19:43:46 +0000 @@ -1,3 +1,8 @@ +2014-04-16 Eli Zaretskii + + * update-game-score.c (write_scores): Condition fchmod call on + DOS_NT, not WINDOWSNT. + 2014-03-22 Glenn Morris * Makefile.in (etags_deps, etags_args): New, to reduce duplication. === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2014-01-22 19:38:31 +0000 +++ lib-src/update-game-score.c 2014-04-16 13:27:28 +0000 @@ -443,7 +443,7 @@ fd = mkostemp (tempfile, 0); if (fd < 0) return -1; -#ifndef WINDOWSNT +#ifndef DOS_NT if (fchmod (fd, 0644) != 0) return -1; #endif @@ -459,7 +459,7 @@ return -1; if (rename (tempfile, filename) != 0) return -1; -#ifdef WINDOWSNT +#ifdef DOS_NT if (chmod (filename, 0644) < 0) return -1; #endif === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-16 10:03:38 +0000 +++ lisp/ChangeLog 2014-04-16 19:43:46 +0000 @@ -1,3 +1,63 @@ +2014-04-16 Stefan Monnier + + * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in + here-documents (bug#17262). + +2014-04-16 Eli Zaretskii + + * term/pc-win.el (x-list-fonts, x-get-selection-value): + Provide doc strings, as required by snarf-documentation. + +2014-04-16 Stefan Monnier + + * ps-def.el (ps-generate-postscript-with-faces1): Use the new `sorted' + arg of overlays-at. Use `invisible-p'. + + * obsolete/lucid.el (extent-at): + * htmlfontify.el (hfy-overlay-props-at): Use the new `sorted' arg of + overlays-at. + (hfy-fontify-buffer): Remove unused var `orig-ovls'. + +2014-04-16 João Távora + + * net/shr.el (shr-expand-url): Use `expand-file-name' for relative + links. (Bug#17217). + +2014-04-16 YAMAMOTO Mitsuharu + + * vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer): + Use mapc to loop over a vector. (Bug#17257). + +2014-04-16 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous + patch, there are new problems with file names containing spaces. + Get rid of backticks. (Bug#17238) + +2014-04-16 João Távora + + * elec-pair.el (electric-pair--syntax-ppss): Simplify and fix + possible bug. + +2014-04-16 Eli Zaretskii + + * frame.el (blink-cursor-blinks, blink-cursor-blinks-done): Doc fixes. + (blink-cursor-mode): Mention customization variables and the + effect of 'blink-cursor-blinks'. + +2014-04-16 Barry O'Reilly + + * simple.el (undo): Prevent insertion of identity mapping into + undo-equiv-table so as undo-only does not inf loop in the presence + of consecutive nils in undo list. + +2014-04-16 Matthias Dahl + + * faces.el (make-face): Deprecate optional argument as it is no + longer needed/used since the conditional X resources handling + has been pushed down to make-face-x-resource-internal itself. + (make-empty-face): Don't pass optional argument to make-face. + 2014-04-16 Karl Fogel * savehist.el (savehist-save): Remove workaround for a read-passwd === modified file 'lisp/elec-pair.el' --- lisp/elec-pair.el 2014-04-11 06:43:20 +0000 +++ lisp/elec-pair.el 2014-04-16 19:43:46 +0000 @@ -226,10 +226,9 @@ when to fallback to `parse-partial-sexp'." (let* ((pos (or pos (point))) (where (or where '(string comment))) - (quick-ppss (syntax-ppss)) - (quick-ppss-at-pos (syntax-ppss pos)) - (in-string (and (nth 3 quick-ppss-at-pos) (memq 'string where))) - (in-comment (and (nth 4 quick-ppss-at-pos) (memq 'comment where))) + (quick-ppss (syntax-ppss pos)) + (in-string (and (nth 3 quick-ppss) (memq 'string where))) + (in-comment (and (nth 4 quick-ppss) (memq 'comment where))) (s-or-c-start (cond (in-string (1+ (nth 8 quick-ppss))) (in-comment @@ -243,7 +242,7 @@ ;; HACK! cc-mode apparently has some `syntax-ppss' bugs (if (memq major-mode '(c-mode c++ mode)) (parse-partial-sexp (point-min) pos) - quick-ppss-at-pos)))) + quick-ppss)))) ;; Balancing means controlling pairing and skipping of parentheses ;; so that, if possible, the buffer ends up at least as balanced as === modified file 'lisp/frame.el' --- lisp/frame.el 2014-03-23 22:11:59 +0000 +++ lisp/frame.el 2014-04-13 07:49:23 +0000 @@ -1722,14 +1722,14 @@ :group 'cursor) (defcustom blink-cursor-blinks 10 - "How many times to blink before using a solid cursor on NS and X. + "How many times to blink before using a solid cursor on NS, X, and MS-Windows. Use 0 or negative value to blink forever." :version "24.4" :type 'integer :group 'cursor) (defvar blink-cursor-blinks-done 1 - "Number of blinks done since we started blinking on NS and X") + "Number of blinks done since we started blinking on NS, X, and MS-Windows.") (defvar blink-cursor-idle-timer nil "Timer started after `blink-cursor-delay' seconds of Emacs idle time. @@ -1807,6 +1807,12 @@ positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. +If the value of `blink-cursor-blinks' is positive (10 by default), +the cursor stops blinking after that number of blinks, if Emacs +gets no input during that time. + +See also `blink-cursor-interval' and `blink-cursor-delay'. + This command is effective only on graphical frames. On text-only terminals, cursor blinking is controlled by the terminal." :init-value (not (or noninteractive === modified file 'lisp/htmlfontify.el' --- lisp/htmlfontify.el 2014-03-04 03:18:55 +0000 +++ lisp/htmlfontify.el 2014-04-15 13:21:18 +0000 @@ -1328,9 +1328,7 @@ (defun hfy-overlay-props-at (p) "Grab overlay properties at point P. The plists are returned in descending priority order." - (sort (mapcar #'overlay-properties (overlays-at p)) - (lambda (A B) (> (or (cadr (memq 'priority A)) 0) ;FIXME: plist-get? - (or (cadr (memq 'priority B)) 0))))) + (mapcar #'overlay-properties (overlays-at p 'sorted))) ;; construct an assoc of (face-name . (css-name . "{ css-style }")) elements: (defun hfy-compile-stylesheet () @@ -1642,7 +1640,6 @@ (css-map nil) (invis-ranges nil) (rovl nil) - (orig-ovls (overlays-in (point-min) (point-max))) (rmin (when mark-active (region-beginning))) (rmax (when mark-active (region-end ))) ) (when (and mark-active @@ -1664,12 +1661,6 @@ (set-buffer html-buffer) ;; rip out props that could interfere with our htmlization of the buffer: (remove-text-properties (point-min) (point-max) hfy-ignored-properties) - ;; Apply overlay invisible spec - (setq orig-ovls - (sort orig-ovls - (lambda (A B) - (> (or (cadr (memq 'priority (overlay-properties A))) 0) - (or (cadr (memq 'priority (overlay-properties B))) 0))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; at this point, html-buffer retains the fontification of the parent: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2014-03-05 18:44:58 +0000 +++ lisp/net/shr.el 2014-04-14 22:01:54 +0000 @@ -610,7 +610,7 @@ (concat (nth 3 base) url)) (t ;; Totally relative. - (concat (car base) (cadr base) url)))) + (concat (car base) (expand-file-name url (cadr base)))))) (defun shr-ensure-newline () (unless (zerop (current-column)) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2014-04-11 12:59:36 +0000 +++ lisp/net/tramp-sh.el 2014-04-13 10:31:48 +0000 @@ -950,15 +950,15 @@ (tramp-message v 4 "Finding true name for `%s'" filename) (cond ;; Use GNU readlink --canonicalize-missing where available. - ;; We must quote the file name twice due to the backticks. ((tramp-get-remote-readlink v) - (setq result - (tramp-send-command-and-read - v - (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\"" - (tramp-get-remote-readlink v) - (tramp-shell-quote-argument - (tramp-shell-quote-argument localname)))))) + (tramp-send-command-and-check + v + (format "%s --canonicalize-missing %s" + (tramp-get-remote-readlink v) + (tramp-shell-quote-argument localname))) + (with-current-buffer (tramp-get-connection-buffer v) + (goto-char (point-min)) + (setq result (buffer-substring (point-min) (point-at-eol))))) ;; Use Perl implementation. ((and (tramp-get-remote-perl v) === modified file 'lisp/nxml/nxml-mode.el' --- lisp/nxml/nxml-mode.el 2014-03-21 06:56:55 +0000 +++ lisp/nxml/nxml-mode.el 2014-04-16 15:28:26 +0000 @@ -872,7 +872,7 @@ (defun nxml-fontify-matcher (bound) "Called as font-lock keyword matcher." - + (syntax-propertize bound) (unless nxml-degraded (nxml-debug-change "nxml-fontify-matcher" (point) bound) === modified file 'lisp/nxml/xmltok.el' --- lisp/nxml/xmltok.el 2014-03-21 06:56:55 +0000 +++ lisp/nxml/xmltok.el 2014-04-16 15:28:26 +0000 @@ -750,7 +750,8 @@ ;; Need do this after the goto-char because ;; marked error should just apply to + ------------------------------------------------------------ revno: 116982 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 08:28:06 -0700 message: Add a NEWS entry for IRIX. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-04-09 13:21:30 +0000 +++ etc/NEWS 2014-04-16 15:28:06 +0000 @@ -27,6 +27,13 @@ +++ ** Building Emacs now requires GNU make. +** By default, Emacs no longer works on IRIX. We expect that Emacs +users are not affected by this, as SGI stopped supporting IRIX in +December 2013. If you are affected, please send a bug report. You +should be able to work around the problem either by porting the Emacs +undumping code to GCC under IRIX, or by configuring --with-wide-int, +or by sticking with Emacs 24.4. + * Startup Changes in Emacs 24.5 ------------------------------------------------------------ revno: 116981 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-04-16 08:16:35 -0700 message: Remove DATA_SEG_BITS. The DATA_SEG_BITS hack was needed for older 32 bit platforms. As a result of this change, Emacs won't work on IRIX 6.5 with IRIX cc, but that platform is so old that SGI itself stopped supporting it in December 2013. If you still need Emacs on IRIX, please either compile with GCC and port the undumping code, or run './configure --with-wide-int'. * configure.ac (DATA_SEG_BITS): Remove. All uses removed. * src/alloc.c (gdb_make_enums_visible): Update to match lisp.h. * src/lisp.h (GCTYPEBITS): Move definition up, and switch to the DEFINE_GDB_SYMBOL_START way to define it. (NONPOINTER_BITS): New macro. (EMACS_INT): Use it. [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting the problem and/or configuring --with-wide-int. (USE_LSB_TAG): Simplify, based on above changes. (gdb_DATA_SEG_BITS): Remove. All uses removed. * src/vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed. diff: === modified file 'ChangeLog' --- ChangeLog 2014-04-14 05:35:45 +0000 +++ ChangeLog 2014-04-16 15:16:35 +0000 @@ -1,3 +1,8 @@ +2014-04-15 Paul Eggert + + Remove DATA_SEG_BITS. + * configure.ac (DATA_SEG_BITS): Remove. All uses removed. + 2014-04-14 Paul Eggert * autogen.sh: Use autoreconf's -f option (Bug#17258). === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2014-04-14 05:23:31 +0000 +++ admin/CPP-DEFINES 2014-04-16 15:16:35 +0000 @@ -86,7 +86,6 @@ BROKEN_GET_CURRENT_DIR_NAME BROKEN_NON_BLOCKING_CONNECT BROKEN_PTY_READ_AFTER_EAGAIN -DATA_SEG_BITS DEFAULT_SOUND_DEVICE DEVICE_SEP DIRECTORY_SEP === modified file 'configure.ac' --- configure.ac 2014-04-14 05:23:31 +0000 +++ configure.ac 2014-04-16 15:16:35 +0000 @@ -4252,28 +4252,6 @@ esac -dnl Used in lisp.h, emacs.c, vm-limit.c -dnl NEWS.18 describes this as "a number which contains -dnl the high bits to be inclusive or'ed with pointers that are unpacked." -AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers -stored in a Lisp_Object.]) -dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT. - -case $opsys in - aix*) - dnl This works with 32-bit executables; Emacs doesn't support 64-bit. - AC_DEFINE(DATA_SEG_BITS, [0x20000000]) - ;; - hpux*) - dnl The data segment on this machine always starts at address 0x40000000. - AC_DEFINE(DATA_SEG_BITS, [0x40000000]) - ;; - irix6-5) - AC_DEFINE(DATA_SEG_BITS, [0x10000000]) - ;; -esac - - AH_TEMPLATE(TAB3, [Undocumented.]) case $opsys in === modified file 'etc/emacs-buffer.gdb' --- etc/emacs-buffer.gdb 2014-01-01 07:43:34 +0000 +++ etc/emacs-buffer.gdb 2014-04-16 15:16:35 +0000 @@ -79,7 +79,7 @@ define ygetptr set $ptr = $arg0 - set $ptr = ((CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK) | DATA_SEG_BITS + set $ptr = (CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK end define ybuffer-list === modified file 'src/.gdbinit' --- src/.gdbinit 2014-01-29 18:17:20 +0000 +++ src/.gdbinit 2014-04-16 15:16:35 +0000 @@ -49,7 +49,7 @@ else set $bugfix = $arg0 end - set $ptr = ($bugfix & VALMASK) | DATA_SEG_BITS + set $ptr = $bugfix & VALMASK end define xgetint @@ -1093,8 +1093,8 @@ end define xcoding - set $tmp = (struct Lisp_Hash_Table *) ((Vcoding_system_hash_table & VALMASK) | DATA_SEG_BITS) - set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & VALMASK) | DATA_SEG_BITS) + set $tmp = (struct Lisp_Hash_Table *) (Vcoding_system_hash_table & VALMASK) + set $tmp = (struct Lisp_Vector *) ($tmp->key_and_value & VALMASK) set $name = $tmp->contents[$arg0 * 2] print $name pr @@ -1106,8 +1106,8 @@ end define xcharset - set $tmp = (struct Lisp_Hash_Table *) ((Vcharset_hash_table & VALMASK) | DATA_SEG_BITS) - set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & VALMASK) | DATA_SEG_BITS) + set $tmp = (struct Lisp_Hash_Table *) (Vcharset_hash_table & VALMASK) + set $tmp = (struct Lisp_Vector *) ($tmp->key_and_value & VALMASK) p $tmp->contents[charset_table[$arg0].hash_index * 2] pr end === modified file 'src/ChangeLog' --- src/ChangeLog 2014-04-12 19:24:17 +0000 +++ src/ChangeLog 2014-04-16 15:16:35 +0000 @@ -1,3 +1,23 @@ +2014-04-15 Paul Eggert + + Remove DATA_SEG_BITS. + The DATA_SEG_BITS hack was needed for older 32 bit platforms. + As a result of this change, Emacs won't work on IRIX 6.5 with IRIX + cc, but that platform is so old that SGI itself stopped supporting + it in December 2013. If you still need Emacs on IRIX, please + either compile with GCC and port the undumping code, or run + './configure --with-wide-int'. + * alloc.c (gdb_make_enums_visible): Update to match lisp.h. + * lisp.h (GCTYPEBITS): Move definition up, and switch to the + DEFINE_GDB_SYMBOL_START way to define it. + (NONPOINTER_BITS): New macro. + (EMACS_INT): Use it. + [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting + the problem and/or configuring --with-wide-int. + (USE_LSB_TAG): Simplify, based on above changes. + (gdb_DATA_SEG_BITS): Remove. All uses removed. + * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed. + 2014-04-12 Eli Zaretskii * xdisp.c (move_it_by_lines): If a large portion of buffer text is === modified file 'src/alloc.c' --- src/alloc.c 2014-04-08 12:39:40 +0000 +++ src/alloc.c 2014-04-16 15:16:35 +0000 @@ -7130,7 +7130,6 @@ enum char_bits char_bits; enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; - enum enum_USE_LSB_TAG enum_USE_LSB_TAG; enum FLOAT_TO_STRING_BUFSIZE FLOAT_TO_STRING_BUFSIZE; enum Lisp_Bits Lisp_Bits; enum Lisp_Compiled Lisp_Compiled; === modified file 'src/lisp.h' --- src/lisp.h 2014-04-07 20:54:16 +0000 +++ src/lisp.h 2014-04-16 15:16:35 +0000 @@ -61,6 +61,23 @@ /* Number of elements in an array. */ #define ARRAYELTS(arr) (sizeof (arr) / sizeof (arr)[0]) +/* Number of bits in a Lisp_Object tag. */ +DEFINE_GDB_SYMBOL_BEGIN (int, GCTYPEBITS) +#define GCTYPEBITS 3 +DEFINE_GDB_SYMBOL_END (GCTYPEBITS) + +/* The number of bits needed in an EMACS_INT over and above the number + of bits in a pointer. This is 0 on systems where: + 1. We can specify multiple-of-8 alignment on static variables. + 2. We know malloc returns a multiple of 8. */ +#if (defined alignas \ + && (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \ + || defined DARWIN_OS || defined __sun)) +# define NONPOINTER_BITS 0 +#else +# define NONPOINTER_BITS GCTYPEBITS +#endif + /* EMACS_INT - signed integer wide enough to hold an Emacs value EMACS_INT_MAX - maximum value of EMACS_INT; can be used in #if pI - printf length modifier for EMACS_INT @@ -68,16 +85,18 @@ #ifndef EMACS_INT_MAX # if INTPTR_MAX <= 0 # error "INTPTR_MAX misconfigured" -# elif INTPTR_MAX <= INT_MAX && !defined WIDE_EMACS_INT +# elif INTPTR_MAX <= INT_MAX >> NONPOINTER_BITS && !defined WIDE_EMACS_INT typedef int EMACS_INT; typedef unsigned int EMACS_UINT; # define EMACS_INT_MAX INT_MAX # define pI "" -# elif INTPTR_MAX <= LONG_MAX && !defined WIDE_EMACS_INT +# elif INTPTR_MAX <= LONG_MAX >> NONPOINTER_BITS && !defined WIDE_EMACS_INT typedef long int EMACS_INT; typedef unsigned long EMACS_UINT; # define EMACS_INT_MAX LONG_MAX # define pI "l" +/* Check versus LLONG_MAX, not LLONG_MAX >> NONPOINTER_BITS. + In theory this is not safe, but in practice it seems to be OK. */ # elif INTPTR_MAX <= LLONG_MAX typedef long long int EMACS_INT; typedef unsigned long long int EMACS_UINT; @@ -218,12 +237,6 @@ enum Lisp_Bits { - /* Number of bits in a Lisp_Object tag. This can be used in #if, - and for GDB's sake also as a regular symbol. */ - GCTYPEBITS = -#define GCTYPEBITS 3 - GCTYPEBITS, - /* 2**GCTYPEBITS. This must be a macro that expands to a literal integer constant, for MSVC. */ #define GCALIGNMENT 8 @@ -247,31 +260,19 @@ This can be used in #if, e.g., '#if VAL_MAX < UINTPTR_MAX' below. */ #define VAL_MAX (EMACS_INT_MAX >> (GCTYPEBITS - 1)) -/* Unless otherwise specified, use USE_LSB_TAG on systems where: */ -#ifndef USE_LSB_TAG -/* 1. We know malloc returns a multiple of 8. */ -# if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \ - || defined DARWIN_OS || defined __sun) -/* 2. We can specify multiple-of-8 alignment on static variables. */ -# ifdef alignas -/* 3. Pointers-as-ints exceed VAL_MAX. +/* Whether the least-significant bits of an EMACS_INT contain the tag. On hosts where pointers-as-ints do not exceed VAL_MAX, USE_LSB_TAG is: a. unnecessary, because the top bits of an EMACS_INT are unused, and b. slower, because it typically requires extra masking. - So, default USE_LSB_TAG to true only on hosts where it might be useful. */ -# if VAL_MAX < UINTPTR_MAX -# define USE_LSB_TAG true -# endif -# endif -# endif -#endif -#ifdef USE_LSB_TAG -# undef USE_LSB_TAG -enum enum_USE_LSB_TAG { USE_LSB_TAG = true }; -# define USE_LSB_TAG true -#else -enum enum_USE_LSB_TAG { USE_LSB_TAG = false }; -# define USE_LSB_TAG false + So, USE_LSB_TAG is true only on hosts where it might be useful. */ +DEFINE_GDB_SYMBOL_BEGIN (bool, USE_LSB_TAG) +#define USE_LSB_TAG (EMACS_INT_MAX >> GCTYPEBITS < INTPTR_MAX) +DEFINE_GDB_SYMBOL_END (USE_LSB_TAG) + +#if !USE_LSB_TAG && !defined WIDE_EMACS_INT +# error "USE_LSB_TAG not supported on this platform; please report this." \ + "Try 'configure --with-wide-int' to work around the problem." +error !; #endif #ifndef alignas @@ -346,8 +347,7 @@ #define lisp_h_XCONS(a) \ (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons)) #define lisp_h_XHASH(a) XUINT (a) -#define lisp_h_XPNTR(a) \ - ((void *) (intptr_t) ((XLI (a) & VALMASK) | DATA_SEG_BITS)) +#define lisp_h_XPNTR(a) ((void *) (intptr_t) (XLI (a) & VALMASK)) #define lisp_h_XSYMBOL(a) \ (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XUNTAG (a, Lisp_Symbol)) #ifndef GC_CHECK_CONS_LIST @@ -608,18 +608,8 @@ PVEC_FONT /* Should be last because it's used for range checking. */ }; -/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers - which were stored in a Lisp_Object. */ -#ifndef DATA_SEG_BITS -# define DATA_SEG_BITS 0 -#endif -enum { gdb_DATA_SEG_BITS = DATA_SEG_BITS }; -#undef DATA_SEG_BITS - enum More_Lisp_Bits { - DATA_SEG_BITS = gdb_DATA_SEG_BITS, - /* For convenience, we also store the number of elements in these bits. Note that this size is not necessarily the memory-footprint size, but only the number of Lisp_Object fields (that need to be traced by GC). === modified file 'src/vm-limit.c' --- src/vm-limit.c 2014-01-01 07:43:34 +0000 +++ src/vm-limit.c 2014-04-16 15:16:35 +0000 @@ -71,15 +71,6 @@ /* Number of bytes of writable memory we can expect to be able to get. */ static size_t lim_data; -/* Return true if PTR cannot be represented as an Emacs Lisp object. */ -static bool -exceeds_lisp_ptr (void *ptr) -{ - return (! USE_LSB_TAG - && VAL_MAX < UINTPTR_MAX - && ((uintptr_t) ptr & ~DATA_SEG_BITS) >> VALBITS != 0); -} - #ifdef HAVE_GETRLIMIT # ifndef RLIMIT_AS @@ -222,9 +213,6 @@ else if (warnlevel > warned_85 && data_size < five_percent * 18) warnlevel = warned_85; } - - if (exceeds_lisp_ptr (cp)) - (*warn_function) ("Warning: memory in use exceeds lisp pointer size"); } /* Enable memory usage warnings. ------------------------------------------------------------ revno: 116980 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2014-04-16 12:03:38 +0200 message: lisp/ChangeLog: Remove merge marker. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-16 06:46:36 +0000 +++ lisp/ChangeLog 2014-04-16 10:03:38 +0000 @@ -131,7 +131,6 @@ * subr.el (with-silent-modifications): Don't bind deactivate-mark, buffer-file-name, and buffer-file-truename any more. ->>>>>>> MERGE-SOURCE 2014-04-08 Leo Liu Use lexical-binding and require cl-lib. ------------------------------------------------------------ revno: 116979 committer: Karl Fogel branch nick: trunk timestamp: Wed 2014-04-16 14:46:36 +0800 message: * savehist.el (savehist-save): Remove workaround for a read-passwd bug that was fixed before 24.3. Thanks to Juanma Barranquero for noticing that the shim was still present. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-14 21:01:37 +0000 +++ lisp/ChangeLog 2014-04-16 06:46:36 +0000 @@ -1,3 +1,9 @@ +2014-04-16 Karl Fogel + + * savehist.el (savehist-save): Remove workaround for a read-passwd + bug that was fixed before 24.3. Thanks to Juanma Barranquero for + noticing that the shim was still present. + 2014-04-14 Stefan Monnier * doc-view.el (doc-view-set-doc-type): Ignore file name case; add .pps. @@ -125,6 +131,7 @@ * subr.el (with-silent-modifications): Don't bind deactivate-mark, buffer-file-name, and buffer-file-truename any more. +>>>>>>> MERGE-SOURCE 2014-04-08 Leo Liu Use lexical-binding and require cl-lib. === modified file 'lisp/savehist.el' --- lisp/savehist.el 2014-02-21 00:47:17 +0000 +++ lisp/savehist.el 2014-04-16 06:46:36 +0000 @@ -278,13 +278,6 @@ (print-level nil) (print-readably t) (print-quoted t)) - ;; During the 24.3 development, read-passwd had a bug which resulted in - ;; the passwords being saved by savehist. Trim them, retroactively. - ;; This code can be removed after the 24.3 release. - (dolist (sym savehist-minibuffer-history-variables) - (if (and (symbolp sym) (equal (symbol-name sym) "forget-history")) - (setq savehist-minibuffer-history-variables - (delq sym savehist-minibuffer-history-variables)))) ;; Save the minibuffer histories, along with the value of ;; savehist-minibuffer-history-variables itself. (when savehist-save-minibuffer-history ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.