summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/erc/erc.el35
-rw-r--r--lisp/frame.el31
-rw-r--r--lisp/simple.el28
-rw-r--r--lisp/tab-bar.el6
-rw-r--r--lisp/tool-bar.el2
5 files changed, 66 insertions, 36 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 308812f0eb2..3462aa4db0e 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -58,7 +58,7 @@
;;; Code:
-(load "erc-loaddefs" nil t)
+(load "erc-loaddefs" 'noerror 'nomessage)
(require 'cl-lib)
(require 'format-spec)
@@ -69,6 +69,9 @@
(require 'iso8601)
(eval-when-compile (require 'subr-x))
+(defconst erc-version "5.3"
+ "This version of ERC.")
+
(defvar erc-official-location
"https://www.gnu.org/software/emacs/erc.html (mailing list: emacs-erc@gnu.org)"
"Location of the ERC client on the Internet.")
@@ -3613,7 +3616,7 @@ If USER is omitted, close the current query buffer if one exists
(defun erc-quit/part-reason-default ()
"Default quit/part message."
- (format "\C-bERC\C-b (IRC client for Emacs %s)" emacs-version))
+ (erc-version nil 'bold-erc))
(defun erc-quit-reason-normal (&optional s)
@@ -3766,7 +3769,8 @@ the message given by REASON."
(defun erc-cmd-SV ()
"Say the current ERC and Emacs version into channel."
- (erc-send-message (format "I'm using ERC with GNU Emacs %s (%s%s)%s."
+ (erc-send-message (format "I'm using ERC %s with GNU Emacs %s (%s%s)%s."
+ erc-version
emacs-version
system-configuration
(concat
@@ -4845,8 +4849,8 @@ See also `erc-display-message'."
(unless erc-disable-ctcp-replies
(erc-send-ctcp-notice
nick (format
- "VERSION \C-bERC\C-b - an IRC client for Emacs %s (\C-b%s\C-b)"
- emacs-version
+ "VERSION %s (\C-b%s\C-b)"
+ (erc-version nil 'bold-erc)
erc-official-location)))
nil)
@@ -6616,6 +6620,15 @@ If BUFFER is nil, update the mode line in all ERC buffers."
;; Miscellaneous
+(defun erc-bug (subject)
+ "Send a bug report to the Emacs bug tracker and ERC mailing list."
+ (interactive "sBug Subject: ")
+ (report-emacs-bug
+ (format "ERC %s: %s" erc-version subject))
+ (save-excursion
+ (goto-char (point-min))
+ (insert "X-Debbugs-CC: emacs-erc@gnu.org\n")))
+
(defun erc-port-to-string (p)
"Convert port P to a string.
P may be an integer or a service name."
@@ -6632,12 +6645,18 @@ P may be an integer or a service name."
s
n))))
-(defun erc-version (&optional here)
+(defun erc-version (&optional here bold-erc)
"Show the version number of ERC in the minibuffer.
-If optional argument HERE is non-nil, insert version number at point."
+If optional argument HERE is non-nil, insert version number at point.
+If optional argument BOLD-ERC is non-nil, display \"ERC\" as bold."
(interactive "P")
(let ((version-string
- (format "ERC (IRC client for Emacs %s)" emacs-version)))
+ (format "%s %s (IRC client for GNU Emacs %s)"
+ (if bold-erc
+ "\C-bERC\C-b"
+ "ERC")
+ erc-version
+ emacs-version)))
(if here
(insert version-string)
(if (called-interactively-p 'interactive)
diff --git a/lisp/frame.el b/lisp/frame.el
index e97b9903df8..2c73737a541 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -786,25 +786,26 @@ When called from Lisp, returns the new frame."
(make-frame)
(select-frame (make-frame))))
-(defun clone-frame (&optional frame use-default-parameters)
- "Make a new frame with the same parameters as FRAME.
-With a prefix arg (USE-DEFAULT-PARAMETERS), use
-`default-frame-alist' instead.
+(defun clone-frame (&optional frame no-windows)
+ "Make a new frame with the same parameters and windows as FRAME.
+With a prefix arg NO-WINDOWS, don't clone the window configuration.
FRAME defaults to the selected frame. The frame is created on the
same terminal as FRAME. If the terminal is a text-only terminal then
also select the new frame."
- (interactive "i\nP")
- (if use-default-parameters
- (make-frame-command)
- (let* ((default-frame-alist (seq-filter
- (lambda (elem)
- (not (eq (car elem) 'name)))
- (frame-parameters frame)))
- (new-frame (make-frame)))
- (unless (display-graphic-p)
- (select-frame new-frame))
- new-frame)))
+ (interactive (list (selected-frame) current-prefix-arg))
+ (let* ((frame (or frame (selected-frame)))
+ (windows (unless no-windows
+ (window-state-get (frame-root-window frame))))
+ (default-frame-alist
+ (seq-remove (lambda (elem) (eq (car elem) 'name))
+ (frame-parameters frame)))
+ (new-frame (make-frame)))
+ (when windows
+ (window-state-put windows (frame-root-window new-frame) 'safe))
+ (unless (display-graphic-p)
+ (select-frame new-frame))
+ new-frame))
(defvar before-make-frame-hook nil
"Functions to run before `make-frame' creates a new frame.")
diff --git a/lisp/simple.el b/lisp/simple.el
index d7030c03794..f7e62e06ce1 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8429,21 +8429,29 @@ presented."
(defcustom blink-matching-paren t
"Non-nil means show matching open-paren when close-paren is inserted.
-In addition, if the opening paren is not visible on screen, show
-its position in the echo area.
+If this is non-nil, then when you type a closing delimiter, such as a
+closing parenthesis or brace, Emacs briefly indicates the location
+of the matching opening delimiter.
The valid values are:
- nil Disable.
- non-nil Highlight the opening paren.
- `jump' Briefly move cursor to its position.
- `jump-offscreen' Briefly move cursor to its position,
- even if the opening paren is not on screen."
+ t Highlight the matching open-paren if it is visible
+ in the window, otherwise show the text with matching
+ open-paren in the echo area. This is the default.
+ `jump' If the matching open-paren is visible in the window,
+ briefly move cursor to its position; otherwise show
+ the text with matching open-paren in the echo area.
+ `jump-offscreen' Briefly move cursor to the matching open-paren
+ even if it is not visible in the window.
+ nil Don't show the matching open-paren.
+
+Any other non-nil value is handled the same as t."
+
:type '(choice
(const :tag "Disable" nil)
- (const :tag "Highlight" t)
- (const :tag "Move cursor" jump)
- (const :tag "Move cursor, even if off screen" jump-offscreen))
+ (const :tag "Highlight open-paren if visible" t)
+ (const :tag "Move cursor to open-paren if visible" jump)
+ (const :tag "Move cursor even if it's off screen" jump-offscreen))
:group 'paren-blinking)
(defcustom blink-matching-paren-on-screen t
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 68afb539fa3..b08b7442677 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -316,7 +316,7 @@ that closes only when clicked on the close button."
`(menu-item "Detach" (lambda () (interactive)
(tab-bar-detach-tab
,tab-number))
- :help "Detach the tab to new frame"))
+ :help "Move the tab to new frame"))
(define-key-after menu [close]
`(menu-item "Close" (lambda () (interactive)
(tab-bar-close-tab ,tab-number))
@@ -1208,8 +1208,8 @@ Interactively, ARG selects the ARGth different frame to move to."
(force-mode-line-update t))))
(defun tab-bar-detach-tab (&optional from-number)
- "Detach tab number FROM-NUMBER to a new frame.
-Interactively or without argument, detach current tab."
+ "Move tab number FROM-NUMBER to a new frame.
+Interactively or without argument, move the current tab."
(interactive (list (1+ (tab-bar--current-tab-index))))
(let* ((tabs (funcall tab-bar-tabs-function))
(tab-index (1- (or from-number (1+ (tab-bar--current-tab-index tabs)))))
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 6da401187b1..f5d64aeb36c 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -290,6 +290,8 @@ holds a keymap."
"Specify on which side the tool bar shall be.
Possible values are `top' (tool bar on top), `bottom' (tool bar at bottom),
`left' (tool bar on left) and `right' (tool bar on right).
+This option has effect only on graphical frames and only
+if Emacs was built with GTK.
Customize `tool-bar-mode' if you want to show or hide the tool bar."
:version "24.1"
:type '(choice (const top)