[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 51cd14b 173/215: Clarify %p in documentation of expand-for
From: |
Rocky Bernstein |
Subject: |
[elpa] master 51cd14b 173/215: Clarify %p in documentation of expand-format |
Date: |
Sat, 30 Jul 2016 14:49:03 +0000 (UTC) |
branch: master
commit 51cd14bb7ac6e8cf8fc2a817d09f956a13e36b7b
Author: Clément Pit--Claudel <address@hidden>
Commit: Clément Pit--Claudel <address@hidden>
Clarify %p in documentation of expand-format
Also ensure %s formats nil as an empty string (for consistency with %p).
---
realgud/common/send.el | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/realgud/common/send.el b/realgud/common/send.el
index 39ac519..648632b 100644
--- a/realgud/common/send.el
+++ b/realgud/common/send.el
@@ -118,9 +118,10 @@ results into the command buffer."
(defun realgud-expand-format (fmt-str &optional opt-str opt-buffer)
- "Expands commands format characters inside FMT-STRING using values
-from the debugging session. OPT-STR is an optional string.
-Some %-escapes in the string arguments are expanded. These are:
+ "Expands commands format characters inside FMT-STR.
+OPT-STR is an optional string (used with %p and %s). Values are
+taken from current buffer, or OPT-BUFFER if non-nil. Some
+%-escapes in the string arguments are expanded. These are:
%f -- Name without directory of current source file.
%F -- Name without directory or extension of current source file.
@@ -128,13 +129,12 @@ Some %-escapes in the string arguments are expanded.
These are:
%X -- Expanded name of current source file.
%d -- Directory of current source file.
%l -- Number of current source line.
- %p -- Numeric prefix argument converted to a string
- If no prefix argument %p is the null string.
%c -- Fully qualified class name derived from the expression
surrounding point.
- %s -- value of opt-str.
+ %p -- Value of OPT-STR, converted to string using `int-to-string'
+ %s -- Value of OPT-STR.
-"
+%p and %s are replaced by an empty string if OPT-STR is nil."
(let* ((buffer (or opt-buffer (current-buffer)))
(srcbuf (realgud-get-srcbuf buffer))
(src-file-name (and srcbuf (buffer-file-name srcbuf)))
@@ -182,9 +182,9 @@ Some %-escapes in the string arguments are expanded. These
are:
;; (gud-read-address))
;; ((eq key ?c)
;; (gud-find-class srcbuf))
- ((eq key ?p) (if opt-str (int-to-string opt-str) ""))
- ((eq key ?s) opt-str)
- (t key)))))
+ ((eq key ?p) (if opt-str (int-to-string opt-str) ""))
+ ((eq key ?s) (or opt-str ""))
+ (t key)))))
(setq fmt-str (substring fmt-str (match-end 2))))
;; There might be text left in FMT-STR when the loop ends.
(concat result fmt-str)))
- [elpa] master 3f08b2b 165/215: Update screenshot, (continued)
- [elpa] master 3f08b2b 165/215: Update screenshot, Rocky Bernstein, 2016/07/30
- [elpa] master 4ac3ca2 147/215: Fill in missing bits of Cask file, Rocky Bernstein, 2016/07/30
- [elpa] master 785eb68 168/215: Remove unwanted argument in call to cmd-run-command, Rocky Bernstein, 2016/07/30
- [elpa] master bc3fa20 162/215: Add some enable/disble patterns, Rocky Bernstein, 2016/07/30
- [elpa] master 2ca160c 080/215: Merge pull request #63 from cohomology/feature/empty_command_line, Rocky Bernstein, 2016/07/30
- [elpa] master 4f5c91f 177/215: Add basic support for jumping, Rocky Bernstein, 2016/07/30
- [elpa] master b7a7fe9 213/215: Release 1.4.0 which will be on melpa stable and elpa, Rocky Bernstein, 2016/07/30
- [elpa] master 260bc5a 187/215: Mark debuggers that don't have "jump"., Rocky Bernstein, 2016/07/30
- [elpa] master 3cb53e0 210/215: Assign more copyrights to FSF, Rocky Bernstein, 2016/07/30
- [elpa] master 6f54316 161/215: Update README.md, Rocky Bernstein, 2016/07/30
- [elpa] master 51cd14b 173/215: Clarify %p in documentation of expand-format,
Rocky Bernstein <=
- [elpa] master 13a3d4e 140/215: Minor docstring and code cleanups, Rocky Bernstein, 2016/07/30
- [elpa] master c919f96 115/215: Update IPDB in accordance with PDB, Rocky Bernstein, 2016/07/30
- [elpa] master 9358b1b 144/215: Merge pull request #104 from rocky/36-auto-attach, Rocky Bernstein, 2016/07/30
- [elpa] master 480cbb3 159/215: Remove leftover debugging message, Rocky Bernstein, 2016/07/30
- [elpa] master b2c9e67 156/215: Allow realgud-track-bp-delete to recognize multiple breakpoints, Rocky Bernstein, 2016/07/30
- [elpa] master c522acc 158/215: Merge pull request #110 from rocky/delete-multiple-breakpoints, Rocky Bernstein, 2016/07/30
- [elpa] master be7718a 073/215: Go over perldb init re's. Attempt smaller cleanup of tests and note how, Rocky Bernstein, 2016/07/30
- [elpa] master f08a894 170/215: Ensure that the Github organization logo is a square, Rocky Bernstein, 2016/07/30
- [elpa] master 6e72375 160/215: Merge pull request #111 from rocky/better-breakpoint-highlighting, Rocky Bernstein, 2016/07/30
- [elpa] master a89d1b2 149/215: Rewrite README, Rocky Bernstein, 2016/07/30