diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 9d6fc6ca72a..2fd2bbc1ce5 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 -@code{utf-8-emacs}. +@code{utf-8-emacs-unix} (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 bb81414c817..c4774b06d38 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 55385f59a80..b4c489cf7bd 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 5c72809f2a1..e7f6c267cbb 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 9b0e550728a..12cedaf5201 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 68926b275ea..5baf6e0f80a 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 caf76a41a1a..6836fd09a07 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 44c0c207d67..dec7ebb43e4 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 5748b20ce81..58b45fb38e5 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -643,14 +643,23 @@ - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr 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];