summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-06-05 22:29:08 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-06-05 22:29:08 +0200
commit50cbb727b53ca2e4025a6ac304423a94e26fe17f (patch)
treeb5e88acbdc979141e8277084e9213da77aecc9dc
parent3f388d7929346f39c99b7d801e8f62a9b71c4b73 (diff)
downloademacs-50cbb727b53ca2e4025a6ac304423a94e26fe17f.tar.gz
emacs-50cbb727b53ca2e4025a6ac304423a94e26fe17f.tar.bz2
emacs-50cbb727b53ca2e4025a6ac304423a94e26fe17f.zip
Simplify set-goal-column
* lisp/simple.el (set-goal-column): Simplify the code.
-rw-r--r--lisp/simple.el16
1 files changed, 4 insertions, 12 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index c749e6e41d6..ac41b394a78 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8096,18 +8096,10 @@ a buffer-local setting."
(setq goal-column nil)
(message "No goal column"))
(setq goal-column (current-column))
- ;; The older method below can be erroneous if `set-goal-column' is bound
- ;; to a sequence containing %
- ;;(message (substitute-command-keys
- ;;"Goal column %d (use \\[set-goal-column] with an arg to unset it)")
- ;;goal-column)
- (message "%s"
- (concat
- (format "Goal column %d " goal-column)
- (substitute-command-keys
- "(use \\[set-goal-column] with an arg to unset it)")))
-
- )
+ (message "Goal column %d %s"
+ goal-column
+ (substitute-command-keys
+ "(use \\[set-goal-column] with an arg to unset it)")))
nil)
;;; Editing based on visual lines, as opposed to logical lines.