From: rearman Date: Tue, 17 Jan 2023 21:12:06 +0000 (-0500) Subject: Change text-quoting-style to straight X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=94267fbed0cc59710d3f6f87c2a33e0918123656;p=emacsinit.git Change text-quoting-style to straight --- diff --git a/defuns.el b/defuns.el index 5b96c92..db0d8c7 100644 --- a/defuns.el +++ b/defuns.el @@ -119,7 +119,7 @@ Makes a closing paren execute the sexp. Currently in test, look out for errors. ((t nil))))) (defun slot/get-queries (&optional pairs) - "Get multiple `query-replace' pairs from the user. + "Get multiple 'query-replace' pairs from the user. PAIRS is a list of replacement pairs of the form (FROM . TO). Stolen from https://tony-zorman.com/posts/query-replace/2022-08-06-query-replace-many.html" (-let* (((from to delim arg) @@ -143,11 +143,11 @@ Stolen from https://tony-zorman.com/posts/query-replace/2022-08-06-query-replace (defun slot/replace-string-many (pairs &optional delimited start end backward region-noncontiguous-p) - "Like `replace-string', but query for several replacements. + "Like 'replace-string', but query for several replacements. Query for replacement pairs until the users enters an empty -string (but see `slot/get-queries'). +string (but see 'slot/get-queries'). -Refer to `query-replace' and `perform-replace' for what the other +Refer to 'query-replace' and 'perform-replace' for what the other arguments actually mean. Stolen from https://tony-zorman.com/posts/query-replace/2022-08-06-query-replace-many.html Edited and renamed to remove the Query." @@ -170,11 +170,11 @@ Edited and renamed to remove the Query." (defun slot/query-replace-many (pairs &optional delimited start end backward region-noncontiguous-p) - "Like `query-replace', but query for several replacements. + "Like 'query-replace', but query for several replacements. Query for replacement pairs until the users enters an empty -string (but see `slot/get-queries'). +string (but see 'slot/get-queries'). -Refer to `query-replace' and `perform-replace' for what the other +Refer to 'query-replace' and 'perform-replace' for what the other arguments actually mean. Stolen from https://tony-zorman.com/posts/query-replace/2022-08-06-query-replace-many.html" (interactive diff --git a/setq-defaults.el b/setq-defaults.el index 64ce961..1d02de1 100644 --- a/setq-defaults.el +++ b/setq-defaults.el @@ -8,6 +8,7 @@ cursor-in-non-selected-windows nil) (setq require-final-newline t + text-quoting-style 'straight ring-bell-function 'ignore use-short-answers t mode-line-compact t diff --git a/work-eqs.el b/work-eqs.el index d217c77..0e8faa2 100644 --- a/work-eqs.el +++ b/work-eqs.el @@ -83,12 +83,12 @@ Returns a list of Sat. Water Press., Hum. Ratio, and Gns water/lb air." (defun k-to-f (tempk) "Convert degrees Kelvin to degrees Fahrenheit. -Applies `c-to-f' to `k-to-c'." +Applies 'c-to-f' to 'k-to-c'." (c-to-f (k-to-c tempk))) (defun f-to-k (tempf) "Convert degrees Fahrenheit to degrees Kelvin. -Applies `c-to-k' to `f-to-c'." +Applies 'c-to-k' to 'f-to-c'." (c-to-k (f-to-c tempf))) (defun max-counts (resolution) @@ -98,17 +98,17 @@ Formula is 1 - 2^(resolution)" (defun volts-to-counts (vin vmax resolution) "Convert a voltage signal to a PLC count. -Calculates a ratio of vin/vmax, then scales by `max-counts'." +Calculates a ratio of vin/vmax, then scales by 'max-counts'." (* (/ (float vin) (float vmax)) (float (max-counts resolution)))) (defun counts-to-volts (cin vmax resolution) "Convert a PLC count to a voltage. -Calculates a ratio of cin/`max-counts', then multiplies by vmax." +Calculates a ratio of cin/'max-counts', then multiplies by vmax." (* (/ cin (float (max-counts resolution))) vmax)) (defun eff-imp (r1 &optional r2) "Calculate the effective input impedance, given two resistances. -For use in `amps-to-volts' and related. The handling of only one resistance +For use in 'amps-to-volts' and related. The handling of only one resistance given is done here, instead of doing it in every function that uses this." (if (eq nil r2) r1 @@ -116,25 +116,25 @@ given is done here, instead of doing it in every function that uses this." (defun amps-to-volts (amps r1 &optional r2) "Calculate the voltage, given amperage and impedance. -Multiplies the amperage by the effective impedance calculated with `eff-imp'." +Multiplies the amperage by the effective impedance calculated with 'eff-imp'." (* amps (eff-imp r1 r2))) (defun volts-to-amps (volts r1 &optional r2) "Calculate the amperage, given voltage and impedance. -Divides the voltage by the effective impedance calculated with `eff-imp'." +Divides the voltage by the effective impedance calculated with 'eff-imp'." (/ volts (eff-imp r1 r2))) (defun amps-to-counts (amps vmax resolution r1 &optional r2) "Convert an amp signal to PLC Counts. -Converts the amperage to a voltage using `amps-to-volts' (with r1 and optional r2), -then applies `volts-to-counts' to the resulting voltage, vmax, and resolution." +Converts the amperage to a voltage using 'amps-to-volts' (with r1 and optional r2), +then applies 'volts-to-counts' to the resulting voltage, vmax, and resolution." (volts-to-counts (amps-to-volts amps r1 r2) vmax resolution)) (defun count-range (type upper lower vmax resolution &optional r1 r2) "Given an upper and lower signal, return the list of upper and lower PLC counts. Type takes either a v or an i, corresponding to a voltage or current signal. -With a current signal, use r1 and maybe r2 to calculate `amps-to-counts'. -Otherwise ignore r1/r2 and calculate `volts-to-counts'." +With a current signal, use r1 and maybe r2 to calculate 'amps-to-counts'. +Otherwise ignore r1/r2 and calculate 'volts-to-counts'." (cond ((or (equal 'v type) (equal 'V type)) (list (volts-to-counts upper vmax resolution)