]> code.delx.au - gnu-emacs/commitdiff
Merge from trunk.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Jun 2011 18:31:36 +0000 (11:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Jun 2011 18:31:36 +0000 (11:31 -0700)
25 files changed:
INSTALL.BZR
doc/emacs/ChangeLog
doc/emacs/misc.texi
doc/lispref/ChangeLog
doc/lispref/display.texi
doc/lispref/keymaps.texi
doc/man/ChangeLog
doc/man/emacsclient.1
etc/NEWS
lib-src/ChangeLog
lib-src/emacsclient.c
lisp/ChangeLog
lisp/allout.el
lisp/emacs-lisp/re-builder.el
lisp/loadhist.el
lisp/mail/rmail.el
lisp/net/ange-ftp.el
lisp/net/browse-url.el
lisp/proced.el
lisp/progmodes/cperl-mode.el
lisp/progmodes/python.el
lisp/server.el
lisp/ses.el
src/ChangeLog
src/dispnew.c

index 93229ec7a79adad8e53552502c2088cc8cdbaeb0..664aab1c7652c3de2f7b8e7639bcf7d54dd79de9 100644 (file)
@@ -68,10 +68,12 @@ etc.) before "make bootstrap" or "make"; the rest of the procedure is
 applicable to those systems as well.
 
 Because the Bazaar version of Emacs is a work in progress, it will
-sometimes fail to build.  Please wait a day or so (and check the bug
-and development mailing list archives) before reporting such problems.
-In most cases, the problem is known about and is just waiting for
-someone to fix it.
+sometimes fail to build.  Please wait a day or so (and check the
+archives of the emacs-buildstatus, emacs-devel, and bug-gnu-emacs
+mailing lists) before reporting such problems.  In most cases, the
+problem is known about and is just waiting for someone to fix it.
+This is especially true for Lisp compilation errors, which are almost
+never platform-specific.
 
 
 \f
index 8853eb099d62a76e0ff3675161b6eb500af34f93..ab0abcd43d3b7a940bcc804d612f6acd6cde5212 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-25  Andreas Rottmann  <a.rottmann@gmx.at>
+
+       * misc.texi (emacsclient Options): Mention --frame-parameters.
+
 2011-06-09  Glenn Morris  <rgm@gnu.org>
 
        * custom.texi (Specifying File Variables):
index 290e5dc53bf21722d087ab507f8f8ec992bca58e..f83ac38469a74381adc2d13871fdbc13aec4b153 100644 (file)
@@ -1623,6 +1623,11 @@ text-only terminal frame (@pxref{Frames}).  If you omit a filename
 argument while supplying the @samp{-c} option, the new frame displays
 the @samp{*scratch*} buffer (@pxref{Buffers}).
 
+@item -F
+@itemx --frame-parameters=@var{alist}
+Set the parameters for a newly-created graphical frame
+(@pxref{Frame Parameters}).
+
 @item -d @var{display}
 @itemx --display=@var{display}
 Tell Emacs to open the given files on the X display @var{display}
index b6b02686caf07d08d9d6819d13a7643f36bac57d..7946e4b91ffe4692b695a098d09974b27cef9de1 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-25  Chong Yidong  <cyd@stupidchicken.com>
+
+       * keymaps.texi (Searching Keymaps):
+       * display.texi (Overlay Properties): Fix errors in 2011-05-29
+       change.  Suggested by Johan Bockgård.
+
 2011-06-15  Chong Yidong  <cyd@stupidchicken.com>
 
        * text.texi (Special Properties): Clarify role of font-lock-face.
index 199a20cc2cd6500a5b4816c427dee1fe2f467113..069b3c91d7bccce601b16e466d3aebbb563aca30 100644 (file)
@@ -1441,9 +1441,9 @@ specify a particular attribute for certain text.  @xref{Face
 Attributes}.
 
 @item
-A cons cell, either of the form @code{(fg-color . @var{color-name})}
-or @code{(bg-color . @var{color-name})}.  These elements specify just
-the foreground color or just the background color.
+A cons cell, of the form @code{(foreground-color . @var{color-name})}
+or @code{(background-color . @var{color-name})}.  These elements
+specify just the foreground color or just the background color.
 
 @code{(foreground-color . @var{color-name})} has the same effect as
 @code{(:foreground @var{color-name})}; likewise for the background.
index d55cb29977155580e53ca590c9037c3f48ea3d2f..cf1db5b7fce7a4a783087a58fdf8df7fe21da199 100644 (file)
@@ -723,13 +723,13 @@ them:
       (@var{find-in} overriding-terminal-local-map))
      (overriding-local-map
       (@var{find-in} overriding-local-map))
-     (or (@var{find-in} (get-char-property (point) 'keymap))
-        (@var{find-in-any} emulation-mode-map-alists)
-        (@var{find-in-any} minor-mode-overriding-map-alist)
-        (@var{find-in-any} minor-mode-map-alist)
-        (if (get-text-property (point) 'local-map)
-            (@var{find-in} (get-char-property (point) 'local-map))
-          (@var{find-in} (current-local-map)))))
+     ((or (@var{find-in} (get-char-property (point) 'keymap))
+         (@var{find-in-any} emulation-mode-map-alists)
+         (@var{find-in-any} minor-mode-overriding-map-alist)
+         (@var{find-in-any} minor-mode-map-alist)
+         (if (get-text-property (point) 'local-map)
+             (@var{find-in} (get-char-property (point) 'local-map))
+           (@var{find-in} (current-local-map))))))
     (@var{find-in} (current-global-map)))
 @end lisp
 
index 06ff5782003332152dc6493302af7694fde74474..88f70e410c81b396aaf96f56fde7a2914fdcc84b 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-25  Andreas Rottmann  <a.rottmann@gmx.at>
+
+       * emacsclient.1: Mention --frame-parameters.
+
 2011-03-07  Chong Yidong  <cyd@stupidchicken.com>
 
        * Version 23.3 released.
index cae4d76634badbef76e575031999b5b916704c4f..4843053666af5da5055b7fc93aff115eb4f5a77d 100644 (file)
@@ -58,6 +58,9 @@ daemon mode and emacsclient will try to connect to it.
 .B -c, \-\-create-frame
 create a new frame instead of trying to use the current Emacs frame
 .TP
+.B \-F, \-\-frame-parameters=ALIST
+set the parameters of a newly-created frame.
+.TP
 .B \-d, \-\-display=DISPLAY
 tell the server to display the files on the given display.
 .TP
index 243058a46b2250b4b09fd437dc5b0bdcace6bafc..32e4a0dc11f7928f4e067bf907aecbf28db45c0b 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -84,6 +84,10 @@ client frame in parent X window ID, via XEmbed.  This works like the
 +++
 *** New emacsclient argument -q/--quiet suppresses some status messages.
 
++++
+*** New emacsclient argument --frame-parameters can be used to set the
+frame parameters of a newly-created graphical frame.
+
 *** If emacsclient shuts down as a result of Emacs signalling an
 error, its exit status is 1.
 
index ec123e85036738408d4194bbb7245be961692f0d..b7a95fe8043e750c56cab397454b5515848da053 100644 (file)
@@ -1,3 +1,12 @@
+2011-06-25  Glenn Morris  <rgm@gnu.org>
+
+       * emacsclient.c (decode_options) <opt>: Add `F:'.
+       (print_help_and_exit): Mention --frame-parameters.
+
+2011-06-25  Andreas Rottmann  <a.rottmann@gmx.at>
+
+       * emacsclient.c (longopts, decode_options, main): Add frame-parameters.
+
 2011-06-10  Paul Eggert  <eggert@cs.ucla.edu>
 
        * movemail.c: Fix race condition and related bugs (Bug#8836).
index c334fb6a196c66fab4f9cf6850094be2823ba441..2daed7eb9da14683c855e217d83eb96c462929bd 100644 (file)
@@ -160,6 +160,10 @@ const char *server_file = NULL;
 /* PID of the Emacs server process.  */
 int emacs_pid = 0;
 
+/* If non-NULL, a string that should form a frame parameter alist to
+   be used for the new frame */
+const char *frame_parameters = NULL;
+
 static void print_help_and_exit (void) NO_RETURN;
 static void fail (void) NO_RETURN;
 
@@ -175,6 +179,7 @@ struct option longopts[] =
   { "nw",      no_argument,       NULL, 't' },
   { "create-frame", no_argument,   NULL, 'c' },
   { "alternate-editor", required_argument, NULL, 'a' },
+  { "frame-parameters", required_argument, NULL, 'F' },
 #ifndef NO_SOCKETS_IN_FILE_SYSTEM
   { "socket-name",     required_argument, NULL, 's' },
 #endif
@@ -526,9 +531,9 @@ decode_options (int argc, char **argv)
     {
       int opt = getopt_long_only (argc, argv,
 #ifndef NO_SOCKETS_IN_FILE_SYSTEM
-                            "VHneqa:s:f:d:tc",
+                            "VHneqa:s:f:d:F:tc",
 #else
-                            "VHneqa:f:d:tc",
+                            "VHneqa:f:d:F:tc",
 #endif
                             longopts, 0);
 
@@ -599,6 +604,10 @@ decode_options (int argc, char **argv)
          print_help_and_exit ();
          break;
 
+        case 'F':
+          frame_parameters = optarg;
+          break;
+
        default:
          message (TRUE, "Try `%s --help' for more information\n", progname);
          exit (EXIT_FAILURE);
@@ -665,6 +674,7 @@ The following OPTIONS are accepted:\n\
 -nw, -t, --tty                 Open a new Emacs frame on the current terminal\n\
 -c, --create-frame     Create a new frame instead of trying to\n\
                        use the current Emacs frame\n\
+-F, --frame-parameters Set the parameters of a new frame\n\
 -e, --eval             Evaluate the FILE arguments as ELisp expressions\n\
 -n, --no-wait          Don't wait for the server to return\n\
 -q, --quiet            Don't display messages on success\n\
@@ -1630,6 +1640,13 @@ main (int argc, char **argv)
       send_to_emacs (emacs_socket, " ");
     }
 
+  if (frame_parameters && !current_frame)
+    {
+      send_to_emacs (emacs_socket, "-frame-parameters ");
+      quote_argument (emacs_socket, frame_parameters);
+      send_to_emacs (emacs_socket, " ");
+    }
+
   /* If using the current frame, send tty information to Emacs anyway.
      In daemon mode, Emacs may need to occupy this tty if no other
      frame is available.  */
index efb5e0ffad738c451ff5c1702e5aef7f859f5fd0..2a8188f8f5eb943e5c36e8ad069a1fe64eedd31d 100644 (file)
@@ -1,3 +1,44 @@
+2011-06-25  Eli Zaretskii  <eliz@gnu.org>
+
+       * net/ange-ftp.el (ange-ftp-insert-file-contents): Let-bind
+       buffer-file-type before setting its value, to avoid disastrous
+       global effects on decoding files for DOS/Windows systems.
+       (Bug#8780)
+
+2011-06-25  Juanma Barranquero  <lekktu@gmail.com>
+
+       * allout.el (allout-unload-function): Pass -1 to `allout-mode'.
+
+       * ses.el (ses-unload-function):
+       * emacs-lisp/re-builder.el (re-builder-unload-function): Simplify.
+
+       * proced.el (proced-unload-function):
+       * progmodes/cperl-mode.el (cperl-mode-unload-function): Remove.
+
+2011-06-25  Andreas Rottmann  <a.rottmann@gmx.at>
+
+       * server.el (server-create-window-system-frame): Add parameters arg.
+       (server-process-filter): Doc fix.  Handle frame-parameters.
+
+2011-06-25  Juanma Barranquero  <lekktu@gmail.com>
+
+       Fix bug#8730, bug#8781.
+
+       * loadhist.el (unload--set-major-mode): New function.
+       (unload-feature): Use it.
+
+       * progmodes/python.el (python-after-info-look): Add autoload cookie.
+       (python-unload-function): New function.
+
+2011-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mail/rmail.el (rmail-show-message-1): Use restore-buffer-modified-p.
+
+2011-06-25  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * net/browse-url.el (browse-url-firefox-program): Add icecat to
+       the candidates list.
+
 2011-06-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * progmodes/verilog-mode.el (verilog-mode): Fix test for bound variable.
index 8cdf24176b0af4460b9c7a886337c8c544e780b4..1d4d4a20e119b27ccfd4b8d3b893c4a8d3bd5432 100644 (file)
@@ -2085,7 +2085,7 @@ OPEN:     A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
   (save-current-buffer
     (dolist (buffer (buffer-list))
       (set-buffer buffer)
-      (when (allout-mode-p) (allout-mode))))
+      (when (allout-mode-p) (allout-mode -1))))
   ;; continue standard unloading
   nil)
 
index 5ce18d020c96abfe05f7b7f2d95403366d5ced1c..ebbd6ff1fdff84106724a3b8b22ff21038cf4137 100644 (file)
@@ -714,8 +714,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
       (remove-hook 'after-change-functions 'reb-auto-update t)
       (remove-hook 'kill-buffer-hook 'reb-kill-buffer t)
       (when (reb-mode-buffer-p)
-       (reb-delete-overlays)
-       (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
+       (reb-delete-overlays))))
   ;; continue standard unloading
   nil)
 
index 8e00c33cd815070e4de2d73aa2f278cab1b13c9e..943eac42b0205dfa7db8953c311c76623257063f 100644 (file)
@@ -143,6 +143,19 @@ documentation of `unload-feature' for details.")
 (define-obsolete-variable-alias 'unload-hook-features-list
     'unload-function-defs-list "22.2")
 
+(defun unload--set-major-mode ()
+  (save-current-buffer
+    (dolist (buffer (buffer-list))
+      (set-buffer buffer)
+      (let ((proposed major-mode))
+        ;; Look for an antecessor mode not defined in the feature we're processing
+        (while (and proposed (rassq proposed unload-function-defs-list))
+          (setq proposed (get proposed 'derived-mode-parent)))
+        (unless (eq proposed major-mode)
+          ;; Two cases: either proposed is nil, and we want to switch to fundamental
+          ;; mode, or proposed is not nil and not major-mode, and so we use it.
+          (funcall (or proposed 'fundamental-mode)))))))
+
 ;;;###autoload
 (defun unload-feature (feature &optional force)
   "Unload the library that provided FEATURE.
@@ -222,6 +235,10 @@ something strange, such as redefining an Emacs function."
                     (not (get (cdr y) 'autoload)))
            (setq auto-mode-alist
                  (rassq-delete-all (cdr y) auto-mode-alist)))))
+
+      ;; Change major mode in all buffers using one defined in the feature being unloaded.
+      (unload--set-major-mode)
+
       (when (fboundp 'elp-restore-function) ; remove ELP stuff first
        (dolist (elt unload-function-defs-list)
          (when (symbolp elt)
index 04ff457dcfb57f98507aad71487c01065c7fe075..640f1dfff296046abe2bf7f7878dc63e96980370 100644 (file)
@@ -2674,7 +2674,7 @@ The current mail message becomes the message displayed."
        (let ((modiff (buffer-modified-p)))
          (rmail-set-attribute rmail-unseen-attr-index nil)
          (unless modiff
-           (set-buffer-modified-p nil)))
+           (restore-buffer-modified-p modiff)))
        ;; bracket the message in the mail
        ;; buffer and determine the coding system the transfer encoding.
        (rmail-swap-buffers-maybe)
index 0493ead7bbfb3e854844bbecdefe9de21baf050d..1282f86d5032a20229f15a17ebcbcd71f36be644 100644 (file)
@@ -3278,6 +3278,7 @@ system TYPE.")
                     (name (ange-ftp-quote-string (nth 2 parsed)))
                     (temp (ange-ftp-make-tmp-name host))
                     (binary (ange-ftp-binary-file filename))
+                    (buffer-file-type buffer-file-type)
                     (abbr (ange-ftp-abbreviate-filename filename))
                     (coding-system-used last-coding-system-used)
                     size)
index d9e6827d2df0e01afc381c615ddd8508ee2c0829..ac12030471ebc56e84d3aca62ca99d43ae8bb0ad 100644 (file)
@@ -322,7 +322,7 @@ Defaults to the value of `browse-url-mozilla-arguments' at the time
   :group 'browse-url)
 
 (defcustom browse-url-firefox-program
-  (let ((candidates '("firefox" "iceweasel")))
+  (let ((candidates '("firefox" "iceweasel" "icecat")))
     (while (and candidates (not (executable-find (car candidates))))
       (setq candidates (cdr candidates)))
     (or (car candidates) "firefox"))
index 4436129ce1607300a4f3279684aca71dacd8fd48..11598d7350f6d31f8eb3ae0305fdd628d0a96319 100644 (file)
@@ -1869,16 +1869,6 @@ buffer.  You can use it to recover marks."
   (message "Change in Proced buffer undone.
 Killed processes cannot be recovered by Emacs."))
 
-(defun proced-unload-function ()
-  "Unload the Proced library."
-  (save-current-buffer
-    (dolist (buf (buffer-list))
-      (set-buffer buf)
-      (when (eq major-mode 'proced-mode)
-        (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
-  ;; continue standard unloading
-  nil)
-
 (provide 'proced)
 
 ;;; proced.el ends here
index 2cce5e13fb0092a7c4eaef0e75fa16b339d13291..8eb2d01c0972e5b3a022db65c8b93ea9b124829e 100644 (file)
@@ -8971,18 +8971,6 @@ do extra unwind via `cperl-unwind-to-safe'."
     (substring v (match-beginning 1) (match-end 1)))
   "Version of IZ-supported CPerl package this file is based on.")
 
-(defun cperl-mode-unload-function ()
-  "Unload the Cperl mode library."
-  (let ((new-mode (if (eq (symbol-function 'perl-mode) 'cperl-mode)
-                     'fundamental-mode
-                   'perl-mode)))
-    (dolist (buf (buffer-list))
-      (with-current-buffer buf
-       (when (eq major-mode 'cperl-mode)
-         (funcall new-mode)))))
-  ;; continue standard unloading
-  nil)
-
 (provide 'cperl-mode)
 
 ;;; cperl-mode.el ends here
index 3d243f14f07267cc64d8208ea28b2c042fa031ed..4d2f15c69d85c8d458fd5fc23e5b3fc7e47997a9 100644 (file)
@@ -1868,6 +1868,7 @@ instance.  Assumes an inferior Python is running."
 
 (declare-function info-lookup-maybe-add-help "info-look" (&rest arg))
 
+;;;###autoload
 (defun python-after-info-look ()
   "Set up info-look for Python.
 Used with `eval-after-load'."
@@ -2731,6 +2732,16 @@ comint believe the user typed this string so that
 (defun python-sentinel (_proc _msg)
   (setq overlay-arrow-position nil))
 
+(defun python-unload-function ()
+  "Unload the Python library."
+  (remove-hook 'comint-output-filter-functions 'python-pdbtrack-track-stack-file)
+  (setq minor-mode-alist (assq-delete-all 'python-pdbtrack-is-tracking-p
+                                          minor-mode-alist))
+  (dolist (error '("^No symbol" "^Can't shift all lines enough"))
+    (setq debug-ignored-errors (delete error debug-ignored-errors)))
+  ;; continue standard unloading
+  nil)
+
 (provide 'python)
 (provide 'python-21)
 
index 04d35695c577a70bbdcd2b61e2a1737ab722b53e..42da7a210c55f78fe68f7b00feb93bd43673111e 100644 (file)
@@ -736,7 +736,8 @@ Server mode runs a process that accepts commands from the
 
     frame))
 
-(defun server-create-window-system-frame (display nowait proc parent-id)
+(defun server-create-window-system-frame (display nowait proc parent-id
+                                                 &optional parameters)
   (add-to-list 'frame-inherited-parameters 'client)
   (if (not (fboundp 'make-frame-on-display))
       (progn
@@ -751,7 +752,8 @@ Server mode runs a process that accepts commands from the
     ;; killing emacs on that frame.
     (let* ((params `((client . ,(if nowait 'nowait proc))
                      ;; This is a leftover, see above.
-                     (environment . ,(process-get proc 'env))))
+                     (environment . ,(process-get proc 'env))
+                     ,@parameters))
           (display (or display
                        (frame-parameter nil 'display)
                        (getenv "DISPLAY")
@@ -832,6 +834,9 @@ The following commands are accepted by the server:
 `-current-frame'
   Forbid the creation of new frames.
 
+`-frame-parameters ALIST'
+  Set the parameters of the created frame.
+
 `-nowait'
   Request that the next frame created should not be
   associated with this client.
@@ -940,6 +945,7 @@ The following commands are accepted by the client:
                commands
                dir
                use-current-frame
+               frame-parameters  ;parameters for newly created frame
                tty-name   ; nil, `window-system', or the tty name.
                tty-type   ; string.
                files
@@ -960,6 +966,13 @@ The following commands are accepted by the client:
                 ;; -current-frame:  Don't create frames.
                 (`"-current-frame" (setq use-current-frame t))
 
+                ;; -frame-parameters: Set frame parameters
+                (`"-frame-parameters"
+                 (let ((alist (pop args-left)))
+                   (if coding-system
+                       (setq alist (decode-coding-string alist coding-system)))
+                   (setq frame-parameters (car (read-from-string alist)))))
+
                 ;; -display DISPLAY:
                 ;; Open X frames on the given display instead of the default.
                 (`"-display"
@@ -1075,7 +1088,8 @@ The following commands are accepted by the client:
                    (if display (server-select-display display)))
                   ((eq tty-name 'window-system)
                    (server-create-window-system-frame display nowait proc
-                                                      parent-id))
+                                                      parent-id
+                                                      frame-parameters))
                   ;; When resuming on a tty, tty-name is nil.
                   (tty-name
                    (server-create-tty-frame tty-name tty-type proc))))
index 2fc85d27df90faa021ce1766032081c7918900d5..b52d3e23c736897c3e33412cc5945c5c0f1c50eb 100644 (file)
@@ -3006,11 +3006,6 @@ current column and continues until the next nonblank column."
   (dolist (fun '(copy-region-as-kill yank))
     (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun))))
     (ad-update fun))
-  (save-current-buffer
-    (dolist (buf (buffer-list))
-      (set-buffer buf)
-      (when (eq major-mode 'ses-mode)
-       (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
   ;; continue standard unloading
   nil)
 
index 792208f7c29265d989e0a879fd92ab159287a596..78ab05728c6782dc986eccefc503b576e0ecba9b 100644 (file)
@@ -3,6 +3,11 @@
        Use gnulib's dup2 module instead of rolling our own.
        * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
 
+2011-06-25  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * dispnew.c (scrolling_window): Before scrolling, turn off a
+       mouse-highlight in the window being scrolled.
+
 2011-06-24  Juanma Barranquero  <lekktu@gmail.com>
 
        Move DEFSYM to lisp.h and use everywhere.
index c33442d5048fdddbb9c1dc73a90c077437ea126b..8691c9218533ef897b3ff67010405ea180bed9df 100644 (file)
@@ -4543,6 +4543,7 @@ scrolling_window (struct window *w, int header_line_p)
        /* Copy on the display.  */
        if (r->current_y != r->desired_y)
          {
+           rif->clear_window_mouse_face (w);
            rif->scroll_run_hook (w, r);
 
            /* Invalidate runs that copy from where we copied to.  */