diff --git a/ChangeLog b/ChangeLog index ade71ae09a7..2cd3f8eef85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-10-25 Nali Toja (tiny change) + + * configure.in (HAVE_GNU_MAKE): Respect MAKE env-var. (Bug#9868) + 2011-10-24 Paul Eggert * configure.in (LIB_PTHREAD): Prepend -lpthread to LIBS (Bug#9852) diff --git a/autogen/configure b/autogen/configure index cd68832a547..979aafc60ff 100755 --- a/autogen/configure +++ b/autogen/configure @@ -9509,7 +9509,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 $as_echo_n "checking whether we are using GNU Make... " >&6; } HAVE_GNU_MAKE=no - testval=`make --version 2>/dev/null | grep 'GNU Make'` + testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` if test "x$testval" != x; then HAVE_GNU_MAKE=yes else @@ -10529,7 +10529,8 @@ fi if test "$HAVE_PTHREAD" = yes; then case "${canonical}" in *-hpux*) ;; - *) LIB_PTHREAD="-lpthread" ;; + *) LIB_PTHREAD="-lpthread" + LIBS="$LIB_PTHREAD $LIBS" ;; esac $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h @@ -24302,14 +24303,14 @@ echo if test "$HAVE_NS" = "yes"; then echo - echo "You must run \"make install\" in order to test the built application. + echo "You must run \"${MAKE-make} install\" in order to test the built application. The installed application will go to nextstep/Emacs.app and can be run or moved from there." if test "$EN_NS_SELF_CONTAINED" = "yes"; then echo "The application will be fully self-contained." else echo "The lisp resources for the application will be installed under ${prefix}. -You may need to run \"make install\" with sudo. The application will fail +You may need to run \"${MAKE-make} install\" with sudo. The application will fail to run if these resources are not installed." fi echo diff --git a/configure.in b/configure.in index fcf569b5ef2..14eec4835d5 100644 --- a/configure.in +++ b/configure.in @@ -1376,7 +1376,7 @@ dnl check for GNU Make if we have GCC and autodepend is on. if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then AC_MSG_CHECKING([whether we are using GNU Make]) HAVE_GNU_MAKE=no - testval=`make --version 2>/dev/null | grep 'GNU Make'` + testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` if test "x$testval" != x; then HAVE_GNU_MAKE=yes else @@ -3795,14 +3795,14 @@ echo if test "$HAVE_NS" = "yes"; then echo - echo "You must run \"make install\" in order to test the built application. + echo "You must run \"${MAKE-make} install\" in order to test the built application. The installed application will go to nextstep/Emacs.app and can be run or moved from there." if test "$EN_NS_SELF_CONTAINED" = "yes"; then echo "The application will be fully self-contained." else echo "The lisp resources for the application will be installed under ${prefix}. -You may need to run \"make install\" with sudo. The application will fail +You may need to run \"${MAKE-make} install\" with sudo. The application will fail to run if these resources are not installed." fi echo diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a1310e87b15..4b51486069c 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Glenn Morris + + * abbrevs.texi (Saving Abbrevs): + quietly-read-abbrev-file is not a command. (Bug#9866) + 2011-10-24 Chong Yidong * display.texi (Scrolling): Document scroll-up-line and diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index d0833ea0854..2eafadf4841 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -286,8 +286,6 @@ sessions. Write a file @var{file} describing all defined abbrevs. @item M-x read-abbrev-file @key{RET} @var{file} @key{RET} Read the file @var{file} and define abbrevs as specified therein. -@item M-x quietly-read-abbrev-file @key{RET} @var{file} @key{RET} -Similar but do not display a message about what is going on. @item M-x define-abbrevs Define abbrevs from definitions in current buffer. @item M-x insert-abbrevs diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 490280dae29..acc334ea000 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2011-10-26 Chong Yidong + + * modes.texi (Running Hooks): Document with-wrapper-hook. + 2011-10-18 Chong Yidong * display.texi (Glyphless Chars): New node. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index eb81ebc4acb..9d652901e53 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -84,8 +84,9 @@ its value is just a single function, not a list of functions. @node Running Hooks @subsection Running Hooks - At the appropriate times, Emacs uses the @code{run-hooks} function -and the other functions below to run particular hooks. + In this section, we document the @code{run-hooks} function, which is +used to run a normal hook. We also document the functions for running +various kinds of abnormal hooks. @defun run-hooks &rest hookvars This function takes one or more normal hook variable names as @@ -108,28 +109,49 @@ be run as well. @end defun @defun run-hook-with-args hook &rest args -This function is the way to run an abnormal hook and always call all -of the hook functions. It calls each of the hook functions one by -one, passing each of them the arguments @var{args}. +This function runs an abnormal hook by calling all the hook functions in +@var{hook}, passing each one the arguments @var{args}. @end defun @defun run-hook-with-args-until-failure hook &rest args -This function is the way to run an abnormal hook until one of the hook -functions fails. It calls each of the hook functions, passing each of -them the arguments @var{args}, until some hook function returns -@code{nil}. It then stops and returns @code{nil}. If none of the -hook functions return @code{nil}, it returns a non-@code{nil} value. +This function runs an abnormal hook by calling each hook function in +turn, stopping if one of them ``fails'' by returning @code{nil}. Each +hook function is passed the arguments @var{args}. If this function +stops because one of the hook functions fails, it returns @code{nil}; +otherwise it returns a non-@code{nil} value. @end defun @defun run-hook-with-args-until-success hook &rest args -This function is the way to run an abnormal hook until a hook function -succeeds. It calls each of the hook functions, passing each of them -the arguments @var{args}, until some hook function returns -non-@code{nil}. Then it stops, and returns whatever was returned by -the last hook function that was called. If all hook functions return -@code{nil}, it returns @code{nil} as well. +This function runs an abnormal hook by calling each hook function, +stopping if one of them ``succeeds'' by returning a non-@code{nil} +value. Each hook function is passed the arguments @var{args}. If this +function stops because one of the hook functions returns a +non-@code{nil} value, it returns that value; otherwise it returns +@code{nil}. @end defun +@defmac with-wrapper-hook hook args &rest body +This macro runs the abnormal hook @code{hook} as a series of nested +``wrapper functions'' around the @var{body} forms. The effect is +similar to nested @code{around} advices (@pxref{Around-Advice}). + +Each hook function must accept an argument list consisting of a function +@var{fun}, followed by the additional arguments listed in @var{args}. +The function @var{fun} passed to the very first hook function in +@var{hook} does the same as @var{body}, if it is called with arguments +@var{args}. The @var{fun} passed to each successive hook function is +constructed from all the preceding hook functions (and @var{body}); if +this @var{fun} is called with arguments @var{args}, it does what the +@code{with-wrapper-hook} call would if the preceding hook functions were +the only ones in @var{hook}. + +In the function definition of the hook function, @var{fun} can be called +any number of times (including not calling it at all). This function +definition is then used to construct the @var{fun} passed to the next +hook function in @var{hook}, if any. The last or ``outermost'' +@var{fun} is called once to produce the effect. +@end defmac + @node Setting Hooks @subsection Setting Hooks diff --git a/etc/NEWS b/etc/NEWS index d6b0bdb484c..58f3fa492e2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1169,7 +1169,13 @@ must also be supplied. ** pre/post-command-hook are not reset to nil upon error. Instead, the offending function is removed. -** New low-level function run-hook-wrapped. +** New hook types + +*** New function `run-hook-wrapped' for running an abnormal hook by +passing the hook functions as arguments to a "wrapping" function. ++++ +*** New macro `with-wrapper-hook' for running an abnormal hook as a +set of "wrapping" filters, similar to around advice. ** `server-eval-at' is provided to allow evaluating forms on different Emacs server instances. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b20ebccea89..88248f00559 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2011-10-26 Michael Albinus + + * ido.el (ido-file-name-all-completions-1): Do not require + tramp.el explicitely. (Bug#7583) + +2011-10-26 Stefan Monnier + + * progmodes/octave-mod.el: + * progmodes/octave-inf.el: Update maintainer. + +2011-10-26 Chong Yidong + + * subr.el (with-wrapper-hook): Rewrite doc. + +2011-10-25 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for + filenames "/method:foo:". (Bug#9793) + +2011-10-25 Stefan Monnier + + * comint.el (comint-get-old-input-default): Fix use-prompt-regexp case + (bug#9865). + +2011-10-24 Glenn Morris + + * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. (Bug#9819) + +2011-10-24 Michael Albinus + + * notifications.el: Add the requirement of a running D-Bus session + bus to the Commentary. + 2011-10-24 Juri Linkov * isearch.el (isearch-occur): Let-bind `search-spaces-regexp' to diff --git a/lisp/comint.el b/lisp/comint.el index 591be5e2d9d..b91b82adb21 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2151,8 +2151,10 @@ current line, if point is on an output field. If `comint-use-prompt-regexp' is non-nil, then return the current line with any initial string matching the regexp `comint-prompt-regexp' removed." - (let ((bof (field-beginning))) - (if (null (get-char-property bof 'field)) ;Not `output'. + (let (bof) + (if (and (not comint-use-prompt-regexp) + ;; Make sure we're in an input rather than output field. + (null (get-char-property (setq bof (field-beginning)) 'field))) (field-string-no-properties bof) (comint-bol) (buffer-substring-no-properties (point) (line-end-position))))) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index b1cb0615e43..4b6f4d634ca 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -94,8 +94,9 @@ Optional LIGHTER is displayed in the modeline when the mode is on. Optional KEYMAP is the default keymap bound to the mode keymap. If non-nil, it should be a variable name (whose value is a keymap), or an expression that returns either a keymap or a list of - arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol, - this also defines the variable MODE-map. + arguments for `easy-mmode-define-keymap'. If you supply a KEYMAP + argument that is not a symbol, this macro defines the variable + MODE-map and gives it the value that KEYMAP specifies. BODY contains code to execute each time the mode is enabled or disabled. It is executed after toggling the mode, and before running MODE-hook. diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 54b17d58f33..4f9db02b5e1 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -645,6 +645,8 @@ a list of colors that the current display can handle." ;; text in menu entries) and `SystemWindowText' (the default ;; color w32 uses for the text in windows and dialogs) may ;; be the same display color and be adjacent in the list. + ;; These system colors all have names prefixed with "System", + ;; which is hardcoded in w32fns.c (SYSTEM_COLOR_PREFIX). ;; This makes them different to any other color. Bug#9722 (not (and (eq system-type 'windows-nt) (string-match-p "^System" (car (car l)))))) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 592d0671c26..8b4e993149e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-10-26 Daiki Ueno + + * mml.el (mml-quote-region): Quote <#secure> tag. + (mml-generate-mime-1): Unquote <#secure> tag. + 2011-10-20 Chong Yidong * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24, @@ -18548,7 +18553,7 @@ gnus-requst-update-info with explicit code to sync the in-memory info read flags with the marks being sync'd to the backend. - *gnus-util.el (gnus-pp): Add optional stream to match pp API. + * gnus-util.el (gnus-pp): Add optional stream to match pp API. 2004-09-28 Teodor Zlatanov diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 0d2ae2a845a..352fa329e3e 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -525,7 +525,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." ;; Remove quotes from quoted tags. (goto-char (point-min)) (while (re-search-forward - "<#!+/?\\(part\\|multipart\\|external\\|mml\\)" + "<#!+/?\\(part\\|multipart\\|external\\|mml\\|secure\\)" nil t) (delete-region (+ (match-beginning 0) 2) (+ (match-beginning 0) 3)))))) @@ -1232,7 +1232,7 @@ If not set, `default-directory' will be used." (goto-char (point-min)) ;; Quote parts. (while (re-search-forward - "<#!*/?\\(multipart\\|part\\|external\\|mml\\)" nil t) + "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)" nil t) ;; Insert ! after the #. (goto-char (+ (match-beginning 0) 2)) (insert "!"))))) diff --git a/lisp/ido.el b/lisp/ido.el index 88599013ce6..fda4c0316f7 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3457,8 +3457,6 @@ This is to make them appear as if they were \"virtual buffers\"." (nconc ido-temp-list items) (setq ido-temp-list items))) -(declare-function tramp-tramp-file-p "tramp" (name)) - (defun ido-file-name-all-completions-1 (dir) (cond ((ido-nonreadable-directory-p dir) '()) @@ -3466,8 +3464,6 @@ This is to make them appear as if they were \"virtual buffers\"." ;; Caller must have done that if necessary. ((and ido-enable-tramp-completion - (or (fboundp 'tramp-completion-mode-p) - (require 'tramp nil t)) (string-match "\\`/[^/]+[:@]\\'" dir)) ;; Strip method:user@host: part of tramp completions. ;; Tramp completions do not include leading slash. @@ -3480,7 +3476,9 @@ This is to make them appear as if they were \"virtual buffers\"." ;; /ftp:user@host:./ => ok (and (not (string= "/ftp:" dir)) - (tramp-tramp-file-p dir) + (file-remote-p dir) + ;; tramp-ftp-file-name-p is available only when tramp + ;; has been loaded. (fboundp 'tramp-ftp-file-name-p) (funcall 'tramp-ftp-file-name-p dir) (string-match ":\\'" dir) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 56424f79476..55732194bc8 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1594,17 +1594,14 @@ and gid of the corresponding user is taken. Both parameters must be integers." (defun tramp-sh-handle-file-directory-p (filename) "Like `file-directory-p' for Tramp files." - ;; Care must be taken that this function returns `t' for symlinks - ;; pointing to directories. Surely the most obvious implementation - ;; would be `test -d', but that returns false for such symlinks. - ;; CCC: Stefan Monnier says that `test -d' follows symlinks. And - ;; I now think he's right. So we could be using `test -d', couldn't - ;; we? - ;; - ;; Alternatives: `cd %s', `test -d %s' (with-parsed-tramp-file-name filename nil - (with-file-property v localname "file-directory-p" - (tramp-run-test "-d" filename)))) + ;; `file-directory-p' is used as predicate for filename completion. + ;; Sometimes, when a connection is not established yet, it is + ;; desirable to return t immediately for "/method:foo:". It can + ;; be expected that this is always a directory. + (or (zerop (length localname)) + (with-file-property v localname "file-directory-p" + (tramp-run-test "-d" filename))))) (defun tramp-sh-handle-file-writable-p (filename) "Like `file-writable-p' for Tramp files." diff --git a/lisp/notifications.el b/lisp/notifications.el index 42cd40df36b..a4e7fdd5425 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el @@ -30,6 +30,9 @@ ;; ;; (require 'notifications) +;; For proper usage, Emacs must be started in an environment with an +;; active D-Bus session bus. + ;;; Code: (eval-when-compile (require 'cl)) diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index e9d890c3f26..421f476016e 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -4,7 +4,7 @@ ;; Author: Kurt Hornik ;; Author: John Eaton -;; Maintainer: Kurt Hornik +;; Maintainer: FSF ;; Keywords: languages ;; Package: octave-mod @@ -68,6 +68,7 @@ mode, set this to (\"-q\" \"--traditional\")." (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) (define-key map [menu-bar inout list-history] '("List Input History" . inferior-octave-dynamic-list-input-ring)) + ;; FIXME: free C-h so it can do the describe-prefix-bindings. (define-key map "\C-c\C-h" 'info-lookup-symbol) map) "Keymap used in Inferior Octave mode.") diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 5e13b8533e7..28e25a35c70 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -4,7 +4,7 @@ ;; Author: Kurt Hornik ;; Author: John Eaton -;; Maintainer: Kurt Hornik +;; Maintainer: FSF ;; Keywords: languages ;; This file is part of GNU Emacs. @@ -223,6 +223,7 @@ parenthetical grouping.") (define-key map "\C-c]" 'smie-close-block) (define-key map "\C-c/" 'smie-close-block) (define-key map "\C-c\C-f" 'octave-insert-defun) + ;; FIXME: free C-h so it can do the describe-prefix-bindings. (define-key map "\C-c\C-h" 'info-lookup-symbol) (define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-ib" 'octave-send-block) @@ -236,6 +237,7 @@ parenthetical grouping.") (define-key map "\C-c\C-i\C-f" 'octave-send-defun) (define-key map "\C-c\C-i\C-r" 'octave-send-region) (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) + ;; FIXME: free C-h so it can do the describe-prefix-bindings. (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) (define-key map "\C-c\C-i\C-k" 'octave-kill-process) map) diff --git a/lisp/subr.el b/lisp/subr.el index c88cef0ba0f..7ac287d2473 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1364,18 +1364,26 @@ All symbols are bound before the VALUEFORMs are evalled." ,@(mapcar (lambda (binder) `(setq ,@binder)) binders) ,@body)) -(defmacro with-wrapper-hook (var args &rest body) - "Run BODY wrapped with the VAR hook. -VAR is a special hook: its functions are called with a first argument -which is the \"original\" code (the BODY), so the hook function can wrap -the original function, or call it any number of times (including not calling -it at all). This is similar to an `around' advice. -VAR is normally a symbol (a variable) in which case it is treated like -a hook, with a buffer-local and a global part. But it can also be an -arbitrary expression. -ARGS is a list of variables which will be passed as additional arguments -to each function, after the initial argument, and which the first argument -expects to receive when called." +(defmacro with-wrapper-hook (hook args &rest body) + "Run BODY, using wrapper functions from HOOK with additional ARGS. +HOOK is an abnormal hook. Each hook function in HOOK \"wraps\" +around the preceding ones, like a set of nested `around' advices. + +Each hook function should accept an argument list consisting of a +function FUN, followed by the additional arguments in ARGS. + +The FUN passed to the first hook function in HOOK performs BODY, +if it is called with arguments ARGS. The FUN passed to each +successive hook function is defined based on the preceding hook +functions; if called with arguments ARGS, it does what the +`with-wrapper-hook' call would do if the preceding hook functions +were the only ones present in HOOK. + +In the function definition of each hook function, FUN can be +called any number of times (including not calling it at all). +That function definition is then used to construct the FUN passed +to the next hook function, if any. The last (or \"outermost\") +FUN is then called once." (declare (indent 2) (debug (form sexp body))) ;; We need those two gensyms because CL's lexical scoping is not available ;; for function arguments :-( @@ -1404,11 +1412,11 @@ expects to receive when called." ;; Once there are no more functions on the hook, run ;; the original body. (apply (lambda ,args ,@body) ,argssym))))) - (funcall ,runrestofhook ,var + (funcall ,runrestofhook ,hook ;; The global part of the hook, if any. - ,(if (symbolp var) - `(if (local-variable-p ',var) - (default-value ',var))) + ,(if (symbolp hook) + `(if (local-variable-p ',hook) + (default-value ',hook))) (list ,@args))))) (defun add-to-list (list-var element &optional append compare-fn) diff --git a/nt/ChangeLog b/nt/ChangeLog index fb3a168ebfe..08fd7677077 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,12 @@ +2011-10-25 Eli Zaretskii + + * makefile.w32-in (dist): Don't put the top-level INSTALL into the + distribution. (Bug#9861) + +2011-10-25 Christoph Scholtes + + * INSTALL: Update URL for GTK download page. + 2011-10-19 Eli Zaretskii * config.nt (HAVE_TZNAME, HAVE_DECL_TZNAME): Define. diff --git a/nt/INSTALL b/nt/INSTALL index b4a97011922..613610890ae 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -323,7 +323,7 @@ For PNG images, we recommend to use versions 1.4.x and later of libpng, because previous versions had security issues. You can find precompiled libraries and headers on the GTK download page for - Windows (http://www.gtk.org/download-windows.html). + Windows (http://www.gtk.org/download/win32.php). Versions 1.4.0 and later of libpng are binary incompatible with earlier versions, so Emacs will only look for libpng libraries which diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in index 4e4e6eccbb7..07d9be2c117 100644 --- a/nt/makefile.w32-in +++ b/nt/makefile.w32-in @@ -263,7 +263,6 @@ dist: install-bin $(CP) "$(INSTALL_DIR)/COPYING" $(TMP_DIST_DIR) $(CP) "$(INSTALL_DIR)/README" $(TMP_DIST_DIR) $(CP) "$(INSTALL_DIR)/README.W32" $(TMP_DIST_DIR) - $(CP) "$(INSTALL_DIR)/INSTALL" $(TMP_DIST_DIR) $(CP_DIR) "$(INSTALL_DIR)/bin" $(TMP_DIST_DIR) $(CP_DIR) "$(INSTALL_DIR)/etc" $(TMP_DIST_DIR) $(CP_DIR) "$(INSTALL_DIR)/info" $(TMP_DIST_DIR) diff --git a/src/ChangeLog b/src/ChangeLog index 3f9b5beeab6..854c4987be5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2011-10-25 Paul Eggert + + * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2). + +2011-10-25 Stefan Monnier + + * keyboard.c (test_undefined): New function (bug#9751). + (read_key_sequence): Use it to detect when a key is bound to `undefined'. + +2011-10-25 Enami Tsugutomo + + * sysdep.c (init_sys_modes): Fix the check for the controlling + terminal (Bug#6649). + 2011-10-20 Eli Zaretskii * dispextern.h (struct bidi_it): New member next_en_type. diff --git a/src/dispextern.h b/src/dispextern.h index 40e41923554..006ceb31a5a 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3374,6 +3374,7 @@ extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, un extern void set_tty_color_mode (struct tty_display_info *, struct frame *); extern struct terminal *get_named_tty (const char *); EXFUN (Ftty_type, 1); +EXFUN (Fcontrolling_tty_p, 1); extern void create_tty_output (struct frame *); extern struct terminal *init_tty (const char *, const char *, int); extern void tty_append_glyph (struct it *); diff --git a/src/intervals.c b/src/intervals.c index 2063655cdb9..1f3f8cf793e 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1723,8 +1723,6 @@ graft_intervals_into_buffer (INTERVAL source, EMACS_INT position, BUF_INTERVALS (buffer)->position = BEG; BUF_INTERVALS (buffer)->up_obj = 1; - /* Explicitly free the old tree here? */ - return; } diff --git a/src/keyboard.c b/src/keyboard.c index a21008b9502..f06c8794a54 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8918,6 +8918,14 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, return 0; } +static int +test_undefined (Lisp_Object binding) +{ + return (EQ (binding, Qundefined) + || (!NILP (binding) && SYMBOLP (binding) + && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined))); +} + /* Read a sequence of keys that ends with a non prefix character, storing it in KEYBUF, a buffer of size BUFSIZE. Prompt with PROMPT. @@ -9868,7 +9876,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, } } - if (first_binding < nmaps && NILP (submaps[first_binding]) + if (first_binding < nmaps + && NILP (submaps[first_binding]) + && !test_undefined (defs[first_binding]) && indec.start >= t) /* There is a binding and it's not a prefix. (and it doesn't have any input-decode-map translation pending). @@ -9895,7 +9905,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, /* If there's a binding (i.e. first_binding >= nmaps) we don't want to apply this function-key-mapping. */ - fkey.end + 1 == t && first_binding >= nmaps, + fkey.end + 1 == t + && (first_binding >= nmaps + || test_undefined (defs[first_binding])), &diff, prompt); UNGCPRO; if (done) diff --git a/src/sysdep.c b/src/sysdep.c index b0d5a1abbe3..d666f8dbb79 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -854,6 +854,7 @@ void init_sys_modes (struct tty_display_info *tty_out) { struct emacs_tty tty; + Lisp_Object terminal; Vtty_erase_char = Qnil; @@ -907,7 +908,9 @@ init_sys_modes (struct tty_display_info *tty_out) tty.main.c_cflag &= ~PARENB;/* Don't check parity */ } #endif - if (tty_out->input == stdin) + + XSETTERMINAL(terminal, tty_out->terminal); + if (!NILP (Fcontrolling_tty_p (terminal))) { tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */ /* Set up C-g for both SIGQUIT and SIGINT.