]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'srecode-all-template-hash' always returning nil
authorCharalampos Mitrodimas <charmitro@posteo.net>
Sat, 4 May 2024 19:45:15 +0000 (22:45 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 10 May 2024 13:35:06 +0000 (15:35 +0200)
The issue was that the function always returned nil because
the closing parentheses were in the wrong position.  This
meant that the function couldn't give back the data it was
supposed to, making the whole srecode system not work
properly.
By moving the parentheses to the correct place, the function
now returns a hash table with all the templates it finds.
* lisp/cedet/srecode/find.el (srecode-all-template-hash):
Adjusted the position of closing parentheses so that the mhash
variable is returned correctly.  (Bug#70765)

Copyright-paperwork-exempt: yes
(cherry picked from commit e0ca21f9fb82fb27bb6a55a3c07b2ad1492f7680)

lisp/cedet/srecode/find.el

index 41030aa6944577eadf9037c67b255e977c609d6e..db6b39885629937ca23a254d457431a265cb73f6 100644 (file)
@@ -233,8 +233,8 @@ templates."
                     (when (or (not predicate)
                               (funcall predicate temp))
                       (puthash key temp mhash)))
-                  (oref tab namehash))))
-      mhash))))
+                  (oref tab namehash))))))
+      mhash))
 
 (defun srecode-calculate-default-template-string (hash)
   "Calculate the name of the template to use as a DEFAULT.