emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 646c8e5 2/4: Merge from origin/emacs-26


From: Paul Eggert
Subject: [Emacs-diffs] master 646c8e5 2/4: Merge from origin/emacs-26
Date: Tue, 9 Jan 2018 18:47:08 -0500 (EST)

branch: master
commit 646c8e56f8a11832f25523907b85d6522a99f361
Merge: 85f5ee1 d382d2b
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-26
    
    d382d2bfc5 * etc/DEBUG (Getting control to the debugger): Fix grammar.
    687af4c8e8 * lisp/vc/vc.el (vc-region-history): log-view-vc-fileset h...
    43e2aafae3 Don't bind dframe events on load (Bug#29599)
    ab31bf3c5f * lisp/textmodes/picture.el (picture-mode-exit): Doc fix. ...
    ed44d92fa6 * lisp/textmodes/picture.el (picture-open-line): Doc fix. ...
    b87a772612 Fix description of 'emacs-internal'
    a5256da588 Update PROBLEMS with selection-related issues
    c59ecb005e New customization variable for python-mode indentation (Bu...
    4e20c8f220 Fix menu keyboard shortcuts on macOS (Bug#29595)
    
    # Conflicts:
    #   etc/NEWS
---
 doc/lispref/nonascii.texi |  4 +++-
 etc/DEBUG                 |  2 +-
 etc/NEWS.26               |  7 +++++++
 etc/PROBLEMS              | 26 +++++++++++++-------------
 lisp/dframe.el            | 26 ++++++++++++++++----------
 lisp/progmodes/python.el  | 10 ++++++++--
 lisp/textmodes/picture.el | 10 ++++++----
 lisp/vc/vc.el             |  2 +-
 src/nsmenu.m              | 21 +++++++++++++++------
 9 files changed, 70 insertions(+), 38 deletions(-)

diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 9d6fc6c..2fd2bbc 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1112,7 +1112,9 @@ represented in the internal Emacs encoding (@pxref{Text
 Representations}).  This is like @code{raw-text} in that no code
 conversion happens, but different in that the result is multibyte
 data.  The name @code{emacs-internal} is an alias for
address@hidden
address@hidden (so it forces no conversion of end-of-line,
+unlike @code{utf-8-emacs}, which can decode all 3 kinds of
+end-of-line conventions).
 
 @defun coding-system-get coding-system property
 This function returns the specified property of the coding system
diff --git a/etc/DEBUG b/etc/DEBUG
index bb81414..c4774b0 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -201,7 +201,7 @@ errors go through there.  If you are only interested in 
errors that
 would fire the Lisp debugger, breaking at 'maybe_call_debugger' is
 useful.
 
-Another technique for get control to the debugger is to put a
+Another technique for getting control to the debugger is to put a
 breakpoint in some rarely used function.  One such convenient function
 is Fredraw_display, which you can invoke at will interactively with
 "M-x redraw-display RET".
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index 55385f5..b4c489c 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1037,6 +1037,13 @@ located and whether GnuPG's option '--homedir' is used 
or not.
 ---
 *** Deleting a package no longer respects 'delete-by-moving-to-trash'.
 
+** Python
+
++++
+*** The new variable 'python-indent-def-block-scale' has been added.
+It controls the depth of indentation of arguments inside multi-line
+function signatures.
+
 ** Tramp
 
 +++
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 5c72809..e7f6c26 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -1045,6 +1045,19 @@ commands show above to make them modifier keys.
 Note that if you have Alt keys but no Meta keys, Emacs translates Alt
 into Meta.  This is because of the great importance of Meta in Emacs.
 
+*** Emacs hangs or crashes when a large portion of text is selected or killed.
+
+This is caused by a bug in the clipboard management applets (it has
+been observed in 'klipper' and 'clipit'), which periodically request
+the X clipboard contents from applications.  After a while, Emacs may
+print a message:
+
+  Timed out waiting for property-notify event
+
+A workaround is to not use 'klipper'/'clipit'.  Upgrading 'klipper' to
+the one coming with KDE 3.3 or later might solve the problem; if it
+doesn't, set 'select-active-regions' to 'only' or nil.
+
 ** Window-manager and toolkit-related problems
 
 *** Emacs built with GTK+ toolkit produces corrupted display on HiDPI screen
@@ -1149,19 +1162,6 @@ It is also reported that a bug in the gtk-engines-qt 
engine can cause this if
 Emacs is compiled with Gtk+.
 The bug is fixed in version 0.7 or newer of gtk-engines-qt.
 
-*** KDE: Emacs hangs on KDE when a large portion of text is killed.
-
-This is caused by a bug in the KDE applet 'klipper' which periodically
-requests the X clipboard contents from applications.  Early versions
-of klipper don't implement the ICCCM protocol for large selections,
-which leads to Emacs being flooded with selection requests.  After a
-while, Emacs may print a message:
-
-  Timed out waiting for property-notify event
-
-A workaround is to not use 'klipper'.  Upgrading 'klipper' to the one
-coming with KDE 3.3 or later also solves the problem.
-
 *** KDE / Plasma 5: Emacs exhausts memory and needs to be killed
 
 This problem occurs when large selections contain mixed line endings
diff --git a/lisp/dframe.el b/lisp/dframe.el
index 9b0e550..12cedaf 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -288,6 +288,7 @@ CREATE-HOOK is a hook to run after creating a frame."
        (set frame-var nil))
     ;; Set this as our currently attached frame
     (setq dframe-attached-frame (selected-frame))
+    (run-hooks 'dframe-setup-hook)
     (run-hooks popup-hook)
     ;; Updated the buffer passed in to contain all the hacks needed
     ;; to make it work well in a dedicated window.
@@ -543,16 +544,21 @@ CACHE-VAR and BUFFER-VAR are symbols as in 
`dframe-frame-mode'."
       )))
 
 ;;; Special frame event proxies
-;;
-(if (boundp 'special-event-map)
-    (progn
-      (define-key special-event-map [make-frame-visible]
-       'dframe-handle-make-frame-visible)
-      (define-key special-event-map [iconify-frame]
-       'dframe-handle-iconify-frame)
-      (define-key special-event-map [delete-frame]
-       'dframe-handle-delete-frame))
-  )
+(defvar dframe-setup-hook nil
+  "Used for setting frame special event bindings.")
+
+(defun dframe-set-special-events ()
+  (define-key special-event-map [make-frame-visible]
+    'dframe-handle-make-frame-visible)
+  (define-key special-event-map [iconify-frame]
+    'dframe-handle-iconify-frame)
+  (define-key special-event-map [delete-frame]
+    'dframe-handle-delete-frame)
+  ;; Only need to run once.
+  (remove-hook 'dframe-setup-hook #'dframe-set-special-events))
+
+(when (boundp 'special-event-map)
+  (add-hook 'dframe-setup-hook #'dframe-set-special-events))
 
 (defvar dframe-make-frame-visible-function nil
   "Function used when a dframe controlled frame is de-iconified.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 68926b2..5baf6e0 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -752,6 +752,12 @@ It makes underscores and dots word constituent chars.")
   :type '(repeat symbol)
   :group 'python)
 
+(defcustom python-indent-def-block-scale 2
+  "Multiplier applied to indentation inside multi-line def blocks."
+  :version "26.1"
+  :type 'integer
+  :safe 'natnump)
+
 (defvar python-indent-current-level 0
   "Deprecated var available for compatibility.")
 
@@ -1071,9 +1077,9 @@ possibilities can be narrowed to specific indentation 
points."
                          (current-indentation)))
                      opening-block-start-points))))
         (`(,(or :inside-paren-newline-start-from-block) . ,start)
-         ;; Add two indentation levels to make the suite stand out.
          (goto-char start)
-         (+ (current-indentation) (* python-indent-offset 2))))))
+         (+ (current-indentation)
+            (* python-indent-offset python-indent-def-block-scale))))))
 
 (defun python-indent--calculate-levels (indentation)
   "Calculate levels list given INDENTATION.
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index caf76a4..6836fd0 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -338,8 +338,9 @@ always moves to the beginning of a line."
         (newline lines-left))))
 
 (defun picture-open-line (arg)
-  "Insert an empty line after the current line.
-With positive argument insert that many lines."
+  "Insert ARG empty lines after the current line.
+ARG must be positive.
+Interactively, ARG is the numeric argument, and defaults to 1."
   (interactive "p")
   (save-excursion
    (end-of-line)
@@ -788,8 +789,9 @@ they are not by default assigned to keys."
 
 (defun picture-mode-exit (&optional nostrip)
   "Undo `picture-mode' and return to previous major mode.
-With no argument, strip whitespace from end of every line in Picture buffer;
-  otherwise, just return to previous mode.
+With NOSTRIP omitted or nil, strip whitespace from end of every line
+  in Picture buffer; otherwise, just return to previous mode.
+Interactively, NOSTRIP is the prefix argument, and defaults to nil.
 Runs `picture-mode-exit-hook' at the end."
   (interactive "P")
   (if (not (eq major-mode 'picture-mode))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 44c0c20..dec7ebb 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2430,7 +2430,7 @@ When called interactively with a prefix argument, prompt 
for REMOTE-LOCATION."
     (with-current-buffer buf
       (vc-call-backend backend 'region-history-mode)
       (set (make-local-variable 'log-view-vc-backend) backend)
-      (set (make-local-variable 'log-view-vc-fileset) file)
+      (set (make-local-variable 'log-view-vc-fileset) (list file))
       (set (make-local-variable 'revert-buffer-function)
           (lambda (_ignore-auto _noconfirm)
              (with-current-buffer buf
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 5748b20..58b45fb 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -643,14 +643,23 @@ x_activate_menubar (struct frame *f)
 
       keyEq = [self parseKeyEquiv: wv->key];
 #ifdef NS_IMPL_COCOA
-      /* macOS just ignores modifier strings longer than one character */
+      /* macOS mangles modifier strings longer than one character.  */
       if (keyEquivModMask == 0)
-        title = [title stringByAppendingFormat: @" (%@)", keyEq];
+        {
+          title = [title stringByAppendingFormat: @" (%@)", keyEq];
+          item = [self addItemWithTitle: (NSString *)title
+                                 action: @selector (menuDown:)
+                          keyEquivalent: @""];
+        }
+      else
+        {
+#endif
+          item = [self addItemWithTitle: (NSString *)title
+                                 action: @selector (menuDown:)
+                          keyEquivalent: keyEq];
+#ifdef NS_IMPL_COCOA
+        }
 #endif
-
-      item = [self addItemWithTitle: (NSString *)title
-                             action: @selector (menuDown:)
-                      keyEquivalent: keyEq];
       [item setKeyEquivalentModifierMask: keyEquivModMask];
 
       [item setEnabled: wv->enabled];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]