[வியாழன் டிசம்பர் 26, 2024] Ihor Radchenko wrote: > Visuwesh writes: > >>> Also, (cdr (assq 'gnus org-link-frame-setup)) = nil is not the only >>> possible incorrect customization. I'd rather check if the cdr is a >>> function and throw a descriptive error otherwise asking to fix >>> `org-link-frame-setup'. >> >> How about the attached? > > You still do not check if the value is a function. > Consider totally wrong values like '(wrong). `fboundp' will then throw > an error. You may consider `functionp' instead. Ah, I wasn't aware that functionp also returned t if you gave a symbol. Thanks for the hint. >> +(defun org-link-frame-setup-function (link-type) >> + "Return the frame setup function for the link type LINK-TYPE. >> +This signals an error if the value of the key LINK-TYPE in >> +`org-link-frame-setup' is not a function." >> + (let ((fun (cdr (assq link-type org-link-frame-setup)))) >> + (if (fboundp fun) >> + fun >> + (error "The frame setup configuration for `%s' link type is ill-defined" >> + link-type)))) > > In the error, we can also show the problematic value to aid the user. Now done. >> @@ -15311,20 +15311,20 @@ (defun org-modify-ts-extra (ts-string pos nincrements increment-step) >> (setq hour (mod hour 24)) >> (setq pos-match-group 1 >> new (format "-%02d:%02d" hour minute))) >> - >> + >> ... > > Please remove irrelevant whitespace-only changes. Done. Please find attached.