Skip to content

Commit f95a2b8

Browse files
committed
Fix some broken conditional forms
Problem reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2020-01/msg00088.html * lisp/cedet/ede/cpp-root.el (ede-create-lots-of-projects-under-dir): Remove this quick hack, which didn’t do anything anyway. * lisp/cedet/ede/pconf.el (ede-proj-configure-test-required-file): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col): * lisp/net/nsm.el (nsm-check-tls-connection): Use ‘when’ rather than bypassing it. This doesn’t affect behavior and is better style. * lisp/cedet/srecode/semantic.el (srecode-semantic-handle-:tag): Fix typo that suppressed an error. * lisp/filesets.el (filesets-run-cmd): Fix typo that mishandled spacing. * lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data): Fix typo that caused “GROUP has older different info in the cloud as of DATE, update it here?” prompt result to always be treated as “yes”. * lisp/gnus/mml-smime.el (mml-smime-openssl-encrypt): Simplify, since smime-encrypt-buffer signals error on failure. * lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify. The conversion of this file to utf-8-emacs in 2019-01-08T02:18:[email protected] removed the distinction between Big5 and CNS fulltitles in the generated docstring. * lisp/org/org-agenda.el (org-agenda-show-and-scroll-up): * lisp/textmodes/table.el (table--generate-source-cell-contents): Simplify by removing useless code. * lisp/org/ox-odt.el (org-odt--format-timestamp): Fix typo that always output time-of-day even when the timestamp lacked it.
1 parent 2872744 commit f95a2b8

File tree

12 files changed

+22
-47
lines changed

12 files changed

+22
-47
lines changed

lisp/cedet/ede/cpp-root.el

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -478,21 +478,6 @@ Argument COMMAND is the command to use for compiling the target."
478478
"Don't rescan this project from the sources."
479479
(message "cpp-root has nothing to rescan."))
480480

481-
;;; Quick Hack
482-
(defun ede-create-lots-of-projects-under-dir (dir projfile &rest attributes)
483-
"Create a bunch of projects under directory DIR.
484-
PROJFILE is a file name sans directory that indicates a subdirectory
485-
is a project directory.
486-
Generic ATTRIBUTES, such as :include-path can be added.
487-
Note: This needs some work."
488-
(let ((files (directory-files dir t)))
489-
(dolist (F files)
490-
(if (file-exists-p (expand-file-name projfile F))
491-
`(ede-cpp-root-project (file-name-nondirectory F)
492-
:name (file-name-nondirectory F)
493-
:file (expand-file-name projfile F)
494-
attributes)))))
495-
496481
(provide 'ede/cpp-root)
497482

498483
;; Local variables:

lisp/cedet/ede/pconf.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ don't do it. A value of nil means to just do it.")
5656
(and (eq ede-pconf-create-file-query 'ask)
5757
(not (eq ede-pconf-create-file-query 'never))
5858
(not (y-or-n-p
59-
(format "I had to create the %s file for you. Ok? " file)))
60-
(error "Quit")))))))
59+
(format "I had to create the %s file for you. Ok? "
60+
file))))
61+
(error "Quit"))))))
6162

6263

6364
(cl-defmethod ede-proj-configure-synchronize ((this ede-proj-project))

lisp/cedet/srecode/semantic.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ variable default values, and other things."
201201
(let ((tag (or srecode-semantic-selected-tag
202202
(srecode-semantic-tag-from-kill-ring))))
203203
(when (not tag)
204-
"No tag for current template. Use the semantic kill-ring.")
204+
(error "No tag for current template. Use the semantic kill-ring."))
205205
(srecode-semantic-apply-tag-to-dict
206206
(srecode-semantic-tag (semantic-tag-name tag)
207207
:prime tag)

lisp/emacs-lisp/tabulated-list.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,10 @@ Return the column number after insertion."
547547
;; Don't truncate to `width' if the next column is align-right
548548
;; and has some space left, truncate to `available-space' instead.
549549
(when (and not-last-col
550-
(> label-width available-space)
551-
(setq label (truncate-string-to-width
552-
label available-space nil nil t t)
553-
label-width available-space)))
550+
(> label-width available-space))
551+
(setq label (truncate-string-to-width
552+
label available-space nil nil t t)
553+
label-width available-space))
554554
(setq label (bidi-string-mark-left-to-right label))
555555
(when (and right-align (> width label-width))
556556
(let ((shift (- width label-width)))

lisp/filesets.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,10 +1645,10 @@ Replace <file-name> or <<file-name>> with filename."
16451645
(dolist (this args txt)
16461646
(setq txt
16471647
(concat txt
1648+
(if (equal txt "") "" " ")
16481649
(filesets-run-cmd--repl-fn
16491650
this
16501651
(lambda (this)
1651-
(if (equal txt "") "" " ")
16521652
(format "%s" this))))))))
16531653
(cmd (concat fn " " args)))
16541654
(filesets-cmd-show-result

lisp/gnus/gnus-cloud.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ Use old data if FORCE-OLDER is not nil."
243243
(when (or (not gnus-cloud-interactive)
244244
(gnus-y-or-n-p
245245
(format "%s has older different info in the cloud as of %s, update it here? "
246-
group date))))
247-
(gnus-message 2 "Installing cloud update of group %s" group)
248-
(gnus-set-info group contents)
249-
(gnus-group-update-group group)))
246+
group date)))
247+
(gnus-message 2 "Installing cloud update of group %s" group)
248+
(gnus-set-info group contents)
249+
(gnus-group-update-group group))))
250250
(gnus-error 1 "Sorry, group %s is not subscribed" group))
251251
(gnus-error 1 "Sorry, could not update newsrc for group %s (invalid data %S)"
252252
group elem))))

lisp/gnus/mml-smime.el

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,9 @@ Whether the passphrase is cached at all is controlled by
154154
(write-region (point-min) (point-max) file))
155155
(push file certfiles)
156156
(push file tmpfiles)))
157-
(if (smime-encrypt-buffer certfiles)
158-
(progn
159-
(while (setq tmp (pop tmpfiles))
160-
(delete-file tmp))
161-
t)
162-
(while (setq tmp (pop tmpfiles))
163-
(delete-file tmp))
164-
nil))
157+
(smime-encrypt-buffer certfiles)
158+
(while (setq tmp (pop tmpfiles))
159+
(delete-file tmp)))
165160
(goto-char (point-max)))
166161

167162
(defvar gnus-extract-address-components)

lisp/international/titdic-cnv.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
737737
;; method is for inputting CNS characters.
738738

739739
(defun tsang-quick-converter (dicbuf tsang-p big5-p)
740-
(let ((fulltitle (if tsang-p (if big5-p "倉頡" "倉頡")
741-
(if big5-p "簡易" "簡易")))
740+
(let ((fulltitle (if tsang-p "倉頡" "簡易"))
742741
dic)
743742
(goto-char (point-max))
744743
(if big5-p

lisp/net/nsm.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,9 @@ See also: `network-security-protocol-checks' and `nsm-noninteractive'"
311311
(map-values results)
312312
"\n")
313313
"\n")
314-
"\n* ")))))
315-
(delete-process process)
316-
(setq process nil)))
314+
"\n* "))))))
315+
(delete-process process)
316+
(setq process nil))
317317
(run-hook-with-args 'nsm-tls-post-check-functions
318318
host port status settings results)))
319319
process)

lisp/org/org-agenda.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8981,7 +8981,6 @@ fold drawers."
89818981
(narrow-to-region (org-entry-beginning-position)
89828982
(org-entry-end-position))
89838983
(org-show-all '(drawers))))
8984-
(when arg )
89858984
(setq org-agenda-show-window (selected-window)))
89868985
(select-window win)))
89878986

0 commit comments

Comments
 (0)